/* ============ Showman ============ */
:root {
    --accent: #ffa500;
    --accent-rgb: 255 165 0;
    --on-accent: #14110a;
    --bg: #09090d;
    --bg-2: #101017;
    --surface: #15151d;
    --surface-2: #1d1d27;
    --surface-3: #262632;
    --line: rgb(255 255 255 / 0.08);
    --line-2: rgb(255 255 255 / 0.14);
    --text: #f4f2ee;
    --text-2: #c9c7cf;
    --muted: #8f8d99;
    --ok: #34d399;
    --danger: #f87171;
    --radius: 14px;
    --radius-sm: 10px;
    --topbar: 68px;
    --gutter: clamp(16px, 4vw, 56px);
    --display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
    --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar) + 16px); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 15px/1.5 var(--body);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); letter-spacing: -0.01em; line-height: 1.1; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgb(var(--accent-rgb) / 0.35); }
.ic { width: 1.15em; height: 1.15em; flex: none; }
.muted { color: var(--muted); }
.grow { flex: 1; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
kbd { font: 600 11px/1 var(--body); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--muted); background: rgb(255 255 255 / 0.04); }

.container { width: 100%; max-width: 1560px; margin: 0 auto; padding: 0 var(--gutter); }
#view { outline: none; min-height: 70vh; }
.page { padding-top: calc(var(--topbar) + 28px); }

/* ============ Top bar ============ */
.topbar {
    position: fixed; inset: 0 0 auto; z-index: 40; height: var(--topbar);
    display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter);
    background: linear-gradient(to bottom, rgb(9 9 13 / 0.85), rgb(9 9 13 / 0));
    transition: background .3s var(--ease), box-shadow .3s var(--ease), backdrop-filter .3s;
}
.topbar.solid {
    background: rgb(12 12 17 / 0.82);
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    box-shadow: 0 1px 0 var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font: 800 21px/1 var(--display); letter-spacing: -0.03em; flex: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav { display: flex; gap: 4px; }
.nav a {
    position: relative; padding: 8px 12px; border-radius: 999px; color: var(--text-2);
    font-weight: 600; font-size: 14.5px; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: rgb(255 255 255 / 0.06); }
.nav a.on { color: var(--text); }
.nav a.on::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 16px; height: 3px; margin-left: -8px; border-radius: 3px; background: var(--accent); }
.search {
    position: relative; display: flex; align-items: center; margin-left: auto;
    width: min(360px, 32vw); height: 40px; border-radius: 999px;
    background: rgb(255 255 255 / 0.07); border: 1px solid var(--line);
    transition: background .2s, border-color .2s, width .3s var(--ease);
}
.search:focus-within { background: rgb(255 255 255 / 0.1); border-color: rgb(var(--accent-rgb) / 0.6); width: min(440px, 38vw); }
.search .search-icon, .search > .ic { position: absolute; left: 14px; color: var(--muted); display: flex; }
.search input { flex: 1; height: 100%; border: 0; background: none; outline: none; padding: 0 44px 0 42px; font-size: 14.5px; min-width: 0; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.search kbd { position: absolute; right: 12px; }
.search:focus-within kbd { display: none; }
.top-actions { display: flex; gap: 6px; }
.icon-btn {
    width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px;
    color: var(--text-2); transition: background .2s, color .2s;
}
.icon-btn:hover, .icon-btn.on { background: rgb(255 255 255 / 0.08); color: var(--text); }
.icon-btn .ic { width: 20px; height: 20px; }

.tabbar { display: none; }

/* ============ Buttons, chips ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 18px; border-radius: 999px; white-space: nowrap;
    background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 14.5px;
    transition: transform .15s var(--ease), filter .2s, background .2s, box-shadow .2s;
    box-shadow: 0 6px 24px -10px rgb(var(--accent-rgb) / 0.8);
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .ic { width: 18px; height: 18px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15.5px; }
.btn-lg .ic { width: 20px; height: 20px; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn-icon { width: 48px; padding: 0; }
.btn-glass, .btn-ghost {
    background: rgb(255 255 255 / 0.1); color: var(--text); box-shadow: none;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--line);
}
.btn-glass:hover, .btn-ghost:hover { background: rgb(255 255 255 / 0.16); filter: none; }
.btn-glass.on, .btn-ghost.on { background: rgb(var(--accent-rgb) / 0.16); border-color: rgb(var(--accent-rgb) / 0.5); color: var(--accent); }
.btn-ghost { backdrop-filter: none; background: var(--surface-2); }
.btn-danger { background: rgb(248 113 113 / 0.12); color: var(--danger); box-shadow: none; border: 1px solid rgb(248 113 113 / 0.3); }
.btn-disabled { background: var(--surface-2); color: var(--muted); box-shadow: none; cursor: default; }
.btn-disabled:hover { transform: none; filter: none; }
.btn:disabled { opacity: .5; pointer-events: none; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 18px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
    background: var(--surface); border: 1px solid var(--line); color: var(--text-2);
    transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chips-tight { padding: 0; flex-wrap: wrap; overflow: visible; }
.chips-tight .chip { padding: 5px 12px; font-size: 13px; background: rgb(255 255 255 / 0.06); backdrop-filter: blur(8px); }

.pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: rgb(var(--accent-rgb) / 0.16); color: var(--accent); font-weight: 700; font-size: 12px; letter-spacing: .02em; }
.tag { display: inline-flex; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.tag-new { background: var(--accent); color: var(--on-accent); }
.tag-live { background: rgb(52 211 153 / 0.14); color: var(--ok); }
.cert { display: inline-flex; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 5px; font-size: 12px; line-height: 18px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }
.rating { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; }
.rating .ic { color: var(--accent); width: 14px; height: 14px; }
.count { font: 600 12px/1 var(--body); color: var(--muted); padding: 3px 7px; border-radius: 999px; background: rgb(255 255 255 / 0.07); margin-left: 4px; vertical-align: middle; }

.segmented { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.segmented::-webkit-scrollbar { display: none; }
.segmented a, .segmented button { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: background .2s, color .2s; }
.segmented a:hover { color: var(--text); }
.segmented .on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 rgb(255 255 255 / 0.06) inset; }
.segmented .on .count { background: rgb(var(--accent-rgb) / 0.18); color: var(--accent); }

/* ============ Hero ============ */
.hero { position: relative; height: min(88vh, 860px); min-height: 520px; overflow: hidden; background: var(--bg-2); }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .9s var(--ease), visibility .9s; }
.hero-slide.on { opacity: 1; visibility: visible; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; transform: scale(1.06); transition: transform 9s linear; }
.hero-slide.on .hero-img { transform: scale(1); }
.hero-slide::after {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(to top, var(--bg) 2%, rgb(9 9 13 / 0.6) 30%, rgb(9 9 13 / 0) 60%),
        linear-gradient(to right, rgb(9 9 13 / 0.92) 0%, rgb(9 9 13 / 0.55) 38%, rgb(9 9 13 / 0) 70%);
}
.hero-body { position: absolute; left: 0; right: 0; bottom: clamp(70px, 12vh, 130px); z-index: 2; }
.hero-body > * { max-width: 640px; }
.hero-slide .hero-body > * { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.hero-slide.on .hero-body > * { opacity: 1; transform: none; }
.hero-slide.on .hero-body > :nth-child(2) { transition-delay: .08s; }
.hero-slide.on .hero-body > :nth-child(3) { transition-delay: .14s; }
.hero-slide.on .hero-body > :nth-child(4) { transition-delay: .2s; }
.hero-slide.on .hero-body > :nth-child(5) { transition-delay: .26s; }
.hero-title { font-size: clamp(36px, 5.6vw, 76px); font-weight: 800; letter-spacing: -0.035em; line-height: .98; margin-bottom: 14px; text-wrap: balance; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--text-2); font-weight: 600; font-size: 14.5px; margin-bottom: 14px; }
.hero-meta span:not(.rating) + span::before { content: ""; }
.hero-overview { color: var(--text-2); font-size: 16px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 24px; }
.hero .actions { gap: 12px; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 36px; z-index: 3; display: flex; gap: 8px; }
.hero-dots button { width: 34px; height: 4px; border-radius: 4px; background: rgb(255 255 255 / 0.22); overflow: hidden; padding: 0; }
.hero-dots button:hover { background: rgb(255 255 255 / 0.4); }
.hero-dots i { display: block; height: 100%; width: 0; background: var(--text); }
.hero-dots button.on i { animation: dot 8s linear forwards; }
.hero.paused .hero-dots button.on i { animation-play-state: paused; }
@keyframes dot { to { width: 100%; } }
.hero-loading { display: flex; align-items: flex-end; }
.hero-loading .hero-body { position: relative; bottom: auto; padding-bottom: 120px; }

/* ============ Rows ============ */
.home-rows { position: relative; z-index: 2; margin-top: -34px; }
.row { margin: 0 0 36px; }
.row-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.row-head h2 { display: flex; align-items: center; gap: 10px; font-size: clamp(19px, 1.8vw, 23px); font-weight: 700; }
.row-head h2 .ic { color: var(--accent); width: 20px; height: 20px; }
.row-link { display: inline-flex; align-items: center; gap: 2px; color: var(--muted); font-size: 13.5px; font-weight: 600; opacity: 0; transform: translateX(-6px); transition: opacity .2s, transform .2s, color .2s; }
.row:hover .row-link, .row-link:focus-visible { opacity: 1; transform: none; }
.row-link:hover { color: var(--accent); }
.row-link .ic { width: 15px; height: 15px; }
.row-arrows { margin-left: auto; display: flex; gap: 6px; }
.arrow { width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); transition: background .2s, opacity .2s; }
.arrow:hover { background: var(--surface-3); color: var(--text); }
.row.at-start [data-scroll="-1"], .row.at-end [data-scroll="1"] { opacity: .3; pointer-events: none; }
.rail {
    --w: clamp(136px, 13.5vw, 200px);
    display: grid; grid-auto-flow: column; grid-auto-columns: var(--w); gap: clamp(10px, 1.2vw, 18px);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter);
    margin: 0 calc(var(--gutter) * -1); padding: 6px var(--gutter) 10px; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.row-wide .rail { --w: clamp(240px, 22vw, 330px); }
.row-people .rail { --w: 128px; }

/* ============ Cards ============ */
.card { position: relative; min-width: 0; }
.card-art {
    position: relative; display: block; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(135deg, var(--surface-2), var(--surface)); isolation: isolate;
    box-shadow: 0 0 0 1px var(--line) inset;
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card-wide .card-art { aspect-ratio: 16 / 9; }
.card-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; transition: transform .5s var(--ease), filter .3s; }
.card-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; font: 700 15px/1.25 var(--display); color: var(--muted); }
.card-shade { position: absolute; inset: 0; z-index: 2; background: linear-gradient(to top, rgb(0 0 0 / 0.75), transparent 45%); opacity: .9; transition: opacity .3s; }
.card-badges { position: absolute; left: 8px; bottom: 8px; z-index: 3; display: flex; gap: 5px; align-items: center; }
.card-badges .rating, .badge {
    display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 7px; border-radius: 6px;
    font-size: 12px; font-weight: 700; background: rgb(0 0 0 / 0.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.card-badges .rating .ic { width: 12px; height: 12px; }
.badge-ok { background: var(--ok); color: #05261a; padding: 0 5px; }
.badge-ok .ic { width: 13px; height: 13px; stroke-width: 3; }
.card-play {
    position: absolute; left: 50%; top: 50%; z-index: 3; width: 52px; height: 52px; margin: -26px 0 0 -26px;
    display: grid; place-items: center; border-radius: 999px; background: rgb(255 255 255 / 0.92); color: #0b0b0f;
    opacity: 0; transform: scale(.8); transition: opacity .25s, transform .3s var(--ease);
}
.card-play .ic { width: 22px; height: 22px; margin-left: 3px; }
.card-resume { position: absolute; right: 8px; bottom: 8px; z-index: 3; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--accent); color: var(--on-accent); }
.card-progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 4px; background: rgb(255 255 255 / 0.2); }
.card-progress i { display: block; height: 100%; background: var(--accent); }
.card-wl, .card-x {
    position: absolute; top: 8px; right: 8px; z-index: 4; width: 32px; height: 32px; border-radius: 999px;
    display: grid; place-items: center; background: rgb(0 0 0 / 0.55); color: #fff;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    opacity: 0; transform: scale(.85); transition: opacity .2s, transform .25s var(--ease), background .2s;
}
.card-wl .ic, .card-x .ic { width: 17px; height: 17px; stroke-width: 2.4; }
.card-wl:hover { background: rgb(0 0 0 / 0.8); }
.card-wl.on { opacity: 1; transform: none; background: var(--accent); color: var(--on-accent); }
.card-x { right: 46px; }
.card-wide .card-wl.on ~ .card-x, .card-x { top: 8px; }
.card:hover .card-art, .card:focus-within .card-art { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--line-2) inset, 0 18px 40px -18px rgb(0 0 0 / 0.9); }
.card:hover .card-art img { transform: scale(1.05); }
.card:hover .card-play, .card-art:focus-visible .card-play { opacity: 1; transform: none; }
.card:hover .card-wl, .card:hover .card-x, .card:focus-within .card-wl, .card:focus-within .card-x { opacity: 1; transform: none; }
.card-meta { padding: 10px 2px 0; }
.card-title { display: block; font-weight: 700; font-size: 14.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title:hover { color: var(--accent); }
.card-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }

.person { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 0; }
.person-img {
    width: 100%; aspect-ratio: 1; border-radius: 999px; overflow: hidden; margin-bottom: 8px; display: grid; place-items: center;
    background: var(--surface-2); color: var(--muted); box-shadow: 0 0 0 1px var(--line) inset; transition: transform .3s var(--ease), box-shadow .3s;
}
.person-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.person-img .ic { width: 40%; height: 40%; }
.person:hover .person-img { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--accent); }
.person-name { font-weight: 700; font-size: 14px; line-height: 1.25; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-sub { color: var(--muted); font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============ Grids, page heads ============ */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 800; letter-spacing: -0.03em; }
.page-head .eyebrow { margin-bottom: 6px; }
.page-head-sm { margin: 10px 0 18px; align-items: center; }
.page-head-sm h2 { font-size: 22px; }
.section-title { font-size: 20px; margin: 28px 0 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(132px, 14vw, 182px), 1fr)); gap: 28px clamp(12px, 1.4vw, 20px); }
.grid-wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-person .person-img { border-radius: var(--radius); aspect-ratio: 2 / 3; }
.grid-person { padding-top: 0; }
.sentinel { display: grid; place-items: center; padding: 40px 0; }
.spinner { width: 28px; height: 28px; border-radius: 999px; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 24px; }

/* Skeletons */
.skeleton .card-art, .sk-line, .skeleton.detail-poster, .ep.skeleton .ep-still {
    background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
    background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite;
}
.sk-line { height: 13px; border-radius: 6px; margin-top: 10px; width: 80%; }
.sk-line.short { width: 50%; }
.sk-title { width: 220px; height: 22px; margin: 0; }
.sk-hero { height: 52px; width: min(520px, 80%); margin-bottom: 8px; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 72px 20px; gap: 10px; }
.empty-ic { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: rgb(var(--accent-rgb) / 0.1); color: var(--accent); margin-bottom: 8px; }
.empty-ic .ic { width: 32px; height: 32px; }
.empty h3 { font-size: 22px; }
.empty p { color: var(--muted); max-width: 420px; }
.empty p .ic { vertical-align: -3px; color: var(--text); }
.empty .btn { margin-top: 12px; }

/* ============ Detail ============ */
.detail { position: relative; }
.backdrop { position: absolute; inset: 0 0 auto; height: min(92vh, 900px); overflow: hidden; z-index: 0; }
.backdrop img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; animation: fadeIn .8s var(--ease); }
.backdrop::after {
    content: ""; position: absolute; inset: 0;
    background:
        linear-gradient(to top, var(--bg) 0%, rgb(9 9 13 / 0.75) 35%, rgb(9 9 13 / 0.35) 70%, rgb(9 9 13 / 0.6) 100%),
        linear-gradient(to right, rgb(9 9 13 / 0.95) 0%, rgb(9 9 13 / 0.6) 45%, rgb(9 9 13 / 0.1) 100%);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.detail-hero {
    position: relative; z-index: 1; display: grid; grid-template-columns: clamp(200px, 22vw, 300px) 1fr; gap: clamp(24px, 4vw, 56px);
    align-items: end; padding-top: calc(var(--topbar) + clamp(80px, 22vh, 240px)); padding-bottom: 40px;
}
.detail-poster { aspect-ratio: 2 / 3; border-radius: 18px; overflow: hidden; background: var(--surface); box-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.9), 0 0 0 1px var(--line-2); display: grid; place-items: center; }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-poster span { padding: 20px; text-align: center; font: 700 20px var(--display); color: var(--muted); }
.detail-main { min-width: 0; max-width: 820px; animation: rise .6s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.detail-title { font-size: clamp(34px, 5vw, 68px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; margin-bottom: 10px; text-wrap: balance; }
.detail-logo { margin-bottom: 14px; }
.detail-logo img { max-width: 100%; height: auto; object-fit: contain; object-position: left bottom; filter: drop-shadow(0 4px 24px rgb(0 0 0 / 0.6)); }
.tagline { font: italic 500 17px/1.4 var(--body); color: var(--text-2); margin-bottom: 14px; }
.facts-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; color: var(--text-2); font-weight: 600; font-size: 14.5px; margin-bottom: 16px; }
.facts-line .dot { width: 4px; height: 4px; border-radius: 4px; background: var(--muted); opacity: .6; }
.facts-line .muted { font-weight: 500; }
.overview { color: var(--text-2); font-size: 16px; line-height: 1.65; margin: 16px 0 24px; max-width: 70ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.note { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--text-2); font-size: 14px; }
.note .ic { color: var(--accent); }
.credits-line { margin-top: 18px; color: var(--muted); font-size: 14.5px; }
.credits-line a { color: var(--text); font-weight: 600; }
.credits-line a:hover, .links a:hover { color: var(--accent); }
.progress-wrap { display: flex; align-items: center; gap: 12px; margin-top: 18px; color: var(--muted); font-size: 13.5px; }
.progress-wrap:empty { display: none; }
.progress { width: min(280px, 50%); height: 6px; border-radius: 6px; background: rgb(255 255 255 / 0.12); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s var(--ease); }

.detail-body { position: relative; z-index: 1; }
.facts-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1px; margin: 8px 0 40px;
    background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.fact { background: var(--bg-2); padding: 16px 18px; margin: 0; }
.fact-wide { grid-column: 1 / -1; }
.fact dt { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.fact dd { margin: 0; font-weight: 600; }
.links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 2px; }
.link-out { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.link-out .ic { width: 14px; height: 14px; color: var(--muted); }
.providers-row { display: flex; flex-wrap: wrap; gap: 14px 32px; }
.mini { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.logos { display: flex; flex-wrap: wrap; gap: 8px; }
.logos img { width: 40px; height: 40px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-2); transition: transform .2s; }
.logos a:hover img { transform: translateY(-2px); }
.net-logo { display: inline-block; height: 22px; width: auto; max-width: 110px; object-fit: contain; filter: brightness(0) invert(1); opacity: .9; margin-right: 8px; }

/* Episodes */
.episodes { margin-bottom: 44px; }
.episodes-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; margin-bottom: 18px; }
.episodes-head h2 { font-size: 24px; }
.season-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.season-tabs::-webkit-scrollbar { display: none; }
.season-tabs button { flex: none; padding: 8px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); transition: all .2s; }
.season-tabs button:hover { color: var(--text); background: var(--surface-2); }
.season-tabs button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.ep-list { display: grid; gap: 4px; }
.ep {
    display: grid; grid-template-columns: clamp(150px, 18vw, 240px) 1fr auto; gap: clamp(14px, 2vw, 24px); align-items: center;
    padding: 12px; border-radius: var(--radius); transition: background .2s;
}
.ep:hover { background: var(--surface); }
.ep.last { background: rgb(var(--accent-rgb) / 0.06); box-shadow: 0 0 0 1px rgb(var(--accent-rgb) / 0.25) inset; }
.ep-still { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); display: block; width: 100%; }
.ep-still img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease), filter .3s; }
.ep-still img.blur { filter: blur(14px) brightness(.7); transform: scale(1.1); }
.ep-still .card-play { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.ep-still:hover .card-play, .ep-still:focus-visible .card-play { opacity: 1; transform: none; }
.ep-still:hover img:not(.blur) { transform: scale(1.04); }
.ep-noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.ep-time, .ep-last { position: absolute; bottom: 6px; z-index: 3; font-size: 11.5px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: rgb(0 0 0 / 0.7); }
.ep-time { right: 6px; }
.ep-last { left: 6px; background: var(--accent); color: var(--on-accent); }
.ep-soon { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; background: rgb(0 0 0 / 0.55); }
.ep-body { min-width: 0; }
.ep-head { display: flex; align-items: baseline; gap: 10px; }
.ep-num { font: 800 18px/1 var(--display); color: var(--muted); min-width: 22px; }
.ep h3 { font-size: 16.5px; font-family: var(--body); font-weight: 700; letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-sub { color: var(--muted); font-size: 13px; margin: 4px 0 6px 32px; }
.ep-overview { color: var(--text-2); font-size: 14px; line-height: 1.55; margin-left: 32px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ep-overview.spoiler { filter: blur(5px); cursor: pointer; user-select: none; }
.ep-check { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; border: 1.5px solid var(--line-2); color: transparent; transition: all .2s; }
.ep-check .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.ep-check:hover { border-color: var(--text-2); color: var(--muted); }
.ep-check.on { background: var(--ok); border-color: var(--ok); color: #05261a; }
.ep-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ep-tor { width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; color: var(--muted); opacity: 0; transition: opacity .2s, color .2s, background .2s; }
.ep-tor .ic { width: 17px; height: 17px; }
.ep:hover .ep-tor, .ep-tor:focus-visible { opacity: 1; }
.ep-tor:hover { color: var(--accent); background: rgb(var(--accent-rgb) / 0.12); }
@media (hover: none) { .ep-tor { opacity: 1; } }
.ep.watched .ep-still img:not(.blur) { filter: saturate(.5) brightness(.7); }
.ep.future { opacity: .55; }
.ep.future .ep-still { cursor: default; }
.ep.skeleton .ep-still { height: auto; }

/* Person */
.person-head { display: grid; grid-template-columns: clamp(160px, 20vw, 260px) 1fr; gap: clamp(20px, 4vw, 48px); align-items: start; margin-bottom: 44px; }
.person-photo { aspect-ratio: 2 / 3; border-radius: 18px; overflow: hidden; background: var(--surface); display: grid; place-items: center; color: var(--muted); box-shadow: 0 0 0 1px var(--line-2); }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.person-photo .ic { width: 40%; height: 40%; }
.person-head h1 { font-size: clamp(32px, 4.5vw, 56px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 12px; }
.bio { color: var(--text-2); line-height: 1.7; max-width: 75ch; }
.bio p + p { margin-top: 12px; }
.bio.clamp { max-height: 10.2em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent); mask-image: linear-gradient(to bottom, #000 60%, transparent); }
.person-head .btn-ghost { margin: 10px 0 0; }
.person-head .links { margin-top: 18px; }

/* News */
.news-lead {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 0; border-radius: 20px; overflow: hidden; background: var(--surface);
    border: 1px solid var(--line); margin-bottom: 32px; transition: border-color .2s;
}
.news-lead:hover { border-color: var(--line-2); }
.news-lead img { width: 100%; height: 100%; min-height: 280px; max-height: 440px; object-fit: cover; }
.news-lead > div { padding: clamp(20px, 3vw, 40px); display: flex; flex-direction: column; justify-content: center; gap: 14px; align-items: flex-start; }
.news-lead h2 { font-size: clamp(22px, 2.4vw, 32px); font-weight: 800; letter-spacing: -0.02em; }
.news-lead p { color: var(--text-2); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px 22px; }
.news-card { display: flex; flex-direction: column; gap: 8px; }
.news-img { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface); margin-bottom: 4px; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.news-card:hover .news-img img { transform: scale(1.04); }
.news-card:hover h3 { color: var(--accent); }
.news-src { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.news-card h3 { font: 700 17px/1.3 var(--body); letter-spacing: 0; transition: color .2s; }
.news-card p { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Settings */
.settings { max-width: 880px; }
.panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; padding: 8px 22px; margin-bottom: 18px; }
.panel h2 { font-size: 13px; font-family: var(--body); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 0 6px; }
.panel-note { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.panel .actions { padding-bottom: 20px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.panel h2 + .setting { border-top: 0; }
.setting h3 { font: 600 15.5px/1.3 var(--body); letter-spacing: 0; }
.setting p { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
select {
    appearance: none; -webkit-appearance: none; height: 38px; padding: 0 36px 0 14px; border-radius: 10px;
    background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f8d99' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 16px;
    border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; cursor: pointer; max-width: 220px;
}
select:hover { border-color: var(--muted); }
.select { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--text-2); font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch span { position: relative; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-3); transition: background .2s; flex: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.4); transition: transform .25s var(--ease); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; max-width: 300px; }
.swatch { width: 28px; height: 28px; border-radius: 999px; background: var(--c); box-shadow: 0 0 0 1px rgb(255 255 255 / 0.15) inset; transition: transform .15s; position: relative; display: grid; place-items: center; cursor: pointer; }
.swatch:hover { transform: scale(1.1); }
.swatch.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); }
.swatch-custom { background: conic-gradient(#f43f5e, #facc15, #10b981, #3b82f6, #a855f7, #f43f5e); color: #fff; }
.swatch-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.swatch-custom .ic { width: 14px; height: 14px; stroke-width: 3; filter: drop-shadow(0 0 2px #000); }
.data-stats { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.data-stats div { flex: 1; min-width: 120px; background: var(--surface); border-radius: 12px; padding: 14px 16px; }
.data-stats b { display: block; font: 800 26px/1 var(--display); margin-bottom: 4px; }
.data-stats span { color: var(--muted); font-size: 13px; }
.kbd-help { margin: 24px 0 0; font-size: 13.5px; }

/* ============ Modal / player ============ */
#modalRoot { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
#modalRoot:empty { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgb(4 4 7 / 0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .2s; pointer-events: auto; }
.modal {
    position: absolute; left: 50%; top: 50%; width: min(1280px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto;
    transform: translate(-50%, -48%) scale(.98); opacity: 0; transition: transform .25s var(--ease), opacity .2s; pointer-events: auto;
    background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 40px 100px -30px #000;
}
#modalRoot.open .modal-backdrop { opacity: 1; }
#modalRoot.open .modal { opacity: 1; transform: translate(-50%, -50%); }
.player, .trailer { display: flex; flex-direction: column; }
.player-top, .modal-top { display: flex; align-items: center; gap: 16px; padding: 14px 14px 14px 22px; }
.modal-top strong { flex: 1; }
.player-title { flex: 1; min-width: 0; }
.player-title strong { display: block; font: 700 18px/1.25 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-title span { color: var(--muted); font-size: 14px; }
.player-ends { color: var(--text-2); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.player-ends:empty { display: none; }
.frame { position: relative; aspect-ratio: 16 / 9; background: #000; max-height: calc(100vh - 230px); }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.frame-msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.player-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 18px 4px; }
.sources { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.sources::-webkit-scrollbar { display: none; }
.sources { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); padding-right: 36px; }
.sources-label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-right: 6px; flex: none; }
.source {
    flex: none; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 5px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--text-2); transition: all .2s;
}
.source b { width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--surface-3); font-size: 11.5px; }
.source:hover { color: var(--text); border-color: var(--line-2); }
.source.on { background: rgb(var(--accent-rgb) / 0.14); border-color: rgb(var(--accent-rgb) / 0.55); color: var(--text); }
.source.on b { background: var(--accent); color: var(--on-accent); }
.ep-nav { display: flex; gap: 8px; }
.player-hint { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; padding: 8px 20px 16px; }
.modal-video { width: min(1100px, calc(100vw - 32px)); }

/* Toasts */
#toasts { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast {
    display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border-radius: 14px; pointer-events: auto;
    background: rgb(36 36 46 / 0.94); border: 1px solid var(--line-2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px -12px #000; font-weight: 600; font-size: 14px;
    opacity: 0; transform: translateY(12px) scale(.96); transition: opacity .25s, transform .3s var(--ease);
}
.toast.in { opacity: 1; transform: none; }
.toast .ic { color: var(--accent); }
.toast button { margin-left: 6px; padding: 5px 10px; border-radius: 8px; color: var(--accent); font-weight: 700; }
.toast button:hover { background: rgb(var(--accent-rgb) / 0.12); }
.toast:not(:has(button)) { padding-right: 16px; }

/* Footer */
.footer { max-width: 1560px; margin: 40px auto 0; padding: 36px var(--gutter) 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; line-height: 1.6; }
.footer p { max-width: 110ch; margin-top: 10px; }
.footer a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.footer a:hover { color: var(--accent); }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 800 17px var(--display); }
.footer-brand img { width: 24px; height: 24px; border-radius: 6px; }
.footer-brand span { font: 500 13px var(--body); color: var(--muted); }

/* ============ Responsive ============ */
@media (max-width: 1100px) {
    .nav a { padding: 8px 9px; }
    .search kbd { display: none; }
}
@media (max-width: 900px) {
    .nav { display: none; }
    .search { width: auto; flex: 1; max-width: 420px; }
    .search:focus-within { width: auto; }
}
@media (max-width: 760px) {
    :root { --topbar: 58px; }
    body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); font-size: 14.5px; }
    .topbar { gap: 12px; }
    .topbar .search { display: none; }
    .top-actions { margin-left: auto; }
    .brand span { font-size: 19px; }
    .tabbar {
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: repeat(5, 1fr);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: rgb(12 12 17 / 0.9);
        backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-top: 1px solid var(--line);
    }
    .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; font-size: 11px; font-weight: 600; color: var(--muted); }
    .tabbar a .ic { width: 22px; height: 22px; }
    .tabbar a.on { color: var(--text); }
    .tabbar a.on .ic { color: var(--accent); }
    .search-page { display: flex; width: 100%; margin: 0 0 8px; height: 48px; }
    #toasts { bottom: calc(80px + env(safe-area-inset-bottom)); width: calc(100% - 32px); }

    .hero { height: 78vh; min-height: 480px; }
    .hero-slide::after { background: linear-gradient(to top, var(--bg) 4%, rgb(9 9 13 / 0.75) 40%, rgb(9 9 13 / 0.1) 75%); }
    .hero-body { bottom: 56px; }
    .hero-overview { -webkit-line-clamp: 2; font-size: 14.5px; margin-bottom: 18px; }
    .hero .btn-lg { height: 44px; padding: 0 18px; font-size: 14.5px; }
    .hero .btn-icon { width: 44px; padding: 0; }
    .hero-dots { bottom: 24px; }
    .home-rows { margin-top: -12px; }
    .row-arrows { display: none; }
    .row-link { opacity: 1; transform: none; margin-left: auto; }
    .card-wl { opacity: 1; transform: none; width: 30px; height: 30px; }
    .card-x { opacity: 1; transform: none; right: 44px; width: 30px; height: 30px; }

    .detail-hero { grid-template-columns: 1fr; padding-top: calc(var(--topbar) + 34vh); gap: 0; }
    .detail-poster { display: none; }
    .backdrop { height: 70vh; }
    .actions .btn-lg { height: 44px; padding: 0 16px; font-size: 14.5px; }
    .actions .btn-icon { width: 44px; padding: 0; }
    .detail-main .actions > .btn:first-child { flex: 1 1 100%; }
    .overview { font-size: 15px; }
    .ep { grid-template-columns: 120px 1fr auto; padding: 10px 6px; gap: 12px; align-items: start; }
    .ep-overview { display: none; }
    .ep-sub { margin-left: 0; }
    .ep-num { min-width: 0; font-size: 15px; }
    .ep h3 { font-size: 14.5px; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .episodes-head { gap: 12px; }
    .season-tabs { order: 3; flex-basis: 100%; }

    .person-head { grid-template-columns: 110px 1fr; gap: 16px; }
    .person-head h1 { font-size: 28px; }
    .person-head > div:last-child { grid-column: 1 / -1; }
    .person-head .person-photo { grid-row: 1; }
    .news-lead { grid-template-columns: 1fr; }
    .news-lead img { min-height: 0; aspect-ratio: 16/9; }
    .setting { flex-direction: column; align-items: flex-start; gap: 10px; }
    .swatches { justify-content: flex-start; }
    .page-head { align-items: flex-start; flex-direction: column; }

    .modal { width: 100vw; max-height: 100vh; border-radius: 0; border: 0; top: 0; left: 0; transform: translateY(12px); height: 100%; }
    #modalRoot.open .modal { transform: none; }
    .frame { max-height: none; }
    .player-ends { display: none; }
    .player-bar { padding: 12px 12px 4px; }
    .ep-nav { width: 100%; }
    .ep-nav .btn { flex: 1; }
}
@media (hover: none) {
    .card-play { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============ v2.1 additions ============ */
/* Season + source dropdowns */
.season-select { height: 40px; font-size: 15px; padding-left: 16px; max-width: 280px; background-color: var(--surface); }
.source-pick { display: inline-flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.source-pick select { flex: 0 1 260px; min-width: 0; max-width: 260px; height: 36px; background-color: var(--surface-2); }
.player-bar { gap: 10px 12px; }

/* New-episode badge + nav dot */
.badge-new {
    position: absolute; top: 8px; left: 8px; z-index: 4; padding: 3px 8px; border-radius: 6px;
    background: var(--accent); color: var(--on-accent); font-size: 11.5px; font-weight: 800; letter-spacing: .02em;
    box-shadow: 0 4px 14px -4px rgb(var(--accent-rgb) / 0.8);
}
.nav a.has-new, .tabbar a.has-new { position: relative; }
.nav a.has-new::before, .tabbar a.has-new::before {
    content: ""; position: absolute; top: 6px; right: 4px; width: 7px; height: 7px; border-radius: 99px;
    background: var(--accent); box-shadow: 0 0 0 2px var(--bg);
}
.tabbar a.has-new::before { top: 4px; right: calc(50% - 16px); }
.count-new { background: var(--accent) !important; color: var(--on-accent) !important; }

/* Browse filters */
.result-count { color: var(--muted); font-size: 14px; margin-top: 6px; }
.result-count:empty { display: none; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -4px 0 26px; }
.filter {
    display: inline-flex; align-items: center; height: 36px; border-radius: 999px; padding-left: 14px;
    background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600;
}
.filter select { height: 34px; border: 0; background-color: transparent; padding-left: 6px; font-size: 13.5px; color: var(--text); max-width: 170px; }
.filter.on { border-color: rgb(var(--accent-rgb) / 0.55); background: rgb(var(--accent-rgb) / 0.1); }
.filter.on span { color: var(--accent); }
.filter select option { background: var(--surface-2); }

/* Search suggestions */
.suggest {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60; min-width: 340px;
    max-height: min(70vh, 560px); overflow-y: auto; padding: 6px; border-radius: 16px;
    background: rgb(22 22 30 / 0.97); border: 1px solid var(--line-2);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 24px 60px -16px #000;
    animation: sgIn .16s var(--ease);
}
@keyframes sgIn { from { opacity: 0; transform: translateY(-4px); } }
.sg-item { display: flex; align-items: center; gap: 12px; padding: 7px 8px; border-radius: 10px; }
.sg-item:hover, .sg-item.on { background: rgb(255 255 255 / 0.07); }
.sg-img { width: 36px; height: 54px; border-radius: 6px; overflow: hidden; flex: none; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); }
.sg-img img { width: 100%; height: 100%; object-fit: cover; }
.sg-round { width: 44px; height: 44px; border-radius: 99px; margin: 5px -4px; }
.sg-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.sg-text strong { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-text strong mark { background: none; color: var(--accent); }
.sg-text > span { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 4px; }
.sg-text .rating { color: var(--text-2); font-weight: 600; }
.sg-text .rating .ic { width: 12px; height: 12px; }
.sg-tag { display: inline-flex; align-items: center; gap: 3px; flex: none; font-size: 11.5px; font-weight: 700; color: var(--accent); }
.sg-tag .ic { width: 13px; height: 13px; stroke-width: 2.6; }
.sg-all { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 11px 10px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 13.5px; font-weight: 600; border-radius: 0 0 10px 10px; }
.sg-all:hover { color: var(--accent); }
.sg-loading, .sg-empty { padding: 18px; text-align: center; color: var(--muted); font-size: 14px; display: grid; place-items: center; }

/* Upcoming agenda */
.agenda { display: grid; gap: 26px; max-width: 980px; }
.agenda-day h3 { display: flex; align-items: baseline; gap: 10px; font-size: 20px; margin-bottom: 10px; }
.agenda-day h3 small { font: 600 13px var(--body); color: var(--muted); }
.agenda-item { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: var(--radius); background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 8px; transition: border-color .2s, background .2s; }
.agenda-item:hover { border-color: var(--line-2); background: var(--surface); }
.agenda-item.is-new { border-color: rgb(var(--accent-rgb) / 0.35); background: rgb(var(--accent-rgb) / 0.05); }
.agenda-link { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.agenda-img { width: 128px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.agenda-img img { width: 100%; height: 100%; object-fit: cover; }
.agenda-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.agenda-text strong { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-text > span { color: var(--text-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-link:hover strong { color: var(--accent); }
.agenda-when { flex: none; font-size: 13px; font-weight: 700; color: var(--text-2); padding: 5px 10px; border-radius: 999px; background: var(--surface-2); }
.agenda-item.skeleton .agenda-img { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite; }

@media (max-width: 760px) {
    .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(var(--gutter) * -1); padding-right: var(--gutter); }
    .filters::-webkit-scrollbar { display: none; }
    .filter { flex: none; }
    .season-select { flex: 1; max-width: none; order: 2; }
    .episodes-head .grow { display: none; }
    .source-pick { flex-basis: 100%; }
    .source-pick select { flex: 1; max-width: none; }
    #pNextSource { flex: 1; }
    .agenda-img { width: 92px; }
    .agenda-item { gap: 10px; padding: 8px; }
    .agenda-link { gap: 10px; }
    .agenda-item .btn-sm { padding: 0 12px; }
}
.agenda { grid-template-columns: minmax(0, 1fr); }
.agenda-day, .agenda-item { min-width: 0; }

/* Hero logos (swapped in for the title text when TMDB has one) */
.hero-title.hero-logo { line-height: 0; margin-bottom: 18px; }
.hero-logo img {
    max-width: 100%; height: auto;
    object-fit: contain; object-position: left bottom;
    filter: drop-shadow(0 4px 24px rgb(0 0 0 / 0.65));
    animation: fadeIn .5s var(--ease);
}


/* Episode descriptions: tap to expand on phones */
.ep-expand, .ep-more { display: none; }
@media (max-width: 760px) {
    .ep { cursor: pointer; -webkit-tap-highlight-color: transparent; }
    .ep-sub { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
    .ep-expand {
        display: inline-grid; place-items: center; width: 26px; height: 26px; margin: -4px 0 -4px 2px; border-radius: 99px;
        color: var(--muted); transition: transform .25s var(--ease), color .2s, background .2s;
    }
    .ep-expand .ic { width: 16px; height: 16px; }
    .ep.open .ep-expand { transform: rotate(180deg); color: var(--accent); background: rgb(var(--accent-rgb) / 0.12); }
    .ep-more {
        display: grid; grid-column: 1 / -1; grid-template-rows: 0fr;
        transition: grid-template-rows .28s var(--ease);
    }
    .ep-more > div { overflow: hidden; min-height: 0; }
    .ep-more p { color: var(--text-2); font-size: 14px; line-height: 1.6; padding: 2px 4px 4px; opacity: 0; transition: opacity .2s; }
    .ep-more p.spoiler { filter: blur(5px); user-select: none; }
    .ep.open { background: var(--surface); }
    .ep.open .ep-more { grid-template-rows: 1fr; }
    .ep.open .ep-more p { opacity: 1; transition-delay: .08s; }
    .ep:not(.open) .ep-more { margin-top: -12px; } /* cancel the grid gap while closed */
}

/* Cancelled shows */
.cancel-warning {
    display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%;
    margin: 2px 0 16px; padding: 10px 14px; border-radius: 12px;
    background: rgb(239 68 68 / 0.14); border: 1px solid rgb(239 68 68 / 0.45); color: #fecaca;
    font-weight: 600; font-size: 14.5px; line-height: 1.4;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.cancel-warning .ic { color: #f87171; width: 20px; height: 20px; }
.badge-canceled { background: #dc2626 !important; color: #fff; font-size: 11px; letter-spacing: .02em; }
.agenda-item.is-canceled { border-color: rgb(239 68 68 / 0.35); background: rgb(239 68 68 / 0.06); }
.agenda-item.is-canceled .agenda-text > span { color: #fca5a5; }

/* "Canceled" goes on its own row below the star rating (rating gets bumped up) */
.card-badges { flex-wrap: wrap; row-gap: 5px; }
.badge-break { flex-basis: 100%; height: 0; }
.card-badges .badge-break:first-child { display: none; }
/* "Canceled" above the star rating instead of below */
.card-badges .badge-canceled { order: -2; }
.card-badges .badge-break { order: -1; }

/* Keyboard shortcuts panel */
.kbd-list { margin: 0 0 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 24px; }
.kbd-list > div { display: flex; align-items: center; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); }
.kbd-list dt { flex: 0 0 132px; display: flex; align-items: center; gap: 5px; }
.kbd-list dt span { color: var(--muted); font-size: 12px; }
.kbd-list dd { margin: 0; color: var(--text-2); font-size: 14px; }
.kbd-list kbd, .kbd-panel .panel-note kbd { font-size: 12px; min-width: 24px; text-align: center; padding: 4px 7px; color: var(--text); background: var(--surface-2); border-bottom-width: 2px; }
@media (hover: none) and (pointer: coarse) { .kbd-panel { display: none; } }

/* Mobile hamburger menu (top right) */
.mobile-only { display: none !important; }
@media (max-width: 760px) {
    .mobile-only { display: block !important; }
    .desktop-only { display: none !important; }
}
.menu-wrap { position: relative; }
.icon-btn.open { background: rgb(255 255 255 / 0.1); color: var(--text); }
.top-menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; min-width: 210px; padding: 6px;
    background: rgb(22 22 30 / 0.97); border: 1px solid var(--line-2); border-radius: 16px;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: 0 24px 60px -16px #000;
    animation: sgIn .16s var(--ease);
}
.top-menu[hidden] { display: none; }
.top-menu a, .top-menu button {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border-radius: 10px;
    font-size: 15px; font-weight: 600; color: var(--text); text-align: left;
}
.top-menu a:hover, .top-menu button:hover, .top-menu a:active, .top-menu button:active { background: var(--surface-2); }
.top-menu .ic { width: 20px; height: 20px; color: var(--muted); } /* same grey as unselected icons */
.top-menu .on { background: rgb(var(--accent-rgb) / 0.1); }
.top-menu .on .ic { color: var(--accent); }

/* News row on the home page */
.news-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.news-tile .news-img { margin-bottom: 4px; }
.news-tile:hover .news-img img { transform: scale(1.04); }
.news-tile-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; }
.news-tile:hover .news-tile-title { color: var(--accent); }

/* ============ Skeleton loaders ============ */
.sk-btn, .sk-chip, .person-photo.skeleton, .news-lead.skeleton .news-lead-img, .news-card.skeleton .news-img,
.sg-skel .sg-img, .cal-day.skeleton, .sk-fact .sk-line {
    background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
    background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite;
}
.sk-btn { display: inline-block; width: 132px; height: 48px; border-radius: 999px; }
.sk-btn-wide { width: 150px; }
.sk-chips { display: flex; gap: 8px; margin: 14px 0 4px; }
.sk-chip { display: inline-block; width: 74px; height: 28px; border-radius: 999px; flex: none; }
.sk-chips-row { margin: 0 0 18px; overflow: hidden; }
.sk-chips-row .sk-chip { width: 92px; height: 34px; }
.detail-loading .detail-main .actions { margin-top: 22px; }
.sk-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1px; margin: 8px 0 40px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-2); }
.sk-fact { background: var(--bg-2); padding: 16px 18px; }
.sk-fact .sk-line:first-child { margin-top: 0; }
.news-lead.skeleton { pointer-events: none; }
.news-lead-img { min-height: 300px; }
.news-card.skeleton .news-img { display: block; }
.sg-skel { pointer-events: none; }
.row-skel .row-head { min-height: 34px; }

/* "Load more" placeholder: one row of grey cards while the next page loads */
.sentinel { display: block; padding: 28px 0 8px; }
.sentinel .grid { grid-template-rows: auto; grid-auto-rows: 0; row-gap: 0; overflow: hidden; }

/* Player: shimmer behind the video until the source paints over it */
.frame { background: linear-gradient(100deg, #050507 30%, #12121a 50%, #050507 70%); background-size: 300% 100%; animation: shimmer 1.6s ease-in-out infinite; }

/* Pictures: grey shimmer until they've loaded, then fade in */
:is(.card-art, .ep-still, .person-img, .news-img, .agenda-img, .detail-poster, .sg-img, .person-photo):has(> img):not(.ld) {
    background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
    background-size: 300% 100%; animation: shimmer 1.4s ease-in-out infinite;
}
:is(.card-art, .ep-still, .person-img, .news-img, .agenda-img, .detail-poster, .sg-img, .person-photo):has(> img):not(.ld) > img { opacity: 0; }
:is(.card-art, .ep-still, .person-img, .news-img, .agenda-img, .detail-poster, .sg-img, .person-photo) > img { transition: opacity .35s ease, transform .5s var(--ease), filter .3s; }
:is(.card-art):has(> img):not(.ld) .card-fallback { opacity: 0; }

/* ============ Coming soon calendar ============ */
.cal-days {
    position: sticky; top: var(--topbar); z-index: 5; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1) 22px; padding: 10px var(--gutter); background: rgb(9 9 13 / 0.88);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.cal-days::-webkit-scrollbar { display: none; }
.cal-day {
    flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; width: 58px; padding: 8px 0 7px;
    border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s, background .2s;
}
.cal-day.skeleton { height: 70px; border: 0; }
.cal-day:hover { border-color: rgb(var(--accent-rgb) / 0.5); background: var(--surface-2); }
.cal-day small { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.cal-day b { font: 800 20px/1.1 var(--display); }
.cal-day i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--accent); }
.agenda-day { scroll-margin-top: calc(var(--topbar) + 110px); }
.cal-item .agenda-text > span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cal-tag { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 6px; letter-spacing: .02em; }
.cal-theatre { background: rgb(var(--accent-rgb) / 0.16); color: var(--accent); }
.cal-digital { background: rgb(59 130 246 / 0.16); color: #93c5fd; }
.cal-premiere { background: rgb(52 211 153 / 0.14); color: var(--ok); }
.cal-finale { background: rgb(168 85 247 / 0.16); color: #d8b4fe; }
.cal-wl {
    flex: none; width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center;
    background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text-2); transition: all .2s;
}
.cal-wl .ic { width: 18px; height: 18px; stroke-width: 2.2; }
.cal-wl:hover { color: var(--text); border-color: var(--muted); }
.cal-wl.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 1180px) { .nav a { padding: 8px 8px; font-size: 14px; } }
