/* ============================================================
   追剧导航 · Zhuiju Nav — cinematic editorial dark theme
   ============================================================ */

:root {
  --bg: #16140e;
  --bg-2: #1c1912;
  --surface: #221e15;
  --surface-2: #2b2618;
  --line: rgba(235, 228, 208, 0.09);
  --line-strong: rgba(235, 228, 208, 0.18);
  --text: #f0ebdd;
  --text-2: #a9a08c;
  --text-3: #6f6859;
  --gold: #e3a83e;
  --gold-hi: #f2c464;
  --gold-dim: rgba(227, 168, 62, 0.13);
  --ok: #7fa969;
  --warn: #d9a441;
  --down: #c05b50;
  --radius: 14px;
  --font-serif: "Noto Serif SC", "Songti SC", "STSong", serif;
  --font-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", "Courier New", monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* 防御：author 样式的 display 会覆盖 UA 的 [hidden]{display:none}，必须显式声明 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

::selection { background: var(--gold); color: #16140e; }

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

a { color: inherit; text-decoration: none; }

button { font-family: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ---------- background atmosphere ---------- */

.glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(960px 520px at 50% -12%, rgba(227, 168, 62, 0.11), transparent 62%),
    radial-gradient(640px 420px at 88% 26%, rgba(192, 91, 80, 0.055), transparent 60%),
    radial-gradient(720px 620px at 6% 82%, rgba(227, 168, 62, 0.045), transparent 60%);
}

.grain {
  position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, .topbar, .footer { position: relative; z-index: 2; }

/* ---------- topbar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 28px; height: 62px;
  background: rgba(22, 20, 14, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 11px; }

.brand-mark { width: 26px; height: 26px; color: var(--gold); flex: none; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-name { font-family: var(--font-serif); font-weight: 600; font-size: 17px; letter-spacing: 0.06em; }

.brand-sub { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.32em; color: var(--text-3); }

.topbar-right { display: flex; align-items: center; gap: 10px; }

.data-date { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.data-date b { font-family: var(--font-mono); font-weight: 600; color: var(--gold-hi); }

.src-badge {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text-2);
  padding: 5px 11px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); white-space: nowrap;
}

.src-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.src-badge.live .src-dot { background: var(--ok); animation: pulse-ok 2.4s infinite; }
.src-badge.cache .src-dot { background: var(--warn); }
.src-badge.fail .src-dot { background: var(--down); }

.icon-btn, .icon-link {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--text-2); background: var(--surface);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.icon-btn:hover, .icon-link:hover { color: var(--gold-hi); border-color: var(--line-strong); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg, .icon-link svg { width: 15px; height: 15px; }
.icon-btn.loading svg { animation: spin 0.9s linear infinite; }

/* ---------- hero ---------- */

.hero {
  max-width: 1180px; margin: 0 auto;
  padding: 92px 28px 66px;
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: center;
}

.kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em;
  color: var(--gold); margin-bottom: 22px;
}
.kicker-line { width: 34px; height: 1px; background: var(--gold); }

.hero h1 {
  font-family: var(--font-serif); font-weight: 900;
  font-size: clamp(42px, 6.4vw, 78px);
  line-height: 1.08; letter-spacing: 0.01em;
  margin-bottom: 24px;
}
.hero h1 em {
  font-style: italic; color: var(--gold);
  position: relative;
}
.hero h1 em::after {
  content: ""; position: absolute; left: 2%; right: 2%; bottom: 0.1em; height: 0.14em;
  background: var(--gold-dim); z-index: -1;
}

.lede { max-width: 56ch; color: var(--text-2); font-size: 15.5px; margin-bottom: 30px; }

.stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }

.stat-chip {
  display: flex; align-items: baseline; gap: 7px;
  padding: 9px 15px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface);
}
.stat-chip b { font-family: var(--font-mono); font-weight: 600; font-size: 17px; color: var(--gold-hi); }
.stat-chip span { font-size: 12px; color: var(--text-2); }

.cta { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px;
  font-size: 14px; font-weight: 500; letter-spacing: 0.04em;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--gold); color: #16140e; font-weight: 700; }
.btn-primary:hover { background: var(--gold-hi); box-shadow: 0 6px 28px rgba(227, 168, 62, 0.28); }

.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-hi); }

.hero-art { color: rgba(227, 168, 62, 0.5); justify-self: center; }
.hero-art svg { width: 100%; max-width: 300px; height: auto; }
.aperture { transform-origin: 150px 150px; animation: spin 90s linear infinite; }
.ring-slow { transform-origin: 150px 150px; animation: spin 150s linear infinite reverse; }

/* ---------- controls ---------- */

.controls {
  position: sticky; top: 62px; z-index: 40;
  max-width: 1180px; margin: 0 auto;
  padding: 14px 28px 12px;
  background: rgba(22, 20, 14, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.search-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px; height: 46px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }

.search-icon { width: 15px; height: 15px; color: var(--text-3); flex: none; }

#searchInput {
  flex: 1; min-width: 0; height: 100%;
  background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 14px;
}
#searchInput::placeholder { color: var(--text-3); }
#searchInput::-webkit-search-cancel-button { -webkit-appearance: none; }

.search-wrap kbd {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 7px; background: var(--bg-2);
}

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none; display: flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; color: var(--text-2);
  transition: all 0.2s var(--ease-out);
}
.chip b { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text-3); }
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.active { background: var(--gold); border-color: var(--gold); color: #16140e; }
.chip.active b { color: rgba(22, 20, 14, 0.65); }

.controls-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-top: 8px; }

.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }

.seg-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  font-size: 12.5px; color: var(--text-2);
  transition: all 0.18s;
}
.seg-btn .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.seg-btn[data-status="ok"] .dot { background: var(--ok); }
.seg-btn[data-status="warn"] .dot { background: var(--warn); }
.seg-btn[data-status="down"] .dot { background: var(--down); }
.seg-btn[data-status="unknown"] .dot { background: var(--text-3); }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface-2); color: var(--text); }

.controls-right { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.sel-wrap { display: flex; align-items: center; gap: 8px; }
.sel-label { font-size: 12px; color: var(--text-3); }

#sortSel {
  appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a9a08c' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-family: inherit; font-size: 13px;
  padding: 7px 32px 7px 12px; cursor: pointer;
}
#sortSel:hover { border-color: var(--line-strong); }

.switch { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 34px; height: 19px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  position: relative; transition: background 0.2s, border-color 0.2s;
}
.switch-track::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--text-2); transition: transform 0.22s var(--ease-out), background 0.2s;
}
.switch input:checked + .switch-track { background: var(--gold-dim); border-color: var(--gold); }
.switch input:checked + .switch-track::after { transform: translateX(15px); background: var(--gold-hi); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--gold); outline-offset: 2px; }

.count { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); white-space: nowrap; }
.count b { color: var(--gold-hi); font-weight: 600; }

/* ---------- featured strip ---------- */

.strip-wrap { max-width: 1180px; margin: 0 auto; padding: 44px 28px 8px; }

.strip-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.strip-head h2 { font-family: var(--font-serif); font-weight: 600; font-size: 26px; letter-spacing: 0.02em; }
.strip-sub { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; color: var(--text-3); }

.strip {
  display: flex; gap: 18px; overflow-x: auto;
  padding: 6px 4px 22px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent;
}
.strip::-webkit-scrollbar { height: 6px; }
.strip::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 99px; }
.strip::-webkit-scrollbar-track { background: transparent; }

.poster {
  flex: none; width: 196px; scroll-snap-align: start;
  cursor: pointer; display: block; text-align: left;
  transition: transform 0.3s var(--ease-out);
}
.poster:hover { transform: translateY(-7px); }

.poster-art {
  position: relative; aspect-ratio: 3 / 4; border-radius: 12px;
  background: linear-gradient(158deg, var(--p1, #3a2f18), var(--p2, #191510));
  border: 1px solid var(--line-strong);
  overflow: hidden;
  display: grid; place-items: center;
}
.poster-art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12, 10, 6, 0.78) 0%, transparent 46%);
}
.poster-initial {
  font-family: var(--font-serif); font-weight: 900;
  font-size: 92px; line-height: 1;
  color: rgba(240, 235, 221, 0.9);
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
  user-select: none;
}
.poster-status { position: absolute; top: 11px; left: 11px; z-index: 2; display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: rgba(240, 235, 221, 0.85); background: rgba(12, 10, 6, 0.55); padding: 3px 8px; border-radius: 99px; backdrop-filter: blur(4px); }
.poster-rating { position: absolute; top: 11px; right: 11px; z-index: 2; font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--gold-hi); background: rgba(12, 10, 6, 0.55); padding: 3px 8px; border-radius: 99px; backdrop-filter: blur(4px); }
.poster-info { position: absolute; left: 13px; right: 13px; bottom: 12px; z-index: 2; }
.poster-name { font-family: var(--font-serif); font-weight: 600; font-size: 16.5px; margin-bottom: 3px; }
.poster-short { font-size: 11.5px; color: rgba(240, 235, 221, 0.62); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.poster-cat { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; color: var(--gold); margin-bottom: 5px; }

/* ---------- sections & rows ---------- */

#sections { max-width: 1180px; margin: 0 auto; padding: 8px 28px 30px; }

.cat-section { margin-top: 44px; }

.cat-head { display: flex; align-items: baseline; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); }
.cat-head h2 { font-family: var(--font-serif); font-weight: 600; font-size: 24px; letter-spacing: 0.02em; }
.cat-en { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; color: var(--text-3); }
.cat-count { margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--gold); }

.rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 8px;
}

.card {
  position: relative;
  display: flex; flex-direction: column; gap: 9px;
  padding: 15px 17px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  animation: rise 0.5s var(--ease-out) both;
  animation-delay: calc(min(var(--i, 0), 10) * 45ms);
  transition: border-color 0.2s, background 0.2s, transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.card:hover {
  border-color: rgba(227, 168, 62, 0.35);
  background: var(--surface-2);
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.28);
}
/* 首次渲染后停止入场动画，避免筛选/搜索时整页闪动 */
#sections.static .card { animation: none; }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 10px; flex-wrap: wrap; min-width: 0; }

.card-name-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }

.card-name {
  font-family: var(--font-serif); font-weight: 600; font-size: 16.5px; letter-spacing: 0.01em;
  transition: color 0.2s;
}
.card-name:hover { color: var(--gold-hi); }

.gh-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--gold-hi);
  background: var(--gold-dim); border: 1px solid rgba(227, 168, 62, 0.25);
  padding: 2px 8px; border-radius: 99px;
}
.gh-badge svg { width: 10px; height: 10px; }

.card-sum {
  font-size: 13px; color: var(--text-2); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.card-tags { display: flex; gap: 5px; flex-wrap: wrap; min-width: 0; }

.card-tag {
  font-size: 10.5px; color: var(--text-3);
  border: 1px solid var(--line); border-radius: 99px; padding: 1.5px 8px;
  transition: color 0.2s, border-color 0.2s;
}
.card:hover .card-tag { color: var(--text-2); border-color: var(--line-strong); }

.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap;
  margin-top: auto; padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.card-meta { display: flex; align-items: center; gap: 10px; flex: none; }

.stars { position: relative; display: inline-block; font-size: 11px; letter-spacing: 2.5px; line-height: 1; color: rgba(235, 228, 208, 0.16); }
.stars-fg { position: absolute; inset: 0; width: var(--pct, 0%); overflow: hidden; white-space: nowrap; color: var(--gold); }

.rating-num { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--gold-hi); }

.card-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.dot { position: relative; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--text-3); }
.status-ok .dot { background: var(--ok); }
.status-ok .dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--ok); animation: ring 2.6s ease-out infinite; }
.status-warn .dot { background: var(--warn); }
.status-down .dot { background: var(--down); }
.status-unknown .dot { background: transparent; border: 1px solid var(--text-3); }
.status-ok .status-label { color: var(--ok); }
.status-warn .status-label { color: var(--warn); }
.status-down .status-label { color: var(--down); }

.status-date { font-family: var(--font-mono); font-size: 10px; color: var(--text-3); }

.card-actions { display: flex; gap: 4px; flex: none; }

.act-btn {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; border: 1px solid transparent;
  color: var(--text-3);
  transition: all 0.18s;
}
.act-btn svg { width: 14px; height: 14px; }
.act-btn:hover { color: var(--gold-hi); background: var(--gold-dim); border-color: rgba(227, 168, 62, 0.3); }
.act-btn:active { transform: scale(0.92); }
.act-btn.done { color: var(--ok); }

.card.removed { opacity: 0.55; }
.card.removed:hover { opacity: 0.85; }
.removed-flag { font-size: 10.5px; color: var(--down); border: 1px solid rgba(192, 91, 80, 0.4); border-radius: 99px; padding: 1px 8px; }

/* ---------- states ---------- */

.state-box {
  max-width: 560px; margin: 70px auto; padding: 0 28px;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
}
.state-box svg { width: 44px; height: 44px; color: var(--text-3); margin-bottom: 8px; }
.state-title { font-family: var(--font-serif); font-weight: 600; font-size: 19px; }
.state-sub { font-size: 13px; color: var(--text-3); margin-bottom: 8px; }

.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--line-strong); border-top-color: var(--gold);
  animation: spin 0.85s linear infinite; margin-bottom: 14px;
}

.skeleton-list { width: 100%; margin-top: 26px; display: flex; flex-direction: column; }
.sk-row {
  height: 58px; border-bottom: 1px solid var(--line);
  background: linear-gradient(100deg, transparent 20%, rgba(235, 228, 208, 0.05) 40%, transparent 60%);
  background-size: 220% 100%;
  animation: shimmer 1.5s infinite;
}

.empty-tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.empty-tags .chip { cursor: pointer; }

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 9, 6, 0.72);
  backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 24px;
  animation: fade 0.25s;
}
.modal-backdrop[hidden] { display: none; }

.modal {
  position: relative;
  width: min(660px, 100%); max-height: 86dvh; overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 34px 36px 30px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  animation: pop 0.32s var(--ease-out);
  scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent;
}
.modal::-webkit-scrollbar { width: 6px; }
.modal::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 99px; }

.modal-close {
  position: absolute; top: 16px; right: 16px;
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 9px; color: var(--text-3); border: 1px solid var(--line);
  transition: all 0.18s;
}
.modal-close:hover { color: var(--gold-hi); border-color: var(--gold); }
.modal-close svg { width: 13px; height: 13px; }

.m-cat { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.2em; color: var(--gold); margin-bottom: 8px; }
.m-name { font-family: var(--font-serif); font-weight: 900; font-size: 30px; line-height: 1.15; margin-bottom: 8px; padding-right: 30px; }
.m-summary { color: var(--text-2); font-size: 14px; margin-bottom: 18px; }

.m-url {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; margin-bottom: 22px;
  word-break: break-all;
}
.m-url .dot { flex: none; }

.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }

.m-block-title { font-size: 12px; color: var(--text-3); letter-spacing: 0.08em; margin-bottom: 12px; }

.score-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.score-label { width: 40px; font-size: 12.5px; color: var(--text-2); flex: none; }
.score-track { flex: 1; height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.score-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--gold-hi)); transform-origin: left; animation: grow 0.7s var(--ease-out); }
.score-val { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--gold-hi); width: 26px; text-align: right; flex: none; }

.risk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.risk-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; font-size: 12px; color: var(--text-2); }
.risk-item b { font-weight: 500; font-size: 11.5px; }
.risk-low b { color: var(--ok); }
.risk-medium b { color: var(--warn); }
.risk-high b { color: var(--down); }
.risk-unknown b { color: var(--text-3); }

.m-notes {
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: 15px 17px; font-size: 13px; color: var(--text-2); line-height: 1.75;
  white-space: pre-wrap; word-break: break-word;
  max-height: 220px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--surface-2) transparent;
}
.m-notes::-webkit-scrollbar { width: 5px; }
.m-notes::-webkit-scrollbar-thumb { background: var(--surface-2); border-radius: 99px; }

.m-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.m-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.m-actions { display: flex; gap: 10px; }

/* ---------- footer ---------- */

.footer { margin-top: 40px; border-top: 1px solid var(--line); }

.filmstrip {
  height: 30px;
  background:
    repeating-linear-gradient(90deg, var(--surface) 0 9px, transparent 9px 26px) top left / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, var(--surface) 0 9px, transparent 9px 26px) bottom left / 100% 7px no-repeat,
    linear-gradient(var(--line), var(--line)) center left / 100% 16px no-repeat;
  opacity: 0.8;
}

.footer-inner { max-width: 1180px; margin: 0 auto; padding: 34px 28px 46px; }
.footer-disc { max-width: 70ch; font-size: 13px; color: var(--text-2); margin-bottom: 16px; }
.footer-meta { display: flex; flex-wrap: wrap; gap: 8px 26px; font-size: 12px; color: var(--text-3); }
.footer-meta b { font-family: var(--font-mono); font-weight: 600; color: var(--text-2); }
.footer-meta a { color: var(--gold); border-bottom: 1px dotted rgba(227, 168, 62, 0.4); }
.footer-meta a:hover { color: var(--gold-hi); }

/* ---------- toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 300;
  transform: translate(-50%, 16px);
  background: var(--gold); color: #16140e;
  font-size: 13px; font-weight: 700;
  padding: 10px 20px; border-radius: 99px;
  box-shadow: 0 10px 40px rgba(227, 168, 62, 0.3);
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.35s var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- animations ---------- */

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes pulse-ok { 0%, 100% { box-shadow: 0 0 0 0 rgba(127, 169, 105, 0.45); } 50% { box-shadow: 0 0 0 5px rgba(127, 169, 105, 0); } }

@keyframes ring { from { transform: scale(0.4); opacity: 0.9; } to { transform: scale(1.7); opacity: 0; } }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@keyframes fade { from { opacity: 0; } }

@keyframes pop { from { opacity: 0; transform: translateY(18px) scale(0.98); } }

@keyframes shimmer { from { background-position: 220% 0; } to { background-position: -220% 0; } }

@keyframes grow { from { transform: scaleX(0); } }

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding: 64px 24px 48px; }
  .hero-art { display: none; }
  .topbar { padding: 0 18px; }
  .controls, .strip-wrap, #sections, .footer-inner { padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 1099px) {
  .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .brand-sub { display: none; }
  .src-badge { display: none; }
  .data-date { display: none; }
  .controls { top: 62px; }
  .controls-row { gap: 10px; }
  .rows { grid-template-columns: 1fr; }
  .m-grid { grid-template-columns: 1fr; }
  .modal { padding: 26px 22px 22px; }
  .hero h1 { font-size: clamp(38px, 11vw, 52px); }
}

/* ---------- reduced motion ---------- */

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