:root {
  --bg: #101418;
  --card: #1a2027;
  --ink: #eef2f5;
  --muted: #8d98a4;
  --accent: #ffcc33;
  --alt: #5cc8ff;
  --line: #2a323b;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; -webkit-tap-highlight-color: transparent; }
main { max-width: 520px; margin: 0 auto; padding: 20px 16px 40px; text-align: center; }
h1 { margin: 0; font-size: 2.2rem; color: var(--accent); letter-spacing: -0.02em; }
.sub { margin: 4px 0 20px; color: var(--muted); }
.muted { color: var(--muted); font-size: 0.95rem; }
.how { text-align: left; background: var(--card); border-radius: 14px; padding: 16px 16px 16px 36px; line-height: 1.6; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 12px; padding: 12px 18px; margin: 6px; }
.primary { background: var(--accent); color: #111; font-weight: 700; }
.primary.alt { background: var(--alt); }
.big { font-size: 1.2rem; padding: 16px 28px; display: block; width: 100%; margin: 12px 0; }
.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.banner { background: #2b2410; border: 1px dashed var(--accent); border-radius: 12px; padding: 12px; margin: 0 0 16px; line-height: 1.5; }
.duel-score { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px 12px; margin: 8px 0; }
.duel-score b { color: var(--accent); font-variant-numeric: tabular-nums; }
.roundlabel { font-size: 1.2rem; }
.roundlabel b { color: var(--accent); font-size: 1.6rem; }
.pad {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 46vh; min-height: 260px; margin: 8px 0;
  background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: 20px;
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.pad:active:not(:disabled) { border-color: var(--accent); }
.pad:disabled { cursor: default; color: var(--ink); opacity: 1; }
.clock { font-size: 5rem; font-weight: 800; font-variant-numeric: tabular-nums; transition: opacity 0.4s; }
.clock.blind { opacity: 0.12; }
.clock.reveal { color: var(--alt); }
.hint { color: var(--muted); margin-top: 8px; }
.verdict { font-size: 1.5rem; min-height: 2rem; margin: 8px 0; }
.rank { font-size: 2.4rem; font-weight: 800; color: var(--accent); margin: 4px 0; }
.emojis { font-size: 2.2rem; letter-spacing: 0.1em; margin: 4px 0; }
.totalline { font-size: 1.2rem; }
.streak { font-weight: 700; margin: 6px 0; }
.timeline { background: var(--card); border-radius: 14px; padding: 12px 14px 8px; margin: 16px 0 6px; }
.tl-row { display: flex; align-items: center; gap: 10px; height: 26px; }
.tl-t { width: 3.4em; text-align: right; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.tl-track { position: relative; flex: 1; height: 2px; background: var(--line); }
.tl-track::after { content: ""; position: absolute; left: 50%; top: -8px; width: 2px; height: 18px; margin-left: -1px; background: var(--muted); }
.tl-dot { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid var(--card); z-index: 1; }
.tl-dot.off { border-radius: 3px; }
.g0, .g1 { background: #4cc66b; }
.g2 { background: #f2c230; }
.g3 { background: #f08a2c; }
.g4 { background: #e5484d; }
.tl-axis { display: flex; justify-content: space-between; margin: 4px 0 0 calc(3.4em + 10px); color: var(--muted); font-size: 0.75rem; }
.tendency { margin: 6px 0; }
table { margin: 16px auto; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: 4px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; }
footer { margin-top: 40px; color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
footer a { color: var(--muted); }
