:root {
  color-scheme: dark;
  --bg: #07080d;
  --ink: #e7e9f2;
  --muted: #9aa3b8;
  --line: rgba(255, 255, 255, 0.08);
  --panel: rgba(12, 14, 22, 0.78);
  --accent: #9db4ff;
  font-family: "Apple SD Gothic Neo", "Pretendard", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.top {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 280px) auto;
  gap: 16px 24px;
  align-items: end;
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.04em;
}

h1, h2 { margin: 0; font-weight: 620; }
h1 { font-size: 22px; }
h2 { font-size: 28px; }

.search input {
  width: 100%;
  border: 1px solid var(--line);
  background: #10131c;
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
}

.coverage, .meta, .hint, .status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 280px 1fr 320px;
}

.list-pane, .detail {
  min-height: 0;
  overflow: auto;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

.detail {
  border-right: 0;
  border-left: 1px solid var(--line);
  padding: 22px 20px 32px;
}

.list-pane ol {
  list-style: none;
  margin: 0;
  padding: 8px;
}

.list-pane button {
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 10px 10px;
  cursor: pointer;
}

.list-pane button strong { display: block; font-weight: 600; }
.list-pane button span { color: var(--muted); font-size: 12px; }
.list-pane button[aria-current="true"],
.list-pane button:hover { background: rgba(157, 180, 255, 0.1); }

.stage { position: relative; min-height: 420px; height: 100%; }
.stage canvas { display: block; width: 100%; height: 100%; }
.hint {
  position: absolute;
  left: 16px;
  bottom: 14px;
  max-width: 420px;
  pointer-events: none;
}
#labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.label {
  position: absolute;
  transform: translate(-50%, -130%);
  font-size: 12px;
  white-space: nowrap;
  text-shadow: 0 1px 2px #000;
}

#detail-why { line-height: 1.55; }
#detail-link {
  display: grid;
  gap: 6px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
  background: #10131c;
}
#detail-link:hover { border-color: rgba(157, 180, 255, 0.5); }
#detail-title { font-weight: 600; line-height: 1.4; }
#detail-source { color: var(--muted); font-size: 13px; }
blockquote {
  margin: 14px 0 0;
  padding-left: 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

details { margin: 8px 12px 18px; color: var(--muted); font-size: 12px; }
details ul { padding-left: 18px; }
.status { padding: 8px 22px 14px; }
.status[data-bad="true"] { color: #ff8d8d; }

@media (max-width: 980px) {
  .top { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; }
  .stage { height: 72vh; }
  .list-pane, .detail { border: 0; border-top: 1px solid var(--line); }
}
