/* Tanah Lima — dark, warm, mobile-first. */
/* Two looks, picked with PENGATURAN "tema": netflix (default) or disney. */
:root, :root[data-tema="netflix"] {
  --bg: #141414;
  --bg-rgb: 20, 20, 20;
  --bg-image: none;
  --surface: #1c1c1c;
  --surface-2: #2a2a2a;
  --hover: #3a3a3a;
  --line: #333333;
  --text: #ffffff;
  --soft: #d2d2d2;
  --muted: #a3a3a3;
  --faint: #6d6d6d;
  --accent: #e50914;
  --accent-soft: rgba(229, 9, 20, .2);
  --accent-text: #ff5a61;
  --btn: #ffffff;
  --btn-hover: rgba(255, 255, 255, .8);
  --btn-ink: #000000;
  --gold: #46d369;
  --ok: #46d369;
  --card-radius: 6px;
}
:root[data-tema="disney"] {
  --bg: #0b0d1a;
  --bg-rgb: 11, 13, 26;
  --bg-image: radial-gradient(ellipse 120% 60% at 50% -10%, #1c2552 0%, rgba(11, 13, 26, 0) 70%);
  --surface: #141a30;
  --surface-2: #1d2442;
  --hover: #28305a;
  --line: #283056;
  --text: #f9f9f9;
  --soft: #cad2ea;
  --muted: #98a2c2;
  --faint: #5d6687;
  --accent: #0072ff;
  --accent-soft: rgba(0, 114, 255, .22);
  --accent-text: #6fb1ff;
  --btn: #f9f9f9;
  --btn-hover: #0072ff;
  --btn-ink: #0b0d1a;
  --gold: #7fd3ff;
  --ok: #7fd3ff;
  --card-radius: 10px;
}
:root {
  --radius: 14px;
  --gutter: 16px;
  --header-h: 60px;
  --tab-h: 64px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
@media (min-width: 768px) { :root { --gutter: 40px; --header-h: 68px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg) var(--bg-image) no-repeat; background-attachment: fixed; color: var(--text);
  font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; max-width: 100%; }
svg.i { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.ssr { padding: 90px var(--gutter); color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header & tab bar ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 40; height: var(--header-h);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter);
  padding-top: env(safe-area-inset-top);
  background: linear-gradient(to bottom, rgba(var(--bg-rgb),.92), rgba(var(--bg-rgb),0));
  transition: background .25s;
}
.top.solid { background: rgba(var(--bg-rgb),.96); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255,255,255,.04); }
.logo { display: flex; align-items: center; flex: none; }
/* The lockup (mark + drawn wordmark) is 313x64: 28px high = about 137px wide. */
.logo svg { display: block; height: 28px; width: auto; aspect-ratio: 313.2 / 64; }
.nav { display: none; gap: 22px; font-weight: 600; font-size: 14px; color: var(--muted); }
.nav a.on, .nav a:hover { color: var(--text); }
.top .grow { flex: 1; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--text); }
.icon-btn:hover { background: rgba(255,255,255,.08); }
@media (min-width: 768px) { .nav { display: flex; } .top .search-btn { display: grid; } }

.tabs {
  position: fixed; inset: auto 0 0; z-index: 40; height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: rgba(var(--bg-rgb),.97); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
}
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--faint); }
.tabs a.on { color: var(--text); }
.tabs a.on svg { color: var(--accent); }
@media (min-width: 768px) { .tabs { display: none; } }
main.page { min-height: 100vh; padding-bottom: calc(var(--tab-h) + 32px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { main.page { padding-bottom: 64px; } }
body.is-player .top, body.is-player .tabs { display: none; }

/* ---------- Buttons & chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px; font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: transform .15s, background .15s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--btn); color: var(--btn-ink); }
.btn.primary:hover { background: var(--btn-hover); color: var(--btn-ink); }
:root[data-tema="disney"] .btn.primary:hover { color: #fff; }
.btn.primary svg.i.fill { fill: currentColor; }
.btn.ghost { background: rgba(255,255,255,.12); color: var(--text); backdrop-filter: blur(6px); }
.btn.ghost:hover { background: rgba(255,255,255,.18); }
.btn.round { width: 46px; padding: 0; }
.btn svg.i { width: 20px; height: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.1); color: var(--soft); }
.chip.accent { background: var(--accent-soft); color: var(--accent-text); }
button.chip { cursor: pointer; }
button.chip.on { background: var(--text); color: var(--bg); }

/* ---------- Hero: phones = swipeable cover carousel, wide screens = full-bleed banner ---------- */
.m-hero { padding-top: calc(var(--header-h) + 6px); }
.m-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 6px; scrollbar-width: none; scroll-padding: 0 var(--gutter); }
.m-track::-webkit-scrollbar { display: none; }
.m-slide { flex: none; width: min(62vw, 280px); scroll-snap-align: start; }
.m-slide .poster { border-radius: 12px; box-shadow: 0 14px 30px rgba(0,0,0,.45); }
.m-play { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--btn); color: var(--btn-ink); box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.m-play svg.i { width: 18px; height: 18px; margin-left: 2px; }
.m-info { padding: 10px 2px 0; display: grid; gap: 2px; }
.m-info b { font-size: 15px; font-weight: 800; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-info span { font-size: 12.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-info em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--gold); }
.m-hero { display: none; }
.hero { display: block; position: relative; overflow: hidden; }
@media (min-width: 900px) { .hero { height: min(76vh, 720px); min-height: 480px; } }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
.hero-slide.on { opacity: 1; pointer-events: auto; }
/* Text and poster card leave fast and arrive after the image cross-fade, so two titles never overlap. */
.hero-slide .hero-info, .hero-slide .hero-poster { opacity: 0; transition: opacity .2s ease; }
.hero-slide.on .hero-info, .hero-slide.on .hero-poster { opacity: 1; transition: opacity .5s ease .5s; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center 25%; }
.hero-bg.blur { filter: blur(28px) saturate(1.2); transform: scale(1.2); opacity: .7; }
.hero-poster { position: absolute; right: var(--gutter); bottom: 64px; width: 220px; aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.6); display: none; }
@media (min-width: 900px) { .hero-poster.show { display: block; } }
.hero-poster img { width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(to top, var(--bg) 2%, rgba(var(--bg-rgb),.55) 38%, rgba(var(--bg-rgb),.05) 70%),
  linear-gradient(to right, rgba(var(--bg-rgb),.75), rgba(var(--bg-rgb),0) 60%); }
.hero-info { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 44px; max-width: 620px; }
.hero-info h1, .hero-info h2 { margin: 12px 0 8px; font-size: clamp(30px, 5vw, 56px); line-height: 1.02; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; }
.hero-info p { margin: 0 0 18px; color: var(--soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 540px; text-wrap: balance; }
.hero-meta { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.hero-meta b { color: var(--gold); font-weight: 700; }
.hero-actions { display: flex; gap: 10px; }
.dots { position: absolute; z-index: 3; bottom: 18px; left: var(--gutter); display: flex; gap: 6px; }
.dots button { width: 18px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.3); transition: width .3s, background .3s; }
.dots button.on { width: 32px; background: var(--text); }

/* Phones: same banner layout as desktop, stacked — blurred background, poster card in the middle,
   then chips, title, tagline, meta and buttons, all centred. Swipe changes the slide. */
@media (max-width: 899px) {
  .hero { --pw: min(46vw, 210px); height: calc(var(--header-h) + var(--pw) * 4 / 3 + 268px); }
  .hero-bg, .hero-bg.blur { filter: blur(30px) saturate(1.25); transform: scale(1.3); opacity: .65; background-position: center; }
  .hero-poster { display: block; right: auto; bottom: auto; left: 50%; top: calc(var(--header-h) + 6px); width: var(--pw); margin-left: calc(var(--pw) / -2); border-radius: 12px; }
  .hero::after { background: linear-gradient(to top, var(--bg) 4%, rgba(var(--bg-rgb), .55) 45%, rgba(var(--bg-rgb), .2) 100%); }
  .hero-info { bottom: 36px; max-width: none; text-align: center; }
  .hero-info .chips { justify-content: center; }
  .hero-info h1, .hero-info h2 { font-size: 26px; margin: 10px 0 6px; }
  .hero-info p { font-size: 14px; margin: 0 auto 8px; }
  .hero-meta { margin-bottom: 14px; }
  .hero-actions { justify-content: center; }
  .hero-actions .btn { flex: 1; max-width: 180px; height: 44px; }
  .dots { left: 50%; transform: translateX(-50%); bottom: 14px; }
}

/* ---------- Rows & cards ---------- */
.rows { position: relative; z-index: 2; margin-top: -8px; }
.row { margin: 26px 0 0; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 var(--gutter); margin-bottom: 12px; }
.row-head h2 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.row-head a { font-size: 13px; color: var(--muted); font-weight: 600; }
.scroller { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gutter) 8px; scrollbar-width: none; scroll-padding: 0 var(--gutter); }
.scroller::-webkit-scrollbar { display: none; }
.card { flex: none; width: 132px; scroll-snap-align: start; }
@media (min-width: 768px) { .card { width: 176px; } .scroller { gap: 16px; } }
.poster {
  position: relative; aspect-ratio: 3/4; border-radius: var(--card-radius); overflow: hidden; background: var(--surface-2);
  transition: transform .25s ease, box-shadow .25s;
}
.poster img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .poster { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0,0,0,.5); }
.poster .badge { position: absolute; left: 8px; top: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; padding: 3px 7px; border-radius: 6px; background: rgba(var(--bg-rgb),.78); }
.poster .badge.new { background: var(--accent); color: #fff; }
.poster .shade { position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0)); pointer-events: none; }
.poster .eps-pill { position: absolute; left: 8px; bottom: 9px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.poster .eps-pill svg.i { width: 11px; height: 11px; }
.poster .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.2); }
.poster .prog i { display: block; height: 100%; background: var(--accent); }
.poster .ph { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 12px 12px 34px; font-weight: 800; font-size: 17px; line-height: 1.15; letter-spacing: -.01em; }
.card h3 { margin: 8px 2px 0; font-size: 13.5px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .sub { margin: 2px 2px 0; font-size: 12px; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 10px; padding: 0 var(--gutter); }
.grid .card { width: auto; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(6, 1fr); gap: 24px 16px; } }

/* ---------- Plain pages ---------- */
.pad-top { padding-top: calc(var(--header-h) + 16px); }
.page-title { padding: 0 var(--gutter); margin: 8px 0 16px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.searchbox { margin: 0 var(--gutter) 14px; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 50px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.searchbox:focus-within { border-color: var(--accent); }
.searchbox input { flex: 1; min-width: 0; background: none; border: 0; color: var(--text); font: 500 16px var(--font); outline: none; }
.filter { padding: 0 var(--gutter); margin-bottom: 20px; }
.empty { margin: 40px var(--gutter); padding: 40px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty svg.i { width: 40px; height: 40px; color: var(--faint); margin: 0 auto 10px; }
.empty h3 { color: var(--text); margin: 0 0 6px; font-size: 17px; }
.seg { display: inline-flex; margin: 0 var(--gutter) 18px; padding: 4px; border-radius: 999px; background: var(--surface-2); }
.seg button { padding: 8px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--text); color: var(--bg); }
.link-btn { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Drama detail ---------- */
.detail-head { position: relative; padding: calc(var(--header-h) + 8px) var(--gutter) 8px; overflow: hidden; }
.detail-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(36px) saturate(1.3); transform: scale(1.25); opacity: .45; }
.detail-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(var(--bg-rgb),.3), var(--bg) 92%); }
.detail-body { position: relative; z-index: 2; display: grid; gap: 20px; }
.detail-body .poster { width: 58%; max-width: 240px; margin: 0 auto; box-shadow: 0 24px 50px rgba(0,0,0,.55); }
.detail-body h1 { margin: 0 0 10px; font-size: clamp(26px, 5vw, 44px); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; text-wrap: balance; }
.detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
.detail-meta b { color: var(--gold); }
.tagline { margin: 0 0 8px; font-weight: 700; color: var(--gold); text-wrap: balance; }
.synopsis { color: var(--soft); margin: 0 0 18px; max-width: 680px; }
.synopsis.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.detail-actions .btn.primary { flex: 1; min-width: 180px; max-width: 320px; }
@media (min-width: 768px) {
  .detail-body { grid-template-columns: 240px 1fr; align-items: end; gap: 36px; padding-top: 24px; }
  .detail-body .poster { width: 100%; margin: 0; }
  .detail-actions .btn.primary { flex: none; }
}
.section { padding: 0 var(--gutter); margin-top: 30px; }
.section h2 { font-size: 18px; margin: 0 0 6px; font-weight: 800; }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 14px; }
.hint svg.i { width: 15px; height: 15px; display: inline-block; vertical-align: -3px; margin-right: 5px; }
.ranges { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.ranges::-webkit-scrollbar { display: none; }
.ranges button { flex: none; padding: 7px 14px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 700; color: var(--muted); }
.ranges button.on { background: var(--text); color: var(--bg); }
.eps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
@media (min-width: 600px) { .eps { grid-template-columns: repeat(10, 1fr); } }
.ep {
  position: relative; aspect-ratio: 1; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center;
  font-weight: 800; font-size: 15px; border: 1px solid transparent; transition: background .15s, border-color .15s;
}
.ep:hover { background: var(--hover); }
.ep.watched { color: var(--muted); }
.ep.current { border-color: var(--accent); color: var(--accent); }
.ep.soon { opacity: .35; cursor: default; }
/* Locked = neutral, unlocked = green, so the two never look alike in either theme. */
.ep .mark { position: absolute; top: 4px; right: 4px; width: 13px; height: 13px; color: var(--muted); }
.ep .mark.open { color: var(--ok); }

/* ---------- Player (9:16 and 16:9) ---------- */
.player { position: fixed; inset: 0; background: #000; display: flex; justify-content: center; overflow: hidden; touch-action: none; }
.player-backdrop { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(40px) brightness(.45); transform: scale(1.3); }
/* 100vh first: browsers without dvh (Chrome < 108, iOS 15.0-15.3) drop the second line instead of the whole width. */
.stage { position: relative; height: 100%; width: min(100vw, calc(100vh * 9 / 16)); width: min(100vw, calc(100dvh * 9 / 16)); background: #000; overflow: hidden; }
.player[data-format="h"] .stage { width: 100%; }
@media (min-width: 1024px) {
  .player.has-panel .stage { margin-right: 380px; }
  .player.has-panel[data-format="h"] .stage { width: calc(100% - 380px); }
  .player.has-panel .only-mobile { display: none !important; }
}
.stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
@media (min-aspect-ratio: 9/16) { .stage video { object-fit: contain; } }
.player[data-format="h"] .stage video { object-fit: contain; }
.player.fs .stage { width: 100% !important; margin: 0 !important; }
.player.fs .panel { display: none !important; }
.player.fs .only-mobile { display: flex !important; }
/* Phone turned sideways: the picture gets the whole screen. */
@media (orientation: landscape) and (max-height: 540px) {
  .player .panel { display: none !important; }
  .player .stage { margin: 0 !important; }
  .player[data-format="h"] .stage { width: 100% !important; }
  .player .p-ep { display: none; }
}

.tap { position: absolute; inset: 0; z-index: 5; }
.chrome { position: absolute; inset: 0; pointer-events: none; transition: opacity .3s; }
/* No z-index on .chrome itself, so the top bar can sit above the ad gate. */
.chrome > * { z-index: 10; }
.chrome button, .chrome a, .chrome .bar { pointer-events: auto; }
/* Idle while playing: 16:9 hides everything (YouTube); 9:16 keeps title, side actions and progress (TikTok). */
.player.idle[data-format="h"] .chrome { opacity: 0; }
.player.idle[data-format="h"] .chrome * { pointer-events: none !important; }
.player.idle[data-format="v"] .ctrl, .player.idle[data-format="v"] .p-ep { opacity: 0; pointer-events: none; }
.ctrl, .p-ep { transition: opacity .3s; }
.player.idle { cursor: none; }

.p-top { position: absolute; inset: 0 0 auto; padding: calc(8px + env(safe-area-inset-top)) 6px 28px; display: flex; align-items: center; gap: 2px; background: linear-gradient(to bottom, rgba(0,0,0,.65), transparent); }
.p-title { flex: 1; min-width: 0; padding: 0 4px; }
.p-title b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-title span { font-size: 12.5px; color: var(--soft); }
.top-acts { display: flex; }
.top-acts .on { color: var(--accent); }
.player[data-format="v"] .top-acts { display: none; }
.player[data-format="h"] .p-side { display: none; }
.p-side { position: absolute; right: 8px; bottom: 150px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.p-side button { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.p-side button span.circle { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.35); backdrop-filter: blur(6px); }
.p-side button.on span.circle { color: var(--accent); }

.big-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); display: grid; place-items: center; opacity: 0; pointer-events: none !important; transition: opacity .2s; }
.big-play svg.i { width: 34px; height: 34px; }
.player.paused .big-play, .player[data-format="h"]:not(.idle) .big-play { opacity: 1; pointer-events: auto !important; }
.player.loading .big-play { opacity: 0 !important; pointer-events: none !important; }

.p-bottom { position: absolute; inset: auto 0 0; padding: 36px 10px calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(0,0,0,.75), transparent); }
.p-ep { font-size: 13px; font-weight: 700; margin: 0 4px 6px; display: flex; align-items: center; gap: 8px; color: var(--soft); }
.p-ep .chip { background: rgba(255,255,255,.16); color: #fff; }
.bar { position: relative; height: 26px; margin: 0 4px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.bar .track { position: relative; width: 100%; height: 4px; border-radius: 4px; background: rgba(255,255,255,.25); transition: height .15s; }
.bar.active .track { height: 7px; }
.bar .fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; }
.bar .knob { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.15); }
.ctrl { display: flex; align-items: center; gap: 2px; }
.ctrl .icon-btn { width: 42px; height: 42px; }
.ctrl .icon-btn:disabled { opacity: .3; cursor: default; }
.ctrl .grow { flex: 1; }
.times { font-size: 12px; color: var(--soft); font-variant-numeric: tabular-nums; margin-left: 6px; white-space: nowrap; }
.speed { min-width: 44px; height: 30px; padding: 0 8px; border-radius: 8px; font-weight: 800; font-size: 13px; background: rgba(255,255,255,.14); }

.seek-flash { position: absolute; z-index: 9; top: 50%; margin-top: -20px; padding: 10px 16px; border-radius: 999px; background: rgba(0,0,0,.55); font-weight: 800; font-size: 14px; opacity: 0; pointer-events: none; }
.seek-flash.l { left: 10%; }
.seek-flash.r { right: 10%; }
.seek-flash.on { animation: flash .7s ease; }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
.spinner { position: absolute; z-index: 9; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; border-radius: 50%; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; animation: spin .8s linear infinite; display: none; pointer-events: none; }
.spinner.on { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.unmute { position: absolute; z-index: 11; top: calc(64px + env(safe-area-inset-top)); left: 12px; display: none; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: rgba(0,0,0,.6); font-size: 12.5px; font-weight: 700; }
.unmute.on { display: inline-flex; }
.toast { position: absolute; z-index: 20; left: 50%; top: 40%; transform: translate(-50%, -50%); padding: 10px 16px; border-radius: 999px; background: rgba(0,0,0,.7); font-weight: 700; font-size: 14px; opacity: 0; transition: opacity .25s; pointer-events: none; white-space: nowrap; }
.toast.on { opacity: 1; }

.ad-slot { position: absolute; inset: 0; z-index: 30; display: none; background: #000; }
.ad-slot.on { display: block; }
.ad-label { position: absolute; z-index: 31; top: calc(12px + env(safe-area-inset-top)); left: 12px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.6); display: none; }
.ad-slot.on + .ad-label { display: block; }

.upnext { position: absolute; inset: 0; z-index: 24; display: grid; place-items: center; background: rgba(0,0,0,.62); }
.upnext-box { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 20px; }
.upnext-box > span { color: var(--soft); font-size: 13px; }
.upnext-box > b { font-size: 22px; }
.upnext-ring { position: relative; width: 64px; height: 64px; margin: 12px 0 14px; }
.upnext-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.upnext-ring circle { fill: none; stroke: rgba(255,255,255,.2); stroke-width: 3; }
.upnext-ring #ring { stroke: var(--accent); stroke-dasharray: 100.6; stroke-dashoffset: 0; animation: ring linear forwards; }
@keyframes ring { to { stroke-dashoffset: 100.6; } }
.upnext-ring span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 20px; }
.upnext-acts { display: flex; gap: 10px; }

.gate { position: absolute; inset: 0; z-index: 25; display: grid; place-items: center; padding: 24px; text-align: center; }
.gate-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(22px) brightness(.35); transform: scale(1.2); }
.gate-box { position: relative; max-width: 320px; }
.gate-box .lock { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.gate-box .lock svg.i { width: 30px; height: 30px; }
.gate-box h3 { margin: 0 0 8px; font-size: 21px; font-weight: 800; }
.gate-box p { margin: 0 0 20px; color: var(--soft); font-size: 14px; }
.gate-box .btn { width: 100%; }
.gate-box .alt { margin-top: 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
.gate-box .note { margin-top: 12px; font-size: 12px; color: var(--muted); }
.count { font-variant-numeric: tabular-nums; }
/* Banner ad over the video, YouTube style. */
.adview { padding: 0; background: #000; }
.adview .gate-bg { filter: blur(26px) brightness(.28); }
.adv-center { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; }
.adv-frame { width: 300px; height: 250px; border: 0; border-radius: 6px; background: rgba(255,255,255,.05); transform-origin: center; }
.adv-info { position: absolute; left: 12px; bottom: calc(20px + env(safe-area-inset-bottom)); max-width: calc(100% - 180px); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; text-align: left; font-size: 12.5px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.adv-badge { padding: 2px 7px; border-radius: 4px; background: #fc0; color: #000; font-size: 11.5px; font-weight: 800; text-shadow: none; }
.adv-time { font-variant-numeric: tabular-nums; }
.adv-what { flex-basis: 100%; font-weight: 600; color: rgba(255,255,255,.8); }
.adv-next { position: absolute; z-index: 0; right: 0; bottom: calc(5% + 34px + env(safe-area-inset-bottom)); transform: scale(1.2); transform-origin: right bottom; padding: 10px 14px; background: rgba(0,0,0,.72); border: 1px solid rgba(255,255,255,.18); border-right: 0; font-size: 13px; font-weight: 700; opacity: 1; }
.adv-bar { position: absolute; left: 0; right: 0; bottom: env(safe-area-inset-bottom); height: 4px; background: rgba(255,255,255,.2); }
.adv-bar i { display: block; height: 100%; width: 0; background: #fc0; }
.adv-bar i.go { animation: adbar linear forwards; }
.promo-shelf { width: 100%; max-width: 980px; }
.promo-head { display: flex; align-items: center; gap: 8px; padding: 0 var(--gutter, 16px) 10px; font-size: 14px; font-weight: 700; text-align: left; }
.promo-logo { padding: 3px 8px; border-radius: 6px; background: #ee4d2d; color: #fff; font-size: 12px; font-weight: 800; }
.promo-row { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter, 16px); padding: 0 var(--gutter, 16px) 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.promo-row::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .promo-row { justify-content: safe center; } }
/* A single product fills the player: photo over a blurred copy of itself, details below. */
.promo-full { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: calc(64px + env(safe-area-inset-top)) 20px calc(96px + env(safe-area-inset-bottom)); overflow: hidden; color: #fff; text-align: center; }
.pf-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(30px) brightness(.45); -webkit-mask-image: linear-gradient(to top, transparent calc(10% + 100px), #000 calc(10% + 220px)); mask-image: linear-gradient(to top, transparent calc(10% + 100px), #000 calc(10% + 220px)); }
.pf-img { position: relative; width: min(100%, 420px); min-height: 0; flex: 0 1 auto; aspect-ratio: 1; object-fit: contain; border-radius: 14px; box-shadow: 0 16px 50px rgba(0,0,0,.55); }
.pf-info { position: relative; display: grid; justify-items: center; gap: 6px; width: min(100%, 420px); }
.pf-name { font-size: 18px; line-height: 1.3; text-shadow: 0 1px 4px rgba(0,0,0,.6); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-price { font-size: 20px; font-weight: 800; color: #ffb199; }
.pf-btn { margin-top: 6px; width: 100%; padding: 13px 0; border-radius: 10px; background: #ee4d2d; color: #fff; font-size: 16px; font-weight: 800; }
/* Wide player (16:9, phone in landscape): photo beside the details. Measured on the player, not the window. */
.adview { container-type: size; }
/* Short or narrow player (vertical drama on a phone held sideways): tighter, smaller text. */
@container (max-height: 540px) {
  .promo-full { gap: 8px; padding-top: 48px; padding-bottom: 64px; }
  .pf-info { gap: 3px; }
  .pf-name { font-size: 14px; -webkit-line-clamp: 1; }
  .pf-price { font-size: 15px; }
  .pf-btn { margin-top: 4px; padding: 8px 0; font-size: 14px; }
  .promo-full .promo-logo { display: none; }
}
@container (max-width: 360px) {
  .adv-what { display: none; }
  .adv-info { max-width: none; }
  .adv-next { padding: 8px 10px; font-size: 12px; }
}
@container (min-aspect-ratio: 1/1) {
  .promo-full { flex-direction: row; gap: 28px; padding-left: 6%; padding-right: 6%; }
  .pf-img { width: auto; height: min(100%, 420px); }
  .pf-info { justify-items: start; text-align: left; width: min(40%, 360px); }
}
.promo-card { flex: 0 0 clamp(146px, 42vw, 184px); display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; background: #fff; color: #222; text-align: left; scroll-snap-align: start; box-shadow: 0 8px 28px rgba(0,0,0,.45); }
.promo-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #f2f2f2; }
.promo-name { margin: 8px 10px 0; font-size: 12.5px; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.promo-price { margin: 4px 10px 0; font-size: 13.5px; font-weight: 800; color: #ee4d2d; }
.promo-btn { margin: 8px 10px 10px; padding: 7px 0; border-radius: 8px; background: #ee4d2d; color: #fff; font-size: 13px; font-weight: 800; text-align: center; }
/* Short stages (phone in landscape): smaller cards. */
@media (max-height: 560px) {
  .promo-card { flex-basis: 128px; }
  .promo-head { padding-bottom: 6px; }
  .promo-btn { display: none; }
}

@keyframes adbar { to { width: 100%; } }
/* The top bar stays usable above the gate (back button). */
.player .p-top { z-index: 26; }
.chrome .p-top { position: absolute; }

.panel { display: none; position: absolute; top: 0; right: 0; bottom: 0; width: 380px; background: var(--bg); border-left: 1px solid var(--line); overflow-y: auto; padding: 24px; }
@media (min-width: 1024px) { .player.has-panel .panel { display: block; } }
.panel h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.panel .synopsis { font-size: 14px; }

.sheet-back { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); opacity: 0; transition: opacity .25s; }
.sheet { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 72vh; overflow-y: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 10px var(--gutter) calc(24px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.sheet-back.on { opacity: 1; }
.sheet.on { transform: none; }
.sheet .grab { width: 40px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 4px; font-size: 17px; }
@media (min-width: 768px) { .sheet { left: 50%; right: auto; width: 520px; margin-left: -260px; bottom: 24px; border-radius: 20px; } }

.endcard { position: absolute; inset: 0; z-index: 24; display: grid; place-items: center; padding: 24px; text-align: center; background: rgba(0,0,0,.8); overflow-y: auto; }
.endcard h3 { margin: 0 0 6px; font-size: 22px; }
.endcard p { color: var(--muted); margin: 0 0 18px; }

/* ---------- Detail extras, text pages, footer ---------- */
.fmt-label { display: inline-flex; align-items: center; gap: 5px; }
.fmt-label svg.i { width: 15px; height: 15px; }
.poster .badge.fmt { left: auto; right: 8px; padding: 3px 5px; display: grid; place-items: center; }
.poster .badge.fmt svg.i { width: 14px; height: 14px; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); z-index: 39; padding: 14px var(--gutter) 10px; background: linear-gradient(to top, var(--bg) 65%, rgba(var(--bg-rgb),0)); transform: translateY(130%); transition: transform .25s ease; }
.sticky-cta.on { transform: none; }
.sticky-cta .btn { width: 100%; }
@media (min-width: 768px) { .sticky-cta { display: none; } }
.prose { max-width: 720px; padding: 0 var(--gutter); color: var(--soft); }
.prose h1 { color: var(--text); font-size: 28px; letter-spacing: -.02em; margin: 8px 0 14px; }
.prose h2 { color: var(--text); font-size: 17px; margin: 24px 0 6px; }
.prose p { margin: 0 0 12px; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.footer { padding: 44px var(--gutter) 0; color: var(--faint); font-size: 12.5px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 8px; }
.footer nav a { color: var(--muted); font-weight: 600; }
.footer p { margin: 0; }
@media (max-width: 767px) { body.has-sticky main.page { padding-bottom: calc(var(--tab-h) + 110px + env(safe-area-inset-bottom)); } }
.ep.joined { color: var(--muted); font-style: italic; }

/* Optional analytics choice stays separate from playback controls. */
.analytics-choice { position: fixed; z-index: 200; bottom: 18px; left: 18px; width: min(440px, calc(100% - 36px)); padding: 18px; border: 1px solid #555; border-radius: 12px; background: #191919; color: #fff; box-shadow: 0 8px 32px #0008; }
.analytics-choice p { margin: 0 0 12px; font-size: 13px; line-height: 1.5; }
.analytics-choice a { text-decoration: underline; }
.analytics-choice > div { display: flex; flex-wrap: wrap; gap: 8px; }
.analytics-choice .btn { min-height: 40px; padding: 8px 12px; font-size: 13px; }

.adv-skip { position: absolute; z-index: 3; right: 14px; bottom: calc(5% + 4px + env(safe-area-inset-bottom)); padding: 5px 0; border: 0; background: transparent; color: #fff; font-size: 12px; text-decoration: none; cursor: pointer; }
.adv-skip:disabled { opacity: .5; cursor: default; }

.adv-skip[hidden] { display: none; }
