:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  color: #f5f5fa;
  background: radial-gradient(ellipse at 50% 0, #25223c, #101118 68%) fixed;
}
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(100% - 2rem, 48rem); margin: auto; padding: clamp(1rem, 4vh, 3rem) 0; }
header { margin-bottom: 1.25rem; }
h1 { margin: 0; font-size: clamp(2.5rem, 8vw, 4.5rem); letter-spacing: -.075em; line-height: 1; }
h1 span { color: #b9aaff; }
header p, .instructions { color: #b8b7cc; }
.trainer { padding: clamp(.65rem, 2.5vw, 1.25rem); border: 1px solid #3c3b54; border-radius: 1.25rem; background: #181924; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .25rem; margin: 0 0 .85rem; text-align: center; }
dt { color: #bfbed0; font-size: clamp(.68rem, 2vw, .85rem); }
dd { margin: .15rem 0 0; font-size: clamp(1.2rem, 4vw, 1.8rem); font-weight: 750; font-variant-numeric: tabular-nums; }
.track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #38384e; border-radius: .8rem; overflow: hidden; }
.lane { min-width: 0; background: #12131e; }
.lane + .lane { border-left: 1px solid #38384e; }
.runway { position: relative; height: clamp(13rem, 46vh, 28rem); overflow: hidden; background: repeating-linear-gradient(transparent 0 calc(25% - 1px), #2a2b3e calc(25% - 1px) 25%); }
.target { position: absolute; z-index: 1; top: 86%; width: 100%; height: 2px; transform: translateY(-50%); background: var(--lane-color); box-shadow: 0 0 12px var(--lane-color); }
.note { position: absolute; left: 13%; width: 74%; height: .8rem; border-radius: 1rem; background: var(--lane-color); box-shadow: 0 0 14px color-mix(in srgb, var(--lane-color), transparent 60%); transform: translateY(-50%); }
.pad { display: grid; place-items: center; gap: .2rem; padding: .55rem .1rem; background: #1e2031; color: var(--lane-color); font-size: clamp(.68rem, 2vw, .88rem); }
kbd { border: 1px solid currentColor; border-radius: .35rem; padding: .12rem .42rem; font: 700 1rem system-ui, sans-serif; }
.lane[data-result="hit"] .pad { background: #154135; color: #9affdf; }
.lane[data-result="miss"] .pad, .lane[data-result="extra"] .pad { background: #532334; color: #ffc0ce; }
progress { display: block; width: 100%; height: .4rem; margin-top: .9rem; accent-color: #b9aaff; }
.feedback { display: flex; flex-wrap: wrap; justify-content: space-between; align-content: center; gap: .25rem .75rem; min-height: 3rem; font-size: .87rem; color: #bfbed0; }
#result[data-result="hit"] { color: #9affdf; }
#result[data-result="miss"], #result[data-result="extra"] { color: #ffc0ce; }
.controls { display: flex; gap: .6rem; }
button { min-height: 44px; border-radius: .55rem; border: 1px solid #62627f; background: #25263a; color: inherit; padding: .45rem 1rem; font: inherit; font-weight: 650; cursor: pointer; }
#play { background: #b9aaff; border-color: #b9aaff; color: #18132d; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.instructions { font-size: .9rem; margin-bottom: 0; }
