:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  color: #faf8ff;
  background: #100e1b;
  --surface: #1d192d;
  --line: #3b3450;
  --muted: #b9b0cb;
  --acid: #dfff64;
  --purple: #a997ff;
  --red: #ff92a4;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
h1, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; }
.top { border-bottom: 1px solid #2c263d; }
.top-inner, .game, footer { width: min(1120px, 100% - 64px); margin-inline: auto; }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 66px; }
.wordmark { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 800; }
.wordmark span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; background: var(--acid); color: #161321; font-weight: 900; }
.tool-link { color: var(--muted); padding-block: 11px; font-size: 13px; }
.tool-link:hover, footer a:hover, .result-tool:hover { color: var(--acid); }
.game { padding-top: clamp(28px, 6vw, 76px); }
.hero { display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 28px; }
.label { color: var(--purple); font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.hero h1 { font-size: clamp(48px, 7.6vw, 110px); font-weight: 900; letter-spacing: -.105em; white-space: nowrap; line-height: 1.15; margin: 12px 0 22px; }
.hero h1 span { color: var(--acid); font-size: 1.2em; margin-inline: .025em .09em; font-variant-numeric: tabular-nums; }
.lede { color: #e0d9ed; font-size: clamp(14px, 1.6vw, 17px); line-height: 1.85; }
.action, .secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 19px; min-height: 50px;
  border: 1px solid transparent; border-radius: 9px; background: var(--acid); color: #191323;
  padding: 12px 19px; font-size: 15px; font-weight: 850; text-align: center;
}
.action:hover { background: #f0ffb9; }
.hero .action { margin-top: 24px; }
.rule { color: var(--muted); font-size: 13px; margin-top: 12px; }
.rule span { color: #736782; margin-inline: 5px; }
.monitor { border: 1px solid #504467; border-radius: 15px; padding: 12px; background: #231c35; box-shadow: 0 19px 65px #0006; }
.monitor-top, .monitor-bottom {
  display: flex; justify-content: space-between; align-items: center; height: 29px;
  color: #d4c6e7; font: 700 11px ui-monospace, SFMono-Regular, monospace; letter-spacing: .04em;
}
.monitor-top { padding: 0 3px 8px; }
.monitor-top i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); margin: 0 4px 1px 0; }
.monitor-scene { position: relative; display: grid; align-items: center; aspect-ratio: 1.67; overflow: hidden; border-radius: 7px; background:
  radial-gradient(ellipse at 19% 16%, #9f50fe83, transparent 62%),
  repeating-linear-gradient(0deg, #ceaff712 0px, #ceaff712 1px, transparent 1px, transparent 21px),
  repeating-linear-gradient(90deg, #ceaff712 0px, #ceaff712 1px, transparent 1px, transparent 21px), #43237a;
}
.safe-area { position: absolute; inset: 9%; border: 1px solid #d8b8ff66; }
.scan { position: absolute; left: 66%; top: 0; bottom: 0; border-left: 1px solid #dfff6466; }
.monitor-scene strong { z-index: 1; margin-left: 16%; font-size: clamp(37px, 6.3vw, 91px); line-height: .93; font-weight: 900; letter-spacing: -.09em; text-shadow: 5px 7px #281147; }
.monitor-scene strong span { color: var(--acid); margin-left: .11em; }
.monitor-stamp { position: absolute; right: 10%; bottom: 14%; padding: 7px 10px; transform: rotate(-7deg); color: #171020; background: var(--acid); font-size: clamp(10px, 1.5vw, 17px); font-weight: 900; line-height: 1.25; }
.timeline { position: relative; display: grid; grid-template-columns: 1fr 1.25fr .8fr .65fr 1.3fr .9fr; gap: 4px; padding-top: 9px; }
.timeline i { height: 13px; border-radius: 2px; background: #6f4eb5; }
.timeline i:nth-child(even) { background: #9d75e9; }
.timeline i:nth-child(4) { background: var(--acid); }
.timeline::after { content: ""; position: absolute; top: 2px; bottom: -6px; left: 55%; border-left: 2px solid #f9edff; }
.monitor-bottom { height: 22px; padding: 6px 3px 0; }
.how { display: grid; grid-template-columns: 1fr 1fr 1fr; border: 1px solid var(--line); border-radius: 13px; margin-top: clamp(28px, 5.5vw, 63px); background: var(--surface); }
.how div { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 12px 21px; }
.how div + div { border-left: 1px solid var(--line); }
.how strong { color: var(--purple); font: 750 13px ui-monospace, SFMono-Regular, monospace; }
.how p { color: #eee8f7; font-size: 13px; font-weight: 700; line-height: 1.45; }
footer { color: var(--muted); font-size: 12px; padding-block: 25px 32px; }
.play, .result { max-width: 840px; margin-inline: auto; }
.hud { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px 12px; align-items: end; }
.hud > div { display: flex; align-items: baseline; gap: 8px; }
.hud span { color: var(--muted); font-size: 12px; }
.hud strong { font: 800 23px ui-monospace, SFMono-Regular, monospace; white-space: nowrap; }
.clock strong { color: var(--acid); font-size: 35px; }
.clock small { font: 750 13px sans-serif; margin-left: 3px; }
.hud.urgent .clock strong { color: var(--red); }
progress { grid-column: 1 / -1; width: 100%; height: 6px; border-radius: 99px; overflow: hidden; border: 0; background: #312640; color: var(--acid); }
progress::-webkit-progress-bar { background: #312640; }
progress::-webkit-progress-value { background: var(--acid); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--acid); }
.hud.urgent progress::-webkit-progress-value { background: var(--red); }
.hud.urgent progress::-moz-progress-bar { background: var(--red); }
.instruction { margin-top: 27px; padding: 19px 21px; border-left: 3px solid var(--purple); border-radius: 0 11px 11px 0; background: var(--surface); }
.instruction h1 { margin-top: 7px; font-size: clamp(19px, 3.4vw, 29px); line-height: 1.42; }
.question { margin: 20px 0 10px; color: #e0d9ed; font-size: 14px; }
.clips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.clip { min-width: 0; text-align: left; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: #faf8ff; }
.clip:enabled:hover { border-color: var(--purple); background: #2c2242; }
.clip.correct { border-color: var(--acid); }
.clip.wrong { border-color: var(--red); }
.clip-frame { display: flex; align-items: center; justify-content: center; min-height: 90px; border-radius: 5px; padding: 10px; background: #423063; font-size: clamp(13px, 2.5vw, 18px); font-weight: 850; text-align: center; overflow-wrap: anywhere; }
.clip:nth-child(2) .clip-frame { background: #29436a; }
.clip:nth-child(3) .clip-frame { background: #543056; }
.clip-info { display: flex; justify-content: space-between; gap: 5px; color: #ddd1f1; font: 700 12px ui-monospace, SFMono-Regular, monospace; margin: 9px 2px 1px; }
.feedback { color: var(--acid); min-height: 1.7em; margin-top: 11px; font-size: 14px; font-weight: 750; }
.feedback.miss { color: var(--red); }
.result { border: 1px solid var(--line); padding: clamp(23px, 5vw, 55px); border-radius: 19px; background: var(--surface); }
.result h1 { margin-top: 9px; font-size: clamp(28px, 5.1vw, 49px); letter-spacing: -.055em; }
.result-score { margin: 11px 0; color: var(--acid); font: 850 clamp(46px, 8vw, 82px) ui-monospace, SFMono-Regular, monospace; }
.result-meta { color: var(--muted); font-size: 14px; line-height: 1.7; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.secondary { border-color: #685a80; background: transparent; color: #faf8ff; }
.secondary:hover { background: #34284d; }
.result-tool { display: inline-block; color: #d7c9fa; font-size: 13px; margin-top: 19px; padding-block: 6px; }
@media (max-width: 780px) {
  .top-inner, .game, footer { width: calc(100% - 32px); }
  .top-inner { min-height: 57px; }
  .hero { grid-template-columns: 1fr; gap: 23px; }
  .hero h1 { font-size: clamp(46px, 12vw, 84px); margin-bottom: 13px; }
  .monitor { max-width: 510px; }
  .monitor-scene strong { font-size: clamp(41px, 13vw, 76px); }
  .monitor-stamp { font-size: clamp(11px, 3vw, 17px); }
  .how { grid-template-columns: 1fr; }
  .how div { min-height: 45px; padding: 9px 15px; }
  .how div + div { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .wordmark, .tool-link { font-size: 11px; }
  .wordmark { gap: 5px; }
  .wordmark span { width: 23px; height: 23px; }
  .hero .action { margin-top: 16px; }
  .clips { grid-template-columns: 1fr; gap: 7px; }
  .clip { display: grid; grid-template-columns: 1fr auto; align-items: stretch; min-height: 58px; padding: 5px 6px; gap: 8px; }
  .clip-frame { min-height: 45px; padding: 6px; }
  .clip-info { display: grid; align-content: center; justify-items: end; min-width: 36px; margin: 0 3px 0 0; font-size: 10px; }
}
