@font-face {
  font-family: "Noto Sans SC Local";
  src: url("/fonts/noto-sans-sc-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #101314;
  --panel: #171b1d;
  --panel-soft: #1d2325;
  --line: rgba(244, 241, 232, 0.12);
  --text: #f4f1e8;
  --muted: #a7aaa6;
  --accent: #f2b84b;
  --accent-strong: #ffd36a;
  --danger: #f28b78;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC Local", "Noto Sans SC", system-ui, sans-serif;
  font-size: 16px;
}
button, input, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; padding: 28px 4vw 18px; display: flex; flex-direction: column; }
.topbar, .footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.topbar { min-height: 54px; margin-bottom: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; letter-spacing: 0.03em; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #111; font-weight: 900; font-size: 21px; }
.brand strong { display: block; font-size: 21px; letter-spacing: 0.16em; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 11px; letter-spacing: 0.1em; }
.status-line, .stage-label, .count-label { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(242,184,75,.12); vertical-align: 1px; }
.layout { display: grid; grid-template-columns: minmax(190px, 0.7fr) minmax(460px, 1.8fr) minmax(260px, 0.9fr); gap: 22px; flex: 1; }
.rail, .stage { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.rail { display: flex; flex-direction: column; padding: 26px 20px; }
.stage { display: flex; flex-direction: column; padding: 26px; min-height: 520px; }
.content { min-width: 0; padding: 12px 10px 0; }
.eyebrow, .detail-kicker { margin: 0 0 10px; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; }
.nav-list { display: grid; gap: 8px; }
.nav-button, .primary-button, .stage-button, .result-row, .media-card { min-height: 48px; border: 1px solid transparent; border-radius: 11px; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.nav-button { padding: 0 14px; background: transparent; color: var(--muted); text-align: left; }
.nav-button:hover, .nav-button.is-active { background: var(--panel-soft); color: var(--text); }
.nav-button.is-active { border-left: 3px solid var(--accent); padding-left: 11px; }
.notice { margin-top: auto; padding-top: 28px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.notice-title { margin: 0 0 7px; color: var(--text); font-weight: 700; }
.notice p { margin: 0 0 8px; }
.notice-foot { color: var(--accent); }
.hero-copy h1 { margin: 0; font-size: clamp(32px, 4vw, 58px); line-height: 1; letter-spacing: -0.04em; }
.lede { max-width: 560px; margin: 15px 0 0; color: var(--muted); line-height: 1.7; }
.search-form, .filter-form { display: flex; align-items: center; gap: 10px; margin: 30px 0 38px; }
.search-form input, .filter-form input { width: 100%; min-height: 52px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); padding: 0 16px; outline: none; }
.filter-form { max-width: 540px; margin-bottom: 26px; }
.filter-form label { color: var(--muted); white-space: nowrap; }
.primary-button, .stage-button { display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; background: var(--accent); color: #111; font-weight: 800; white-space: nowrap; }
.primary-button:hover, .stage-button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-size: 21px; }
.result-list { display: grid; gap: 9px; }
.result-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 16px; background: var(--panel); color: var(--text); text-align: left; }
.result-row:hover, .media-card:hover { background: var(--panel-soft); border-color: rgba(242,184,75,.35); }
.result-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; font-weight: 700; }
.result-meta, .card-meta { display: block; margin-top: 5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.result-score { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 14px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 32px; }
.media-card { display: flex; min-height: 150px; flex-direction: column; justify-content: space-between; padding: 18px; background: var(--panel); color: var(--text); text-align: left; }
.media-card h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.media-card p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; text-transform: uppercase; }
.empty-state, .loading-state, .error-state { padding: 34px 18px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); }
.empty-state strong, .loading-state strong, .error-state strong { display: block; color: var(--text); }
.empty-state span { display: block; margin-top: 7px; }
.error-state { border-color: rgba(242,139,120,.45); }
.error-state strong { color: var(--danger); }
.retry-button { margin-top: 14px; min-height: 42px; padding: 0 14px; border: 1px solid rgba(242,139,120,.55); border-radius: 9px; background: transparent; color: var(--text); }
.skeleton { height: 70px; border-radius: 11px; background: linear-gradient(90deg, var(--panel) 25%, var(--panel-soft) 50%, var(--panel) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.detail-stage { margin: auto 0 30px; }
.detail-stage h2 { margin: 0; font-size: clamp(28px, 3vw, 46px); line-height: 1.08; letter-spacing: -0.04em; }
.detail-stage p:not(.detail-kicker) { color: var(--muted); line-height: 1.7; }
.stage-button { width: 100%; }
.stage-button.is-disabled { pointer-events: none; opacity: .35; }
.fallback-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.footer { margin-top: 18px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 3px; }
.view[hidden] { display: none; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (max-width: 1080px) { .layout { grid-template-columns: 180px minmax(0, 1fr); } .stage { grid-column: 1 / -1; min-height: 280px; } .detail-stage { margin-top: 22px; } }
@media (max-width: 700px) { .app-shell { padding: 18px 16px; } .topbar { margin-bottom: 18px; } .status-line { display: none; } .layout { display: block; } .rail { margin-bottom: 18px; } .notice { display: none; } .content { padding: 18px 4px; } .stage { min-height: 240px; } .search-form { align-items: stretch; flex-direction: column; } .search-form input, .primary-button { width: 100%; } .footer { align-items: flex-start; flex-direction: column; gap: 5px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
