/* ===== Tokens ===== */
:root {
  --bg: #0c0c12;
  --surface: #15151f;
  --surface-2: #1d1d2a;
  --line: #2a2a3a;
  --text: #f3f3f7;
  --muted: #9a9ab0;
  --accent: #ff3b6b;
  --accent-2: #ffb020;
  --dub: #2fb3ff;
  --sub: #a46bff;
  --radius: 12px;
  --gap: 12px;
  --header-h: 60px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 900px) { body { padding-bottom: 0; } }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.rd-noscroll { overflow: hidden; }
.container { width: 100%; max-width: 1400px; margin: 0 auto; padding-inline: 16px; }
.muted { color: var(--muted); }
h1, h2, h3 { line-height: 1.25; margin: 0; }

/* ===== Buttons / chips ===== */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); font-weight: 600; transition: background .15s, transform .1s;
}
.btn:hover { background: #262636; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: default; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #ff5480; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn.is-on { border-color: var(--accent); color: var(--accent); }
.link-btn { background: none; border: 0; color: var(--accent); padding: 4px 0; font-weight: 600; }
.pill { background: rgba(255,255,255,.12); padding: 2px 10px; border-radius: 999px; }
.chip-strip { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 4px; scrollbar-width: none; }
.chip-strip::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px;
}
.chip img { border-radius: 4px; }
.chip.is-active, .chip:hover { border-color: var(--accent); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.tag small { color: var(--muted); margin-left: 4px; }
.tag:hover { border-color: var(--accent); }
.tag-cloud.small .tag { font-size: 13px; padding: 4px 10px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(12,12,18,.88); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; flex-shrink: 0; }
.brand-mark {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; font-size: 13px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
}
.main-nav { display: none; gap: 4px; align-items: center; }
.nav-link { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; background: none; border: 0; }
.nav-link:hover, .nav-link.is-active { color: var(--text); background: var(--surface); }
.nav-drop { position: relative; }
.drop-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 220px; padding: 6px; margin-top: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.nav-drop.open .drop-menu { display: block; }
.drop-menu a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; }
.drop-menu a:hover { background: var(--surface-2); }
.drop-menu small { color: var(--muted); }
.search { margin-left: auto; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 4px 0 14px; min-width: 0; flex: 0 1 300px; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); padding: 9px 0; font: inherit; }
.search button { background: none; border: 0; padding: 6px 8px; color: var(--muted); display: grid; place-items: center; }
.search:focus-within { border-color: var(--accent); }
.search-big { max-width: 640px; margin: 0 0 16px; padding: 4px 4px 4px 18px; }
.search-big input { font-size: 17px; }
@media (min-width: 900px) { .main-nav { display: flex; } }

/* mobile tab bar */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(16,16,24,.96); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: 11px; color: var(--muted); }
.tabbar svg { width: 22px; height: 22px; fill: currentColor; }
.tabbar a.is-active { color: var(--accent); }
@media (min-width: 900px) { .tabbar { display: none; } }

/* ===== Spotlight ===== */
.spotlight { position: relative; margin: 16px 0 4px; }
.spot-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 18px; scrollbar-width: none; }
.spot-track::-webkit-scrollbar { display: none; }
.spot-slide {
  position: relative; flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: auto 1fr;
  gap: 20px; align-items: center; padding: 22px; min-height: 260px; overflow: hidden; isolation: isolate;
}
.spot-bg { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: blur(28px) brightness(.45); z-index: -2; transform: scale(1.1); }
.spot-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,12,18,.85), rgba(12,12,18,.3)); z-index: -1; }
.spot-poster img { width: 130px; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.6); }
.spot-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: #d6d6e2; font-size: 13px; margin-bottom: 8px; }
.spot-title { font-size: clamp(20px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.spot-excerpt { color: #cfcfdc; margin: 0 0 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; max-width: 680px; }
.spot-dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.spot-dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; background: #444; padding: 0; transition: width .2s; }
.spot-dots button.on { width: 22px; background: var(--accent); }
@media (min-width: 700px) {
  .spot-slide { padding: 40px 48px; min-height: 380px; gap: 40px; }
  .spot-poster img { width: 220px; }
}
@media (max-width: 480px) {
  .spot-excerpt { -webkit-line-clamp: 2; font-size: 14px; }
  .spot-poster img { width: 108px; }
}

/* ===== Sections / rows ===== */
.row-section { margin: 26px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { font-size: 19px; font-weight: 750; display: flex; align-items: center; gap: 8px; }
.section-logo { border-radius: 6px; }
.see-all { color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.see-all:hover { color: var(--accent); }
.row-wrap { position: relative; }
.row-scroll {
  display: grid; grid-auto-flow: column; grid-auto-columns: 38%; gap: var(--gap);
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; padding-bottom: 4px;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { scroll-snap-align: start; }
@media (min-width: 560px) { .row-scroll { grid-auto-columns: 27%; } }
@media (min-width: 900px) { .row-scroll { grid-auto-columns: calc((100% - 5 * var(--gap)) / 6); } }
@media (min-width: 1250px) { .row-scroll { grid-auto-columns: calc((100% - 6 * var(--gap)) / 7); } }
.row-nav {
  display: none; position: absolute; top: 38%; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: rgba(21,21,31,.92); font-size: 24px; line-height: 1;
}
.row-nav.prev { left: -14px; } .row-nav.next { right: -14px; }
@media (hover: hover) and (min-width: 900px) { .row-wrap:hover .row-nav { display: grid; place-items: center; } }

/* ===== Card ===== */
.card { min-width: 0; }
.card-link { display: block; }
.card-poster { position: relative; aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.card-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card-link:hover .card-poster img { transform: scale(1.05); }
.poster-fallback { width: 100%; height: 100%; display: grid; place-items: center; font-size: 48px; font-weight: 800; color: var(--muted); }
.badge { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 3px 7px; border-radius: 6px; color: #fff; }
.series-meta .badge { position: static; }
.badge-dub { background: var(--dub); }
.badge-sub { background: var(--sub); }
.eps { position: absolute; bottom: 8px; right: 8px; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.65); padding: 2px 7px; border-radius: 6px; }
.resume { position: absolute; bottom: 8px; left: 8px; font-size: 11px; font-weight: 700; background: var(--accent); padding: 2px 7px; border-radius: 6px; }
.play-ico {
  position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,59,107,.92); color: #fff; opacity: 0; transform: scale(.8); transition: .2s; font-size: 16px;
}
.card-link:hover .play-ico { opacity: 1; transform: scale(1); }
.card-body { padding: 8px 2px 0; }
.card-title { font-size: 14px; font-weight: 650; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 2px; white-space: nowrap; overflow: hidden; }
.rank {
  position: absolute; left: 6px; bottom: -6px; font-size: 64px; font-weight: 900; line-height: 1; color: rgba(255,255,255,.92);
  -webkit-text-stroke: 2px rgba(0,0,0,.6); text-shadow: 0 4px 18px rgba(0,0,0,.7);
}
.card-ranked .eps { display: none; }

/* ===== Grid / explore ===== */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px var(--gap); }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 800px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1050px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.grid-ad { grid-column: 1 / -1; }
.page-head { display: flex; align-items: center; gap: 14px; margin: 22px 0 14px; }
.page-head h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.page-head p { margin: 4px 0 0; }
.head-logo { border-radius: 10px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; overflow-x: auto; max-width: 100%; }
.seg-item { padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; cursor: pointer; }
.seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.seg-item.is-active { background: var(--accent); color: #fff; }
.filter-selects { display: flex; flex-wrap: wrap; gap: 8px; }
select {
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; font-size: 14px; max-width: 100%;
}
.result-count { margin: 4px 0 14px; font-size: 14px; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 30px 0; }
.pagination a, .pagination span { min-width: 40px; padding: 8px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); text-align: center; font-weight: 600; }
.pagination .current { background: var(--accent); border-color: var(--accent); }
.pagination a:hover { border-color: var(--accent); }
.empty { text-align: center; padding: 60px 16px; }
.empty h1 { font-size: 64px; }
.empty .btn { margin-top: 12px; }

/* ===== Watch page: stage (video left, episodes right) ===== */
html, body { overflow-x: clip; }
.main-full { width: 100%; }
.stage { position: relative; isolation: isolate; overflow: hidden; background: #0e0e14; border-bottom: 1px solid var(--line); }
.stage-bg {
  position: absolute; inset: -80px; z-index: -1; background-size: cover; background-position: center;
  filter: blur(60px) brightness(.35) saturate(1.2); transform: scale(1.1);
}
.stage-crumbs { background: rgba(10,10,15,.8); border-bottom: 1px solid rgba(255,255,255,.06); }
.stage-crumbs .crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding-block: 8px; font-size: 12px; }
.stage-crumbs [aria-current] { color: var(--text); font-weight: 700; }
.stage-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 12px 20px; }
.stage-main { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.stage-ad { width: 100%; display: flex; justify-content: center; }
.stage-ad .ad-slot { margin: 0; max-width: 728px; }
.stage-ad:empty { display: none; }
.player {
  position: relative; background: #000; border-radius: 16px; overflow: hidden; aspect-ratio: 9/16;
  height: min(72vh, 780px); max-width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.stage.is-wide .player { width: 100%; height: auto; aspect-ratio: 16/9; }
.stage-eps { min-width: 0; }
.eps-panel {
  display: flex; flex-direction: column; background: rgba(21,21,31,.85); border: 1px solid var(--line);
  border-radius: 14px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.eps-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.eps-head h2 { font-size: 16px; font-weight: 750; }
.eps-head .tool-ep { padding: 0; }
.eps-panel .ep-tabs { padding: 10px 14px 0; margin: 0; }
.eps-body { padding: 12px 14px 14px; overflow-y: auto; overscroll-behavior: contain; max-height: 360px; }
@media (min-width: 1000px) {
  .stage-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
  .stage-eps { position: relative; }               /* panel height follows the video column */
  .eps-panel { position: absolute; inset: 0; }
  .eps-body { flex: 1; min-height: 0; max-height: none; }
}
@media (max-width: 599px) {
  .stage-grid { padding-inline: 0; }
  .stage-ad { padding-inline: 12px; }
  .player { width: 100%; height: auto; max-height: 80vh; border-radius: 0; }
  .stage-eps { padding-inline: 12px; }
}

/* ===== Watch page: info below the stage ===== */
.watch-info { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px 32px; margin-top: 20px; }
@media (min-width: 1000px) { .watch-info { grid-template-columns: minmax(0, 1fr) 340px; } }
.watch-aside .ad-slot:first-child { margin-top: 0; }
.player video, .player-embed { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; border: 0; }
.player-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.player-start {
  position: absolute; inset: 0; margin: auto; width: 76px; height: 76px; border-radius: 50%; border: 0; z-index: 4;
  background: rgba(255,59,107,.92); color: #fff; font-size: 28px; box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.player-start span { margin-left: 4px; }
.player.is-playing .player-start { display: none; }

/* ----- custom player overlay ----- */
.player video { cursor: pointer; }
.pc-top, .pc-bottom { position: absolute; left: 0; right: 0; z-index: 5; transition: opacity .25s ease; }
.pc-top {
  top: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 12px 14px 28px; pointer-events: none; background: linear-gradient(rgba(0,0,0,.7), transparent);
  font-size: 13px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.8);
}
.pc-ep { white-space: nowrap; line-height: 1.35; }
.pc-full { color: var(--accent-2); letter-spacing: .04em; }
.pc-title { min-width: 0; max-width: 62%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.pc-bottom { bottom: 0; padding: 26px 10px 8px; background: linear-gradient(transparent, rgba(0,0,0,.8)); }

.pc-progress { position: relative; height: 18px; margin: 0 6px 2px; cursor: pointer; touch-action: none; outline: none; }
.pc-track { position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 4px; background: rgba(255,255,255,.25); overflow: hidden; transition: height .15s, margin .15s; }
.pc-buf { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(255,255,255,.35); }
.pc-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent-2); }
.pc-knob {
  position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 0 3px rgba(255,176,32,.25); transform: scale(0); transition: transform .15s;
}
.pc-progress:hover .pc-track, .is-seeking .pc-track, .pc-progress:focus-visible .pc-track { height: 6px; margin-top: -3px; }
.pc-progress:hover .pc-knob, .is-seeking .pc-knob, .pc-progress:focus-visible .pc-knob { transform: scale(1); }
.pc-tip {
  position: absolute; bottom: 20px; transform: translateX(-50%); padding: 2px 7px; border-radius: 5px;
  background: rgba(0,0,0,.85); font-size: 12px; font-weight: 700; pointer-events: none; white-space: nowrap;
}

.pc-row { display: flex; align-items: center; gap: 2px; }
.pc-btn {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 8px;
  background: none; color: #fff; flex-shrink: 0;
}
.pc-btn svg { width: 21px; height: 21px; }
.pc-btn:hover:not(:disabled) { background: rgba(255,255,255,.12); }
.pc-btn:disabled { opacity: .35; cursor: default; }
.pc-btn:focus-visible, .pc-menu button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.player .i-pause, .player.is-playing .i-play, .player .i-muted, .player.is-muted .i-vol, .player .i-fs-exit, .player.is-fs .i-fs { display: none; }
.player.is-playing .i-pause, .player.is-muted .i-muted, .player.is-fs .i-fs-exit { display: block; }
.pc-vol { display: flex; align-items: center; }
.pc-volume { width: 0; opacity: 0; transition: width .2s, opacity .2s; accent-color: var(--accent-2); height: 4px; cursor: pointer; }
.pc-vol:hover .pc-volume, .pc-vol:focus-within .pc-volume { width: 64px; opacity: 1; margin-right: 6px; }
.pc-time { font-size: 12px; color: rgba(255,255,255,.75); white-space: nowrap; margin-left: 4px; font-variant-numeric: tabular-nums; }
.pc-time b { color: #fff; }
.pc-spacer { flex: 1; }
.pc-menu-wrap { position: relative; }
.pc-menu {
  position: absolute; right: 0; bottom: 42px; min-width: 150px; padding: 6px; border-radius: 10px;
  background: rgba(20,20,28,.96); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 12px 30px rgba(0,0,0,.6);
}
.pc-menu-title { padding: 4px 10px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pc-menu button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 6px; background: none; font-size: 13px; }
.pc-menu button:hover { background: rgba(255,255,255,.08); }
.pc-menu button.on { color: var(--accent-2); font-weight: 700; }
.pc-menu button.on::after { content: " ✓"; }

/* loading spinner */
.pc-spinner {
  position: absolute; inset: 0; margin: auto; z-index: 4; width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.2); border-top-color: var(--accent-2); animation: pcSpin .8s linear infinite; display: none; pointer-events: none;
}
.player.is-loading.is-playing .pc-spinner { display: block; }
@keyframes pcSpin { to { transform: rotate(360deg); } }

/* auto-hide while playing */
.player.is-playing:not(.show-ui) .pc-top,
.player.is-playing:not(.show-ui) .pc-bottom { opacity: 0; pointer-events: none; }
.player.is-playing:not(.show-ui) { cursor: none; }
.player.is-playing:not(.show-ui) video { cursor: none; }

/* narrow players: hide the less important buttons */
@media (max-width: 380px) { .pc-time { display: none; } }
.player .pc-row [data-pip][hidden] { display: none; }

/* embeds use their own controls; ads cover the overlay */
.player.is-embed .pc-bottom, .player.is-embed .pc-spinner { display: none; }
.player.is-embed .pc-top { pointer-events: none; }
.player.is-ad .player-start, .player.is-ad .pc-top, .player.is-ad .pc-bottom, .player.is-ad .pc-spinner { display: none; }

/* vertical series fill the 9:16 frame (no black bars around 3:4 posters) */
.player[data-orientation="vertical"] video { object-fit: cover; }

/* fullscreen */
.player:fullscreen { width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; border-radius: 0; }
.player:-webkit-full-screen { width: 100vw; height: 100vh; max-height: none; aspect-ratio: auto; border-radius: 0; }
.player:fullscreen video, .player:-webkit-full-screen video { object-fit: contain; }
.player-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 16px; }
.tool {
  min-width: 42px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; font-weight: 700;
}
.tool:hover:not(:disabled) { border-color: var(--accent); }
.tool:disabled { opacity: .35; cursor: default; }
.tool-ep { padding: 6px 12px; font-weight: 800; font-size: 14px; color: var(--accent); }
.tool-speed { padding: 6px 8px; border-radius: 10px; font-size: 13px; }
.player-tools .switch { margin-left: 4px; }
.badge-full {
  display: inline-block; vertical-align: middle; margin-left: 6px; font-size: 11px; font-weight: 800; letter-spacing: .05em;
  padding: 3px 8px; border-radius: 6px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
}
.info-block { margin: 22px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.info-block h2 { font-size: 17px; font-weight: 750; margin-bottom: 10px; }
.details { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0; }
.details > div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.details dt { font-size: 12px; color: var(--muted); }
.details dd { margin: 2px 0 0; font-weight: 650; }
.details a { color: var(--accent); }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.faq summary { padding: 12px 14px; font-weight: 650; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 800; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0; padding: 0 14px 14px; color: #d2d2de; }
.switch { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer; }
.switch input { accent-color: var(--accent); }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a:hover { color: var(--text); }
.series-title { font-size: clamp(22px, 3vw, 32px); font-weight: 800; letter-spacing: -.02em; }
.series-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--muted); font-size: 14px; margin: 10px 0 16px; }
.series-meta .rating { color: var(--accent-2); font-weight: 700; }
.series-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.desc { color: #d2d2de; max-height: 4.6em; overflow: hidden; position: relative; }
.desc.open { max-height: none; }
.watch-info .tag-cloud { margin: 14px 0; }
.info-block:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.ep-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; }
.ep-tab { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; white-space: nowrap; }
.ep-tab.is-active { border-color: var(--accent); color: var(--accent); }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.ep-btn {
  display: grid; place-items: center; aspect-ratio: 1.25; border-radius: 10px; background: var(--surface);
  border: 1px solid var(--line); font-weight: 700; font-size: 14px;
}
.ep-btn:hover { border-color: var(--accent); }
.ep-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ===== Static pages / footer ===== */
.static-page { max-width: 820px; margin: 28px auto; }
.static-page h1 { font-size: 30px; margin-bottom: 16px; }
.prose { color: #d6d6e2; }
.prose a { color: var(--accent); }
.site-footer { margin-top: 50px; border-top: 1px solid var(--line); background: #0a0a0f; }
.footer-grid { display: grid; gap: 24px; padding-block: 32px; grid-template-columns: 1fr 1fr; }
.footer-grid > div:first-child { grid-column: 1 / -1; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } .footer-grid > div:first-child { grid-column: auto; } }
.footer-grid h4 { margin: 0 0 10px; font-size: 14px; }
.footer-grid a:not(.brand) { display: block; color: var(--muted); font-size: 14px; padding: 3px 0; }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { padding-block: 16px 24px; font-size: 13px; border-top: 1px solid var(--line); }

/* ===== Ad slots (server-rendered) ===== */
.ad-slot { position: relative; display: flex; justify-content: center; margin: 18px auto; text-align: center; overflow: hidden; }
.ad-slot img { max-width: 100%; height: auto; border-radius: 10px; }
.ad-label, .rd-ad-tag {
  position: absolute; top: 4px; left: 4px; z-index: 2; font-size: 10px; font-weight: 700; letter-spacing: .05em;
  background: rgba(0,0,0,.6); color: #ffd36b; padding: 1px 6px; border-radius: 4px; pointer-events: none;
}
.ad-sticky_bottom {
  position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); z-index: 55; margin: 0;
  background: rgba(10,10,15,.96); border-top: 1px solid var(--line); padding: 6px 36px;
}
.ad-sticky_bottom img { max-height: 90px; width: auto; }
@media (min-width: 900px) { .ad-sticky_bottom { bottom: 0; } }
.ad-close { position: absolute; top: 4px; right: 6px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); font-size: 18px; line-height: 1; }

/* ===== JS ads: interstitial / player ===== */
.rd-interstitial {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 16px;
  animation: rdFade .2s ease;
}
@keyframes rdFade { from { opacity: 0; } to { opacity: 1; } }
.rd-ad-box { position: relative; width: min(92vw, 720px); min-height: 200px; max-height: 90vh; background: #000; border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.rd-ad-layer .rd-ad-media { position: relative; flex: 1; display: grid; place-items: center; min-height: 0; overflow: auto; }
.rd-ad-box .rd-ad-media img { max-height: 75vh; width: auto; margin: auto; }
.rd-ad-box .rd-ad-media video { width: 100%; max-height: 75vh; background: #000; }
.rd-player-ad { position: absolute; inset: 0; z-index: 10; background: #000; display: flex; flex-direction: column; }
.rd-player-ad .rd-ad-media video, .rd-player-ad .rd-ad-media img { width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.rd-ad-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(0,0,0,.85); font-size: 13px; position: relative;
}
.rd-ad-bar .rd-ad-tag { position: static; }
.rd-ad-time { color: var(--muted); }
.rd-ad-more { color: #fff; text-decoration: underline; }
.rd-ad-sound { background: rgba(255,255,255,.12); border: 0; border-radius: 6px; padding: 4px 8px; font-size: 12px; }
.rd-ad-skip {
  margin-left: auto; background: rgba(255,255,255,.95); color: #000; border: 0; border-radius: 6px; padding: 7px 14px; font-weight: 700;
}
.rd-ad-skip:disabled { background: rgba(255,255,255,.25); color: #ddd; cursor: default; }
.rd-pause-ad {
  position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(86%, 360px);
  background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 16px 50px rgba(0,0,0,.7);
}
.rd-pause-ad img { width: 100%; }
.rd-pause-close { position: absolute; top: 4px; right: 4px; z-index: 3; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.7); font-size: 18px; line-height: 1; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
