:root {
  color-scheme: dark;
  --page-bg: #11140f;
  --page-bg-deep: #080a08;
  --panel: rgba(24, 29, 23, 0.82);
  --panel-strong: rgba(30, 37, 28, 0.96);
  --panel-soft: rgba(198, 244, 109, 0.08);
  --text: #f4f4ea;
  --muted: #a6ad9e;
  --faint: #737d70;
  --accent: #c8f46d;
  --accent-strong: #ddff8e;
  --warning: #ffc879;
  --media: #9edbff;
  --danger: #ff9c89;
  --line: rgba(244, 244, 234, 0.16);
  --line-strong: rgba(244, 244, 234, 0.32);
  --shadow: rgba(0, 0, 0, 0.34);
  --radius: 18px;
  --ease: 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page-bg-deep); scroll-behavior: auto; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -5%, rgba(200, 244, 109, 0.15), transparent 34rem),
    radial-gradient(circle at 94% 9%, rgba(117, 147, 105, 0.17), transparent 32rem),
    linear-gradient(135deg, #11140f 0%, #161c13 54%, #0a0d0a 100%);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 82%);
  pointer-events: none;
}
body.is-modal-open { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.site-shell { width: min(1240px, 100%); margin: 0 auto; padding: 26px 28px 64px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 42px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); letter-spacing: .04em; }
.brand-mark { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px rgba(200,244,109,.1), 0 0 28px rgba(200,244,109,.5); }
.brand strong { font-size: 13px; font-weight: 800; letter-spacing: .16em; }
.brand span { color: var(--muted); font-size: 12px; }
.topbar-link { color: var(--muted); font-size: 12px; }
.topbar-link:hover { color: var(--accent); }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; margin-bottom: 26px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 790px; margin-bottom: 13px; font-family: "Iowan Old Style", "Songti SC", "Noto Serif SC", Georgia, serif; font-size: clamp(34px, 5.3vw, 68px); font-weight: 600; line-height: .98; letter-spacing: -.045em; text-wrap: balance; }
.hero-copy { max-width: 720px; color: var(--muted); font-size: 14px; }
.hero-copy strong { color: var(--text); font-weight: 650; }
.hero-side { display: flex; justify-content: flex-end; }
.last-updated { color: var(--faint); font-size: 11px; text-align: right; }

.nav { position: sticky; top: 14px; z-index: 10; display: flex; gap: 7px; width: max-content; max-width: 100%; margin-bottom: 24px; padding: 6px; overflow-x: auto; border: 1px solid var(--line); border-radius: 999px; background: rgba(10,13,10,.76); box-shadow: 0 12px 40px var(--shadow); backdrop-filter: blur(16px); }
.nav button { flex: 0 0 auto; padding: 8px 13px; border: 1px solid transparent; border-radius: 999px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; white-space: nowrap; }
.nav button:hover, .nav button.is-active { color: #11140f; background: var(--accent); }
.nav button.is-active { box-shadow: 0 0 0 3px rgba(200,244,109,.12); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.search { display: flex; align-items: center; gap: 9px; min-width: min(100%, 360px); padding: 10px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(10,13,10,.54); }
.search svg { flex: 0 0 auto; color: var(--muted); }
.search input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 13px; }
.search input::placeholder { color: var(--faint); }
.toolbar-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-pills { display: inline-flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: rgba(10,13,10,.48); }
.filter-pill { padding: 6px 10px; border: 0; border-radius: 999px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 700; }
.filter-pill:hover, .filter-pill.is-active { color: #11140f; background: var(--accent); }
.sort-control { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.sort-control select { padding: 7px 25px 7px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--text); background: rgba(10,13,10,.72); font-size: 11px; }
.view-note { color: var(--muted); font-size: 12px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 24px; }
.stat { min-height: 112px; padding: 17px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(41,50,37,.8), rgba(17,20,15,.86)); box-shadow: 0 16px 42px rgba(0,0,0,.12); }
.stat-wide { grid-column: span 2; }
.stat-label { color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.stat-value { margin-top: 7px; color: var(--text); font-size: clamp(21px, 3vw, 34px); font-weight: 800; letter-spacing: -.04em; }
.stat-value small { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.stat-wide .stat-value { min-width: 0; }
.stat-wide .stat-value small { display: block; font-size: clamp(13px, 1.5vw, 18px); line-height: 1.35; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }

.section { margin-top: 28px; }
.section-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.section-heading h2 { margin-bottom: 0; font-size: 18px; letter-spacing: -.02em; }
.section-heading p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.recent-section { margin: 4px 0 30px; }
.recent-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.recent-card { position: relative; display: flex; min-height: 82px; flex-direction: column; justify-content: space-between; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: rgba(255,255,255,.035); transition: border-color var(--ease), background var(--ease), transform var(--ease); }
.recent-card:hover { border-color: rgba(200,244,109,.58); background: rgba(200,244,109,.08); transform: translateY(-2px); }
.recent-card strong { color: var(--accent); font-size: 15px; letter-spacing: -.02em; }
.recent-card span { color: var(--muted); font-size: 10px; line-height: 1.35; }
.recent-card i { position: absolute; top: 11px; right: 11px; color: var(--faint); font-size: 13px; font-style: normal; }
.issue-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.issue-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 14px 38px rgba(0,0,0,.13); transition: border-color var(--ease), transform var(--ease), background var(--ease); }
.issue-card.is-clickable { cursor: pointer; }
.issue-card.is-clickable:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(200,244,109,.16), 0 14px 38px rgba(0,0,0,.13); }
.issue-card:hover { border-color: var(--line-strong); background: var(--panel-strong); transform: translateY(-2px); }
.issue-card-inner { padding: 17px 18px; }
.issue-title { display: block; margin-bottom: 10px; color: var(--text); font-size: 15px; font-weight: 750; line-height: 1.35; }
.issue-title:hover { color: var(--accent); }
.issue-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 11px; }
.chip { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.035); }
.chip.accent { color: var(--accent); border-color: rgba(200,244,109,.34); background: rgba(200,244,109,.08); }
.chip.media { color: var(--media); border-color: rgba(158,219,255,.3); background: rgba(158,219,255,.08); }
.chip.warning { color: var(--warning); border-color: rgba(255,200,121,.3); background: rgba(255,200,121,.08); }
.issue-summary { margin: 13px 0 0; color: var(--muted); font-size: 12px; }
.issue-action { display: inline-flex; align-items: center; gap: 5px; margin-top: 14px; color: var(--accent); font-size: 12px; font-weight: 700; }
.issue-action::after { content: "↗"; transition: transform var(--ease); }
.issue-card:hover .issue-action::after { transform: translate(2px, -2px); }

.day-block { margin: 28px 0 0; }
.day-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.day-heading h2 { margin: 0; font-size: 18px; }
.day-heading a { color: var(--accent); font-size: 12px; }
.day-heading span { color: var(--muted); font-size: 11px; }
.record-list { display: grid; gap: 8px; margin-top: 15px; }
.record { padding: 13px 14px; border-left: 2px solid rgba(200,244,109,.48); border-radius: 0 12px 12px 0; background: rgba(255,255,255,.035); }
.record-time { color: var(--accent); font-variant-numeric: tabular-nums; font-size: 11px; }
.record-text { margin: 4px 0 0; color: var(--text); font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); gap: 11px; margin-top: 15px; }
.media-thumb { position: relative; display: block; width: 100%; min-height: 180px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; color: var(--text); background: #050605; text-align: left; }
.media-thumb:hover { border-color: rgba(200,244,109,.62); }
.media-thumb img, .media-thumb video { display: block; width: 100%; height: min(34vw, 340px); min-height: 180px; max-height: 340px; border: 0; border-radius: 12px; background: #050605; object-fit: contain; }
.play-placeholder { display: grid; min-height: 180px; place-items: center; background: radial-gradient(circle at center, rgba(200,244,109,.12), transparent 42%), #050605; }
.media-thumb .media-badge { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; color: var(--text); background: rgba(10,13,10,.78); font-size: 11px; backdrop-filter: blur(9px); }
.media-thumb .play-icon { width: 0; height: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid var(--accent); }
.evidence-caption { margin-top: 5px; color: var(--muted); font-size: 10px; }
.evidence-error { padding: 10px; border: 1px dashed var(--line); border-radius: 10px; color: var(--faint); font-size: 11px; }

.lightbox[hidden] { display: none; }
.lightbox { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 0; background: rgba(4,6,4,.94); backdrop-filter: blur(16px); animation: lightbox-in 180ms ease-out; }
.lightbox-dialog { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: 100vw; height: 100vh; height: 100dvh; overflow: hidden; border: 0; border-radius: 0; background: #0b0e0b; box-shadow: 0 30px 100px rgba(0,0,0,.6); }
.lightbox-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 17px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.lightbox-title small { margin-left: 8px; color: var(--faint); font-size: 10px; font-weight: 400; }
.lightbox-close { display: inline-grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--text); background: rgba(255,255,255,.05); font-size: 20px; line-height: 1; }
.lightbox-close:hover { color: #11140f; background: var(--accent); }
.lightbox-stage { display: grid; min-height: 0; overflow: hidden; place-items: center; padding: 12px; cursor: zoom-out; }
.lightbox-stage img, .lightbox-stage video { display: block; width: auto; height: auto; max-width: calc(100vw - 24px); max-height: calc(100vh - 136px); max-height: calc(100dvh - 136px); border-radius: 10px; background: #050605; object-fit: contain; }
.lightbox-stage video { cursor: default; }
.lightbox-foot { min-height: 48px; padding: 10px 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }

.empty { padding: 34px 18px; border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--muted); text-align: center; }
.footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 50px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: 11px; }
.footer a { color: var(--muted); }
.loading { min-height: 40vh; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.error { padding: 22px; border: 1px solid rgba(255,156,137,.35); border-radius: var(--radius); color: var(--danger); background: rgba(255,156,137,.08); }

@media (max-width: 820px) {
  .site-shell { padding: 20px 16px 46px; }
  .topbar { margin-bottom: 30px; }
  .hero { grid-template-columns: 1fr; gap: 10px; }
  .hero-side { justify-content: flex-start; }
  .last-updated { text-align: left; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-wide { grid-column: 1 / -1; }
  .issue-grid { grid-template-columns: 1fr; }
  .recent-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .nav { top: 9px; }
  .toolbar-controls { width: 100%; justify-content: space-between; }
}
@media (max-width: 470px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .recent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { min-height: 96px; padding: 13px; }
  .stat-value { font-size: 23px; }
  .brand span { display: none; }
  .toolbar-controls { align-items: stretch; }
  .filter-pills { max-width: 100%; overflow-x: auto; }
  .filter-pill { flex: 0 0 auto; }
  .footer { display: block; }
  .lightbox-stage { padding: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
