:root{--ink:#343b37;--green:#426d58;--paper:#fffaf0;--muted:#777e73;--coral:#dc8063}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:"PingFang TC","Noto Sans TC",system-ui,sans-serif}button,a,select,input{-webkit-tap-highlight-color:transparent}button,select{font:inherit}button{cursor:pointer;border:0;color:inherit;touch-action:manipulation}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #436cce;outline-offset:4px}button:disabled{opacity:.5;cursor:default}button:hover:not(:disabled){filter:brightness(.97)}.app{max-width:1160px;margin:auto;padding:22px 32px 12px}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.brand{display:flex;align-items:center;gap:12px;font-weight:850;font-size:22px;text-decoration:none;color:var(--ink);letter-spacing:1px}.brand small{display:block;font-size:9px;letter-spacing:3.5px;margin-top:3px;color:#869080}.logo{background:var(--green);color:#fff9dc;border-radius:15px;display:grid;place-items:center;width:48px;height:48px;font-size:36px;transform:rotate(-7deg)}.top-actions{display:flex;gap:8px}.soft{border:1px solid #dedfd3;border-radius:12px;background:#fffdf5;padding:11px 15px;font-size:14px;font-weight:650}nav{display:flex;gap:8px;background:#eeefe3;padding:6px;border-radius:18px}nav button{flex:1;background:transparent;padding:13px 8px;border-radius:13px;font-size:17px;white-space:nowrap}nav button.selected{background:#fffdf6;box-shadow:0 3px 8px #48553d0e;color:var(--green);font-weight:800}.intro{display:flex;align-items:center;justify-content:space-between;padding:27px 0 22px;gap:12px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:3px;color:#809175}h1{font-size:32px;letter-spacing:1px;margin:7px 0 8px}p{color:var(--muted);line-height:1.6;margin:0}.sticker-count{white-space:nowrap;background:#f9edd2;border-color:#eedfbc}.playground{border:1px solid #dfdfcd;border-radius:26px;overflow:hidden;background:#fffefa;box-shadow:0 9px 30px #525d3410}.scene{height:235px;background:#eaf0e4;position:relative;overflow:hidden}.staff{position:absolute;inset:30px 0;display:flex;flex-direction:column;justify-content:space-evenly;opacity:.35}.staff i{border-bottom:1px solid #b6c9ad}.sun{position:absolute;right:12%;top:17px;color:#e3b25b;font-size:65px}.cloud{position:absolute;width:95px;height:25px;border-radius:50px;background:#fffdf2;top:36px;left:13%;opacity:.8}.cloud:before{content:'';position:absolute;bottom:0;left:20px;width:47px;height:47px;border-radius:50%;background:inherit}.c2{left:auto;right:28%;top:72px;transform:scale(.6)}.ground{position:absolute;bottom:-95px;left:-5%;width:110%;height:150px;background:#d5dfc9;border-radius:50%}.mascot{position:absolute;left:45%;bottom:18px;width:106px;height:122px;background:#b28361;border-radius:45% 45% 38% 38%;z-index:2;transform-origin:bottom;box-shadow:inset -9px -5px #a67452}.ears:before,.ears:after{content:'';position:absolute;top:-15px;width:36px;height:38px;border:9px solid #b28361;background:#d9ad8c;border-radius:50%;z-index:-1}.ears:before{left:0}.ears:after{right:0}.face{background:#f2d9b6;border-radius:40%;position:absolute;top:25px;left:14px;width:78px;text-align:center;padding:9px 0;font-size:24px;letter-spacing:1px}.belly{position:absolute;bottom:4px;left:32px;font-size:34px;color:#f6dfbc}.mascot.bounce{animation:bounce .35s ease}.speech{position:absolute;left:calc(45% + 132px);top:98px;max-width:34%;background:#fffdf0;padding:14px 18px;border-radius:18px 18px 18px 3px;font-size:16px;font-weight:650;z-index:3}.floating{position:absolute;color:#789a75;font-size:54px;transform:rotate(-15deg);top:90px;left:26%}.f2{left:35%;top:38px;font-size:32px;color:#c89069;transform:rotate(12deg)}.control-bar{min-height:70px;padding:14px 22px;display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap}.tools{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.tools button,.tools select,.task button{border-radius:10px;padding:10px 14px;background:#eef1e7;border:1px solid #e0e5d7;min-height:42px}.tools button.primary,.task button.primary{background:var(--green);color:white;border-color:var(--green)}.tools button.recording{background:#f8d4cb;color:#983a2c}.feedback{font-size:14px;color:#627356}.keyboard{height:205px;position:relative;display:flex;gap:5px;margin:0 22px 22px;user-select:none;-webkit-user-select:none;touch-action:none}.key{flex:1;min-width:0;border:1px solid #e0dfd2;border-bottom:7px solid var(--note);border-radius:0 0 13px 13px;background:linear-gradient(#fffefb,#fffcf4);position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:0 2px 16px;gap:5px;transition:background .08s,transform .08s;touch-action:none}.key .dot{background:var(--note);width:13px;height:13px;border-radius:50%;margin-bottom:5px}.key strong{font-size:20px;color:#41463d}.key small{font-size:12px;color:#8b8c7c}.key.active{background:var(--note);transform:translateY(3px);box-shadow:inset 0 4px 8px #0001}.key.active strong,.key.active small{color:#fff}.key.hint{background:color-mix(in srgb,var(--note) 28%,white);box-shadow:inset 0 0 0 3px var(--note)}.key.hint:before{content:'★';position:absolute;top:50%;font-size:28px;color:var(--note)}.black-key{position:absolute;top:0;width:7.3%;height:57%;background:linear-gradient(100deg,#536354,#2f4035);z-index:4;border-radius:0 0 8px 8px;box-shadow:0 4px 0 #233027;color:#f6f8ee;display:flex;align-items:flex-end;justify-content:center;padding-bottom:9px;font-size:10px;touch-action:none}.black-key.active{background:#d5a05f;transform:translateY(2px)}.task{border-top:1px dashed #e6e7dc;padding:12px 22px 16px}.steps{display:flex;gap:7px;flex-wrap:wrap;justify-content:center}.step{min-width:37px;height:37px;border-radius:50%;background:#eeeee3;display:grid;place-items:center;color:#798070}.step.done{background:#d4e5c9;color:#355432}.step.current{outline:3px solid #ddb16b;outline-offset:2px}.task p{text-align:center;font-size:14px;margin-top:10px}.scene-items{position:absolute;inset:0;z-index:2;pointer-events:none}.note-pop{position:absolute;left:30%;bottom:30px;font-size:38px;animation:float 1s ease-out forwards}.train{display:flex;position:absolute;bottom:24px;left:12%;gap:7px;align-items:flex-end}.engine{font-size:65px}.carriage{width:54px;height:40px;border-radius:9px;background:#d49866;border-bottom:8px solid #735b45;text-align:center;line-height:30px;font-size:22px;position:relative}.carriage.lit{background:#f3c85c;transform:translateY(-8px)}.train~.mascot{display:none}.rhythm-scene .mascot{left:auto;right:12%;transform:scale(.8)}.rhythm-scene .speech{left:20%;top:35px}.rhythm-scene .floating{display:none}#drumArea{text-align:center;padding:0 20px 18px}#drum{display:flex;flex-direction:column;align-items:center;justify-content:center;background:#f5d1b5;border:6px solid #fff1dc;outline:2px solid #d9a880;border-radius:50%;width:170px;height:150px;font-size:58px;margin:7px auto;box-shadow:0 7px 0 #c18f6e;touch-action:none}#drum:active,#drum.hit{transform:translateY(5px);box-shadow:0 2px 0 #c18f6e}#drum span{font-size:16px;font-weight:800}#drumArea p{font-size:12px;margin-top:13px}footer{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:#939784;padding:15px 2px}dialog{border:1px solid #dfdece;border-radius:24px;max-width:470px;width:calc(100% - 32px);padding:28px;color:var(--ink);background:var(--paper);box-shadow:0 20px 100px #23312233}dialog::backdrop{background:#273d3550;backdrop-filter:blur(5px)}.close{float:right;background:transparent;font-size:20px;padding:2px 6px}dialog h2{margin:4px 0 20px;font-size:24px}dialog p{margin:12px 0}dialog label{display:flex;gap:16px;justify-content:space-between;align-items:center;margin:22px 0}dialog select{padding:9px;border-radius:10px;border:1px solid #d4d8c9;background:white}dialog input{max-width:180px}.sticker-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:20px 0}.sticker{font-size:35px;background:#eeeddf;border-radius:15px;text-align:center;padding:12px 0}.locked{filter:grayscale(1);opacity:.25}.badge{display:inline-block;font-size:12px;background:#f2e8cb;padding:5px 9px;border-radius:6px}.chord-colors{display:flex;justify-content:center;gap:15px;margin-top:8px}.chord-colors span{border-radius:10px;padding:8px 15px;background:#f2eadb}.settings-note{font-size:12px}@keyframes bounce{50%{transform:translateY(-12px) rotate(-5deg)}}@keyframes float{to{transform:translateY(-140px) rotate(25deg);opacity:0}}@media(max-width:700px){.app{padding:14px 14px 8px}header{margin-bottom:16px}.brand{font-size:19px;gap:9px}.brand small{font-size:8px;letter-spacing:2px}.logo{width:40px;height:40px;font-size:30px}.top-actions .soft{padding:9px;font-size:12px}nav{gap:2px;padding:4px}nav button{font-size:21px;padding:10px 2px}nav button span{display:block;font-size:11px;margin-top:4px}.intro{padding:21px 0 17px}h1{font-size:24px}.intro p{font-size:13px}.eyebrow{font-size:8px;letter-spacing:2px}.sticker-count{font-size:11px;padding:9px}.scene{height:195px}.mascot{left:26%;transform:scale(.85);bottom:7px}.speech{left:52%;top:80px;font-size:13px;padding:12px;max-width:44%}.f1{left:10%;font-size:35px}.f2{left:45%;font-size:26px}.sun{right:9%;font-size:55px}.control-bar{padding:12px;gap:9px}.tools button,.tools select{font-size:13px;padding:9px;min-height:42px}.feedback{font-size:12px;min-height:18px}.keyboard{margin:0 10px 14px;height:200px;gap:3px}.key strong{font-size:15px}.key small{font-size:10px}.key{padding-bottom:12px}.black-key{font-size:8px;width:7.6%}.task{padding:12px}.step{min-width:29px;height:29px;font-size:12px}.steps{gap:6px}.train{left:4%;gap:4px}.engine{font-size:47px}.carriage{width:37px;font-size:18px}.rhythm-scene .mascot{right:1%;transform:scale(.65)}.rhythm-scene .speech{left:9%;top:24px;max-width:80%}footer span:last-child{display:none}}@media(min-width:701px) and (max-height:800px){.app{padding-top:14px}header{margin-bottom:15px}.intro{padding:19px 0 16px}.scene{height:195px}.keyboard{height:175px}footer{padding:10px 2px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

[hidden]{display:none!important}

/* Large, readable game navigation for small hands. */
nav button{font-size:21px;font-weight:750;line-height:1.4}
nav button span{font-size:20px}
@media(max-width:700px){
 nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:6px}
 nav button{display:flex;align-items:center;justify-content:center;gap:10px;min-width:0;min-height:72px;padding:12px 6px;font-size:28px;white-space:normal}
 nav button span{display:block;margin:0;font-size:18px;font-weight:800;line-height:1.4}
}
@media(max-width:350px){nav button{gap:6px}nav button span{font-size:16px}}
/* Guided play, short melody phrases and the little performance stage. */
nav{flex-wrap:wrap}nav button{min-width:0}nav button span{font-size:18px}
.guide-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0 0 14px}.guide-row span{font-size:14px;color:#6e7a66}.guide-row button{min-height:44px;font-size:16px}
.mascot{border:0;padding:0;cursor:pointer;transition:transform .2s}.mascot:focus-visible{outline:4px solid #3d7656;outline-offset:5px}
.keyboard-options{display:flex;gap:20px;align-items:center;flex-wrap:wrap;margin:0 22px 14px;font-size:16px;font-weight:700}.keyboard-options label{display:flex;align-items:center;gap:8px}.keyboard-options select{font-size:16px;padding:9px 11px;border:1px solid #dbe1cf;border-radius:10px;background:#fffdf6;min-height:44px;max-width:210px}.keyboard-options input{width:22px;height:22px;accent-color:#426d58}
.segment-tabs{display:flex;gap:8px;justify-content:center;margin:0 0 16px}.segment-tabs button{font-size:16px;min-height:44px}.segment-tabs button[aria-pressed="true"]{background:#426d58;color:white}.step{min-width:42px;height:42px;font-size:17px}.task p{font-size:16px}
.turn-banner{text-align:center;font-size:24px;font-weight:850;color:#876433;padding:10px 4px;margin-bottom:10px;border-radius:14px;background:#f6edd6}.turn-banner.your-turn{background:#dcefd0;color:#315e39}.beat-dots{display:flex;justify-content:center;gap:16px;margin:16px 0 4px}.beat-dots span{width:55px;height:55px;border:3px solid #e2d4af;background:#fbf4e4;border-radius:50%;display:grid;place-items:center;font-size:24px;font-weight:850;transition:transform .12s,background .12s}.beat-dots .lit{background:#e9b858;border-color:#e9b858;transform:scale(1.15)}.beat-dots.your-turn .lit{background:#72ac73;border-color:#629663;color:#fff}
.pitch-scene .mascot{left:15%;transform:scale(.78);bottom:3px}.pitch-scene .speech{left:40%;top:30px;max-width:52%}.pitch-scene .floating{display:none}.pitch-bird{position:absolute;font-size:65px;left:65%;top:95px;transition:transform 1s ease}.pitch-bird.fly-high{transform:translate(55px,-65px) rotate(-14deg)}.pitch-bird.fly-low{transform:translate(45px,40px) rotate(14deg)}.pitch-sounds{display:flex;position:absolute;left:40%;bottom:8px;gap:10px}.pitch-sounds span{font-size:15px;background:#fff8e8;padding:8px 12px;border-radius:10px}.pitch-sounds .lit{background:#efc968;box-shadow:0 0 0 3px #d4b058}.bird-choices{display:grid;grid-template-columns:1fr 1fr;gap:16px;max-width:600px;margin:12px auto}.bird-choices button{display:flex;flex-direction:column;gap:8px;align-items:center;border:2px solid #ccdcc2;background:#f0f5e9;min-height:150px;padding:18px;border-radius:20px}.bird-choices button:last-child{background:#edf1f7;border-color:#ced8e5}.bird-choices span{font-size:36px}.bird-choices strong{font-size:24px}.bird-choices small{font-size:15px}.pitch-progress{text-align:center;font-size:17px;font-weight:700;color:#597551}
.stage-on{background:radial-gradient(ellipse at 50% 20%,#fff8d9 0%,#e6d9ee 60%,#d0e1dc 100%)}.stage-on .ground{background:#d1b69d}.stage-on .staff{opacity:.18}.stage-on .sun,.stage-on .cloud{opacity:.3}.stage-on .mascot{left:43%;bottom:33px;transition:transform .16s}.stage-on .mascot.dance-left{transform:translate(-12px,-10px) rotate(-12deg)}.stage-on .mascot.dance-right{transform:translate(12px,-5px) rotate(12deg)}.stage-on .speech{top:62px}.stage-banner{position:absolute;top:12px;left:50%;transform:translateX(-50%);background:#fff9e7;border:1px solid #dfcba4;padding:7px 20px;border-radius:20px;color:#876747;font-weight:800;font-size:18px;white-space:nowrap}.stage-audience{position:absolute;bottom:0;left:50%;transform:translateX(-50%);font-size:28px;white-space:nowrap}
#voiceSetting{width:24px;height:24px;accent-color:#426d58}.settings-note{font-size:15px;line-height:1.7}
@media(max-width:700px){nav button:last-child{grid-column:1 / -1}nav button span{font-size:18px}.guide-row span{font-size:13px}.guide-row button{font-size:15px}.keyboard-options{margin:0 12px 12px;gap:10px;font-size:15px}.keyboard-options select{font-size:15px;max-width:174px}.key strong{font-size:17px}.key small{font-size:12px}.step{min-width:34px;height:36px;font-size:14px}.task p{font-size:15px}.segment-tabs{gap:6px}.segment-tabs button{padding:9px 10px;font-size:15px}.turn-banner{font-size:20px}.beat-dots{gap:12px}.beat-dots span{width:49px;height:49px;font-size:23px}.bird-choices{gap:10px}.bird-choices button{padding:12px 6px;min-height:145px}.bird-choices strong{font-size:22px}.bird-choices small{font-size:13px}.pitch-scene .mascot{left:4%;transform:scale(.65)}.pitch-scene .speech{left:34%;top:28px;font-size:14px;max-width:61%}.pitch-bird{left:66%;top:95px;font-size:48px}.pitch-bird.fly-high{transform:translate(15px,-45px)}.pitch-bird.fly-low{transform:translate(12px,35px)}.pitch-sounds{left:34%;gap:6px;bottom:6px}.pitch-sounds span{font-size:12px;padding:7px}.stage-on .mascot{left:23%;bottom:24px}.stage-on .speech{left:55%;top:72px}.stage-banner{font-size:15px;padding:7px 16px}.stage-audience{font-size:23px}.stage-on .mascot.dance-left{transform:translate(-8px,-6px) rotate(-12deg) scale(.85)}.stage-on .mascot.dance-right{transform:translate(8px,-2px) rotate(12deg) scale(.85)}}
@media(max-width:350px){nav button span{font-size:16px}.key strong{font-size:15px}.step{min-width:29px;font-size:12px}.keyboard-options{gap:6px}.keyboard-options select{max-width:160px;font-size:14px}}
nav button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px}.keyboard.bopomofo .key strong{writing-mode:vertical-rl;font-size:20px;letter-spacing:1px;line-height:1.1}
@media(max-width:700px){nav button{flex-direction:row}}
.keyboard.bopomofo .key strong{text-orientation:upright}
@keyframes bounce{50%{translate:0 -12px;rotate:-5deg}}
