:root {
  color-scheme: dark;
  --bg: #100b24;
  --line: #3b2d57;
  --ink: #f9f3ff;
  --muted: #c3b5d7;
  --accent: #c3a3ff;
  --glow: #c5ffbc;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: radial-gradient(ellipse at 76% 33%, #272044, transparent 62%), var(--bg);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--glow); outline-offset: 4px; }
.bar, .foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(18px, 5vw, 82px);
}
.bar { height: 70px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 11px; align-items: center; min-height: 44px; }
.brand span { font-size: 12px; font-weight: 800; letter-spacing: .13em; }
.brand b { color: var(--accent); }
.sound {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: #211735;
  min-height: 44px;
  padding: 0 14px;
  font-size: 12px;
  white-space: nowrap;
}
.sound:hover { border-color: var(--accent); }
.sound svg { width: 18px; height: 18px; }
.sound[aria-pressed="false"] .waves, .sound[aria-pressed="true"] .muted { display: none; }
.cabinet {
  width: min(100%, 1480px);
  margin: auto;
  display: grid;
  grid-template-columns: minmax(252px, .66fr) minmax(0, 1.55fr);
  gap: clamp(26px, 4.5vw, 82px);
  align-items: center;
  padding: clamp(28px, 5vw, 75px);
}
.kicker, .frame-top, .frame-bottom, .stats span, .foot, .result > span:first-child {
  font-family: var(--mono);
  letter-spacing: .1em;
  font-size: 11px;
}
.kicker { display: flex; align-items: center; gap: 9px; color: var(--accent); font-weight: 700; margin: 0 0 19px; }
.kicker span { width: 23px; height: 1px; background: currentColor; }
h1 { margin: 0; font-size: clamp(59px, 7.1vw, 104px); font-weight: 850; letter-spacing: -.095em; line-height: .88; }
h1 span { color: var(--accent); }
.tagline { font-size: clamp(21px, 2.7vw, 35px); font-weight: 720; letter-spacing: -.045em; margin: 22px 0 8px; }
.description { color: var(--muted); line-height: 1.63; font-size: 15px; max-width: 29ch; margin: 0; }
.instructions { display: grid; gap: 11px; margin: 24px 0 15px; padding: 15px 0; border-block: 1px solid var(--line); }
.instructions p { display: flex; align-items: baseline; gap: 12px; margin: 0; font-size: 13px; line-height: 1.45; }
.instructions b { color: var(--accent); font: 11px var(--mono); }
.back { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.back:hover span { text-decoration: underline; }
.game {
  overflow: hidden;
  background: #171029;
  border: 1px solid #524068;
  border-radius: 18px;
  box-shadow: 0 22px 55px #06041391, 0 0 60px #7056a21a;
}
.frame-top, .frame-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 41px; padding: 0 15px; color: var(--muted); }
.frame-top { border-bottom: 1px solid #574565; }
.frame-bottom { border-top: 1px solid #574565; font-size: 10px; letter-spacing: .035em; }
.session { display: flex; align-items: center; gap: 8px; }
.session i { width: 6px; height: 6px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 9px #c5ffbc96; }
kbd { font: inherit; padding: 3px 6px; border: 1px solid #6b5782; border-radius: 4px; color: var(--ink); }
.stage {
  position: relative;
  aspect-ratio: 1.5;
  min-height: 350px;
  max-height: 65svh;
  overflow: hidden;
  isolation: isolate;
  user-select: none;
}
.office, .shade { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.office { object-fit: cover; }
.shade { background: linear-gradient(#100d22b0, transparent 25%, transparent 69%, #140d22b5), radial-gradient(ellipse at 54% 51%, transparent 22%, #14102070 100%); }
.stats {
  position: absolute;
  inset: 16px 17px auto;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  text-shadow: 0 2px 6px #090713;
}
.stats div { display: grid; gap: 2px; }
.stats div:last-child { text-align: right; }
.stats span { color: #eee0ff; font-weight: 600; }
.stats strong { font: 750 clamp(24px, 4.2vw, 41px)/1 var(--mono); font-variant-numeric: tabular-nums; }
.grip {
  position: absolute;
  left: 56%;
  top: 53%;
  width: clamp(273px, 59%, 445px);
  height: auto;
  overflow: visible;
  transform: translate(-43.62%, -36.19%);
  filter: drop-shadow(0 12px 10px #22101ba0);
  pointer-events: none;
}
.beat {
  position: absolute;
  width: clamp(116px, 23%, 153px);
  left: 56%;
  top: 53%;
  transform: translate(-50%, -137%);
  pointer-events: none;
  filter: drop-shadow(0 1px 3px #100a1e);
}
.beat svg { width: 100%; overflow: visible; }
.track, .track-fill { fill: none; stroke-linecap: round; stroke-width: 2.6px; }
.track { stroke: #fff1ff79; }
.track-fill { stroke: var(--accent); stroke-dasharray: 1; stroke-dashoffset: 1; }
.target { fill: #243639; stroke: var(--glow); stroke-width: 2; }
.beat circle { fill: #fcf3ff; stroke: #3a2a60; stroke-width: 1.25px; }
.stage[data-window="true"] .target { fill: var(--glow); stroke: #fff; }
.stage[data-state="ready"] .beat, .stage[data-state="dropped"] .beat, .stage[data-state="paused"] .beat { opacity: 0; }
.tap {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 0 12px clamp(14px, 5%, 29px);
  width: 100%;
  background: transparent;
  border: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.tap:focus-visible { outline-offset: -5px; }
.tap-label {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: #18102b;
  font-size: 14px;
  font-weight: 800;
  background: #d2baff;
  border: 1px solid #f0deff;
  border-radius: 100px;
  box-shadow: 0 5px 0 #654990, 0 7px 18px #0d061b99;
}
.tap:hover .tap-label { background: #eadcff; }
.play-icon { font-size: 10px; }
.stage[data-state="playing"] .tap-label { visibility: hidden; }
.grade {
  position: absolute;
  top: 22%;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  color: #f3e2ff;
  font: 800 clamp(13px, 2.2vw, 19px) var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 2px 8px #0b0517, 0 2px 4px #0b0517;
}
.grade[data-tone="perfect"] { color: var(--glow); }
.grade[data-tone="warning"] { color: #ffd5aa; }
.result {
  position: absolute;
  inset: 19% 12px auto;
  text-align: center;
  padding: 13px 10px 15px;
  border: 1px solid #a68ac582;
  border-radius: 12px;
  background: #1a112eea;
  width: min(272px, calc(100% - 24px));
  margin: auto;
  display: grid;
  gap: 4px;
  pointer-events: none;
}
.result > span { color: var(--muted); font-size: 12px; }
.result strong { font-size: clamp(23px, 4vw, 34px); letter-spacing: -.045em; }
.foot { min-height: 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  .bar { height: 59px; }
  .cabinet { padding: 20px 14px 12px; gap: 17px; display: flex; flex-direction: column; align-items: stretch; }
  .intro { display: contents; }
  .kicker, .tagline, .description, .back { display: none; }
  h1 { order: -2; margin-left: 4px; font-size: clamp(49px, 13vw, 71px); }
  .game { order: -1; }
  .instructions { margin: 0 4px; padding: 0 0 10px; border: 0; gap: 6px; }
  .stage { aspect-ratio: 1.16; min-height: 300px; max-height: 60svh; }
}
@media (max-width: 360px) {
  .brand span { font-size: 10px; }
  .sound { padding-inline: 10px; }
  .frame-bottom { padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  #trail { display: none; }
}
