@import url("fonts.css");

:root {
  --bg: #07080b;
  --panel: #10131a;
  --panel-deep: #090b0f;
  --card: #151820;
  --text: #f5f5f2;
  --soft: #cdd0d6;
  --muted: #afb3bb;
  --dim: #8d939e;
  --accent: #e84335;
  --line: rgba(255, 255, 255, .09);
  --line-soft: rgba(255, 255, 255, .05);
  --gutter: 3vw;
  --inset: 5.3vw;
  --bar: 78px;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --display: 'Archivo Black', 'Arial Black', Impact, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.2 Archivo, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, p { margin: 0; }
img { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
main { flex: 1; }

.ic { width: 12px; height: 12px; flex: none; }
.ic.lg { width: 20px; height: 20px; }

.skip {
  position: absolute; left: 16px; top: -56px; z-index: 50;
  padding: 10px 14px; border-radius: 8px; background: var(--text); color: #111;
  transition: top .18s var(--ease);
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  height: 47px; padding: 0 20px;
  border: 1px solid transparent; border-radius: 9px;
  background: var(--text); color: #101115;
  font-size: 14px; font-weight: 700; white-space: nowrap;
  transition: transform .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
}
.btn:hover { background: #fff; }
.btn:active { transform: scale(.97); }
.btn.ghost {
  background: rgba(18, 20, 26, .72); color: #eef0f2;
  border-color: rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
}
.btn.ghost:hover { background: rgba(255, 255, 255, .12); }
.btn > .ic:not(.lg) { margin-right: -4px; }
.btn.small { height: 40px; padding: 0 16px; font-size: 13px; gap: 8px; }

.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid transparent; border-radius: 9px; color: #d7d9df;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, .08); border-color: var(--line); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }

/* ---------- Top bar ---------- */

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  height: var(--bar); padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(rgba(0, 0, 0, .72), rgba(0, 0, 0, 0));
  border-bottom: 1px solid transparent; background-clip: padding-box;
  transition: background .2s var(--ease), backdrop-filter .2s var(--ease), border-color .2s var(--ease);
}
.topbar.stuck {
  background: rgba(7, 8, 11, .88);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom-color: var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 9px; margin-right: auto; }
.brand-mark { width: 27px; height: 27px; flex: none; }
.brand span { font-family: var(--display); font-size: 19px; letter-spacing: -.7px; }

.topbar nav { display: flex; align-items: center; gap: 17px; }
.topbar nav > a, #browse-toggle {
  position: relative; padding: 29px 0;
  font-size: 14px; font-weight: 700; line-height: 1; color: #c6c9ce;
  transition: color .16s var(--ease);
}
.topbar nav > a:hover, #browse-toggle:hover, .topbar nav > a.active, #browse-toggle.active, #browse-toggle[aria-expanded="true"] { color: var(--text); }
.topbar nav > a.active::after, #browse-toggle.active::after, #browse-toggle[aria-expanded="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 19px; height: 2px; background: var(--accent);
}
#browse-toggle svg { width: 9px; height: 9px; margin-left: 5px; fill: #aeb3bd; }

.tools { display: flex; align-items: center; gap: 5px; margin-left: 1px; }
select { cursor: pointer; }
.pill {
  height: 30px; max-width: 150px; padding: 0 26px 0 12px;
  border: 0; border-radius: 8px;
  font-size: 12px; font-weight: 700; color: #d7d9df;
  -webkit-appearance: none; appearance: none; text-overflow: ellipsis;
  background: rgba(255, 255, 255, .08) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.500 3h7L5 8z' fill='%23aeb3bd'/%3E%3C/svg%3E") right 10px center / 8px no-repeat;
  transition: background-color .16s var(--ease);
}
.pill:hover { background-color: rgba(255, 255, 255, .14); }
select option { background: var(--panel); color: var(--text); }

.menu { position: relative; }
.menu-panel {
  position: absolute; top: 63px; right: -45px; width: 406px; padding: 16px;
  background: var(--panel); border: 1px solid rgba(255, 255, 255, .17); border-radius: 16px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .68);
  animation: pop .16s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-6px); } }
.menu-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 1px 2px 12px; border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.menu-head strong { font-size: 16px; font-weight: 900; color: #c6c9ce; }
.menu-head span { font-size: 11px; font-weight: 700; color: #aeb3bd; }
.menu-label { margin: 14px 2px 8px; font-size: 10px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; color: #c4c8d0; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile {
  display: block; min-height: 74px; padding: 10px;
  background: #0a0c11; border: 1px solid rgba(255, 255, 255, .14); border-radius: 7px;
  transition: background .16s var(--ease), border-color .16s var(--ease);
}
.tile.tall { min-height: 84px; }
.tile:hover { background: #141821; border-color: rgba(255, 255, 255, .3); }
.tile strong { display: block; font-size: 14px; font-weight: 900; color: #d9dce2; }
.tile small { display: block; margin-top: 3px; font-size: 11px; line-height: 1.35; font-weight: 700; color: #a7acb6; }
.menu-row {
  display: flex; align-items: center; gap: 8px; height: 54px; margin-top: 12px; padding: 0 11px;
  background: var(--panel-deep); border: 1px solid rgba(255, 255, 255, .14); border-radius: 10px;
}
.menu-row-icon { width: 27px; height: 27px; display: grid; place-items: center; background: var(--card); border: 1px solid rgba(255, 255, 255, .13); border-radius: 8px; }
.menu-row-icon svg { width: 15px; height: 15px; fill: none; stroke: #e1e5eb; stroke-width: 1.2; }
.menu-row-text { margin-right: auto; font-size: 13px; font-weight: 700; color: #dce0e6; white-space: nowrap; }
.menu-row select { min-width: 0; max-width: 170px; height: 30px; padding: 0 8px; background: var(--card); border: 1px solid rgba(255, 255, 255, .13); border-radius: 8px; font-size: 12px; font-weight: 700; }

/* ---------- Hero ---------- */

.hero { position: relative; height: 730px; overflow: hidden; background: var(--bg); }
.hero-track { display: flex; height: 100%; transition: transform .6s var(--ease); }
.slide { position: relative; flex: 0 0 100%; height: 100%; background-size: cover; background-position: 50% 0; }
.slide::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 11, .98) 0%, rgba(7, 8, 11, .85) 24%, rgba(7, 8, 11, .2) 61%, rgba(7, 8, 11, .12)),
    linear-gradient(0deg, var(--bg) 0%, rgba(0, 0, 0, 0) 25%);
}
.hero-copy { position: absolute; left: var(--inset); bottom: 99px; width: min(550px, calc(100% - var(--inset) * 2)); }
.kicker { margin-bottom: 12px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hero-copy h1 {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: min(80px, 5.6vw); line-height: .94; letter-spacing: -2.5px;
  overflow-wrap: break-word;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.facts { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; color: #c3c6cd; }
.facts span + span::before { content: "·"; margin-right: 8px; color: #7d828d; }
.facts .rating { display: inline-flex; align-items: center; gap: 4px; color: #f19587; }
.hero-copy .overview {
  max-width: 510px; margin-top: 17px; font-size: 14px; line-height: 1.6; color: var(--soft);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden;
}
.hero-actions { display: flex; gap: 14px; margin-top: 23px; }

.hero-nav {
  position: absolute; bottom: 26px; width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%;
  background: rgba(9, 10, 14, .68); color: #fff; opacity: 0;
  transition: opacity .18s var(--ease), background .18s var(--ease);
}
.hero-nav .ic { width: 9px; height: 15px; }
.hero-nav.prev { left: var(--inset); }
.hero-nav.next { right: var(--inset); }
.hero:hover .hero-nav, .hero-nav:focus-visible { opacity: 1; }
.hero-nav:hover { background: rgba(40, 43, 52, .9); }

.dots { position: absolute; left: 50%; bottom: 27px; transform: translateX(-50%); display: flex; gap: 8px; }
.dots button {
  width: 7px; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .42);
  transition: width .18s var(--ease), background .18s var(--ease);
}
.dots button[aria-current="true"] { width: 28px; background: #fff; }

/* ---------- Rows ---------- */

.rows { position: relative; margin-top: -24px; padding-bottom: 22px; }
.rows.flat { margin-top: 0; }
.row { padding: 0 var(--gutter); margin-bottom: 50px; }
.row-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; margin-bottom: 12px; }
.row h2, .sec-title {
  display: flex; align-items: center; min-width: 0;
  font-size: 23px; font-weight: 700; letter-spacing: -.45px; line-height: 1.1; white-space: nowrap;
}
.row h2::before, .sec-title::before { content: ""; flex: none; width: 3px; height: 20px; margin-right: 10px; background: var(--accent); }
.see-all { font-size: 12px; color: var(--muted); transition: color .16s var(--ease); }
.see-all:hover { color: var(--text); }

.rail-wrap { position: relative; }
.rail {
  display: flex; gap: 12px; padding: 4px 1px 16px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  transition: opacity .18s var(--ease);
}
.rail::-webkit-scrollbar { display: none; }
.rail.loading, .results.loading { opacity: .45; }
.rail > .card { flex: 0 0 max(138px, 12vw); scroll-snap-align: start; }
.rail-empty { height: 120px; display: grid; place-items: center start; color: var(--dim); font-size: 14px; }
.rail-nav {
  position: absolute; top: calc(50% - 40px); z-index: 2; width: 42px; height: 68px; display: grid; place-items: center;
  background: rgba(6, 7, 9, .74); color: #fff; border: 1px solid var(--line); opacity: 0;
  transition: opacity .18s var(--ease), background .18s var(--ease);
}
.rail-nav .ic { width: 11px; height: 19px; }
.rail-nav.prev { left: 0; border-radius: 0 8px 8px 0; }
.rail-nav.next { right: 0; border-radius: 8px 0 0 8px; }
.rail-wrap:hover .rail-nav, .rail-nav:focus-visible { opacity: 1; }
.rail-nav:hover { background: rgba(30, 33, 41, .92); }

/* ---------- Poster card ---------- */

.card {
  position: relative; display: block; width: 100%; aspect-ratio: 2 / 3; overflow: hidden;
  border-radius: 11px; background-color: var(--card); background-size: cover;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .24); text-align: left;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .24s var(--ease); }
.card .shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .9), rgba(0, 0, 0, 0) 47%); }
.card .cap { position: absolute; left: 10px; right: 9px; bottom: 9px; }
.card strong { display: block; font-size: 12px; line-height: 1.3; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card small { display: block; margin-top: 3px; font-size: 11px; color: #bfc2c9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .rank {
  position: absolute; top: 7px; left: 7px; z-index: 1; padding: 5px 7px; border-radius: 6px;
  background: rgba(204, 34, 25, .94); color: #fff;
  font-size: 10px; line-height: 1.05; font-weight: 800; letter-spacing: .5px;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-6px); box-shadow: 0 19px 30px rgba(0, 0, 0, .5); }
  .card:hover img { transform: scale(1.027); }
}
.card:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
.ghost-card { box-shadow: none; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .5; } }

/* ---------- Tabs ---------- */

.tabs { display: flex; gap: 24px; flex: none; }
.tabs button, .tabs a {
  position: relative; padding: 8px 0 10px; font-size: 14px; font-weight: 700; color: var(--dim); white-space: nowrap;
  transition: color .16s var(--ease);
}
.tabs button:hover, .tabs a:hover { color: #d5d8de; }
.tabs [aria-selected="true"], .tabs [aria-pressed="true"], .tabs [aria-current="true"] { color: #f3f4f5; }
.tabs [aria-selected="true"]::after, .tabs [aria-pressed="true"]::after, .tabs [aria-current="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent);
}
.tabs.small { gap: 17px; padding: 2px 0; }
.tabs.small button, .tabs.small a { padding: 5px 0; font-size: 13px; }
.tabs.genres { gap: 15px; flex-wrap: wrap; padding: 11px 0 2px; border-top: 1px solid var(--line-soft); }
.tabs.genres button { padding: 5px 0; font-size: 12px; font-weight: 600; }

.picker { position: relative; margin-left: 12px; }
.row h2:has(.picker)::before { margin-right: 0; }
.picker-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 5px 0; font: inherit; letter-spacing: 0; color: #f0f1f2; border-bottom: 2px solid var(--accent); }
.picker-toggle .caret { width: 8px; height: 8px; color: var(--accent); }
.picker-list {
  position: absolute; top: calc(100% + 8px); left: -8px; z-index: 5; width: 230px; max-height: 320px; overflow-y: auto; padding: 6px;
  background: var(--panel); border: 1px solid rgba(255, 255, 255, .17); border-radius: 12px; box-shadow: 0 26px 70px rgba(0, 0, 0, .68);
}
.picker-list button { display: block; width: 100%; padding: 10px 7px; border-radius: 7px; text-align: left; font-size: 13px; font-weight: 600; letter-spacing: 0; color: #e7e9ed; }
.picker-list button:hover { background: rgba(255, 255, 255, .07); }
.picker-list [aria-selected="true"] { color: var(--accent); }

/* ---------- Catalogue pages ---------- */

.page { padding: 122px 5vw 50px; }
.page h1 {
  font-family: var(--display); font-weight: 400; font-size: 58px; line-height: 1; letter-spacing: -1.6px;
  text-transform: uppercase; overflow-wrap: break-word; margin-bottom: 26px;
}
.page .kicker + h1 { margin-bottom: 0; }
.lede { max-width: 500px; margin: 14px 0 28px; font-size: 14px; line-height: 1.55; color: #aeb3bc; }
.filters { display: grid; gap: 14px; margin-bottom: 25px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.results { transition: opacity .18s var(--ease); min-height: 240px; }
.blank { padding: 50px 0; }
.blank h2 { font-size: 20px; font-weight: 700; }
.blank p { margin: 8px 0 16px; color: #aeb3bc; }
.error { color: #f19587; }

/* ---------- Footer ---------- */

.foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 28px var(--gutter); border-top: 1px solid var(--line-soft);
  font-size: 11px; color: #8f949e;
}
.foot .brand-mark { width: 17px; height: 17px; }
.foot strong { margin-right: 10px; color: #e8e9eb; }

/* ---------- Search dialog ---------- */

dialog { color: var(--text); }
dialog.search {
  width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 120px); margin-top: 105px; padding: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .62); overflow: hidden;
}
dialog.search[open] { display: flex; animation: pop .18s var(--ease); }
dialog.search::backdrop { background: rgba(3, 4, 6, .66); -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px); }
.search-box { display: flex; flex-direction: column; width: 100%; min-height: 0; padding: 18px; }
.search-head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; font-weight: 700; }
.search-row { display: flex; gap: 10px; margin: 17px 0; }
.search-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; height: 43px; padding: 0 12px;
  background: var(--panel-deep); border: 1px solid var(--line); border-radius: 9px;
  transition: border-color .16s var(--ease);
}
.search-field:focus-within { border-color: rgba(255, 255, 255, .22); }
.search-field svg { width: 16px; height: 16px; flex: none; fill: none; stroke: #9ca2ac; stroke-width: 1.9; stroke-linecap: round; }
.search-field input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; font-size: 15px; }
.search-field input::-webkit-search-cancel-button {
  -webkit-appearance: none; width: 14px; height: 14px; cursor: pointer; background: #d7d9df;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 3l8 8M11 3l-8 8' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.search-field input::placeholder { color: #7f858f; }
.search-row select { height: 43px; padding: 0 10px; background: var(--panel-deep); border: 1px solid var(--line); border-radius: 9px; font-size: 12px; font-weight: 600; }
.search-results { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; scrollbar-width: thin; scrollbar-color: #2a2f3a transparent; }
.search-hint { padding: 22px 8px 26px; font-size: 13px; color: #9aa0a9; }
.hit { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border-radius: 9px; text-align: left; transition: background .14s var(--ease); }
.hit:hover, .hit:focus-visible { background: rgba(255, 255, 255, .06); }
.hit-art { position: relative; flex: none; width: 43px; height: 62px; overflow: hidden; border-radius: 5px; background-color: #222733; }
.hit-art img { width: 100%; height: 100%; object-fit: cover; }
.hit strong { display: block; font-size: 13px; font-weight: 700; }
.hit small { display: block; margin-top: 3px; font-size: 11px; color: #9aa0a9; }

/* ---------- Title dialog ---------- */

dialog:not(.search) {
  position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; background: var(--bg); overflow-x: hidden; overflow-y: auto;
}
dialog:not(.search)[open] { animation: rise .24s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
dialog:not(.search)::backdrop { background: var(--bg); }

.player { position: absolute; inset: 0 0 auto 0; height: 720px; background-color: #0c0e13; }
.player:empty::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7, 8, 11, .86) 0%, rgba(7, 8, 11, .7) 36%, rgba(7, 8, 11, .16) 77%, rgba(7, 8, 11, .1)),
    linear-gradient(0deg, var(--bg) 0%, rgba(0, 0, 0, 0) 37%);
}
.player:not(:empty) {
  position: relative; height: auto; width: 100%; aspect-ratio: 16 / 9; max-height: 76vh;
  display: grid; place-items: center; background: #000 !important;
}
.player:has(.notice) { aspect-ratio: auto; padding: 120px 0 70px; }
.player video { width: 100%; height: 100%; background: #000; }
.player .notice {
  max-width: 520px; margin: 0 24px; padding: 18px 20px; text-align: center; font-size: 14px; line-height: 1.55; color: var(--soft);
  background: var(--panel); border: 1px solid var(--line); border-radius: 13px;
}

.dialog-body { position: relative; min-height: 100dvh; padding: 160px 6vw 60px; }
.player:not(:empty) + .dialog-body { min-height: 0; padding-top: 30px; }
.dlg-top { display: flex; flex-direction: column; align-items: flex-start; min-height: 560px; }
.player:not(:empty) + .dialog-body .dlg-top { min-height: 0; }
.dlg-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 32px; font-size: 12px; color: #c3c6cc; transition: color .16s var(--ease); }
.dlg-back:hover { color: #fff; }
.player:not(:empty) + .dialog-body .dlg-back { margin-bottom: 20px; }
.dialog-body h2:not(.row h2) {
  max-width: 760px; font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(34px, 5vw, 68px); line-height: .96; letter-spacing: -2px; overflow-wrap: break-word;
}
.dialog-body .meta { max-width: 660px; margin-top: 18px; font-size: 13px; line-height: 1.5; color: #c3c6cd; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 23px; }
.dialog-actions .btn { height: 40px; padding: 0 16px; font-size: 13px; gap: 8px; }
.dlg-top .dialog-actions [data-action="close-detail"] { display: none; }
.dialog-body .overview { max-width: 577px; margin-top: 20px; font-size: 14px; line-height: 1.65; color: #d4d6da; }
.dialog-body > p { color: var(--soft); }

.sec-title { margin-top: 10px; }
.player:not(:empty) + .dialog-body .sec-title { margin-top: 48px; }
.eps-tabs { display: flex; gap: 20px; width: 100%; margin: 10px 0 12px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line-soft); }
.eps-tabs::-webkit-scrollbar { display: none; }
.eps-tabs button { position: relative; flex: none; padding: 8px 0 10px; font-size: 13px; font-weight: 700; color: var(--dim); transition: color .16s var(--ease); }
.eps-tabs button:hover { color: #d5d8de; }
.eps-tabs [aria-selected="true"] { color: #f3f4f5; }
.eps-tabs [aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); }
.eps { list-style: none; width: 100%; margin: 0; padding: 0; display: grid; gap: 8px; }
.eps button {
  display: flex; gap: 15px; width: 100%; padding: 10px; text-align: left;
  background: #0c0e13; border: 1px solid var(--line); border-radius: 13px;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.eps button:hover { background: #12151c; border-color: rgba(255, 255, 255, .22); }
.eps button[aria-current="true"] { border-color: var(--accent); background: #14161d; }
.ep-thumb { position: relative; flex: none; width: 138px; height: 80px; overflow: hidden; border-radius: 8px; background: linear-gradient(145deg, #2b3039, #16191f); }
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-thumb b { position: absolute; left: 7px; bottom: 7px; min-width: 23px; height: 23px; padding: 0 6px; display: grid; place-items: center; border-radius: 5px; background: rgba(7, 9, 12, .86); font-size: 11px; font-weight: 700; }
.ep-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 2px 6px 1px 0; }
.ep-text strong { font-size: 14px; font-weight: 700; }
.ep-text small { margin-top: 5px; font-size: 11px; color: #9ca1aa; }
.ep-text em { margin-top: 8px; font-style: normal; font-size: 12px; line-height: 1.45; color: #aeb2bb; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.more-like { margin: 54px -3vw 0; padding: 0; }
.dlg-top + .more-like { margin-top: 10px; }
.more-like .row-head { margin-bottom: 12px; }

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  :root { --gutter: 16px; --inset: 20px; --bar: 64px; }
  .topbar { padding: 0 15px; gap: 10px; }
  .brand span, .tools .pill { display: none; }
  .brand-mark { width: 28px; height: 28px; }
  .topbar nav { gap: 14px; }
  .topbar nav > a, #browse-toggle { padding: 22px 0; }
  .topbar nav > a.active::after, #browse-toggle.active::after, #browse-toggle[aria-expanded="true"]::after { bottom: 12px; }
  #browse-toggle svg { display: none; }
  .menu-panel { position: fixed; top: 60px; left: 12px; right: 12px; width: auto; }

  .hero { height: 690px; }
  .slide { background-position: 61% 0; }
  .slide::before {
    background: linear-gradient(90deg, rgba(7, 8, 11, .97), rgba(7, 8, 11, .48)), linear-gradient(0deg, var(--bg), rgba(0, 0, 0, 0) 34%);
  }
  .hero-copy { bottom: 58px; }
  .hero-copy h1 { font-size: 12vw; }
  .hero-copy .overview { -webkit-line-clamp: 7; }
  .hero-actions { gap: 10px; }
  .btn { height: 44px; padding: 0 17px; gap: 8px; }
  .hero-nav { display: none; }
  .dots { bottom: 20px; }

  .rows { margin-top: -19px; }
  .row { margin-bottom: 38px; }
  .row h2, .sec-title { font-size: 20px; }
  .rail > .card { flex-basis: 132px; }
  .rail-nav { display: none; }
  .tabs { gap: 16px; }

  .page { padding: 96px 16px 36px; }
  .page h1 { font-size: 34px; }
  .filters { gap: 15px; }
  .tabs.small { gap: 14px; }
  .tabs.genres { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: -16px; padding-right: 16px; }
  .tabs.genres::-webkit-scrollbar { display: none; }
  .tabs.genres button { font-size: 13px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

  .foot { padding: 28px 18px; }
  .foot span { flex-basis: 100%; }

  dialog.search { margin-top: 12px; max-height: calc(100dvh - 24px); }
  .search-box { padding: 14px; }

  .player { height: 650px; }
  .player:empty::after {
    background: linear-gradient(90deg, rgba(7, 8, 11, .8), rgba(7, 8, 11, .34)), linear-gradient(0deg, var(--bg), rgba(0, 0, 0, 0) 38%);
  }
  .dialog-body { padding: 112px 20px 40px; }
  .dialog-body .overview { font-size: 13px; }
  .dlg-top { min-height: 538px; }
  .eps button { gap: 12px; }
  .ep-thumb { width: 120px; height: 70px; }
  .more-like { margin: 48px -4px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01s !important; }
}
