/* v0.3: one playable world, floating game HUD; no site masthead or player panels. */
html,body{height:100%;width:100%;overflow:hidden}body{background:#1d3944}#app{height:100dvh;min-height:0;overflow:hidden}.world{position:fixed;inset:0;z-index:-3}.world img{width:100%;height:100%;object-fit:cover;object-position:center;display:block;user-select:none;-webkit-user-drag:none}.world:after{background:linear-gradient(#16324560,transparent 27%,transparent 58%,#112c445e)}
.game-hud{position:absolute;top:14px;left:20px;right:20px;height:60px;z-index:10;display:flex;align-items:flex-start;justify-content:space-between;pointer-events:none}.game-hud>*{pointer-events:auto}.hud-button{min-height:43px;background:#173c4ddd;color:#fff3cf;border:1px solid #b6cfbf9c;border-radius:14px;padding:10px 17px;font-weight:700;box-shadow:0 4px 0 #102b3c55;font-size:12px;backdrop-filter:blur(5px)}#menu{font-size:22px;line-height:1;width:47px;padding:10px}.stage-title{position:absolute;left:50%;transform:translateX(-50%);text-align:center;max-width:65%;color:#fff5d7;text-shadow:0 2px 3px #112e47,0 0 20px #112e47;padding:2px 25px 8px;background:radial-gradient(ellipse,#1536499c,transparent 74%);white-space:nowrap}.stage-title h1{font-family:inherit;font-weight:800;font-size:25px;letter-spacing:3px;margin:0}.stage-title p{font-size:10px;margin:6px 0 0;letter-spacing:1px;color:#f4efdc}.game-stage{padding:88px 4% 28px!important;max-width:none!important;width:100%;height:100%;margin:0;position:relative}.game-stage>.eyebrow,.game-stage>.headline{display:none!important}.game-stage>.arena{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,.92fr) minmax(0,1fr);gap:2%;width:100%;height:100%;max-width:1500px;margin:auto;position:relative;padding:0!important}
body[data-theme] .arena .player{background:none!important;border:0!important;box-shadow:none!important;border-radius:0!important;padding:0!important;position:relative;min-width:0;isolation:isolate;height:100%}.arena .player:after{left:12%;right:8%;bottom:83px;height:27px;background:#18364545;box-shadow:0 2px #f7dd9555;filter:blur(1px);z-index:-1}.player-top{position:absolute;top:0;left:50%;transform:translateX(-50%);width:min(220px,94%);padding:8px 18px!important;background:linear-gradient(90deg,#19495b00,#17465bd9 14%,#17465bd9 86%,#19495b00);border-radius:9px;color:#fff9dd}.p1 .player-top{background:linear-gradient(90deg,#6c465500,#744c60dd 14%,#744c60dd 86%,#6c465500)}.player h2{font-size:20px;letter-spacing:1px;margin:2px 0}.player-top small{font-size:7px;letter-spacing:2px}.player .score{font-size:31px;font-family:inherit}.score small{font-size:9px}.player .energy-meter{position:absolute;top:66px;left:0;right:0;padding:0;gap:5px}.energy-meter i{width:19px;height:5px;background:#173646aa;border-color:#e3d5a27a}.energy-meter i.lit{background:#ffe6a3}
.arena .companion{left:-10%;bottom:80px;width:clamp(120px,17vw,230px);height:auto;aspect-ratio:185/190;z-index:1;filter:drop-shadow(0 9px 7px #163b4844)}.arena .companion .mascot{display:block}.player-message{position:absolute;bottom:65px;left:50%;transform:translateX(-50%);width:95%;height:23px;min-height:0;padding:3px 7px!important;color:#fff6dd;font-size:11px;text-align:center;line-height:1.5;border-radius:20px;background:radial-gradient(ellipse,#183747c2,transparent 75%);white-space:nowrap;z-index:4}.player-actions{position:absolute;bottom:14px;left:50%;transform:translateX(-50%);width:min(270px,96%);display:flex;gap:8px;z-index:4}.player-actions .submit{color:#123d4c;background:linear-gradient(#b8e4d8,#74c6be);border:1px solid #e0f4d9;border-radius:16px;box-shadow:0 5px 0 #235b65,0 7px 12px #15374844;padding:14px 10px;font-size:15px}.p1 .player-actions .submit{color:#5a3444;background:linear-gradient(#f6d5bf,#e7ac9e);border-color:#fff1d3;box-shadow:0 5px 0 #935c63,0 7px 12px #15374844}.player-actions .clear{background:#183d4cdd;color:#fff4d6;border:1px solid #b3c9b5;border-radius:15px;min-width:48px;padding:10px;font-size:12px}.submit:disabled{opacity:.8}.conductor{position:relative;align-self:start;margin:45px 0 0;display:flex;align-items:center;flex-direction:column;padding:0!important;z-index:3;min-width:0}.conductor .timer{width:81px!important;height:81px!important;background:#173c50d1;border-radius:50%;box-shadow:0 0 0 6px #183d4e24}.timer strong{font-size:29px}.timer small{font-size:8px}.conductor .question-label{margin:17px 0 12px!important;background:#183e50d6;border:1px solid #a7bdad75;padding:5px 17px;border-radius:20px;color:#fff4d9;font-size:10px}.conductor #score-paper{padding:4px 0;border:3px solid #c2a16d;border-radius:16px;background:linear-gradient(#fff9e5,#f8eccb);box-shadow:0 5px 0 #997b4f,0 16px 20px #14364a33;transform:none!important}.conductor .staff{height:auto!important;max-height:165px!important;width:100%!important}.conductor .note-label{margin-top:22px;font-size:22px!important;color:#fff8dc;text-shadow:0 2px 5px #133c4c;min-height:32px}.center-status{font-size:11px;line-height:1.9;min-height:38px;background:radial-gradient(ellipse,#153746c9,transparent 75%);padding:3px 8px;margin:6px 0 10px!important;color:#fff6d9;max-width:100%;text-shadow:0 1px #173a4b}.conductor .start{border-radius:18px;background:linear-gradient(#ffe1a5,#e2b86e);border:1px solid #fff1cc;box-shadow:0 5px 0 #9a7547,0 10px 20px #173b4d3b;color:#3a432e;font-size:16px;font-weight:800;width:90%;padding:15px 18px;min-height:48px}.conductor .pause{padding:9px 22px;min-height:38px;background:#14394ed4;color:#fff3d2;border:1px solid #c3c8a9;border-radius:13px;margin:0}.instrument-tag{font-size:9px;color:#fff5df;text-shadow:0 1px 3px #123745;background:#173c4a99;padding:5px 9px;border-radius:12px;margin-top:14px}.game-stage>footer{position:absolute;left:0;right:0;bottom:5px;padding:0 15px;justify-content:center;gap:18px;max-width:none;color:#fff4d5;text-shadow:0 1px 3px #173e50;font-size:9px;pointer-events:none}.game-stage>footer span{background:#193d4a9c;border-radius:15px;padding:2px 10px}
/* Recorder geometry remains in one SVG coordinate system at every viewport. */
.recorder-area.realistic{position:relative;display:block!important;margin:0!important;transform:none;filter:none;isolation:isolate;overflow:visible}.arena .recorder-area.realistic{position:absolute;left:50%;top:83px;width:180px;height:calc(100% - 181px)!important;transform:translateX(-36%);z-index:2}.instrument-scale{position:relative;height:100%;width:auto;aspect-ratio:180/750;margin:auto;container-type:size;filter:drop-shadow(4px 9px 4px #12313d66)}.recorder-art{position:absolute;inset:0;width:100%;height:100%;display:block;overflow:visible}.realistic .hole.tone-key{position:absolute;left:var(--hole-x);top:var(--hole-y);width:46px;height:5.7cqh;min-height:0!important;padding:0;gap:2px;transform:translate(-50%,-50%);border:0;background:transparent;border-radius:8px;display:flex;align-items:center;justify-content:center}.realistic .hole.tone-key i{width:clamp(7px,2.6cqw,14px);height:clamp(7px,2.6cqw,14px);min-width:7px;border:1.4px solid #847760;background:#fff4d5;box-shadow:inset 1px 1px 2px #57432899,0 0 1px #fff7e7}.realistic .hole.tone-key.double i{width:9px;height:9px;min-width:9px}.realistic .hole.tone-key.double em{width:6px;height:6px;border:1px solid #81715a;background:#fff4d5;box-shadow:inset 1px 1px #6a563b}.realistic .hole[aria-pressed=true] i,.realistic .hole[aria-pressed=true] em{background:#08151c!important;border-color:#d0dbce!important;box-shadow:inset 1px 1px 1px #07121a!important}.realistic .hole b{position:absolute;left:calc(50% + 22px);top:50%;transform:translateY(-50%);font-size:9px;line-height:15px;color:#fff7de;background:#183c4cdd;border-radius:4px;width:12px;text-align:center;font-weight:700;pointer-events:none}.realistic .rear{position:absolute;left:-47px;top:43%;margin:0!important;width:51px;display:flex;align-items:center;flex-direction:column;gap:0;color:#fff5d9;z-index:2}.realistic .rear>span{background:#193b4dcf;border-radius:5px;padding:3px 6px;color:#fff5d9;font-size:9px}.realistic .rear small{color:#fff5d9;font-size:8px;white-space:nowrap;background:#193b4dcf;padding:2px 3px;border-radius:4px;margin-top:4px}.realistic .thumb{position:relative;width:43px;height:43px;min-height:43px;border:1px dashed #f8e7b2;background:#224958d9;border-radius:50%;padding:0;margin-top:4px;transform:none}.realistic .thumb i{width:17px;height:17px;border:1.5px solid #b9a27f;background:#fff4d6}.realistic .thumb b{left:-15px;background:#193b4dcf}.realistic .rear:after{content:'';position:absolute;right:-19px;top:42px;width:19px;border-top:1px dashed #ffefcc;opacity:.7}.hand-mark{position:absolute;left:calc(65% + 28px);font-size:8px;letter-spacing:2px;line-height:1.4;writing-mode:vertical-rl;color:#fff8df;background:#173f50bb;border-radius:4px;padding:5px 3px}.left-hand{top:49%}.right-hand{top:70%}
/* Menu is a paused game overlay, not a persistent website navbar. */
#menu-shade{position:fixed;inset:0;background:#102d4573;backdrop-filter:blur(4px);z-index:15}.game-tools{position:absolute;top:75px;right:20px;z-index:16;width:285px;padding:22px;background:#193b4cf5;color:#fff2d5;border:1px solid #b1bd9a;border-radius:22px;box-shadow:0 15px 55px #102b4366}.game-tools>strong{font-size:19px}.game-tools .theme-strip{position:static;display:flex;flex-wrap:wrap;justify-content:start;margin:16px 0!important;gap:5px}.game-tools .theme-strip button{padding:8px 9px;font-size:11px;min-height:34px}.game-tools nav{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-width:none}.game-tools nav button{min-height:44px;padding:10px 4px;font-size:12px;border-radius:10px;background:#355e6a;border:1px solid #91b2a5;color:#fff5d5}.game-tools #close-tools{width:100%;background:#e8cd8c;color:#243d41;padding:12px;border-radius:11px;min-height:44px;font-weight:700;margin-top:15px}.game-tools .theme-strip button[aria-pressed=true]{background:#e5cd8e;border-color:#fff0c9;color:#233e42;box-shadow:none}.game-tools nav button:hover{background:#477781;color:#fff9de;filter:none}.quick-restart{font-size:11px}
/* Teaching overlay uses the same actual instrument silhouette. */
.practice-pipe .recorder-area.realistic{height:375px!important;width:160px;margin:auto!important}.practice-pipe .realistic .rear{left:-38px}.practice-pipe .realistic .hole b{color:#314c53;background:#e7eadb}.practice-pipe .hand-mark{color:#314f54;background:#e4e9da}.practice-pipe .realistic .rear>span,.practice-pipe .realistic .rear small{color:#314f54;background:#e4e9da}.practice-pipe .realistic .thumb{background:#d3e0d8;border-color:#668b92}.practice-pipe .realistic .thumb b{background:#e4e9da}.practice-pipe .realistic .hole[data-correction]{background:#a4d4e5b3}.practice-pipe .realistic .hole[data-correction]:after{right:-18px}
@media(min-width:1600px){.arena .companion{left:0}.game-stage{padding-top:100px!important}.conductor{margin-top:70px}.arena .recorder-area.realistic{width:220px}}
@media(max-width:1000px) and (min-width:601px){.game-stage{padding-left:3%!important;padding-right:3%!important}.game-stage>.arena{gap:1%;grid-template-columns:1fr .9fr 1fr}.arena .companion{width:150px;left:-12%;bottom:85px}.arena .recorder-area.realistic{transform:translateX(-36%);width:150px}.conductor .note-label{font-size:17px!important}.player h2{font-size:18px}.player-top{padding:7px 12px!important}.player-actions{width:96%}.player-actions .submit{font-size:13px;padding:12px 7px}.player-actions .clear{font-size:11px;min-width:42px;padding:8px}.realistic .hole b{left:calc(50% + 16px)}.hand-mark{left:calc(65% + 22px)}}
@media(max-width:600px){.game-hud{top:10px;left:10px;right:10px;height:44px}.hud-button{min-height:36px;border-radius:11px;padding:9px 10px;font-size:9px}#menu{font-size:20px;width:39px;padding:7px;min-height:36px}.stage-title{max-width:60%;padding:0 8px 6px}.stage-title h1{font-size:21px;letter-spacing:1px}.stage-title p{font-size:7px;letter-spacing:0;margin-top:3px}.game-stage{padding:64px 9px 31px!important}.game-stage>.arena{grid-template-columns:1fr 1fr;grid-template-rows:165px minmax(0,1fr);gap:8px;height:100%;max-width:none}.conductor{grid-column:1/3;grid-row:1;display:grid;grid-template-columns:55px minmax(0,1fr) 69px;grid-template-rows:23px 68px 23px 23px 18px;column-gap:7px;row-gap:0;align-self:stretch;margin:0;border:0;background:none;padding:0!important}.conductor .timer{width:51px!important;height:51px!important;grid-column:1;grid-row:1/4;background:#173d50d9}.timer strong{font-size:23px}.timer small{font-size:6px}.conductor .question-label{grid-column:2;grid-row:1;font-size:8px;line-height:1.5;padding:2px 8px;min-height:16px;margin:0!important;justify-self:center}.conductor #score-paper{width:100%;max-width:220px;height:68px;grid-column:2;grid-row:2;justify-self:center;border-width:2px;border-radius:10px;box-shadow:0 3px #987c52;padding:0}.conductor .staff{height:64px!important;width:100%!important;max-height:none!important}.conductor .note-label{grid-column:2;grid-row:3;font-size:12px!important;min-height:20px;margin:3px 0 0;line-height:1.6}.conductor .start,.conductor .pause{grid-column:3;grid-row:2;width:69px;padding:7px 4px;min-height:38px;font-size:10px;border-radius:12px}.conductor .start span{display:none}.conductor .center-status{grid-column:1/4;grid-row:4;font-size:8px;min-height:17px;height:22px;line-height:1.5;margin:0!important;padding:3px 5px}.instrument-tag{grid-column:1/4;grid-row:5;font-size:7px;min-height:14px;padding:2px 8px;margin-top:0;justify-self:center}.arena .player{grid-row:2}.player-top{top:0;width:96%;padding:5px 12px!important;min-height:45px}.player h2{font-size:16px}.player-top small{font-size:6px;letter-spacing:1px}.player .score{font-size:26px}.player .score small{font-size:7px}.player .energy-meter{top:49px;gap:4px}.energy-meter i{width:15px;height:4px}.arena .recorder-area.realistic{top:60px;height:calc(100% - 128px)!important;width:125px;left:50%;transform:translateX(-33%)}.arena .companion{width:105px;left:-17%;bottom:81px;height:auto}.realistic .rear{left:-38px;top:43%;width:45px}.realistic .rear>span{font-size:7px;padding:2px 5px}.realistic .rear small{font-size:6px;margin-top:2px}.realistic .thumb{width:35px;height:35px;min-height:35px}.realistic .thumb i{width:13px;height:13px}.realistic .thumb b{left:-9px}.realistic .rear:after{top:33px;right:-12px;width:12px}.realistic .hole.tone-key{width:37px;height:5.7cqh;gap:1px}.realistic .hole.tone-key i{width:9px;height:9px;min-width:9px;border-width:1px}.realistic .hole.tone-key.double i{width:7px;height:7px;min-width:7px}.realistic .hole.tone-key.double em{width:5px;height:5px}.realistic .hole b{left:calc(50% + 12px);font-size:7px;width:10px;line-height:12px}.hand-mark{left:calc(65% + 16px);font-size:6px;letter-spacing:1px;padding:3px 2px}.player-message{bottom:51px;font-size:8px;min-height:17px;line-height:1.5;padding:2px!important;width:100%}.player-actions{bottom:7px;gap:5px;width:100%;height:37px}.player-actions .submit{font-size:12px;min-height:37px;padding:9px 4px;border-radius:12px;box-shadow:0 3px #235b65}.p1 .player-actions .submit{box-shadow:0 3px #935c63}.player-actions .clear{min-width:34px;font-size:9px;padding:7px 4px;border-radius:11px}.arena .player:after{bottom:65px;height:18px;left:2%;right:0}.game-stage>footer{bottom:4px;font-size:7px;line-height:1.5;display:block;padding:0;text-align:center}.game-stage>footer span{display:inline;padding:3px 4px;border-radius:0}.game-tools{top:58px;right:10px;width:270px;padding:20px}.game-tools .theme-strip button{font-size:10px}.practice-pipe .recorder-area.realistic{height:340px!important;width:130px}.practice-pipe .realistic .rear{left:-29px}.practice-stage{grid-template-columns:1fr 1fr;gap:5px}.practice-score .staff{height:auto!important}dialog{max-height:calc(100dvh - 20px)}}
@media(max-height:650px) and (min-width:601px){.game-hud{top:7px;height:40px}.game-stage{padding:61px 3% 20px!important}.stage-title h1{font-size:21px}.stage-title p{font-size:8px}.hud-button{min-height:34px;padding:8px 12px}#menu{font-size:19px;min-height:34px;width:39px}.player-top{top:0;min-height:40px;padding:5px 13px!important}.player-top small{display:none}.player h2{font-size:17px}.player .score{font-size:24px}.player .energy-meter{top:43px}.arena .recorder-area.realistic{top:57px;height:calc(100% - 131px)!important;width:130px}.arena .companion{width:115px;bottom:74px;left:-13%}.player-message{bottom:51px;font-size:8px}.player-actions{bottom:8px;height:36px}.player-actions .submit{font-size:11px;padding:8px;min-height:36px;border-radius:12px}.player-actions .clear{font-size:10px;min-width:35px}.conductor{margin-top:0}.conductor .timer{width:51px!important;height:51px!important}.timer strong{font-size:21px}.conductor .question-label{font-size:8px;padding:3px 13px;margin:9px 0 7px!important}.conductor .staff{max-height:105px!important}.conductor #score-paper{max-width:280px}.conductor .note-label{font-size:16px!important;min-height:22px;margin-top:13px}.center-status{font-size:9px;min-height:27px;margin:3px 0 7px!important}.conductor .start,.conductor .pause{padding:9px 12px;min-height:35px;font-size:12px}.instrument-tag{font-size:7px;padding:3px 8px;margin-top:8px}.realistic .hole.tone-key{height:5.7cqh}.realistic .hole b{font-size:7px;left:calc(50% + 15px)}.realistic .rear{left:-38px}.hand-mark{display:none}.game-stage>footer{font-size:7px}.game-tools .theme-strip{position:static}.practice-pipe .recorder-area.realistic{height:310px!important}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.realistic .hole.tone-key i{width:clamp(8px,7cqw,15px);height:clamp(8px,7cqw,15px);min-width:0}.realistic[data-fingering=baroque] .tone-key[data-hole="4"] i,.realistic[data-fingering=german] .tone-key[data-hole="5"] i{width:clamp(6px,5cqw,10px);height:clamp(6px,5cqw,10px)}.realistic .hole.tone-key.double i{width:clamp(6px,6cqw,11px);height:clamp(6px,6cqw,11px)}.realistic .hole.tone-key.double em{width:clamp(4px,4cqw,7px);height:clamp(4px,4cqw,7px)}
.game-stage>footer .orientation-note{display:none}@media(min-width:601px) and (max-width:1000px) and (max-height:599px){.game-stage>footer span{display:none}.game-stage>footer .orientation-note{display:inline;background:#17394de0}}
@media(max-width:600px){.arena .companion{left:-3px;width:95px}}@media(max-height:650px) and (min-width:601px){.arena .companion{left:-1%;width:105px}}
@media(min-width:601px) and (max-width:1000px) and (max-height:599px){.stage-title p{display:none}.stage-title:after{content:'橫式已開啟大指孔操作';display:block;font-size:8px;letter-spacing:0;margin-top:4px;color:#fff4d4}.conductor .instrument-tag{display:none}.game-stage>footer{display:none}.conductor .staff{max-height:95px!important}}
/* v0.4: a large touch controller mirrors the proportionate recorder diagram. */
.touch-fingers{display:none}.finger-pad{touch-action:manipulation}.finger-pad[data-correction]{animation:repair-pulse 1s ease-in-out infinite}.finger-pad[data-correction]:after{content:'•';position:absolute;right:5px;top:0;font-size:17px;color:#68491d}@keyframes repair-pulse{50%{background:#a9d9e1}}
@media(max-width:600px),(max-height:599px){
 .touch-fingers{display:block}.arena .touch-fingers{position:absolute;bottom:67px;left:50%;transform:translateX(-50%);width:144px;z-index:5}.touch-fingers>small{display:block;font-size:9px;text-align:center;color:#fff8dc;background:#173d4bdf;border-radius:9px;padding:3px 0;margin-bottom:5px}.touch-fingers>div{display:grid;grid-template-columns:repeat(3,44px);gap:5px;justify-content:center}.touch-fingers .finger-pad{position:relative;width:44px;height:44px;min-height:44px;padding:2px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #f9edc9;border-radius:12px;background:#f4e6bf;color:#293e46;box-shadow:0 3px #8b7656;line-height:1.15}.finger-pad b{font-size:17px}.finger-pad span{font-size:8px}.touch-fingers .finger-pad[aria-pressed=true]{background:#163a45;color:#fff4d4;border-color:#a9c8ba;box-shadow:0 2px #102c36}.finger-pad:active{transform:translateY(2px)}.arena .recorder-area.realistic{top:60px;height:calc(100% - 305px)!important;min-height:70px}.arena .companion{bottom:250px;width:85px}.arena .realistic [data-hole]{pointer-events:none}.practice-pipe .touch-fingers{position:static;transform:none;width:144px;margin:10px auto}.practice-pipe .touch-fingers>small{background:#dce9e0;color:#27494a}.practice-pipe .realistic [data-hole]{pointer-events:none}.practice-pipe .recorder-area.realistic{height:220px!important}.practice-pipe .realistic .rear{left:-25px}
}
@media(max-width:600px){.game-stage>.arena{grid-template-rows:185px minmax(0,1fr)}.conductor{grid-template-rows:23px 88px 23px 27px 18px}.conductor #score-paper{height:88px}.conductor .staff{height:84px!important}.conductor .center-status{font-size:9px;height:25px}.player-message{font-size:9px;white-space:normal;height:27px;bottom:46px}.player-actions{bottom:2px}}
@media(min-width:601px) and (max-height:599px){.arena .touch-fingers{width:196px;bottom:62px}.touch-fingers>div{grid-template-columns:repeat(4,44px)}.arena .recorder-area.realistic{height:calc(100% - 226px)!important;top:45px}.arena .companion{display:none}.player-message{bottom:39px;font-size:9px}.player-actions{bottom:0;height:34px}}
@media(prefers-reduced-motion:reduce){.finger-pad[data-correction]{animation:none;background:#a9d9e1}.finger-pad[data-correction][aria-pressed=true]{background:#163a45}}

.mistake-count{display:block;font-size:10px;color:#526965;margin-top:4px}
/* A covered hole keeps dark feedback when pulsing, so light labels stay readable. */
@keyframes repair-covered{50%{background:#245360}}
.finger-pad[aria-pressed=true][data-correction]{animation-name:repair-covered}
.finger-pad[aria-pressed=true][data-correction]:after{color:#fff4d4}
/* v0.5: physical half holes and independent, explicit sound controls. */
.realistic .hole[data-hole-state="1"] i{background:linear-gradient(90deg,#08151c 50%,#fff4d5 50%)!important;border-color:#d0dbce!important}
.realistic .hole.double[data-hole-state="1"] i{background:#08151c!important}.realistic .hole.double[data-hole-state="1"] em{background:#fff4d5!important}
.touch-fingers .finger-pad[data-hole-state="1"]{background:linear-gradient(90deg,#163a45 50%,#f4e6bf 50%);color:#fff4d4;border-color:#fff0c9;box-shadow:0 2px #102c36}.finger-pad[data-hole-state="1"] b,.finger-pad[data-hole-state="1"] span{background:#244450;border-radius:3px;padding:0 3px}.half-covered{background:linear-gradient(90deg,#304c58 50%,transparent 50%)}
.sound-controls{margin:14px 0;padding-top:12px;border-top:1px solid #839f9b;display:grid;gap:9px}.sound-controls label{font-size:12px;display:flex;align-items:center;gap:8px}.sound-controls input[type=range]{min-width:0;width:140px;accent-color:#e8cd8c}.sound-controls input[type=checkbox]{width:18px;height:18px;accent-color:#e8cd8c}.sound-controls button{min-height:40px;padding:8px;background:#e8cd8c;color:#243d41;border-radius:8px}.sound-controls p{font-size:10px;line-height:1.7;color:#e7eadb;margin:0}.game-lobby-link{display:block;font-size:12px;color:#fff0ca;text-align:center;padding:8px}.game-tools{max-height:calc(100dvh - 95px);overflow:auto}.game-tools #close-tools{margin-top:8px}
@media(max-width:600px){.game-tools{max-height:calc(100dvh - 70px)}.conductor .start{font-size:9px}.touch-fingers>small{font-size:8px}}

/* v0.6: tablet-sized instrument targets; instrument and score keep their aspect ratios. */
.finger-zoom-label{display:none}
@media(min-width:601px) and (max-width:1400px) and (min-height:600px){
 .game-hud{top:10px;height:44px}.stage-title{max-width:32%;padding:0 6px}.stage-title h1{font-size:22px;letter-spacing:1px}.stage-title p{font-size:8px;margin-top:4px}
 .game-stage{padding:74px 3% 26px!important}.game-stage>.arena{grid-template-columns:minmax(0,1fr) minmax(190px,.85fr) minmax(0,1fr);gap:2%}
 .arena .player-top{top:-62px;min-height:46px;width:90%;max-width:240px;padding:5px 12px!important}.player-top>div:first-child>small{display:none}.arena .player h2{font-size:18px;margin:0}.arena .player .score{font-size:28px}.arena .score small{font-size:9px;letter-spacing:0}.arena .player .energy-meter{top:-10px}
 .arena .recorder-area.realistic{top:2px;height:calc(100% - 96px)!important;width:260px;left:50%;transform:translateX(-38%)}
 .arena .companion{width:105px;left:-8%;bottom:70px;z-index:1;pointer-events:none}
 .arena .player-message{bottom:60px;height:26px;font-size:11px;white-space:normal;line-height:1.4}
 .arena .player-actions{bottom:6px;height:48px;width:98%;gap:8px}.arena .player-actions .submit{font-size:15px;min-height:48px;padding:10px 8px}.arena .player-actions .clear{min-width:48px;min-height:48px;padding:8px;font-size:12px}
 .conductor{margin-top:20px}.conductor .timer{width:66px!important;height:66px!important}.conductor .timer strong{font-size:26px}.conductor .question-label{font-size:11px;margin:14px 0 10px!important;padding:5px 9px}.conductor .pause{min-height:44px;padding:10px 12px}
 .game-stage>footer{font-size:9px;bottom:3px;gap:4px;padding:0 4px}
 .realistic .hole.tone-key{width:76px;height:48px;min-height:48px!important;border:1px solid #e5e9cf4d;border-radius:22px;background:#17445426;touch-action:manipulation}
 .realistic .hole.tone-key:active{background:#b0e2de59}.realistic .hole.tone-key i{width:22px;height:22px;min-width:22px;border-width:1.5px}
 .realistic[data-fingering=baroque] .tone-key[data-hole="4"] i,.realistic[data-fingering=german] .tone-key[data-hole="5"] i{width:16px;height:16px;min-width:16px}
 .realistic .hole.tone-key.double i{width:17px;height:17px;min-width:17px}.realistic .hole.tone-key.double em{width:11px;height:11px}
 .realistic .hole b{font-size:13px;line-height:20px;width:18px;left:calc(50% + 28px)}
 .realistic .rear{left:-56px;width:64px}.realistic .rear>span{font-size:10px;padding:3px 7px}.realistic .rear small{font-size:9px}
 .realistic .thumb{width:56px;height:56px;min-height:56px}.realistic .thumb i{width:23px;height:23px}.realistic .thumb b{left:-15px}.realistic .rear:after{top:50px;right:-25px;width:25px}
 .hand-mark{display:none}
 .practice-pipe .recorder-area.realistic{height:560px!important;width:260px;clip-path:inset(0 -80px 0 -80px)}
 .practice-pipe .instrument-scale{height:150%;transform:translateY(-26.666667%)}.practice-pipe .realistic .rear{left:-56px}
 .practice-pipe .finger-zoom-label{display:block}.finger-zoom-label{position:absolute;top:2px;left:50%;transform:translateX(-50%);padding:4px 9px;border-radius:10px;background:#153d4de6;color:#fff4d5;font-size:11px;z-index:5;white-space:nowrap;pointer-events:none}
}
/* Short tablets show a proportional close-up of original y=200..700, rather
   than distorting the instrument or stacking overlapping 48px hit targets. */
@media(min-width:601px) and (max-width:1400px) and (min-height:600px) and (max-height:1023px){
 .arena .recorder-area.realistic{clip-path:inset(0 -80px 0 -80px)}
 .arena .instrument-scale{position:absolute;left:50%;top:50%;height:max(150%,900px);transform:translate(-50%,-64.866667%)}
 .arena .finger-zoom-label{display:block}
}

@media(min-width:601px) and (max-width:1200px) and (min-height:600px){.arena .player-top{width:128px;max-width:128px}.arena .p0 .player-top{left:70%}.arena .p1 .player-top{left:30%}.arena .player h2{font-size:16px}.quick-restart{font-size:10px;max-width:62px;padding:8px}.stage-title h1{font-size:20px}.arena .player .score{font-size:26px}}

@media(min-width:601px) and (max-width:1400px) and (min-height:600px){#dialog:has(#practice-root){width:min(900px,calc(100vw - 36px));max-width:calc(100vw - 36px)}.practice-score .staff{width:calc(100% - 48px);max-width:280px;height:auto!important;margin:auto}#practice-root>.dialog-actions{position:sticky;bottom:0;z-index:9;background:transparent;pointer-events:none;padding:8px 0;margin-bottom:0}#practice-root>.dialog-actions button{min-height:48px;pointer-events:auto}}
