/* ============================================================
   AMVCLIPS — styles
   Dark, minimal, cinematic. Single vermilion accent.
   Monospace for ALL technical metadata.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700;800&family=Hanken+Grotesk:wght@400;450;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

/* ---------------- tokens ---------------- */
:root {
  --font-display: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --r-sm: 7px;
  --r-md: 11px;
  --r-lg: 16px;
  --r-xl: 22px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: oklch(0.975 0.008 70);
  --bg-grain: oklch(0.955 0.01 68);
  --surface: oklch(0.995 0.004 80);
  --surface-2: oklch(0.97 0.008 72);
  --surface-sunk: oklch(0.945 0.01 70);
  --ink: oklch(0.24 0.022 52);
  --ink-soft: oklch(0.4 0.018 52);
  --muted: oklch(0.56 0.014 55);
  --faint: oklch(0.7 0.012 60);
  --line: oklch(0.89 0.01 65);
  --line-soft: oklch(0.93 0.008 68);
  --scrim: oklch(0.2 0.02 50 / 0.55);
  --accent: oklch(0.63 0.2 33);
  --accent-press: oklch(0.56 0.2 32);
  --accent-tint: oklch(0.63 0.2 33 / 0.12);
  --on-accent: oklch(0.99 0.01 60);
  --shadow-card: 0 1px 2px rgba(40, 22, 10, 0.05), 0 14px 34px -18px rgba(40, 22, 10, 0.28);
  --shadow-pop: 0 24px 60px -22px rgba(40, 22, 10, 0.4);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: oklch(0.165 0.011 265);
  --bg-grain: oklch(0.19 0.014 265);
  --surface: oklch(0.215 0.013 264);
  --surface-2: oklch(0.25 0.014 264);
  --surface-sunk: oklch(0.185 0.011 264);
  --ink: oklch(0.96 0.006 250);
  --ink-soft: oklch(0.82 0.01 250);
  --muted: oklch(0.64 0.012 255);
  --faint: oklch(0.46 0.012 258);
  --line: oklch(0.31 0.014 262);
  --line-soft: oklch(0.255 0.012 262);
  --scrim: oklch(0.08 0.02 265 / 0.74);
  --accent: oklch(0.7 0.18 38);
  --accent-press: oklch(0.64 0.18 37);
  --accent-tint: oklch(0.7 0.18 38 / 0.16);
  --on-accent: oklch(0.15 0.02 50);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.34), 0 18px 44px -22px rgba(0, 0, 0, 0.8);
  --shadow-pop: 0 30px 80px -26px rgba(0, 0, 0, 0.86);
}

/* ---------------- base ---------------- */
* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 100% 0%, var(--bg-grain), transparent 55%),
    radial-gradient(100% 70% at 0% 100%, var(--bg-grain), transparent 60%);
  opacity: 0.9;
}

button { font: inherit; cursor: pointer; color: inherit; background: none; border: 0; padding: 0; }
input { font: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--accent-tint); }

h1, h2, h3, h4, p { margin: 0; }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.display { font-family: var(--font-display); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

* { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; }

.no-sb { scrollbar-width: none; -ms-overflow-style: none; }
.no-sb::-webkit-scrollbar { display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------------- duotone cover (per-show hue via --h) ---------------- */
.cover {
  position: relative;
  overflow: hidden;
  background: var(--surface-sunk);
}
.cover-img {
  position: absolute;
  inset: 0;
  background-image: url("assets/scenes.png");
  background-repeat: no-repeat;
  background-size: 200% 300%;
  filter: saturate(0.5) contrast(1.05) brightness(0.82);
  transform: scale(1.02);
  transition: transform 0.5s var(--ease);
}
.cover-tint {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(150deg, oklch(0.55 0.16 var(--h) / 0.78), oklch(0.28 0.12 var(--h) / 0.5) 60%, oklch(0.16 0.05 var(--h) / 0.86)),
    linear-gradient(0deg, rgba(8, 9, 14, 0.9), transparent 58%);
}
.cover-shine {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, oklch(0.8 0.14 var(--h) / 0.28), transparent 55%);
}

/* real key art / extracted frames (fallback = duotone + scene sprite) */
.cover .cover-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cover.has-photo .cover-img { display: none; }
.cover.has-photo .cover-tint { opacity: 0.55; }

.poster-art .poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cr-thumb > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.clip:hover .cr-thumb > img { transform: scale(1.05); }
.modal-stage > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* scene crops (sprite: 2 cols x 3 rows) */
.scene {
  background-image: url("assets/scenes.png");
  background-repeat: no-repeat;
  background-size: 200% 300%;
  background-color: var(--surface-sunk);
}
.scene-hill       { background-position: 0% 0%; }
.scene-lantern    { background-position: 100% 0%; }
.scene-beam       { background-position: 0% 50%; }
.scene-crossing   { background-position: 100% 50%; }
.scene-study      { background-position: 0% 100%; }
.scene-lighthouse { background-position: 100% 100%; }

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(18px, 4vw, 52px);
  background: color-mix(in oklch, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}

.logo { display: flex; align-items: center; gap: 11px; }
.logo-tile {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent);
  display: grid;
  place-items: center;
  color: var(--on-accent);
  box-shadow: 0 6px 18px -6px var(--accent);
}
.logo-words { display: flex; flex-direction: column; line-height: 1; text-align: left; }
.logo-name { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.01em; color: var(--ink); }
.logo-name em { font-style: normal; color: var(--accent); }
.logo-sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.14em; margin-top: 3px; }

.search {
  margin-left: auto;
  flex: 1 1 460px;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 46px;
  padding: 0 16px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.search > svg { color: var(--muted); flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font-size: 15px; }
.search input::placeholder { color: var(--muted); }
.search-clear { color: var(--muted); padding: 2px; display: none; }
.search.has-value .search-clear { display: grid; }

.theme-btn {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  box-shadow: var(--shadow-card);
}

/* ============================================================
   SMALL BITS
   ============================================================ */
.chip {
  height: 34px;
  padding: 0 14px;
  border-radius: 99px;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  transition: all 0.16s var(--ease);
}
.chip.is-active {
  border-color: transparent;
  background: var(--accent);
  color: var(--on-accent);
}

.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--line-soft);
}
.meta-tag.tone-res { background: var(--surface-sunk); color: var(--ink-soft); }
.meta-tag.tone-accent { background: var(--accent-tint); color: var(--accent); border-color: transparent; }

.breadcrumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.breadcrumb > span { display: flex; align-items: center; gap: 8px; }
.breadcrumb button { color: var(--muted); font-weight: 600; transition: color 0.16s var(--ease); }
.breadcrumb button:hover { color: var(--accent); }
.breadcrumb .crumb-here { color: var(--ink); font-weight: 700; }
.breadcrumb svg { color: var(--faint); }

.stat { display: inline-flex; align-items: center; gap: 7px; }
.stat svg { color: var(--faint); flex: none; }
.stat span { color: var(--ink-soft); font-weight: 600; }

.empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  color: var(--muted);
  background: var(--surface-2);
  padding: 28px;
}
.empty-inner { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty-inner svg { color: var(--faint); }
.empty-inner span { font-size: 15.5px; }

/* ============================================================
   BROWSE — hero carousel
   ============================================================ */
.hero {
  position: relative;
  height: clamp(440px, 58vw, 600px);
  overflow: hidden;
  margin-bottom: 30px;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s var(--ease);
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide .cover { position: absolute; inset: 0; }
.hero-slide .cover-img { transition: transform 7s linear; }
.hero-slide.is-active .cover-img { transform: scale(1.06); }

.hero-fade-x { position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 2%, color-mix(in oklch, var(--bg) 80%, transparent) 34%, transparent 70%); }
.hero-fade-y { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 1%, transparent 42%); }

.hero-inner {
  position: relative;
  height: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-content {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateY(12px);
  transition: transform 0.8s var(--ease);
}
.hero-slide.is-active .hero-content { transform: translateY(0); }

.hero-eyebrow { display: flex; align-items: center; gap: 10px; }
.hero-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.hero-meta { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-soft); }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 68px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.hero-genres { display: flex; flex-wrap: wrap; gap: 7px; }
.hero-genres span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-soft);
  padding: 4px 10px;
  border-radius: 99px;
  background: color-mix(in oklch, var(--surface) 55%, transparent);
  border: 1px solid var(--line-soft);
  backdrop-filter: blur(6px);
}

.hero-synopsis { color: var(--ink-soft); font-size: clamp(14px, 1.5vw, 17px); line-height: 1.55; max-width: 500px; }

.hero-stats { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.btn-primary {
  height: 48px;
  padding: 0 24px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 12px 30px -12px var(--accent);
  transition: background 0.16s var(--ease);
}
.btn-primary:hover { background: var(--accent-press); }
.btn-ghost {
  height: 48px;
  padding: 0 20px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in oklch, var(--surface) 55%, transparent);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  backdrop-filter: blur(6px);
}

.hero-dots { position: absolute; bottom: 22px; left: 40px; display: flex; gap: 8px; z-index: 5; }
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: color-mix(in oklch, var(--ink) 35%, transparent);
  transition: all 0.3s var(--ease);
}
.hero-dot.is-active { width: 26px; background: var(--accent); }

/* ============================================================
   BROWSE — genre chips + rails
   ============================================================ */
.browse { padding-bottom: 96px; }
.browse-chips { padding: 0 40px; margin-bottom: 26px; }
.genre-chips { display: flex; gap: 9px; overflow-x: auto; padding-bottom: 4px; }

.rail { margin-bottom: 34px; position: relative; }
.rail-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; padding: 0 40px; }
.rail-head h2 { font-family: var(--font-display); font-size: clamp(18px, 2.1vw, 23px); font-weight: 700; letter-spacing: -0.02em; }
.rail-head .rail-sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }

.rail-body { position: relative; }
.rail-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 4px 40px 6px;
  scroll-padding-left: 40px;
}

.rail-arrow {
  position: absolute;
  top: 0;
  bottom: 6px;
  z-index: 4;
  width: 56px;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease);
  color: var(--ink);
}
.rail-arrow.is-visible { opacity: 1; pointer-events: auto; }
.rail-arrow.is-left { left: 0; background: linear-gradient(90deg, var(--bg) 10%, transparent); }
.rail-arrow.is-right { right: 0; background: linear-gradient(270deg, var(--bg) 10%, transparent); }
.rail-arrow span {
  width: 38px;
  height: 38px;
  border-radius: 99px;
  background: color-mix(in oklch, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}

/* ============================================================
   POSTER CARD (rails + grid)
   ============================================================ */
.poster {
  flex: none;
  width: 178px;
  scroll-snap-align: start;
  text-align: left;
  transition: transform 0.26s var(--ease);
}
.poster:hover { transform: translateY(-6px); }

.poster-art {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  /* duotone fill — per-show hue via --ph */
  background:
    radial-gradient(120% 75% at 78% 8%, oklch(0.62 0.17 var(--ph) / 0.55), transparent 60%),
    linear-gradient(165deg, oklch(0.46 0.16 var(--ph)) 0%, oklch(0.26 0.1 var(--ph)) 52%, oklch(0.16 0.05 var(--ph)) 100%);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.7);
  transition: box-shadow 0.26s var(--ease);
}
.poster:hover .poster-art {
  box-shadow: 0 26px 50px -20px rgba(0, 0, 0, 0.8), 0 0 0 1.5px color-mix(in oklch, var(--accent) 60%, transparent);
}

.poster-texture { position: absolute; inset: 0; opacity: 0.16; mix-blend-mode: overlay; filter: saturate(0.6); }
.poster-scrim { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(8, 9, 14, 0.82) 6%, transparent 46%); }

.poster-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; }
.poster-res {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #fff;
  background: rgba(8, 9, 14, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 3px 7px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}
.poster-year {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(8, 9, 14, 0.42);
  padding: 3px 7px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
}

.poster-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 50px;
  height: 50px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--on-accent);
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.7);
  transition: all 0.24s var(--ease);
  box-shadow: 0 10px 26px -8px var(--accent);
}
.poster:hover .poster-play { opacity: 1; transform: scale(1); }

.poster-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.poster-title {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 15.5px;
  line-height: 1.16;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.poster-info {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.26s var(--ease), opacity 0.2s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.poster:hover .poster-info { max-height: 46px; opacity: 1; }
.poster-info .pi-genres {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.74);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.poster-info .pi-clips {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* search results grid */
.results { max-width: 1480px; margin: 0 auto; padding: 26px 40px 110px; }
.results-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.results-head h2 { font-family: var(--font-display); font-size: clamp(22px, 2.6vw, 30px); font-weight: 750; letter-spacing: -0.02em; }
.results-head .results-count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.results .genre-chips { margin-bottom: 22px; }

.poster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 18px;
}
.poster-grid .poster { width: 100%; }

/* ============================================================
   PAGE WRAP + SHOW DETAIL
   ============================================================ */
.page-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px clamp(16px, 4vw, 56px) 110px;
}

.crumb-row { margin-bottom: 18px; }

.show-banner {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  min-height: 300px;
  margin-bottom: 26px;
}
.show-banner .cover { position: absolute; inset: 0; }
.show-banner-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, color-mix(in oklch, var(--bg) 92%, transparent) 4%, transparent 70%);
}
.show-banner-badges { position: absolute; left: 18px; top: 18px; display: flex; gap: 8px; }

.cover-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(10, 11, 16, 0.62);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.cover-badge.is-solid { background: var(--accent); color: var(--on-accent); border-color: transparent; }

.show-banner-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: clamp(20px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.show-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 50px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  max-width: 760px;
}
.show-stats { display: flex; gap: 14px; flex-wrap: wrap; color: var(--ink-soft); font-size: 13.5px; }

.show-about { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 34px; }
.show-synopsis { flex: 1 1 420px; color: var(--ink-soft); font-size: 16.5px; line-height: 1.6; max-width: 720px; }
.show-genres { display: flex; flex-wrap: wrap; gap: 8px; }
.show-genres span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 6px 11px;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-weight: 600;
}

.episodes-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.episodes-head h2 { font-family: var(--font-display); font-size: 22px; font-weight: 750; }
.season-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.season-tab {
  height: 36px;
  padding: 0 16px;
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 650;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  transition: all 0.16s var(--ease);
}
.season-tab.is-active { border-color: transparent; background: var(--accent); color: var(--on-accent); }
.episodes-count { margin-left: auto; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }

.episode-list { display: flex; flex-direction: column; gap: 8px; }

.episode-row {
  text-align: left;
  width: 100%;
  display: grid;
  grid-template-columns: auto 72px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 11px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--surface-2);
  transition: all 0.16s var(--ease);
}
.episode-row:hover {
  background: var(--surface);
  box-shadow: var(--shadow-card);
  border-color: color-mix(in oklch, var(--accent) 40%, var(--line));
}
.episode-num { font-family: var(--font-mono); font-size: 13px; color: var(--muted); font-weight: 600; width: 26px; }
.episode-row .cover { width: 72px; height: 42px; border-radius: 7px; }
.episode-row .cover-img { filter: saturate(0.5) brightness(0.85); }
.episode-main { min-width: 0; }
.episode-title { font-weight: 650; font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.episode-runtime { font-family: var(--font-mono); font-size: 11px; color: var(--muted); margin-top: 3px; }
.episode-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  transition: color 0.16s var(--ease);
}
.episode-go svg { transition: transform 0.16s var(--ease); }
.episode-row:hover .episode-go { color: var(--accent); }
.episode-row:hover .episode-go svg { transform: translateX(2px); }

/* ============================================================
   CLIPS VIEW
   ============================================================ */
.clips-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.clips-head-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.clips-eyebrow { font-family: var(--font-mono); font-size: 12px; color: var(--accent); letter-spacing: 0.08em; font-weight: 600; }
.clips-title { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 40px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.clips-title .ep-num { color: var(--muted); }
.clips-stats { display: flex; gap: 16px; color: var(--muted); font-size: 13.5px; flex-wrap: wrap; }

.clips-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.audio-filter {
  height: 36px;
  padding: 0 14px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.16s var(--ease);
}
.audio-filter.is-active { border-color: transparent; background: var(--accent-tint); color: var(--accent); }
.clips-count { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); }

.layout-seg {
  margin-left: auto;
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 99px;
  background: var(--surface-sunk);
  border: 1px solid var(--line-soft);
}
.layout-seg button {
  height: 32px;
  padding: 0 13px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
  transition: all 0.14s var(--ease);
}
.layout-seg button.is-active { background: var(--surface); box-shadow: var(--shadow-card); color: var(--ink); }

.clip-list { display: flex; flex-direction: column; gap: 12px; }
.clip-list.is-compact { gap: 7px; }
.clip-list.is-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(332px, 1fr));
  gap: 16px;
  align-items: start;
}

/* ---------------- clip row shell ---------------- */
.clip {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition: box-shadow 0.18s var(--ease), border-color 0.18s var(--ease);
}
.clip:hover { box-shadow: var(--shadow-card); }
.clip.is-open {
  border-color: color-mix(in oklch, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow-pop);
}

.cr-thumb {
  position: relative;
  flex: none;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  padding: 0;
}
.cr-thumb .scene { position: absolute; inset: 0; transition: transform 0.4s var(--ease); }
.clip:hover .cr-thumb .scene { transform: scale(1.05); }
.cr-thumb-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(15, 9, 4, 0.6)); }
.cr-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 36px;
  height: 36px;
  border-radius: 99px;
  background: rgba(20, 12, 6, 0.5);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  color: #fff;
  opacity: 0.86;
  transform: scale(0.92);
  transition: all 0.2s var(--ease);
}
.clip:hover .cr-play { opacity: 1; transform: scale(1); }
.cr-dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(15, 9, 4, 0.66);
  padding: 2px 7px;
  border-radius: 5px;
}
.cr-clipno {
  position: absolute;
  left: 10px;
  top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--on-accent);
  background: var(--accent);
  padding: 3px 8px;
  border-radius: 6px;
}

/* full-bleed 16:9 thumb (gallery cards) */
.cr-thumb.is-full { width: 100%; aspect-ratio: 16 / 9; border-radius: 0; }
.cr-thumb.is-full .cr-play { width: 54px; height: 54px; }
.cr-thumb.is-full .cr-dur { font-size: 12px; }

.time-range {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 600;
}
.time-range .tr-line { width: 14px; height: 1.5px; background: var(--accent); border-radius: 2px; }
.time-range.is-big { font-size: 13px; }
.time-range.is-big .tr-line { width: 18px; }

.cr-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.cr-divider { width: 1px; height: 13px; background: var(--line); }
.cr-metaline { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.cr-dl {
  height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  flex: none;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.16s var(--ease);
}
.clip.is-open .cr-dl { border-color: transparent; background: var(--accent); color: var(--on-accent); }
.cr-dl.is-small { height: 36px; padding: 0 14px; }

/* gallery card body */
.cr-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.cr-card-title {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: 19px;
  color: var(--ink);
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cr-card-dl {
  height: 44px;
  width: 100%;
  border-radius: 11px;
  margin-top: 2px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: all 0.16s var(--ease);
}
.clip.is-open .cr-card-dl { border-color: transparent; background: var(--accent); color: var(--on-accent); }

/* list row */
.cr-row { display: flex; gap: 16px; padding: 13px; align-items: center; }
.cr-index { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent); font-weight: 600; width: 22px; flex: none; }
.cr-list .cr-thumb { width: 132px; height: 76px; }
.cr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cr-list-title { font-family: var(--font-display); font-weight: 700; font-size: 16.5px; color: var(--ink); }

/* compact row */
.cr-compact {
  display: grid;
  grid-template-columns: auto 84px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 9px 12px;
}
.cr-compact .cr-thumb { width: 84px; height: 48px; }
.cr-cmp-title { font-weight: 600; font-size: 14.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-cmp-meta { display: flex; align-items: center; gap: 12px; }
.cr-cmp-res { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* ---------------- download tray ---------------- */
.clip-tray {
  display: grid;
  gap: 18px;
  padding: 18px 18px 20px;
  margin-top: 2px;
  border-top: 1px dashed var(--line);
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}
.clip-tray.is-stacked { grid-template-columns: 1fr; gap: 14px; padding: 16px 16px 18px; }

.tray-field { display: flex; flex-direction: column; gap: 8px; }
.tray-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 600;
}

.seg {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface-sunk);
  border: 1px solid var(--line-soft);
  width: max-content;
}
.seg button {
  height: 30px;
  padding: 0 12px;
  border-radius: 7px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  transition: all 0.14s var(--ease);
}
.seg button.is-active { background: var(--accent); color: var(--on-accent); }
.seg button:disabled { color: var(--faint); opacity: 0.45; cursor: not-allowed; }

.audio-toggle {
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  background: var(--surface-sunk);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  width: max-content;
}
.audio-toggle:disabled { color: var(--faint); opacity: 0.6; cursor: not-allowed; }

.tray-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.tray-summary { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12.5px; }
.tray-summary .dot { color: var(--faint); }
.tray-download {
  height: 44px;
  padding: 0 22px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 10px 24px -10px var(--accent);
  transition: background 0.16s var(--ease);
}
.tray-download:hover { background: var(--accent-press); }

/* ============================================================
   PREVIEW MODAL
   ============================================================ */
.modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--scrim);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fadeIn 0.2s var(--ease);
}
.modal {
  width: min(760px, 96vw);
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
}
.modal-stage { position: relative; aspect-ratio: 16 / 9; }
.modal-stage .scene { position: absolute; inset: 0; }
.modal-stage-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 9, 4, 0.12), rgba(15, 9, 4, 0.62)); }
.modal-stage .modal-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.modal-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 38px;
  height: 38px;
  border-radius: 99px;
  background: rgba(20, 12, 6, 0.5);
  backdrop-filter: blur(4px);
  color: #fff;
  display: grid;
  place-items: center;
}
.modal-playpause {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 64px;
  height: 64px;
  border-radius: 99px;
  background: rgba(20, 12, 6, 0.46);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: grid;
  place-items: center;
}
.modal-clipno {
  position: absolute;
  left: 16px;
  top: 14px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(20, 12, 6, 0.5);
  padding: 4px 9px;
  border-radius: 7px;
}
.modal-scrub {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.modal-scrub .t-cur { font-family: var(--font-mono); color: #fff; font-size: 12px; }
.modal-scrub .t-end { font-family: var(--font-mono); color: rgba(255, 255, 255, 0.7); font-size: 12px; }
.scrub-track { flex: 1; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.28); position: relative; }
.scrub-fill { position: absolute; inset: 0; width: 0%; background: var(--accent); border-radius: 99px; }
.scrub-knob {
  position: absolute;
  left: 0%;
  top: 50%;
  width: 13px;
  height: 13px;
  border-radius: 99px;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.modal-foot {
  padding: 18px 22px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}
.modal-foot-main { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.modal-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.modal-dl {
  height: 46px;
  padding: 0 22px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 10px 24px -10px var(--accent);
}

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 90;
  transform: translateX(-50%) translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-pop);
  max-width: 92vw;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 99px;
  background: var(--accent);
  color: var(--on-accent);
  flex: none;
}
.toast-msg { font-size: 14px; font-weight: 600; }
.toast-sub { font-family: var(--font-mono); font-size: 12px; opacity: 0.7; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 760px) {
  .show-about { flex-direction: column; align-items: flex-start; }
  .episode-row { grid-template-columns: auto 72px 1fr auto; }
  .episode-row .meta-tag.tone-res, .episode-row .episode-go { display: none; }
}

@media (max-width: 620px) {
  .clip-tray { grid-template-columns: 1fr; }
  .cr-row { flex-wrap: wrap; }
  .cr-list .cr-thumb { width: 116px; height: 66px; }
  .cr-row .cr-dl { width: 100%; justify-content: center; order: 9; }
}

@media (max-width: 480px) {
  .cr-list .cr-thumb { width: 92px; height: 54px; }
  .cr-compact { grid-template-columns: auto 64px 1fr auto; }
  .cr-cmp-meta { display: none; }
  .cr-compact .cr-thumb { width: 64px; height: 38px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .hero-slide.is-active .cover-img { transform: none; }
  .poster:hover { transform: none; }
}
