/* ===========================================================
   Aventos — /streaming  (standalone site)
   NEW layout (DramaBox × AsuraScans) in the ORIGINAL Aventos
   warm-paper theme: paper bg, vermillion accent, editorial serif.
   Self-contained; loaded alone by streaming/index.html.
   =========================================================== */

:root {
  --bg:      #F7F5F0;   /* warm paper */
  --bg-2:    #F1ECE0;
  --card:    #FFFFFF;
  --card-2:  #F1ECE0;
  --line:    #E5DFD3;
  --line-2:  #D9D2C2;
  --txt:     #15110D;   /* warm near-black */
  --txt-2:   #4A4339;
  --txt-3:   #8A8275;
  --accent:  #B33A1B;   /* vermillion / inkan seal */
  --accent-2:#1F4FA0;   /* cobalt */
  --grad:    linear-gradient(135deg, #B33A1B, #C85A2A);
  --gold:    #B07A16;   /* warm amber for ratings */
  --green:   #2E7D46;
  --r:       12px;
  --r-sm:    8px;
  --max:     1360px;
  --gutter:  clamp(16px, 3vw, 40px);
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans:  "Inter", -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --shadow-sm: 0 1px 2px rgba(21,17,13,.04), 0 0 0 1px rgba(21,17,13,.05);
  --shadow-md: 0 12px 30px -14px rgba(21,17,13,.2), 0 0 0 1px rgba(21,17,13,.05);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--txt);
  font-family: var(--sans); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- top nav ---------- */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,245,240,.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topnav-inner { max-width: var(--max); margin: 0 auto; padding: 12px var(--gutter); display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 26px; letter-spacing: -.015em; }
.brand .logo { width: 30px; height: 28px; display: grid; place-items: center; }
.brand .logo svg { width: 30px; height: 28px; }
.brand b { font-weight: 400; color: var(--txt); }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 22px; margin-left: 6px; }
.nav-links a { color: var(--txt-2); font-weight: 500; font-size: 14.5px; padding: 6px 2px; transition: color .15s; position: relative; }
.nav-links a:hover, .nav-links a.is-active { color: var(--txt); }
.nav-links a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); border-radius: 2px; }
.nav-search {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 14px; min-width: 180px; color: var(--txt-3);
}
.nav-search input { background: none; border: none; color: var(--txt); outline: none; width: 100%; font-size: 14px; }
.nav-search svg { width: 15px; height: 15px; flex-shrink: 0; }
.auth-slot { display: inline-flex; align-items: center; }
.auth-signin { padding: 8px 16px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; }
.auth-signin:hover { background: #9c3016; }
.clerk-userbtn { display: inline-flex; }
@media (max-width: 720px) { .nav-links, .nav-search { display: none; } }

/* ---------- section headers ---------- */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 34px 0 16px; }
.sec-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.01em; }
.sec-head .accentbar { display: inline-block; width: 4px; height: 22px; background: var(--accent); border-radius: 3px; margin-right: 12px; vertical-align: -3px; }
.sec-more { color: var(--txt-3); font-family: var(--mono); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.sec-more:hover { color: var(--accent); }

/* ---------- title cards (portrait posters) ---------- */
.tc { position: relative; display: block; border-radius: var(--r); overflow: hidden; background: var(--card); box-shadow: var(--shadow-sm); }
.tc-poster { aspect-ratio: 2 / 3; position: relative; overflow: hidden; background: var(--bg-2); }
.tc-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tc:hover .tc-poster img { transform: scale(1.05); }
.tc-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2; padding: 3px 8px; border-radius: 6px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  background: rgba(21,17,13,.62); color: #fff; backdrop-filter: blur(4px);
  display: inline-flex; align-items: center; gap: 4px;
}
.tc-badge.rating { color: #ffcf6a; }
.tc-badge svg { width: 11px; height: 11px; }
.tc-scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(21,17,13,.92) 0%, rgba(21,17,13,0) 48%); }
.tc-meta { position: absolute; left: 10px; right: 10px; bottom: 9px; z-index: 2; }
.tc-title { font-family: var(--serif); font-weight: 400; font-size: 17px; line-height: 1.15; color: #fff; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tc-sub { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; color: rgba(255,255,255,.75); margin-top: 3px; }
.tc-ep { position: absolute; top: 8px; right: 8px; z-index: 2; padding: 3px 8px; border-radius: 6px; font-family: var(--mono); font-size: 11px; font-weight: 500; background: var(--accent); color: #fff; }
.tc-ep.done { background: var(--green); }

.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 158px; gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.rail .tc { scroll-snap-align: start; }
@media (min-width: 900px) { .rail { grid-auto-columns: 176px; } }

/* ---------- home layout ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 34px; margin-top: 24px; align-items: start; }
.home-grid > aside { position: sticky; top: 78px; }
@media (max-width: 1000px) { .home-grid { grid-template-columns: 1fr; } .home-grid > aside { position: static; } }

.updates { display: flex; flex-direction: column; gap: 10px; }
.upd { display: grid; grid-template-columns: 54px 1fr auto; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.upd:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.upd-thumb { width: 54px; height: 72px; border-radius: var(--r-sm); overflow: hidden; background: var(--bg-2); }
.upd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.upd-title { font-family: var(--serif); font-weight: 400; font-size: 18px; }
.upd-line { display: flex; align-items: center; gap: 8px; margin-top: 5px; font-family: var(--mono); font-size: 12px; color: var(--txt-2); }
.upd-ep { color: var(--txt); font-weight: 500; background: var(--bg-2); border: 1px solid var(--line-2); padding: 2px 8px; border-radius: 6px; }
.upd-new { color: var(--accent); font-weight: 500; font-size: 10.5px; border: 1px solid rgba(179,58,27,.35); padding: 2px 7px; border-radius: 6px; }
.upd-date { color: var(--txt-3); font-family: var(--mono); font-size: 12px; white-space: nowrap; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 6px 10px; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 8px; }
.panel-head h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; }
.tabs { display: flex; gap: 4px; background: var(--bg-2); border-radius: 999px; padding: 3px; }
.tabs button { font-family: var(--mono); font-size: 11px; color: var(--txt-2); padding: 5px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.tabs button.is-active { background: var(--accent); color: #fff; }
.rank { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); }
.rank:hover { background: var(--bg-2); }
.rank-n { font-family: var(--serif); font-size: 20px; width: 22px; color: var(--txt-3); }
.rank:nth-child(-n+4) .rank-n { color: var(--accent); }
.rank-thumb { width: 42px; height: 56px; border-radius: 6px; overflow: hidden; background: var(--bg-2); flex-shrink: 0; }
.rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rank-title { font-family: var(--serif); font-weight: 400; font-size: 16px; line-height: 1.2; }
.rank-sub { font-family: var(--mono); font-size: 11px; color: var(--txt-3); margin-top: 3px; display: flex; gap: 8px; align-items: center; }
.rank-sub .star { color: var(--gold); }

/* ---------- SERIES PAGE ---------- */
.series-hero { position: relative; margin-top: 22px; }
.series-hero-bg { position: absolute; inset: -40px -40px auto; height: 320px; z-index: 0; overflow: hidden; border-radius: var(--r); opacity: .16; filter: blur(34px) saturate(1.1); pointer-events: none; }
.series-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.series-top { position: relative; z-index: 1; display: grid; grid-template-columns: 260px 1fr; gap: 30px; }
@media (max-width: 760px) { .series-top { grid-template-columns: 1fr; } .series-poster { max-width: 220px; } }
.series-poster { aspect-ratio: 2/3; border-radius: var(--r); overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow-md); border: 1px solid var(--line); }
.series-poster img { width: 100%; height: 100%; object-fit: cover; }
.series-info h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5vw, 56px); letter-spacing: -.02em; line-height: 1.02; }
.series-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 12px; padding: 5px 11px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--txt-2); }
.badge.rank { background: rgba(179,58,27,.1); border-color: rgba(179,58,27,.35); color: var(--accent); }
.badge.rating { color: var(--gold); }
.badge.status { color: var(--green); }
.badge.status.complete { color: var(--accent-2); }
.badge svg { width: 12px; height: 12px; }
.series-synopsis { color: var(--txt-2); font-size: 16px; line-height: 1.6; max-width: 70ch; margin: 6px 0 4px; }
.series-synopsis.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.show-more { color: var(--accent); font-family: var(--mono); font-size: 12px; margin-top: 6px; }
.series-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 500; font-size: 15px; transition: transform .12s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; }
.btn-play { background: var(--accent); color: #fff; }
.btn-play:hover { background: #9c3016; }
.btn-ghost { background: var(--card); border: 1px solid var(--line-2); color: var(--txt); }
.btn-ghost:hover { background: var(--bg-2); }
.btn-ghost.is-on { color: var(--accent); border-color: rgba(179,58,27,.5); }
.series-stats { display: flex; gap: 28px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.stat b { display: block; font-family: var(--serif); font-size: 26px; font-weight: 400; }
.stat span { font-family: var(--mono); font-size: 10.5px; color: var(--txt-3); text-transform: uppercase; letter-spacing: .06em; }
.stat b.gold { color: var(--gold); }

.ep-list-head { display: flex; align-items: center; justify-content: space-between; margin: 40px 0 16px; }
.ep-list-head h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; }
.ep-list-head .count { color: var(--txt-3); font-family: var(--mono); font-size: 13px; margin-left: 10px; }
.ep-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.epc { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.epc:not(.locked) { cursor: pointer; }
.epc:not(.locked):hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.epc-thumb { position: relative; width: 84px; height: 60px; border-radius: var(--r-sm); overflow: hidden; background: var(--bg-2); flex-shrink: 0; }
.epc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.epc-thumb .play-o { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(21,17,13,.28); opacity: 0; transition: opacity .15s; }
.epc:hover .epc-thumb .play-o { opacity: 1; }
.epc-thumb .play-o svg { width: 24px; height: 24px; color: #fff; }
.epc-lock { position: absolute; inset: 0; display: grid; place-items: center; background: var(--bg-2); color: var(--accent); }
.epc-lock svg { width: 18px; height: 18px; }
.epc-body { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.epc-ep { font-family: var(--serif); font-weight: 400; font-size: 17px; }
.epc-sub { font-family: var(--mono); font-size: 11px; color: var(--txt-3); margin-top: 4px; }
.epc.watched .epc-ep::after { content: "✓"; color: var(--accent); margin-left: 6px; font-family: var(--sans); }

.epc.teaser { align-items: center; justify-content: center; text-align: center; border-style: dashed; border-color: rgba(179,58,27,.4); color: var(--txt-2); flex-direction: column; gap: 6px; padding: 18px; }
.epc.teaser .t-lock { color: var(--accent); }
.epc.teaser b { color: var(--txt); font-family: var(--serif); font-weight: 400; font-size: 17px; }
.epc.teaser span { font-family: var(--mono); font-size: 11px; }

/* ---------- PLAYER PAGE ---------- */
.player-page { margin-top: 18px; }
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--txt-3); font-family: var(--mono); font-size: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: .5; }
.crumbs .cur { color: var(--txt); }
.pp-grid { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .pp-grid { grid-template-columns: 1fr; } }
.pp-stage { position: relative; background: #0c0a07; border-radius: var(--r); overflow: hidden; aspect-ratio: 16/9; border: 1px solid var(--line); }
.pp-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #0c0a07; }
.pp-selector { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-sm); }
.pp-selector-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.pp-selector-head b { font-family: var(--serif); font-weight: 400; font-size: 18px; }
.pp-selector-head .cnt { color: var(--txt-3); font-family: var(--mono); font-size: 12px; }
.pp-pages { display: flex; gap: 12px; padding: 10px 16px 4px; font-family: var(--mono); font-size: 12px; flex-wrap: wrap; }
.pp-pages button { color: var(--txt-3); }
.pp-pages button.is-active { color: var(--accent); }
.pp-nums { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 10px 16px 16px; max-height: 420px; overflow-y: auto; }
.pp-num { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); display: grid; place-items: center; font-family: var(--mono); font-weight: 500; font-size: 14px; color: var(--txt); }
.pp-num:not(.locked):hover { border-color: var(--accent); color: var(--accent); }
.pp-num.is-current { background: var(--accent); color: #fff; border-color: transparent; }
.pp-num.locked { color: var(--txt-3); cursor: default; }
.pp-num.watched:not(.is-current) { color: var(--txt-3); }
.pp-num .lk { position: absolute; top: -6px; right: -6px; background: var(--accent); border-radius: 5px; width: 16px; height: 16px; display: grid; place-items: center; }
.pp-num .lk svg { width: 9px; height: 9px; color: #fff; }

.pp-meta { margin-top: 20px; }
.pp-meta h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.01em; }
.pp-metarow { display: flex; align-items: center; gap: 18px; margin: 12px 0 14px; flex-wrap: wrap; }
.pp-metarow .m { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 13px; color: var(--txt-2); }
.pp-metarow .m svg { width: 15px; height: 15px; }
.pp-metarow .m.gold { color: var(--gold); }
.like-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line-2); font-family: var(--mono); font-size: 13px; }
.like-btn:hover { background: var(--bg-2); }
.like-btn.liked { color: var(--accent); border-color: rgba(179,58,27,.5); background: rgba(179,58,27,.08); }
.like-btn svg { width: 16px; height: 16px; }
.pp-desc { color: var(--txt-2); font-size: 15.5px; line-height: 1.6; max-width: 80ch; }
.pp-tags { display: flex; gap: 8px; margin-top: 14px; }
.tag { font-family: var(--mono); font-size: 11px; color: var(--txt-2); background: var(--card); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; }

.related { margin-top: 36px; }

.foot { border-top: 1px solid var(--line); margin-top: 70px; padding: 30px 0 50px; color: var(--txt-3); font-family: var(--mono); font-size: 12px; }
.foot-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot a:hover { color: var(--txt); }

.nav-studio { color: var(--txt-3) !important; font-weight: 500; }
.nav-studio:hover { color: var(--accent) !important; }

/* ---------- hero billboard (compact) ---------- */
.hero { position: relative; margin-top: 20px; border-radius: 16px; overflow: hidden; min-height: 340px; display: flex; align-items: flex-end; background: #0c0a07; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: blur(6px) saturate(1.1); transform: scale(1.12); }
.hero-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(12,10,7,.95) 0%, rgba(12,10,7,.62) 42%, rgba(12,10,7,.2) 82%), linear-gradient(0deg, rgba(12,10,7,.9) 0%, rgba(12,10,7,0) 55%); }
.hero-poster { position: absolute; right: clamp(20px,3.5vw,52px); top: 0; bottom: 0; width: 172px; z-index: 2; display: flex; align-items: center; }
.hero-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 12px; box-shadow: 0 24px 60px -22px rgba(0,0,0,.8); border: 1px solid rgba(255,255,255,.1); }
.hero-body { position: relative; z-index: 2; padding: clamp(22px,3.5vw,42px); max-width: 560px; color: #fff; }
.hero-kicker { font-family: var(--mono); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: rgba(255,255,255,.82); margin-bottom: 10px; }
.hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.02; letter-spacing: -.02em; margin-bottom: 12px; }
.hero-badges { display: flex; gap: 8px; margin-bottom: 14px; }
.hero .badge { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.26); color: #fff; }
.hero .badge.rating { color: #ffcf6a; }
.hero-syn { font-size: 15px; line-height: 1.55; color: rgba(255,255,255,.9); max-width: 52ch; margin-bottom: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn-ghost { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.42); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255,255,255,.2); }
.hero-dots { display: flex; gap: 8px; margin-top: 22px; }
.hero-dots span { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.35); cursor: pointer; transition: width .2s, background .2s; }
.hero-dots span.on { width: 22px; background: var(--accent); }
@media (max-width: 760px) { .hero { min-height: 340px; } .hero-poster { display: none; } }

/* featured trailer hero */
.hero-trailer .hero-bg img { filter: saturate(1.05); transform: scale(1.04); }
.hero-trailer .hero-bg video { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05); }
.hero-muted { position: absolute; top: 16px; right: 18px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(12,10,7,.55); color: #fff; border: 1px solid rgba(255,255,255,.28); font-family: var(--mono); font-size: 11px; letter-spacing: .04em; cursor: pointer; backdrop-filter: blur(6px); }
.hero-muted:hover { background: rgba(12,10,7,.75); }
.hero-trailer .hero-scrim { background: linear-gradient(90deg, rgba(12,10,7,.9) 0%, rgba(12,10,7,.5) 48%, rgba(12,10,7,.15) 85%), linear-gradient(0deg, rgba(12,10,7,.85) 0%, rgba(12,10,7,0) 55%); }
.hero-tag { display: inline-block; background: var(--accent); color: #fff; padding: 2px 9px; border-radius: 5px; font-weight: 600; margin-right: 9px; letter-spacing: .02em; }

/* fullscreen trailer player — cinematic spotlight */
.trailer-modal { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: clamp(14px,3vw,36px); background: rgba(6,5,3,.55); animation: tm-fade .25s ease; }
.tm-backdrop { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.tm-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(34px) saturate(1.1) brightness(.45); transform: scale(1.15); }
.tm-backdrop::after { content: ""; position: absolute; inset: 0; background: rgba(6,5,3,.5); }
.tm-inner { position: relative; z-index: 2; width: min(100%, 1080px); max-height: 100%; text-align: center; animation: tm-pop .35s cubic-bezier(.2,.8,.2,1); }
.tm-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.85); margin-bottom: 10px; }
.tm-heading { font-family: var(--serif); font-weight: 400; font-size: clamp(20px,3.2vw,36px); color: #fff; letter-spacing: -.02em; line-height: 1; margin-bottom: clamp(10px,1.8vh,16px); }
/* frame width derived from viewport height so the 16/9 video + text always fits on screen */
.tm-frame { width: min(100%, calc((100dvh - 200px) * 16 / 9)); margin: 0 auto; border-radius: 14px; overflow: hidden; box-shadow: 0 40px 120px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.08), 0 0 90px -24px rgba(179,58,27,.5); }
.tm-frame video { display: block; width: 100%; aspect-ratio: 16/9; background: #000; }
.tm-foot { margin-top: clamp(10px,1.6vh,16px); font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.tm-close { position: absolute; top: 20px; right: 24px; z-index: 3; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(6px); }
.tm-close:hover { background: rgba(255,255,255,.28); }
.tm-close svg { width: 20px; height: 20px; }
@keyframes tm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tm-pop { from { opacity: .3; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@media (max-width: 640px) {
  .trailer-modal { padding: 14px; }
  .tm-close { top: 12px; right: 12px; width: 38px; height: 38px; }
  .tm-kicker { font-size: 10.5px; }
  .tm-heading { font-size: clamp(22px,7vw,30px); margin-bottom: 12px; }
  .tm-frame { border-radius: 10px; }
  .tm-foot { font-size: 10px; }
}

/* rows */
.row .sec-head { margin: 30px 0 14px; }

/* continue watching — compact queue cards */
.cw-rail { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.cw-card { flex: 0 0 auto; width: 258px; display: flex; gap: 11px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.cw-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cw-thumb { position: relative; width: 48px; height: 66px; border-radius: 6px; overflow: hidden; flex-shrink: 0; background: var(--bg-2); }
.cw-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cw-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(21,17,13,.32); color: #fff; opacity: 0; transition: opacity .15s; }
.cw-play svg { width: 18px; height: 18px; }
.cw-card:hover .cw-play { opacity: 1; }
.cw-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0,0,0,.4); }
.cw-prog span { display: block; height: 100%; background: var(--accent); }
.cw-body { min-width: 0; }
.cw-title { font-family: var(--serif); font-size: 15px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cw-sub { font-family: var(--mono); font-size: 11px; color: var(--accent); margin-top: 4px; }

/* rate-this widget */
.rate-widget { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.rate-label { font-family: var(--mono); font-size: 11px; color: var(--txt-3); text-transform: uppercase; letter-spacing: .05em; }
.rstars { display: inline-flex; gap: 3px; }
.rstar { color: var(--line-2); padding: 2px; line-height: 0; transition: color .12s, transform .12s; }
.rstar svg { width: 20px; height: 20px; }
.rstar:hover { transform: scale(1.15); }
.rstar:hover, .rstar.on { color: var(--gold); }
.rate-mine { font-family: var(--serif); font-size: 18px; color: var(--gold); }

/* top 10 */
.tc.top10 .rank-num { position: absolute; left: 8px; bottom: 4px; z-index: 3; font-family: var(--serif); font-size: 54px; line-height: 1; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.8); }

/* resume progress bar on a card */
.tc-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.45); z-index: 3; }
.tc-prog span { display: block; height: 100%; background: var(--accent); }

/* hover preview video */
.tc-pv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; z-index: 1; }
.tc-pv.on { opacity: 1; }

/* browse grid */
.grid-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin-top: 10px; }
@media (min-width: 700px) { .grid-all { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }

/* mobile */
@media (max-width: 720px) {
  .topnav-inner { gap: 12px; }
  .rail { grid-auto-columns: 44vw; }
  .series-stats { gap: 18px; flex-wrap: wrap; }
  .ep-cards { grid-template-columns: 1fr; }
  .pp-nums { grid-template-columns: repeat(6, 1fr); }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
