:root {
  color-scheme: light;
  --ink: #182722; --muted: #53625a; --paper: #f3f4ed; --line: #d4dacf;
  --board: #14231f; --edge: #32443a; --lime: #d6fa6a; --mint: #84e9ad;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box }
body { margin: 0; min-width: 260px; min-height: 100svh }
button, input { font: inherit }
button { cursor: pointer; color: inherit }
button, a, input { -webkit-tap-highlight-color: transparent }
button:disabled { cursor: default }
button:focus-visible, a:focus-visible, .field:focus-visible { outline: 3px solid #28845e; outline-offset: 3px }
[hidden] { display: none !important }
.sr, .symbols { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round }
.workspace {
  --rail: clamp(180px, 16vw, 216px); --gap: 12px; --outer: 6px;
  --axis-space: 15px; --far-pad: 5px;
  --usable-height: calc(100dvh - var(--outer) - var(--outer));
  width: min(calc(100% - var(--outer) - var(--outer)), calc(var(--usable-height) + var(--rail) + var(--gap)));
  margin: var(--outer) auto; display: grid; grid-template-columns: minmax(0,1fr) var(--rail);
  grid-template-areas: "board rail"; gap: var(--gap); align-items: start;
}
.rail { grid-area: rail; min-width: 0; max-height: var(--usable-height); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; display: flex; flex-direction: column; gap: 9px }
.mast { grid-area: brand; border-bottom: 1px solid var(--line) }
.mast-inner { display: grid; padding: 5px 3px 6px; gap: 4px }
.identity, nav, .nav-link, .arena-head, .phase, .compact-metrics, #field-feedback, .start, .card-heading, .timer, .rate, .counts dt, .segmented span, .configuration, .configuration span, .dialog-head, .data-button, .download-source { display: flex; align-items: center }
.identity { gap: 9px; white-space: nowrap }
.identity img { width: 27px; height: 27px }
.wordmark { font-size: 24px; letter-spacing: -.065em; font-weight: 750; line-height: 1 }
nav { flex-wrap: wrap; gap: 2px }
button { border: 0 }
.nav-link { gap: 5px; padding: 5px 6px; background: transparent; color: #47574d; font-size: 12px; font-weight: 600; border-radius: 5px }
.nav-link .icon { width: 15px; height: 15px }
.nav-link:hover, .close:hover { background: #e5eadd }
.arena, .play-tools { min-width: 0; border-radius: 9px; background: var(--board); color: #f1f6e9; border: 1px solid #122019 }
.arena { grid-area: board; overflow: hidden }
.play-tools { padding: 7px 10px 10px }
.arena-head { min-height: 27px; gap: 6px }
h1, h2, h3, figure, p, dl, dd { margin: 0 }
.arena-head h1 { font-size: 15px; line-height: 1.2; font-weight: 650; letter-spacing: -.035em; white-space: nowrap }
.phase { border: 1px solid #425346; border-radius: 20px; padding: 3px 8px; line-height: 1.25; gap: 5px; font-size: 11px; font-weight: 550; color: #cad8c8; white-space: nowrap }
.phase i { width: 5px; height: 5px; border-radius: 100%; background: #9ead9d }
body[data-phase="running"] .phase { border-color: #64784d; color: var(--lime) }
body[data-phase="running"] .phase i { background: var(--lime) }
.compact-metrics { display: none; margin-left: auto; white-space: nowrap; font: 11px var(--mono); color: #eaf0e0; gap: 3px }
.compact-metrics b { font-weight: 400; color: #829087; margin: 0 2px }
.arena-icon { display: grid; place-items: center; margin-left: auto; width: 27px; height: 27px; border-radius: 5px; color: #c4d0c0; background: transparent }
.arena-icon:hover { background: #2b3e33; color: white }
.field-wrap { position: relative; padding: var(--axis-space) var(--far-pad) var(--far-pad) var(--axis-space) }
.axis { position: absolute; pointer-events: none; font: 9px/1 var(--mono); color: #8e9f94; font-variant-numeric: tabular-nums }
.axis span { position: absolute; display: block }
.axis-x { top: 0; left: var(--axis-space); right: var(--far-pad); height: var(--axis-space) }
.axis-x span { transform: translateX(-50%); top: 3px }
.axis-y { top: var(--axis-space); bottom: var(--far-pad); left: 0; width: var(--axis-space) }
.axis-y span { transform: translateY(-50%); right: 3px }
.field { width: 100%; aspect-ratio: 1; position: relative; background: #101d19; isolation: isolate; box-shadow: 0 0 0 1px #405246; touch-action: none; user-select: none; -webkit-user-select: none; cursor: default }
.field:focus:not(:focus-visible) { outline: 0 }
.field canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none }
.field { cursor: var(--ring-cursor, crosshair) }
.field[data-match="true"] { cursor: var(--match-cursor, crosshair) }
.field[data-masked="true"] { cursor: default }
.arena-foot { display: grid; gap: 7px; margin-top: 5px }
#field-feedback { gap: 6px; color: #cfdbd0; font-size: 12px; line-height: 1.4 }
.swatch { flex: none; width: 9px; height: 9px; background: var(--lime); border-radius: 1px }
#field-feedback[data-kind="correct"] .swatch { background: var(--mint); border-radius: 50% }
#field-feedback[data-kind="miss"] .swatch { background: #ff9b89; transform: rotate(45deg); border-radius: 1px }
.start { justify-content: center; gap: 6px; min-height: 33px; flex: none; border-radius: 6px; padding: 0 10px; background: var(--lime); color: #203217; font-size: 13px; font-weight: 700 }
.start:hover:enabled { background: #e5ff8c }
.start:active:enabled { transform: translateY(1px) }
.start:disabled { background: #2c3c32; color: #b4c1af }
.start:disabled svg { display: none }
.start .icon { width: 15px; height: 15px }
.start:focus-visible, .arena-icon:focus-visible { outline-color: var(--lime) }
aside { min-width: 0; display: grid; gap: 9px }
.panel { background: #fbfcf7; border: 1px solid var(--line); border-radius: 9px; padding: 12px }
.panel h2, .dialog-head h2 { font-weight: 650; font-size: 15px; letter-spacing: -.035em }
.card-heading { justify-content: space-between; gap: 8px }
.timer { gap: 4px; font: 12px var(--mono); background: #edf0e6; border: 1px solid #dce2d6; border-radius: 5px; padding: 4px 7px }
.timer svg { width: 15px; height: 15px }
.measure-label { margin: 12px 0 2px; color: var(--muted); font-weight: 540; font-size: 12px }
.rate { gap: 7px; align-items: baseline; margin-left: -2px }
.rate strong, .final-value strong { font-size: 43px; font-weight: 570; line-height: 1; letter-spacing: -.076em; font-variant-numeric: tabular-nums }
.rate span { color: #576254; font-size: 13px; font-weight: 520 }
.plot { margin: 7px 0 9px }
.plot svg { display: block; height: 24px; width: 100% }
.guides { stroke: #d6ddd0; stroke-width: .9; stroke-dasharray: 2 3; fill: none }
#plot-line { fill: none; stroke: #548242; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round }
#plot-fill { fill: #d5edb5; opacity: .64 }
.plot figcaption { display: flex; justify-content: space-between; color: #63705f; font: 10px var(--mono); padding-top: 3px }
.counts, .result dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 8px 0 0; border-top: 1px solid var(--line) }
.counts div + div { border-left: 1px solid var(--line); padding-left: 12px }
.counts dt { gap: 6px; color: var(--muted); font-size: 12px; line-height: 1.3 }
.count-dot { width: 6px; height: 6px; border-radius: 50%; background: #4c8a62 }
.count-dot.miss { background: #c76c55 }
.counts dd { margin: 2px 0 0; font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.045em; line-height: 1.15 }
fieldset { border: 0; margin: 11px 0 0; padding: 0; min-width: 0 }
legend { color: var(--muted); font-size: 12px; padding: 0 0 5px }
.segmented { display: flex; padding: 3px; border: 1px solid #d8ded3; border-radius: 8px; background: #ecf0e6 }
.segmented label { position: relative; flex: 1 }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px }
.segmented span { justify-content: center; gap: 7px; cursor: pointer; color: #546251; font-size: 13px; font-weight: 600; min-height: 32px; border-radius: 5px }
.segmented input:checked + span { background: #263c2e; color: #f4f7ed }
.segmented input:checked + span svg { color: #d6fa8e }
.segmented input:focus-visible + span { outline: 2px solid #227754; outline-offset: 3px }
.segmented input:disabled + span { cursor: default; opacity: .74 }
.growth-choices span { font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums }
.mode-choices span { font-size: 12px; white-space: nowrap }
.voice-note { font-size: 12px; line-height: 1.4; color: var(--muted); margin-top: 7px }
.attempt-log summary { cursor: pointer; font-size: 13px; font-weight: 650 }
.attempt-log ol { list-style: none; padding: 0; margin: 8px 0 0; max-height: 12rem; overflow: auto }
.attempt-log li { padding: 5px 0; border-top: 1px solid var(--line); font: 11px/1.45 var(--mono) }
.attempt-log span { font-size: 12px; font-weight: 500 }
#rate[data-range="true"] { font-size: clamp(17px, 2.8vw, 27px) }
.audio-setting { display:flex; align-items:flex-start; gap:6px; margin-top:8px; font-size:12px; line-height:1.4; cursor:pointer; grid-column:1/-1 }
.audio-setting input { margin:2px 0 0; accent-color:#315b40 }
.audio-setting small { display:block; color:var(--muted); font-size:11px }
#save-practice-audio { background:#334738; color:#e5f1de; border-radius:4px; padding:5px 7px; font-size:11px }
.recording-status { font-size:12px; margin-top:6px; color:var(--muted) }
.audio-label { display:grid; gap:5px; font-size:12px; font-weight:650; margin:12px 0 }
.audio-label select { width:100%; font:inherit; padding:8px; color:var(--ink); background:#f1f4e9; border:1px solid var(--line); border-radius:5px }
.audio-action, .recording-actions button { padding:6px 9px; border-radius:5px; background:#e7ecdf; color:var(--ink); font-size:12px }
#clip-player { display:block; width:100%; margin:10px 0 }
.recording-actions { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin-top:16px }
.recording-actions a { color:#2f603b; font-size:13px; font-weight:650 }
#delete-recording { color:#813e32; margin-left:auto }
#clip-details, #audio-message { color:var(--muted); font-size:13px }
.voice-bar { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 7px; padding-top: 6px; border-top: 1px solid #3a4b3e }
.cue-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px }
.cue-chip b { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 3px; background: var(--lime); color: var(--board); font: bold 18px var(--mono) }
#mic-control { margin-left: auto; color: #d9edce; background: #334738; border-radius: 4px; padding: 5px 7px; font-size: 11px }
#voice-status { flex-basis: 100%; font: 10px/1.35 var(--mono); color: #ceddce }
#result-note { margin-top: 8px; font-size: 12px; line-height: 1.4; color: var(--muted) }
.configuration { justify-content: center; gap: 12px; color: #62705f; font: 11px/1.4 var(--mono); flex-wrap: wrap }
.configuration span { gap: 5px }
.configuration b { font-weight: 550; color: #3d5042 }
.configuration i { height: 11px; border-left: 1px solid #b7c2b2 }
.veil { position: absolute; inset: 0; display: grid; place-items: center; background: #101d19cd; cursor: default; z-index: 2 }
.mic-gate { display: grid; justify-items: center; gap: 9px; width: min(90%, 320px); text-align: center; color: #eef4e7 }
.mic-gate .gate-icon { width: 35px; height: 35px; padding: 7px; border: 1px solid #51664e; border-radius: 50%; color: var(--lime) }
.mic-gate h2 { font-size: clamp(17px, 3.5vw, 23px); letter-spacing: -.035em }
.mic-gate p { max-width: 32ch; color: #c4d3c4; font-size: 13px; line-height: 1.5; text-wrap: pretty }
.mic-gate .start { min-height: 44px; margin-top: 4px; padding-inline: 16px }
.mic-gate[data-state="blocked"] .gate-icon { color: #ffaa99; border-color: #9b665c }
.countdown, .result { text-align: center }
.countdown span { display: block; color: #d3dfcd; font-size: 15px; margin-bottom: 5px }
.countdown strong { color: var(--lime); font-size: clamp(62px, 15vw, 110px); font-weight: 600; line-height: 1 }
.result { max-width: calc(100% - 12px); width: 296px; background: #f6f8ee; color: var(--ink); border-radius: 12px; padding: 21px 18px 13px; box-shadow: 0 8px 24px #0003 }
.finish-mark { display: inline-grid; place-items: center; background: #d9f49a; border-radius: 50%; height: 28px; width: 28px; margin-bottom: 6px }
.result h2 { font-size: 19px; letter-spacing: -.04em; font-weight: 650 }
.final-value { margin: 8px 0 15px }
.final-value strong { font-size: 45px }
.final-value span { font-size: 13px; margin-left: 6px }
.result dl { grid-template-columns: repeat(3,1fr); padding-top: 10px }
.result dt { font-size: 10px; color: var(--muted) }
.result dd { font: 17px/1.7 var(--mono) }
.data-button, .download-source { gap: 7px; font-size: 13px; font-weight: 620 }
.data-button { justify-content: center; margin: 12px auto 4px; padding: 8px 11px; background: #e2e8d9; border-radius: 5px }
.practice-link { background: transparent; font-size: 12px; color: #4a5d4b; text-decoration: underline; text-underline-offset: 2px; min-height: 27px }
dialog { width: min(420px, calc(100vw - 30px)); max-height: calc(100svh - 30px); padding: 22px; border: 1px solid #cad3c5; border-radius: 13px; color: var(--ink); background: #fbfcf7; box-shadow: 0 20px 80px #14241b44; overflow: auto }
dialog::backdrop { background: #111f17a1 }
.dialog-head { justify-content: space-between; margin-bottom: 12px }
.dialog-head h2 { font-size: 23px }
.close { display: grid; place-items: center; height: 32px; width: 32px; background: #eef1e8; border-radius: 6px }
dialog p, dialog h3 { font-size: 14px; line-height: 1.5; margin: 12px 0 }
dialog h3 { font-size: 15px; margin-top: 20px; margin-bottom: -6px }
.formula { padding: 10px; font: 12px/1.6 var(--mono); border-radius: 5px; background: #eaf0e1 }
dialog .dialog-small, .history-note { color: var(--muted); font-size: 13px }
.download-source { color: #2f603b; text-underline-offset: 3px; width: fit-content }
.history-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 9px; padding: 12px 0; border-top: 1px solid var(--line) }
.history-row strong { font-size: 14px; display: block }
.history-row small { font-size: 11px; line-height: 1.4; display: block; color: var(--muted); margin-top: 3px }
.history-score { font: 12px var(--mono); white-space: nowrap }
.history-row button { background: #e8eddf; border-radius: 5px; width: 30px; height: 30px; display: grid; place-items: center }
.empty { padding: 16px 12px; background: #eef2e8; border-radius: 6px; font-size: 13px; color: var(--muted) }
body.focused { background: var(--board) }
body.focused .mast, body.focused aside, body.focused .axis { display: none }
body.focused .workspace { --rail: 164px; --outer: 2px; --gap: 4px; --axis-space: 2px; --far-pad: 2px }
body.focused .arena { border: 0; border-radius: 0 }
body.focused .arena-head { flex-wrap: wrap }
body.focused .compact-metrics { display: flex; order: 1; flex-basis: 100%; margin-block: 4px 2px }
.rail > * { flex: none }
@media (orientation: landscape) and (max-height: 570px) {
  .rail, aside { gap: 5px }
  .mast-inner { display: flex; align-items: center; justify-content: space-between; padding: 2px 1px 5px }
  .identity { gap: 4px }
  .identity img { width: 22px; height: 22px }
  .wordmark { font-size: 19px }
  nav { flex-wrap: nowrap }
  .nav-link span { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden }
  .panel, .play-tools { padding: 7px 9px }
  .measure-label, fieldset { margin-top: 6px }
  .plot { margin-block: 4px }
  .plot svg { height: 16px }
  .rate strong { font-size: 33px }
  .configuration { padding-bottom: 3px }
}
@media (orientation: portrait), (max-width: 540px) {
  .workspace {
    --outer: 4px; --gap: 6px; --axis-space: 12px; --far-pad: 3px;
    width: min(calc(100% - var(--outer) - var(--outer)), max(220px, calc(100dvh - var(--portrait-controls,118px))));
    grid-template: "brand" auto "tools" auto "board" auto "dash" auto / minmax(0,1fr);
    margin-block: var(--outer) 12px;
  }
  .rail { display: contents }
  body[data-mode="voice"] .workspace { --portrait-controls: 165px }
  .mast-inner { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 3px 4px 5px }
  .identity { gap: 5px }
  .identity img { width: 24px; height: 24px }
  .wordmark { font-size: 21px }
  .nav-link { padding: 5px }
  .play-tools { grid-area: tools; padding: 3px 8px 5px }
  .arena-head { gap: 7px; min-height: 24px }
  .compact-metrics { display: flex }
  .arena-icon { margin-left: 0; width: 25px; height: 25px }
  .arena-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 0 }
  .start { min-height: 28px; padding-inline: 8px; font-size: 12px }
  #field-feedback { font-size: 11px }
  .axis { font-size: 8px }
  .axis-x span { top: 2px }
  .axis-y span { right: 1px }
  aside { grid-area: dash; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px }
  .panel { padding: 9px }
  .panel h2 { font-size: 14px }
  .segmented span { font-size: 12px; gap: 4px }
  .growth-choices span { font-size: 11px }
  .configuration { grid-column: 1 / -1 }
  body.focused .workspace {
    width: min(calc(100% - 4px), max(200px, calc(100dvh - var(--focus-controls,65px))));
    grid-template: "tools" auto "board" auto / minmax(0,1fr);
    margin-block: 2px;
  }
  body.focused .arena-head { flex-wrap: nowrap }
  body.focused[data-mode="voice"] .workspace { --focus-controls: 110px }
  body.focused .compact-metrics { order: 0; flex-basis: auto; margin-block: 0 }
}
@media (max-width: 390px) {
  aside { grid-template-columns: minmax(0,1fr) }
  .monitor { display: grid; grid-template-columns: 1.1fr 1fr; column-gap: 14px }
  .card-heading, .counts { grid-column: 1/-1 }
  .measure-label { grid-column: 1; margin-top: 7px }
  .rate { grid-column: 1; grid-row: 3 }
  .plot { grid-column: 2; grid-row: 2/4; align-self: end }
  .counts { margin-top: 7px }
  .controls { display: grid; grid-template-columns: 1fr 1.35fr; column-gap: 8px }
  .controls h2 { grid-column: 1/-1 }
  #mode-field, .voice-note { grid-column: 1/-1 }
}
@media (max-width: 320px) {
  .nav-link span { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden }
  .arena-head { gap: 4px }
  #field-feedback { font-size: 10px }
  .finish-mark { display: none }
}
