@font-face{font-family:"URW Gothic";src:url("fonts/urw-gothic-book.otf") format("opentype");font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:"URW Gothic";src:url("fonts/urw-gothic-demi.otf") format("opentype");font-style:normal;font-weight:700;font-display:swap}
:root{--ink:#222b2c;--muted:#737b7b;--paper:#f7f6f2;--coral:#ef664c;--teal:#316c5f;--line:#dedfda;--lilac:#d9cff0;--mint:#d8e9dd;--peach:#fae1c1;font-family:"URW Gothic","Century Gothic","Comic Sans MS",sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background-image:radial-gradient(#737b7b1c .8px,transparent .8px);background-size:18px 18px}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--teal);outline-offset:5px}button{color:inherit}svg{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;width:24px;height:24px;flex-shrink:0}a{color:inherit}button[hidden],svg[hidden],[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.app-shell{max-width:1160px;margin:auto;padding:0 40px}.brand-bar{display:flex;justify-content:space-between;align-items:center;padding:25px 0 22px;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;font-weight:900;font-size:18px;letter-spacing:-.6px;line-height:1.15}.brand small{display:block;font-size:8px;letter-spacing:2.5px;margin-top:5px;font-weight:700}.brand-mark{width:43px;height:43px;background:var(--ink);color:white;border-radius:12px;display:grid;place-items:center;transform:rotate(-5deg)}.brand-mark svg{width:35px;height:35px;stroke-width:3}.header-actions{display:flex;gap:13px;align-items:center}.icon-button{width:42px;height:42px;background:transparent;border:1px solid var(--line);border-radius:50%;display:grid;place-items:center}.icon-button:hover{background:#eaece5}.volume-label{display:flex;align-items:center}input[type=range]{width:76px;accent-color:var(--teal);height:20px;cursor:pointer}.icon-button[aria-pressed=true] .sound-waves{opacity:0}.icon-button[aria-pressed=true]{color:var(--muted);background:#e8e8e3}
.intro{display:flex;align-items:center;justify-content:space-between;padding:32px 0 27px;gap:24px}.eyebrow{margin:0 0 10px;font-size:11px;font-weight:900;letter-spacing:2.1px}h1{font-size:clamp(30px,4.4vw,50px);letter-spacing:-2px;line-height:1.03;margin:0;font-weight:900;position:relative}h1>span{color:var(--teal)}.title-spark{width:35px;height:35px;margin-left:13px;vertical-align:middle;fill:var(--coral);stroke:var(--coral);transform:rotate(7deg)}
.game-card{background:#fff;border:1.5px solid var(--ink);border-radius:24px;overflow:hidden;box-shadow:0 6px 0 #222b2c12;position:relative}.game-topline{display:flex;align-items:center;gap:28px;padding:20px 30px;border-bottom:1px solid #e9eae5;background:#fdfdfb}.timer-block{display:flex;align-items:center;gap:9px;white-space:nowrap}.timer-block>svg{width:20px;height:20px}.timer-block>#timeLeft{font-variant-numeric:tabular-nums;font-size:25px;font-weight:900;letter-spacing:-1px}.timer-caption{font-size:11px;color:var(--muted);margin-left:3px}.session-progress{height:6px;flex:1;background:#eeeee8;border-radius:99px;overflow:hidden}.session-progress span{display:block;width:100%;height:100%;background:var(--coral);transform-origin:left;transform:scaleX(0);border-radius:99px}.tempo-block{display:flex;gap:5px;align-items:center;font-size:11px;letter-spacing:.6px;color:var(--muted);font-variant-numeric:tabular-nums}.tempo-block strong{font-size:18px;color:var(--ink);letter-spacing:0}.tempo-dot{width:7px;height:7px;background:var(--teal);border-radius:50%;margin-right:5px}.tempo-block svg{width:18px;height:18px;margin-left:3px;color:var(--teal)}
.sound-stage{display:flex;flex-direction:column;align-items:center;justify-content:center;height:272px;position:relative;padding:22px 20px 18px;background:radial-gradient(ellipse at 50% 100%,#f6f8f0,transparent 70%)}.stage-eyebrow{font-size:10px;font-weight:900;letter-spacing:2px;color:var(--muted);margin:0 0 6px;text-align:center}.sound-wrap{display:flex;align-items:center;justify-content:center;position:relative;max-width:100%;width:80%;flex:1;min-height:0}.current-sound{font-family:"URW Gothic","Century Gothic","Comic Sans MS",sans-serif;font-weight:900;font-size:clamp(70px,11vw,132px);letter-spacing:-5px;line-height:1.15;position:relative;z-index:1;transform-origin:50% 75%}.sound-spark{position:absolute;width:34px;height:34px;color:var(--teal);opacity:.6}.left-spark{left:6%;top:28%;transform:rotate(-10deg);width:24px;height:24px}.right-spark{right:5%;bottom:25%;color:var(--coral);fill:#fbe0d8;transform:rotate(10deg)}.stage-cue{display:flex;align-items:center;justify-content:center;gap:8px;font-size:15px;font-weight:700;background:#eeeee9;padding:9px 19px;border-radius:99px;margin:5px 0 0;min-width:130px;min-height:37px}.cue-dot{width:7px;height:7px;background:var(--teal);border-radius:50%}
.beat-area{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0 30px 24px}.beat{text-align:center;position:relative;--beat-color:var(--mint);--beat-dark:var(--teal)}.beat[data-number="2"]{--beat-color:var(--lilac);--beat-dark:#6c5694}.beat[data-number="3"]{--beat-color:var(--peach);--beat-dark:#976324}.beat[data-number="4"]{--beat-color:var(--mint);--beat-dark:var(--teal)}.beat-number{background:var(--beat-color);border:1.5px solid transparent;border-radius:16px;height:65px;display:flex;align-items:center;justify-content:center;gap:7px;font-size:32px;font-weight:900;transition:background-color .08s,color .08s,transform .08s;position:relative;color:var(--beat-dark)}.beat-number svg{width:25px;height:25px;stroke-width:1.8}.beat>span{display:block;font-size:9px;font-weight:900;letter-spacing:1.1px;margin-top:10px;color:#67716e}.beat.active .beat-number{background:var(--beat-dark);color:white;border-color:var(--ink);transform:translateY(-4px);box-shadow:0 4px 0 #222b2c1f}.beat.active>span{color:var(--beat-dark)}.game-card[data-beat="4"][data-state="playing"] .stage-cue{background:var(--teal);color:#fff}.game-card[data-beat="4"][data-state="playing"] .cue-dot{background:#fff}.game-card[data-state="playing"][data-beat="4"] .current-sound{color:var(--teal)}.game-card[data-state="playing"] .sound-spark{opacity:0}.game-card[data-state="countin"] .current-sound{color:var(--teal)}.game-card[data-state="paused"] .sound-stage{background:#f4f3f8}.game-card[data-state="paused"] .stage-cue{background:#e5dff1}.game-card.pulse .current-sound{animation:sound-pop .18s ease-out}.game-card.pulse .tempo-dot{animation:dot-pop .18s ease-out}@keyframes sound-pop{from{transform:scale(.94)}to{transform:scale(1)}}@keyframes dot-pop{from{transform:scale(1.5)}to{transform:scale(1)}}
.game-controls{display:flex;justify-content:space-between;align-items:center;gap:16px;background:#f8f9f5;border-top:1px solid #e6e8df;padding:21px 30px}.play-controls{display:flex;align-items:center;gap:16px}.primary-button{display:flex;align-items:center;justify-content:center;gap:12px;border:1.5px solid var(--ink);border-radius:12px;background:var(--coral);color:#202828;padding:16px 22px;min-width:213px;font-weight:900;font-size:17px;box-shadow:0 4px 0 var(--ink);transition:transform .12s,box-shadow .12s;white-space:nowrap}.primary-button:hover{background:#fa785e;transform:translateY(-1px);box-shadow:0 5px 0 var(--ink)}.primary-button:active{transform:translateY(3px);box-shadow:0 1px 0 var(--ink)}.primary-button>svg{width:18px;height:18px;stroke-width:2.5}.primary-button #playIcon{fill:currentColor;stroke-width:0}.button-time{font-size:10px;font-weight:700;background:#ffffff4d;border-radius:5px;padding:4px 6px;margin-left:4px}.text-button{border:0;background:transparent;font-size:12px;text-decoration:underline;text-underline-offset:4px;padding:12px 0;color:var(--muted)}
.soundbank-button{border:0;background:transparent;display:flex;align-items:center;gap:9px;font-size:11px;color:var(--muted);text-decoration:underline;text-underline-offset:4px;padding:8px 0}.soundbank-button svg{width:17px;height:17px}.status-message{font-size:12px;text-align:center;color:var(--teal);min-height:16px;margin:12px 0 0}.status-message:empty{display:none}footer{display:flex;justify-content:space-between;align-items:center;padding:28px 0 23px;font-size:8px;font-weight:900;letter-spacing:1.7px;color:#89918a}.footer-note{font-weight:400;font-size:10px;letter-spacing:0}
.results-panel{height:272px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:18px 30px}.results-panel h2{font-size:48px;line-height:1.05;letter-spacing:-2px;margin:9px 0;color:var(--teal)}.results-panel h2 svg{width:32px;height:32px;margin-left:12px;fill:var(--coral);stroke:var(--coral)}.results-panel>p:not(.stage-eyebrow){font-size:14px;color:#67726d;margin:5px 0}.practised-sounds{display:flex;justify-content:center;gap:6px;flex-wrap:wrap;max-width:690px;max-height:61px;overflow:auto;margin:15px 0 5px}.practised-sounds span{background:#edf2eb;border:1px solid #dde5db;border-radius:6px;padding:5px 8px;font-size:12px}.results-panel .results-note{font-size:11px!important}.game-card[data-state="ended"] .beat-area{opacity:.6}
dialog{border:1.5px solid var(--ink);border-radius:22px;max-width:780px;width:calc(100% - 32px);padding:28px;box-shadow:0 10px 0 #0002;color:var(--ink);max-height:85dvh;overflow:auto}dialog::backdrop{background:#172a2bc4;backdrop-filter:blur(4px)}.dialog-header{display:flex;justify-content:space-between;align-items:flex-start}.dialog-header h2{margin:0;font-size:34px;letter-spacing:-1.2px}.dialog-header .eyebrow{color:var(--teal);font-size:10px}.dialog-intro{font-size:13px;color:var(--muted);margin:15px 0 20px}.soundbank-grid{display:grid;grid-template-columns:repeat(10,1fr);gap:6px}.soundbank-grid span{background:#f0f2ec;border-radius:6px;font-size:13px;padding:10px 0;text-align:center}.dialog-footer{display:flex;justify-content:space-between;gap:14px;font-size:10px;color:var(--muted);line-height:1.6;margin-top:22px}.dialog-footer a{color:var(--teal)}
@media(min-width:1450px) and (min-height:900px){.app-shell{max-width:1300px}.intro{padding:42px 0 35px}h1{font-size:58px}.sound-stage,.results-panel{height:340px}.current-sound{font-size:160px}.beat-number{height:80px;font-size:38px}.game-topline{padding-top:24px;padding-bottom:24px}.game-controls{padding:25px 30px}}
@media(max-width:760px){.app-shell{padding:0 22px}.brand-bar{padding:19px 0}.brand{font-size:15px;gap:9px}.brand small{font-size:7px;letter-spacing:1.8px}.brand-mark{width:37px;height:37px}.header-actions{gap:8px}.icon-button{width:36px;height:36px}.volume-label{display:none}.intro{padding:26px 0 23px;gap:10px}h1{font-size:clamp(27px,5.3vw,40px);letter-spacing:-1.4px}.title-spark{height:25px;width:25px;margin-left:6px}.eyebrow{font-size:9px}.game-topline{padding:17px 20px;gap:16px}.timer-caption{display:none}.timer-block>#timeLeft{font-size:23px}.tempo-block strong{font-size:16px}.tempo-block svg{display:none}.sound-stage,.results-panel{height:260px}.current-sound{font-size:clamp(68px,15vw,110px);letter-spacing:-4px}.sound-wrap{width:95%}.sound-spark{width:24px;height:24px}.left-spark{left:0}.right-spark{right:0}.beat-area{gap:11px;margin:0 20px 23px}.beat-number{height:60px;border-radius:12px;font-size:30px}.beat-number svg{width:20px;height:20px}.beat>span{font-size:8px;letter-spacing:.6px}.game-controls{padding:19px 20px}.primary-button{min-width:160px;padding:15px 16px;font-size:15px;gap:9px}.button-time{display:none}.play-controls{gap:11px}.soundbank-button{font-size:10px;text-align:right;line-height:1.5;padding:2px 0}.soundbank-button svg{display:none}.results-panel h2{font-size:40px}.soundbank-grid{grid-template-columns:repeat(5,1fr)}}
@media(max-width:460px){.app-shell{padding:0 14px}.brand-repeat{display:none}.intro{padding:24px 0 22px}.title-spark{display:none}.game-card{border-radius:19px}.game-topline{gap:12px;padding:15px 17px}.sound-stage,.results-panel{height:235px}.stage-eyebrow{font-size:8px;letter-spacing:1.7px}.stage-cue{font-size:12px;min-height:33px}.sound-spark{opacity:.4;width:20px;height:20px}.current-sound{font-size:clamp(64px,18vw,90px);letter-spacing:-3px}.beat-area{gap:8px;margin:0 17px 21px}.beat-number{height:54px;font-size:27px}.beat>span{font-size:7px}.beat-number svg{display:none}.game-controls{flex-wrap:wrap;justify-content:center;gap:17px;padding:18px 17px 22px}.play-controls{width:100%;position:relative;justify-content:center}.primary-button{width:100%;min-width:0;font-size:17px}.stop-button{position:absolute;right:13px;z-index:2;color:var(--ink);font-size:11px}.game-card[data-state="playing"] .primary-button,.game-card[data-state="countin"] .primary-button,.game-card[data-state="paused"] .primary-button{padding-right:54px}.soundbank-button{max-width:100px}.footer-note{font-size:8px}footer{font-size:6px;letter-spacing:1px;padding:24px 0}.results-panel{padding:18px 20px}.results-panel h2{font-size:35px}.results-panel h2 svg{width:25px;height:25px}.results-panel>p:not(.stage-eyebrow){font-size:12px}.practised-sounds{gap:4px;margin:10px 0 4px;max-height:59px}.practised-sounds span{font-size:10px;padding:4px 6px}dialog{padding:20px}.dialog-header h2{font-size:28px}.dialog-intro{font-size:11px}.soundbank-grid{gap:4px}.soundbank-grid span{font-size:11px}.dialog-footer{flex-direction:column}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.beat.active .beat-number{transform:none}}
body:fullscreen{background-color:var(--paper)}
.game-controls{flex-wrap:wrap;column-gap:22px;row-gap:18px}.play-controls{margin-left:auto}.soundbank-button{white-space:nowrap;flex-shrink:0}.dialog-header h2{font-size:30px}.current-sound{white-space:nowrap}.sound-wrap{min-width:0}
@media(max-width:850px){.game-controls{gap:17px}.soundbank-button{font-size:10px}.dialog-header h2{font-size:26px}}
@media(max-width:460px){.soundbank-button{max-width:85px;white-space:normal}.dialog-header h2{font-size:23px}}
@font-face{font-family:"Comic Neue";src:url("fonts/comic-neue-bold.ttf") format("truetype");font-style:normal;font-weight:700;font-display:swap}
.current-sound.is-grapheme{font-family:"Comic Sans MS","Comic Sans","Comic Neue",cursive;font-weight:700;letter-spacing:normal}
.speak-mark{position:relative;display:grid;place-items:center;width:100%;height:100%}.beat-number .speak-rays{display:block;position:absolute;top:50%;left:50%;width:min(98px,calc(100% - 6px));height:60px;transform:translate(-50%,-50%);stroke-width:3;opacity:0;pointer-events:none}.game-card[data-state="playing"][data-beat="4"] .speak-rays{opacity:1;animation:speak-burst .18s ease-out}@keyframes speak-burst{from{transform:translate(-50%,-50%) scale(.72)}to{transform:translate(-50%,-50%) scale(1)}}

footer {
  justify-content: flex-end;
}

.beat.beat--say {
  --beat-color: #e1eee4;
  --beat-dark: var(--teal);
}

.beat--say .beat-number {
  border-color: #9ab9a9;
}

.beat--say .speak-rays {
  width: min(122px, calc(100% - 5px));
}

.soundbank-grid .grapheme,
.practised-sounds .grapheme {
  font-family: "Comic Sans MS", "Comic Sans", "Comic Neue", cursive;
  font-weight: 700;
}

.soundbank-grid .grapheme {
  font-size: 20px;
}

.dialog-footer {
  align-items: flex-start;
}

.dialog-footer a {
  flex-shrink: 0;
}

@media (max-width: 460px) {
  .beat-area {
    gap: 5px;
    margin-inline: 12px;
  }

  .beat--say .speak-rays {
    display: none;
  }

}



.round-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.round-info span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 700;
}

.round-info strong {
  color: var(--teal);
  font-size: 15px;
}


#playScreen {
  margin-top: 20px;
}
