/*
 * AniJs — app.css
 * Shared theme and components for the streaming frontend.
 * Dark, original design. Not a clone of any source site.
 */

:root {
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --bg: #0d0f14;
  --bg-soft: #141821;
  --surface: #1a1f2b;
  --surface-hi: #222836;
  --border: rgba(255, 255, 255, .07);
  --border-hi: rgba(255, 255, 255, .14);

  --ink: #f3f5f8;
  --body: #b7c0cf;
  --muted: #7b8494;

  --accent: #5db8a6;
  --accent-hi: #6fd0bc;
  --amber: #e8a55a;
  --danger: #e06d6d;

  --sub: #3fb489;
  --dub: #d69a4a;

  --shadow: 0 8px 30px rgba(0, 0, 0, .35);
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 15, 20, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: inline-flex; align-items: center; flex-shrink: 0; line-height: 1; }
.logo img { width: 132px; height: 34px; object-fit: contain; }
.nav-brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.nav-menu-toggle { display: grid; place-items: center; width: 30px; height: 36px; padding: 2px; color: var(--ink); background: transparent; border: 0; border-radius: 5px; cursor: pointer; }
.nav-menu-toggle:hover { color: var(--accent); background: var(--surface); }
.nav-menu-toggle svg { width: 26px; height: 26px; }
.nav-menu-toggle .menu-close, .nav-menu-toggle[aria-expanded="true"] .menu-bars { display: none; }
.nav-menu-toggle[aria-expanded="true"] .menu-close { display: block; }
.site-menu { position: absolute; top: 100%; left: max(24px, calc((100% - 1272px) / 2)); width: 204px; max-height: calc(100svh - 170px); overflow-y: auto; padding: 10px 0; background: #101d2b; border: 1px solid var(--border); border-radius: 0 0 7px 7px; box-shadow: var(--shadow); z-index: 65; }
.site-menu[hidden] { display: none; }
.site-menu a, .site-menu summary { display: block; padding: 8px 20px; color: #92a9c5; font-size: .86rem; font-weight: 500; cursor: pointer; }
.site-menu a:hover, .site-menu summary:hover { color: #ecf6ff; background: #1a2d40; }
.site-menu summary { list-style: none; }
.site-menu summary::-webkit-details-marker { display: none; }
.site-menu summary::after { content: '+'; float: right; }
.site-menu details[open] summary::after { content: '−'; }
.site-menu-types > div { padding: 2px 0; background: #0b1622; }
.site-menu-types a { padding-left: 32px; font-size: .8rem; }
.nav-search { position: relative; flex: 1; max-width: 460px; min-width: 0; }
.nav-search input {
  width: 100%; padding: 10px 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--ink); font-family: var(--font-body); font-size: .9rem; outline: none;
  transition: border-color .15s;
}
.nav-search input:focus { border-color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-btn {
  padding: 8px 14px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--body); font-size: .85rem; font-weight: 500;
  font-family: var(--font-body); cursor: pointer; transition: all .15s; white-space: nowrap;
}
.nav-btn:hover { background: var(--surface); color: var(--ink); }
.nav-weekly { display: inline-flex; align-items: center; gap: 7px; }
.nav-weekly svg { flex-shrink: 0; }
.nav-btn.solid { background: var(--accent); color: #08110f; border-color: var(--accent); }
.nav-btn.solid:hover { background: var(--accent-hi); }
.nav-account { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.nav-account-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; color: var(--ink); }
.nav-account-status { position: absolute; top: 100%; right: 0; width: min(280px, 85vw); background: var(--surface); border-radius: 8px; color: var(--danger); font-size: .8rem; }
.nav-account-status:not(:empty) { padding: 12px; border: 1px solid var(--danger); }
@media (max-width: 780px) {
  .nav-links { flex-wrap: wrap; }
  .nav-account-name { max-width: 120px; }
}

/* Search dropdown */
.search-drop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border-hi);
  border-radius: 12px; box-shadow: var(--shadow); overflow: hidden;
  max-height: 420px; overflow-y: auto; display: none;
}
.search-drop.open { display: block; }
.search-row { display: flex; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: default; }
.search-row:last-child { border-bottom: none; }
.search-row:hover { background: var(--surface-hi); }
.search-row img { width: 42px; height: 58px; object-fit: cover; border-radius: 6px; background: var(--bg-soft); flex-shrink: 0; }
.search-row .t { font-size: .85rem; color: var(--ink); font-weight: 500; line-height: 1.3; }
.search-row .m { font-size: .72rem; color: var(--muted); margin-top: 3px; }
.search-empty { padding: 16px; text-align: center; color: var(--muted); font-size: .85rem; }

/* ---- Hero ---- */
.hero { position: relative; height: 460px; overflow: hidden; background: var(--bg-soft); }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease;
  background-size: cover; background-position: center 20%;
}
.hero-slide.active { opacity: 1; }
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(13,15,20,.96) 0%, rgba(13,15,20,.7) 40%, rgba(13,15,20,.25) 100%),
              linear-gradient(0deg, var(--bg) 2%, transparent 40%);
}
.hero-content {
  position: absolute; z-index: 2; bottom: 0; left: 0; right: 0;
  max-width: 1320px; margin: 0 auto; padding: 0 24px 44px;
}
.hero-inner { max-width: 560px; }
.hero-badges { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .03em; padding: 3px 8px;
  border-radius: 5px; background: var(--surface-hi); color: var(--body);
}
.badge.sub { background: rgba(63,180,137,.16); color: var(--sub); }
.badge.dub { background: rgba(214,154,74,.16); color: var(--dub); }
.badge.q { background: rgba(93,184,166,.16); color: var(--accent-hi); }
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1.05; letter-spacing: -.02em;
  color: var(--ink); margin: 0 0 12px;
}
.hero p { color: var(--body); font-size: .92rem; line-height: 1.6; margin: 0 0 20px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-dots { display: flex; gap: 7px; margin-top: 22px; }
.hero-dots button { width: 8px; height: 8px; border-radius: 50%; border: none; background: var(--border-hi); cursor: pointer; padding: 0; transition: all .2s; }
.hero-dots button.on { background: var(--accent); width: 22px; border-radius: 4px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 10px; font-size: .88rem; font-weight: 600;
  font-family: var(--font-body); border: none; cursor: pointer; transition: all .15s;
}
.btn.primary { background: var(--accent); color: #08110f; }
.btn.primary:hover { background: var(--accent-hi); }

/* ---- Layout ---- */
/* Home runs as wide as the watch page so a large display has no dead margin. */
.wrap-home { max-width: 1800px; }
.main { padding: 40px 0 60px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }

/* Genre and A-Z filter chips. */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg-soft); color: var(--body); font-family: var(--font-body);
  font-size: .8rem; cursor: pointer; transition: all .12s; }
.chip:hover { border-color: var(--border-hi); color: var(--ink); }
.chip.on { background: rgba(93,184,166,.16); border-color: var(--accent); color: var(--accent-hi); }
.chip-row.az .chip { min-width: 44px; text-align: center; font-weight: 600; }
/* minmax(0, 1fr), not 1fr: a bare 1fr track refuses to shrink below its
   content, so a wide section header pushed the whole page sideways. */
@media (max-width: 980px) { .main { grid-template-columns: minmax(0, 1fr); } }

.section { margin-bottom: 40px; }
/* Wraps on narrow screens: the title, the tabs and the pager together need
   more width than a phone has, and without this they pushed the page sideways. */
.section-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-title { font-family: var(--font-display); font-size: 1.7rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); margin: 0; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
/* Page arrows, sitting at the right end of a section header. */
.pager { display: flex; align-items: center; gap: 6px; }
.pager-btn { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--border); background: var(--bg-soft);
  color: var(--body); font-size: 1.05rem; line-height: 1; cursor: pointer; transition: all .12s; }
.pager-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--ink); }
.pager-btn:disabled { opacity: .35; cursor: default; }
.pager-btn.on { background: var(--accent); border-color: var(--accent); color: #08110f; font-weight: 700; }
.pager-btn { min-width: 32px; width: auto; padding-inline: 8px; font-family: var(--font-body); font-size: .82rem; }
.pager-gap { color: var(--muted); min-width: 18px; text-align: center; }
.catalog-pagination { justify-content: center; flex-wrap: wrap; gap: 6px; padding-top: 22px; }
.catalog-pagination .pager-now { flex-basis: 100%; margin-top: 6px; }
.catalog-pagination-top { padding-top: 0; padding-bottom: 18px; }
.catalog-section { scroll-margin-top: 84px; }
@media (max-width: 780px) { .catalog-section { scroll-margin-top: 160px; } }
.view-more { color: var(--accent); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.view-more:hover { color: var(--accent-hi); text-decoration: underline; }
.browse-page { padding-top: 32px; padding-bottom: 32px; }
.catalog-back { display: inline-block; margin-bottom: 18px; color: var(--muted); font-size: .85rem; }
.catalog-description { margin: 0 0 24px; color: var(--muted); font-size: .9rem; }
.pager-now { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums;
  min-width: 42px; text-align: center; }
.tab { padding: 5px 12px; border-radius: 8px; border: none; background: transparent; color: var(--muted); font-size: .8rem; font-weight: 600; font-family: var(--font-body); cursor: pointer; transition: all .15s; }
.tab:hover { color: var(--body); }
.tab.on { background: var(--surface-hi); color: var(--accent-hi); }

/* ---- Cards grid ---- */
/* Six cards to a row, so a 12-card page reads as two even rows of six
   instead of one long ragged line. Steps down rather than reflowing freely. */
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 22px 16px; }
@media (max-width: 1400px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px)  { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px)  { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card { cursor: pointer; }
.card-poster { position: relative; aspect-ratio: 2/3; border-radius: 10px; overflow: hidden; background: var(--surface); }
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-poster img { transform: scale(1.05); }
.card-progress-bar { position: absolute; bottom: 0; left: 0; right: 0; display: flex; align-items: flex-end; gap: 5px; padding: 4px 5px; background: #17283c; color: #b0c4df; font-size: .7rem; line-height: 1.25; }
.card-episode-counts { display: flex; flex-wrap: wrap; gap: 3px; min-width: 0; }
.episode-progress { display: inline-flex; white-space: nowrap; overflow: hidden; border-radius: 2px; font-variant-numeric: tabular-nums; font-weight: 600; }
.episode-released { display: inline-flex; align-items: center; gap: 3px; padding: 1px 3px; background: #1598c6; color: white; }
.episode-cc { font-size: .55rem; font-weight: 800; border: 1px solid currentColor; border-radius: 1px; padding: 0 1px; line-height: 1; }
.episode-released svg { width: 10px; height: 11px; }
.episode-total { padding: 1px 4px 1px 3px; background: #2b405b; color: #d9e5f4; }
.card-format { margin-left: auto; flex-shrink: 0; color: #9bb4d2; font-size: .65rem; font-style: italic; }
.card-badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 5px; }
.card-type { position: absolute; bottom: 8px; right: 8px; font-size: .66rem; font-weight: 700; padding: 2px 7px; border-radius: 5px; background: rgba(13,15,20,.8); color: var(--body); }
.chip { font-size: .64rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; display: inline-flex; align-items: center; gap: 3px; }
.chip.sub { background: rgba(63,180,137,.9); color: #05130d; }
.chip.dub { background: rgba(214,154,74,.9); color: #1a1102; }
.card-title { margin-top: 9px; font-size: .84rem; font-weight: 500; color: var(--ink); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-sub { font-size: .72rem; color: var(--muted); margin-top: 2px; }

/* ---- Top-ten sidebar ---- */
.rail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: sticky; top: 84px; }
.rank-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.rank-row:last-child { border-bottom: none; }
.rank-n { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--muted); width: 28px; text-align: center; flex-shrink: 0; }
.rank-row:nth-child(-n+3) .rank-n { color: var(--accent); }
.rank-row img { width: 46px; height: 64px; object-fit: cover; border-radius: 7px; background: var(--bg-soft); flex-shrink: 0; }
.rank-t { font-size: .82rem; font-weight: 500; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-m { font-size: .72rem; color: var(--muted); margin-top: 4px; display: flex; gap: 6px; align-items: center; }

/* ---- States ---- */
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hi) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 10px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.sk-card { aspect-ratio: 2/3; }
.state { padding: 30px; text-align: center; color: var(--muted); font-size: .88rem; }
.state button { margin-top: 12px; padding: 8px 18px; border-radius: 8px; border: 1px solid var(--border-hi); background: var(--surface); color: var(--body); font-family: var(--font-body); font-size: .82rem; cursor: pointer; }
.state button:hover { border-color: var(--accent); color: var(--ink); }

/* ---- Detail page ---- */
.detail-hero { position: relative; padding: 48px 0 36px; overflow: hidden; background: var(--bg-soft); }
.detail-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(24px) brightness(.4); transform: scale(1.15); }
.detail-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 3%, rgba(13,15,20,.6) 60%, rgba(13,15,20,.4) 100%); }
.detail-top { position: relative; z-index: 2; display: flex; gap: 32px; }
.detail-poster { width: 220px; flex-shrink: 0; aspect-ratio: 2/3; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { flex: 1; min-width: 0; }
.detail-info h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin: 0 0 6px; line-height: 1.1; }
.detail-jp { color: var(--muted); font-size: .92rem; margin-bottom: 16px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.detail-genres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.genre-tag { font-size: .75rem; padding: 5px 12px; border-radius: 20px; border: 1px solid var(--border-hi); color: var(--body); }
.detail-syn { color: var(--body); font-size: .92rem; line-height: 1.7; max-width: 760px; margin-bottom: 20px; }
.detail-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 24px; max-width: 640px; }
.fact { font-size: .82rem; }
.fact b { color: var(--muted); font-weight: 500; display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.fact span { color: var(--ink); }
@media (max-width: 720px) { .detail-top { flex-direction: column; } .detail-poster { width: 150px; } }

/* Episode list */
.eps { padding: 36px 0 60px; }
.eps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.ep {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; background: var(--surface); border: 1px solid var(--border);
  color: var(--body); font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: all .15s; position: relative;
}
.ep:hover { border-color: var(--accent); color: var(--ink); }
.ep.active { background: rgba(93,184,166,.14); border-color: var(--accent); color: var(--accent-hi); }

/* ---- Watch page ---- */
.watch { display: grid; grid-template-columns: 1fr 320px; gap: 28px; padding: 28px 0 60px; align-items: start; }
@media (max-width: 980px) { .watch { grid-template-columns: 1fr; } }
.player-wrap { background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 16/9; position: relative; box-shadow: var(--shadow); }
.player-wrap video { width: 100%; height: 100%; display: block; background: #000; }
.player-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--body); font-size: .9rem; padding: 24px; }
.player-msg .box { max-width: 380px; }
.player-msg button { margin-top: 14px; padding: 9px 18px; border-radius: 8px; border: 1px solid var(--border-hi); background: var(--surface); color: var(--body); font-family: var(--font-body); font-size: .82rem; cursor: pointer; }

.watch-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--ink); margin: 18px 0 4px; }
.watch-sub { color: var(--muted); font-size: .85rem; margin-bottom: 18px; }

.servers-box { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 18px; }
.servers-group { margin-bottom: 14px; }
.servers-group:last-child { margin-bottom: 0; }
.servers-group h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 8px; }
.server-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.server-btn { padding: 7px 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--body); font-size: .8rem; font-weight: 500; font-family: var(--font-body); cursor: pointer; transition: all .15s; }
.server-btn:hover { border-color: var(--border-hi); color: var(--ink); }
.server-btn.on { background: rgba(93,184,166,.16); border-color: var(--accent); color: var(--accent-hi); }

.watch-eps { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; position: sticky; top: 84px; max-height: 70vh; overflow-y: auto; }
.watch-eps h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 12px; }
.watch-ep { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--body); font-size: .84rem; font-family: var(--font-body); cursor: pointer; margin-bottom: 4px; transition: all .12s; }
.watch-ep:hover { background: var(--bg-soft); color: var(--ink); }
.watch-ep.on { background: rgba(93,184,166,.14); color: var(--accent-hi); border-color: var(--accent); }

/* ---- Custom video player ---- */
.player-wrap { --pl-accent: #f0b429; }
.player-wrap video { cursor: pointer; }
.video-embed { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; z-index: 2; }
.player-wrap.embed-active > .player-msg { z-index: 4; background: rgba(0, 0, 0, .8); }
.player-wrap.embed-active > video,
.player-wrap.embed-active > .v-center,
.player-wrap.embed-active > .v-controls,
.player-wrap.embed-active > .v-menu,
.player-wrap.embed-active > .skip-intro { display: none; }
.playback-modes { display: flex; align-items: center; gap: 8px; padding-top: 10px; flex-wrap: wrap; }
.playback-modes span { color: var(--muted); font-size: .75rem; }
.subtitle-status { margin: 10px 0; padding: 10px 14px; color: var(--accent-hi); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: .8rem; overflow-wrap: anywhere; }
.tbtn:disabled { opacity: .45; cursor: default; }
.player-wrap.hide-cursor { cursor: none; }
.player-wrap.hide-cursor video { cursor: none; }

/* center play / spinner */
.v-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 3; }
.v-center .big-play { width: 74px; height: 74px; border-radius: 50%; background: rgba(0,0,0,.55); display: none; align-items: center; justify-content: center; color: #fff; font-size: 1.8rem; pointer-events: auto; cursor: pointer; border: none; }
.player-wrap.paused .v-center .big-play { display: flex; }
.v-spinner { width: 46px; height: 46px; border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: vspin .8s linear infinite; display: none; }
.player-wrap.buffering .v-spinner { display: block; }
.player-wrap.buffering .big-play { display: none; }
@keyframes vspin { to { transform: rotate(360deg); } }

/* Skip Intro */
.skip-intro { position: absolute; right: 24px; bottom: 84px; z-index: 6; padding: 11px 20px; border-radius: 8px; border: none; background: rgba(20,24,33,.92); color: #fff; font-family: var(--font-body); font-size: .9rem; font-weight: 600; cursor: pointer; display: none; box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.skip-intro.show { display: block; }
.skip-intro:hover { background: var(--pl-accent); color: #111; }

/* Controls */
.v-controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; padding: 0; background: linear-gradient(0deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.42) 46%, transparent 100%); opacity: 1; transition: opacity .25s; }
.player-wrap.hide-controls .v-controls { opacity: 0; pointer-events: none; }

.v-seek { position: relative; height: 15px; display: flex; align-items: center; cursor: pointer; }
.v-seek-track { position: relative; width: 100%; height: 4px; background: rgba(255,255,255,.3); border-radius: 0; }
.v-buffered { position: absolute; left: 0; top: 0; height: 100%; background: rgba(255,255,255,.45); border-radius: 0; width: 0; }
.v-progress { position: absolute; left: 0; top: 0; height: 100%; background: var(--pl-accent); border-radius: 0; width: 0; }
.v-thumb { position: absolute; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--pl-accent); transform: translate(-50%,-50%); left: 0; opacity: 0; transition: opacity .12s; }
.v-seek:hover .v-thumb { opacity: 1; }
.v-seek:hover .v-seek-track { height: 6px; }

.v-bar { display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 12px; background: transparent; }
.v-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 7px; border: none; background: transparent; color: #fff; cursor: pointer; border-radius: 6px; font-size: .95rem; font-family: var(--font-body); position: relative; }
.v-btn:hover { background: rgba(255,255,255,.14); }
.v-btn svg { width: 22px; height: 22px; fill: currentColor; }
.v-btn.on { color: var(--pl-accent); }
.v-btn[disabled] { opacity: .4; cursor: default; }
.v-time { color: #fff; font-size: .82rem; font-variant-numeric: tabular-nums; padding: 0 10px; white-space: nowrap; }
.v-spacer { margin-left: auto; }
.v-vol-wrap { display: flex; align-items: center; }
.v-vol { width: 0; opacity: 0; transition: width .2s, opacity .2s; height: 4px; accent-color: var(--pl-accent); cursor: pointer; }
.v-vol-wrap:hover .v-vol, .v-vol:focus { width: 72px; opacity: 1; margin: 0 6px; }

/* Settings menu */
.v-menu { position: absolute; right: 12px; bottom: 68px; z-index: 7; background: rgba(38,38,41,.98); border: none; border-radius: 6px; padding: 0; min-width: 300px; display: none; box-shadow: var(--shadow); overflow: hidden; }
.v-menu.open { display: block; }
.v-menu-tabs { display: flex; align-items: center; gap: 4px; border-bottom: none; padding: 4px 10px 0; margin-bottom: 0; }
.v-mtab { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 42px; border: none; background: transparent; color: rgba(255,255,255,.7); font-size: .82rem; font-family: var(--font-body); cursor: pointer; border-radius: 0; border-bottom: 2px solid transparent; }
.v-mtab svg { width: 20px; height: 20px; fill: currentColor; }
.v-mtab:hover { color: #fff; }
.v-mtab.on { color: #fff; border-bottom-color: var(--pl-accent); }
.v-mtab.close { margin-left: auto; min-width: 38px; }
.v-menu-panel { max-height: 214px; overflow-y: auto; padding: 6px 0; }
.v-menu-panel::-webkit-scrollbar { width: 8px; }
.v-menu-panel::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); border-radius: 4px; }
.v-menu h5 { margin: 4px 18px 4px; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.v-menu button { display: block; width: 100%; text-align: left; padding: 9px 18px 9px 30px; border: none; background: transparent; color: rgba(255,255,255,.82); font-family: var(--font-body); font-size: .88rem; border-radius: 0; cursor: pointer; position: relative; }
.v-menu button:hover { background: rgba(255,255,255,.09); color: #fff; }
/* Selected row is marked with a leading dot, the way the reference player does. */
.v-menu button.on { color: #fff; font-weight: 600; }
.v-menu button.on::before { content: "•"; position: absolute; left: 14px; color: var(--pl-accent); }
/* Subtitle Settings sub-views: header, drill-down rows, and the entry link */
.v-menu-head { display: flex; align-items: center; gap: 6px; padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
.v-mhead-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 38px; border: none; background: transparent; color: rgba(255,255,255,.8); cursor: pointer; border-radius: 6px; padding: 0; }
.v-mhead-btn:hover { color: #fff; background: rgba(255,255,255,.1); }
.v-mhead-btn svg { width: 20px; height: 20px; fill: currentColor; }
.v-mhead-btn:last-child { margin-left: auto; }
.v-mhead-title { color: #fff; font-size: .9rem; font-weight: 600; font-family: var(--font-body); }
/* Row shows the setting on the left and its current value on the right. */
.v-menu button.v-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 18px; }
.v-row-label { color: rgba(255,255,255,.9); }
.v-row-val { display: inline-flex; align-items: center; gap: 2px; color: rgba(255,255,255,.62); white-space: nowrap; }
.v-row-val svg { width: 15px; height: 15px; fill: none; }
/* "Settings" entry point sits above the caption list, right aligned. */
.v-menu button.v-sub-link { text-align: right; padding: 8px 18px; color: rgba(255,255,255,.9); text-decoration: underline; font-size: .84rem; }

.v-tooltip { position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%); background: rgba(20,24,33,.95); color: #fff; font-size: .7rem; padding: 4px 8px; border-radius: 5px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; }
.v-btn:hover .v-tooltip { opacity: 1; }

/* video::cue is written at runtime by applyCueStyle() in watch.html, so the
   viewer's Subtitle Settings stay the single source of truth. */

/* ---- Watch page: enriched layout ---- */
/* Watch page runs wider than the rest of the site. Three columns -- episodes,
   player, sidebar -- so a large display has no dead margin either side. */
.wrap-watch { max-width: 1800px; }
.watch2 { display: grid; grid-template-columns: 280px minmax(0, 1fr) 340px; gap: 20px; padding: 24px 0 60px; align-items: start; }

/* Left column: episode list, scrolling inside its own sticky panel. */
.ep-col { position: sticky; top: 84px; }
.ep-col .ep-block { margin-bottom: 0; display: flex; flex-direction: column; max-height: calc(100vh - 108px); }
.ep-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; min-height: 0; }
.ep-list::-webkit-scrollbar { width: 8px; }
.ep-list::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 4px; }
.ep-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px;
  text-decoration: none; color: var(--body); border: 1px solid transparent; transition: all .12s; }
.ep-item:hover { background: var(--bg-soft); color: var(--ink); }
.ep-item .n { flex-shrink: 0; min-width: 22px; text-align: right; font-size: .78rem; font-weight: 600; color: var(--muted); }
.ep-item .t { font-size: .84rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-item.on { background: rgba(93,184,166,.14); border-color: var(--accent); }
.ep-item.on .n, .ep-item.on .t { color: var(--accent-hi); }

/* Right column carries a single panel. It scrolls with the page rather than
   inside itself, and is not sticky: pinning it would clip whatever fell past
   the viewport, which is the same scrollbar under another name. */
.watch2 > aside { display: flex; flex-direction: column; gap: 18px; }
.watch2 > aside .related { position: static; max-height: none; overflow: visible; }

/* Narrow: drop to player + sidebar, with the episode list folded underneath. */
@media (max-width: 1400px) {
  .watch2 { grid-template-columns: minmax(0, 1fr) 320px; }
  /* Sidebar stays beside the player; only the episode list drops below it. */
  .watch2 > aside:not(.ep-col) { order: 1; }
  .ep-col { position: static; grid-column: 1 / -1; order: 2; }
  .ep-col .ep-block { max-height: 420px; }
}
@media (max-width: 980px) {
  .watch2 { grid-template-columns: 1fr; }
  /* Stacked in one column the episode list matters more than the sidebar. */
  .ep-col { order: 1; }
  .watch2 > aside:not(.ep-col) { order: 2; }
}

/* Player toolbar */
.player-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-top: none; border-radius: 0 0 12px 12px; padding: 8px 12px; }
.tbtn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: none; background: transparent; color: var(--body); font-size: .8rem; font-weight: 500; font-family: var(--font-body); cursor: pointer; transition: all .12s; }
.tbtn:hover { background: var(--surface-hi); color: var(--ink); }
.tbtn.on { color: var(--accent-hi); }
.tbtn.on .dot { background: var(--accent); }
.tbtn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); transition: background .12s; }
.tbtn.spacer { margin-left: auto; }
.tbtn[disabled] { opacity: .4; cursor: not-allowed; }
.player-wrap.full { border-radius: 12px 12px 0 0; }

/* Light mode: dim everything but the player */
body.dimmed { background: #000; }
body.dimmed .nav, body.dimmed .foot, body.dimmed .watch2 > aside, body.dimmed .now-watching,
body.dimmed .servers-box, body.dimmed .watch-info, body.dimmed .ep-block, body.dimmed .countdown { opacity: .18; transition: opacity .2s; }
body.dimmed .player-wrap, body.dimmed .player-toolbar { position: relative; z-index: 5; }

/* Now-watching + servers row */
.watch-row { display: grid; grid-template-columns: 240px 1fr; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin: 18px 0; overflow: hidden; }
@media (max-width: 620px) { .watch-row { grid-template-columns: 1fr; } }
.now-watching { padding: 20px; border-right: 1px solid var(--border); text-align: center; color: var(--muted); font-size: .84rem; display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 620px) { .now-watching { border-right: none; border-bottom: 1px solid var(--border); } }
.now-watching b { color: var(--accent-hi); }
.servers-inner { padding: 16px 18px; }
.watch-row { background: #080f17; border-radius: 4px; }
.watch-row .now-watching { background: #152232; padding: 16px; color: #91accd; line-height: 1.65; }
.watch-row .now-watching b { color: #22b9ef; white-space: nowrap; }
.watch-row .now-watching p { margin: 0; font-size: .8rem; }
.watch-row .servers-inner { padding: 0; min-width: 0; }
.watch-row .servers-language-row { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 14px; margin: 0; border-bottom: 1px dashed #1c2b3b; }
.watch-row .servers-language-row:last-child { border-bottom: 0; }
.watch-row .server-language { display: flex; align-items: center; gap: 3px; margin: 0; font-size: .82rem; font-weight: 500; letter-spacing: 0; color: #a9c7ed; }
.server-language svg { width: 15px; height: 15px; flex-shrink: 0; }
.watch-row .server-btns { display: flex; flex-wrap: wrap; gap: 4px; }
.watch-row .server-btn { --server-button-background: #152232; display: inline-flex; align-items: center; padding: 6px 9px; border: 1px solid transparent; border-radius: 3px; background: var(--server-button-background); color: #8faed3; font-size: .8rem; font-weight: 400; }
.watch-row .server-btn svg { width: 12px; height: 12px; margin-right: 5px; }
.watch-row .server-btn:hover { --server-button-background: #20354c; color: #d9ebff; }
.watch-row .server-btn.on { --server-button-background: #20a8d5; border-color: #20a8d5; color: #fff; }
.servers-empty { color: #71859b; font-size: .77rem; padding: 6px 0; }
@media (max-width: 620px) { .watch-row .servers-language-row { grid-template-columns: 48px minmax(0, 1fr); gap: 10px; } }

/* Countdown banner */
.countdown { display: flex; align-items: center; gap: 10px; background: rgba(93,184,166,.08); border: 1px solid rgba(93,184,166,.2); border-radius: 10px; padding: 12px 16px; margin-bottom: 18px; color: var(--body); font-size: .85rem; }
.countdown b { color: var(--accent-hi); }

/* Episode block: range select + number grid */
.ep-block { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.ep-block-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ep-block-head h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--ink); margin: 0; }
.ep-range { margin-left: auto; padding: 7px 12px; border-radius: 8px; background: var(--bg-soft); border: 1px solid var(--border-hi); color: var(--ink); font-family: var(--font-body); font-size: .82rem; cursor: pointer; }
.ep-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.ep-num { display: flex; align-items: center; justify-content: center; padding: 9px 4px; border-radius: 8px; background: var(--bg-soft); border: 1px solid var(--border); color: var(--body); font-size: .82rem; font-weight: 600; text-decoration: none; transition: all .12s; }
.ep-num:hover { border-color: var(--accent); color: var(--ink); }
.ep-num.on { background: rgba(93,184,166,.16); border-color: var(--accent); color: var(--accent-hi); }

/* Anime info panel */
.watch-info { display: flex; gap: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.watch-info img { width: 120px; aspect-ratio: 2/3; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: var(--bg-soft); }
.watch-info h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--ink); margin: 0 0 4px; }
.watch-info .alt { color: var(--muted); font-size: .8rem; margin-bottom: 10px; }
.watch-info .syn { color: var(--body); font-size: .85rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 620px) { .watch-info { flex-direction: column; } .watch-info img { width: 100px; } }

/* Related sidebar */
.related { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; position: sticky; top: 84px; max-height: 88vh; overflow-y: auto; }
.related h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--ink); margin: 0 0 14px; }
.related-row { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.related-row:last-child { border-bottom: none; }
.related-row img { width: 46px; height: 64px; object-fit: cover; border-radius: 7px; background: var(--bg-soft); flex-shrink: 0; }
.related-row .t { font-size: .82rem; color: var(--ink); font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-row .m { font-size: .72rem; color: var(--muted); margin-top: 3px; }

/* ---- Admin CMS ---- */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
@media (max-width: 820px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.admin-card h3 { font-family: var(--font-display); color: var(--ink); margin: 0 0 12px; font-size: 1.2rem; }
.admin-card label { display: block; font-size: .78rem; color: var(--muted); margin: 12px 0 4px; }
.admin-card input[type=text], .admin-card input:not([type]), .admin-card select {
  width: 100%; padding: 9px 12px; border-radius: 8px; background: var(--bg-soft);
  border: 1px solid var(--border-hi); color: var(--ink); font-family: var(--font-body); font-size: .88rem; outline: none;
}
.admin-card input:focus, .admin-card select:focus { border-color: var(--accent); }
.admin-row { display: flex; gap: 8px; }
.admin-row input { flex: 1; }
.admin-langs { display: flex; gap: 16px; margin: 10px 0 0; }
.admin-langs label { display: inline-flex; gap: 6px; align-items: center; margin: 0; color: var(--body); font-size: .85rem; }
.admin-hit { display: flex; gap: 10px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 8px; margin: 6px 0; }
.admin-hit img { width: 40px; height: 56px; object-fit: cover; border-radius: 6px; background: var(--bg-soft); flex-shrink: 0; }
.admin-hit b { color: var(--ink); font-size: .85rem; }
.admin-hit-m { color: var(--muted); font-size: .72rem; margin-top: 2px; }
.admin-hit button { margin-left: auto; flex-shrink: 0; }
/* Library heading shares its row with the filter box. */
.admin-libhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 32px 0 12px; }
.admin-libhead h2 { font-family: var(--font-display); color: var(--ink); margin: 0; }
/* Full-width search bar: magnifier, field, and the shortcut hint. */
.lib-search { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 0 14px;
  height: 48px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg-soft); }
.lib-search:focus-within { border-color: var(--accent); }
.lib-search-ico { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.lib-search input { flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  color: var(--ink); font-family: var(--font-body); font-size: .95rem; padding: 0; }
.lib-search input::placeholder { color: var(--muted); }
.lib-search input::-webkit-search-cancel-button { filter: invert(.6); cursor: pointer; }
.lib-search-kbd { flex-shrink: 0; color: var(--muted); font-family: var(--font-body); font-size: .78rem;
  border: 1px solid var(--border-hi); border-radius: 5px; padding: 2px 7px; }
/* Search hits scroll inside the card instead of growing it without limit. */
#aResults { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
#aResults:not(:empty) { margin-top: 8px; padding-right: 4px; }
#aResults::-webkit-scrollbar { width: 8px; }
#aResults::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 4px; }
.admin-out { margin-top: 10px; font-family: var(--font-code, monospace); font-size: .76rem; color: var(--body); word-break: break-all; }
.admin-libitem { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.admin-libitem b { color: var(--ink); font-size: .9rem; }
.admin-libitem button { margin-left: auto; }

/* ---- Footer ---- */
.foot { border-top: 1px solid var(--border); padding: 30px 0; color: var(--muted); font-size: .82rem; }
.foot-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot a:hover { color: var(--accent-hi); }
.foot .sp { margin-left: auto; }

/* ── Landing page ──────────────────────────────────────────────────────
   The night sky is drawn in CSS rather than shipped as artwork: layered
   radial gradients for the glow, a repeating one for the stars. */
.landing-body { min-height: 100vh; }
.landing-sky {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1100px 620px at 78% 12%, rgba(120,90,200,.30), transparent 62%),
    radial-gradient(900px 540px at 12% 82%, rgba(60,140,190,.24), transparent 60%),
    radial-gradient(2px 2px at 20% 30%, rgba(255,255,255,.75), transparent 60%),
    radial-gradient(1.6px 1.6px at 68% 22%, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.6px 1.6px at 42% 68%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1.4px 1.4px at 86% 60%, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1.4px 1.4px at 30% 88%, rgba(255,255,255,.4), transparent 60%),
    linear-gradient(160deg, #0b0d18 0%, #121428 45%, #0d1020 100%);
}

.landing { display: flex; align-items: center; justify-content: center; padding: 48px 24px; min-height: 100vh; }
.landing-card {
  width: 100%; max-width: 1180px; display: grid; grid-template-columns: 400px minmax(0, 1fr);
  background: rgba(16,19,30,.86); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.5); overflow: hidden;
}
.landing-left { padding: 40px 36px; border-right: 1px solid var(--border); }
.landing-right { padding: 40px 40px; }

.landing-logo { display: inline-flex; align-items: center; }
.landing-logo img { width: 232px; height: 60px; object-fit: contain; }
.landing-tag { color: var(--muted); font-size: .88rem; margin: 10px 0 26px; }

.landing-search { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 46px;
  border-radius: 10px; border: 1px solid var(--border); background: var(--bg-soft); }
.landing-search:focus-within { border-color: var(--accent); }
.landing-search svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.landing-search input { flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  color: var(--ink); font-family: var(--font-body); font-size: .92rem; }
.landing-search input::placeholder { color: var(--muted); }

.landing-drop { display: none; margin-top: 8px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); overflow: hidden; max-height: 320px; overflow-y: auto; }
.landing-drop.open { display: block; }
.landing-hit { display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  text-decoration: none; color: var(--body); font-size: .85rem; }
.landing-hit:hover { background: var(--surface-hi); color: var(--ink); }
.landing-hit img { width: 32px; height: 44px; object-fit: cover; border-radius: 5px; background: var(--bg-soft); flex-shrink: 0; }
.landing-hit.empty { color: var(--muted); cursor: default; }

.landing-popular { margin: 22px 0 26px; font-size: .84rem; color: var(--muted); line-height: 1.7; }
.landing-popular b { color: var(--body); }
.landing-popular a { color: var(--accent-hi); text-decoration: none; }
.landing-popular a:hover { text-decoration: underline; }

.landing-cta { display: inline-block; padding: 12px 24px; border-radius: 10px; background: var(--accent);
  color: #08120f; font-weight: 700; font-size: .92rem; text-decoration: none; transition: filter .12s; }
.landing-cta:hover { filter: brightness(1.08); }

.landing-right h1 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: var(--ink); margin: 0 0 14px; }
.landing-right h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--ink); margin: 26px 0 10px; }
.landing-right p { color: var(--body); font-size: .9rem; line-height: 1.75; margin: 0 0 10px; }
.landing-right p b { color: var(--ink); }
.landing-foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: .82rem; }
.landing-foot a { color: var(--accent-hi); text-decoration: none; }
.landing-foot a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .landing-card { grid-template-columns: 1fr; }
  .landing-left { border-right: none; border-bottom: 1px solid var(--border); }
  .landing-left, .landing-right { padding: 30px 24px; }
}

/* ── Estimated schedule ─────────────────────────────────────────────── */
.sched-now { color: var(--muted); font-size: .8rem; margin-left: auto; }
.sched { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }

.sched-list { padding: 6px 0; min-height: 90px; }
.sched-row { display: flex; align-items: center; gap: 16px; padding: 10px 18px; }
.sched-row + .sched-row { border-top: 1px solid var(--border); }
.sched-time { flex-shrink: 0; width: 46px; font-weight: 700; font-size: .82rem;
  color: var(--muted); font-variant-numeric: tabular-nums; }
.sched-title { flex: 1; min-width: 0; font-size: .88rem; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
a.sched-title { color: var(--accent-hi); text-decoration: none; }
a.sched-title:hover { text-decoration: underline; }
/* Not in the library: shown, but plainly not a link. */
.sched-title.off { color: var(--body); opacity: .72; }
.sched-ep { flex-shrink: 0; font-size: .74rem; color: var(--muted);
  background: var(--bg-soft); border-radius: 6px; padding: 4px 10px; }

@media (max-width: 820px) {
  .sched-row { gap: 10px; padding: 10px 12px; }
  .sched-ep { display: none; }
}

/* ── Poster hover card ──────────────────────────────────────────────────
   Opens beside the poster and flips to the other side near a screen edge.
   Hidden with visibility rather than display so it can fade. */
.card { position: relative; }
.card-tip {
  position: absolute; top: 0; left: 100%; margin-left: 12px; width: 300px; z-index: 40;
  background: var(--surface); border: 1px solid var(--border-hi); border-radius: 12px;
  padding: 16px; box-shadow: 0 18px 44px rgba(0,0,0,.55);
  opacity: 0; visibility: hidden; transform: translateY(4px); pointer-events: none;
  transition: opacity .14s, transform .14s, visibility .14s;
}
.card:hover .card-tip { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.card-tip.flip { left: auto; right: 100%; margin-left: 0; margin-right: 12px; }

.tip-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; color: var(--ink); line-height: 1.25; }
.tip-badges { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 10px; }
.tip-type { position: static; }
.tip-syn { font-size: .78rem; line-height: 1.55; color: var(--body); margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tip-row { font-size: .76rem; color: var(--body); line-height: 1.6; }
.tip-k { color: var(--muted); }
.tip-genre { color: var(--accent-hi); }
.tip-genre + .tip-genre::before { content: ", "; color: var(--muted); }
.tip-watch { display: block; margin-top: 14px; padding: 9px 0; border-radius: 8px;
  background: var(--surface-hi); color: var(--ink); font-size: .84rem; font-weight: 600;
  text-align: center; text-decoration: none; transition: background .12s; }
.tip-watch:hover { background: var(--accent); color: #08120f; }

/* No hover on a touch screen, and a 300px panel has nowhere to go on a phone. */
@media (hover: none), (max-width: 820px) { .card-tip { display: none; } }
.live-status { font-size: .7rem; color: var(--muted); max-width: 180px; }
.live-status[data-state="live"] { color: #62d8a3; }
.live-status[data-state="stale"] { color: #edbd6c; }
@media (max-width: 1000px) {
  .nav-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); height: auto; gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; }
  .nav-search { max-width: none; min-width: 0; }
  .nav-links { grid-column: 1 / -1; width: 100%; margin-left: 0; }
  .nav-links .live-status { margin-right: auto; }
}
