/* The film website: night-cinema dark, one hot accent for "watch", gold for "coming". */
:root {
  /* The desktop app's palette (styles/global.css): navy ink, violet accent. */
  --bg: #080b18;
  --bg-raised: #11162c;
  --bg-card: #171d39;
  --line: #2e3862;
  --fg: #eef1fb;
  --fg-muted: #b4bbdb;
  --fg-faint: #8a93bd;
  --accent: #7c5cff;
  --accent-rgb: 124 92 255;
  /* Filled buttons: white text on it stays readable (about 6:1). */
  --accent-strong: #5b3ce0;
  --accent-deep: #4a2fc4;
  --gold: #fbbf4d;
  --radius: 14px;
  --radius-sm: 9px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Nghe truyện keeps the Rimo Audio channel's pink. */
.zone-listen {
  --accent: #ff3d7f;
  --accent-rgb: 255 61 127;
  --accent-strong: #d81b60;
  --accent-deep: #b0124d;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.55 var(--font);
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.01em; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 16px;
  padding: 14px var(--gutter);
  background: linear-gradient(to bottom, rgba(11, 10, 16, 0.96), rgba(11, 10, 16, 0.78));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
/* The Rimosoft mark: drawn artwork on a transparent ground, so no tile behind it. */
/* A customer's channel name as the logo: the brand's colours, no picture. */
.brand-text {
  font-weight: 800; font-size: 21px; letter-spacing: -0.01em;
  background: linear-gradient(90deg, #a18bff, #7c5cff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* The seller's own wordmark (scripts/brand/make_rimoshort_logo.py), drawn 3x for sharp screens. */
.brand-wordmark { display: block; height: 34px; width: auto; }
@media (max-width: 520px) { .brand-wordmark { height: 26px; } }
.brand-mark { display: block; width: 32px; height: 32px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(255, 61, 127, 0.35)); }
.brand-tagline { margin: 0; color: var(--fg-faint); font-size: 13px; }

main { padding-bottom: 48px; }

/* ------------------------------------------------------------------ hero (home) and film header */
.hero, .film { position: relative; overflow: hidden; isolation: isolate; }
.hero-backdrop {
  position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px);
  object-fit: cover; filter: blur(38px) saturate(1.3) brightness(0.45); z-index: -2; transform: scale(1.05);
}
.hero::after, .film::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(11, 10, 16, 0.2), var(--bg) 96%);
}
.hero-body, .film-body {
  display: flex; gap: clamp(18px, 4vw, 40px); align-items: flex-end;
  padding: clamp(28px, 6vw, 72px) var(--gutter) clamp(24px, 4vw, 40px);
  max-width: 1200px; margin: 0 auto;
}
.poster { aspect-ratio: 2 / 3; width: 100%; height: auto; object-fit: cover; border-radius: var(--radius-sm); background: var(--bg-card); }
.poster-empty { display: grid; place-items: center; font-size: 42px; font-weight: 800; color: var(--fg-faint); }
.hero-poster, .film-poster {
  width: clamp(120px, 26vw, 230px); flex-shrink: 0; border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.eyebrow { margin: 0 0 6px; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.hero h1, .film h1 { font-size: clamp(28px, 6vw, 56px); font-weight: 800; }
.hero-episode { margin: 8px 0 14px; color: var(--fg-muted); font-size: clamp(15px, 2.2vw, 19px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px;
  font-weight: 700; font-size: 15px; transition: transform 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent-strong); color: #fff; box-shadow: 0 10px 30px -10px var(--accent); }
.btn-primary:hover { background: var(--accent); box-shadow: 0 14px 36px -10px var(--accent); }
.btn-ghost { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }

/* ------------------------------------------------------------------ countdown */
.countdown { display: inline-flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.countdown-label { color: var(--fg-faint); font-size: 13px; }
.countdown-value { color: var(--gold); font-weight: 700; font-size: 16px; }
.hero .countdown-value, .next .countdown-value { font-size: clamp(20px, 3.4vw, 30px); letter-spacing: 0.01em; }
.countdown.is-live .countdown-value { color: var(--accent); }
/* Out already: "Đang lên sóng" says it all, without "Lên sóng sau" before it. */
.countdown.is-live .countdown-label { display: none; }
.countdown-soon { color: var(--gold); font-weight: 600; font-size: 14px; }

/* ------------------------------------------------------------------ shelves */
.shelf, .episodes { max-width: 1200px; margin: 0 auto; padding: 22px var(--gutter) 0; }
.shelf-title { display: flex; align-items: center; gap: 10px; font-size: clamp(18px, 2.6vw, 24px); font-weight: 800; margin-bottom: 14px; }
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-live { background: var(--accent); box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 0.2); animation: pulse 1.8s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgb(var(--accent-rgb) / 0); } }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 44vw), 1fr)); gap: 18px 14px; }

.card { display: flex; flex-direction: column; gap: 8px; }
.card-art { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; transition: transform 220ms var(--ease), box-shadow 220ms var(--ease); }
.card:hover .card-art, .card:focus-visible .card-art { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9), 0 0 0 1px rgb(var(--accent-rgb) / 0.4); }
.card-title { font-weight: 700; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { color: var(--fg-faint); font-size: 13px; }
.card .countdown-value { font-size: 14px; }
.badge {
  position: absolute; left: 8px; top: 8px; padding: 3px 9px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
}
.badge-quiet { background: rgba(11, 10, 16, 0.78); border: 1px solid rgba(255, 255, 255, 0.14); }
.empty { color: var(--fg-muted); }

/* ------------------------------------------------------------------ film page */
.crumbs { max-width: 1200px; margin: 0 auto; padding: 14px var(--gutter) 0; color: var(--fg-muted); font-size: 14px; }
.crumbs a:hover { color: var(--fg); }
.film-author { margin: 6px 0 0; color: var(--fg-muted); }
.film-credit { margin: 4px 0 0; color: var(--fg-muted); font-size: .92em; }
.film-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; }
.chips li { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 12px; color: var(--fg-muted); }
.film-facts { margin: 12px 0 0; color: var(--fg-muted); font-size: 14px; }
.film-facts strong { color: var(--fg); }
.synopsis { margin-top: 12px; max-width: 64ch; color: var(--fg-muted); }
.synopsis summary { cursor: pointer; color: var(--fg); font-weight: 600; }
.synopsis p { margin: 8px 0 0; white-space: pre-line; }
.next { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-sm); background: rgba(255, 197, 77, 0.08); border: 1px solid rgba(255, 197, 77, 0.25); display: inline-block; }

.episode-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.episode {
  display: flex; gap: 14px; padding: 12px; border-radius: var(--radius); background: var(--bg-raised);
  border: 1px solid var(--line); scroll-margin-top: 80px; transition: border-color 200ms var(--ease), background 200ms var(--ease);
}
.episode:target { border-color: var(--accent); background: linear-gradient(90deg, rgb(var(--accent-rgb) / 0.12), var(--bg-raised) 60%); }
/* align-self: a row grown taller (summary, buttons) must not stretch the 9:16 picture with it. */
.episode-art { position: relative; width: 84px; flex-shrink: 0; align-self: flex-start; aspect-ratio: 9 / 16; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-card); }
.episode-art img { width: 100%; height: 100%; object-fit: cover; }
.episode.is-coming .episode-art img { filter: grayscale(0.6) brightness(0.55); }
.episode-number { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 6px; background: rgba(11, 10, 16, 0.82); font-size: 11px; font-weight: 700; }
.episode-text { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
.episode-text h3 { font-size: 16px; font-weight: 700; }
.episode-detail, .episode-when { margin: 0; color: var(--fg-faint); font-size: 13px; }

.watch { display: flex; flex-wrap: wrap; gap: 8px; }
/* Wraps inside itself: "▶ Facebook · 20:30 16/10/2026" is wider than a 320 px card's column. */
.watch-btn { display: inline-flex; flex-wrap: wrap; max-width: 100%; align-items: center; gap: 0 6px; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 700; transition: filter 160ms var(--ease), transform 160ms var(--ease); }
.watch-btn:hover { filter: brightness(1.15); }
.watch-btn:active { transform: scale(0.96); }
.watch-youtube { background: #ff0033; color: #fff; }
.watch-tiktok { background: #000; color: #fff; box-shadow: -2px 0 0 #25f4ee inset, 2px 0 0 #fe2c55 inset; border: 1px solid #333; }
.watch-reels { background: linear-gradient(45deg, #feda75, #fa7e1e 25%, #d62976 50%, #962fbf 75%, #4f5bd5); color: #fff; }
.watch-facebook { background: #1877f2; color: #fff; }
/* No link yet, or an upload still waiting for its time (site.js lifts that one when it comes). */
.watch-none, .watch-btn.is-later, .player-tab.is-later { background: var(--bg-card); color: var(--fg-faint); border: 1px dashed var(--line); box-shadow: none; cursor: default; pointer-events: none; }
/* The time an upload goes public is shown only while it still waits for it (site.js sets is-later). */
.watch-btn:not(.is-later) .watch-at { display: none; }
.watch-at { font-weight: 500; }
.player { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.player-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.player-tab { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-raised); color: var(--fg-muted); cursor: pointer; transition: border-color 160ms var(--ease), color 160ms var(--ease); }
.player-tab:hover, .player-tab:focus-visible { border-color: var(--accent); color: var(--fg); }
/* The player opens over the page (2026-10-07: inline, it pushed the whole list down and stretched
   the row). Shorts, TikToks and Reels are upright: a 9:16 frame that fits the screen's height. */
.player-dialog { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; overflow: visible; }
.player-dialog::backdrop { background: rgba(5, 4, 8, 0.86); backdrop-filter: blur(4px); }
.player-box { position: relative; height: min(86vh, 760px); aspect-ratio: 9 / 16; max-width: calc(100vw - 32px); border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6); }
.player-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-close { position: absolute; z-index: 1; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(11, 10, 16, 0.78); color: var(--fg); font-size: 18px; line-height: 1; cursor: pointer; }
.player-close:hover, .player-close:focus-visible { border-color: var(--accent); }
@media (max-width: 520px) { .player-box { height: auto; width: calc(100vw - 32px); } }

.footer { max-width: 1200px; margin: 40px auto 0; padding: 20px var(--gutter) 36px; color: var(--fg-faint); font-size: 13px; border-top: 1px solid var(--line); }
.footer a { color: inherit; }
.footer .legal a { text-decoration: underline; text-underline-offset: 2px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.socials a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); font-weight: 600; font-size: 14px; text-decoration: none; transition: border-color .15s, background-color .15s; }
.socials a:hover, .socials a:focus-visible { border-color: var(--accent); background: rgb(var(--accent-rgb) / .08); }

@media (max-width: 560px) {
  .brand-tagline { display: none; }
  .hero-body, .film-body { flex-direction: column; align-items: flex-start; }
  .hero-poster, .film-poster { width: 132px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- The "Truyện mới" list: novels as words on their genre's colour ---- */
.topnav { display: flex; gap: 6px; margin-left: auto; }
.topnav a { padding: 6px 12px; border-radius: 999px; color: var(--fg-muted); font-weight: 600; font-size: 14px; }
.topnav a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.08); }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.shelf-more { color: var(--accent); font-weight: 700; font-size: 14px; }
/* The catalog page sits in the same column as the rest of the site. */
.catalog-page { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.catalog-head { padding: 28px 0 8px; }
.catalog-head h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.1; margin: 6px 0 10px; }
.catalog-lead { color: var(--fg-muted); max-width: 640px; margin: 0 0 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.05); color: var(--fg-muted); padding: 6px 12px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background 160ms var(--ease), color 160ms var(--ease); }
.chip:hover { color: var(--fg); }
.chip.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.novels { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.novel { display: grid; grid-template-columns: 96px 1fr; gap: 14px; padding: 12px; border-radius: var(--radius-sm); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); }
.novel[hidden] { display: none; }
.novel-art {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 8px;
  aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden;
  background: linear-gradient(160deg, hsl(var(--hue) 70% 34%), hsl(calc(var(--hue) + 40) 65% 16%));
}
.novel-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.22), transparent 55%); }
.novel-art-genre { position: relative; z-index: 1; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255, 255, 255, 0.75); }
.novel-art-title { position: relative; z-index: 1; font-weight: 800; font-size: 13px; line-height: 1.2; color: #fff; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.novel-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.novel-title { margin: 0; font-size: 16px; line-height: 1.3; }
.novel-meta { margin: 0; color: var(--fg-faint); font-size: 13px; }
.novel-genres { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.novel-genres span { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--fg-muted); }
.novel-blurb { margin: 0; color: var(--fg-muted); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.novel .btn { align-self: flex-start; margin-top: auto; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn.is-done { background: rgba(61, 220, 151, 0.14); border-color: rgba(61, 220, 151, 0.5); color: #3ddc97; cursor: default; }

/* The request button is the page's point: it stands out, in the site's accent. */
.novel [data-request] { background: rgb(var(--accent-rgb) / 0.12); border-color: rgb(var(--accent-rgb) / 0.55); color: #c9b8ff; }
.novel [data-request]:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* A phone: the channel's name gives way before anything spills past the screen's edge. */
.brand { min-width: 0; }
.brand-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.novel-body, .novel-title, .novel-genres { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .topbar { gap: 8px; }
  .brand-text { font-size: 17px; }
  .topnav { gap: 2px; flex-shrink: 0; }
  .topnav a { padding: 6px 8px; font-size: 13px; }
  .novel { grid-template-columns: 76px 1fr; gap: 10px; }
}

/* ------------------------------------------------------------------ home: the spotlight */
.spot { position: relative; overflow: hidden; isolation: isolate; }
.spot::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120% 90% at 85% 10%, rgba(11, 10, 16, 0.1), var(--bg) 78%), linear-gradient(to bottom, transparent 60%, var(--bg)); }
.spot-body {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(20px, 4vw, 56px); align-items: center;
  max-width: 1200px; margin: 0 auto; padding: clamp(28px, 5vw, 64px) var(--gutter) clamp(20px, 3vw, 36px);
}
.spot h1 { font-size: clamp(30px, 5.6vw, 60px); font-weight: 800; }
.spot-episode { margin: 10px 0 0; color: var(--fg); font-size: clamp(16px, 2.2vw, 21px); font-weight: 600; }
.spot-summary { margin: 14px 0 0; max-width: 58ch; color: var(--fg-muted); font-size: 15px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.spot-when { margin-top: 16px; }
.spot .countdown-value { font-size: clamp(20px, 3.2vw, 30px); }
/* Scene pictures as a fanned stack of film frames: the episode's look, not a single poster. */
.spot-reel { position: relative; height: clamp(300px, 42vw, 520px); }
.spot-reel img {
  position: absolute; height: 88%; width: auto; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--radius);
  box-shadow: 0 30px 60px -24px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.08); transition: transform 400ms var(--ease);
}
.spot-reel img:nth-child(1) { z-index: 3; left: 50%; top: 6%; transform: translateX(-50%); }
.spot-reel img:nth-child(2) { z-index: 2; left: 8%; top: 12%; height: 76%; transform: rotate(-7deg); filter: brightness(0.8); }
.spot-reel img:nth-child(3) { z-index: 1; right: 8%; top: 12%; height: 76%; transform: rotate(7deg); filter: brightness(0.8); }
.reel-1 img:nth-child(1) { top: 4%; }
.spot-reel:hover img:nth-child(2) { transform: rotate(-10deg) translateX(-10px); }
.spot-reel:hover img:nth-child(3) { transform: rotate(10deg) translateX(10px); }

/* ------------------------------------------------------------------ episodes with what they tell */
.releases { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); gap: 14px; }
.release { display: grid; grid-template-columns: 112px 1fr; gap: 14px; padding: 12px; border-radius: var(--radius); background: var(--bg-raised); border: 1px solid var(--line); transition: border-color 200ms var(--ease), transform 200ms var(--ease); }
.release:hover { border-color: rgb(var(--accent-rgb) / 0.45); transform: translateY(-2px); }
.release-art { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-card); }
.release-art img { width: 100%; height: 100%; object-fit: cover; }
.release-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.release-film { margin: 0; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.release-text h3 { font-size: 17px; font-weight: 700; line-height: 1.3; }
.release-summary { margin: 0; color: var(--fg-muted); font-size: 13.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.release .watch, .release .countdown { margin-top: auto; }

/* ------------------------------------------------------------------ scene strips and the cast */
.spot-more { padding-top: 30px; }
.stills { list-style: none; margin: 0; padding: 0 0 6px; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(96px, 22vw, 150px); gap: 10px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.stills img { aspect-ratio: 9 / 16; width: 100%; height: auto; object-fit: cover; border-radius: var(--radius-sm); }
.stills-wide { grid-auto-columns: clamp(120px, 26vw, 186px); gap: 12px; }
.episode .stills { grid-auto-columns: 64px; gap: 6px; margin-top: 4px; }
.sub-title { margin: 22px 0 12px; font-size: 16px; font-weight: 700; color: var(--fg-muted); }
.cast { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 16px 12px; }
.cast-person { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.cast-person img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgb(var(--accent-rgb) / 0.55); }
.cast-name { margin-top: 6px; font-weight: 700; font-size: 14px; line-height: 1.25; }
.cast-role { color: var(--fg-faint); font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ------------------------------------------------------------------ every film */
.films { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 14px; }
.film-card { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px; border-radius: var(--radius); background: var(--bg-raised); border: 1px solid var(--line); }
.film-card:hover { border-color: rgb(var(--accent-rgb) / 0.45); }
.film-card-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.film-card-synopsis { color: var(--fg-muted); font-size: 13.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.film-card-foot { margin-top: auto; color: var(--fg-faint); font-size: 12.5px; }
.badge-gold { background: var(--gold); color: #1a1300; }
.episode-summary { margin: 0; color: var(--fg-muted); font-size: 13.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ------------------------------------------------------------------ ad slots: always marked */
/* AdSense units: room kept before they load (no layout shift), clear of buttons and players. */
.ad-slot { max-width: 1200px; margin: 32px auto; padding: 0 var(--gutter); }
.ad-slot ins.adsbygoogle { min-height: 280px; }
.ad-slot.ad-in_article ins.adsbygoogle { min-height: 200px; }
.ad-slot.ad-multiplex ins.adsbygoogle { min-height: 320px; }
.ad-slot ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ad-slot:has(ins[data-ad-status="unfilled"]) { display: none; }
.story .ad-slot, .post-body .ad-slot { padding: 0; margin: 28px 0; }
.ad-label { display: block; margin-bottom: 6px; color: var(--fg-faint); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; }
.catalog-page .ad-slot, .episode-ad .ad-slot { padding: 0; margin-top: 16px; }
.episode-ad { list-style: none; }

@media (max-width: 760px) {
  .spot-body { grid-template-columns: 1fr; }
  .spot-reel { order: -1; height: clamp(260px, 80vw, 380px); }
}
@media (max-width: 560px) {
  .release { grid-template-columns: 92px 1fr; gap: 10px; }
  .film-card { grid-template-columns: 96px 1fr; gap: 12px; }
  .cast { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  .cast-person img { width: 72px; height: 72px; }
}
/* A grid track grows to its content by default: the scene strip must scroll inside the card, not
   widen the page (measured 2026-09-29: 414 px wide on a 390 px phone). */
.episode-list, .releases, .films { grid-template-columns: minmax(0, 1fr); }
.releases { grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); }
.films { grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); }
.episode-text { flex: 1 1 auto; }

/* An episode's own page: the upright video beside its title and buttons, the narration below. */
.watch-page { max-width: 1200px; margin: 0 auto; padding: 22px var(--gutter) 0; display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(18px, 3vw, 40px); align-items: start; }
.watch-video { position: relative; width: 100%; aspect-ratio: 9 / 16; max-height: 80vh; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--line); }
.watch-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.watch-text { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.watch-text h1 { font-size: clamp(24px, 3.4vw, 38px); font-weight: 800; line-height: 1.2; }
.episode-nav { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 6px; font-size: 14px; font-weight: 600; color: var(--fg-muted); }
.episode-nav a:hover, .episode-nav a:focus-visible { color: var(--accent); }
.story { max-width: 720px; margin-top: 18px; }
/* The video stays in view while the narration beside it is read. */
@media (min-width: 761px) { .watch-video { position: sticky; top: 16px; } }
.story p { margin: 0 0 14px; color: var(--fg-muted); font-size: 16px; line-height: 1.75; }
.episode-text h3 a:hover, .episode-text h3 a:focus-visible { color: var(--accent); }
@media (max-width: 760px) {
  .watch-page { grid-template-columns: minmax(0, 1fr); }
  .watch-video { width: min(100%, 420px); margin: 0 auto; }
}

/* The film's written introduction, and the articles (bai-viet). */
.intro p { max-width: 72ch; margin: 0 0 14px; color: var(--fg-muted); font-size: 16px; line-height: 1.75; }
.post { max-width: 860px; margin: 0 auto; padding: 22px var(--gutter) 0; }
.post-head h1 { font-size: clamp(26px, 4vw, 42px); font-weight: 800; line-height: 1.2; margin-bottom: 14px; }
.post-lead { margin: 0 0 14px; color: var(--fg); font-size: 17px; line-height: 1.75; }
.post-film { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 20px; margin-top: 28px; padding-top: 28px; border-top: 1px solid var(--line); }
.post-poster .poster { width: 132px; height: auto; aspect-ratio: 2 / 3; border-radius: var(--radius-sm); object-fit: cover; }
.post-film-text h2 { font-size: 22px; font-weight: 800; }
.post-film-text h2 a:hover, .post-film-text h2 a:focus-visible { color: var(--accent); }
.post-number { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-right: 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 15px; vertical-align: 3px; }
.post-film-text p { margin: 12px 0 0; color: var(--fg-muted); font-size: 16px; line-height: 1.75; }
.post-links { display: flex; flex-wrap: wrap; gap: 10px; }
.post-end { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.post-end p { color: var(--fg-muted); font-size: 16px; line-height: 1.75; }
.posts { max-width: 860px; margin: 0 auto; padding: 22px var(--gutter) 0; }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.post-item { padding: 16px 18px; border-radius: var(--radius); background: var(--bg-raised); border: 1px solid var(--line); transition: border-color 200ms var(--ease); }
.post-item:hover { border-color: rgb(var(--accent-rgb) / 0.45); }
.post-item h2, .post-item h3 { font-size: 18px; font-weight: 700; }
.post-item p { margin: 6px 0 0; color: var(--fg-muted); font-size: 14px; line-height: 1.6; }
@media (max-width: 560px) {
  .post-film { grid-template-columns: 88px minmax(0, 1fr); gap: 14px; }
  .post-poster .poster { width: 88px; }
}


/* ------------------------------------------------------------------ the redesign (2026-10-15) */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* The home page's two tabs. */
.home-tabs { display: flex; gap: 6px; max-width: 420px; margin: 18px max(var(--gutter), calc(50% - 210px)) 0; padding: 5px; border-radius: 16px; background: var(--bg-raised); border: 1px solid var(--line); }
.home-tab { flex: 1; min-height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--fg-muted); font: 700 15px var(--font); cursor: pointer; transition: background 0.2s var(--ease), color 0.2s var(--ease); }
.home-tab:hover { color: var(--fg); }
.home-tab.is-on { background: var(--fg); color: var(--bg); }
.home-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.shelf-lead { margin: -6px 0 16px; color: var(--fg-muted); font-size: 15px; }

/* "Xem tiếp": where this visitor left off. */
.continue-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.continue-card { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius); background: var(--bg-raised); border: 1px solid var(--line); transition: border-color 0.2s var(--ease); }
.continue-card:hover, .continue-card:focus-visible { border-color: rgb(var(--accent-rgb) / 0.55); }
.continue-card img { width: 64px; height: 88px; border-radius: 10px; object-fit: cover; }
.continue-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }

/* ------------------------------------------------------------------ the swipe feed */
/* Nothing over YouTube's player (its embedding rules): a bar above it, a bar below it (beside it on
   a wide screen), the player in the space between, as large as a 9:16 picture fits. */
.feed-page { --top: 64px; --bottom: 84px; background: #000; height: 100vh; height: 100dvh; overflow: hidden; }
.feed { position: fixed; inset: var(--top) 0 var(--bottom); overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }
.feed:focus { outline: none; }
.slide { position: relative; height: calc(100dvh - var(--top) - var(--bottom)); scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.slide-media { position: relative; height: 100%; max-width: 100%; aspect-ratio: 9 / 16; background: #000; }
.slide-poster, .slide-player, .slide-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.slide-poster { object-fit: cover; filter: brightness(0.8); }
.slide.is-playing .slide-poster { visibility: hidden; }
.slide-badge { display: inline-block; margin: 0; padding: 2px 9px; border-radius: 7px; background: var(--accent-strong); color: #fff; font-weight: 800; font-size: 12px; }
.slide-title { font-size: 17px; font-weight: 800; }
.slide-coming { background: radial-gradient(circle at 50% 40%, #171d39, #000 70%); }
.slide-coming-body { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px; text-align: center; }

.feed-top { position: fixed; z-index: 3; top: 0; left: 0; right: 0; height: var(--top); display: flex; align-items: center; gap: 10px; padding: env(safe-area-inset-top) 12px 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.feed-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.feed-film { font-weight: 700; font-size: 14px; color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-now { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.feed-now [data-now-title] { overflow: hidden; text-overflow: ellipsis; }
.feed-icon { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--fg); cursor: pointer; }
.feed-icon:hover { background: var(--bg-card); }
.feed-sound { flex: none; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 22px; border: 0; background: var(--fg); color: var(--bg); font: 700 13px var(--font); cursor: pointer; }
.feed-sound[hidden] { display: none; }

/* The controls, in the app's colours (the user's choice): a bar under the player on a phone. */
.feed-rail { position: fixed; z-index: 3; left: 0; right: 0; bottom: 0; height: var(--bottom); padding: 0 8px env(safe-area-inset-bottom); display: flex; align-items: center; justify-content: space-around; background: var(--bg); border-top: 1px solid var(--line); }
.rail { min-width: 64px; padding: 4px 0; border: 0; border-radius: 16px; background: transparent; color: var(--fg); display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font: 600 11px var(--font); }
.rail-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #212949; transition: background 0.15s ease, transform 0.15s ease; }
.rail:hover .rail-icon { background: var(--line); }
.rail:active .rail-icon { transform: scale(0.92); }
.rail:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rail-main .rail-icon { background: var(--accent); box-shadow: 0 6px 18px rgb(var(--accent-rgb) / 0.45); }
.rail-main:hover .rail-icon { background: var(--accent-strong); }
.rail-line { width: 1px; height: 36px; background: var(--line); }
/* A wide screen: the rail stands beside the player, never over it. */
@media (min-width: 760px) {
  .feed-page { --bottom: 0px; }
  .feed-rail { left: auto; right: auto; bottom: auto; top: 50%; height: auto; transform: translateY(-50%); flex-direction: column; gap: 4px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 22px; background: rgba(8, 11, 24, 0.85); margin-left: calc(50% + (100dvh - var(--top)) * 9 / 32 + 16px); }
  .rail-line { width: 32px; height: 1px; margin: 4px 0; }
}

.feed-toast { position: fixed; z-index: 4; left: 50%; bottom: calc(var(--bottom) + 16px); transform: translateX(-50%); margin: 0; padding: 10px 16px; border-radius: 12px; background: var(--bg-card); color: var(--fg); font-size: 14px; }
.feed-list { width: min(560px, 100%); max-height: 75dvh; margin: auto auto 0; padding: 16px 16px max(24px, env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); border-radius: 24px 24px 0 0; background: var(--bg); color: var(--fg); }
.feed-list::backdrop { background: rgba(0, 0, 0, 0.55); }
.feed-list-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.feed-list-head h2 { font-size: 17px; font-weight: 800; }
.feed-list-links { margin: 0 0 14px; font-size: 14px; font-weight: 600; color: var(--fg-faint); }
.feed-list-links a { color: #c9b8ff; }
.feed-list-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ep { min-height: 48px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--fg); font: 700 15px var(--font); cursor: pointer; }
.ep:hover { background: #212949; }
.ep.ep-now { background: var(--accent-strong); border-color: var(--accent); color: #fff; }
.ep-soon { color: var(--fg-faint); font-size: 12px; cursor: default; }
.ep-soon:hover { background: var(--bg-raised); }
.feed-list-note { margin: 12px 0 0; color: var(--fg-muted); font-size: 13px; }

/* ------------------------------------------------------------------ the listening page */
.listen-page { max-width: 760px; margin: 0 auto; }
.listen-hero { display: flex; gap: 20px; align-items: flex-end; padding: 24px var(--gutter) 0; }
.listen-cover { width: 132px; height: 198px; border-radius: 16px; object-fit: cover; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5); }
.listen-head h1 { font-size: clamp(22px, 4vw, 32px); font-weight: 800; }
.listen-head .eyebrow { color: var(--accent); }
.player-card { margin: 20px var(--gutter) 0; padding: 18px; border-radius: 20px; background: var(--bg-raised); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.player-now { margin: 0; color: var(--fg-muted); font-size: 14px; font-weight: 600; }
.player-seek { width: 100%; accent-color: var(--accent); height: 28px; }
.player-times { margin: -6px 0 0; display: flex; justify-content: space-between; color: var(--fg-faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.player-controls { display: flex; align-items: center; justify-content: center; gap: 28px; }
.player-skip { width: 56px; height: 56px; border-radius: 50%; border: 0; background: transparent; color: var(--fg); font: 700 13px var(--font); cursor: pointer; }
.player-skip:hover { background: var(--bg-card); }
.player-play { width: 76px; height: 76px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--fg); color: var(--bg); cursor: pointer; box-shadow: 0 10px 30px -8px rgb(var(--accent-rgb) / 0.6); }
.player-play .icon-pause, .player-card.is-playing .player-play .icon-play { display: none; }
.player-card.is-playing .player-play .icon-pause { display: block; }
.player-play:focus-visible, .player-skip:focus-visible, .pill:focus-visible, .chap:focus-visible, .part:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.player-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pill { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--bg-card); color: var(--fg); font: 600 13px var(--font); cursor: pointer; display: inline-flex; align-items: center; }
.pill-select select { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.pill-select select option { background: var(--bg); }
.pill.is-on { border-color: var(--accent); color: var(--accent); }
.player-note { margin: 0; text-align: center; color: var(--fg-faint); font-size: 12px; }
.toc-list, .part-list { list-style: none; margin: 0; padding: 0; }
.chap, .part { width: 100%; min-height: 44px; display: flex; gap: 12px; align-items: center; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--fg); text-align: left; font: 500 15px var(--font); cursor: pointer; }
.chap:hover, .part:hover { background: var(--bg-raised); }
.chap.is-on, .part.is-on { color: var(--accent); }
.chap-at { width: 52px; flex: none; color: var(--fg-faint); font-size: 13px; font-variant-numeric: tabular-nums; }
.part-number { flex: none; width: 72px; font-weight: 800; }
.part-title { flex: 1; min-width: 0; }
.part-length { flex: none; color: var(--fg-faint); font-size: 13px; }
@media (max-width: 560px) {
  .listen-hero { align-items: center; }
  .listen-cover { width: 104px; height: 156px; }
}

/* ------------------------------------------------------------------ poster cards (web.png, 2026-10-15) */
/* Tall posters, tilted a little one way then the other, the rank in big gold numbers beside the name. */
.pc-row { list-style: none; margin: 0; padding: 6px 2px 12px; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(150px, 40vw, 230px); gap: clamp(14px, 2.4vw, 26px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.pc-row .pc { scroll-snap-align: start; }
.pc-grid { list-style: none; margin: 0; padding: 6px 2px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 30vw, 200px), 1fr)); gap: 28px clamp(14px, 2.4vw, 24px); }
.pc-link { display: flex; flex-direction: column; gap: 12px; }
.pc-art { position: relative; display: block; border-radius: 14px; overflow: hidden; transform: perspective(900px) rotateY(var(--tilt, 7deg)); transform-origin: center; box-shadow: 0 18px 34px -16px rgba(0, 0, 0, 0.9); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.pc:nth-child(even) .pc-art { --tilt: -7deg; }
.pc-art .poster { border-radius: 0; display: block; }
.pc-art .poster-empty { display: grid; place-items: center; font-size: 56px; }
.pc-link:hover .pc-art, .pc-link:focus-visible .pc-art { transform: perspective(900px) rotateY(0deg) translateY(-4px); box-shadow: 0 22px 40px -14px rgb(var(--accent-rgb) / 0.55); }
.pc-link:focus-visible { outline: none; }
.pc-link:focus-visible .pc-art { outline: 2px solid var(--accent); outline-offset: 3px; }
.pc-badge { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 3px 10px; border-radius: 7px; background: rgba(8, 11, 24, 0.82); color: var(--fg); font-size: 12px; font-weight: 700; white-space: nowrap; }
.pc-foot { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.pc-rank { flex: none; min-width: 0.6em; font-size: clamp(44px, 6vw, 64px); line-height: 0.85; font-weight: 800; font-style: italic; color: transparent; background: linear-gradient(180deg, #ffe08a, var(--gold) 55%, #d98f12); -webkit-background-clip: text; background-clip: text; }
.pc-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pc-title { font-weight: 700; font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-sub { color: var(--fg-faint); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-meta { color: var(--fg-muted); font-size: 12.5px; font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .pc-art, .pc-link:hover .pc-art { transform: none; transition: none; }
}
@media (max-width: 560px) {
  .pc-row { grid-auto-columns: 42vw; }
}

/* ------------------------------------------------------------------ every screen (2026-10-16, the mockup) */
/* A phone: the logo and one menu button; the links open under it. */
.navmenu { display: none; position: relative; margin-left: auto; }
.navmenu-button { list-style: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-raised); color: var(--fg); cursor: pointer; }
.navmenu-button::-webkit-details-marker { display: none; }
.navmenu-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.navmenu[open] .navmenu-button { background: var(--bg-card); border-color: var(--accent); }
.navmenu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; display: flex; flex-direction: column; padding: 6px; border-radius: 16px; background: var(--bg-raised); border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55); }
.navmenu-list a { min-height: 44px; display: flex; align-items: center; padding: 0 14px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.navmenu-list a:hover, .navmenu-list a:focus-visible { background: var(--bg-card); }
@media (max-width: 720px) {
  .topnav { display: none; }
  .navmenu { display: block; }
  .topbar { padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: 10px; }
}

/* "Xem tiếp": how far along, as a thin bar. */
.continue-bar { display: block; height: 4px; margin-top: 6px; border-radius: 2px; background: var(--line); overflow: hidden; }
.continue-fill { display: block; height: 100%; border-radius: 2px; background: var(--accent); }

/* The home page on a phone: the top row, then every film two to a row, then the rest. */
@media (max-width: 760px) {
  .home-panel:not([hidden]) { display: flex; flex-direction: column; }
  /* width: in a flex column, the shelves' auto side margins would size each to its content (the
     top row's every card side by side: 1002 px on a 393 px phone, measured). */
  .home-panel > * { order: 5; width: 100%; min-width: 0; }
  .home-panel > .shelf-top { order: 1; }
  .home-panel > .shelf-all { order: 2; }
  .home-panel > .shelf-latest { order: 3; }
  .home-panel > .spot { order: 4; }
  .spot-more { display: none; }
  .pc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .pc-row { grid-auto-columns: 38vw; }
  .pc-rank { font-size: 40px; }
}
@media (max-width: 560px) {
  .spot-reel { display: none; }
  .spot-body { padding-top: 12px; }
}

/* The listening tab: rows (cover, name, length, play). */
.lr-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 10px; }
.lr-link { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 16px; background: var(--bg-raised); border: 1px solid var(--line); transition: border-color 0.2s var(--ease), background 0.2s var(--ease); }
.lr-link:hover, .lr-link:focus-visible { border-color: rgb(var(--accent-rgb) / 0.55); background: var(--bg-card); }
.lr-art { flex: none; width: 76px; height: 76px; border-radius: 12px; object-fit: cover; object-position: center 25%; background: var(--bg-card); font-size: 28px; }
.lr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lr-title { font-weight: 700; font-size: 15px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lr-rank { color: var(--gold); font-style: italic; font-weight: 800; }
.lr-meta { color: var(--fg-muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lr-play { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #0d0b12; transition: transform 0.15s var(--ease); }
.lr-link:active .lr-play { transform: scale(0.92); }

/* The mini bar: the story this visitor was listening to, floating at the bottom of the home page. */
.mini { position: fixed; z-index: 6; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: #221b2e; border: 1px solid #352b45; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); color: var(--fg); }
.mini[hidden], .mini-art[hidden] { display: none; }
.mini:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mini-art { flex: none; width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.mini-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mini-title { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-meta { color: var(--fg-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-play { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--fg); color: var(--bg); }
.has-mini .footer { padding-bottom: 104px; }

/* The swipe feed: the player exactly 9:16 (no black bands inside it), as wide as the space allows. */
.slide-media { height: auto; max-width: none; width: min(100vw, calc((100dvh - var(--top) - var(--bottom)) * 9 / 16)); }
@media (max-width: 759px) {
  .feed-page { --top: 56px; --bottom: 68px; }
  .feed-top { gap: 8px; padding-left: 8px; padding-right: 8px; }
  .feed-top .feed-icon { width: 40px; height: 40px; }
  .feed-film, .feed-now { font-size: 13px; }
  .feed-sound { width: 40px; height: 40px; min-height: 40px; padding: 0; justify-content: center; border-radius: 50%; box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / 0.35); }
  .feed-sound-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .rail { min-width: 56px; gap: 2px; font-size: 10px; }
  .rail-icon { width: 40px; height: 36px; border-radius: 12px; }
}

/* The listening page: a phone gets the mockup (slim bar, square cover the screen's width, the player
   without a card around it); a wide screen puts the cover beside the player. */
.listen-bar { display: none; }
.player-note { display: flex; gap: 8px; align-items: center; justify-content: center; }
.listen-cover { object-position: center 30%; }
@media (max-width: 720px) {
  .page-listen .topbar { display: none; }
  .listen-bar { display: flex; align-items: center; gap: 10px; padding: max(12px, env(safe-area-inset-top)) 14px 4px; }
  .listen-back { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--bg-raised); border: 1px solid var(--line); }
  .listen-bar-label { flex: 1; min-width: 0; margin: 0; text-align: center; color: var(--fg-muted); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .listen-bar-end { flex: none; width: 44px; }
  .listen-hero { flex-direction: column; align-items: stretch; gap: 14px; padding: 8px 22px 0; }
  /* Square, the screen's width, but never so tall that the play button falls below the fold. */
  .listen-cover { width: min(100%, 44vh); width: min(100%, 44dvh); height: auto; align-self: center; aspect-ratio: 1 / 1; border-radius: 22px; }
  .listen-head .eyebrow { display: none; }
  .listen-head h1 { font-size: 21px; line-height: 1.25; }
  .player-card { margin: 4px 0 0; padding: 0 22px; gap: 8px; background: transparent; border: 0; border-radius: 0; }
  .player-controls { justify-content: space-between; padding: 0 6px; }
}
@media (min-width: 721px) {
  .listen-page { max-width: 1080px; }
  .listen-top { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 32px; align-items: start; padding: 28px var(--gutter) 0; }
  .listen-hero { flex-direction: column; align-items: stretch; gap: 16px; padding: 0; }
  .listen-cover { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: 22px; }
  .player-card { margin: 0; }
}
/* A button the script hides (e.g. "Phần tiếp" on the last part): its display must not win over hidden. */
.pill[hidden] { display: none; }

/* ------------------------------------------------------------------ home rows (2026-10-17) */
/* "Tập mới phát hành" and "Truyện mới cập nhật" as the top row's tall cards. */
.pc-episode .pc-art .poster { aspect-ratio: 2 / 3; object-position: center 30%; }
.pc-meta .countdown { gap: 4px; }
.pc-meta .countdown-label, .pc-meta .countdown-value { font-size: inherit; }
.pc-novel { display: flex; flex-direction: column; gap: 12px; }
.pc-novel .novel-art { aspect-ratio: 2 / 3; border-radius: 0; padding: 14px; justify-content: flex-end; }
.pc-novel .novel-art-title { font-size: clamp(15px, 2vw, 19px); -webkit-line-clamp: 5; }
.pc-novel .pc-title { margin: 0; overflow-wrap: anywhere; }
.pc-novel .btn { align-self: flex-start; margin-top: auto; }
.pc-novel [data-request] { background: rgb(var(--accent-rgb) / 0.12); border-color: rgb(var(--accent-rgb) / 0.55); color: #c9b8ff; }
.pc-novel [data-request]:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* /sap-chieu/: every film's next episode, the same cards in a grid. */
.coming-page { padding-bottom: 24px; }
.coming-page .pc-grid { margin-top: 18px; }
