*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#50158c;color:#fff;font-family:ui-rounded,'Arial Rounded MT Bold',system-ui,sans-serif;font-weight:750}button,select,input{font:inherit}button,select{cursor:pointer}button{border:0;color:inherit;touch-action:manipulation}button:focus-visible,select:focus-visible{outline:3px solid #fbd85b;outline-offset:2px}.app{position:relative;isolation:isolate;height:100vh;height:100dvh;min-height:260px;display:grid;grid-template-rows:auto 1fr minmax(100px,48%);gap:clamp(4px,1.4vh,14px);padding:max(10px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));overflow:hidden;background:#50158c}.waves{position:absolute;inset:0;width:100%;height:100%;z-index:-1}header,.controls,.stats{display:flex;align-items:center;gap:clamp(5px,1vw,16px)}header{justify-content:space-between}.pill{background:#7930b7;border-radius:999px;min-height:clamp(36px,9vh,64px);padding:0 clamp(10px,1.5vw,24px);display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:clamp(12px,1.9vw,26px)}.stats svg{width:1.3em;fill:#e5c3ff}.stats b{color:#d5a3ff;font-size:1.35em}.stats i{height:1.5em;width:1px;background:#ba82e2}.icon{justify-content:center;aspect-ratio:1;padding:0}.icon svg{width:55%;height:55%}.practice select{color:white;background:transparent;border:0;max-width:100%;outline-offset:0}.practice option{background:#60229b}.prompt{display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:0;gap:clamp(3px,1vh,10px)}h1{font-size:clamp(18px,5.7vh,48px);margin:0;line-height:1.1}#target{background:#aa40f5;border-radius:clamp(20px,5vh,60px);min-width:26%;text-align:center;padding:0 25px;font-size:clamp(38px,13vh,110px);line-height:1.25;letter-spacing:-.04em}#feedback{height:1em;font-size:clamp(11px,2.8vh,20px);line-height:1;color:#e9cfff}#feedback.good{color:#bdfb8d}#feedback.bad{color:#ffc1d3}.keyboard{position:relative;width:100%;max-width:1400px;justify-self:center;border:clamp(5px,1.5vh,14px) solid #b14bf5;border-radius:clamp(18px,4vh,45px);background:#6522ad;padding:3px;display:flex;gap:2px;user-select:none;touch-action:manipulation}.keyboard.one{width:86%}.key{position:relative;flex:1;min-width:0;background:#fff5ed;border-radius:clamp(5px,1.7vh,18px);box-shadow:inset 0 -8px #d9c9c8,inset 0 3px #fff;color:#69439a;display:flex;align-items:flex-end;justify-content:center;padding:0 0 13px;font-size:clamp(10px,2.8vh,22px);transition:background .09s,transform .09s}.key.black{position:absolute;top:2px;height:57%;z-index:2;background:#3c3948;box-shadow:inset 0 -8px #17151e,inset 0 -14px #4a4657,0 4px 2px #24183d55;border:1px solid #282331;border-radius:5px 5px clamp(6px,1.8vh,18px) clamp(6px,1.8vh,18px);color:#fff;padding-bottom:17px}.key:active,.key.pressed{transform:translateY(3px);box-shadow:inset 0 -3px #9b79b9}.key.good{background:#91e65b;color:#214b15}.key.bad{background:#f47799;color:#48142b}dialog{border:2px solid #ad61f4;border-radius:24px;background:#60239c;color:white;width:min(440px,90vw);max-height:90dvh;padding:20px}dialog::backdrop{background:#1b073bbb}dialog form{display:grid;gap:12px}.dialoghead,dialog label{display:flex;justify-content:space-between;align-items:center;gap:12px}h2,p{margin:0}dialog select,dialog button{border:0;border-radius:12px;padding:10px;background:#8436c4;color:white}dialog .done{background:#ad48f5}.close{font-size:24px;line-height:1}input{accent-color:#b34aff;width:22px;height:22px}@media(max-width:560px){header{flex-wrap:wrap;justify-content:center}.app{grid-template-rows:auto 1fr minmax(120px,45%)}.pill{font-size:12px}.keyboard.one{width:100%}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Responsive layout: scale from the limiting viewport dimension. */
.app{--u:min(1vw,2.2vh);--u:min(1vw,2.2dvh);height:100vh;height:100dvh;min-height:0;grid-template-rows:auto minmax(0,1fr) minmax(0,49%);gap:calc(var(--u)*1.2);padding:max(calc(var(--u)*1.2),env(safe-area-inset-top)) max(calc(var(--u)*1.6),env(safe-area-inset-right)) max(calc(var(--u)*1.4),env(safe-area-inset-bottom)) max(calc(var(--u)*1.6),env(safe-area-inset-left))}
header{min-width:0;flex-wrap:nowrap;justify-content:space-between;gap:calc(var(--u)*1)}
.controls,.stats{gap:calc(var(--u)*.8);min-width:0}
.pill{font-size:clamp(10px,calc(var(--u)*2),28px);min-height:calc(var(--u)*5.5);padding:0 calc(var(--u)*1.5);gap:calc(var(--u)*.7)}
.icon{flex:none;width:calc(var(--u)*5.5);padding:0}.stats span{white-space:nowrap}.practice select{min-width:0;padding:0}.prompt{gap:calc(var(--u)*.6)}
h1{font-size:calc(var(--u)*4.1)}#target{font-size:calc(var(--u)*9.5);line-height:1.15;min-width:26%;padding:0 calc(var(--u)*3);border-radius:calc(var(--u)*5)}#feedback{font-size:calc(var(--u)*1.8);height:1em}
.keyboard{--rim:calc(var(--u)*1.1);width:100%;max-width:none;min-height:0;border:0;padding:0;gap:0;border-radius:calc(var(--u)*3);background:#6522ad;box-shadow:0 0 0 var(--rim) #b14bf5; margin:var(--rim);width:calc(100% - 2 * var(--rim));height:calc(100% - 2 * var(--rim));overflow:visible}
.keyboard.one{width:min(86%,calc(100% - 2 * var(--rim)));max-width:calc(100dvh * 2.8)}
.key{border:1px solid #d0becd;border-radius:calc(var(--u)*1.2);box-shadow:inset 0 calc(var(--u)*-.8) #d9c9c8,inset 0 2px #fff;font-size:calc(var(--u)*2);padding-bottom:calc(var(--u)*1.5)}
.key.black{top:0;height:57%;border-radius:calc(var(--u)*.5) calc(var(--u)*.5) calc(var(--u)*1.2) calc(var(--u)*1.2);box-shadow:inset 0 calc(var(--u)*-.8) #17151e,inset 0 calc(var(--u)*-1.4) #4a4657,0 3px 2px #24183d55;padding-bottom:calc(var(--u)*1.7);translate:-50% 0}
.key.black:active,.key.black.pressed{transform:translateY(3px)}
@media (max-aspect-ratio: 3/2) and (orientation:landscape){.app{grid-template-rows:auto minmax(0,1fr) minmax(0,48%)}.keyboard.one{width:90%}}
@media (min-aspect-ratio: 23/10){.app{grid-template-rows:auto minmax(0,1fr) minmax(0,52%)}.keyboard.one{max-width:calc(100dvh * 2.6)}}
@media (orientation:portrait){.app{--u:min(1.4vw,1.5dvh);grid-template-rows:auto minmax(0,1fr) minmax(0,40%)}header{flex-wrap:wrap;justify-content:center}.keyboard.one{width:calc(100% - 2 * var(--rim))}}
@media (max-height:280px) and (orientation:landscape){.app{grid-template-rows:auto minmax(0,1fr) minmax(0,46%)}.pill{min-height:26px}.icon{width:26px}}
dialog{max-height:calc(100dvh - 20px);overflow:auto}dialog form{gap:clamp(5px,2dvh,12px)}

/* Final alignment and geometry fixes. */
.waves{inset:auto 0 0;width:100%;height:100%;object-fit:cover;object-position:center bottom;pointer-events:none}
.stats,.stats .stat-label{display:flex;align-items:center;justify-content:center;line-height:1;gap:calc(var(--u)*.65)}
.stats svg{flex:none;display:block;height:1.3em}.stats b,.stats .flame{display:block;line-height:1}.stats .flame{font-size:1.2em}
.app{gap:calc(var(--u)*1.8)}
.prompt{padding-bottom:calc(var(--u)*.8);gap:calc(var(--u)*.8)}
.keyboard{border-radius:calc(var(--u)*1.2);box-shadow:none;outline:var(--rim) solid #b14bf5;outline-offset:0}
.key{flex:1 1 0;min-width:0;padding-left:0;padding-right:0}
.key.black{translate:none;transform:none}
.key.black:active,.key.black.pressed{transform:translateY(3px)}
@media (max-height:280px) and (orientation:landscape){.app{gap:calc(var(--u)*1.2)}.prompt{padding-bottom:0}}

/* Flow-based game layout: content sizes are respected before the keyboard grows. */
.app{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh;height:auto;overflow:clip;gap:calc(var(--u)*1.4)}
header{flex:0 0 auto;position:relative;z-index:5}
.game-column{display:flex;flex-direction:column;align-items:center;flex:1 0 auto;gap:calc(var(--u)*2);min-width:0;min-height:0}
.prompt{flex:0 0 auto;min-height:auto;padding:0;gap:calc(var(--u)*.8)}
#target{min-width: min(26vw, 100%);flex:none}
.keyboard{flex:1 0 auto;height:auto;min-height:clamp(100px, 43dvh, 620px);margin:var(--rim);align-self:center}
@media(orientation:portrait){.keyboard{min-height:clamp(120px,38dvh,420px)}}
@media(max-height:280px) and (orientation:landscape){.keyboard{min-height:85px}}
/* One continuous themed dropdown surface. */
.practice-menu{position:relative;flex:none;min-width:0;z-index:6}
.practice-menu .practice{width:100%;justify-content:center;border:0;gap:calc(var(--u)*.6)}
.practice-menu .practice svg{width:1em;height:1em;flex:none;transition:transform .15s}
.practice-menu.open .practice{border-radius:calc(var(--u)*2) calc(var(--u)*2) 0 0;background:#8436c4}
.practice-menu.open .practice svg{transform:rotate(180deg)}
.practice-options{position:absolute;top:100%;left:0;right:0;background:#8436c4;border-radius:0 0 calc(var(--u)*2) calc(var(--u)*2);padding:0 4px 5px;box-shadow:0 8px 12px #25074466;overflow:hidden}
.practice-options[hidden]{display:none}
.practice-options button{display:flex;align-items:center;justify-content:space-between;text-align:left;width:100%;background:transparent;border-radius:8px;padding:clamp(7px,1.5dvh,14px) 8px;font-size:clamp(10px,calc(var(--u)*1.8),25px);white-space:nowrap}
.practice-options button[aria-pressed=true]{background:#a84cf0}.practice-options button[aria-pressed=true]::after{content:'✓';margin-left:5px}.practice-options button:hover{background:#a84cf0}
.practice-menu .practice #practice-value{display:inline}

/* v4: bounded viewport layout; keyboard takes only remaining space. */
html,body{width:100%;height:100%;min-height:0;overflow:hidden;overscroll-behavior:none}
.app{height:100vh;height:100dvh;min-height:0;max-height:100dvh;overflow:hidden;--u:min(1vw,2dvh);gap:calc(var(--u)*1.4)}
header{flex:0 0 auto;overflow:visible}
.game-column{flex:1 1 0;min-height:0;gap:calc(var(--u)*1.8)}
.prompt{flex:0 0 auto;min-height:0;gap:calc(var(--u)*.8)}
.keyboard{flex:1 1 0;min-height:0;height:auto;margin:var(--rim);}
.pill{line-height:1.2;overflow:visible;min-height:0;height:calc(var(--u)*6);}
.icon{width:calc(var(--u)*6);height:calc(var(--u)*6);aspect-ratio:1;flex:0 0 auto;display:grid;place-items:center}
.icon svg{display:block;width:60%;height:auto;aspect-ratio:1;flex:none;overflow:visible}
.stats svg,.practice svg{overflow:visible;flex:none;display:block}
.stats .flame{line-height:1.25;overflow:visible}
.key:active,.key.pressed,.key.black:active,.key.black.pressed{transform:translateY(min(2px,calc(var(--rim)*.4)))}
@media(orientation:portrait){.app{--u:min(1.4vw,1.5dvh)}header{flex-wrap:wrap;justify-content:center}.keyboard{flex:0 1 40%;margin-top:auto}}
@media(max-height:280px) and (orientation:landscape){.app{--u:min(1vw,2dvh)}.pill{font-size:calc(var(--u)*2)}.practice-options button{padding:calc(var(--u)*1) 8px}}

/* v7: identical shadow slots and synchronized color transitions for every key.
   Feedback is immediate on press; all colors return together on release. */
.keyboard,.keyboard .key{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;}
.keyboard .key{
  --face:#fff5ed;--edge:#d0becd;--bottom:#d9c9c8;--shade:#d9c9c8;
  --shine:#fff;--ink:#69439a;--cast:transparent;
  --depth:calc(var(--u)*-.8);--ledge:calc(var(--u)*-.8);--drop:0px;
  background:var(--face);border-color:var(--edge);color:var(--ink);
  box-shadow:inset 0 var(--depth) var(--bottom),inset 0 var(--ledge) var(--shade),inset 0 2px var(--shine),0 var(--drop) 2px var(--cast);
  transition:background-color 180ms ease-out,border-color 180ms ease-out,color 180ms ease-out,box-shadow 180ms ease-out,transform 180ms ease-out;
}
.keyboard .key.black{
  --face:#3c3948;--edge:#282331;--bottom:#17151e;--shade:#4a4657;
  --shine:transparent;--ink:#fff;--cast:#24183d55;
  --ledge:calc(var(--u)*-1.4);--drop:3px;
}
.keyboard .key.good{--face:#91e65b;--edge:#52a92d;--bottom:#52a92d;--shade:#6ac53e;--shine:#c8fa9d;--ink:#214b15;--cast:transparent;}
.keyboard .key.bad{--face:#f47799;--edge:#c43b60;--bottom:#c43b60;--shade:#e3547b;--shine:#ffc0d0;--ink:#48142b;--cast:transparent;}
.keyboard .key.black.good{--cast:#214b1555;}
.keyboard .key.black.bad{--cast:#48142b55;}
.keyboard .key:is(.pressed,:active){
  --shine:transparent;--depth:calc(var(--u)*-.4);--ledge:calc(var(--u)*-.4);
  box-shadow:inset 0 var(--depth) var(--bottom),inset 0 var(--ledge) var(--shade),inset 0 2px var(--shine),0 var(--drop) 2px var(--cast);
}
.keyboard .key.black:is(.pressed,:active){--ledge:calc(var(--u)*-.9);--drop:1px;}
.keyboard .key:is(.good,.bad){transition:none;}
@media(prefers-reduced-motion:reduce){.keyboard .key{transition:none!important}}


/* v12: use a landscape coordinate system even in portrait. */
@media (orientation:portrait){
 .app{position:fixed;left:50%;top:50%;width:100dvh;height:100dvw;max-height:100dvw;transform:translate(-50%,-50%) rotate(90deg);--u:min(1dvh,2dvw);padding:max(calc(var(--u)*1.2),env(safe-area-inset-right)) max(calc(var(--u)*1.6),env(safe-area-inset-bottom)) max(calc(var(--u)*1.4),env(safe-area-inset-left)) max(calc(var(--u)*1.6),env(safe-area-inset-top));}
 header{flex-wrap:nowrap;justify-content:space-between}
 .keyboard{flex:1 1 0;min-height:0}
 .keyboard.one{width:min(86%,calc(100% - 2 * var(--rim)));max-width:calc(100dvw * 2.8)}
 #target{min-width:min(26dvh,100%)}
 .practice-options button{padding:calc(var(--u)*1) 8px}
 dialog{position:fixed;inset:auto;left:50%;top:50%;margin:0;transform:translate(-50%,-50%) rotate(90deg);width:min(440px,90dvh);max-height:calc(100dvw - 20px);padding:min(20px,3dvw)}
 dialog form{gap:clamp(5px,2dvw,12px)}
}

/* v14: preferred height follows actual keyboard width; flex may shrink it.
   White keys are at most five times as tall as they are wide. */
.keyboard{aspect-ratio:14 / 5;flex:0 1 auto;height:auto;max-height:none;margin-top:auto;}
.keyboard.one{aspect-ratio:7 / 5;}

/* v15: center the prompt in the space above the bottom-aligned keyboard. */
.prompt{flex:1 0 auto;justify-content:center;}
.keyboard{margin-top:var(--rim);}

/* v18: compact settings, invisible scrollbar, shared Practice dropdown styling. */
dialog{--sh:100dvh;--u:min(1vw,2dvh);--s:min(1px,calc(var(--sh) / 430));padding:clamp(5px,calc(20 * var(--s)),20px);font-size:clamp(9px,calc(16 * var(--s)),16px);overflow:auto;scrollbar-width:none;}
dialog::-webkit-scrollbar{display:none;}
dialog form{gap:clamp(2px,calc(9 * var(--s)),9px);}
dialog h2{font-size:1.5em;}
dialog .close{background:transparent;padding:0 .25em;font-size:1.7em;}
dialog .setting-row{display:flex;align-items:center;justify-content:space-between;gap:8px;}
dialog .setting-menu{width:54%;--u:calc(6 * var(--s));}
dialog .setting-menu.open{z-index:10;}
dialog .setting-menu .practice{background:#7930b7;border-radius:999px;justify-content:space-between;font-size:inherit;height:auto;min-height:0;padding:.5em .8em;gap:.4em;}
dialog .setting-menu.open .practice{background:#8436c4;border-radius:calc(var(--u)*2) calc(var(--u)*2) 0 0;}
dialog .setting-menu .practice-options button{font-size:inherit;padding:.4em .6em;background:transparent;border-radius:8px;white-space:normal;}
dialog .setting-menu .practice-options button:is(:hover,[aria-pressed=true]){background:#a84cf0;}
dialog #reset,dialog .done{padding:.45em .8em;}
dialog input{width:1.4em;height:1.4em;margin:0;}
@media(orientation:portrait){dialog{--sh:100dvw;--u:min(1dvh,2dvw);}}

/* v19: notation selector and staff target */
.display-modes{--selected:0;--dot:calc(var(--u)*5.2);position:relative;isolation:isolate;flex:none;padding:calc(var(--u)*.4);gap:0;background:#401075;height:calc(var(--u)*6);}
.display-modes button{position:relative;z-index:1;background:transparent;border-radius:50%;width:var(--dot);height:var(--dot);padding:0;display:grid;place-items:center;font-size:calc(var(--u)*2.6);line-height:1;}
.display-modes button svg{width:56%;height:72%;display:block;}
.display-modes button[data-display=bass] svg{height:55%;}
.mode-indicator{position:absolute;left:calc(var(--u)*.4);top:50%;width:var(--dot);height:var(--dot);border-radius:50%;background:#a044ed;transform:translate(calc(var(--selected)*100%),-50%);transition:transform 180ms ease;pointer-events:none;}
#target.staff-target{padding:0 calc(var(--u)*1.8);line-height:0;min-width:0;border-radius:calc(var(--u)*3);}
#target.staff-target>svg{display:block;height:calc(var(--u)*12);width:auto;max-width:100%;}

/* v20: suppress browser long-press callouts throughout the app. */
html,body,body *{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;}
.app,dialog{touch-action:manipulation;}
.prompt{gap:calc(var(--u)*.5);}
.prompt h1{font-size:calc(var(--u)*3.1);}
#target{font-size:calc(var(--u)*11);min-width:30%;}
#target.staff-target{padding:calc(var(--u)*.4) calc(var(--u)*2.2);}
#target.staff-target>svg{height:calc(var(--u)*15);}

/* v21: fully rounded note-name badge; staff badge unchanged. */
#target:not(.staff-target){border-radius:999px;}

/* v23: smaller letter glyphs, generous pill padding, three-octave geometry. */
#target:not(.staff-target){font-size:calc(var(--u)*8);padding:calc(var(--u)*1.5) calc(var(--u)*5);}
.keyboard.three{aspect-ratio:21 / 5;}
.keyboard.three{container-type:inline-size;}
.keyboard.three .key{font-size:min(calc(var(--u)*2),2.6cqw);}

.setting-row[hidden]{display:none!important;}
.keyboard{container-type:inline-size;}
.keyboard .key{font-size:min(calc(var(--u)*2),calc(65cqw / var(--white-count)));}

/* Start occupies the same centered prompt area as the question. */
.prompt [hidden]{display:none!important;}
#start{background:#aa40f5;color:white;border:0;border-radius:999px;font:inherit;font-weight:800;font-size:calc(var(--u)*5);padding:calc(var(--u)*1.8) calc(var(--u)*8);cursor:pointer;}
#start:active{background:#9133d9;}
#start:disabled{opacity:.75;cursor:wait;}
#start-status{font-size:calc(var(--u)*2.4);text-align:center;}

/* v28: fade in the selected mode circle once on page load. */
@keyframes mode-indicator-enter{from{opacity:0}to{opacity:1}}
.mode-indicator{animation:mode-indicator-enter 350ms ease-out both;}
@media(prefers-reduced-motion:reduce){.mode-indicator{animation:none;}}

/* v29: startup overlay shares the rotated landscape app coordinates. */
.startup{position:absolute;inset:0;z-index:100;display:grid;place-items:center;background:rgba(22,6,38,.66);opacity:1;transition:opacity 180ms ease-out;}
.startup[hidden],.startup [hidden]{display:none!important;}
.startup.leaving{opacity:0;}
.startup-panel{display:flex;flex-direction:column;align-items:center;gap:calc(var(--u)*2.4);padding:calc(var(--u)*3.5) calc(var(--u)*5);border-radius:calc(var(--u)*3);background:#53158e;border:1px solid #8341bd;box-shadow:0 8px 30px #16062655;max-width:90%;text-align:center;}
.startup-panel h2{margin:0;font-size:calc(var(--u)*4);line-height:1.15;}
#start{background:#a044ed;box-shadow:0 4px 0 #7930bc;}
#start-muted{background:transparent;text-decoration:underline;font-size:calc(var(--u)*2.5);}
@media(prefers-reduced-motion:reduce){.startup{transition:none;}}

/* v31: independent reference-sized startup panel, scaled only when space is limited. */
#startup .startup-panel{--modal-unit:min(1px,calc(var(--u) / 3.8));box-sizing:border-box;width:calc(302 * var(--modal-unit));max-width:90%;min-height:calc(200 * var(--modal-unit));padding:calc(24 * var(--modal-unit)) 0 calc(44 * var(--modal-unit));gap:calc(18 * var(--modal-unit));border:1.5px solid #7736b1;border-radius:calc(29 * var(--modal-unit));background:#53158e;box-shadow:none;}
#startup #startup-title{font-size:calc(30 * var(--modal-unit));font-weight:800;line-height:1.2;margin:0;color:white;}
#startup #start{box-sizing:border-box;width:calc(210 * var(--modal-unit));height:calc(74 * var(--modal-unit));padding:0;border-radius:999px;font-size:calc(29 * var(--modal-unit));font-weight:800;line-height:1;background:#a044ed;color:white;box-shadow:0 calc(6 * var(--modal-unit)) 0 #7930bc;}
#startup #start:active{transform:translateY(calc(4 * var(--modal-unit)));box-shadow:0 calc(2 * var(--modal-unit)) 0 #7930bc;}

/* v35: fixed hit area, moving face and synchronized extrusion. */
#startup #start,#startup #start:is(:focus,:focus-visible,:hover,:disabled,:active){appearance:none;-webkit-appearance:none;outline:none!important;border:0!important;background:transparent!important;box-shadow:none!important;transform:none;position:relative;display:block;height:calc(77 * var(--modal-unit));padding:0;opacity:1;color:white;-webkit-text-fill-color:white;}
#startup #start span{position:absolute;inset:0 0 calc(3 * var(--modal-unit));display:grid;place-items:center;border-radius:999px;background:#a044ed;box-shadow:0 calc(3 * var(--modal-unit)) 0 #7930bc;transition:transform 85ms ease-out,box-shadow 85ms ease-out;pointer-events:none;}
#startup #start.is-down span{transform:translateY(calc(3 * var(--modal-unit)));box-shadow:0 0 0 #7930bc;}
#startup #start:focus-visible span{text-decoration:underline;text-underline-offset:5px;}
#startup .startup-panel{padding-bottom:calc(41 * var(--modal-unit));}

/* v37: fixed key silhouette; only the inset depth compresses. */
.keyboard .key:is(.pressed,:active),
.keyboard .key.black:is(.pressed,:active){transform:none;}
.keyboard .key.black:is(.pressed,:active){--drop:3px;}

/* v38: fade the external cast shadow without moving its geometry or the key. */
@property --cast-opacity {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 100%;
}
.keyboard .key,
.keyboard .key:is(.pressed,:active){
  box-shadow:inset 0 var(--depth) var(--bottom),inset 0 var(--ledge) var(--shade),inset 0 2px var(--shine),0 var(--drop) 2px color-mix(in srgb,var(--cast) var(--cast-opacity),transparent);
}
.keyboard .key{transition:background-color 180ms ease-out,border-color 180ms ease-out,color 180ms ease-out,box-shadow 180ms ease-out,transform 180ms ease-out,--cast-opacity 180ms ease-out;}
.keyboard .key:is(.good,.bad){transition:--cast-opacity 90ms ease-out,box-shadow 90ms ease-out;}
.keyboard .key:is(.pressed,:active){--cast-opacity:50%;}
/* v39: halve cast-shadow offset and opacity while retaining fixed key geometry. */
.keyboard .key.black:is(.pressed,:active){--drop:1.5px;}
@media(prefers-reduced-motion:reduce){.keyboard .key{transition:none!important;}}

/* v41: retain v39 geometry and synchronize white-key feedback palette
   with the same inset-shadow press/release transition. */
.keyboard .key:not(.black):is(.pressed,:active,.good,.bad){
  transition:background-color 90ms ease-out,border-color 90ms ease-out,color 90ms ease-out,box-shadow 90ms ease-out,transform 90ms ease-out,--cast-opacity 90ms ease-out;
}
@media(prefers-reduced-motion:reduce){.keyboard .key{transition:none!important;}}

/* v42: remove the white-key top highlight in every state. */
.keyboard .key:not(.black){--shine:transparent;}

/* v43: square interior top corners; preserve the two outer corners. */
.keyboard .key{border-top-left-radius:0;border-top-right-radius:0;}
.keyboard .key:not(.black):first-child{border-top-left-radius:calc(var(--u)*1.2);}
.keyboard .key:not(.black):nth-last-child(1 of .key:not(.black)){border-top-right-radius:calc(var(--u)*1.2);}
.pwa-settings{display:grid;grid-template-columns:1fr 1fr;gap:calc(var(--u)*1);}
.pwa-settings button{font-size:inherit;}
.pwa-settings p{grid-column:1/-1;margin:0;text-align:center;overflow-wrap:anywhere;}
