/* ==========================================================================
   声屿 ASMR · 拾音索引
   暗色沉浸式界面 / 无外部依赖
   ========================================================================== */

:root {
  --bg: #070b12;
  --bg-soft: #0a1019;
  --bg-elev: #0e1624;
  --panel: rgba(16, 25, 40, 0.72);
  --panel-solid: #101a29;
  --line: rgba(148, 163, 184, 0.12);
  --line-strong: rgba(148, 163, 184, 0.22);
  --text: #e9eff8;
  --text-soft: #c3cedf;
  --muted: #8a9ab3;
  --muted-dim: #64748b;
  --gold: #f5c56b;
  --gold-deep: #d9a445;
  --teal: #6ee7d0;
  --violet: #a78bfa;
  --rose: #f0a6a6;
  --green: #7ee0a3;
  --red: #f28b8b;
  --radius-lg: 26px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px -30px rgba(0, 0, 0, 0.9);
  --font-ui: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-display: "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sidebar-w: 264px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 12% -10%, rgba(35, 61, 99, 0.42), transparent 62%),
    radial-gradient(900px 620px at 96% 4%, rgba(80, 54, 122, 0.25), transparent 58%),
    radial-gradient(1000px 800px at 70% 110%, rgba(26, 76, 72, 0.18), transparent 60%),
    var(--bg);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 75%);
}

::selection { background: rgba(245, 197, 107, 0.3); color: #fff; }

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.22); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.38); background-clip: content-box; }

/* ------------------------------------------------------------------ shell */
.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 26px 20px 20px;
  background: linear-gradient(180deg, rgba(9, 15, 25, 0.96), rgba(7, 11, 18, 0.9));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(22px);
}

.brand { display: flex; align-items: center; gap: 13px; padding: 2px 6px; }
.brand-mark {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center; gap: 3px;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(245, 197, 107, 0.2), rgba(110, 231, 208, 0.1));
  border: 1px solid rgba(245, 197, 107, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 26px -12px rgba(245, 197, 107, 0.5);
}
.brand-mark span {
  width: 3px; border-radius: 99px;
  background: linear-gradient(180deg, var(--gold), var(--teal));
  animation: eq 1.6s ease-in-out infinite;
}
.brand-mark span:nth-child(1) { height: 11px; animation-delay: -0.1s; }
.brand-mark span:nth-child(2) { height: 22px; animation-delay: -0.5s; }
.brand-mark span:nth-child(3) { height: 15px; animation-delay: -0.9s; }
.brand-mark span:nth-child(4) { height: 26px; animation-delay: -0.3s; }
.brand-mark span:nth-child(5) { height: 9px; animation-delay: -0.7s; }
@keyframes eq { 0%, 100% { transform: scaleY(0.42); } 50% { transform: scaleY(1); } }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 21px; letter-spacing: 0.14em; font-weight: 700; }
.brand-text small { font-size: 9.5px; letter-spacing: 0.22em; color: var(--muted); text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 5px; }
.nav-label {
  margin: 14px 12px 5px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.2em;
  color: var(--muted-dim); text-transform: uppercase;
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 10px 12px;
  border: 1px solid transparent; border-radius: 11px;
  background: transparent; color: var(--text-soft);
  font-size: 14px; text-align: left;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.nav-item svg { width: 17px; height: 17px; color: var(--muted); transition: color 0.18s ease; }
.nav-item span { flex: 1; }
.nav-item em {
  font-style: normal; font-size: 11px; font-weight: 600;
  padding: 1px 7px; border-radius: 99px;
  background: rgba(148, 163, 184, 0.12); color: var(--muted);
}
.nav-item:hover { background: rgba(148, 163, 184, 0.07); color: var(--text); }
.nav-item.is-active {
  color: #fff;
  background: linear-gradient(90deg, rgba(245, 197, 107, 0.16), rgba(245, 197, 107, 0.03));
  border-color: rgba(245, 197, 107, 0.2);
}
.nav-item.is-active::before {
  content: ""; position: absolute; left: -20px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--gold), var(--teal));
  box-shadow: 0 0 16px rgba(245, 197, 107, 0.7);
}
.nav-item.is-active svg { color: var(--gold); }
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal); box-shadow: 0 0 0 0 rgba(110, 231, 208, 0.6);
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(110, 231, 208, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(110, 231, 208, 0); }
  100% { box-shadow: 0 0 0 0 rgba(110, 231, 208, 0); }
}

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.privacy-note {
  display: flex; gap: 10px; padding: 13px;
  border: 1px solid var(--line); border-radius: 13px;
  background: rgba(148, 163, 184, 0.035);
}
.privacy-note svg { width: 15px; height: 15px; color: var(--gold); margin-top: 2px; }
.privacy-note p { font-size: 11px; line-height: 1.6; color: var(--muted); }
.engine-state {
  display: flex; align-items: center; gap: 8px;
  padding: 0 6px; font-size: 11px; color: var(--muted);
}
.engine-state .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(126, 224, 163, 0.7); }
.engine-state.is-busy .dot { background: var(--gold); animation: ping 1.4s ease-out infinite; }

/* ------------------------------------------------------------------- main */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 34px;
  background: rgba(7, 11, 18, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(130%);
}
.menu-btn { display: none; }

.searchbox {
  flex: 1; max-width: 560px;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 13px;
  border: 1px solid var(--line); border-radius: 11px;
  background: rgba(148, 163, 184, 0.05);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.searchbox:focus-within {
  border-color: rgba(245, 197, 107, 0.45);
  background: rgba(245, 197, 107, 0.04);
  box-shadow: 0 0 0 4px rgba(245, 197, 107, 0.06);
}
.searchbox svg { color: var(--muted); width: 16px; height: 16px; }
.searchbox input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-size: 13.5px; color: var(--text);
}
.searchbox input::placeholder { color: var(--muted-dim); }
.searchbox kbd {
  font-family: var(--font-mono); font-size: 10px; color: var(--muted);
  padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 5px;
  background: rgba(148, 163, 184, 0.06);
}

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sync-hint { font-size: 11px; color: var(--muted-dim); white-space: nowrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(148, 163, 184, 0.06);
  color: var(--text-soft);
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
  transition: transform 0.15s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn:hover { color: #fff; border-color: rgba(245, 197, 107, 0.4); background: rgba(245, 197, 107, 0.09); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary {
  color: #1a1305;
  background: linear-gradient(135deg, #ffd993, var(--gold) 45%, #e8b159);
  border-color: rgba(245, 197, 107, 0.65);
  box-shadow: 0 8px 26px -12px rgba(245, 197, 107, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  font-weight: 600;
}
.btn-primary:hover {
  color: #120d02;
  background: linear-gradient(135deg, #ffe1a8, #f8cd7c 45%, #eebd69);
  border-color: var(--gold);
  box-shadow: 0 12px 32px -12px rgba(245, 197, 107, 0.9);
}
.btn-lg { padding: 11px 20px; font-size: 13.5px; border-radius: 12px; }
.btn-lg svg { width: 16px; height: 16px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(148, 163, 184, 0.05);
  color: var(--muted); transition: all 0.18s ease;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(148, 163, 184, 0.1); }

.content {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 30px 34px 70px;
  flex: 1;
}

.view { display: none; animation: viewIn 0.35s ease both; }
.view.is-active { display: block; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------- hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 32px;
  overflow: hidden;
  padding: 46px 46px 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(700px 380px at 88% 18%, rgba(84, 62, 138, 0.3), transparent 65%),
    radial-gradient(620px 420px at 8% 92%, rgba(20, 82, 78, 0.22), transparent 62%),
    linear-gradient(135deg, rgba(20, 32, 52, 0.88), rgba(10, 16, 27, 0.92));
  box-shadow: var(--shadow);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  opacity: 0.4; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.11) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  mask-image: linear-gradient(115deg, #000, transparent 62%);
}
.hero-copy { position: relative; z-index: 2; }

.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.24em;
  color: var(--gold); text-transform: uppercase;
}
.eyebrow-line { width: 26px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.hero h1, .page-head h1 {
  margin: 15px 0 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 3.7vw, 52px);
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: 0.015em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, #ffe3ac, var(--gold) 42%, var(--teal));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-lede {
  max-width: 560px; margin-top: 16px;
  color: var(--muted); font-size: 13.5px; line-height: 1.85;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 0;
  margin-top: 34px; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.hero-stats > div { padding-right: 30px; margin-right: 30px; border-right: 1px solid var(--line); }
.hero-stats > div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero-stats dt {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 600; line-height: 1.1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.hero-stats dd { margin-top: 4px; font-size: 10.5px; letter-spacing: 0.1em; color: var(--muted-dim); }

.hero-visual { position: relative; z-index: 1; min-height: 330px; }
.orb { position: absolute; border-radius: 50%; filter: blur(48px); opacity: 0.55; }
.orb-a { width: 230px; height: 230px; right: 6%; top: 2%; background: rgba(124, 92, 210, 0.5); animation: drift 13s ease-in-out infinite; }
.orb-b { width: 190px; height: 190px; left: 4%; bottom: 12%; background: rgba(36, 150, 138, 0.42); animation: drift 17s ease-in-out infinite reverse; }
@keyframes drift { 0%, 100% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-16px, 18px, 0) scale(1.12); } }

.waveform {
  position: absolute; inset: auto 0 4% 0;
  height: 42%;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  opacity: 0.75;
  mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.waveform i {
  display: block; width: 3px; height: var(--h, 40%);
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(245, 197, 107, 0.9), rgba(110, 231, 208, 0.55));
  transform-origin: center;
  animation: wave 2.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  box-shadow: 0 0 8px rgba(110, 231, 208, 0.25);
}
@keyframes wave { 0%, 100% { transform: scaleY(0.55); opacity: 0.6; } 50% { transform: scaleY(1.15); opacity: 1; } }

.hero-plate {
  position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 13px;
  padding: 15px 19px;
  border: 1px solid rgba(245, 197, 107, 0.22);
  border-radius: 18px;
  background: rgba(10, 17, 28, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 60px -22px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.hero-plate svg { width: 26px; height: 26px; color: var(--gold); }
.plate-ring {
  position: absolute; inset: -9px; border-radius: 24px;
  border: 1px solid rgba(245, 197, 107, 0.1);
  animation: ringPulse 4s ease-in-out infinite;
}
@keyframes ringPulse { 0%, 100% { opacity: 0.4; transform: scale(1); } 50% { opacity: 0.9; transform: scale(1.015); } }
.plate-text { display: flex; flex-direction: column; line-height: 1.4; }
.plate-text strong { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.plate-text span { font-size: 12px; color: var(--text-soft); }

.float-chip {
  position: absolute;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(11, 18, 29, 0.8);
  backdrop-filter: blur(12px);
  font-size: 10.5px; color: var(--text-soft);
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.9);
}
.chip-a { top: 12%; right: 4%; animation: float 6s ease-in-out infinite; }
.chip-b { bottom: 8%; left: 2%; animation: float 7.5s ease-in-out infinite reverse; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); animation: ping 1.8s ease-out infinite; }

/* ---------------------------------------------------------------- toolbar */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 30px;
}
.kind-tabs {
  display: inline-flex; gap: 3px; padding: 4px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(148, 163, 184, 0.04);
}
.kind-tab {
  padding: 6px 15px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 500;
  transition: all 0.18s ease;
}
.kind-tab:hover { color: var(--text); }
.kind-tab.is-active {
  color: #171104;
  background: linear-gradient(135deg, #ffd993, var(--gold));
  box-shadow: 0 4px 14px -6px rgba(245, 197, 107, 0.8);
  font-weight: 600;
}
.toolbar-right { display: flex; align-items: center; gap: 10px; }
.rating-switch {
  display: inline-flex; gap: 3px; padding: 4px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(148, 163, 184, 0.04);
}
.rating-tab {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted);
  font-size: 11.5px; font-weight: 500;
  transition: all 0.18s ease;
}
.rating-tab svg { width: 12px; height: 12px; }
.rating-tab:hover { color: var(--text); }
.rating-tab.is-active {
  color: var(--gold); background: rgba(245, 197, 107, 0.12);
  box-shadow: inset 0 0 0 1px rgba(245, 197, 107, 0.28);
}
.rating-tab[data-rating="adult"].is-active {
  color: #ffb4a8; background: rgba(244, 93, 108, 0.14);
  box-shadow: inset 0 0 0 1px rgba(244, 93, 108, 0.35);
}
.rating-tab.is-locked { opacity: 0.72; }
#adult-count {
  min-width: 17px; padding: 0 4px; border-radius: 99px;
  background: rgba(148, 163, 184, 0.12);
  font-family: var(--font-mono); font-size: 9px; line-height: 16px;
  text-align: center;
}
.rating-tab.is-active #adult-count { background: rgba(244, 93, 108, 0.18); }
.select-wrap {
  position: relative;
  display: flex; align-items: center; gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: rgba(148, 163, 184, 0.04);
}
.select-wrap svg { width: 14px; height: 14px; color: var(--muted); pointer-events: none; }
.select-wrap select {
  appearance: none; border: 0; background: transparent; outline: none;
  padding: 8px 18px 8px 0; font-size: 12px; color: var(--text-soft); cursor: pointer;
}
.select-wrap select option { background: var(--panel-solid); color: var(--text); }
.select-wrap::after {
  content: ""; position: absolute; right: 10px; top: 50%;
  width: 5px; height: 5px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}

.tag-strip {
  display: flex; gap: 7px; overflow-x: auto;
  margin-top: 16px; padding-bottom: 4px;
  scrollbar-width: none;
}
.tag-strip::-webkit-scrollbar { display: none; }
.tag-chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border: 1px solid var(--line); border-radius: 99px;
  background: rgba(148, 163, 184, 0.035);
  color: var(--muted); font-size: 11.5px;
  transition: all 0.16s ease;
}
.tag-chip span { font-size: 9.5px; opacity: 0.6; font-variant-numeric: tabular-nums; }
.tag-chip:hover { color: var(--text); border-color: var(--line-strong); background: rgba(148, 163, 184, 0.08); }
.tag-chip.is-active {
  color: var(--gold); border-color: rgba(245, 197, 107, 0.38);
  background: rgba(245, 197, 107, 0.1);
}
.tag-strip:empty { display: none; }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px 4px 11px;
  border: 1px dashed rgba(245, 197, 107, 0.35);
  border-radius: 99px; background: rgba(245, 197, 107, 0.05);
  font-size: 11px; color: var(--gold);
}
.filter-pill button { display: inline-flex; border: 0; background: transparent; color: inherit; padding: 2px; }
.filter-pill svg { width: 11px; height: 11px; }
.filter-pill.filter-adult { color: #ff9aa5; border-color: rgba(244, 93, 108, 0.45); background: rgba(244, 93, 108, 0.07); }
.filter-reset { border: 0; background: transparent; color: var(--muted); font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin: 28px 0 16px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 600; letter-spacing: 0.03em;
}
.section-head p { margin-top: 3px; font-size: 11.5px; color: var(--muted-dim); }
.view-toggle { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; }
.view-toggle span {
  display: grid; grid-template-columns: repeat(2, 4px); gap: 2px;
  padding: 5px 6px; border-radius: 5px; opacity: 0.35;
}
.view-toggle span.is-active { opacity: 0.9; background: rgba(148, 163, 184, 0.1); }
.view-toggle i { width: 4px; height: 4px; background: var(--text-soft); border-radius: 1px; }
.view-toggle span:last-child { grid-template-columns: repeat(3, 4px); }

/* ------------------------------------------------------------------ cards */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 16px;
}
.resource-card {
  position: relative;
  display: flex; flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(19, 30, 47, 0.78), rgba(12, 19, 30, 0.86));
  cursor: pointer;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
  animation: cardIn 0.4s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.resource-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 197, 107, 0.3);
  box-shadow: 0 22px 50px -26px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(245, 197, 107, 0.06);
}
.card-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #16243a, #0d1522 60%, #1a2438);
}
.card-thumb img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, opacity 0.3s ease; opacity: 0; }
.card-thumb img.is-loaded { opacity: 1; }
.resource-card:hover .card-thumb img { transform: scale(1.045); }
.thumb-fallback {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(120px 90px at 70% 30%, rgba(245, 197, 107, 0.14), transparent 70%),
    radial-gradient(140px 110px at 25% 80%, rgba(110, 231, 208, 0.12), transparent 70%),
    linear-gradient(135deg, #16243a, #0c1420);
}
.thumb-fallback::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5;
  background-image: linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
}
.thumb-fallback svg { width: 34px; height: 34px; color: rgba(233, 239, 248, 0.3); stroke-width: 1.2; }
.has-thumb .thumb-fallback { display: none; }
.thumb-fallback span {
  position: absolute; right: 12px; bottom: 10px;
  font-family: var(--font-display); font-size: 26px; color: rgba(255, 255, 255, 0.06);
}
.card-badges { position: absolute; left: 10px; top: 10px; display: flex; gap: 5px; z-index: 2; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 7px; border-radius: 5px;
  font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em;
  background: rgba(7, 11, 18, 0.72); border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px); color: var(--text-soft);
}
.badge svg { width: 10px; height: 10px; }
.badge.kind-audio { color: var(--teal); }
.badge.kind-video { color: var(--rose); }
.badge.kind-collection { color: var(--gold); }
.badge.kind-article { color: var(--violet); }
.badge-lang { color: var(--muted); font-weight: 500; }
.badge-adult {
  color: #ffb4a8; background: rgba(120, 24, 35, 0.72);
  border-color: rgba(244, 93, 108, 0.42);
}
.resource-card.is-adult .card-thumb img { filter: blur(15px); transform: scale(1.08); }
.resource-card.is-adult:hover .card-thumb img { filter: blur(10px); transform: scale(1.1); }
.card-duration {
  position: absolute; right: 10px; bottom: 10px; z-index: 2;
  padding: 2px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 9.5px; color: var(--text-soft);
  background: rgba(7, 11, 18, 0.8); border: 1px solid rgba(255, 255, 255, 0.1);
}
.fav-btn {
  position: absolute; right: 9px; top: 9px; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 11, 18, 0.66);
  backdrop-filter: blur(8px);
  color: rgba(233, 239, 248, 0.7);
  opacity: 0; transform: translateY(-4px);
  transition: all 0.18s ease;
}
.resource-card:hover .fav-btn, .fav-btn.is-fav { opacity: 1; transform: none; }
.fav-btn svg { width: 14px; height: 14px; }
.fav-btn:hover { color: var(--rose); border-color: rgba(240, 166, 166, 0.5); }
.fav-btn.is-fav { color: var(--rose); background: rgba(240, 166, 166, 0.12); border-color: rgba(240, 166, 166, 0.4); }
.fav-btn.is-fav svg { fill: currentColor; fill-opacity: 0.25; }

.card-body { display: flex; flex-direction: column; gap: 7px; padding: 14px 15px 13px; flex: 1; }
.card-source {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; letter-spacing: 0.04em; color: var(--muted-dim);
}
.card-source .s-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); opacity: 0.8; }
.card-source .s-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-source .s-time { margin-left: auto; flex: none; }
.card-title {
  font-size: 14px; font-weight: 600; line-height: 1.5; color: var(--text); letter-spacing: 0.005em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-author { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-summary {
  font-size: 11.5px; line-height: 1.62; color: var(--muted-dim);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 4px; }
.mini-tag {
  padding: 2px 7px; border-radius: 4px;
  font-size: 9.5px; color: rgba(195, 206, 223, 0.75);
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.06);
}
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 15px;
  border-top: 1px solid rgba(148, 163, 184, 0.07);
  font-size: 10px; color: var(--muted-dim);
}
.card-foot .go { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); transition: color 0.18s ease, gap 0.18s ease; }
.resource-card:hover .card-foot .go { color: var(--gold); gap: 8px; }
.card-foot .go svg { width: 12px; height: 12px; }

.skeleton-card { pointer-events: none; }
.sk { background: linear-gradient(90deg, rgba(148, 163, 184, 0.06) 25%, rgba(148, 163, 184, 0.13) 50%, rgba(148, 163, 184, 0.06) 75%); background-size: 200% 100%; animation: shimmer 1.6s infinite; border-radius: 4px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-thumb { aspect-ratio: 16 / 10; border-radius: 0; }
.sk-line { height: 10px; margin: 12px 15px 0; }
.sk-line.w60 { width: 60%; } .sk-line.w85 { width: 85%; } .sk-line.w40 { width: 40%; margin-bottom: 15px; }

/* ------------------------------------------------------------------ empty */
.empty-state {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  background: rgba(148, 163, 184, 0.02);
}
.empty-icon {
  display: flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; margin-bottom: 16px;
  border-radius: 50%; border: 1px solid var(--line-strong);
  background: radial-gradient(circle, rgba(245, 197, 107, 0.12), transparent 70%);
  color: var(--gold);
}
.empty-icon svg { width: 24px; height: 24px; }
.empty-state h3 { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.empty-state p { max-width: 420px; margin: 7px 0 18px; font-size: 12.5px; color: var(--muted); }

.load-more-wrap { display: flex; justify-content: center; margin-top: 26px; }
#load-more { padding: 9px 22px; }

/* ------------------------------------------------------------------ heads */
.page-head { margin: 8px 0 26px; }
.page-head h1 { margin-top: 12px; }
.page-lede { max-width: 660px; margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.page-head.split { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-head-actions { display: flex; gap: 9px; padding-bottom: 4px; flex: none; }

/* ----------------------------------------------------------------- source */
.source-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; margin-top: 20px; }
.source-card {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 18px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(20, 32, 50, 0.7), rgba(12, 19, 30, 0.82));
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.source-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.source-card.is-disabled { opacity: 0.55; }
.source-card.is-disabled:hover { opacity: 0.75; }
.source-card.is-adult-source { border-color: rgba(244, 93, 108, 0.26); }
.source-adult-tag {
  padding: 1px 5px; border-radius: 4px;
  color: #ffb0a5; background: rgba(244, 93, 108, 0.14);
  font-size: 9px; font-weight: 600; letter-spacing: 0.04em;
}
.source-top { display: flex; align-items: flex-start; gap: 11px; }
.source-icon {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: none;
  border-radius: 11px; border: 1px solid var(--line);
  background: rgba(245, 197, 107, 0.07); color: var(--gold);
}
.source-icon svg { width: 18px; height: 18px; }
.source-title { flex: 1; min-width: 0; }
.source-title h3 { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.source-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 10px; color: var(--muted-dim); }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted-dim); }
.status-dot.ok { background: var(--green); box-shadow: 0 0 8px rgba(126, 224, 163, 0.6); }
.status-dot.error { background: var(--red); }
.status-dot.crawling { background: var(--gold); animation: ping 1.4s ease-out infinite; }
.status-dot.empty { background: var(--muted); }
.source-desc {
  font-size: 11.5px; line-height: 1.65; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 38px;
}
.source-stats { display: flex; gap: 16px; padding-top: 11px; border-top: 1px solid rgba(148, 163, 184, 0.07); }
.source-stats div { display: flex; flex-direction: column; gap: 1px; }
.source-stats strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-soft); }
.source-stats span { font-size: 9.5px; letter-spacing: 0.06em; color: var(--muted-dim); }
.source-error { font-size: 10.5px; line-height: 1.5; color: var(--red); background: rgba(242, 139, 139, 0.07); border: 1px solid rgba(242, 139, 139, 0.18); border-radius: 7px; padding: 6px 8px; word-break: break-all; }
.source-locked {
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; line-height: 1.4; color: #ffb4a8;
}
.source-locked svg { width: 11px; height: 11px; flex: none; }
.source-actions { display: flex; align-items: center; gap: 7px; margin-top: auto; }
.source-actions .btn { padding: 5px 9px; font-size: 10.5px; }
.source-actions .btn svg { width: 12px; height: 12px; }
.source-actions .spacer { flex: 1; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.switch-row > span:first-child { display: flex; flex-direction: column; gap: 1px; }
.switch-row strong { font-size: 12.5px; font-weight: 500; color: var(--text-soft); }
.switch-row small { font-size: 10.5px; color: var(--muted-dim); }
.switch {
  appearance: none; position: relative; flex: none;
  width: 40px; height: 23px; border-radius: 99px; margin: 0;
  border: 1px solid var(--line-strong);
  background: rgba(148, 163, 184, 0.14);
  cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 17px; height: 17px; border-radius: 50%;
  background: #cdd7e6; transition: transform 0.2s ease, background 0.2s ease;
}
.switch:checked { background: linear-gradient(135deg, #ffd993, var(--gold)); border-color: rgba(245, 197, 107, 0.6); }
.switch:checked::after { transform: translateX(17px); background: #1a1305; }

.source-form {
  margin-bottom: 20px; padding: 22px;
  border: 1px solid rgba(245, 197, 107, 0.22); border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(245, 197, 107, 0.06), rgba(12, 19, 30, 0.9) 55%);
  animation: viewIn 0.25s ease both;
}
.form-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.form-head h3 { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field > span { font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); }
.field input, .field select {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 9px;
  background: rgba(7, 11, 18, 0.6); outline: none;
  font-size: 12.5px; color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus, .field select:focus { border-color: rgba(245, 197, 107, 0.5); box-shadow: 0 0 0 3px rgba(245, 197, 107, 0.07); }
.field input::placeholder { color: var(--muted-dim); }
.field-hint { margin-top: 9px; font-size: 11px; color: var(--muted-dim); }
.adult-source-check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border: 1px dashed rgba(244, 93, 108, 0.3); border-radius: 9px;
  background: rgba(120, 24, 35, 0.08); cursor: pointer;
}
.adult-source-check input { width: 15px; height: 15px; margin-top: 2px; accent-color: #d65a68; }
.adult-source-check span { display: flex; flex-direction: column; gap: 2px; }
.adult-source-check strong { font-size: 11.5px; color: #ffc7bf; font-weight: 600; }
.adult-source-check strong em { font-style: normal; font-size: 9px; padding: 1px 4px; border-radius: 3px; background: rgba(244, 93, 108, 0.18); }
.adult-source-check small { font-size: 10.5px; line-height: 1.55; color: var(--muted-dim); }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 15px; }

.settings-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px;
  padding: 20px 22px; margin-bottom: 22px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(148, 163, 184, 0.03);
}
.settings-copy { flex: 1 1 240px; }
.settings-copy h3 { font-size: 14px; font-weight: 600; }
.settings-copy p { margin-top: 3px; font-size: 11px; line-height: 1.6; color: var(--muted-dim); }
.settings-grid { display: flex; flex-wrap: wrap; gap: 18px 26px; flex: 2 1 420px; }
.settings-grid .switch-row { gap: 10px; }
.adult-setting { padding-left: 12px; border-left: 1px dashed rgba(244, 93, 108, 0.24); }
.mini-adult {
  display: inline-block; margin-left: 3px; padding: 0 4px; border-radius: 3px;
  font-style: normal; font-size: 8.5px; line-height: 13px; color: #ffc7bf;
  background: rgba(244, 93, 108, 0.15);
}
.number-field {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(7, 11, 18, 0.6);
}
.number-field input { width: 62px; border: 0; background: transparent; outline: none; font-size: 12px; text-align: right; color: var(--text); }
.number-field em { font-style: normal; font-size: 10px; color: var(--muted-dim); }

/* ------------------------------------------------------------------ tasks */
.crawl-panel {
  padding: 24px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background:
    radial-gradient(600px 220px at 100% 0%, rgba(245, 197, 107, 0.07), transparent 70%),
    linear-gradient(150deg, rgba(20, 32, 50, 0.8), rgba(11, 18, 29, 0.9));
}
.crawl-panel.is-running { border-color: rgba(245, 197, 107, 0.28); }
.crawl-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.crawl-title { display: flex; flex-direction: column; gap: 7px; }
.crawl-title h3 { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  padding: 3px 9px; border-radius: 99px;
  border: 1px solid var(--line); background: rgba(148, 163, 184, 0.07);
  font-size: 10px; letter-spacing: 0.06em; color: var(--muted);
}
.status-pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.status-pill.running { color: var(--gold); border-color: rgba(245, 197, 107, 0.3); background: rgba(245, 197, 107, 0.08); }
.status-pill.running i { background: var(--gold); animation: ping 1.4s ease-out infinite; }
.status-pill.ok { color: var(--green); border-color: rgba(126, 224, 163, 0.3); background: rgba(126, 224, 163, 0.07); }
.status-pill.ok i { background: var(--green); }
.status-pill.partial { color: var(--gold); }
.status-pill.error { color: var(--red); border-color: rgba(242, 139, 139, 0.3); background: rgba(242, 139, 139, 0.07); }
.status-pill.error i { background: var(--red); }
.crawl-timer { font-family: var(--font-mono); font-size: 11px; color: var(--muted-dim); padding-top: 5px; }

.progress { height: 5px; margin: 20px 0 18px; border-radius: 99px; background: rgba(148, 163, 184, 0.1); overflow: hidden; }
.progress-bar {
  height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--gold), var(--teal));
  box-shadow: 0 0 14px rgba(245, 197, 107, 0.5);
  transition: width 0.5s ease;
  position: relative;
}
.progress-bar::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  animation: sweep 1.8s linear infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.crawl-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.crawl-metrics div { display: flex; flex-direction: column; gap: 1px; }
.crawl-metrics span { font-size: 9.5px; letter-spacing: 0.1em; color: var(--muted-dim); }
.crawl-metrics strong { font-size: 17px; font-weight: 600; color: var(--text-soft); font-variant-numeric: tabular-nums; }

.log-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(12, 19, 30, 0.65); overflow: hidden; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 13px; font-weight: 600; letter-spacing: 0.03em; }
.panel-sub { font-size: 10px; color: var(--muted-dim); }
.log-list {
  max-height: 420px; overflow-y: auto;
  padding: 12px 18px 16px;
  font-family: var(--font-mono); font-size: 11px; line-height: 1.75;
}
.log-list li { display: flex; gap: 9px; padding: 3px 0; border-bottom: 1px dashed rgba(148, 163, 184, 0.05); }
.log-list li:last-child { border-bottom: 0; }
.log-time { flex: none; color: var(--muted-dim); font-size: 9.5px; padding-top: 2px; }
.log-msg { color: var(--text-soft); word-break: break-word; }
.log-list .error .log-msg { color: var(--red); }
.log-list .warn .log-msg { color: var(--gold); }
.log-list .ok .log-msg { color: var(--green); }
.log-empty { color: var(--muted-dim); font-family: var(--font-ui); font-size: 11.5px; }

.history-list { padding: 6px 10px 10px; max-height: 420px; overflow-y: auto; }
.history-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 10px 8px; border-bottom: 1px solid rgba(148, 163, 184, 0.06);
}
.history-item:last-child { border-bottom: 0; }
.history-status { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-dim); }
.history-status.ok { background: var(--green); }
.history-status.partial { background: var(--gold); }
.history-status.error { background: var(--red); }
.history-status.interrupted { background: var(--muted); }
.history-main { min-width: 0; }
.history-main strong { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-soft); }
.history-main span { font-size: 9.5px; color: var(--muted-dim); }
.history-nums { text-align: right; font-family: var(--font-mono); font-size: 9.5px; color: var(--muted-dim); line-height: 1.6; }
.history-nums b { color: var(--green); font-weight: 500; }
.history-empty { padding: 28px 10px; text-align: center; font-size: 11.5px; color: var(--muted-dim); }

/* ----------------------------------------------------------------- drawer */
.drawer-scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(3, 6, 11, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.25s ease;
}
.drawer-scrim.is-open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70;
  width: min(520px, 94vw);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0d1624, #080d16);
  border-left: 1px solid var(--line-strong);
  box-shadow: -30px 0 80px -30px rgba(0, 0, 0, 0.95);
  transform: translateX(102%);
  transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.28, 1), visibility 0s linear 0.32s;
  visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.28, 1), visibility 0s; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--line); flex: none;
}
.drawer-kicker { font-size: 10px; font-weight: 700; letter-spacing: 0.22em; color: var(--gold); text-transform: uppercase; }
.drawer-body { flex: 1; overflow-y: auto; padding-bottom: 30px; }
.drawer-hero { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #16243a, #0b1220); overflow: hidden; }
.drawer-hero img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s ease; }
.drawer-hero img.is-loaded { opacity: 1; }
.drawer-hero.is-adult img { filter: blur(20px); transform: scale(1.08); }
.drawer-hero.is-adult::before {
  content: "18+ · 封面已柔化"; position: absolute; z-index: 3; left: 50%; top: 50%;
  transform: translate(-50%, -50%); padding: 5px 9px; border-radius: 5px;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em;
  color: #ffc7bf; background: rgba(20, 6, 10, 0.7); border: 1px solid rgba(244, 93, 108, 0.4);
}
.drawer-hero .thumb-fallback svg { width: 46px; height: 46px; }
.drawer-hero::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, transparent 40%, rgba(8, 13, 22, 0.95)); }
.drawer-inner { padding: 0 24px; }
.drawer-meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: -26px; position: relative; z-index: 2; }
.drawer-inner h2 { margin-top: 16px; font-family: var(--font-display); font-size: 23px; font-weight: 600; line-height: 1.45; }
.drawer-author { margin-top: 6px; font-size: 12px; color: var(--muted); }
.drawer-summary { margin-top: 16px; font-size: 12.5px; line-height: 1.85; color: var(--text-soft); white-space: pre-wrap; word-break: break-word; }
.drawer-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.drawer-meta-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  margin-top: 20px; border: 1px solid var(--line); border-radius: 11px; overflow: hidden;
  background: var(--line);
}
.drawer-meta-grid div { padding: 10px 12px; background: rgba(11, 18, 29, 0.94); }
.drawer-meta-grid span { display: block; font-size: 9.5px; letter-spacing: 0.08em; color: var(--muted-dim); }
.drawer-meta-grid strong { display: block; margin-top: 2px; font-size: 11.5px; font-weight: 500; color: var(--text-soft); word-break: break-all; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.drawer-actions .btn { flex: 1 1 auto; }
.danger-link { color: var(--red); border-color: rgba(242, 139, 139, 0.22); background: rgba(242, 139, 139, 0.05); }
.danger-link:hover { color: var(--red); border-color: rgba(242, 139, 139, 0.45); background: rgba(242, 139, 139, 0.1); }
.drawer-note { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 10.5px; line-height: 1.7; color: var(--muted-dim); }

/* ------------------------------------------------------------------ toast */
.toast-stack { position: fixed; right: 22px; bottom: 22px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex; align-items: center; gap: 9px;
  min-width: 200px; max-width: 340px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  background: rgba(14, 22, 36, 0.96);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  font-size: 12px; color: var(--text-soft);
  animation: toastIn 0.25s ease both;
  backdrop-filter: blur(14px);
}
.toast svg { width: 15px; height: 15px; color: var(--green); }
.toast.error { border-color: rgba(242, 139, 139, 0.35); }
.toast.error svg { color: var(--red); }
.toast.is-out { animation: toastOut 0.25s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }

/* ------------------------------------------------------------------- foot */
.site-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 18px 34px 26px;
  border-top: 1px solid var(--line);
  font-size: 10.5px; color: var(--muted-dim);
}
.foot-links { display: flex; gap: 16px; }
.foot-links a { transition: color 0.18s ease; }
.foot-links a:hover { color: var(--gold); }

.mobile-scrim { position: fixed; inset: 0; z-index: 35; background: rgba(3, 6, 11, 0.6); backdrop-filter: blur(3px); }

/* ------------------------------------------------------------- mobile nav */
.mobile-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line-strong);
  background: rgba(8, 13, 22, 0.94);
  backdrop-filter: blur(18px);
}
.mobile-nav button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 2px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted-dim);
  font-size: 9.5px; letter-spacing: 0.04em;
}
.mobile-nav svg { width: 18px; height: 18px; }
.mobile-nav button.is-active { color: var(--gold); background: rgba(245, 197, 107, 0.07); }

/* --------------------------------------------------------------- age gate */
.age-gate {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center; padding: 18px;
  background: rgba(3, 6, 11, 0.78); backdrop-filter: blur(8px);
}
.age-gate-card {
  width: min(440px, 100%); padding: 26px;
  border: 1px solid rgba(244, 93, 108, 0.3); border-radius: 18px;
  background:
    radial-gradient(340px 180px at 100% 0%, rgba(244, 93, 108, 0.1), transparent 70%),
    linear-gradient(160deg, #111b2b, #080d16 60%);
  box-shadow: 0 30px 90px -30px #000;
  animation: viewIn 0.24s ease both;
}
.age-gate-icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 16px;
  border: 1px solid rgba(244, 93, 108, 0.3); border-radius: 12px;
  color: #ffb4a8; background: rgba(120, 24, 35, 0.22);
}
.age-gate-icon svg { width: 21px; height: 21px; }
.age-gate-card h2 { margin-top: 8px; font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.age-gate-copy { margin-top: 10px; font-size: 12px; line-height: 1.75; color: var(--muted); }
.age-check {
  display: flex; align-items: flex-start; gap: 9px; margin-top: 18px;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: rgba(148, 163, 184, 0.04);
  font-size: 11.5px; line-height: 1.55; color: var(--text-soft); cursor: pointer;
}
.age-check input { width: 15px; height: 15px; margin-top: 1px; accent-color: #d65a68; }
.age-gate-actions { display: flex; gap: 9px; margin-top: 18px; }
.age-gate-actions .btn { flex: 1; justify-content: center; }
.age-gate-note { margin-top: 13px; font-size: 10px; line-height: 1.6; color: var(--muted-dim); }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .hero { grid-template-columns: 1fr; padding: 38px; }
  .hero-visual { min-height: 250px; max-width: 560px; margin: 0 auto; width: 100%; }
  .hero-plate { top: 46%; }
  .log-layout { grid-template-columns: 1fr; }
  .settings-grid { flex-basis: 100%; }
}

@media (max-width: 960px) {
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
  .mobile-nav { display: grid; }
  .sidebar { transform: translateX(-100%); transition: transform 0.28s cubic-bezier(0.22, 0.8, 0.28, 1); box-shadow: 30px 0 80px -30px #000; }
  body.nav-open .sidebar { transform: none; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 12px 20px; }
  .content { padding: 24px 20px 60px; }
  .site-foot { padding: 16px 20px 24px; }
  .nav-item.is-active::before { left: -20px; }
}

@media (max-width: 720px) {
  .topbar { gap: 10px; }
  .sync-hint, .searchbox kbd { display: none; }
  .topbar-actions .btn span { display: none; }
  .topbar-actions .btn { width: 34px; height: 34px; padding: 0; border-radius: 9px; }
  .hero { padding: 26px 22px; border-radius: 20px; }
  .hero h1 { font-size: 30px; }
  .hero-lede { font-size: 12.5px; }
  .hero-stats { gap: 18px 0; }
  .hero-stats > div { width: 50%; padding-right: 0; margin-right: 0; border-right: 0; }
  .hero-stats dt { font-size: 22px; }
  .hero-visual { min-height: 210px; }
  .float-chip { display: none; }
  .hero-plate { padding: 11px 14px; }
  .hero-plate svg { width: 21px; height: 21px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .kind-tabs { overflow-x: auto; }
  .toolbar-right { justify-content: space-between; flex-wrap: wrap; }
  .rating-switch { flex: 1 1 auto; justify-content: center; }
  .rating-tab { flex: 1; justify-content: center; }
  .resource-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
  .page-head.split { flex-direction: column; align-items: flex-start; }
  .page-head-actions { flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; }
  .settings-card { padding: 17px; }
  .crawl-panel { padding: 18px; }
  .crawl-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; }
  .drawer-meta-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .content { padding: 18px 14px 50px; }
  .topbar { padding: 10px 14px; }
  .hero { padding: 22px 17px; }
  .hero h1 { font-size: 26px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .resource-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 30px; }
  .source-grid { grid-template-columns: 1fr; }
  .crawl-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toast-stack { left: 14px; right: 14px; bottom: 14px; }
  .toast { max-width: none; }
  .site-foot { flex-direction: column; align-items: flex-start; }
  .age-gate { padding: 12px; }
  .age-gate-card { padding: 21px; }
  .age-gate-card h2 { font-size: 21px; }
  .drawer { width: 100%; }
  .adult-setting { padding-left: 0; border-left: 0; }
}

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

@media (hover: none) {
  .fav-btn { opacity: 1; transform: none; }
}
