:root {
    --bg: #07080c;
    --panel: #11131a;
    --panel-2: #181b24;
    --panel-3: #20232e;
    --text: #f7f7fa;
    --muted: #a7abb7;
    --line: rgba(255, 255, 255, .11);
    --brand: #ff466d;
    --brand-2: #ff884d;
    --focus: #80bfff;
    --ok: #55d89a;
    --danger: #ff7180;
    --page-pad: clamp(18px, 5vw, 76px);
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; overflow-x: hidden; background: var(--bg); color: var(--text); }
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { max-width: 100%; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, video:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 200; padding: 12px 16px; border-radius: 10px; background: #fff; color: #111; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { color: #ff8ca7; font-size: 12px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }

.topbar { position: sticky; top: 0; z-index: 40; display: flex; min-height: 72px; align-items: center; gap: clamp(14px, 2vw, 30px); padding: 10px var(--page-pad); border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(7,8,12,.88); backdrop-filter: blur(18px); }
.brand { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; color: var(--text); font-size: 20px; font-weight: 850; letter-spacing: -.02em; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; background: linear-gradient(145deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 28px rgba(255,70,109,.26); color: #fff; font-size: 14px; font-weight: 900; }
.brand-logo { width: 42px; height: 42px; object-fit: contain; }
.main-nav { display: flex; min-width: 0; align-items: center; gap: 4px; }
.main-nav a { display: inline-flex; min-height: 44px; align-items: center; padding: 0 14px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 650; text-decoration: none; }
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,.08); color: #fff; }
.search { display: flex; min-width: 180px; max-width: 330px; flex: 1; margin-left: auto; }
.search input { width: 100%; min-width: 0; height: 44px; border: 1px solid var(--line); border-right: 0; border-radius: 999px 0 0 999px; outline: 0; background: rgba(255,255,255,.07); color: #fff; padding: 0 4px 0 17px; }
.search input::placeholder { color: #8e929d; }
.search input:focus { border-color: var(--focus); background: rgba(255,255,255,.1); }
.search button { width: 50px; min-height: 44px; border: 1px solid var(--line); border-left: 0; border-radius: 0 999px 999px 0; background: rgba(255,255,255,.07); color: #fff; cursor: pointer; font-size: 25px; }
.actions { display: flex; align-items: center; gap: 8px; }

.primary, .ghost, .danger, .episode, .tab { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 0; border-radius: 12px; cursor: pointer; color: #fff; padding: 10px 16px; font-weight: 700; text-decoration: none; }
.primary { background: linear-gradient(135deg, var(--brand), #e52a74); box-shadow: 0 10px 30px rgba(255,70,109,.2); }
.primary:hover { filter: brightness(1.09); transform: translateY(-1px); }
.ghost { border: 1px solid var(--line); background: rgba(255,255,255,.075); }
.ghost:hover { background: rgba(255,255,255,.13); }
.danger { background: #35161d; color: #ffabb4; }
.large { min-height: 48px; padding: 12px 22px; }
.compact { min-height: 38px; width: max-content; padding: 7px 12px; font-size: 13px; }
button:disabled { cursor: not-allowed; opacity: .55; }

.hero-carousel { position: relative; min-height: clamp(500px, 63vw, 720px); overflow: hidden; background: #0e1016; }
.hero-track, .hero-slide { position: absolute; inset: 0; }
.hero-slide { isolation: isolate; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%; z-index: -3; }
.hero-original-art { position: absolute; inset: 0; z-index: -4; overflow: hidden; background: radial-gradient(circle at 70% 32%, #813754 0, #2b1530 29%, transparent 58%), linear-gradient(120deg,#111927,#281526 58%,#08090d); }
.hero-original-art span { position: absolute; border-radius: 46% 54% 66% 34%; filter: blur(1px); transform: rotate(24deg); }
.hero-original-art span:nth-child(1) { right: 9%; top: 7%; width: 38vw; height: 48vw; max-height: 620px; background: linear-gradient(145deg, rgba(255,134,83,.85), rgba(183,36,102,.18)); box-shadow: 0 0 130px rgba(255,70,109,.28); }
.hero-original-art span:nth-child(2) { right: 26%; top: 18%; width: 18vw; height: 31vw; background: rgba(16,12,28,.72); }
.hero-original-art span:nth-child(3) { right: -5%; bottom: -24%; width: 42vw; height: 42vw; background: rgba(20,14,39,.72); }
.hero-shade { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(6,7,10,.98) 0, rgba(6,7,10,.73) 39%, rgba(6,7,10,.18) 72%), linear-gradient(0deg, var(--bg) 0, transparent 32%); }
.hero-copy { position: absolute; left: var(--page-pad); bottom: clamp(85px, 11vw, 150px); width: min(620px, calc(100% - 36px)); }
.hero-copy h1 { max-width: 680px; margin: 13px 0 18px; font-size: clamp(42px, 6vw, 78px); line-height: .99; letter-spacing: -.052em; text-wrap: balance; }
.hero-copy p { max-width: 570px; margin: 0 0 26px; color: #d5d6dc; font-size: clamp(16px, 1.45vw, 20px); line-height: 1.6; }
.carousel-arrow { position: absolute; z-index: 3; top: 50%; display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; background: rgba(8,9,13,.55); color: #fff; cursor: pointer; font-size: 36px; transform: translateY(-50%); }
.carousel-arrow.previous { left: max(12px, 2vw); }
.carousel-arrow.next { right: max(12px, 2vw); }
.carousel-dots { position: absolute; z-index: 3; right: var(--page-pad); bottom: 48px; display: flex; gap: 8px; }
.carousel-dots button { width: 9px; height: 9px; min-height: 9px; border: 0; border-radius: 999px; background: rgba(255,255,255,.42); cursor: pointer; padding: 0; }
.carousel-dots button.active { width: 30px; background: #fff; }

.home-sections { padding: 0 0 44px; }
.home-catalog-heading { padding: 42px var(--page-pad) 0; }
.home-catalog-heading h2 { margin: 6px 0 0; font-size: clamp(26px, 3vw, 40px); }
.rail-section { padding: 32px var(--page-pad) 18px; }
.rail-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.rail-heading h2 { margin: 5px 0 0; font-size: clamp(23px, 2.4vw, 32px); letter-spacing: -.025em; }
.rail-controls { display: flex; gap: 8px; }
.rail-controls button { width: 44px; height: 44px; padding: 0; }
.poster-rail { display: grid; grid-auto-columns: clamp(152px, 15vw, 224px); grid-auto-flow: column; gap: clamp(12px, 1.4vw, 20px); overflow-x: auto; overscroll-behavior-inline: contain; padding: 2px 2px 18px; scroll-behavior: smooth; scroll-snap-type: inline mandatory; scrollbar-width: thin; scrollbar-color: #3b3e48 transparent; }
.home-poster-grid { display: grid; grid-template-columns: repeat(var(--desktop-columns, 5), minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.home-poster-grid .poster-card { min-width: 0; }
.poster-card { position: relative; min-width: 0; scroll-snap-align: start; }
.poster-card > a { display: block; color: inherit; text-decoration: none; }
.poster-shell, .poster-fallback { position: relative; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 14px; background: linear-gradient(145deg,#34384a,#161924 58%,#101118); }
.poster-shell { aspect-ratio: 2/3; }
.poster-shell img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.poster-shell img[data-missing="true"] { display: none; }
.poster-placeholder { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 72% 20%, rgba(255,111,129,.45), transparent 33%), linear-gradient(145deg,#2a2135,#131824); color: rgba(255,255,255,.82); font-size: clamp(44px, 7vw, 80px); font-weight: 900; }
.poster-card:hover .poster-shell img { transform: scale(1.035); }
.poster-card h3 { min-height: 2.6em; margin: 10px 2px 5px; overflow: hidden; font-size: 15px; line-height: 1.3; }
.poster-card .card-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.continue-progress { position: absolute; z-index: 4; left: 8px; right: 8px; bottom: 8px; width: calc(100% - 16px); height: 4px; overflow: hidden; border: 0; border-radius: 999px; appearance: none; background: rgba(255,255,255,.28); }
.continue-progress::-webkit-progress-bar { border-radius: inherit; background: rgba(255,255,255,.28); }
.continue-progress::-webkit-progress-value { border-radius: inherit; background: var(--brand); }
.continue-progress::-moz-progress-bar { border-radius: inherit; background: var(--brand); }
.access-chip { position: absolute; z-index: 3; left: 9px; top: 9px; padding: 5px 8px; border-radius: 999px; background: rgba(6,7,10,.78); color: #fff; font-size: 11px; font-weight: 750; backdrop-filter: blur(8px); }
.skeleton-rail i { aspect-ratio: 2/3; border-radius: 14px; background: linear-gradient(100deg,#171923 30%,#242733 48%,#171923 66%); background-size: 250% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { to { background-position-x: -250%; } }

.page-shell, .article-page { min-height: calc(100vh - 72px); padding: clamp(54px, 7vw, 98px) var(--page-pad) 90px; }
.page-heading { max-width: 780px; margin-bottom: 32px; }
.page-heading h1, .centered-page h1 { margin: 9px 0 13px; font-size: clamp(38px, 5vw, 64px); line-height: 1; letter-spacing: -.045em; }
.page-heading p, .centered-page p { color: var(--muted); font-size: 18px; line-height: 1.65; }
.content-section { padding: 0; }
.section-head { display: flex; justify-content: flex-end; margin-bottom: 15px; }
.catalog { display: grid; grid-template-columns: repeat(var(--desktop-columns, 5), minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); }
.card { min-width: 0; cursor: pointer; }
.card .poster { width: 100%; aspect-ratio: 2/3; border: 1px solid var(--line); border-radius: 14px; object-fit: cover; background: linear-gradient(145deg,#302941,#111722); }
.card-body { padding: 10px 2px; }
.card h3 { margin: 0 0 6px; font-size: 15px; }
.meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.empty { grid-column: 1/-1; padding: 54px 20px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; }
.load-more { display: flex; margin: 28px auto 0; }
.category-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.category-card { position: relative; display: flex; min-height: 170px; flex-direction: column; justify-content: end; overflow: hidden; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(circle at 82% 10%,rgba(255,79,116,.28),transparent 38%),linear-gradient(145deg,#202536,#11131a); text-decoration: none; isolation: isolate; }
.category-card:nth-child(3n+2) { background: radial-gradient(circle at 80% 12%,rgba(88,111,255,.3),transparent 38%),linear-gradient(145deg,#202536,#11131a); }
.category-card:nth-child(3n+3) { background: radial-gradient(circle at 80% 12%,rgba(255,163,76,.28),transparent 38%),linear-gradient(145deg,#202536,#11131a); }
.category-card-art { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.category-card.has-cover::after { position: absolute; z-index: 1; inset: 0; background: linear-gradient(180deg,rgba(5,6,10,.08),rgba(5,6,10,.94)); content: ""; }
.category-card.has-cover:hover .category-card-art { transform: scale(1.035); }
.category-card-copy { position: relative; z-index: 2; display: block; }
.category-card h2 { margin: 6px 0; font-size: 24px; }
.category-card p { margin: 0; color: var(--muted); }

.detail-page { min-height: calc(100vh - 72px); padding-bottom: 70px; }
.detail-backdrop { position: absolute; inset: 72px 0 auto; height: min(72vh,720px); overflow: hidden; z-index: 0; }
.detail-backdrop img { width: 100%; height: 100%; object-fit: cover; filter: blur(22px) saturate(.8); opacity: .42; transform: scale(1.08); }
.detail-backdrop > div { position: absolute; inset: 0; background: linear-gradient(90deg,var(--bg) 0,rgba(7,8,12,.68) 55%,var(--bg)),linear-gradient(0deg,var(--bg),transparent 65%); }
.detail-content { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(190px,270px) minmax(0,760px); gap: clamp(28px,5vw,68px); align-items: end; min-height: min(72vh,720px); padding: 62px var(--page-pad) 54px; }
.detail-poster-wrap { aspect-ratio: 2/3; box-shadow: 0 28px 80px rgba(0,0,0,.48); }
.detail-poster-wrap > span, .series-cover-wrap > span { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.7); font-size: 76px; font-weight: 900; }
.detail-poster { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
.detail-copy h1 { margin: 10px 0 14px; font-size: clamp(40px,5vw,70px); line-height: 1; letter-spacing: -.05em; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.detail-meta span { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(0,0,0,.28); color: #d8dae0; font-size: 12px; }
.detail-description { max-width: 700px; color: #d2d4db; font-size: 17px; line-height: 1.7; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 10px; }
.detail-episodes { position: relative; z-index: 1; padding: 16px var(--page-pad); }
.episode-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.episode-tile { display: grid; min-height: 74px; grid-template-columns: 46px minmax(0,1fr) 20px; align-items: center; gap: 12px; padding: 10px 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.045); text-decoration: none; }
.episode-tile:hover { border-color: rgba(255,104,138,.62); background: rgba(255,255,255,.075); }
.episode-number { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: #282b35; color: #ff91aa; font-weight: 850; }
.episode-tile strong, .episode-tile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.episode-tile small { margin-top: 5px; color: var(--muted); }

.episode-page { min-height: calc(100vh - 72px); padding: 22px var(--page-pad) 70px; }
.episode-breadcrumb { display: flex; align-items: center; gap: 9px; overflow: hidden; margin: 4px 0 20px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.episode-breadcrumb a { text-decoration: none; }
.watch-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,340px); gap: 18px; }
.video-stage { min-width: 0; }
.video-stage h1 { margin: 18px 0 4px; font-size: clamp(24px,3vw,38px); }
.video-frame, .modal-player-frame { position: relative; display: grid; min-height: min(70vh,760px); place-items: center; overflow: hidden; border: 1px solid #222631; border-radius: 17px; background: #000; }
.video-frame video { width: auto; height: min(70vh,760px); max-width: 100%; aspect-ratio: 9/16; background: #000; }
.player-loading { position: absolute; inset: 0; display: grid; place-items: center; background: #050506; color: var(--muted); }
.player-paywall { position: absolute; inset: 0; z-index: 5; display: grid; align-content: center; justify-items: center; padding: 28px; background: radial-gradient(circle at 50% 34%,rgba(255,70,109,.2),transparent 35%),rgba(5,5,7,.93); text-align: center; }
.player-paywall h2, .player-paywall h3 { margin: 8px 0; font-size: clamp(28px,4vw,44px); }
.player-paywall p { max-width: 460px; color: var(--muted); line-height: 1.6; }
.player-paywall > div { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.paywall-icon { font-size: 42px; color: #ff7898; }
.player-toolbar { display: flex; justify-content: space-between; gap: 9px; margin-top: 12px; }
#episodeDrawerButton, #episodeDrawerClose { display: none; }
.episode-drawer { max-height: min(70vh,760px); overflow: auto; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.drawer-head { position: sticky; top: 0; z-index: 2; display: flex; min-height: 56px; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); background: rgba(17,19,26,.94); }
.episode-drawer > a { display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 4px 10px; padding: 13px 14px; border-bottom: 1px solid rgba(255,255,255,.06); color: var(--muted); text-decoration: none; }
.episode-drawer > a span:nth-child(2) { color: var(--text); }
.episode-drawer > a small { grid-column: 2; }
.episode-drawer > a.active { border-left: 3px solid var(--brand); background: rgba(255,70,109,.09); }
.centered-page { display: grid; max-width: 850px; align-content: center; justify-items: start; }

.filter-pills { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 24px; padding-bottom: 8px; }
.filter-pills button { flex: 0 0 auto; min-height: 42px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); padding: 0 15px; cursor: pointer; }
.filter-pills button.active { border-color: var(--brand); background: rgba(255,70,109,.13); color: #fff; }
.article-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.article-card { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--panel); }
.article-card a { display: block; text-decoration: none; }
.article-card img, .article-image-placeholder { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: radial-gradient(circle at 70% 20%,rgba(255,96,133,.35),transparent 36%),#1a1e2a; }
.article-card div { padding: 17px; }
.article-card h2 { margin: 6px 0 9px; font-size: 20px; }
.article-card p { color: var(--muted); line-height: 1.55; }
.article-page { max-width: 980px; margin: auto; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); text-decoration: none; }
.article-page header { margin: 42px 0 30px; }
.article-page header h1 { margin: 9px 0; font-size: clamp(40px,6vw,72px); line-height: 1.02; letter-spacing: -.045em; }
.article-body { color: #d9dae0; font-size: 18px; line-height: 1.8; }
.article-body img { border-radius: 16px; }
.article-body a { color: #ff9cb2; }
.article-body blockquote { margin: 24px 0; padding: 12px 20px; border-left: 4px solid var(--brand); background: rgba(255,255,255,.045); color: #ececf0; }
.article-body pre { max-width: 100%; overflow: auto; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #0b0d12; }
.article-body code { padding: 2px 5px; border-radius: 5px; background: #191c25; font-size: .9em; }

.backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.78); backdrop-filter: blur(7px); }
.dialog { position: fixed; z-index: 90; left: 50%; top: 50%; width: min(470px,calc(100vw - 28px)); max-height: min(90vh,900px); overflow: auto; padding: 28px; border: 1px solid rgba(255,255,255,.13); border-radius: 20px; background: linear-gradient(145deg,#191c25,#0d0f14); box-shadow: 0 32px 110px rgba(0,0,0,.67); transform: translate(-50%,-50%); }
.dialog.wide { width: min(980px,calc(100vw - 28px)); }
.dialog h2 { margin: 8px 0 17px; font-size: 30px; }
.close { position: absolute; right: 12px; top: 10px; z-index: 3; display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 50%; background: rgba(0,0,0,.36); color: #d6d7dd; cursor: pointer; font-size: 28px; }
.series-layout { display: grid; grid-template-columns: 240px 1fr; gap: 28px; }
.series-cover-wrap { aspect-ratio: 2/3; }
.series-cover { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
.series-cover:not([src]), .series-cover[src=""], .card .poster[data-missing="true"] { display: none; }
.series-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.series-actions .favorited { border-color: var(--brand); color: #ff94ab; }
.episodes { display: grid; gap: 8px; max-height: 400px; overflow: auto; margin-top: 20px; }
.episode { justify-content: flex-start; border: 1px solid transparent; background: #20232d; text-align: left; }
.episode .number { width: 50px; color: #ff8ca7; }
.episode .lock { margin-left: auto; color: #f1c86c; }
.tabs { display: flex; margin: 16px 0; padding: 4px; border-radius: 13px; background: #0a0c10; }
.tab { flex: 1; background: transparent; color: var(--muted); }
.tab.active { background: #272b36; color: #fff; }
.stack { display: grid; gap: 14px; }
.stack label, .coupon-entry { display: grid; gap: 7px; color: #c8cad1; }
.stack input, .coupon-entry input { min-height: 44px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: #0b0d12; color: #fff; padding: 10px 12px; }
.form-message { min-height: 20px; margin: 0; color: #ff95a0; }
.plans { display: grid; grid-template-columns: repeat(auto-fit,minmax(200px,1fr)); gap: 14px; margin-top: 18px; }
.plan { display: grid; gap: 10px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: #11131a; }
.plan-price { font-size: 28px; font-weight: 850; }
.coupon-entry span { display: flex; gap: 8px; }
.coupon-entry input { flex: 1; min-width: 0; text-transform: uppercase; }
.player-dialog { width: min(1050px,calc(100vw - 20px)); background: #050608; }
.modal-player-frame { min-height: min(70vh,700px); }
.modal-player-frame video { width: auto; max-width: 100%; height: min(70vh,700px); aspect-ratio: 9/16; background: #000; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 26px; max-width: min(560px,calc(100vw - 28px)); padding: 13px 18px; border: 1px solid #3a3e49; border-radius: 12px; background: #262a34; box-shadow: 0 14px 44px rgba(0,0,0,.5); transform: translateX(-50%); text-align: center; }
.cookie-consent { position: fixed; z-index: 110; left: 20px; right: 20px; bottom: 20px; display: flex; max-width: 820px; align-items: center; justify-content: space-between; gap: 20px; margin: auto; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel-2); box-shadow: 0 22px 70px #000; }
.cookie-consent p { margin: 0; line-height: 1.5; }
.cookie-consent > div { display: flex; flex: 0 0 auto; gap: 8px; }
.preview-notice { position: relative; z-index: 60; padding: 7px; background: #f0c45a; color: #1a1408; text-align: center; font-weight: 750; }
.site-footer { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 22px; padding: 38px var(--page-pad); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer > div p { margin: 8px 0 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer nav a { color: var(--text); text-decoration: none; }
.site-footer > span { grid-column: 1/-1; }
.footer-brand { width: max-content; }

@media (max-width: 1080px) {
    .main-nav a { padding-inline: 10px; }
    .search { max-width: 240px; }
    .catalog { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .watch-layout { grid-template-columns: minmax(0,1fr) 280px; }
}

@media (max-width: 820px) {
    .home-poster-grid { grid-template-columns: repeat(var(--mobile-columns, 2), minmax(0, 1fr)); }
    #episodeDrawerButton, #episodeDrawerClose { display: inline-flex; }
    .topbar { flex-wrap: wrap; gap: 8px 12px; padding: 10px 16px; }
    .brand { order: 1; }
    .actions { order: 2; margin-left: auto; }
    .main-nav { order: 3; width: 100%; overflow-x: auto; }
    .main-nav a { flex: 1 0 auto; justify-content: center; }
    .search { order: 4; max-width: none; flex-basis: 100%; }
    .hero-carousel { min-height: 580px; }
    .hero-copy { left: 22px; bottom: 82px; }
    .hero-shade { background: linear-gradient(0deg,var(--bg) 0,rgba(7,8,12,.78) 58%,rgba(7,8,12,.18)); }
    .carousel-dots { right: 22px; bottom: 35px; }
    .carousel-arrow { top: 42%; }
    .catalog { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .category-grid, .article-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .detail-content { grid-template-columns: 180px minmax(0,1fr); align-items: center; padding-top: 45px; }
    .episode-grid { grid-template-columns: 1fr; }
    .watch-layout { grid-template-columns: 1fr; }
    .episode-drawer { position: fixed; z-index: 70; left: 14px; right: 14px; bottom: 14px; max-height: 72vh; border-color: rgba(255,255,255,.18); box-shadow: 0 20px 80px #000; transform: translateY(calc(100% + 30px)); transition: transform .25s ease; }
    .episode-drawer.open { transform: translateY(0); }
    .video-frame { min-height: 65vh; }
    .video-frame video { height: 65vh; }
    .series-layout { grid-template-columns: 180px 1fr; }
}

@media (max-width: 560px) {
    :root { --page-pad: 14px; }
    .topbar { position: sticky; }
    .brand { font-size: 17px; }
    .brand-mark { width: 36px; height: 36px; }
    .actions .ghost { display: none; }
    .actions .primary { max-width: 145px; overflow: hidden; padding-inline: 12px; text-overflow: ellipsis; white-space: nowrap; }
    .main-nav { gap: 0; }
    .main-nav a { min-height: 42px; padding-inline: 12px; font-size: 13px; }
    .hero-carousel { min-height: 560px; }
    .hero-copy { width: calc(100% - 44px); }
    .hero-copy h1 { font-size: 42px; }
    .carousel-arrow { display: none; }
    .poster-rail { grid-auto-columns: 43vw; }
    .rail-section { padding-top: 26px; }
    .catalog { grid-template-columns: repeat(var(--mobile-columns,2),minmax(0,1fr)); gap: 14px 10px; }
    .category-grid, .article-grid { grid-template-columns: 1fr; }
    .page-shell, .article-page { padding-top: 46px; }
    .detail-backdrop { inset-block-start: 150px; }
    .detail-content { display: block; min-height: auto; padding-top: 52px; }
    .detail-poster-wrap { width: 148px; margin-bottom: 24px; }
    .detail-copy h1 { font-size: 42px; }
    .detail-actions > * { width: 100%; }
    .episode-page { padding-top: 14px; }
    .video-frame { min-height: 58vh; border-radius: 10px; }
    .video-frame video { width: 100%; height: 58vh; }
    .player-toolbar .ghost { flex: 1; min-width: 0; padding-inline: 8px; font-size: 12px; }
    .series-layout { grid-template-columns: 1fr; }
    .series-cover-wrap { display: none; }
    .dialog { padding: 23px 18px; }
    .cookie-consent { flex-direction: column; align-items: stretch; }
    .cookie-consent > div { display: grid; grid-template-columns: 1fr 1fr; }
    .site-footer { grid-template-columns: 1fr; align-items: start; }
    .site-footer > span { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
