/* ==========================================================================
   NarutoBox — design system
   Recreated from measurements of the live site (see /ref/layout.json).
   ========================================================================== */

:root {
  color-scheme: dark;

  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --layer-sticky: 10;
  --layer-dropdown: 300;
  --layer-navbar: 600;
  --layer-sidebar: 900;
  --layer-modal: 1000;

  --radius: 12px;
  --radius-lg: 20px;

  /* black palette with warm orange highlights */
  --surface-page: #080808;
  --surface-page-overlay: #080808e6;
  --surface-secondary: #141414;
  --surface-tertiary: #222222;
  --surface-panel: #141414;
  --surface-panel-alt: #0e0e0e;
  --surface-card: #181818;
  --surface-card-title: #151515;
  --text-primary: #e8e8e8;
  --text-muted: #696969;
  --text-muted-strong: #a8a8a8;
  --border-color: #f5f5f51a;
  --border-color-strong: #f5f5f52e;
  --control-bg: #222222;
  --control-hover-bg: #292929;
  --control-text: #ebebeb;
  --shadow-color: #0009;
  --skeleton-base: #5555551a;
  --skeleton-highlight: #5555554d;

  --brand: #ff4500;
  --accent: #b5a8ff;
  --accent-soft: #b5a8ff40;
  --status-ongoing: #4d8a00;

  --nav-height: 63px;
  --page-pad: 9.6px;
  --sidebar-w: 398px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="light"] {
  color-scheme: light;
  --surface-page: #f5f5f5;
  --surface-page-overlay: #f5f5f5cc;
  --surface-secondary: #e0e0e0;
  --surface-tertiary: #dcdcdc;
  --surface-panel: #ececec;
  --surface-panel-alt: #eaeaea;
  --surface-card: #eee;
  --surface-card-title: #e8e8e8;
  --text-primary: #2a2a2a;
  --text-muted: #888;
  --text-muted-strong: #5d5d5d;
  --border-color: #0808081a;
  --border-color-strong: #0808082e;
  --control-bg: #d4d4d4;
  --control-hover-bg: #cfcfcf;
  --control-text: #333;
  --shadow-color: #00000040;
  --skeleton-base: #a5a5a51a;
  --skeleton-highlight: #a5a5a54d;
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; }

html {
  font-family: var(--font-body);
  background: var(--surface-page);
  color: var(--text-primary);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: #2a2a2a var(--surface-page);
}

body {
  max-width: 109rem;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 9px) var(--page-pad) calc(1em + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
  overflow-x: hidden;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; touch-action: manipulation; }
input, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; touch-action: manipulation; }
ul { list-style: none; margin: 0; padding: 0; }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

::selection { background: var(--accent); color: #0b0b0b; }

/* scrollbars */
.scroll-x::-webkit-scrollbar { height: 8px; }
.scroll-x::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 99px; }
.no-scrollbar { scrollbar-width: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* ---------- primitives ---------- */
.panel {
  background: var(--surface-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.btn:hover { background: var(--control-hover-bg); border-color: var(--border-color-strong); }
.btn:active { transform: scale(.985); }
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: #f4f4f4;
  color: #0b0b0b;
  border-color: #fff;
  font-weight: 650;
}
.btn-primary:hover { background: #fff; }

.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-secondary); }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.icon-btn:hover { background: var(--control-hover-bg); border-color: var(--border-color-strong); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn[data-variant="bare"] { background: transparent; border-color: transparent; }
.icon-btn[data-variant="bare"]:hover { background: #ffffff14; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 20px;
  border-radius: var(--radius);
  background: var(--surface-secondary);
  color: var(--text-primary);
  font-size: 12.8px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.chip:hover { background: var(--control-hover-bg); }
.chip[aria-current="true"], .chip.is-active {
  background: var(--accent-soft);
  color: var(--accent);
}

.kbd {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--border-color-strong);
  background: #ffffff08;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #00000073;
  color: #e8e8e8;
  font-size: 11.5px;
  font-weight: 500;
  backdrop-filter: blur(6px);
}
.tag svg { width: 12px; height: 12px; opacity: .8; }

.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--status-ongoing);
  flex: none;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--skeleton-base);
  border-radius: var(--radius);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--skeleton-highlight), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---------- navbar ---------- */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-height);
  background: var(--surface-panel-alt);
  border-bottom: 1px solid #ffffff0a;
  z-index: var(--layer-navbar);
}
.navbar-inner {
  max-width: 109rem;
  height: 100%;
  margin: 0 auto;
  padding: 9.6px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.brand-mark {
  font-family: var(--font-body);
  font-size: 25px;
  font-weight: 850;
  letter-spacing: -.065em;
  line-height: 1;
  text-transform: none;
}
.brand-mark .brand-accent { color: var(--brand); }
.brand:hover .brand-mark { opacity: .85; }

.nav-search {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 524px;
  height: 44px;
  margin: 0 auto;
  padding: 0 6px 0 14px;
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.nav-search:focus-within { border-color: #ffffff33; background: #1a1a1a; }
.nav-search > svg { width: 17px; height: 17px; color: var(--text-muted); flex: none; }
.nav-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13.6px;
  color: var(--text-primary);
}
.nav-search input::placeholder { color: var(--text-muted); }
.nav-search .kbd { flex: none; }
.nav-search .divider { width: 1px; height: 22px; background: var(--border-color); flex: none; }
.nav-search .icon-btn { width: 32px; height: 32px; background: transparent; border-color: transparent; border-radius: 6px; }
.nav-search .icon-btn:hover { background: #ffffff12; }
.nav-search .icon-btn svg { width: 17px; height: 17px; }

.nav-right { display: flex; align-items: center; gap: 10px; flex: none; }
.avatar-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .02em;
}
.avatar-btn:hover { background: var(--control-hover-bg); }

/* text that always sits on top of artwork keeps light colors in both themes */
.hero-badge,
.hero-nav .counter,
.hero-cta,
.card .caption,
.player-poster h3,
.player-poster p { color: #f4f4f4; }
.player-poster p { color: #a9a9a9; }

/* ---------- drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: #000000b3;
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
  z-index: var(--layer-sidebar);
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: 300px;
  max-width: 86vw;
  background: var(--surface-panel);
  border-right: 1px solid var(--border-color);
  transform: translateX(-102%);
  transition: transform .3s var(--ease);
  z-index: calc(var(--layer-sidebar) + 1);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
  overflow-y: auto;
}
.drawer.open { transform: none; }
.drawer .drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 14px;
}
.drawer a.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--text-muted-strong);
  font-size: 14px;
  font-weight: 500;
}
.drawer a.drawer-link:hover { background: var(--surface-secondary); color: var(--text-primary); }
.drawer a.drawer-link.active { background: var(--accent-soft); color: var(--accent); }
.drawer a.drawer-link svg { width: 18px; height: 18px; }
.drawer .divider { height: 1px; background: var(--border-color); margin: 10px 8px; }
.drawer .drawer-label {
  padding: 6px 12px;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  background: #0d0d0d;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s var(--ease);
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }
.hero-slide .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 28%;
  transform: scale(1.02);
}
.hero-slide.active .bg { animation: heroZoom 14s ease-out forwards; }
@keyframes heroZoom {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}
.hero-slide .scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #080808f2 0%, #080808b3 26%, #08080826 62%, #08080833 100%),
    linear-gradient(to right, #080808cc 0%, #08080800 55%, #08080840 100%);
}

.hero-topbar {
  position: absolute;
  top: 14px; left: 14px; right: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 99px;
  background: #000000a6;
  border: 1px solid #ffffff1a;
  backdrop-filter: blur(8px);
  font-size: 12px;
  font-weight: 500;
}
.hero-badge .dot { background: #62d26f; box-shadow: 0 0 0 3px #62d26f26; }
.hero-nav { display: flex; align-items: center; gap: 8px; }
.hero-nav .counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 32px;
  padding: 0 10px;
  border-radius: 99px;
  background: #000000a6;
  border: 1px solid #ffffff1a;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(8px);
}
.hero-nav .round {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #000000a6;
  border: 1px solid #ffffff1a;
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
}
.hero-nav .round:hover { background: #ffffff1f; }
.hero-nav .round svg { width: 15px; height: 15px; }

.hero-body {
  position: absolute;
  left: 38px;
  bottom: 26px;
  width: min(47%, 660px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-meta { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.hero-title {
  margin: 0;
  font-size: clamp(26px, 3.1vw, 44px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -.015em;
  text-transform: uppercase;
  color: var(--brand);
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 2px 24px #00000080;
}
.hero-title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-desc {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.5;
  color: #cfcfcf;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 12px #000;
}
.hero-actions {
  position: absolute;
  right: 24px;
  bottom: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 18px 0 6px;
  border-radius: 99px;
  background: #000000a6;
  border: 1px solid #ffffff26;
  backdrop-filter: blur(8px);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.hero-cta:hover { background: #ffffff1f; transform: translateY(-1px); }
.hero-cta .glyph {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #0b0b0b;
  display: grid;
  place-items: center;
  flex: none;
}
.hero-cta .glyph svg { width: 15px; height: 15px; }
.hero-cta.primary .glyph { background: #f5f5f5; color: #0b0b0b; }

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.hero-dots button {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #ffffff40;
  transition: background .2s, width .2s;
}
.hero-dots button[aria-current="true"] { background: #fff; width: 18px; border-radius: 99px; }

/* ---------- genre strip ---------- */
.genre-strip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 20px 0;
}
.genre-strip .scroll {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex: 1;
  padding: 2px;
  mask-image: linear-gradient(to right, transparent 0, #000 18px, #000 calc(100% - 18px), transparent 100%);
}
.genre-strip .arrow {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffffff12;
  flex: none;
}
.genre-strip .arrow:hover { background: #ffffff24; }
.genre-strip .arrow svg { width: 14px; height: 14px; }

/* ---------- layout ---------- */
.page { display: flex; flex-direction: column; gap: 16px; }
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-w);
  gap: 8px;
  align-items: start;
}
.col-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--nav-height) + 12px); }

/* ---------- notice ---------- */
.notice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}
.notice img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.notice .notice-text { flex: 1; min-width: 0; }
.notice h3 { margin: 0; font-size: 15px; font-weight: 700; }
.notice p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-muted); }
.notice .notice-action {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ff45001f;
  color: var(--brand);
}
.notice .notice-action svg { width: 16px; height: 16px; }

/* ---------- tabs ---------- */
.tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tabs {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-secondary);
}
.tab {
  padding: 12px 20px;
  font-size: 12.8px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: .01em;
  text-transform: uppercase;
  transition: background .18s var(--ease), color .18s var(--ease);
  border-right: 1px solid var(--border-color);
}
.tab:last-child { border-right: 0; }
.tab:hover { background: #ffffff0d; }
.tab[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }

.pager { display: flex; align-items: center; gap: 6px; }
.pager button {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffffff0f;
  border: 1px solid var(--border-color);
}
.pager button:disabled { opacity: .35; cursor: default; }
.pager button svg { width: 16px; height: 16px; }
.pager .count {
  min-width: 54px;
  height: 34px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  background: #ffffff0f;
  border: 1px solid var(--border-color);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ---------- card grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.4rem, 1fr));
  gap: 32px;
  row-gap: 28px;
}

.card { position: relative; min-width: 0; }
.card .poster {
  position: relative;
  display: block;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 0.706;
  background: var(--surface-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 6px 20px #00000059;
  transition: box-shadow .32s var(--ease), transform .32s var(--ease), border-color .32s var(--ease);
  will-change: transform;
}
.card .poster img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease), filter .32s var(--ease);
}
.card:hover .poster {
  border-color: var(--card-glow, rgba(255, 255, 255, 0.25));
  box-shadow: 0 18px 38px -8px #000000b8, 0 0 0 1px var(--card-glow, #ffffff2e);
  transform: translateY(-4px);
}
.card:hover .poster img { transform: scale(1.06); filter: saturate(1.08) brightness(0.95); }

.poster-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
  z-index: 2;
}
.p-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(12, 12, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #f4f4f6;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}
.p-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #62d26f;
  box-shadow: 0 0 6px #62d26f;
}
.p-badge.score { color: #ffd479; }
.p-badge.score svg { width: 10px; height: 10px; fill: currentColor; }

.card .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity .25s var(--ease);
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.18) 100%);
  z-index: 2;
}
.card:hover .play { opacity: 1; }
.card .play span {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0b0b0b;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 0 4px rgba(255, 255, 255, 0.18);
  transform: scale(0.86);
  transition: transform .28s var(--ease);
}
.card:hover .play span { transform: scale(1); }
.card .play svg { width: 18px; height: 18px; margin-left: 2px; }
.card .caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 34px 10px 10px;
  background: linear-gradient(to top, rgba(6, 6, 8, 0.96) 0%, rgba(6, 6, 8, 0.72) 48%, transparent 100%);
  font-size: 12.6px;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  z-index: 1;
}
.card .card-meta {
  display: flex;
  align-items: center;
  gap: 4px 8px;
  flex-wrap: wrap;
  margin-top: 7px;
  font-size: 10.5px;
  color: var(--text-muted);
}
.card .card-meta .m { display: inline-flex; align-items: center; gap: 4px; }
.card .card-meta svg { width: 11px; height: 11px; }
.card .card-meta .dot { width: 5px; height: 5px; }

.card-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.card-row-head h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted-strong);
}
.card-row-head h3 svg { width: 14px; height: 14px; }
.card-row-head .row-arrows { display: flex; gap: 6px; }
.card-row-head .row-arrows button {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #ffffff0f;
  display: grid;
  place-items: center;
}
.card-row-head .row-arrows svg { width: 14px; height: 14px; }

.hscroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 4px;
}

/* ---------- sidebar list ---------- */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 12.8px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.panel-title svg { width: 14px; height: 14px; color: var(--text-muted); }
.panel-title .count-pill {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 2px 6px;
  border-radius: 99px;
  background: #ffffff0f;
  color: var(--text-muted);
}
.panel-head .more {
  font-size: 11.5px;
  color: var(--text-muted);
}
.panel-head .more:hover { color: var(--text-primary); }

.sidelist { display: flex; flex-direction: column; gap: 4px; }
.side-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: var(--radius);
  transition: background .16s var(--ease);
}
.side-row:hover { background: #ffffff0a; }
.side-row .rank {
  width: 16px;
  flex: none;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.side-row .thumb {
  width: 58px;
  height: 82px;
  flex: none;
  border-radius: 6px;
  object-fit: cover;
  background: #5555551a;
}
.side-row .info { min-width: 0; flex: 1; }
.side-row .name {
  font-size: 12.6px;
  font-weight: 650;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.side-row .name .dot { display: inline-block; vertical-align: 1px; margin-right: 6px; }
.side-row .sub {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  color: var(--text-muted);
}
.side-row .sub svg { width: 11px; height: 11px; }
.side-row .sub .m { display: inline-flex; align-items: center; gap: 3px; }
.side-row.is-expanded { display: none; }
.sidelist.expanded .side-row.is-expanded { display: flex; }

.expand-btn {
  width: 100%;
  height: 30px;
  margin-top: 6px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: #ffffff08;
  color: var(--text-muted);
}
.expand-btn:hover { background: #ffffff12; color: var(--text-primary); }
.expand-btn svg { width: 16px; height: 16px; transition: transform .2s; }
.expand-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

/* ---------- schedule ---------- */
.sched-eyebrow {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.sched-title { margin: 2px 0 14px; font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.sched-days {
  display: flex;
  align-items: baseline;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}
.sched-days button {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 0;
}
.sched-days .sep { color: #ffffff1f; font-size: 15px; }
.sched-days button[aria-selected="true"] { color: var(--text-primary); }
.sched-list { display: flex; flex-direction: column; }
.sched-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 8px;
  align-items: start;
  padding: 7px 0 7px 0;
  border-bottom: 1px solid #ffffff08;
}
.sched-item:last-child { border-bottom: 0; }
.sched-item time {
  font-size: 10.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}
.sched-item .show {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 4px 8px;
  border-left: 1px solid #ffffff14;
  margin-left: -1px;
}
.sched-item .show .t {
  font-size: 11.6px;
  color: var(--text-muted-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sched-item .show .ep {
  margin-left: auto;
  font-size: 9.5px;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 4px;
  flex: none;
}
.sched-item:hover .show { background: #ffffff0a; border-radius: 4px; }
.sched-item:hover .t { color: var(--text-primary); }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 44px;
  padding: 34px 4px 26px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  justify-content: space-between;
}
.footer-left { max-width: 520px; display: flex; flex-direction: column; gap: 12px; }
.footer-mark { font-size: 22px; font-weight: 800; letter-spacing: .01em; }
.footer-mark span { color: var(--brand); }
.footer-note { font-size: 12.2px; color: var(--text-muted); line-height: 1.55; }
.footer-links { display: flex; gap: 38px; flex-wrap: wrap; }
.footer-links a {
  display: block;
  font-size: 12.4px;
  color: var(--text-muted-strong);
  padding: 4px 0;
}
.footer-links a:hover { color: var(--text-primary); }
.footer-bottom {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  border-top: 1px solid #ffffff0a;
  padding-top: 16px;
}
.footer-badges { display: flex; gap: 8px; }
.footer-badges span {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #ffffff0a;
}
.footer-badges svg { width: 14px; height: 14px; opacity: .7; }

/* ---------- floating actions ---------- */
.floaties {
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: flex;
  gap: 6px;
  z-index: var(--layer-sticky);
}
.floaties button {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: #0e0e0ee6;
  border: 1px solid var(--border-color);
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}
.floaties button:hover { background: #1c1c1ce6; }
.floaties svg { width: 15px; height: 15px; }

/* ---------- page header (search / browse) ---------- */
.page-head { display: flex; flex-direction: column; gap: 4px; padding: 4px 0 0; }
.page-head h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.page-head .sub { font-size: 12.5px; color: var(--text-muted); }

.filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--surface-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}
.field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius);
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  font-size: 12.5px;
  color: var(--text-muted-strong);
}
.field:focus-within { border-color: #ffffff33; }
.field svg { width: 14px; height: 14px; color: var(--text-muted); }
.field input {
  border: 0; background: transparent; outline: 0;
  font-size: 12.5px; color: var(--text-primary); min-width: 150px;
}
.field select {
  border: 0; background: transparent; outline: 0;
  font-size: 12.5px; color: var(--text-primary);
  appearance: none;
  padding-right: 4px;
  cursor: pointer;
}
.field select option { background: #141414; color: #e8e8e8; }
.filterbar .spacer { flex: 1; }
.filterbar .result-count { font-size: 12px; color: var(--text-muted); }

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
  border: 1px dashed var(--border-color);
  border-radius: var(--radius);
}
.error-box {
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid #ff450059;
  background: #ff450014;
  color: #e8e8e8;
  font-size: 12.5px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.error-box svg { width: 16px; height: 16px; color: var(--brand); flex: none; }

/* ---------- info page ---------- */
.info-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  padding: 28px;
  background: #0d0d0d;
}
.info-hero .banner { position: absolute; inset: 0; background-size: cover; background-position: center 30%; }
.info-hero .scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, #080808 0%, #080808e0 18%, #08080873 48%, #08080826 74%, #08080833 100%),
    linear-gradient(to right, #080808a6 0%, #08080833 46%, #08080800 70%);
}
.info-hero .inner {
  position: relative;
  display: flex;
  gap: 22px;
  align-items: flex-end;
  width: 100%;
}
.info-cover {
  width: 176px;
  aspect-ratio: 230/320;
  border-radius: var(--radius);
  object-fit: cover;
  flex: none;
  box-shadow: 0 18px 40px #000000a6;
  border: 1px solid #ffffff1a;
}
.info-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.info-title { margin: 0; font-size: clamp(23px, 2.4vw, 34px); line-height: 1.12; font-weight: 800; letter-spacing: -.02em; }
.info-alt { font-size: 12.5px; color: var(--text-muted); margin: 0; }
.info-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.info-desc {
  margin: 0;
  font-size: 12.8px;
  color: #c9c9c9;
  line-height: 1.6;
  max-width: 78ch;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-line;
}
.info-desc.expanded { -webkit-line-clamp: unset; display: block; }
.info-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.score-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: #ffffff0d;
  border: 1px solid var(--border-color);
}
.score-box b { font-size: 20px; line-height: 1; }
.score-box span { font-size: 10.5px; color: var(--text-muted); }
.mal-score { color: inherit; text-decoration: none; transition: border-color .18s var(--ease), background .18s var(--ease); }
.mal-score:hover { border-color: var(--border-color-strong); background: #ffffff14; }

.section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted-strong);
}
.section-title .end { margin-left: auto; font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 11.5px; color: var(--text-muted); }
.section-title svg { width: 14px; height: 14px; }

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 90px);
  gap: 10px;
}
.ep-cell {
  height: 60px;
  border-radius: var(--radius);
  background: var(--surface-secondary);
  border: 1px solid var(--border-color);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted-strong);
  transition: background .16s, color .16s, border-color .16s;
}
.ep-cell:hover { background: var(--control-hover-bg); color: var(--text-primary); }
.ep-cell.current { background: var(--accent-soft); color: var(--accent); border-color: #b5a8ff59; }
.ep-cell.watched { color: var(--text-muted); }

.characters { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.character { width: 92px; flex: none; text-align: center; }
.character img {
  width: 82px; height: 82px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  border: 1px solid var(--border-color);
  background: var(--surface-secondary);
}
.character .n { font-size: 11.5px; font-weight: 600; line-height: 1.3; }
.character .r { font-size: 10px; color: var(--text-muted); margin-top: 2px; }

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.fact { padding: 12px; border-radius: var(--radius); background: var(--surface-panel); border: 1px solid var(--border-color); }
.fact dt { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.fact dd { margin: 4px 0 0; font-size: 13px; font-weight: 600; }

/* ---------- watch page ---------- */
.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 8px;
  align-items: start;
}
.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-color);
  isolation: isolate;
}
.player-shell video {
  width: 100%; height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}
.player-shell .player-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
  z-index: 2;
}
.audio-toggle {
  display: inline-flex;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  flex: none;
}
.audio-toggle button {
  padding: 0 16px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  background: var(--surface-secondary);
  color: var(--text-muted-strong);
  border-right: 1px solid var(--border-color);
}
.audio-toggle button:last-child { border-right: 0; }
.audio-toggle button:hover { background: var(--control-hover-bg); }
.audio-toggle button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.player-poster {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  z-index: 2;
}
.player-poster::before {
  content: "";
  position: absolute; inset: 0;
  background: #000000a8;
  backdrop-filter: blur(14px);
}
.player-poster .stack {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 20px;
}
.player-poster .big-play {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: #f5f5f5;
  color: #111;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 40px #000000a6;
}
.player-poster .big-play svg { width: 26px; height: 26px; margin-left: 3px; }
.player-poster h3 { margin: 0; font-size: 15px; }
.player-poster p { margin: 0; font-size: 12px; color: var(--text-muted); max-width: 46ch; }
.player-poster code {
  font-family: var(--font-mono);
  font-size: 11px;
  background: #ffffff14;
  padding: 2px 6px;
  border-radius: 4px;
}

.player-bar {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  padding: 26px 12px 8px;
  background: linear-gradient(to top, #000000d9, transparent);
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity .2s;
}
.player-shell:hover .player-bar, .player-shell.show-controls .player-bar { opacity: 1; }
.player-bar button { color: #fff; width: 28px; height: 28px; display: grid; place-items: center; }
.player-bar button svg { width: 17px; height: 17px; }
.player-bar .track {
  position: relative;
  flex: 1;
  height: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.player-bar .track .rail { width: 100%; height: 3px; border-radius: 99px; background: #ffffff33; overflow: hidden; }
.player-bar .track .fill { height: 100%; background: var(--brand); width: 0%; }
.player-bar .time { font-size: 11px; color: #ffffffb3; font-variant-numeric: tabular-nums; }

.watch-title { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.player-src {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-muted);
  word-break: break-all;
}
.player-src:empty { display: none; }
.watch-sub { font-size: 12px; color: var(--text-muted); }
.watch-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.ep-list { max-height: 300px; overflow-y: auto; padding-right: 4px; }
.ep-list::-webkit-scrollbar { width: 6px; }
.ep-list::-webkit-scrollbar-track { background: #1a1a1f; }
.ep-list::-webkit-scrollbar-thumb { background: #2e2e38; border-radius: 99px; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.ep-tile {
  height: 40px;
  border-radius: 5px;
  background: #1e1e24;
  border: 1px solid #2a2a32;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  color: #a0a0b0;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.ep-tile:hover { background: #2e2e38; color: #fff; border-color: #3a3a44; }
.ep-tile.current { background: #ff5500; color: #fff; border-color: #ff5500; font-weight: 700; }
.ep-tile.watched { color: #606070; background: #18181e; }

/* ---------- toasts ---------- */
.toasts {
  position: fixed;
  right: 16px;
  bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: var(--layer-modal);
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: #1a1a1af2;
  border: 1px solid var(--border-color-strong);
  font-size: 12.5px;
  box-shadow: 0 12px 32px #000000a6;
  animation: toastIn .25s var(--ease);
}
.toast svg { width: 16px; height: 16px; color: #6ee7a8; }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } }

/* ---------- split rows ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.split .card-row { min-width: 0; }
.split .hscroll { grid-auto-columns: minmax(122px, 1fr); }

@media (max-width: 1020px) {
  .split { grid-template-columns: 1fr; }
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .layout, .watch-layout { grid-template-columns: minmax(0, 1fr); }
  .col-side { position: static; }
  .hero-body { width: min(60%, 620px); }
}

@media (max-width: 860px) {
  :root { --nav-height: 58px; }
  body { padding-top: calc(var(--nav-height) + 8px); }
  .nav-search { max-width: none; }
  .nav-search .kbd { display: none; }
  .hero { height: 380px; }
  .hero-body { left: 20px; right: 20px; width: auto; bottom: 70px; }
  .hero-actions { right: 20px; left: 20px; bottom: 16px; justify-content: flex-start; }
  .info-hero { padding: 16px; }
  .info-hero .inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .info-cover { width: 128px; }
  .grid { gap: 18px; row-gap: 20px; grid-template-columns: repeat(auto-fill, minmax(8.2rem, 1fr)); }
  .brand-mark { font-size: 21px; }
  .hero-title { font-size: clamp(21px, 5.4vw, 30px); }
}

@media (max-width: 620px) {
  .nav-search input { font-size: 12.5px; }
  .navbar-inner { gap: 10px; }
  .brand-mark { font-size: 18px; }
  .hero { height: 340px; }
  .hero-meta { justify-content: flex-start; }
  .hero-title { text-align: left; }
  .hero-desc { font-size: 12px; -webkit-line-clamp: 2; }
  .hero-cta span.label { display: none; }
  .hero-cta { padding: 0 6px; }
  .footer-links { gap: 22px; }
  .ep-row img { width: 56px; height: 32px; }
}

/* ---------- black refresh ---------- */
body {
  background-image: none;
}

.navbar {
  background: #0e0e0eef;
  border-bottom-color: #ffffff0a;
  backdrop-filter: blur(18px);
}

.brand-mark { color: var(--text-primary); }
.brand-mark .brand-accent { color: var(--brand); }
.nav-search { border-radius: 999px; background: var(--surface-secondary); }
.nav-search:focus-within { border-color: #ffffff33; background: #1a1a1a; }
.avatar-btn { border-radius: 50%; }

.hero {
  border: 1px solid #ffffff20;
  border-radius: 22px;
  box-shadow: 0 24px 70px #0000004a;
}
.hero-slide .scrim {
  background:
    linear-gradient(to top, #080808f2 0%, #080808b3 26%, #08080826 62%, #08080833 100%),
    linear-gradient(to right, #080808cc 0%, #08080800 55%, #08080840 100%);
}
.hero-body {
  left: 42px;
  bottom: 42px;
  width: min(57%, 680px);
  align-items: flex-start;
}
.hero-meta { justify-content: flex-start; }
.hero-title {
  color: #f2f2f2;
  text-align: left;
  text-transform: none;
  letter-spacing: -.035em;
  text-shadow: 0 3px 30px #000000b3;
}
.hero-desc { color: #d0d0d0; }
.hero-badge, .hero-nav .counter, .hero-nav .round {
  background: #000000a6;
  border-color: #ffffff1a;
  backdrop-filter: blur(14px);
}
.hero-cta {
  background: #000000a6;
  border-color: #ffffff26;
  backdrop-filter: blur(14px);
}
.hero-cta.primary { background: var(--brand); color: #080808; }
.hero-cta.primary .glyph { background: #f5f5f5; color: #0b0b0b; }
.hero-dots button[aria-current="true"] { background: var(--brand); }

.genre-strip .scroll { gap: 9px; }
.chip {
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--surface-secondary);
}
.chip:hover { border-color: var(--border-color-strong); background: var(--control-hover-bg); }
.chip[aria-current="true"], .chip.is-active {
  border-color: #b5a8ff70;
  background: var(--accent-soft);
  color: #c4ceff;
}

.layout { gap: 18px; }
.notice {
  border-radius: 16px;
  border-color: var(--border-color);
  background: linear-gradient(120deg, #181818, #111111 70%);
}
.notice .notice-action { background: #ff45001f; color: var(--brand); }
.tabs { border-radius: 12px; }
.tab[aria-selected="true"] { color: #c4ceff; }
.card .poster {
  border-radius: 16px;
  box-shadow: 0 8px 24px #00000042;
}
.card:hover .poster {
  box-shadow: 0 18px 38px -8px #00000090, 0 0 0 1px var(--card-glow, #ff450066);
}
.panel { border-radius: 16px; }
.site-footer { border-top-color: #ffffff0a; }

@media (max-width: 860px) {
  .hero-body { left: 20px; right: 20px; bottom: 70px; width: auto; }
}

/* ---------- smooth mobile & multi-device optimizations ---------- */
.genre-strip .scroll,
.card-row .scroll {
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
}
.genre-strip .scroll > *,
.card-row .scroll > * {
  scroll-snap-align: start;
}
.ep-list {
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto;
  touch-action: pan-y;
}

@media (hover: none) {
  .card:hover .poster {
    transform: none;
    box-shadow: 0 6px 20px #00000059;
  }
  .card:hover .poster img { transform: none; filter: none; }
  .card:hover .play { opacity: 0; }
  .card .poster:active { transform: scale(0.98); }
}

@media (max-width: 620px) {
  .tabs-row { flex-wrap: wrap; gap: 10px; }
  .tabs-row .tabs {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tabs-row .tabs::-webkit-scrollbar { display: none; }
  .tabs-row .tabs + .pager { margin-left: auto; }
  .tab { flex: none; white-space: nowrap; }
  .tab { padding: 10px 14px; font-size: 12px; }
  .watch-toolbar { gap: 8px; }
  .watch-toolbar .btn,
  .watch-toolbar .audio-toggle button { min-height: 36px; }
  .server-control { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
}

@media (max-width: 360px) {
  .navbar-inner { gap: 8px; }
  .brand-mark { font-size: 16px; }
  .nav-search { gap: 6px; padding-right: 4px; padding-left: 8px; }
  .nav-search > svg { display: none; }
  .nav-search .divider { display: none; }
  .nav-search .icon-btn { width: 28px; height: 28px; }
}

@media (max-width: 480px) {
  .nav-search #random-btn { display: none; }
  :root { --page-pad: 10px; }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    row-gap: 18px;
  }
  .p-badge { height: 20px; padding: 0 6px; font-size: 10px; }
  .card .caption { font-size: 12px; padding: 28px 8px 8px; }
}

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