:root{--ink:#172b57;--sub:#526788;--blue:#245fe4;--green:#078c77;--line:#d8e4f6;--cream:#f4f8ff;--radius:26px;font-family:ui-rounded,'Apple SD Gothic Neo','Malgun Gothic',system-ui,sans-serif;color:var(--ink);background:#eef4ff;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 15% 4%,#d4fff0 0,transparent 36%),radial-gradient(ellipse at 90% 45%,#dfdfff 0,transparent 42%),#eef4ff;min-height:100vh}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:0;border-radius:16px;color:inherit;font-weight:750;min-height:48px;transition:transform .15s,background .15s}button:active:not(:disabled){transform:translateY(2px)}button:disabled{opacity:.46;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #e0a112;outline-offset:4px}a{color:inherit}[hidden]{display:none!important}button:hover:not(:disabled){filter:brightness(1.04)}
.app-shell{max-width:1392px;margin:auto;padding:0 32px 18px}.topbar{min-height:76px;display:flex;align-items:center;justify-content:space-between;gap:12px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;font-size:22px;font-weight:850}.brand-mark{display:grid;place-items:center;width:46px;height:46px;background:var(--blue);color:white;border-radius:16px;font-size:30px;box-shadow:0 5px 0 #c4d7ff}.brand small{font-size:10px;display:block;letter-spacing:1px;color:var(--sub);margin-top:2px}.top-actions{display:flex;align-items:center;gap:10px}.mic-state{font-size:14px;font-weight:700;display:flex;align-items:center;gap:8px}.mic-state i,.sound-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:#8c9fb9}.mic-state.active i,.sound-dot.hearing{background:#078c77;box-shadow:0 0 0 5px #b7f1dd}.quiet,.icon-button{padding:10px 16px;background:#fff;border:1px solid var(--line);font-size:15px}.icon-button{min-width:48px}.intro{display:flex;align-items:center;justify-content:space-between;padding:10px 0 22px;gap:16px}.eyebrow{font-size:12px;letter-spacing:.8px;font-weight:800;color:var(--sub);margin-bottom:6px}.intro h1{font-size:36px;letter-spacing:-1.5px;margin:0;font-weight:900}.intro h1 span{color:var(--blue)}.intro p{font-size:18px;color:var(--sub);margin:8px 0 0}.lesson-tag{background:#fff9db;border:1px solid #f8df83;padding:12px 18px;border-radius:24px;color:#68501b;font-size:14px;font-weight:750;white-space:nowrap}
.practice-toolbar{background:#fff;border:1px solid var(--line);padding:14px 18px;border-radius:22px;display:flex;align-items:center;gap:24px;margin-bottom:20px;box-shadow:0 4px 0 #dfe8fa80}.song-control{display:flex;align-items:center;gap:15px;flex:1;min-width:0}.song-control>span{font-size:14px;white-space:nowrap;color:var(--sub);font-weight:700}select{max-width:100%;min-height:48px;color:var(--ink);background:white;border:1px solid var(--line);border-radius:12px;padding:8px 12px;cursor:pointer;font-weight:700}.song-control select{width:100%;min-width:0;font-size:19px;background:#f3f7ff}.mode-switch{display:flex;background:#edf3ff;padding:4px;border-radius:17px;gap:4px}.mode-switch button{padding:10px 19px;background:transparent;font-size:16px;white-space:nowrap}.mode-switch .selected{background:var(--blue);color:#fff;box-shadow:0 3px 0 #123f9e}
.practice-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);gap:22px;align-items:stretch}.garden{position:relative;display:flex;flex-direction:column;min-height:512px;background:linear-gradient(165deg,#c9f8f1,#ddf6fc 43%,#c3e5ff);border:2px solid #fff;border-radius:var(--radius);overflow:hidden;box-shadow:0 10px 30px #4068b015}.garden-top{display:flex;justify-content:space-between;align-items:center;padding:22px 22px 0;gap:8px}.garden-label{font-size:12px;font-weight:850;color:#366a79;letter-spacing:.5px}.progress-pill{font-size:12px;font-weight:750;color:#366a79;background:#ffffffb0;padding:8px 10px;border-radius:18px;max-width:60%}.star-wallet{position:absolute;right:24px;top:64px;display:flex;align-items:center;gap:7px;z-index:3;font-size:22px;font-weight:900}.star-wallet img{width:29px;height:29px;object-fit:contain}.bubble{position:relative;z-index:2;text-align:center;margin:22px 65px 0;min-height:73px}.bubble strong{display:block;font-size:25px;letter-spacing:-.7px;font-weight:900}.bubble span{display:block;font-size:18px;color:#365973;line-height:1.45;margin-top:8px}.character-scene{position:relative;flex:1;min-height:290px;isolation:isolate;background:radial-gradient(ellipse at 50% 86%,#689cbd30 0,transparent 30%)}.scene-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none}.scene-orbit{position:absolute;font-size:46px;color:#2671c6;opacity:.65;z-index:1}.orbit-one{left:13%;top:22%;transform:rotate(-14deg)}.orbit-two{right:13%;top:47%;color:#078c77;transform:rotate(13deg)}.garden[data-mood=hearing] .scene-orbit,.garden[data-mood=good] .scene-orbit{animation:noteFloat .7s alternate infinite}.success-badge{position:absolute;right:12%;top:15%;z-index:5;display:flex;align-items:center;gap:7px;padding:9px 13px;background:#fff7bd;border:2px solid #fff;border-radius:18px;color:#6c4b08;box-shadow:0 5px 0 #e6bc3866;font-size:21px;transform:rotate(5deg)}.success-badge img{width:29px;height:29px}.flowers{position:absolute;bottom:10px;left:12%;right:12%;display:flex;justify-content:center;gap:8px;z-index:4;pointer-events:none}.flower{width:27px;height:27px;object-fit:contain;animation:starIn .35s both}.listening-strip{z-index:4;min-height:59px;padding:15px 20px;background:#fff9;display:flex;align-items:center;gap:12px;border-top:1px solid #9cd0dc55}.listening-strip #heard-label{font-size:18px;font-weight:700;flex:1}.level-meter{height:8px;width:56px;background:#b6dbdf;border-radius:8px;overflow:hidden}.level-meter span{display:block;height:100%;width:0;background:#098b78;border-radius:8px}
.popo-fallback{position:absolute;bottom:11%;left:50%;width:240px;height:290px;transform:translateX(-50%);z-index:2}.popo-fallback .part{position:absolute;object-fit:contain}.popo-fallback .body{left:25%;top:5%;width:50%;height:86%}.popo-fallback .leg-left{left:32%;top:80%;width:16%;height:22%}.popo-fallback .leg-right{left:52%;top:80%;width:16%;height:22%;transform:scaleX(-1)}.popo-fallback .arm-left{left:10%;top:40%;width:25%;height:36%}.popo-fallback .arm-right{left:65%;top:40%;width:25%;height:36%;transform:scaleX(-1)}.popo-fallback .ear-left{left:26%;top:0;width:18%;height:19%}.popo-fallback .ear-right{left:56%;top:0;width:18%;height:19%;transform:scaleX(-1)}.popo-fallback .eye-left{left:31%;top:31%;width:17%;height:17%}.popo-fallback .eye-right{left:52%;top:31%;width:17%;height:17%}.popo-fallback .mouth{left:40%;top:53%;width:21%;height:10%}.garden[data-celebrating=true] .popo-fallback{animation:fallbackJump .45s ease-out}
.score-card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:26px;box-shadow:0 10px 30px #4068b00c;min-width:0;display:flex;flex-direction:column}.score-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.score-heading h2{font-size:25px;letter-spacing:-.8px;margin:0}.listen-button{border:1px solid #d7e3fb;background:#f0f5ff;padding:10px 14px;white-space:nowrap;font-size:15px;color:#2458b7}.song-meta{display:flex;align-items:center;gap:10px;color:var(--sub);font-size:13px;margin-top:12px}.song-meta i{height:4px;width:4px;background:#acbad0;border-radius:50%}.score{margin-top:16px;min-height:130px;width:100%;overflow:hidden}.score svg{display:block;width:100%;height:auto;max-height:220px;color:#253b60}.staff-line{stroke:#bac7dc;stroke-width:1}.bar-line{stroke:#a2b1cd}.bar-number{fill:#6b7e9c;font-size:11px}.note-bg{fill:transparent}.score-note.current .note-bg{fill:#e3edff;stroke:#82a9fa;stroke-width:1}.score-note.current{color:#245fe4}.score-note.good{color:#078c77}.score-note.good .note-bg{fill:#ddf9ed}.note-solfege{font-weight:800}.beat-row{display:flex;align-items:center;gap:13px;font-size:13px;color:var(--sub);margin:13px 0 17px}.beat-dots{display:flex;gap:8px}.beat-dots i{width:10px;height:10px;border-radius:50%;background:#dce6f7}.beat-dots i.active{background:#245fe4;box-shadow:0 0 0 4px #e5edff}.measure-now{margin-left:auto;font-size:12px;white-space:nowrap}.next-note{display:flex;align-items:center;gap:17px;padding:17px;background:#eff5ff;border:1px solid #dce7fc;border-radius:21px}.note-disc{display:grid;place-items:center;background:#245fe4;color:white;min-width:76px;height:82px;border-radius:20px;font-size:45px;font-weight:900;box-shadow:0 4px 0 #c4d4fa}.next-note>div:nth-child(2){flex:1;min-width:0}#target-caption{font-size:13px;color:var(--sub)}#target-instruction{display:block;font-size:21px;line-height:1.4;margin-top:5px;word-break:keep-all}.hold-track{height:7px;margin-top:10px;border-radius:6px;background:#d3def6;overflow:hidden}.hold-track span{display:block;height:100%;width:0;background:#0aa68c;border-radius:6px}.fingering{display:flex;flex-direction:column;gap:4px;min-width:14px}.fingering i{width:7px;height:7px;border-radius:50%;border:1px solid #8294b4;background:white}.fingering i.covered{background:#253f6d}.mode-help{font-size:15px;color:var(--sub);line-height:1.6;margin:15px 0}.main-controls{display:flex;gap:10px;margin-top:auto;padding-top:2px}.primary{padding:15px 20px;background:#245fe4;color:white;font-size:18px;font-weight:850;box-shadow:0 4px 0 #153d9d;min-height:56px}.main-controls .primary{flex:1;background:#245fe4 url('./art/button-blue.png') center/100% 100% no-repeat;text-shadow:0 1px 1px #164273}.stop-button{background:#e9eff9;color:#415b82;font-size:17px;padding:12px 18px}.bottom-controls{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.text-button{background:transparent;padding:8px 10px;color:var(--sub);font-size:14px;min-height:48px}.manual-panel{border-top:1px solid var(--line);margin-top:15px;padding-top:8px}.manual-panel p{font-size:16px;color:var(--sub)}.manual-keys{display:flex;flex-wrap:wrap;gap:10px}.manual-keys button{background:#eaf3ff;border:2px solid #c7dafa;min-width:64px;font-size:23px;padding:12px}.manual-keys .pressed{background:#245fe4;color:#fff}.notice{border-radius:14px;background:#fff2c7;padding:13px;font-size:16px;line-height:1.6}.app-shell footer{display:flex;justify-content:space-between;align-items:center;color:var(--sub);font-size:12px;padding:12px 3px;gap:12px}.footer-leaf{color:#078c77}
.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:14px}.dialog-heading h2{font-size:25px;margin:0}dialog{color:var(--ink);border:1px solid var(--line);border-radius:25px;padding:26px;width:min(640px,calc(100% - 28px));max-height:85dvh;overflow:auto;background:#fff;box-shadow:0 20px 80px #172b5733}dialog::backdrop{background:#172b5777;backdrop-filter:blur(5px)}dialog p,dialog li{font-size:16px;line-height:1.7}dialog hr{border:0;border-top:1px solid var(--line);margin:22px 0}dialog h3{font-size:20px}summary{cursor:pointer;font-weight:750;min-height:48px;padding:13px 0}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:16px 0}.setting-row label{font-size:16px}.setting-row input[type=checkbox]{width:24px;height:24px;accent-color:#245fe4}.setting-note{font-size:14px;color:var(--sub);line-height:1.65}.file-button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;border:1px solid #c4d7ff;border-radius:13px;background:#edf4ff;padding:12px 17px;font-size:15px;font-weight:750;text-decoration:none;cursor:pointer}.tempo-control{display:grid;gap:13px;margin:8px 0 18px}.tempo-control span{display:flex;justify-content:space-between;font-weight:700}.tempo-control input{width:100%;accent-color:#245fe4}.result-dialog{text-align:center}.result-art img{width:78px;height:78px;object-fit:contain}.result-dialog h2{font-size:29px;margin:10px 0}.result-stats{display:flex;justify-content:center;gap:15px;margin:25px 0}.result-stats>div{flex:1;background:#f0f5ff;padding:20px 10px;border-radius:18px}.result-stats strong{display:block;color:#245fe4;font-size:36px}.result-stats span{display:block;font-size:14px;color:var(--sub);margin-top:8px}.dialog-actions{display:flex;justify-content:center;gap:12px;margin-top:20px}
@keyframes noteFloat{to{transform:translateY(-12px) rotate(10deg)}}@keyframes starIn{from{transform:scale(.3) rotate(-25deg);opacity:0}to{transform:scale(1);opacity:1}}@keyframes fallbackJump{50%{transform:translate(-50%,-25px)}}
html[data-classroom-playing] .topbar{min-height:64px;justify-content:flex-end}html[data-classroom-playing] .brand{display:none}.focus-screen .intro{display:none}
@media(min-width:1600px){.app-shell{max-width:1600px}.intro h1{font-size:44px}.garden{min-height:600px}.bubble strong{font-size:30px}.character-scene{min-height:360px}.score{min-height:180px}.score-heading h2{font-size:32px}.next-note{padding:22px}.note-disc{font-size:54px}#target-instruction{font-size:26px}.primary{font-size:22px}}
@media(min-width:901px) and (max-height:850px){.intro{padding:0 0 14px}.intro p{display:none}.intro h1{font-size:30px}.garden{min-height:462px}.score-card{padding:20px}.practice-toolbar{margin-bottom:15px}.character-scene{min-height:250px}.score{min-height:106px;margin-top:10px}.mode-help{margin:10px 0}}
@media(max-width:900px){.app-shell{padding:0 18px 15px}.topbar{min-height:64px}.intro{padding:5px 0 15px}.intro h1{font-size:30px}.intro p{display:none}.lesson-tag{display:none}.practice-toolbar{gap:12px;flex-wrap:wrap;padding:12px;margin-bottom:14px}.song-control{flex-basis:100%;gap:10px}.song-control select{font-size:18px}.mode-switch{width:100%}.mode-switch button{flex:1}.practice-grid{display:flex;flex-direction:column;gap:12px}.score-card{display:contents}.score-heading,.song-meta{display:none}.next-note{order:0;padding:13px 16px;min-height:90px}.note-disc{min-width:66px;height:66px;font-size:40px}.garden{order:1;min-height:0;height:280px;flex-shrink:0}.garden-top{padding:12px 18px 0}.garden-label{font-size:11px}.progress-pill{font-size:11px;padding:5px 10px}.star-wallet{top:45px;right:18px;font-size:20px}.star-wallet img{width:24px;height:24px}.bubble{margin:8px 50px 0;min-height:0}.bubble strong{font-size:22px}.bubble span{font-size:18px;margin-top:3px}.character-scene{min-height:0;flex:1}.listening-strip{min-height:46px;padding:10px 17px}.listening-strip #heard-label{font-size:18px}.scene-orbit{font-size:30px}.success-badge{font-size:18px;right:13%;top:5%;padding:7px 10px}.flowers{bottom:2px}.flower{width:18px;height:18px}.popo-fallback{width:130px;height:150px;bottom:9%}.main-controls{order:2;margin:0;padding:0}.mode-help{order:3;margin:0;text-align:center;font-size:14px}.score{order:4;background:white;border:1px solid var(--line);padding:15px 8px;border-radius:20px;margin:0;min-height:0}.beat-row{order:5;margin:0 4px}.bottom-controls{order:6;margin:0;justify-content:center}.manual-panel{order:7;margin:0;background:#fff;padding:12px;border-radius:16px}.notice{order:8;margin:0}.app-shell footer{padding-top:10px;font-size:11px}.app-shell footer>span{display:none}}
@media(max-width:590px){.app-shell{padding-left:12px;padding-right:12px}.top-actions{gap:6px}.mic-state{display:none}.brand{font-size:18px}.quiet,.icon-button{font-size:14px;padding:8px 12px}.intro h1{font-size:25px;letter-spacing:-1px}.intro .eyebrow{display:none}.practice-toolbar{gap:8px}.song-control>span{font-size:13px}.song-control select{font-size:17px}.mode-switch button{font-size:15px}.garden{height:248px}.bubble strong{font-size:21px}.bubble span{font-size:18px}.garden-label{display:none}.garden-top{justify-content:flex-start;padding-top:10px}.star-wallet{top:12px}.bubble{margin:7px 40px 0}.next-note{padding:11px 13px;gap:12px}.note-disc{min-width:58px;height:64px;font-size:36px}#target-instruction{font-size:20px}#target-caption{font-size:12px}.hold-track{margin-top:6px}.primary{font-size:18px;padding:13px}.stop-button{font-size:16px;padding:12px}.level-meter{width:35px}.listening-strip{gap:9px}.listening-strip #heard-label{font-size:18px}.result-dialog h2{font-size:25px}.dialog-actions{flex-direction:column}.setting-row{align-items:flex-start;flex-direction:column;gap:8px}.result-stats{gap:7px}.result-stats strong{font-size:28px}.result-stats span{font-size:12px}.bottom-controls{gap:0}.bottom-controls .text-button{font-size:13px}}
@media(max-width:900px) and (max-height:740px){.intro{display:none}.garden{height:200px}.bubble span{display:none}.bubble strong{font-size:20px}.topbar{min-height:56px}.practice-grid{gap:9px}.practice-toolbar{padding:9px;margin-bottom:9px}.mode-help{display:none}.listening-strip{min-height:44px}.next-note{min-height:83px}.character-scene{background:none}.flowers{display:none}.popo-fallback{width:110px;height:120px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}

.library-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.library-list{display:grid;gap:9px;margin:15px 0}.library-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px;background:#f3f6ec;border:1px solid var(--line);border-radius:13px}.library-item>div{min-width:0}.library-item strong{display:block;font-size:14px;overflow-wrap:anywhere}.library-item small{display:block;color:var(--sub);font-size:11px;margin-top:5px}.library-item button{flex-shrink:0;min-height:44px}#score-share{padding:15px;background:#eef4e6;border-radius:14px;margin:14px 0}#score-share label,#score-editor label{display:block;font-size:13px;font-weight:700;margin-bottom:8px}.share-row{display:flex;gap:8px}.share-row input,#score-edit-title{min-width:0;width:100%;border:1px solid #cbd7bf;border-radius:9px;padding:12px;background:white;color:var(--ink);font-size:13px}.share-row button{flex-shrink:0}#library-message{white-space:pre-line;overflow-wrap:anywhere}#library-upload[aria-busy=true] .file-button{opacity:.55;cursor:wait}.score-edit-notes{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-height:300px;overflow-y:auto;margin:15px 0;padding:3px}.score-edit-note{display:flex;align-items:center;gap:6px;font-size:12px}.score-edit-note span{min-width:24px;color:var(--sub)}.score-edit-note select{min-width:0;flex:1;border:1px solid #cbd7bf;border-radius:8px;padding:8px 4px;min-height:44px;color:var(--ink);background:white}#score-editor{margin-top:16px}#score-editor .primary{width:100%}@media(max-width:590px){.share-row{flex-wrap:wrap}.share-row button{width:100%}.score-edit-notes{grid-template-columns:1fr}.library-item{padding:11px;gap:7px}}
#teacher-dialog .dialog-heading{position:sticky;top:0;background:#fff;z-index:3;padding:10px 0}#library-upload .file-button{margin-top:8px}

/* Exact original part ratios keep the static character assembled too. */
.popo-fallback{width:240px;height:300px}.popo-fallback .body{left:20.83%;top:15%;width:58.33%;height:64.67%}.popo-fallback .ear-left{left:20.83%;top:10%;width:14.58%;height:11.67%}.popo-fallback .ear-right{left:64.58%;top:10%;width:14.58%;height:11.67%}.popo-fallback .arm-left{left:10%;top:44%;width:25%;height:40%;transform:scaleX(-1)}.popo-fallback .arm-right{left:65%;top:44%;width:25%;height:40%;transform:none}.popo-fallback .leg-left{left:35.42%;top:72%;width:12.5%;height:27%}.popo-fallback .leg-right{left:54.17%;top:72%;width:12.5%;height:27%}.popo-fallback .eye-left{left:31.67%;top:35%;width:15%;height:12%}.popo-fallback .eye-right{left:53.33%;top:35%;width:15%;height:12%}.popo-fallback .mouth{left:41.67%;top:53.33%;width:16.67%;height:5.33%}
@media(max-width:900px){.popo-fallback{width:136px;height:170px}}@media(max-width:900px) and (max-height:740px){.popo-fallback{width:112px;height:140px}}

html[data-classroom-playing] .app-shell>.topbar{display:none}
@media(max-width:600px){html[data-classroom-game=recorder_friend] #classroom-play-toolbar #screen-button{display:none}html[data-classroom-game=recorder_friend] #classroom-play-toolbar [data-play-part=extras] #teacher-button{font-size:13px;padding:8px;min-width:76px}}

.brand,.top-actions button{white-space:nowrap}
@media(max-width:360px){.topbar #screen-button{display:none}.brand{font-size:17px}}
@media(min-width:600px) and (max-width:900px){.garden .bubble{position:absolute;left:24px;top:86px;width:42%;margin:0;text-align:left}.garden .character-scene{width:55%;align-self:flex-end}.garden .bubble strong{font-size:24px}.garden .bubble span{font-size:18px}.garden .garden-top{min-height:35px}.garden .listening-strip{flex-shrink:0}}

body #classroom-game-cover-title{font-size:clamp(32px,4vw,38px)}

/* Keep practice status and secondary actions readable at every viewport. */
.garden-label,#progress-label,.song-meta span,#beat-label,#measure-now,#target-caption,
.bottom-controls .text-button,.bottom-controls .text-button span,
.app-shell main>footer>span,.app-shell main>footer>span span,.result-stats span{font-size:14px}

@media(max-width:900px){.practice-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto}.practice-toolbar .song-control{min-width:0}.practice-toolbar .mode-switch{grid-column:1/-1}.practice-toolbar .listen-button{font-size:14px;padding:9px 11px;min-height:48px}}
@media(max-width:590px){.song-control>span{display:none}}

/* Keep the complete CC0 cover composition at every viewport. */
.classroom-game-cover[data-classroom-game-cover="recorder_friend"] .classroom-game-cover-art{object-fit:contain}
