:root {
  --bg: #1a1210;
  --surface: #261b17;
  --ink: #f4ede1;
  --muted: #b5a390;
  --hair: #3b2d26;
  --accent: #ffd166;
  --pen: #ff5a3c;
  --r-ctl: 3px;
  --r-box: 2px;
  --ui: "BIZ UDPGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
  --display: "Yuji Syuku", "BIZ UDPGothic", serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.7 var(--ui); min-height: 100dvh; }
::selection { background: var(--accent); color: var(--bg); }
a { color: inherit; }
main, .bar, .foot { max-width: 560px; margin: 0 auto; padding: 0 16px; }

.bar { display: flex; justify-content: space-between; align-items: center; height: 48px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--hair); }
.home { text-decoration: none; font-weight: 700; }
.home::before { content: "← "; }

.title { font: 400 30px/1.2 var(--display); letter-spacing: .06em; margin: 22px 0 6px; }
.lede { margin: 0; color: var(--muted); font-size: 14px; }

.status { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 10px; }
.found { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.found li { width: 16px; height: 20px; border-radius: 7px / 9px; border: 1.5px solid var(--hair); background: transparent; position: relative; }
.found li::before, .found li::after { content: ""; position: absolute; left: 3px; right: 3px; height: 2px; background: var(--hair); }
.found li::before { top: -3px; } .found li::after { bottom: -3px; }
.found li.on { background: #de4234; border-color: #de4234; box-shadow: 0 0 10px rgba(255, 209, 102, .35); }
.timer { font: 700 18px var(--ui); font-variant-numeric: tabular-nums; color: var(--accent); }

.scene { margin: 0 -16px 14px; }
.scene figcaption { font-size: 12px; color: var(--muted); padding: 0 16px 4px; display: flex; justify-content: space-between; }
.scene figcaption span { color: var(--accent); }
.art svg { display: block; width: 100%; height: auto; }
.tonight .art { cursor: crosshair; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.usual .art { opacity: .97; }
@media (min-width: 560px) { .scene { margin: 0 0 14px; } .scene figcaption { padding: 0 0 4px; } }

.pen { fill: none; stroke: var(--pen); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pen.draw { stroke-dasharray: 400; stroke-dashoffset: 400; animation: pen 380ms ease-out forwards; }
@keyframes pen { to { stroke-dashoffset: 0; } }
.miss path { stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; animation: fade 900ms ease-in forwards; }
@keyframes fade { 0%, 60% { opacity: 1; } to { opacity: 0; } }
.missed { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-dasharray: 4 3; }

.whisper { min-height: 1.7em; margin: 0; font-size: 14px; color: var(--accent); }
.controls { margin: 6px 0 0; }
.btn { min-height: 48px; padding: 0 16px; border-radius: var(--r-ctl); cursor: pointer; font: 700 15px var(--ui); color: var(--ink); background: transparent; border: 1px solid #5a463b; }
.btn.quiet { border-color: var(--hair); color: var(--muted); font-weight: 400; font-size: 13px; min-height: 44px; }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.result { margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--hair); }
.score { margin: 0; font: 400 64px/1 var(--display); color: var(--accent); }
.score span { font-size: 28px; color: var(--muted); }
.result h2 { font: 400 22px/1.4 var(--display); letter-spacing: .04em; margin: 8px 0 10px; }
.answers { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.answers li { padding: 8px 0 8px 26px; border-bottom: 1px solid var(--hair); position: relative; color: var(--muted); font-size: 14px; }
.answers li::before { content: "□"; position: absolute; left: 2px; color: var(--accent); }
.answers li.on { color: var(--ink); }
.answers li.on::before { content: "〇"; color: var(--pen); }
.share { display: flex; gap: 10px; margin: 18px 0 0; }
.share .btn { flex: 1; }
.counts { font-size: 13px; margin: 16px 0 0; padding: 10px 12px; background: var(--surface); border-radius: var(--r-box); }
.next { font-size: 12px; color: var(--muted); margin: 14px 0 0; }
.foot { margin-top: 36px; padding-top: 12px; padding-bottom: 28px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--hair); }
@media (prefers-reduced-motion: reduce) { .pen.draw { animation: none; stroke-dasharray: none; stroke-dashoffset: 0; } .miss path { animation: none; } }
