:root{--ink:#403b35;--muted:#777168;--cream:#fff8ed;--paper:#fffdf8;--green:#4f927a;--orange:#e58c58;--yellow:#f4c96b;--line:#eee5d8;--shadow:0 16px 45px rgba(81,64,42,.09)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--paper);color:var(--ink);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang TC","Microsoft JhengHei","Noto Sans TC","Noto Sans CJK TC",sans-serif;line-height:1.7}a{color:inherit;text-decoration:none}button,select{font:inherit}.skip-link{position:absolute;left:-999px}.skip-link:focus{left:12px;top:12px;background:#fff;padding:8px;z-index:100}
.site-header{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 max(5vw,22px);background:#fffdf8;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:10}.brand{display:flex;gap:10px;align-items:center}nav{display:flex;gap:28px;font-size:14px;font-weight:700}nav a:hover,.footer-links a:hover{color:var(--green)}
.hero{background:linear-gradient(115deg,#fff4df,#f5f4e9 65%,#e9f3e9);padding:66px max(8vw,24px);display:grid;grid-template-columns:1.1fr .9fr;align-items:center;min-height:440px;overflow:hidden}.hero-copy{max-width:580px}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:900;color:var(--green);margin:0 0 8px}.hero h1{font-size:clamp(38px,5vw,62px);line-height:1.2;margin:8px 0 18px;letter-spacing:-2px}.hero h1 em{font-style:normal;color:#d77e4e}.hero-copy>p:not(.eyebrow){color:#6e685e;max-width:510px}.hero-actions{display:flex;gap:12px;margin-top:24px}.button{border:0;border-radius:999px;padding:11px 22px;font-weight:800;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;min-height:46px}.primary{background:var(--green);color:#fff;box-shadow:0 7px 18px #4f927a33}.primary:hover{background:#3e7e68}.secondary{background:#fff;border:1px solid var(--line);color:var(--ink)}.hero-note{font-size:12px;color:#8a8174;margin-top:18px}.hero-art{height:300px;position:relative;display:grid;place-items:center}
.trust-strip{display:flex;justify-content:center;gap:clamp(18px,5vw,70px);padding:18px 12px;border-bottom:1px solid var(--line);font-size:14px;font-weight:700;color:#6c665d}.section{padding:68px max(7vw,22px)}.section-heading{display:flex;justify-content:space-between;align-items:end;gap:24px;margin-bottom:26px}.section h2{font-size:clamp(27px,3vw,36px);line-height:1.3;margin:4px 0 8px}.section-heading p:not(.eyebrow),.split-section p{color:var(--muted);margin:0}.filters{display:flex;gap:10px}.filters label{font-size:12px;font-weight:700;color:var(--muted)}select{background:white;border:1px solid var(--line);border-radius:10px;padding:8px 12px;color:var(--ink)}.game-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:17px}.game-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;box-shadow:0 6px 20px #51402a08;transition:.2s;display:flex;flex-direction:column;min-height:210px}.game-card:hover{transform:translateY(-4px);box-shadow:var(--shadow)}.game-icon{width:52px;height:52px;border-radius:15px;display:grid;place-items:center;font-size:28px;background:#f8f0df;margin-bottom:12px}.game-card h3{font-size:16px;margin:0 0 6px}.game-card p{font-size:12px;color:var(--muted);margin:0 0 14px;flex:1}.card-meta{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#8a8174}.card-play{border:0;background:#edf5ef;color:#477b68;border-radius:9px;padding:7px 12px;font-weight:800;cursor:pointer}
.split-section{background:#f8f5ec;display:grid;grid-template-columns:1.1fr .9fr;align-items:center;gap:35px}.feature-list{padding-left:20px;color:#6f695f}.parent-section{text-align:center}.parent-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-top:25px;text-align:left}.parent-cards article{background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px}.parent-cards p{color:var(--muted);font-size:13px;margin-bottom:0}.site-footer{background:#484b40;color:#fff;padding:35px max(7vw,22px);display:grid;grid-template-columns:1fr 1fr;gap:14px}.footer-brand p{font-size:12px;color:#d6d8ce;margin:0}.footer-links{display:flex;gap:18px;justify-content:end;align-items:center;font-size:12px}.site-footer>small{grid-column:1/-1;color:#d6d8ce;font-size:10px}
.modal{display:none;position:fixed;inset:0;background:#29251f99;z-index:30;padding:20px;overflow:auto;align-items:center;justify-content:center}.modal.open{display:flex}.modal-panel{position:relative;width:min(820px,100%);max-height:92vh;overflow:auto;background:#fffdf8;border-radius:22px;padding:28px;box-shadow:0 20px 80px #0003}.modal-close{position:absolute;right:18px;top:14px;border:0;background:#f3eee5;border-radius:50%;width:38px;height:38px;font-size:24px;cursor:pointer}.modal-top{display:flex;justify-content:space-between;gap:20px;padding-right:35px}.modal-top h2{margin:0;font-size:25px}.modal-top p:last-child{color:var(--muted);font-size:13px;margin:5px 0}.level-control{display:flex;align-items:center;gap:8px;font-size:12px;white-space:nowrap}.game-stage{background:#f7f4ec;border-radius:16px;padding:22px;margin-top:18px;min-height:240px}.game-stage h3{margin-top:0}.game-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;font-size:13px}.play-options{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.play-option{min-height:78px;border:2px solid #e6ddce;background:white;border-radius:14px;font-size:25px;font-weight:800;cursor:pointer;padding:12px}.play-option:hover{border-color:var(--green)}.play-option:focus-visible,button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #e6a75f;outline-offset:3px}.progress{font-weight:800;color:var(--green);margin-bottom:12px}.feedback-good{color:#347b5f;font-weight:800}.feedback-bad{color:#b56b40;font-weight:800}.note-keys{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}.note-key{height:100px;border:0;border-radius:10px;color:white;font-weight:900;cursor:pointer}.draw-pad{width:100%;height:190px;background:white;border:1px solid #ddd;border-radius:12px;touch-action:none}
@media(max-width:900px){.game-grid{grid-template-columns:repeat(2,1fr)}.hero{padding-top:45px}.hero-art{transform:scale(.85)}}
@media(max-width:620px){.site-header{height:65px}nav{gap:12px;font-size:11px}.brand b{font-size:16px}.hero{grid-template-columns:1fr;padding:45px 24px 20px}.hero-art{height:210px;transform:scale(.78);transform-origin:center top;margin-bottom:-25px}.hero h1{font-size:42px}.trust-strip{flex-wrap:wrap;gap:10px 22px;font-size:12px}.section{padding:48px 20px}.section-heading{display:block}.filters{margin-top:18px}.filters label{flex:1}.filters select{width:100%;margin-top:5px}.game-grid{gap:10px}.game-card{padding:13px;min-height:200px}.game-card h3{font-size:14px}.split-section{grid-template-columns:1fr}.parent-cards{grid-template-columns:1fr}.site-footer{grid-template-columns:1fr}.footer-links{justify-content:start;flex-wrap:wrap}.site-footer>small{grid-column:auto}.modal{padding:8px}.modal-panel{padding:22px 16px;border-radius:16px}.modal-top{display:block}.level-control{margin-top:10px}.play-options{grid-template-columns:repeat(2,1fr)}.note-keys{grid-template-columns:repeat(4,1fr)}.game-footer{align-items:flex-start;flex-direction:column}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

.level-complete{margin-top:18px;padding:16px;background:#eaf3ec;border:1px solid #cfe2d3;border-radius:14px}.level-complete p{margin:0 0 10px}.level-complete strong{color:#347b5f}.play-option:disabled,.note-key:disabled{opacity:.48;cursor:not-allowed}

/* Acorn Pace brand system */
.brand{display:flex;align-items:center;min-width:0;flex:0 1 auto}
.brand-logo-picture{display:block;line-height:0;width:74px;height:66px}.brand-logo{display:block;object-fit:contain;width:74px;height:66px}
.hero-art{height:auto;min-height:300px;display:flex;align-items:center;justify-content:center;position:relative}
.hero-art img{display:block;width:min(100%,520px);height:auto;object-fit:contain;filter:drop-shadow(0 12px 18px rgba(81,64,42,.10))}
@media(max-width:620px){.site-header{padding-left:16px;padding-right:16px}.brand-logo-picture{width:62px;height:62px}.brand-logo{width:62px;height:62px}.hero-art{min-height:0;height:auto;margin:12px auto 0;transform:none}.hero-art img{width:min(78vw,300px);max-height:300px}.brand{gap:0}}

.game-progress{font-size:10px;color:#4f927a;font-weight:800;background:#edf5ef;padding:3px 7px;border-radius:999px;white-space:nowrap}
.card-meta{gap:7px;flex-wrap:wrap}


/* Acorn Pace child-first interaction polish */
:root{
 --ink:#33443d;--muted:#65756d;--paper:#fffdf7;--cream:#fff5df;
 --green:#3f8b68;--orange:#e9894f;--yellow:#f4c85f;
 --line:#e8e3d6;--shadow:0 12px 30px rgba(51,68,61,.10);
}
body{background:linear-gradient(180deg,#fffdf7 0%,#f8fbf3 55%,#fffaf0 100%);color:var(--ink)}
button,select{touch-action:manipulation}
button{ -webkit-tap-highlight-color:transparent}
.game-card{border:1px solid #e9e6d9;border-radius:22px;background:linear-gradient(150deg,#fff 0%,#fffaf0 100%);box-shadow:0 8px 22px rgba(65,84,66,.07);transition:transform .18s ease,box-shadow .18s ease}
.game-card:hover{transform:translateY(-3px);box-shadow:0 14px 28px rgba(65,84,66,.12)}
.game-icon{display:grid;place-items:center;width:64px;height:64px;border-radius:20px;background:#f1f6e9;font-size:36px}
.game-card h3{font-size:19px;line-height:1.45}
.game-card p{font-size:15px;line-height:1.65}
.card-play,.button{min-height:48px;border-radius:15px;font-weight:800}
.card-play{padding:10px 17px;background:#eaf4e9;color:#28674d;border:1px solid #d5e7d4}
.modal-panel{border:1px solid #eee5d8;box-shadow:0 24px 80px rgba(37,54,44,.24)}
.modal-top h2{font-size:clamp(22px,3vw,30px);line-height:1.35}
.game-stage{background:linear-gradient(145deg,#f7faef,#fff8e9);border:1px solid #e8eadc;border-radius:22px;padding:clamp(16px,3vw,26px);font-size:17px;line-height:1.7}
.game-stage>p:first-of-type{font-size:17px;font-weight:650;color:#43574d}
.play-options{gap:12px}
.play-option{min-height:76px;border:2px solid #e4e7d9;background:#fff;border-radius:18px;color:#34483d;font-size:clamp(18px,2.3vw,25px);box-shadow:0 3px 0 rgba(61,92,69,.06);transition:transform .12s ease,border-color .12s ease,background .12s ease}
.play-option:hover{border-color:#8ab99a;background:#fbfff8;transform:translateY(-1px)}
.play-option:active,.button:active,.card-play:active{transform:scale(.98)}
.play-option[aria-pressed="true"]{border-color:#4c9870;background:#edf7eb}
.play-option:disabled{opacity:.48;filter:grayscale(.15);transform:none}
.note-keys{gap:8px}
.note-key{min-height:82px;border-radius:15px;font-size:18px;box-shadow:0 4px 0 rgba(0,0,0,.08)}
.progress{font-size:15px}
.feedback-good,.feedback-bad{display:block;padding:9px 12px;border-radius:12px;background:#edf7eb}
.feedback-bad{background:#fff0e7}
.level-complete{border-radius:18px;padding:18px;background:#eaf6e9;border:2px solid #cce4cb}
.level-complete .button{min-width:180px}
.draw-pad{height:clamp(180px,34vw,250px);border:2px dashed #d7dfd0;background-color:#fff;border-radius:18px;touch-action:none}
button:disabled{cursor:not-allowed}
@media(max-width:620px){
 .game-card{border-radius:18px}
 .game-icon{width:56px;height:56px;font-size:31px}
 .game-card h3{font-size:16px}
 .game-card p{font-size:14px}
 .modal-panel{max-height:96vh;padding:20px 14px}
 .game-stage{padding:15px 12px;border-radius:17px}
 .play-options{gap:9px}
 .play-option{min-height:68px;padding:10px 8px;border-radius:15px;font-size:18px}
 .note-keys{grid-template-columns:repeat(4,minmax(0,1fr))}
 .note-key{min-height:65px}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}


/* v4.6 visual refresh: playful, legible and consistent game-room styling */
:root{
 --play-ink:#34483d;--play-muted:#68796e;--play-green:#4c9870;
 --play-coral:#f18a69;--play-gold:#f3c75c;--play-blue:#77b8cf;
}
.site-header{box-shadow:0 3px 18px rgba(56,76,59,.045)}
nav a{padding:8px 12px;border-radius:999px;transition:background .18s,color .18s}
nav a:hover{background:#edf6ec}
.hero{position:relative}
.hero:after{content:"";position:absolute;width:260px;height:260px;border-radius:50%;right:-80px;top:-100px;background:rgba(255,255,255,.26);pointer-events:none}
.hero-copy{position:relative;z-index:1}
.hero h1{letter-spacing:-1.5px}
.hero h1 em{background:linear-gradient(transparent 68%,#ffe0a8 68%);color:#c86e42}
.game-grid{gap:20px}
.game-card{position:relative;overflow:hidden;padding:20px;min-height:238px;border:1px solid #e9e8d9}
.game-card:before{content:"";position:absolute;inset:0 0 auto;height:6px;background:linear-gradient(90deg,#83b98b,#f3c75c,#f19a77)}
.game-card:nth-child(4n+2):before{background:linear-gradient(90deg,#85bdd0,#8d9ed0)}
.game-card:nth-child(4n+3):before{background:linear-gradient(90deg,#e99a78,#efc66d)}
.game-card:nth-child(4n+4):before{background:linear-gradient(90deg,#a99bd0,#83b99b)}
.game-icon{position:relative;isolation:isolate;box-shadow:inset 0 -4px 0 rgba(63,87,62,.045);transition:transform .2s}
.game-card:nth-child(4n+2) .game-icon{background:#eaf5fa}
.game-card:nth-child(4n+3) .game-icon{background:#fff0e6}
.game-card:nth-child(4n+4) .game-icon{background:#f1edfb}
.game-card:hover .game-icon{transform:rotate(-5deg) scale(1.06)}
.game-card h3{margin-top:2px;color:#34483d}
.game-card h3 a:hover{color:#3f8b68}
.game-card p{color:#6c796f}
.card-meta{margin-top:12px}
.game-progress{background:#f0f5e9;color:#477b5c;padding:5px 9px}
.card-play{border-radius:999px;box-shadow:0 3px 0 #d4e5d0}
.card-play:hover{background:#dceedd;transform:translateY(-1px)}
.modal{backdrop-filter:blur(5px);background:rgba(34,47,39,.62)}
.modal-panel{width:min(900px,100%);border-radius:28px;padding:30px;background:linear-gradient(155deg,#fffefa,#fffaf0);border:1px solid rgba(255,255,255,.85)}
.modal-top{align-items:center;padding:2px 48px 16px 2px;border-bottom:1px solid #eee8db}
.modal-top h2{font-weight:900;color:#34483d}
#modal-category{display:inline-flex;padding:5px 11px;border-radius:999px;background:#edf5e9;color:#4d8060;font-size:12px;font-weight:800}
.game-stage{position:relative;isolation:isolate;overflow:hidden;min-height:300px;margin-top:18px;padding:clamp(20px,3vw,30px);border:1px solid #e5eadc;border-radius:24px;background:linear-gradient(145deg,#f4f9ec 0%,#fff8e9 100%);box-shadow:inset 0 1px 0 #fff}
.game-stage:before,.game-stage:after{content:"";position:absolute;z-index:-1;border-radius:50%;pointer-events:none}
.game-stage:before{width:150px;height:150px;right:-65px;top:-70px;background:rgba(244,201,95,.15)}
.game-stage:after{width:110px;height:110px;left:-55px;bottom:-65px;background:rgba(119,184,207,.12)}
.game-stage>p:first-of-type{max-width:760px;margin:4px 0 20px;font-size:17px;line-height:1.75;color:#465b4e}
.game-stage h3{color:#3d5848}
.game-progress-panel{position:relative;margin:0 0 18px;padding:11px 14px 12px;border-radius:15px;background:rgba(255,255,255,.78);border:1px solid #e5eadc;box-shadow:0 3px 10px rgba(58,78,58,.035)}
.game-progress-label{display:flex;justify-content:space-between;align-items:center;color:#557360;font-size:13px;font-weight:800;margin-bottom:7px}
.game-progress-label strong{color:#34483d;font-variant-numeric:tabular-nums}
.game-progress-track{height:9px;border-radius:999px;background:#e8eddf;overflow:hidden}
.game-progress-track span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#80bd85,#f0c45b);transition:width .25s ease}
.play-options{position:relative;z-index:1;gap:13px}
.play-option{min-height:82px;border-radius:20px;border:2px solid #e4e9dc;background:linear-gradient(180deg,#fff,#fffdf8);box-shadow:0 4px 0 rgba(73,103,76,.07),0 6px 16px rgba(73,103,76,.035);color:#354b3e}
.play-option:hover{border-color:#91bd95;background:#fafff7;box-shadow:0 5px 0 rgba(73,103,76,.07),0 9px 18px rgba(73,103,76,.08)}
.play-option[aria-pressed="true"]{border-color:#4c9870;background:#eaf6e9;box-shadow:0 0 0 3px rgba(76,152,112,.12)}
.play-option:disabled{box-shadow:none}
.button{border-radius:999px;padding:12px 22px}
.button.primary{background:linear-gradient(135deg,#4f9a70,#3d805f);box-shadow:0 4px 0 #2f6d50,0 8px 16px rgba(63,139,104,.16)}
.button.primary:hover{background:linear-gradient(135deg,#438b63,#347452);transform:translateY(-1px)}
.button.secondary{border:1px solid #e4e6d8;background:#fff;color:#53665a;box-shadow:0 3px 0 #e9e9df}
.feedback-good,.feedback-bad{margin-top:12px;padding:11px 14px;border-radius:14px;border:1px solid #d8e9d5}
.feedback-bad{border-color:#f1d8c9}
.level-complete{position:relative;overflow:hidden;margin-top:20px;padding:22px;border-radius:22px;background:linear-gradient(120deg,#e9f6e9,#fff4d9);border:2px solid #cfe6cd;box-shadow:0 8px 24px rgba(76,126,82,.08)}
.level-complete:after{content:"✦  ✧  ✦";position:absolute;right:18px;top:8px;color:#e1b84f;font-size:25px;letter-spacing:8px;opacity:.8}
.level-complete strong{font-size:18px}
.level-complete .button{position:relative;z-index:1}
#memory-grid .play-option{background:linear-gradient(145deg,#fff,#f3f8ec);font-size:32px}
#memory-grid .play-option[aria-pressed="true"]{background:#fff4d9;border-color:#e9c66b}
#bingo-count,#memory-stats,#routine-progress{display:inline-flex;align-items:center;gap:8px;padding:7px 12px;border-radius:999px;background:#fff;border:1px solid #e8eadf}
.draw-pad{box-shadow:inset 0 0 0 5px #f8faf4,0 5px 15px rgba(58,78,58,.05)}
.note-keys{padding:12px;border-radius:18px;background:linear-gradient(180deg,#edf3e9,#fff);border:1px solid #e2e8dc}
.note-key{box-shadow:0 5px 0 rgba(53,76,59,.13);transition:transform .12s,filter .12s}
.note-key:active{transform:translateY(3px);box-shadow:0 2px 0 rgba(53,76,59,.13)}
@media(max-width:620px){
 .game-grid{gap:12px}
 .game-card{min-height:224px;padding:15px 13px}
 .game-card:before{height:5px}
 .modal-panel{border-radius:22px;padding:19px 13px}
 .modal-top{padding-right:38px;padding-bottom:12px}
 .game-stage{min-height:260px;padding:17px 12px;border-radius:19px}
 .game-stage>p:first-of-type{font-size:15px;margin-bottom:15px}
 .game-progress-panel{padding:9px 11px}
 .play-options{gap:9px}
 .play-option{min-height:70px;border-radius:16px;padding:9px 7px;font-size:18px}
 .level-complete{padding:18px 14px}
}
@media(prefers-reduced-motion:reduce){
 .game-card,.game-icon,.play-option,.button,.card-play,.game-progress-track span{transition:none!important}
}


/* v4.7: distinct visual identity for each learning-game family */
#game-modal[data-game="color-notes"]{--scene-a:#fff4d7;--scene-b:#eaf6ff;--scene-accent:#d99b39}
#game-modal[data-game="rhythm-hopscotch"]{--scene-a:#fff0e8;--scene-b:#f4eaff;--scene-accent:#d98265}
#game-modal[data-game="ear-training"]{--scene-a:#eaf6ff;--scene-b:#f1edff;--scene-accent:#729acb}
#game-modal[data-game="music-memory"]{--scene-a:#fff1f5;--scene-b:#f0efff;--scene-accent:#bd82ae}
#game-modal[data-game="note-match"]{--scene-a:#fff7df;--scene-b:#eaf7ee;--scene-accent:#8ba85a}
#game-modal[data-game="drum-paint"]{--scene-a:#fff0e7;--scene-b:#fff8d9;--scene-accent:#df8a63}
#game-modal[data-game="music-bingo"]{--scene-a:#eaf8f5;--scene-b:#eef2ff;--scene-accent:#68a99a}
#game-modal[data-game="action-dice"]{--scene-a:#f1edff;--scene-b:#fff0e7;--scene-accent:#9a86c8}
#game-modal[data-game="zhuyin-tone"]{--scene-a:#eaf6ff;--scene-b:#fff4df;--scene-accent:#6b9dc1}
#game-modal[data-game="writing-book"]{--scene-a:#fff8e8;--scene-b:#edf6e9;--scene-accent:#a68d67}
#game-modal[data-game="count-notes"]{--scene-a:#fff5dc;--scene-b:#eaf6e8;--scene-accent:#c49a4e}
#game-modal[data-game="number-math"]{--scene-a:#eaf6ff;--scene-b:#fff4df;--scene-accent:#679bc0}
#game-modal[data-game="acorn-routine"]{--scene-a:#eff7e9;--scene-b:#fff4e2;--scene-accent:#79a46d}
#game-modal[data-game="emotion-theatre"]{--scene-a:#fff0f3;--scene-b:#f0edff;--scene-accent:#c48aa5}
#game-modal[data-game="bilingual-words"]{--scene-a:#eaf7f4;--scene-b:#fff5df;--scene-accent:#65a59a}
#game-modal[data-game="maker-lab"]{--scene-a:#edf4ff;--scene-b:#f4efff;--scene-accent:#8196c8}
#game-modal[data-game="pattern-play"]{--scene-a:#f4efff;--scene-b:#eaf6ff;--scene-accent:#9b83c4}
#game-modal[data-game="squirrel-maze"]{--scene-a:#edf7e8;--scene-b:#fff4dc;--scene-accent:#75a36c}
#game-modal[data-game="sorting-station"]{--scene-a:#fff5e7;--scene-b:#edf7f2;--scene-accent:#c18d5d}
#game-modal[data-game="spot-difference"]{--scene-a:#edf5ff;--scene-b:#fff4e8;--scene-accent:#7299c5}
#game-modal .game-stage{background:linear-gradient(135deg,var(--scene-a,#f4f9ec),var(--scene-b,#fff8e9));border-color:color-mix(in srgb,var(--scene-accent,#80a77b) 28%,white)}
#game-modal .game-stage:before{background:color-mix(in srgb,var(--scene-accent,#80a77b) 18%,transparent)}
#game-modal .game-progress-track span{background:linear-gradient(90deg,var(--scene-accent,#80a77b),#f0c45b)}
#game-modal .play-option:focus-visible,#game-modal .maze-control:focus-visible{outline:4px solid color-mix(in srgb,var(--scene-accent,#80a77b) 45%,white);outline-offset:3px}
#game-modal .play-option{transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease}
#game-modal .play-option:not(:disabled):active{transform:translateY(2px) scale(.985)}
#game-modal .maze-board{display:grid;grid-template-columns:repeat(var(--maze-size,11),minmax(0,1fr));gap:3px;width:min(100%,min(100%,520px));margin:16px auto;padding:10px;border:5px solid #a9c995;border-radius:22px;background:#dcebd1;box-shadow:0 8px 0 #c6dcb8,0 14px 24px rgba(67,104,64,.12)}
#game-modal .maze-cell{display:grid;place-items:center;aspect-ratio:1;min-width:0;border-radius:6px;font-size:clamp(8px,2.1vw,18px);font-weight:800}
#game-modal .maze-path{background:linear-gradient(145deg,#fffdf2,#f5efd9);color:#c6b995;box-shadow:inset 0 -3px 0 #eee4ca}
#game-modal .maze-wall{background:linear-gradient(145deg,#b4c99f,#8eae7f);box-shadow:inset 0 -4px 0 #789b69;color:#58764f}
#game-modal .maze-goal{background:linear-gradient(145deg,#ffe89b,#f6c95f);box-shadow:inset 0 -4px 0 #e4ae43}
#game-modal .maze-player{background:linear-gradient(145deg,#fff,#e4f6d9);box-shadow:inset 0 0 0 3px #75a96b,0 3px 8px #709a5b55;animation:maze-bob 1.2s ease-in-out infinite alternate}
@keyframes maze-bob{from{transform:translateY(0)}to{transform:translateY(-2px)}}

#game-modal .maze-mission{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;margin:12px auto;padding:12px 15px;border:1px solid #d8e7c9;border-radius:16px;background:linear-gradient(135deg,#f8ffef,#fff9e8);color:#49633f}
#game-modal .maze-mission strong{font-size:15px}
#game-modal .maze-mission span{font-size:13px;color:#65765b}
#game-modal .maze-board{max-width:min(100%,520px);aspect-ratio:1;touch-action:none}
#game-modal .maze-cell{border-radius:4px}
#game-modal .maze-wall{background:linear-gradient(145deg,#a9c58e,#779b68);box-shadow:inset 0 -2px 0 #6e8d60}
#game-modal .maze-goal{background:linear-gradient(145deg,#ffe89b,#f6c95f)}
#game-modal .maze-path{background:linear-gradient(145deg,#fffdf2,#f5efd9)}
#game-modal .maze-controls{display:grid;grid-template-columns:repeat(3,64px);justify-content:center;gap:8px;margin:16px auto}
#game-modal .maze-control{min-height:58px;border:2px solid #d2e3c8;border-radius:17px;background:linear-gradient(145deg,#fff,#edf6e7);box-shadow:0 4px 0 #cbdcc1;font-size:24px;touch-action:manipulation}
#game-modal .maze-control:active{transform:translateY(3px);box-shadow:0 1px 0 #cbdcc1}
#game-modal[data-game="color-notes"] .note-keys{background:linear-gradient(180deg,#e9f2ff,#fff9e8);border:2px solid #e3e7db;box-shadow:0 8px 18px #5c779018}
#game-modal[data-game="writing-book"] .draw-pad{border:2px solid #d9c9a9;border-radius:14px;background-color:#fffdf5;background-image:linear-gradient(90deg,transparent 49.7%,#e9b9ae 50%,transparent 50.3%),linear-gradient(transparent 49.7%,#e9b9ae 50%,transparent 50.3%)}
#game-modal[data-game="music-memory"] #memory-grid .play-option{min-height:82px;font-size:clamp(24px,5vw,36px);background:linear-gradient(145deg,#fff,#f8efff)}
#game-modal[data-game="music-bingo"] [data-bingo]{min-height:78px;border-radius:17px}
#game-modal[data-game="spot-difference"] [data-diff]{min-height:76px;background:linear-gradient(145deg,#fff,#edf4ff)}
#game-modal[data-game="sorting-station"] [data-sort]{min-height:82px;background:linear-gradient(145deg,#fff,#fff4e6)}
#game-modal[data-game="pattern-play"] [data-pattern]{min-width:70px;min-height:72px;font-size:27px}
#game-modal[data-game="emotion-theatre"] [data-feel],#game-modal[data-game="emotion-theatre"] [data-support]{min-height:65px}
@media(max-width:620px){
 #game-modal .maze-board{gap:4px;padding:7px;border-width:4px}
 #game-modal .maze-cell{border-radius:8px}
 #game-modal .maze-controls{grid-template-columns:repeat(3,58px);gap:7px}
 #game-modal .maze-control{min-height:54px}
}
@media(prefers-reduced-motion:reduce){#game-modal .maze-player{animation:none}}

/* v4.8 — dedicated learning-scene components */
.music-stage{margin:18px auto 14px;padding:14px 14px 18px;max-width:680px;border:1px solid #d9e5f0;border-radius:22px;background:linear-gradient(180deg,#f4f9ff,#fff 68%);box-shadow:0 8px 22px #36516a12}
.music-staff{height:48px;display:flex;align-items:center;justify-content:space-around;color:#91a9c4;font-family:Georgia,serif;font-size:30px;opacity:.8}
.note-keys{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;align-items:stretch;margin:0 auto;max-width:620px}
.note-key{min-height:116px!important;border:1px solid #d5dce6!important;border-bottom:7px solid #c6ced9!important;border-radius:0 0 12px 12px!important;background:linear-gradient(180deg,#fff 0%,#f8fafc 76%,#edf1f6 100%)!important;color:#34465a!important;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:7px;padding:10px 3px!important;box-shadow:0 4px 0 #dce3eb,0 8px 14px #26394d12!important;transition:transform .12s,box-shadow .12s}
.note-key:before{content:"";width:24px;height:24px;border-radius:50%;background:var(--note-color);box-shadow:inset 0 -3px 0 #0002,0 2px 5px #0002}
.note-key .key-note{font-weight:800;font-size:clamp(11px,2vw,15px)}
.note-key .key-degree{font-size:11px;color:#8290a0}
.note-key:active:not(:disabled){transform:translateY(4px);border-bottom-width:3px!important;box-shadow:0 1px 0 #dce3eb!important}
.note-key:disabled{opacity:.58}
.rhythm-sequence{display:flex;justify-content:center;align-items:stretch;gap:8px;flex-wrap:wrap;margin:16px auto;padding:14px;border-radius:18px;background:linear-gradient(135deg,#f2f7ff,#f8f3ff);border:1px solid #e0e5f2}
.rhythm-beat{position:relative;display:flex;min-width:64px;flex:1 1 64px;max-width:112px;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:12px 5px 10px;border-radius:14px;background:#fff;border:1px solid #dce4f0;box-shadow:0 3px 0 #dfe5ef}
.beat-number{align-self:flex-start;font-size:10px;color:#8a99aa;font-weight:800}
.beat-icon{font-size:29px;line-height:1.25}
.beat-label{font-size:12px;color:#53657a;font-weight:700}
.count-tray{display:flex;justify-content:center;align-items:center;gap:5px 9px;flex-wrap:wrap;max-width:620px;margin:14px auto;padding:18px 12px;min-height:88px;border-radius:20px;background:linear-gradient(180deg,#fff9e9,#fff);border:2px dashed #e9d8a8;box-shadow:inset 0 -5px 0 #f7edcf}
.count-acorn{display:inline-flex;align-items:center;justify-content:center;font-size:clamp(25px,5vw,38px);filter:drop-shadow(0 3px 2px #78542a25);animation:acorn-pop .24s ease both;animation-delay:calc(var(--acorn-i,0)*18ms)}
@keyframes acorn-pop{from{transform:translateY(5px) scale(.75);opacity:.3}to{transform:translateY(0) scale(1);opacity:1}}
.count-groups{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:12px auto}
.count-group{min-width:130px;padding:12px;border-radius:17px;background:#fff;border:1px solid #e6dfcf;box-shadow:0 4px 12px #5b49200d;text-align:center}
.count-group-title{display:block;font-size:13px;font-weight:800;color:#6b7786}
.count-group strong{display:block;margin-top:5px;font-size:23px;color:#526b50}
.count-tray.compact{min-height:60px;padding:8px 5px;gap:2px 4px;border:0;background:#fff;box-shadow:none}
.count-tray.compact .count-acorn{font-size:24px}
.count-plus{font-size:27px;font-weight:900;color:#9b8b6b}
.equation-board{display:flex;justify-content:center;align-items:center;gap:clamp(8px,3vw,22px);flex-wrap:wrap;margin:14px auto;padding:18px 12px;max-width:620px;border-radius:20px;border:1px solid #e5e1d7;background:linear-gradient(135deg,#fffdf5,#f4f8ff);box-shadow:0 7px 18px #5d553012}
.math-counter-group{min-width:100px;display:flex;flex-direction:column;align-items:center;gap:8px}
.math-counter-label{font-size:12px;color:#778394;font-weight:700}
.math-counters{display:flex;justify-content:center;flex-wrap:wrap;gap:5px;max-width:150px;min-height:30px}
.math-counter{width:18px;height:18px;border-radius:50%;display:inline-block;box-shadow:inset 0 -3px 0 #0002,0 2px 3px #0002}
.math-counter.orange{background:radial-gradient(circle at 32% 28%,#ffe2a8,#f49b45 65%,#d77a2d)}
.math-counter.yellow{background:radial-gradient(circle at 32% 28%,#fff8b5,#edce48 65%,#c9a82b)}
.math-counter-group strong{font-size:20px;color:#52657a}
.equation-symbol{font-size:clamp(25px,5vw,38px);font-weight:900;color:#8c91a0}
.equation-question{margin:10px 0 18px;text-align:center;font-size:clamp(27px,5vw,36px);color:#35475b}
.equation-question span,.equation-question-mark{display:inline-flex;min-width:42px;min-height:42px;align-items:center;justify-content:center;border:2px dashed #d6a34b;border-radius:12px;background:#fff7df;color:#b77724}
.compact-equation{gap:clamp(6px,2vw,18px);padding:22px 10px}
.equation-number,.equation-question-mark{font-size:clamp(26px,5vw,38px);font-weight:900;min-width:48px;min-height:48px;display:inline-flex;align-items:center;justify-content:center;border-radius:14px;background:#fff;box-shadow:0 3px 0 #e7e8ed;border:1px solid #e1e5ec;color:#425b77}
.equation-question-mark{border:2px dashed #d6a34b;background:#fff7df;color:#b77724;box-shadow:none}
@media(max-width:520px){.music-stage{padding:10px 7px 14px}.note-keys{gap:3px}.note-key{min-height:94px!important;padding:7px 1px!important}.note-key:before{width:18px;height:18px}.rhythm-sequence{gap:5px;padding:9px}.rhythm-beat{min-width:54px;padding:9px 3px}.count-group{min-width:112px;padding:9px}.count-tray{gap:3px 5px;padding:12px 7px}.math-counter-group{min-width:76px}.math-counters{max-width:105px}.math-counter{width:14px;height:14px}}
@media(prefers-reduced-motion:reduce){.count-acorn{animation:none}}


/* v4.9 — Chinese writing, bilingual vocabulary and STEAM scenes */
.trace-practice-board{position:relative;isolation:isolate;max-width:700px;margin:14px auto;border:2px solid #d9c7ae;border-radius:18px;overflow:hidden;background:#fffdf7;box-shadow:0 8px 22px #755d3915}
.trace-grid-lines{position:absolute;inset:0;z-index:-1;background-image:linear-gradient(to right,transparent calc(50% - .7px),#d7c4aa calc(50% - .7px),#d7c4aa calc(50% + .7px),transparent calc(50% + .7px)),linear-gradient(to bottom,transparent calc(50% - .7px),#d7c4aa calc(50% - .7px),#d7c4aa calc(50% + .7px),transparent calc(50% + .7px)),linear-gradient(45deg,transparent calc(50% - .6px),#e6d8c7 calc(50% - .6px),#e6d8c7 calc(50% + .6px),transparent calc(50% + .6px)),linear-gradient(-45deg,transparent calc(50% - .6px),#e6d8c7 calc(50% - .6px),#e6d8c7 calc(50% + .6px),transparent calc(50% + .6px));opacity:.8}
.trace-character{position:absolute;inset:0;display:grid;place-items:center;font-size:clamp(150px,26vw,190px);font-weight:700;line-height:1;color:#d8c9b7;opacity:.62;pointer-events:none}
.trace-practice-board canvas{display:block;width:100%;height:auto;aspect-ratio:2.5/1;touch-action:none}
.vocab-card{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;max-width:420px;min-height:180px;margin:12px auto;padding:20px;border:1px solid #dce8df;border-radius:22px;background:linear-gradient(145deg,#f5fff7,#fff 65%);box-shadow:0 8px 22px #375c4412;text-align:center}
.vocab-picture{font-size:clamp(54px,12vw,76px);line-height:1.25;filter:drop-shadow(0 3px 2px #00000010)}
.vocab-chinese{font-size:16px;font-weight:700;color:#5c6e64}
.vocab-category{padding:4px 12px;border-radius:999px;background:#e8f4eb;color:#47735b;font-size:12px;font-weight:800}
.vocab-english{background:linear-gradient(145deg,#f3f7ff,#fff 65%);border-color:#dce4f4}
.vocab-english .vocab-category{background:#e9eefb;color:#526b9c}
.vocab-word{font-size:clamp(30px,7vw,42px);font-weight:900;letter-spacing:.02em;color:#3f5e83}
.steam-observation{max-width:520px;margin:12px auto;padding:18px;border-radius:20px;border:1px solid #dce7ed;background:linear-gradient(145deg,#f2fbff,#fff 72%);text-align:center;box-shadow:0 8px 20px #31556b10}
.steam-observation-icon{font-size:clamp(22px,5vw,28px);font-weight:800;color:#3e7387}
.steam-observation-label{margin-top:10px;font-size:12px;letter-spacing:.12em;font-weight:900;color:#5a8a9b}
.steam-observation-hint{margin-top:4px;font-size:14px;color:#6d7f88}
@media(max-width:520px){.trace-practice-board{border-radius:12px}.trace-character{font-size:150px}.vocab-card{min-height:150px;padding:15px}.steam-observation{padding:14px}}


/* v5.0 — clearer, reversible selection interaction for sorting */
.sort-target{margin:12px auto;padding:9px 14px;max-width:360px;border-radius:14px;background:#fff7e7;border:1px solid #f0dfb9;text-align:center;color:#79643e}
.sort-target strong{margin-left:5px;color:#9b6a25;font-size:18px}
.sort-options{gap:12px}
.sort-choice{position:relative;min-height:88px;display:flex;align-items:center;justify-content:center;gap:5px;transition:transform .14s,border-color .14s,background .14s}
.sort-choice .sort-checkmark{position:absolute;right:7px;top:5px;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#fff;font-size:13px;opacity:0;transform:scale(.7);transition:opacity .14s,transform .14s}
.sort-choice.is-selected{border:2px solid #4b9b70!important;background:linear-gradient(145deg,#eaf8ef,#fff)!important;box-shadow:0 4px 0 #c6e6d2!important;transform:translateY(-2px)}
.sort-choice.is-selected .sort-checkmark{opacity:1;transform:scale(1);background:#4b9b70}
@media(max-width:520px){.sort-options{gap:7px}.sort-choice{min-height:72px;padding:8px 3px!important}}


/* v5.1 — shape detective: high-contrast visual geometry cards */
#game-modal[data-game="shape-detective"] .shape-target{display:flex;flex-direction:column;align-items:center;gap:5px;max-width:260px;margin:14px auto 18px;padding:15px 20px;border:2px solid #e6d8bb;border-radius:22px;background:linear-gradient(145deg,#fff9e9,#fff);box-shadow:0 6px 16px #765b2412}
.shape-target-label{font-size:12px;font-weight:800;letter-spacing:.08em;color:#8c7958}
.shape-target strong{font-size:19px;color:#4f5d70}
.shape-art{width:clamp(76px,18vw,112px);height:auto;overflow:visible}
.shape-art circle,.shape-art rect,.shape-art polygon{fill:var(--shape-color);stroke:#34495e;stroke-width:3.5;stroke-linejoin:round}
.shape-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:600px;margin:0 auto}
.shape-choice{min-width:0;min-height:142px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:12px 5px!important;border:2px solid #e1e6ed!important;border-radius:18px!important;background:linear-gradient(160deg,#fff,#f7f9fc)!important;box-shadow:0 4px 0 #e5e9ef!important;color:#526176!important}
.shape-choice span{font-size:12px;font-weight:800;color:#748195}
.shape-choice:focus-visible{outline:3px solid #4d91ca;outline-offset:3px}
.shape-choice:disabled{opacity:.48;filter:grayscale(.35)}
.shape-hint{max-width:520px;margin:13px auto;padding:10px 14px;border-radius:13px;background:#f3f8ff;color:#536b85;text-align:center}
@media(max-width:520px){.shape-choice-grid{gap:7px}.shape-choice{min-height:112px;padding:8px 2px!important;border-radius:14px!important}.shape-choice .shape-art{width:clamp(64px,20vw,86px)}.shape-choice span{font-size:11px}}


/* v5.2 — shared question feedback and interaction states */
.question-prompt{font-size:clamp(16px,2.4vw,19px);line-height:1.65;font-weight:750;color:#42536a}
.question-options .play-option{min-height:54px;transition:transform .14s ease,border-color .14s ease,background .14s ease}
.question-options .play-option:focus-visible{outline:3px solid #4b91c7;outline-offset:3px}
.question-options .play-option.answer-wrong{border-color:#d88989!important;background:#fff0ef!important;box-shadow:inset 0 0 0 1px #d88989!important}
.question-options .play-option.answer-correct{border-color:#64a982!important;background:#eaf8ef!important;box-shadow:inset 0 0 0 1px #64a982!important}
.question-hint{min-height:42px;max-width:640px;margin:12px auto 5px;padding:10px 14px;border-radius:13px;background:#f2f7fc;color:#536b85;text-align:center;line-height:1.55}
.question-attempts{margin:4px auto 10px;text-align:center;color:#8490a0;font-size:12px}
@media(prefers-reduced-motion:reduce){.question-options .play-option{transition:none}}


/* v5.3 — memory-card clarity and touch-friendly maze navigation */
#game-modal[data-game="music-memory"] .memory-grid{display:grid;max-width:560px;margin:14px auto;gap:10px}
#game-modal[data-game="music-memory"] .memory-card{position:relative;display:grid;place-items:center;min-width:0;min-height:clamp(66px,13vw,96px);padding:6px;border:2px solid #d9c9e8;background:linear-gradient(145deg,#fff,#f5edff);border-radius:18px;font-size:clamp(27px,5vw,40px);box-shadow:0 4px 0 #e7dcef}
#game-modal[data-game="music-memory"] .memory-card-back{display:grid;place-items:center;width:100%;height:100%;min-height:48px;border-radius:12px;background:linear-gradient(145deg,#f9edff,#eee4fa);font-size:clamp(23px,4vw,32px)}
#game-modal[data-game="music-memory"] .memory-card-face{display:grid;place-items:center;min-height:48px}
#game-modal[data-game="music-memory"] .memory-card[aria-pressed="true"]{border-color:#c5a6df;background:#fff8df}
#game-modal[data-game="music-memory"] .memory-card.is-matched{border-color:#8fc5a0;background:#eaf8ed;box-shadow:0 3px 0 #cce7d2;opacity:1}
#game-modal[data-game="music-memory"] .memory-card:focus-visible{outline:3px solid #8b68b2;outline-offset:3px}
#game-modal .maze-board{touch-action:none;user-select:none;-webkit-user-select:none}
.maze-hint{max-width:420px;min-height:42px;margin:10px auto;padding:10px 13px;border-radius:13px;background:#f0f7eb;color:#55704d;text-align:center;line-height:1.5}
@media(max-width:420px){#game-modal[data-game="music-memory"] .memory-grid{gap:7px}#game-modal[data-game="music-memory"] .memory-card{min-height:64px;border-radius:13px;padding:4px}}

/* v5.4 music and math interaction polish */
.note-key.is-playing{transform:translateY(-7px);box-shadow:0 8px 0 color-mix(in srgb,var(--note-color),#000 22%),0 12px 22px #24334a30;filter:saturate(1.25)}
.note-key.is-correct{outline:4px solid #65b889;outline-offset:2px}
.note-key:disabled{opacity:.58;cursor:not-allowed;filter:saturate(.65)}
.math-counter-group{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:0}
.math-counters{display:flex;flex-wrap:wrap;justify-content:center;gap:6px;max-width:240px;min-height:26px}
.math-counter{display:inline-block;width:19px;height:19px;border-radius:50%;background:#ef9d53;border:2px solid #d77c36;box-shadow:inset 0 2px 0 #ffffff80}
.math-counter.yellow{background:#f4cf61;border-color:#d8ae35}
.math-counter.removed-counter{background:#e7e9ed;border:2px dashed #9aa3b1;opacity:.7}
@media(max-width:560px){.note-keys{gap:5px}.note-key{min-width:0;padding:12px 4px}.math-counters{gap:4px}.math-counter{width:16px;height:16px}}


/* v5.5.0 — mascot-led learning guidance and family challenge */
.mascot-guide-host{margin-top:16px}
.mascot-guide-card{display:grid;grid-template-columns:116px minmax(0,1fr);gap:16px;align-items:start;padding:15px 18px;border:1px solid #eadbb7;border-radius:20px;background:linear-gradient(115deg,#fff9e8,#f2f8ed);box-shadow:0 5px 18px rgba(73,83,49,.06)}
.mascot-guide-card>img{width:112px;height:82px;object-fit:cover;object-position:center 24%;border-radius:16px;border:2px solid #fff;box-shadow:0 3px 10px #55452a20}
.mascot-guide-copy>strong{display:block;color:#684b28;font-size:16px;line-height:1.5;margin:1px 0 5px}
.mascot-guide-copy>p{margin:0;color:#536456;font-size:14px;line-height:1.75}
.grownup-guide{margin-top:10px;border-top:1px solid #e6dfcb;padding-top:8px}
.grownup-guide summary{cursor:pointer;color:#477b60;font-weight:800;font-size:14px}
.grownup-guide>div{padding:8px 2px 0}
.grownup-guide p{margin:5px 0;color:#5c6258;font-size:13px;line-height:1.75}
.game-detail-page{max-width:980px}
.game-detail-page h1{color:#354b3d;line-height:1.3}
.game-detail-lead{font-size:19px;line-height:1.8;color:#53675a}
.game-article-section{margin:28px 0;padding:24px 26px;border:1px solid #e9e6d9;border-radius:20px;background:linear-gradient(145deg,#fff 0%,#fffaf0 100%)}
.game-article-section h2{margin:0 0 12px;font-size:23px;color:#3d5947}
.game-article-section h3{margin:14px 0 6px;color:#76572e;font-size:17px}
.game-article-section p,.game-article-section li{font-size:16px;line-height:1.9;color:#58675d}
.game-article-section ul{padding-left:1.4em}
.adult-play-section{background:linear-gradient(130deg,#f1f7f2,#fff8e9);border-color:#dce8d9}
.game-disclaimer{margin:26px 0;color:#7b8079;line-height:1.8}
@media(max-width:620px){
 .mascot-guide-card{grid-template-columns:76px minmax(0,1fr);gap:11px;padding:12px}
 .mascot-guide-card>img{width:76px;height:76px;object-position:center 20%}
 .mascot-guide-copy>strong{font-size:14px}
 .mascot-guide-copy>p,.grownup-guide p{font-size:13px}
 .game-article-section{padding:18px 16px;margin:18px 0}
 .game-article-section h2{font-size:20px}
 .game-article-section p,.game-article-section li{font-size:15px}
}

/* v5.6.0 — all-digital play, no print/worksheet UI */
.digital-play-section{padding:54px 6%;background:linear-gradient(135deg,#f2f8ed,#fff8e8);border-radius:28px;margin:34px auto}
.digital-play-section .section-heading{max-width:850px;margin:0 auto 24px;text-align:center}
.digital-play-section .section-heading h2{font-size:clamp(24px,4vw,36px);color:#3d5947}
.digital-play-section .section-heading p{font-size:16px;line-height:1.9;color:#617064}
.digital-play-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;max-width:1050px;margin:auto}
.digital-play-grid article{padding:20px;border:1px solid #e2e9d9;border-radius:18px;background:#fff}
.digital-play-grid b{font-size:17px;color:#496b51}
.digital-play-grid p{margin:8px 0 0;color:#657166;line-height:1.8}
@media(max-width:680px){.digital-play-section{padding:36px 18px;border-radius:20px}.digital-play-grid{grid-template-columns:1fr;gap:10px}}

/* v5.7.0 — interactive routine ordering and animated action dice */
.dice-game-board{display:grid;justify-items:center;gap:12px;padding:22px 14px;margin:16px 0;border:1px solid #e6ddf4;border-radius:22px;background:linear-gradient(145deg,#fff,#f4efff)}
.dice-cube{display:grid;place-items:center;width:104px;height:104px;border:3px solid #c7b7e8;border-radius:24px;background:#fff;box-shadow:0 8px 0 #ded4f0,0 14px 24px #6f57951c;font-size:66px;line-height:1}
.dice-cube.dice-roll{animation:dice-tumble .16s linear infinite}
@keyframes dice-tumble{0%{transform:rotate(-12deg) scale(.94)}50%{transform:rotate(12deg) scale(1.06)}100%{transform:rotate(-12deg) scale(.94)}}
.dice-result{display:grid;gap:6px;text-align:center;font-size:20px;font-weight:700;color:#554477}
.dice-result span{font-size:14px;font-weight:400;color:#6f687b}
.dice-mode,.dice-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:12px 0}
.dice-mode button[aria-pressed=true]{background:#e9e1fb;border-color:#9078c5;color:#49366f}
.routine-pick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0 22px}
.routine-order-list{display:grid;gap:9px;padding:0;list-style:none;min-height:54px;margin:12px 0 18px}
.routine-step{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #dce7d9;border-radius:14px;background:#fff;box-shadow:0 3px 9px #405a3210;cursor:grab;touch-action:pan-y}
.routine-step:active{cursor:grabbing}
.routine-step-number{display:grid;place-items:center;flex:0 0 30px;height:30px;border-radius:50%;background:#edf4e8;color:#45694b;font-weight:800}
.routine-step-name{flex:1;min-width:0;font-weight:650}
.routine-step-actions{display:flex;gap:6px}
.routine-step-actions button{width:38px;height:38px;border:1px solid #d7dfd3;border-radius:10px;background:#f7faf5;font-size:20px;color:#45694b}
.routine-step-actions button:disabled{opacity:.35;cursor:not-allowed}
.routine-step[draggable=true]:hover{border-color:#9bbd91}
@media(max-width:560px){.routine-pick-grid{grid-template-columns:1fr}.dice-cube{width:88px;height:88px;font-size:56px}.routine-step{padding:9px}.routine-step-actions button{width:42px;height:42px}}
@media(prefers-reduced-motion:reduce){.dice-cube.dice-roll{animation:none}}


/* v6.0.0: rhythm memory controls */
.rhythm-hidden{min-height:76px;display:flex;align-items:center;justify-content:center}
.rhythm-hidden .rhythm-beat{min-width:180px}
.rhythm-controls{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:14px}
.rhythm-controls .button{min-width:140px}
.play-option.is-correct{outline:3px solid #4b9a70;outline-offset:2px;transform:translateY(-2px)}
@media(max-width:520px){.rhythm-controls{display:grid;grid-template-columns:1fr}.rhythm-controls .button{width:100%}}
@media(prefers-reduced-motion:reduce){.play-option.is-correct{transform:none}}


/* v6.1.0: interactive STEAM mini-labs */
.steam-lab{margin:16px auto 12px;max-width:560px;min-height:170px;padding:16px;border:1px solid var(--line,#dce5df);border-radius:18px;background:linear-gradient(180deg,#f7fbf8,#edf6f7);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px}
.steam-lab-title{font-weight:800;color:var(--ink,#263b34)}
.steam-object{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:42px;transition:transform .45s ease}
.steam-object small,.steam-magnet small{font-size:12px;font-weight:700}
.steam-water{width:min(78%,300px);height:54px;border-top:4px solid #62b8d0;border-radius:45% 45% 12px 12px;background:linear-gradient(180deg,#bce8f1,#77c6dc);display:flex;justify-content:center;align-items:center;color:#23576a;font-size:12px}
.steam-float{transform:translateY(-12px)}
.steam-sink{transform:translateY(35px)}
.steam-magnet-row{display:flex;align-items:center;justify-content:center;gap:12px;width:100%}
.steam-magnet{font-size:42px;display:flex;flex-direction:column;align-items:center}
.steam-gap{font-size:18px;color:#678}
.steam-pull{transform:translateX(-12px)}
.steam-color-pots{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.steam-color-pots span{min-width:72px;min-height:64px;padding:8px;border-radius:14px;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;text-shadow:0 1px 2px #333}
.steam-color-pots b{font-size:22px}
.steam-color-pots .steam-mix{background:#fff;color:#456;border:2px dashed #9ab}
.steam-color-pots .steam-mixed{background:linear-gradient(135deg,#ed9b38,#b75bb4);color:#fff;border:0}
.steam-result{max-width:600px;margin:10px auto;padding:10px 14px;border-radius:12px;background:#edf7ee;color:#285c3a;line-height:1.6}
.steam-observation-note{font-size:.92rem;color:var(--muted,#64756d)}
@media(prefers-reduced-motion:reduce){.steam-object{transition:none}}


/* v6.2.0: interactive digital math manipulatives */
.math-interactive-board{max-width:620px;margin:16px auto;padding:clamp(14px,3vw,24px);border:1px solid var(--line,#dce5df);border-radius:20px;background:linear-gradient(160deg,#fffdf6,#f2f8f3);text-align:center}
.math-interactive-equation{font-size:clamp(25px,5vw,38px);font-weight:900;letter-spacing:.04em;margin:8px 0 16px;color:var(--ink,#263b34)}
.math-interactive-count{display:flex;align-items:baseline;justify-content:center;gap:8px;color:var(--muted,#64756d)}
.math-interactive-count strong{font-size:42px;color:var(--ink,#263b34);min-width:1.5em}
.math-digital-tray{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:7px;min-height:100px;margin:14px auto;padding:14px;border:2px dashed #d7e4d8;border-radius:16px;background:#ffffffb8}
.math-digital-token{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:12px;background:#edf1e8;opacity:.28;filter:grayscale(1);cursor:pointer;transition:transform .15s,opacity .15s,filter .15s}
.math-digital-token.is-active{opacity:1;filter:none;background:#fff2d5;transform:translateY(-2px)}
.math-digital-controls{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:12px 0}
.math-digital-controls .button{min-width:130px}
.math-target{margin:12px 0;color:var(--muted,#64756d);font-weight:700}
.math-feedback{min-height:48px;margin:12px auto 0;padding:10px 12px;border-radius:12px;background:#eef6ef;line-height:1.55}
.math-digital-controls button:disabled{opacity:.4;cursor:not-allowed}
@media(max-width:480px){.math-digital-controls{display:grid;grid-template-columns:1fr 1fr}.math-digital-controls .button{min-width:0;padding-inline:8px}.math-digital-token{width:32px;height:32px}}
@media(prefers-reduced-motion:reduce){.math-digital-token{transition:none}}

/* Local two-player pass-and-play mode */
.duel-setup{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:12px 0 4px;padding:11px 13px;border:1px solid #e4eadc;border-radius:13px;background:#f7fbf3;font-size:13px}
.duel-mode-label{font-weight:800;color:#385642}
.duel-setup select,.duel-name-fields input{min-height:38px;border:1px solid #d9e2d3;border-radius:9px;padding:7px 10px;background:#fff;color:#34483d;font:inherit}
.duel-name-fields{display:flex;gap:7px;flex-wrap:wrap}
.duel-name-fields[hidden]{display:none}
.duel-name-fields input{width:112px}
.duel-setup-note{color:#6c786d;font-size:12px}
.duel-scoreboard{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:0 0 12px;padding:9px 12px;border-radius:12px;background:#fff;border:1px solid #e1e9dc;color:#465b49;font-size:13px}
.duel-scoreboard strong{color:#39724f}
.duel-current{font-weight:800;color:#a16a2e}
.duel-handoff{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:18px;background:rgba(35,47,37,.72);backdrop-filter:blur(4px)}
.duel-handoff-card{width:min(390px,100%);padding:25px 22px;border-radius:22px;background:#fffdf7;text-align:center;box-shadow:0 18px 60px #0004}
.duel-handoff-card h3{margin:8px 0 12px;color:#385642}
.duel-handoff-card p{margin:6px 0;color:#56645a}
.duel-handoff-icon{font-size:36px}
.duel-leader{font-weight:800;color:#a16a2e!important}
.duel-handoff-card .button{margin-top:12px}
@media(max-width:620px){.duel-setup{align-items:stretch}.duel-setup select{flex:1;min-width:130px}.duel-name-fields{width:100%}.duel-name-fields input{flex:1;width:calc(50% - 5px);min-width:0}.duel-scoreboard{gap:7px;font-size:12px}}

/* v6.4.0 — clearer completion actions and accessible interaction states */
.level-complete{display:grid;gap:9px}
.level-complete>p{margin:0}
.level-complete-detail{color:var(--muted,#64756d);font-size:14px;line-height:1.65}
.level-complete-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:7px}
.level-complete-actions .button{min-height:44px}
:where(button,a,input,select,summary,[tabindex]):focus-visible{outline:3px solid #397caa;outline-offset:3px;border-radius:7px}
button,.play-option,.maze-control,.routine-step-actions button{touch-action:manipulation}
@media(max-width:560px){
 .level-complete-actions{display:grid;grid-template-columns:1fr}
 .level-complete-actions .button{width:100%;min-height:48px}
}
@media(prefers-reduced-motion:reduce){
 *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* v6.6.0 — genuine 3x3 line bingo */
.bingo-target{display:flex;align-items:center;justify-content:center;gap:12px;margin:12px 0;font-size:15px}
.bingo-target strong{font-size:32px}
.bingo-target span{font-size:13px;color:var(--muted,#64756d)}
.bingo-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;width:min(100%,390px);margin:14px auto}
.bingo-cell{min-width:0;aspect-ratio:1;border:2px solid #e1e8dc;border-radius:15px;background:#fffdf7;font-size:clamp(28px,7vw,42px);cursor:pointer;transition:transform .15s,border-color .15s,background .15s}
.bingo-cell:not(:disabled):hover{transform:translateY(-2px);border-color:#8dbb8d}
.bingo-cell.is-bingo-marked{background:#e5f5df;border-color:#5b9b5b;box-shadow:inset 0 0 0 2px #fff}
.bingo-cell.is-bingo-wrong{background:#f8e9e5;border-color:#d88a78;opacity:.7}
.bingo-cell.is-bingo-line{background:#d8f0cb;border-color:#438d49;box-shadow:0 0 0 2px #438d4933}
.bingo-help{text-align:center;color:var(--muted,#64756d);font-size:13px}
@media(max-width:480px){.bingo-grid{gap:6px}.bingo-cell{border-radius:11px}}

/* v7.0 — per-item sorting feedback for fully digital classification */
.sort-choice.sort-correct{border:2px solid #438b61!important;background:linear-gradient(145deg,#e5f6eb,#fff)!important;box-shadow:0 3px 0 #b9dfc7!important}
.sort-choice.sort-wrong{border:2px solid #c65d5d!important;background:linear-gradient(145deg,#fff0ed,#fff)!important;box-shadow:0 3px 0 #efc4bd!important}
.sort-choice.sort-missed{border:2px dashed #c18b36!important;background:linear-gradient(145deg,#fff7df,#fff)!important}
.sort-round-feedback{max-width:560px;margin:9px auto;padding:10px 13px;border-radius:12px;background:#f4f7fb;color:#526176;font-size:14px;line-height:1.55;text-align:center}
.sort-choice:disabled{cursor:default;opacity:1}

/* v7.1 — arcade-like game scene presentation */
#game-modal .modal-panel{background:linear-gradient(180deg,#fffdf7 0%,#ffffff 48%,#fffaf0 100%);border:1px solid #eadfca}
#game-modal .modal-top{align-items:center;padding:4px 46px 13px 2px;border-bottom:1px dashed #e7dfcf}
#game-modal .modal-top h2{font-size:clamp(24px,3.3vw,34px);font-weight:900;letter-spacing:-.5px;color:#354c3e}
#game-modal .modal-top #modal-category{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border-radius:999px;background:#edf5e8;color:#4b805d;font-size:11px;letter-spacing:.4px}
#game-modal .modal-top #modal-category:before{content:"✦";color:#e4aa42}
#game-modal .level-control{padding:8px 11px;border-radius:15px;background:#fff4d9;border:1px solid #f0dfb7;color:#765b2d;font-weight:900}
#game-modal .level-control select{border:0;background:#fff;border-radius:10px;font-weight:900;color:#74552b}
#game-modal .mascot-guide-host{margin-top:14px}
#game-modal .mascot-guide-card{position:relative;overflow:hidden;grid-template-columns:126px minmax(0,1fr);align-items:center;gap:18px;min-height:142px;padding:15px 20px;border:1px solid #eadbb7;border-radius:23px;background:linear-gradient(112deg,#fff0cf 0%,#fff9e9 45%,#edf7e9 100%);box-shadow:0 8px 0 rgba(202,177,123,.13),0 12px 25px rgba(83,92,59,.07)}
#game-modal .mascot-guide-card:after{content:"✦  ✧  ✦";position:absolute;right:18px;top:7px;color:#e5bd62;font-size:19px;letter-spacing:5px;pointer-events:none}
#game-modal .scene-mascot-wrap{position:relative;display:grid;place-items:center;min-height:108px;border-radius:19px;background:rgba(255,255,255,.54)}
#game-modal .scene-mascot-wrap>img{width:112px;height:94px;object-fit:contain;object-position:center;filter:drop-shadow(0 5px 5px rgba(91,72,39,.12))}
#game-modal .scene-game-icon{position:absolute;z-index:1;right:5px;top:3px;display:grid;place-items:center;width:43px;height:43px;border-radius:15px;background:#fff;box-shadow:0 4px 10px #57452a1c;font-size:25px;transform:rotate(7deg)}
#game-modal .scene-kicker{display:block;margin:0 0 3px;color:#9a7940;font-size:10px;font-weight:1000;letter-spacing:1.3px}
#game-modal .mascot-guide-copy>strong{font-size:17px;color:#684b28}
#game-modal .mascot-guide-copy>p{font-size:13px;line-height:1.7;color:#526457}
#game-modal .game-stage{position:relative;overflow:hidden;margin-top:16px;min-height:285px;padding:24px 22px 22px;border:2px solid color-mix(in srgb,var(--scene-accent,#80a77b) 22%,white);border-radius:25px;background:linear-gradient(145deg,var(--scene-a,#f4f9ec),var(--scene-b,#fff8e9));box-shadow:0 7px 0 rgba(86,110,78,.07),0 13px 28px rgba(63,83,64,.06)}
#game-modal .game-stage:before{width:190px;height:190px;right:-70px;top:-88px;border-radius:50%;opacity:.8}
#game-modal .game-stage:after{content:"";position:absolute;left:-46px;bottom:-75px;width:145px;height:145px;border-radius:50%;background:color-mix(in srgb,var(--scene-accent,#80a77b) 9%,transparent);pointer-events:none}
#game-modal .game-stage>*{position:relative;z-index:1}
#game-modal .game-stage h3{font-size:clamp(19px,2.5vw,25px);font-weight:950;letter-spacing:.2px;color:#385342}
#game-modal .game-stage>p:first-of-type{font-weight:650;color:#53695a}
#game-modal .game-footer{min-height:44px;margin-top:13px;padding:0 5px}
#game-modal #game-feedback{display:block;width:100%;padding:9px 14px;border-radius:14px;font-weight:850}
#game-modal #game-feedback.feedback-good{background:#e9f6e9;border:1px solid #cfe6ce;color:#347b58;animation:feedback-pop .24s ease-out}
#game-modal #game-feedback.feedback-bad{background:#fff0e8;border:1px solid #f0d3c2;color:#a45f3e;animation:feedback-nudge .22s ease-out}
#game-modal .play-option{position:relative;z-index:1;min-height:88px;border-width:2px;border-radius:21px;font-size:clamp(21px,3vw,30px);box-shadow:0 5px 0 rgba(69,91,68,.08),0 8px 16px rgba(69,91,68,.045)}
#game-modal .play-option:not(:disabled):hover{transform:translateY(-2px) scale(1.015)}
#game-modal .play-option:disabled{filter:saturate(.8);opacity:.72}
#game-modal .level-complete{border-radius:24px;box-shadow:0 8px 0 rgba(82,132,84,.08),0 16px 28px rgba(82,132,84,.08)}
#game-modal .level-complete:before{content:"🌟";display:block;font-size:34px;margin-bottom:4px;animation:acorn-star 1.2s ease-in-out infinite alternate}
#game-modal .duel-scoreboard{position:relative;z-index:2;border-radius:16px;background:rgba(255,255,255,.82);border:1px solid #e8dfcc;padding:10px 13px;box-shadow:0 4px 12px rgba(68,83,59,.05)}
#game-modal .duel-handoff-card{border:2px solid #f0dcae;border-radius:26px;background:linear-gradient(145deg,#fff8e7,#edf7e9);box-shadow:0 18px 50px rgba(57,67,46,.2)}
@keyframes feedback-pop{from{opacity:.65;transform:translateY(4px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes feedback-nudge{0%,100%{transform:translateX(0)}35%{transform:translateX(-3px)}70%{transform:translateX(3px)}}
@keyframes acorn-star{from{transform:translateY(0) rotate(-7deg) scale(.94)}to{transform:translateY(-4px) rotate(7deg) scale(1.06)}}
@media(max-width:620px){
 #game-modal .modal-top{padding-right:36px;gap:8px}
 #game-modal .modal-top h2{font-size:22px}
 #game-modal .mascot-guide-card{grid-template-columns:84px minmax(0,1fr);gap:11px;padding:11px 12px;border-radius:18px;min-height:0}
 #game-modal .scene-mascot-wrap{min-height:86px;border-radius:15px}
 #game-modal .scene-mascot-wrap>img{width:78px;height:78px}
 #game-modal .scene-game-icon{right:0;top:0;width:34px;height:34px;border-radius:12px;font-size:20px}
 #game-modal .scene-kicker{font-size:9px;letter-spacing:.8px}
 #game-modal .mascot-guide-copy>strong{font-size:14px}
 #game-modal .mascot-guide-copy>p{font-size:12px;line-height:1.55}
 #game-modal .game-stage{min-height:260px;padding:18px 12px 16px;border-radius:20px}
 #game-modal .play-option{min-height:72px;border-radius:16px}
 #game-modal .level-complete:before{font-size:29px}
}
@media(prefers-reduced-motion:reduce){#game-modal #game-feedback,.level-complete:before{animation:none!important}}

/* v7.2.0 — 彩色音符演奏機：完整音樂冒險場景 */
#game-modal[data-game="color-notes"] .game-stage{background:linear-gradient(145deg,#fff8e8 0%,#f1f8ff 52%,#f5efff 100%);border:1px solid #e8e5d9;padding:clamp(14px,3vw,26px);overflow:hidden}
#game-modal[data-game="color-notes"] .game-stage>p:first-of-type{color:#657486;font-weight:650}
.piano-adventure{position:relative}
.piano-scene-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:clamp(14px,3vw,22px);border-radius:22px;background:linear-gradient(115deg,#fff0c9,#ffe4dc 55%,#e9eaff);box-shadow:inset 0 1px #fff,0 7px 18px #596b8712}
.piano-eyebrow{display:block;color:#a46a3c;font-size:10px;font-weight:950;letter-spacing:1.8px;margin-bottom:7px}
.piano-scene-head h3{font-size:clamp(19px,3.3vw,27px);line-height:1.2;margin:0 0 7px;color:#37455a}
.piano-scene-head p{margin:0;color:#6c7180;font-size:13px}
.piano-music-badge{flex:0 0 58px;width:58px;height:58px;display:grid;place-items:center;border-radius:19px;background:#fff9e9;color:#d58a45;font-size:37px;box-shadow:0 5px 0 #e9d6b9}
.piano-mission{display:flex;align-items:center;gap:11px;margin:15px 0;padding:12px 14px;border:1px solid #eadfc8;border-radius:16px;background:#fffdf7}
.piano-mission-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:#fff0cf;font-size:23px}
.piano-mission>div{display:grid;gap:3px;flex:1;min-width:0}
.piano-mission strong{font-size:13px;color:#465365}
.piano-mission>div span{font-size:12px;color:#748092}
.piano-level-pill{white-space:nowrap;border-radius:99px;padding:7px 10px;background:#e8f2e6;color:#477650;font-size:11px;font-weight:900}
.piano-scoreline{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 2px 9px;color:#687588;font-size:12px;font-weight:850}
#piano-progress{display:flex;align-items:center;gap:10px}
.piano-progress-count{font-size:18px;color:#4e8d79;font-weight:950;font-variant-numeric:tabular-nums}
.piano-progress-count small{font-size:12px;color:#8b98a5}
.piano-progress-dots{display:flex;gap:5px}
.piano-progress-dots i{width:10px;height:10px;border-radius:50%;background:#dce3e8;box-shadow:inset 0 1px 2px #00000012}
.piano-progress-dots i.is-filled{background:#68b98b;box-shadow:0 0 0 3px #68b98b24}
.piano-keyboard-scene{position:relative;padding:25px 15px 14px!important;border-radius:22px!important;border:1px solid #dce6ef!important;background:linear-gradient(180deg,#e9f4ff,#fff 40%,#f7f0ff)!important;box-shadow:inset 0 2px 0 #fff,0 10px 22px #53698716!important;overflow:hidden}
.piano-sparkles{position:absolute;top:6px;left:0;right:0;text-align:center;color:#e6ad52;font-size:15px;letter-spacing:12px;opacity:.7;pointer-events:none}
#game-modal[data-game="color-notes"] .note-keys{position:relative;z-index:1;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:clamp(4px,1vw,9px);padding:0;background:transparent;border:0;box-shadow:none;max-width:720px}
#game-modal[data-game="color-notes"] .note-key{position:relative;isolation:isolate;min-width:0;min-height:clamp(105px,16vw,154px)!important;height:auto;border:2px solid color-mix(in srgb,var(--note-color),#fff 38%)!important;border-bottom:8px solid color-mix(in srgb,var(--note-color),#000 12%)!important;border-radius:0 0 16px 16px!important;background:linear-gradient(180deg,#fff 0%,color-mix(in srgb,var(--note-color),#fff 84%) 65%,color-mix(in srgb,var(--note-color),#fff 68%) 100%)!important;color:#425064!important;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:7px;padding:12px 3px!important;box-shadow:0 5px 0 color-mix(in srgb,var(--note-color),#fff 35%),0 11px 16px #34445a1c!important;transition:transform .13s,filter .13s,box-shadow .13s;overflow:hidden}
#game-modal[data-game="color-notes"] .note-key:before{display:none}
#game-modal[data-game="color-notes"] .note-key .piano-key-shine{position:absolute;z-index:-1;top:0;left:10%;width:80%;height:48%;border-radius:0 0 50% 50%;background:linear-gradient(180deg,#fff9,transparent);pointer-events:none}
#game-modal[data-game="color-notes"] .note-key .key-note{font-size:clamp(12px,2vw,18px);font-weight:950;color:#34465a}
#game-modal[data-game="color-notes"] .note-key .key-degree{font-size:11px;color:#778497}
#game-modal[data-game="color-notes"] .note-key kbd{min-width:22px;padding:3px 5px;border-radius:6px;background:#ffffffb8;border:1px solid #dce2e8;color:#687588;font:800 10px ui-monospace,monospace}
#game-modal[data-game="color-notes"] .note-key:disabled{opacity:.72;filter:saturate(.72)}
#game-modal[data-game="color-notes"] .note-key:not(:disabled){cursor:pointer}
#game-modal[data-game="color-notes"] .note-key:not(:disabled):hover{transform:translateY(-5px);filter:saturate(1.08)}
#game-modal[data-game="color-notes"] .note-key:active:not(:disabled){transform:translateY(3px);border-bottom-width:3px!important}
#game-modal[data-game="color-notes"] .note-key.is-playing{transform:translateY(-7px) scale(1.025);filter:saturate(1.25);box-shadow:0 9px 0 color-mix(in srgb,var(--note-color),#fff 28%),0 15px 22px #34445a35!important}
#game-modal[data-game="color-notes"] .note-key.is-correct{outline:4px solid #60b783;outline-offset:2px;filter:saturate(1.2)}
#game-modal[data-game="color-notes"] .note-key.is-wrong{outline:4px solid #e67c72;outline-offset:2px;animation:pianoWrong .22s linear 2}
.piano-key-legend{display:flex;justify-content:space-between;margin:12px 3px 0;color:#8994a1;font-size:10px;font-weight:800}
.piano-controls{display:flex;justify-content:center;flex-wrap:wrap;gap:9px;margin:17px 0 10px}
.piano-controls .button{min-width:132px}
.piano-hint{margin:0;text-align:center;color:#778395;font-size:11px;line-height:1.6}
.piano-hint b{color:#536d8c;letter-spacing:2px}
@keyframes pianoWrong{0%,100%{transform:translateX(0)}25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
@media(max-width:560px){
 #game-modal[data-game="color-notes"] .game-stage{padding:12px 9px}
 .piano-scene-head{padding:14px;border-radius:17px}
 .piano-music-badge{flex-basis:46px;width:46px;height:46px;font-size:29px;border-radius:15px}
 .piano-mission{padding:10px;gap:8px}
 .piano-mission-icon{width:34px;height:34px;font-size:19px}
 .piano-mission>div span{font-size:11px}
 .piano-keyboard-scene{padding:24px 7px 12px!important;border-radius:16px!important}
 #game-modal[data-game="color-notes"] .note-keys{gap:3px}
 #game-modal[data-game="color-notes"] .note-key{min-height:105px!important;border-radius:0 0 10px 10px!important;border-bottom-width:6px!important;padding:8px 1px!important;gap:6px}
 #game-modal[data-game="color-notes"] .note-key .key-note{font-size:11px}
 #game-modal[data-game="color-notes"] .note-key .key-degree{font-size:9px}
 #game-modal[data-game="color-notes"] .note-key kbd{min-width:17px;padding:2px 3px;font-size:8px}
 .piano-controls{gap:7px}
 .piano-controls .button{min-width:0;flex:1;padding:10px 9px;font-size:12px}
 .piano-progress-dots{gap:3px}
 .piano-progress-dots i{width:8px;height:8px}
}
@media(prefers-reduced-motion:reduce){#game-modal[data-game="color-notes"] .note-key{transition:none!important;animation:none!important}.piano-keyboard-scene *{animation:none!important}}

/* v7.3.0 — dedicated rhythm-hopscotch game scene */
#game-modal[data-game="rhythm-hopscotch"] .game-stage{background:linear-gradient(160deg,#fff8ed 0%,#f5f1ff 52%,#edf8ff 100%);border:1px solid #f0e5d5;border-radius:26px;padding:clamp(14px,3vw,26px);overflow:hidden}
.rhythm-hero{display:flex;align-items:center;gap:16px;padding:17px 19px;border-radius:22px;background:linear-gradient(115deg,#fff 0%,#fff3e5 100%);border:1px solid #f5dfc6;box-shadow:0 5px 0 #f0e1d1;margin:12px 0 18px}
.rhythm-mascot{width:76px;height:76px;flex:0 0 76px;display:grid;place-items:center;border-radius:24px;background:linear-gradient(145deg,#ffe4ae,#ffd18a);font-size:48px;box-shadow:inset 0 -5px 0 #efb96f}
.rhythm-hero-copy{min-width:0}.rhythm-eyebrow{font-size:10px;letter-spacing:.12em;font-weight:900;color:#a96b3b}.rhythm-hero h3{font-size:clamp(19px,3vw,25px);line-height:1.2;margin:5px 0;color:#49362d}.rhythm-hero p{font-size:13px;line-height:1.55;margin:0;color:#76645a}
.rhythm-roundline{display:flex;justify-content:space-between;gap:10px;margin:10px 2px;color:#755d4c;font-size:13px;font-weight:800}
.rhythm-listen-panel{display:grid;grid-template-columns:66px minmax(0,1fr);align-items:center;gap:13px;padding:14px 16px;background:#fff;border:1px solid #e9e3f2;border-radius:20px;box-shadow:0 4px 0 #e9e3f2}
.rhythm-listen-orb{width:62px;height:62px;border-radius:21px;display:grid;place-items:center;background:linear-gradient(145deg,#e8e4ff,#d9efff);font-size:30px;transition:transform .18s,background .18s}
.rhythm-listen-orb.is-listening{background:linear-gradient(145deg,#ffe8b9,#ffd5a2)}.rhythm-listen-orb.is-pulse{animation:rhythmPulse .38s ease-out}
@keyframes rhythmPulse{0%{transform:scale(.88)}55%{transform:scale(1.13)}100%{transform:scale(1)}}
.rhythm-listen-copy{display:flex;flex-direction:column;gap:4px;min-width:0}.rhythm-listen-copy strong{font-size:15px;color:#42364f}.rhythm-listen-copy span{font-size:12px;line-height:1.4;color:#746c7e}
.rhythm-meter{grid-column:1/-1;display:flex;gap:7px;justify-content:center;padding:4px 0 0}.rhythm-meter-dot{width:11px;height:11px;border-radius:50%;background:#e7e4ee;border:2px solid #d7d2e2;transition:background .18s,transform .18s}.rhythm-meter-dot.is-filled{background:#76c99a;border-color:#54ae7a;transform:scale(1.12)}
.rhythm-action-title{display:flex;justify-content:space-between;align-items:center;margin:20px 2px 10px;color:#4d4057}.rhythm-action-title strong{font-size:15px}.rhythm-action-title span{font-size:11px;color:#81768b}
.rhythm-action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.rhythm-action{position:relative;min-width:0;min-height:130px;border:2px solid transparent;border-radius:21px;padding:13px 7px 12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:#423b4b;box-shadow:0 5px 0 rgba(50,40,70,.09);transition:transform .12s,box-shadow .12s,border-color .12s;touch-action:manipulation}.rhythm-action:disabled{opacity:.58;filter:saturate(.72)}.rhythm-action:not(:disabled):active{transform:translateY(3px);box-shadow:0 2px 0 rgba(50,40,70,.1)}.rhythm-action-icon{font-size:37px;line-height:1.2}.rhythm-action strong{font-size:16px}.rhythm-action small{font-size:10px;opacity:.76}.rhythm-coral{background:linear-gradient(160deg,#fff0e9,#ffdcd0);border-color:#f5c5b5}.rhythm-blue{background:linear-gradient(160deg,#edf5ff,#dceaff);border-color:#c7dcf7}.rhythm-green{background:linear-gradient(160deg,#edfaef,#d8f1dd);border-color:#c4e6cb}.rhythm-action.is-hit{border-color:#46b77b;box-shadow:0 0 0 4px #bcebd0,0 5px 0 #a8d9bb;transform:scale(.97)}.rhythm-action-check{position:absolute;right:8px;top:7px;width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#329966;font-size:12px;opacity:0}.rhythm-action.is-hit .rhythm-action-check{opacity:1}
.rhythm-bottom-controls{display:grid;grid-template-columns:1.2fr 1fr;gap:10px;margin-top:17px}.rhythm-bottom-controls .button{min-height:48px;border-radius:15px;font-weight:800}.rhythm-footnote{font-size:11px;line-height:1.55;color:#827989;text-align:center;margin:13px 5px 0}
@media(max-width:520px){#game-modal[data-game="rhythm-hopscotch"] .game-stage{padding:11px;border-radius:20px}.rhythm-hero{gap:11px;padding:13px;border-radius:18px}.rhythm-mascot{width:59px;height:59px;flex-basis:59px;border-radius:19px;font-size:37px}.rhythm-hero h3{font-size:18px}.rhythm-hero p{font-size:11px}.rhythm-listen-panel{grid-template-columns:54px minmax(0,1fr);gap:10px;padding:11px}.rhythm-listen-orb{width:52px;height:52px;border-radius:17px;font-size:25px}.rhythm-action-grid{gap:7px}.rhythm-action{min-height:112px;padding:10px 3px;border-radius:17px}.rhythm-action-icon{font-size:31px}.rhythm-action strong{font-size:14px}.rhythm-action small{font-size:9px}.rhythm-bottom-controls{grid-template-columns:1fr}.rhythm-bottom-controls .button{width:100%}}
@media(prefers-reduced-motion:reduce){.rhythm-listen-orb.is-pulse{animation:none}.rhythm-action{transition:none}}


/* v7.4.0 — dedicated ear-training sound safari */
#game-modal[data-game="ear-training"] .game-stage{background:linear-gradient(155deg,#eaf6ff 0%,#f4f0ff 52%,#fff7e8 100%);border:1px solid #dfe8f6;border-radius:26px;padding:clamp(14px,3vw,26px);overflow:hidden}
.ear-hero{display:flex;align-items:center;gap:16px;padding:17px 19px;margin:10px 0 17px;border:1px solid #dce7f5;border-radius:23px;background:linear-gradient(115deg,#fff 0%,#f1f6ff 55%,#fff4e7 100%);box-shadow:0 5px 0 #e3e9f1}
.ear-mascot{width:78px;height:78px;flex:0 0 78px;display:grid;place-items:center;border-radius:25px;background:linear-gradient(145deg,#dceeff,#e9e1ff);font-size:39px;box-shadow:inset 0 -5px 0 #cbd7f0}
.ear-kicker{font-size:10px;font-weight:900;letter-spacing:.12em;color:#6a78ad}.ear-hero h3{font-size:clamp(18px,3vw,24px);line-height:1.25;color:#34466c;margin:5px 0}.ear-hero p{font-size:13px;line-height:1.5;color:#68758d;margin:0}
.ear-roundline{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:12px 2px;color:#4b5b7c;font-size:13px}.ear-roundline span{padding:5px 10px;border-radius:999px;background:#fff;border:1px solid #dce5f2;color:#73809a;font-size:11px;font-weight:800}
.ear-sound-pair{display:grid;grid-template-columns:minmax(0,1fr) 42px minmax(0,1fr);align-items:center;gap:10px;margin:13px auto;max-width:620px}
.ear-sound-card{position:relative;display:flex;min-width:0;min-height:164px;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:2px solid #d7e3f3;border-radius:23px;background:linear-gradient(155deg,#fff,#edf5ff);color:#405579;box-shadow:0 6px 0 #dce6f3,0 12px 22px #617da018;cursor:pointer;touch-action:manipulation;transition:transform .14s,border-color .14s,box-shadow .14s}
.ear-sound-b{background:linear-gradient(155deg,#fff,#f3efff);border-color:#e1d9f3;box-shadow:0 6px 0 #e7e0f4,0 12px 22px #796b9d18;color:#5c4d83}
.ear-sound-card:not(:disabled):active{transform:translateY(3px);box-shadow:0 2px 0 #dce6f3}.ear-sound-card:disabled{opacity:.62;cursor:wait}
.ear-sound-letter{display:grid;place-items:center;width:42px;height:42px;border-radius:15px;background:#dcecff;color:#3f6caa;font-size:21px;font-weight:950}.ear-sound-b .ear-sound-letter{background:#e9e0ff;color:#745da9}
.ear-wave{font-size:36px;line-height:1.05;letter-spacing:-5px;color:#6f9dcc;transform:scaleX(1.15)}.ear-sound-b .ear-wave{color:#9b86c8}.ear-sound-card strong{font-size:15px}.ear-sound-card small{font-size:10px;color:#7e8ba0}.ear-versus{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#fff;border:1px solid #e1e5ef;color:#9aa3b7;font-size:10px;font-weight:950}
.ear-compare{display:flex;width:min(100%,360px);min-height:49px;margin:16px auto 20px;border-radius:16px;background:linear-gradient(135deg,#5b83bd,#7569b2);box-shadow:0 5px 0 #4c6497,0 9px 18px #596f9e25}.ear-compare:hover{background:linear-gradient(135deg,#5078b0,#695ea5)}
.ear-question{max-width:620px;margin:0 auto;padding:17px;border:1px solid #e1e6f0;border-radius:21px;background:#ffffffd9;box-shadow:0 4px 0 #e9edf4;text-align:center}.ear-question>strong{display:block;color:#465777;font-size:15px;margin-bottom:12px}.ear-answer-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.ear-answer{min-height:64px;border:2px solid #d8e4f4;border-radius:17px;background:linear-gradient(145deg,#fff,#eef5ff);color:#405d85;font-size:15px;font-weight:900;box-shadow:0 4px 0 #dfe8f3;cursor:pointer;touch-action:manipulation}.ear-answer+ .ear-answer{background:linear-gradient(145deg,#fff,#f4efff);border-color:#e1d9f2;color:#66558c;box-shadow:0 4px 0 #e8e1f3}.ear-answer span{display:inline-block;margin-left:5px;color:#6c9acb}.ear-answer:disabled{opacity:.58}.ear-answer.is-correct{border-color:#63b889;background:#e9f8ef;box-shadow:0 4px 0 #c5e8d2}.ear-answer.is-wrong{border-color:#dc8d83;background:#fff0ed;animation:earNudge .22s ease-in-out 2}
.ear-hint{margin:12px 4px 0;text-align:center;color:#77839a;font-size:11px;line-height:1.55}
@keyframes earNudge{0%,100%{transform:translateX(0)}30%{transform:translateX(-3px)}70%{transform:translateX(3px)}}
@media(max-width:520px){#game-modal[data-game="ear-training"] .game-stage{padding:11px;border-radius:20px}.ear-hero{gap:10px;padding:12px;border-radius:18px}.ear-mascot{width:57px;height:57px;flex-basis:57px;border-radius:18px;font-size:30px}.ear-hero h3{font-size:17px}.ear-hero p{font-size:11px}.ear-roundline{font-size:12px}.ear-roundline span{font-size:9px;padding:4px 7px}.ear-sound-pair{grid-template-columns:minmax(0,1fr) 30px minmax(0,1fr);gap:6px}.ear-sound-card{min-height:139px;border-radius:18px}.ear-sound-letter{width:36px;height:36px;border-radius:12px}.ear-wave{font-size:30px}.ear-sound-card strong{font-size:13px}.ear-sound-card small{font-size:9px}.ear-versus{width:29px;height:29px;font-size:8px}.ear-question{padding:13px 10px}.ear-answer{min-height:62px;font-size:13px;padding:8px 4px}}
@media(prefers-reduced-motion:reduce){.ear-sound-card,.ear-answer{transition:none!important}.ear-answer.is-wrong{animation:none!important}}


/* v7.5.0 — dedicated auditory-memory adventure */
#game-modal[data-game="music-memory"] .game-stage{background:radial-gradient(circle at 8% 8%,#fff4cf 0 10%,transparent 28%),linear-gradient(145deg,#f2f8ed 0%,#fff8e8 58%,#f4efff 100%)}
#game-modal[data-game="music-memory"] .audio-memory-intro{display:flex;align-items:center;gap:16px;padding:16px 18px;margin:10px 0 16px;border:1px solid #e6e3c9;border-radius:22px;background:linear-gradient(120deg,#fffdf1,#fff 62%,#f7f1ff);box-shadow:0 7px 18px rgba(75,84,55,.07)}
#game-modal[data-game="music-memory"] .audio-memory-mascot{flex:0 0 72px;width:72px;height:72px;display:grid;place-items:center;border-radius:22px;background:#f9e9c8;font-size:37px}
#game-modal[data-game="music-memory"] .audio-memory-intro strong{display:block;color:#405d4c;font-size:clamp(17px,2.5vw,21px);line-height:1.35}
#game-modal[data-game="music-memory"] .audio-memory-intro p{margin:5px 0 0;color:#647268;font-size:14px;line-height:1.55}
#game-modal[data-game="music-memory"] .audio-memory-tools{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin:10px 0}
#game-modal[data-game="music-memory"] .audio-memory-tools .progress{margin:0}
#game-modal[data-game="music-memory"] .audio-memory-grid{display:grid;grid-template-columns:repeat(var(--memory-columns),minmax(0,1fr));gap:clamp(8px,1.7vw,13px);max-width:590px;margin:15px auto}
#game-modal[data-game="music-memory"] .audio-memory-card{position:relative;min-width:0;min-height:clamp(86px,13vw,116px);padding:7px;border:2px solid #e3d6ae;border-radius:22px;background:linear-gradient(150deg,#fffdf4,#f7e9c8);box-shadow:0 5px 0 #e8d9b5,0 9px 15px rgba(79,70,43,.08);cursor:pointer;overflow:hidden;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}
#game-modal[data-game="music-memory"] .audio-memory-card:hover{transform:translateY(-2px);border-color:#d7ad61}
#game-modal[data-game="music-memory"] .audio-memory-shell{display:grid;place-items:center;gap:0;width:100%;height:100%;min-height:68px;border-radius:15px;background:radial-gradient(circle at 50% 35%,#fff 0 20%,#fff8e7 70%);color:#9b7842}
#game-modal[data-game="music-memory"] .audio-memory-acorn{font-size:clamp(29px,5vw,43px);line-height:1.05;filter:drop-shadow(0 2px 1px #d8c59a)}
#game-modal[data-game="music-memory"] .audio-memory-note{font-size:17px;font-weight:900;line-height:1;color:#b28a4e}
#game-modal[data-game="music-memory"] .audio-memory-card.is-revealed{border-color:#8e9fca;background:linear-gradient(145deg,#f4f1ff,#fff);box-shadow:0 5px 0 #d9d3ed}
#game-modal[data-game="music-memory"] .audio-memory-face{position:relative;z-index:1;display:grid;place-items:center;min-height:68px;border-radius:15px;background:linear-gradient(145deg,#f1edff,#fff);color:#7967b0;font-size:clamp(35px,6vw,51px);font-weight:900}
#game-modal[data-game="music-memory"] .audio-memory-ripple{position:absolute;inset:14%;border:2px solid rgba(139,119,194,.45);border-radius:50%;animation:memory-ripple .9s ease-out 1}
#game-modal[data-game="music-memory"] .audio-memory-card.is-matched{border-color:#8fc39b;background:linear-gradient(145deg,#eaf8eb,#fff);box-shadow:0 5px 0 #cde7d0}
#game-modal[data-game="music-memory"] .audio-memory-matched{display:grid;place-items:center;min-height:68px;border-radius:15px;background:#eff9ee;font-size:clamp(31px,5vw,43px)}
#game-modal[data-game="music-memory"] .audio-memory-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:10px}
#game-modal[data-game="music-memory"] .audio-memory-actions .button{min-width:160px}
#game-modal[data-game="music-memory"] .audio-memory-tip{margin:12px 0 0;text-align:center;color:#65746a;font-size:13px}
#game-modal[data-game="music-memory"] .audio-memory-actions button:disabled{opacity:.45}
@keyframes memory-ripple{0%{transform:scale(.45);opacity:.75}100%{transform:scale(1.35);opacity:0}}
@media(max-width:480px){#game-modal[data-game="music-memory"] .audio-memory-intro{gap:10px;padding:12px;border-radius:17px}#game-modal[data-game="music-memory"] .audio-memory-mascot{flex-basis:54px;width:54px;height:54px;font-size:28px;border-radius:16px}#game-modal[data-game="music-memory"] .audio-memory-intro p{font-size:13px}#game-modal[data-game="music-memory"] .audio-memory-grid{gap:7px}#game-modal[data-game="music-memory"] .audio-memory-card{min-height:76px;border-radius:16px;padding:5px}#game-modal[data-game="music-memory"] .audio-memory-shell,#game-modal[data-game="music-memory"] .audio-memory-face,#game-modal[data-game="music-memory"] .audio-memory-matched{min-height:60px}}
@media(prefers-reduced-motion:reduce){#game-modal[data-game="music-memory"] .audio-memory-ripple{animation:none}}

/* v7.6.0 — Note Match: staff-reading and pitch-listening game room */
#game-modal[data-game="note-match"] .game-stage{background:linear-gradient(145deg,#fff8e8 0%,#eef7f1 52%,#edf4ff 100%)}
.note-match-scene{position:relative;z-index:1;max-width:760px;margin:0 auto}
.note-match-heading{display:flex;align-items:center;gap:13px;padding:15px 17px;border-radius:20px;background:linear-gradient(110deg,#fff 0%,#fff8e9 100%);border:1px solid #eee4cf;box-shadow:0 5px 16px rgba(81,91,65,.06)}
.note-match-mascot{display:grid;place-items:center;flex:0 0 54px;width:54px;height:54px;border-radius:17px;background:#f9e8c9;font-size:32px}
.note-match-heading h3{margin:0 0 4px;font-size:clamp(18px,2.5vw,23px)}
.note-match-heading p{margin:0;color:#647469;font-size:14px;line-height:1.55}
.note-match-acorn{margin-left:auto;font-size:31px}
.note-match-instruction{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin:15px 0}
.note-match-instruction span{padding:8px 13px;border-radius:999px;background:rgba(255,255,255,.85);border:1px solid #e5e9dc;color:#536d5a;font-size:13px;font-weight:800}
.note-match-board{display:grid;grid-template-columns:1.12fr .88fr;gap:15px}
.note-match-column{padding:15px;border-radius:20px;background:rgba(255,255,255,.82);border:1px solid #e4e9dc;box-shadow:0 5px 15px rgba(62,83,63,.045)}
.note-match-column h4{margin:0 0 12px;color:#4c6755;font-size:15px}
.note-match-tiles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.note-match-staff-card{display:flex;min-width:0;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:112px;padding:7px 5px;border:2px solid #e7e9df;border-radius:16px;background:linear-gradient(180deg,#fff,#fffdf7);color:#405447;cursor:pointer;transition:transform .14s,border-color .14s,background .14s;touch-action:manipulation}
.note-match-staff-card:hover{transform:translateY(-2px);border-color:#a6c7a5}
.note-match-staff-card.is-selected{border-color:#6eaa82;background:#edf8ee;box-shadow:0 0 0 3px rgba(95,157,112,.12)}
.note-match-staff-card.is-matched{border-color:#83b99a;background:#e8f5e9;opacity:.76}
.staff-note-svg{display:block;width:min(100%,112px);height:76px;overflow:visible}
.note-match-listen{font-size:12px;font-weight:800;color:#597361}
.note-match-answers{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.note-match-answer{min-height:68px;border:2px solid #e6e8df;border-radius:16px;background:linear-gradient(180deg,#fff,#f8fbf6);color:#3e5c4a;font-size:clamp(18px,2.4vw,23px);font-weight:900;cursor:pointer;box-shadow:0 3px 0 rgba(65,92,68,.07);touch-action:manipulation}
.note-match-answer:hover{border-color:#a7c9a7;background:#f5fff5}
.note-match-answer.is-matched{border-color:#83b99a;background:#e8f5e9;color:#477b59}
.note-match-answer.is-wrong{border-color:#e6a08a;background:#fff0e9;animation:note-match-shake .22s linear 1}
.note-match-status{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:13px;padding:10px 13px;border-radius:15px;background:rgba(255,255,255,.82);border:1px solid #e5eadf;color:#536b59;font-size:14px;font-weight:800}
.note-match-status .button{padding:9px 14px;font-size:13px}
.note-match-tip{margin:10px 2px 0!important;text-align:center;font-size:13px!important;color:#6c796d!important}
@keyframes note-match-shake{0%,100%{transform:translateX(0)}30%{transform:translateX(-3px)}70%{transform:translateX(3px)}}
@media(max-width:620px){
 .note-match-heading{gap:9px;padding:12px}
 .note-match-mascot{flex-basis:45px;width:45px;height:45px;font-size:27px}
 .note-match-heading p{font-size:12px}
 .note-match-acorn{font-size:25px}
 .note-match-instruction{gap:6px}
 .note-match-instruction span{font-size:11px;padding:7px 9px}
 .note-match-board{grid-template-columns:1fr;gap:10px}
 .note-match-column{padding:11px;border-radius:16px}
 .note-match-tiles{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 .note-match-staff-card{min-height:98px;border-radius:13px}
 .staff-note-svg{height:66px}
 .note-match-listen{font-size:11px}
 .note-match-answers{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 .note-match-answer{min-height:56px;border-radius:13px}
 .note-match-status{align-items:stretch;flex-direction:column;text-align:center}
 .note-match-status .button{width:100%}
}
@media(prefers-reduced-motion:reduce){.note-match-staff-card,.note-match-answer{transition:none!important}.note-match-answer.is-wrong{animation:none!important}}


/* v7.7.0 · Drum studio: a complete digital percussion instrument */
#game-modal[data-game="drum-paint"]{--scene-a:#fff0e7;--scene-b:#fff8d9;--scene-accent:#df8a63}
#game-modal[data-game="drum-paint"] .game-stage{background:linear-gradient(145deg,#fff8ed,#f7f0ff);}
.drum-studio{display:grid;gap:16px;color:#3f4c48}
.drum-studio-hero{display:flex;align-items:center;gap:13px;padding:15px 17px;border-radius:20px;background:linear-gradient(115deg,#fff0df,#fff8df 55%,#f0edff);box-shadow:inset 0 0 0 1px #eadcc8}
.drum-studio-mascot{display:grid;place-items:center;flex:0 0 58px;height:58px;border-radius:18px;background:#fffdf7;font-size:34px;box-shadow:0 4px 12px #8d70401c}
.drum-studio-hero h3{margin:2px 0 3px;font-size:21px;color:#654a3b}
.drum-studio-hero p{margin:0;color:#76675c;font-size:13px}
.drum-studio-kicker{font-size:9px;font-weight:900;letter-spacing:1.1px;color:#b1764e}
.drum-studio-acorn{margin-left:auto;font-size:31px}
.drum-mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:5px;border-radius:15px;background:#eee9e2}
.drum-mode-tabs button{border:0;border-radius:11px;padding:11px 8px;background:transparent;color:#716b64;font-weight:850;cursor:pointer}
.drum-mode-tabs button.is-active{background:#fff;box-shadow:0 3px 10px #4d443015;color:#76523d}
.drum-free-intro,.drum-challenge-intro{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:15px;background:#fff;border:1px solid #ece3d7}
.drum-free-intro{align-items:flex-start;flex-direction:column;gap:4px}
.drum-free-intro strong,.drum-challenge-intro strong{color:#684d3c}
.drum-free-intro span,.drum-challenge-intro p{margin:0;color:#777069;font-size:13px}
.drum-round-pill{flex:none;padding:7px 10px;border-radius:99px;background:#f5ebff;color:#70579a;font-size:12px;font-weight:850}
.drum-pad-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}
.drum-pad{position:relative;display:flex;min-width:0;min-height:132px;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:12px 7px;border:3px solid color-mix(in srgb,var(--pad-color),white 28%);border-radius:20px;background:linear-gradient(150deg,#fff 10%,color-mix(in srgb,var(--pad-color),white 88%) 100%);box-shadow:0 5px 0 color-mix(in srgb,var(--pad-color),#725d4b 30%),0 9px 15px #65513a12;color:#514c46;cursor:pointer;touch-action:manipulation;transition:transform .12s,box-shadow .12s}
.drum-pad:active,.drum-pad.is-hit{transform:translateY(4px) scale(.98);box-shadow:0 1px 0 color-mix(in srgb,var(--pad-color),#725d4b 30%),0 3px 8px #65513a18}
.drum-pad:disabled{opacity:.55;cursor:not-allowed;filter:saturate(.65)}
.drum-pad-symbol{display:grid;place-items:center;width:55px;height:55px;border-radius:50%;background:color-mix(in srgb,var(--pad-color),white 78%);font-size:31px}
.drum-pad strong{font-size:15px}.drum-pad small{font-size:11px;color:#81786e}
.drum-recorder{display:grid;gap:10px;padding:14px;border-radius:17px;background:#fff;border:1px solid #e9e2d9}
.drum-recorder-status{font-size:13px;font-weight:800;color:#6e645b}
.drum-recorder-actions,.drum-challenge-actions{display:flex;flex-wrap:wrap;gap:8px}
.drum-recorder-actions .button,.drum-challenge-actions .button{flex:1;min-width:125px}
.drum-studio-tip{margin:0;padding:10px 12px;border-radius:12px;background:#f3f0e8;color:#766d61;font-size:12px;line-height:1.6}
.drum-listen-panel{display:grid;gap:11px;padding:14px;border-radius:17px;background:#fff;border:1px solid #e9e2d9}
.drum-beat-dots{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:7px}
.drum-beat-dots span{display:grid;place-items:center;aspect-ratio:1;border-radius:50%;background:#f0ece6;color:#8a8177;font-size:12px;font-weight:850;transition:background .15s,transform .15s}
.drum-beat-dots span.is-sounding{background:#ffe1a8;color:#81542c;transform:scale(1.12);box-shadow:0 0 0 4px #ffe1a84d}
.drum-beat-dots span.is-done{background:#d9f0df;color:#387b54}
#drum-challenge-status{margin:0;color:#6e6257;font-size:13px;font-weight:800}
#game-modal[data-game="drum-paint"] .game-progress-panel{margin:0}
@media(max-width:560px){.drum-studio{gap:12px}.drum-studio-hero{padding:12px;gap:9px}.drum-studio-mascot{flex-basis:48px;height:48px;font-size:29px}.drum-studio-hero h3{font-size:18px}.drum-studio-hero p{font-size:12px}.drum-studio-acorn{font-size:25px}.drum-pad-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.drum-pad{min-height:112px;border-radius:17px}.drum-pad-symbol{width:49px;height:49px;font-size:28px}.drum-recorder-actions .button,.drum-challenge-actions .button{min-height:44px}.drum-beat-dots{gap:5px}.drum-beat-dots span{font-size:11px}}
@media(prefers-reduced-motion:reduce){.drum-pad,.drum-beat-dots span{transition:none!important}}

/* v7.8.0 — audio-first rhythm bingo */
.bingo-music-mission{display:flex;align-items:center;justify-content:space-between;gap:14px;max-width:620px;margin:12px auto;padding:16px;border:1px solid #dce9dc;border-radius:20px;background:linear-gradient(135deg,#f2fbf4,#f1f4ff)}
.bingo-music-copy{min-width:0}.bingo-eyebrow{font-size:11px;font-weight:800;letter-spacing:.12em;color:#64836d}.bingo-music-copy p{margin:5px 0 8px;line-height:1.55}.bingo-beat-guide{font-size:13px;color:#62756a;font-weight:700}.bingo-replay{flex:0 0 auto;min-height:48px}.bingo-cell{position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px}.bingo-cell-note{font-size:clamp(34px,8vw,48px);line-height:1;color:#6b8e83}.bingo-cell small{font-size:11px;color:#7a887e}.bingo-cell.is-bingo-marked .bingo-cell-note{color:#347d52}.bingo-cell.is-bingo-wrong .bingo-cell-note{color:#b96b5b}.bingo-cell:disabled{cursor:default}.bingo-cell:focus-visible,.bingo-replay:focus-visible{outline:3px solid #547fce;outline-offset:3px}
@media(max-width:520px){.bingo-music-mission{align-items:stretch;flex-direction:column;padding:13px}.bingo-replay{width:100%}.bingo-grid{width:min(100%,360px)}}

/* v7.9.0 — action dice movement adventure */
.dice-adventure{display:grid;gap:15px;padding:clamp(12px,3vw,22px);border:1px solid #eadff6;border-radius:26px;background:linear-gradient(145deg,#fffaf0 0%,#f6f0ff 54%,#eef8f1 100%);box-shadow:0 12px 32px #58427a12}
.dice-adventure-hero{display:grid;grid-template-columns:76px minmax(0,1fr) 42px;align-items:center;gap:12px;padding:14px;border-radius:20px;background:linear-gradient(110deg,#fff 0%,#fff5e8 100%);border:1px solid #f2e4d3}
.dice-hero-mascot{display:grid;place-items:center;width:68px;height:68px;border-radius:22px;background:#f3eaff;font-size:42px}
.dice-kicker{font-size:10px;letter-spacing:.12em;font-weight:800;color:#9278b7}
.dice-adventure-hero h3{margin:3px 0 5px;color:#4c3d69;font-size:clamp(19px,4vw,25px)}
.dice-adventure-hero p{margin:0;color:#746b7e;font-size:13px;line-height:1.55}
.dice-hero-acorn{font-size:32px;align-self:start}
.dice-adventure-board{display:grid;justify-items:center;gap:12px;padding:18px 14px;border:1px solid #e6ddf4;border-radius:22px;background:linear-gradient(145deg,#fff,#f7f2ff)}
.dice-board-heading{display:flex;justify-content:space-between;align-items:center;gap:10px;width:100%;color:#65527f}
.dice-board-heading span{font-size:12px;color:#827891}
.dice-cube-wrap{display:grid;place-items:center;min-height:116px}
.dice-cube{width:100px;height:100px;border:3px solid #c7b7e8;border-radius:25px;background:linear-gradient(145deg,#fff,#f2eaff);box-shadow:0 8px 0 #ded4f0,0 14px 24px #6f57951c;font-size:62px}
.dice-cube.dice-roll{animation:dice-tumble .16s linear infinite}
.dice-result{display:grid;gap:6px;max-width:520px;text-align:center;color:#554477}
.dice-result strong{font-size:clamp(20px,4vw,26px);line-height:1.35}
.dice-result>span:not(.dice-task-category){font-size:16px;line-height:1.55;color:#5d536d}
.dice-result small{font-size:12px;color:#847990}
.dice-task-category{justify-self:center;padding:5px 12px;border-radius:999px;background:#eee7fa;color:#70599a;font-size:12px;font-weight:800}
.dice-task-tip{width:100%;padding:10px 12px;border-radius:13px;background:#fff8e9;color:#7a6546;font-size:13px;text-align:center;line-height:1.5}
.dice-mode{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:0}
.dice-mode button[aria-pressed=true]{background:#e9e1fb;border-color:#9078c5;color:#49366f;box-shadow:inset 0 0 0 1px #9078c5}
.dice-trail{display:flex;justify-content:center;gap:clamp(5px,2vw,12px);flex-wrap:wrap;padding:8px 0}
.dice-trail-dot{display:grid;place-items:center;width:34px;height:34px;border:1px dashed #c8b8dc;border-radius:50%;background:#fff;color:#a89bb9;font-size:23px;line-height:1}
.dice-trail-dot.is-done{border:1px solid #d5b46c;background:#fff1c9;box-shadow:0 3px 0 #ead8a8;animation:acorn-pop .28s ease-out}
.dice-count,.dice-status{text-align:center;margin:0;color:#65577b;font-weight:700}
.dice-status{font-size:13px;font-weight:500;color:#81758e}
.dice-controls{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;margin:0}
.dice-controls button{min-height:46px}
.dice-safety{margin:0;padding:12px 14px;border-radius:14px;background:#fff;border:1px solid #e6e0d6;color:#6c665d;font-size:12px;line-height:1.65}
.dice-safety strong{color:#66533d}
@keyframes acorn-pop{0%{transform:scale(.65) rotate(-15deg)}70%{transform:scale(1.15) rotate(7deg)}100%{transform:scale(1)}}
@media(max-width:560px){.dice-adventure{padding:10px;border-radius:19px;gap:12px}.dice-adventure-hero{grid-template-columns:54px minmax(0,1fr) 24px;padding:10px;gap:9px}.dice-hero-mascot{width:52px;height:52px;border-radius:17px;font-size:33px}.dice-kicker{font-size:9px}.dice-adventure-hero p{font-size:12px}.dice-hero-acorn{font-size:23px}.dice-adventure-board{padding:14px 10px}.dice-cube{width:88px;height:88px;font-size:54px}.dice-cube-wrap{min-height:96px}.dice-controls{display:grid;grid-template-columns:1fr 1fr}.dice-controls #roll{grid-column:1/-1}.dice-controls button{width:100%;padding-inline:8px}.dice-result>span:not(.dice-task-category){font-size:15px}.dice-safety{font-size:11px}}
@media(prefers-reduced-motion:reduce){.dice-cube.dice-roll{animation:none}.dice-trail-dot.is-done{animation:none}}

/* v8.0: interactive Zhuyin listening and tone contour scene */
#game-modal[data-game="zhuyin-tone"] .zhuyin-tone-demo{display:grid;justify-items:center;gap:8px;margin:14px auto 18px;padding:14px;max-width:360px;border:1px solid #b9d6e8;border-radius:18px;background:rgba(255,255,255,.72)}
#game-modal[data-game="zhuyin-tone"] .zhuyin-tone-demo svg{width:min(100%,300px);height:auto;overflow:visible}
#game-modal[data-game="zhuyin-tone"] .zhuyin-tone-demo p{margin:0;text-align:center;font-size:.92rem;color:#526b7d}
#game-modal[data-game="zhuyin-tone"] .question-options{gap:12px}
#game-modal[data-game="zhuyin-tone"] .question-options .play-option{min-width:76px;font-size:1.18rem;font-weight:800}

/* Digital writing quest */
.trace-game-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:12px 0}.trace-game-head h3{margin:4px 0;font-size:clamp(21px,4vw,28px)}.trace-game-head p{margin:4px 0}.trace-round-count{flex:none;display:grid;place-items:center;width:58px;height:58px;border-radius:18px;background:#fff0d8;color:#80552d;font-size:25px;font-weight:800}.trace-round-count small{font-size:11px;font-weight:600}.trace-tool-row,.trace-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:12px 0}.trace-practice-board{touch-action:none}.trace-game-status{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:9px 13px;border-radius:12px;background:#f4f7ef;color:#476b54;font-weight:700;font-size:14px}.trace-actions{justify-content:space-between}.trace-tool-row .button,.trace-actions .button{min-height:42px}@media(max-width:520px){.trace-tool-row .button{flex:1 1 calc(50% - 8px);padding:10px 8px;font-size:14px}.trace-actions .button{flex:1}.trace-game-head{align-items:flex-start}.trace-round-count{width:50px;height:50px}}

/* v8.2.0: interactive note-count and rhythm-count adventure */
.note-count-game{display:grid;gap:15px;max-width:760px;margin:10px auto;padding:clamp(12px,3vw,22px);border:1px solid #e8dfc9;border-radius:24px;background:linear-gradient(150deg,#fffaf0 0%,#f2f8ff 55%,#eff8ee 100%);box-shadow:0 12px 28px #4e604014}
.note-count-header{text-align:center;padding:12px;border-radius:18px;background:#fff;border:1px solid #eee5d5}
.note-count-kicker{font-size:10px;letter-spacing:.12em;font-weight:900;color:#927344}
.note-count-header h3{margin:5px 0;color:#435c55;font-size:clamp(20px,4vw,27px)}
.note-count-header p{margin:5px 0;color:#66766f;font-size:14px;line-height:1.55}
.note-count-level{display:inline-block;margin-top:7px;padding:5px 12px;border-radius:999px;background:#f4ead2;color:#765c2c;font-size:12px;font-weight:800}
.note-count-legend{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}
.note-count-legend span{padding:7px 10px;border-radius:12px;background:#fff;border:1px solid #e4e8df;color:#56665e;font-size:12px;font-weight:700}
.note-count-legend b{font-size:20px;color:#4c6482;vertical-align:middle;margin-right:4px}
.note-count-score{padding:16px 12px;border-radius:18px;background:repeating-linear-gradient(to bottom,#fff 0,#fff 17px,#dce5ed 18px,#fff 19px);border:1px solid #dce5ed;overflow:hidden}
.note-count-staff{display:flex;justify-content:center;align-items:center;gap:clamp(8px,2vw,20px);flex-wrap:wrap;min-height:92px}
.note-count-item{display:grid;justify-items:center;gap:2px;min-width:44px;padding:4px 2px;border-radius:10px;background:#ffffffd9}
.note-count-glyph{font-family:"Noto Music","Segoe UI Symbol",serif;font-size:clamp(35px,7vw,49px);line-height:1.1;color:#344e6d}
.note-count-name{font-size:10px;font-weight:800;color:#627080;white-space:nowrap}
.note-count-index{font-size:10px;color:#9aa4ad}
.note-count-question{display:grid;gap:5px;text-align:center}
.note-count-question strong{font-size:clamp(18px,4vw,23px);color:#344d45}
.note-count-question span{font-size:13px;color:#718078}
.note-count-play{justify-self:center;min-width:min(100%,220px);min-height:48px}
.note-count-audio-status,.note-count-feedback{text-align:center;margin:0;color:#65766d;font-size:13px;min-height:20px}
.note-count-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.note-count-option{display:grid;place-items:center;min-height:64px;border:2px solid #d7e3dc;border-radius:16px;background:#fff;color:#365b4b;font-size:27px;font-weight:900;box-shadow:0 3px 0 #e2e9e3;cursor:pointer}
.note-count-option small{font-size:11px;font-weight:700;color:#718078}
.note-count-option:hover:not(:disabled){border-color:#8db7a0;transform:translateY(-1px)}
.note-count-option:focus-visible{outline:3px solid #6c9dca;outline-offset:3px}
.note-count-option:disabled{opacity:.62;cursor:default}
.note-count-option.answer-correct{border-color:#55a27b;background:#eaf7ee;color:#236342;opacity:1}
.note-count-option.answer-wrong{border-color:#d78a82;background:#fff0ee;color:#9a4a43}
@media(max-width:520px){.note-count-game{padding:10px;border-radius:18px;gap:12px}.note-count-score{padding:10px 6px}.note-count-staff{gap:5px}.note-count-item{min-width:38px}.note-count-name{font-size:9px}.note-count-options{gap:7px}.note-count-option{min-height:58px;font-size:24px;border-radius:13px}.note-count-legend{gap:5px}.note-count-legend span{padding:6px 7px;font-size:11px}}


/* v8.3.0: number ordering and digital acorn abacus quest */
.math-quest{max-width:720px;margin:16px auto;padding:clamp(14px,3vw,24px);border:1px solid #dce7dc;border-radius:22px;background:linear-gradient(155deg,#fffdf4,#f0f8f1);text-align:center;box-shadow:0 8px 24px #244b3510}
.math-quest-head{padding:4px 0 12px}.math-quest-kicker{font-size:11px;letter-spacing:.12em;font-weight:900;color:#64816a}.math-quest-head h3{margin:6px 0;font-size:clamp(22px,4vw,30px);color:#294b39}.math-quest-head p{margin:5px 0;color:#52685b}.math-quest-meta{display:inline-block;margin-top:8px;padding:6px 12px;border-radius:99px;background:#e4f0df;color:#365b40;font-weight:800;font-size:13px}
.math-order-panel,.math-abacus{padding:16px;border-radius:18px;background:#ffffffd9;border:1px solid #e2eadf}.math-order-instruction{font-weight:800;color:#3c5c48}.math-order-answer{min-height:64px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px;margin:12px 0;padding:10px;border:2px dashed #d4e3d4;border-radius:14px;background:#f8fbf6}.math-order-empty{color:#87958b;font-size:14px}.math-order-picked,.math-number-tile{min-width:48px;min-height:48px;border:2px solid #d6e5d6;border-radius:13px;background:#fff;font-size:22px;font-weight:900;color:#31563e;cursor:pointer}.math-order-picked{background:#e9f4e6;border-color:#9ec39e}.math-number-bank{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin:16px 0}.math-number-tile{min-width:56px;min-height:56px;background:#fff6d9;border-color:#f0d58c;color:#75501a}.math-number-tile:disabled{opacity:.42;cursor:default;filter:grayscale(.7)}.math-order-actions{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.math-quest-equation{margin:12px 0 16px;font-size:clamp(28px,6vw,42px);font-weight:950;color:#294b39;letter-spacing:.04em}.math-abacus{max-width:580px;margin:auto}.math-abacus-label{font-weight:800;color:#61766a}.math-abacus-count{display:flex;justify-content:center;align-items:baseline;gap:9px;margin:4px 0 10px;color:#64776b}.math-abacus-count strong{font-size:clamp(38px,8vw,52px);line-height:1;color:#315b3e}.math-bead-tray{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:5px;min-height:88px;padding:12px;border-radius:14px;background:repeating-linear-gradient(0deg,#f7f3e7 0 27px,#e8dfc9 28px 30px)}.math-bead{width:34px;height:36px;padding:0;border:1px solid #d9d5c6;border-radius:10px;background:#fff;opacity:.35;filter:grayscale(1);font-size:20px;cursor:pointer}.math-bead.is-on{opacity:1;filter:none;background:#fff1c8;border-color:#e7c36c;transform:translateY(-2px)}.math-abacus-controls{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:14px 0 4px}.math-abacus-controls button{min-width:125px}.math-abacus-hint{margin:8px 0 0;color:#718176;font-size:13px}.math-quest-target{margin:14px 0;padding:12px;border-radius:13px;background:#eaf3e8;color:#3b5d43;font-weight:750;line-height:1.6}.math-quest #math-check{min-width:180px}.math-quest .math-feedback{min-height:48px;margin:12px auto 0;padding:11px;border-radius:12px;background:#f3f7ef;line-height:1.6}.math-quest-foot{margin-top:12px;color:#78877d;font-size:12px}
.math-number-tile:focus-visible,.math-order-picked:focus-visible,.math-bead:focus-visible{outline:3px solid #4c9c71;outline-offset:3px}.math-number-tile:disabled{cursor:not-allowed}
@media(max-width:480px){.math-quest{padding:12px;border-radius:16px}.math-number-bank{gap:7px}.math-number-tile{min-width:48px;min-height:50px}.math-bead{width:29px;height:32px;font-size:17px}.math-abacus-controls{display:grid;grid-template-columns:1fr 1fr}.math-abacus-controls button{min-width:0}}
@media(prefers-reduced-motion:reduce){.math-bead{transform:none!important;transition:none}}

/* v8.4.0 — full-screen daily routine quest */
.routine-quest{max-width:820px;margin:14px auto;padding:clamp(14px,3vw,24px);border:1px solid #e5e9d9;border-radius:22px;background:linear-gradient(145deg,#fffdf6,#f1f8ed);box-shadow:0 12px 30px #3d57300d}
.routine-quest-head{text-align:center;padding:8px 4px 14px}
.routine-kicker{display:inline-block;color:#64865a;font-size:11px;font-weight:900;letter-spacing:.14em}
.routine-quest-head h3{margin:7px 0;font-size:clamp(23px,4vw,30px);color:#34563d}
.routine-mission-count{margin:0;color:#7b876f;font-size:13px;font-weight:800}
.routine-quest-head h4{margin:12px 0 5px;font-size:21px;color:#805b2f}
.routine-quest-head p:last-child{margin:6px auto 0;max-width:560px;line-height:1.7}
.routine-rule{display:flex;gap:12px;align-items:flex-start;margin:10px 0 20px;padding:13px 15px;border-radius:15px;background:#fff1d8;color:#674b28;line-height:1.65}
.routine-rule strong{flex:0 0 auto}
.routine-quest>h4,.routine-arrange-head h4{margin:16px 0 10px;color:#3f5e43}
.routine-task-card{display:flex;align-items:center;justify-content:flex-start;gap:10px;min-height:58px;text-align:left;border-radius:15px}
.routine-task-card:disabled{opacity:.45;filter:saturate(.55)}
.routine-task-icon{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:11px;background:#f4f0df;font-size:20px}
.routine-arrange-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:22px}
.routine-count{padding:5px 11px;border-radius:99px;background:#e8f1e4;color:#456b48;font-weight:850;font-variant-numeric:tabular-nums}
.routine-order-list{min-height:66px;padding:10px;margin:0 0 14px;border:2px dashed #d5e1ce;border-radius:16px;background:#ffffffa8}
.routine-step{min-height:54px;cursor:grab;touch-action:pan-y}
.routine-step-name{font-size:16px}
.routine-controls{display:flex;flex-wrap:wrap;gap:9px;justify-content:center;margin-top:14px}
.routine-feedback{min-height:48px;margin:14px 0 0;padding:12px 14px;border-radius:13px;background:#fff;color:#53644e;line-height:1.65}
@media(max-width:560px){.routine-quest{padding:12px;border-radius:17px}.routine-rule{display:block}.routine-rule strong{display:block;margin-bottom:4px}.routine-task-card{min-height:54px}.routine-controls .button{flex:1 1 42%}}

/* v8.5 — branching emotion theatre, fully on-screen */
#game-modal[data-game="emotion-theatre"] .emotion-theatre{max-width:720px;margin:12px auto 0;text-align:left}
#game-modal[data-game="emotion-theatre"] .emotion-scene-top{padding:18px;border:1px solid #efd5e2;border-radius:22px;background:linear-gradient(145deg,#fff8fb,#f5f0ff);text-align:center}
#game-modal[data-game="emotion-theatre"] .emotion-kicker{display:block;color:#9b6e8a;font-size:11px;font-weight:900;letter-spacing:.12em}
#game-modal[data-game="emotion-theatre"] .emotion-scene-count{display:block;margin-top:5px;color:#856f83;font-size:13px;font-weight:800}
#game-modal[data-game="emotion-theatre"] .emotion-mascot{position:relative;width:104px;height:90px;margin:12px auto 6px;display:grid;place-items:center;border-radius:28px;background:linear-gradient(145deg,#ffe8ef,#eee7ff);font-size:62px}
#game-modal[data-game="emotion-theatre"] .emotion-mascot span{position:absolute;right:4px;bottom:1px;font-size:25px}
#game-modal[data-game="emotion-theatre"] .emotion-scene-top h3{margin:8px 0;font-size:clamp(22px,4vw,29px);color:#684b65}
#game-modal[data-game="emotion-theatre"] .emotion-scene-top>p{max-width:570px;margin:8px auto 14px;line-height:1.8}
#game-modal[data-game="emotion-theatre"] .emotion-clue{display:flex;gap:10px;align-items:flex-start;text-align:left;padding:12px 14px;border-radius:14px;background:#fff;border:1px solid #f0dce6;color:#6e5a70;line-height:1.65}
#game-modal[data-game="emotion-theatre"] .emotion-clue b{flex:none;color:#a16f8d}
#game-modal[data-game="emotion-theatre"] .emotion-theatre>h4{margin:20px 0 8px;color:#694f6a;font-size:17px}
#game-modal[data-game="emotion-theatre"] .emotion-soft-note{margin:0 0 10px;color:#786d7a;font-size:14px;line-height:1.65}
#game-modal[data-game="emotion-theatre"] .emotion-feelings,#game-modal[data-game="emotion-theatre"] .emotion-responses{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
#game-modal[data-game="emotion-theatre"] .emotion-feelings .play-option{min-height:62px;font-size:17px}
#game-modal[data-game="emotion-theatre"] .emotion-responses .play-option{min-height:66px;font-size:15px;line-height:1.5}
#game-modal[data-game="emotion-theatre"] .play-option[aria-pressed="true"]{border-color:#b47b9e;background:#fff0f7;box-shadow:0 0 0 3px #e8c8da66}
#game-modal[data-game="emotion-theatre"] .emotion-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px}
#game-modal[data-game="emotion-theatre"] .emotion-outcome-card{margin-top:18px;padding:18px;border:1px solid #e7d3e8;border-radius:20px;background:linear-gradient(145deg,#fff,#f7f2ff);text-align:center}
#game-modal[data-game="emotion-theatre"] .emotion-outcome-icon{font-size:34px}
#game-modal[data-game="emotion-theatre"] .emotion-outcome-card h4{margin:8px 0;color:#73547b}
#game-modal[data-game="emotion-theatre"] .emotion-outcome-card>p{line-height:1.75}
#game-modal[data-game="emotion-theatre"] .emotion-affirmation{padding:10px;border-radius:12px;background:#fff8e9;color:#806747}
#game-modal[data-game="emotion-theatre"] .emotion-breathing{margin:18px auto;padding:15px;border-radius:17px;background:#f1f7f2}
#game-modal[data-game="emotion-theatre"] .emotion-breath-orb{display:grid;place-items:center;width:74px;height:74px;margin:4px auto 10px;border-radius:50%;background:linear-gradient(145deg,#dff3e8,#e9e2ff);font-size:28px}
#game-modal[data-game="emotion-theatre"] .emotion-breath-orb.is-breathing{animation:emotion-breathe 4s ease-in-out 4 alternate}
@keyframes emotion-breathe{from{transform:scale(.78);box-shadow:0 0 0 0 #b7d9c566}to{transform:scale(1.18);box-shadow:0 0 0 13px #b7d9c500}}
#game-modal[data-game="emotion-theatre"] #emotion-next{margin-top:10px}
@media(max-width:520px){#game-modal[data-game="emotion-theatre"] .emotion-feelings,#game-modal[data-game="emotion-theatre"] .emotion-responses{grid-template-columns:1fr}#game-modal[data-game="emotion-theatre"] .emotion-actions>*{flex:1 1 auto}}
@media(prefers-reduced-motion:reduce){#game-modal[data-game="emotion-theatre"] .emotion-breath-orb.is-breathing{animation:none}}

/* v8.6 — bilingual word quest: picture, listening, spelling and category play */
#game-modal[data-game="bilingual-words"] .vocab-adventure{max-width:680px;margin:10px auto 0;text-align:center}
#game-modal[data-game="bilingual-words"] .vocab-level-banner{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:12px 15px;border:1px solid #dce9df;border-radius:16px;background:linear-gradient(110deg,#f0fff4,#fff8e9);color:#52745e;text-align:left}
#game-modal[data-game="bilingual-words"] .vocab-level-banner span{font-size:10px;font-weight:900;letter-spacing:.12em}
#game-modal[data-game="bilingual-words"] .vocab-level-banner strong{font-size:15px}
#game-modal[data-game="bilingual-words"] .vocab-level-banner small{font-size:12px;font-weight:800}
#game-modal[data-game="bilingual-words"] .vocab-card{min-height:190px;border:1px solid #dce8df;border-radius:22px;background:linear-gradient(145deg,#f5fff7,#fff 65%);box-shadow:0 8px 22px #375c4412}
#game-modal[data-game="bilingual-words"] .vocab-picture{font-size:clamp(58px,13vw,82px)}
#game-modal[data-game="bilingual-words"] .vocab-word{font-size:clamp(34px,8vw,48px);letter-spacing:.04em}
#game-modal[data-game="bilingual-words"] .vocab-letter-bank{display:flex;justify-content:center;flex-wrap:wrap;gap:9px;max-width:520px;margin:14px auto}
#game-modal[data-game="bilingual-words"] .vocab-letter{width:48px;height:52px;border:1px solid #cbdccf;border-radius:13px;background:#fff;color:#365d48;font-size:22px;font-weight:900;box-shadow:0 3px 0 #dce9df}
#game-modal[data-game="bilingual-words"] .vocab-letter:disabled{opacity:.3;box-shadow:none;transform:translateY(2px)}
#game-modal[data-game="bilingual-words"] .vocab-letter-slots{display:flex;justify-content:center;flex-wrap:wrap;gap:6px;min-height:42px;margin-top:12px}
#game-modal[data-game="bilingual-words"] .vocab-letter-slot{display:grid;place-items:center;width:34px;height:40px;border-bottom:3px solid #8fb39a;border-radius:6px 6px 2px 2px;background:#eff8f0;color:#365d48;font-weight:900}
#game-modal[data-game="bilingual-words"] .vocab-letter-slot.is-empty{color:#a8b7aa;background:#f8fbf8}
#game-modal[data-game="bilingual-words"] .vocab-letter-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:9px}
#game-modal[data-game="bilingual-words"] .vocab-card .button{margin-top:8px}
@media(max-width:520px){#game-modal[data-game="bilingual-words"] .vocab-level-banner{justify-content:center;text-align:center}#game-modal[data-game="bilingual-words"] .vocab-letter{width:43px;height:48px}}

/* v8.7 STEAM inquiry lab */
.steam-mission{max-width:760px;margin:12px auto;padding:16px 18px;border:1px solid #d9e7dc;border-radius:18px;background:linear-gradient(135deg,#f3fbf4,#f3f8ff)}
.steam-mission-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.steam-eyebrow{font-size:11px;font-weight:900;letter-spacing:.12em;color:#52836b}.steam-mission-heading strong{font-size:17px}.steam-mission p{margin:8px 0}.steam-task-chip{display:inline-flex;gap:7px;align-items:center;padding:7px 12px;border-radius:999px;background:#fff;color:#49655a;font-size:13px}
.steam-stage{max-width:620px;min-height:190px;margin:14px auto;padding:20px;border-radius:20px;background:linear-gradient(180deg,#f8fcff,#eaf5f7);display:flex;align-items:center;justify-content:center;gap:14px;position:relative;overflow:hidden}.steam-object-name{font-size:13px;font-weight:800;color:#58716a}.steam-tank{width:220px;height:125px;border:4px solid #70b9ce;border-top:0;border-radius:0 0 20px 20px;position:relative;overflow:hidden;background:linear-gradient(180deg,#d8f4fa,#8bd3e5);display:flex;justify-content:center;align-items:center}.steam-surface{position:absolute;top:24px;left:0;right:0;border-top:3px solid #4daac7}.steam-tank-water{position:absolute;inset:36px 0 0;background:#77c9dc55}.steam-floating-object{position:absolute;z-index:2;top:5px;font-size:42px;transition:top .55s ease}.steam-floating-object.steam-float-result{top:5px}.steam-floating-object.steam-sink-result{top:72px}.steam-magnet-large{font-size:62px}.steam-magnet-force{font-size:14px;font-weight:800;color:#467f9b}.steam-magnet-target{font-size:44px;transition:transform .5s}.steam-magnet-target.steam-magnet-attracted{transform:translateX(-22px)}.steam-light-beam{display:flex;align-items:center;gap:12px}.steam-light-beam span{width:90px;height:90px;border-radius:50%;display:grid;place-items:center;color:white;font-size:13px;font-weight:900;background:var(--light-a);box-shadow:0 0 26px var(--light-a)}.steam-light-beam span:nth-of-type(2){background:var(--light-b);box-shadow:0 0 26px var(--light-b)}.steam-light-beam b{font-size:24px}.steam-light-result{position:absolute;bottom:10px;padding:7px 18px;border-radius:999px;color:#263b34;font-weight:900;background:#fff}.steam-ramp{width:180px;height:100px;border-left:7px solid #a77b4e;border-bottom:7px solid #a77b4e;transform:skewY(-24deg);position:relative;background:repeating-linear-gradient(0deg,#d9bd93 0 9px,#c9a879 9px 12px)}.steam-ramp.is-rough{background:repeating-linear-gradient(0deg,#9e9e9e 0 5px,#777 5px 8px)}.steam-ramp-ball{position:absolute;left:8px;top:2px;font-size:26px;transform:skewY(24deg)}.steam-ramp-ball.steam-ball-roll{animation:steam-roll .8s ease-out forwards}@keyframes steam-roll{to{left:135px;top:78px}}.steam-ramp-track{position:absolute;bottom:14px;left:20%;right:12%;height:8px;background:#d0dce0;border-radius:99px}.steam-ramp-track span{display:block;width:0;height:100%;border-radius:99px;background:#57a77a;transition:width .6s}.steam-ramp-track span.is-long{width:100%}.steam-ramp-track span.is-short{width:40%}.steam-plant-pot{font-size:76px;transition:transform .5s}.steam-plant-factors{display:grid;gap:8px}.steam-plant-factors span{padding:8px 12px;border-radius:12px;background:#fff;font-size:13px}.steam-plant-factors .is-on{border:1px solid #9bcda9}.steam-plant-factors .is-off{border:1px solid #e0b8a9;opacity:.78}.steam-plant-days{position:absolute;bottom:12px;font-size:12px;color:#607a70}
.steam-hypothesis,.steam-observation-panel{max-width:760px;margin:12px auto;padding:16px;border:1px solid #e0e8e4;border-radius:18px;background:#fff}.steam-hypothesis h4,.steam-observation-panel h4{margin:0 0 6px}.steam-hypothesis>p,.steam-observation-panel>p{margin:6px 0 12px}.steam-predictions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 14px}.steam-prediction,.steam-answer{flex:1 1 135px;min-height:46px;padding:9px 12px;border:1px solid #d5e1dc;border-radius:13px;background:#f8fbf9;color:var(--ink,#263b34);font-weight:750}.steam-prediction.is-selected{border:2px solid #4b9b70;background:#eaf7ee}.steam-prediction:disabled{opacity:.6}.steam-answer:disabled{opacity:.65}.steam-answer.is-wrong{border-color:#d97878;background:#fff0f0}.steam-answer.is-correct{border-color:#4b9b70;background:#eaf7ee}.steam-stage-status{font-size:13px;color:#60756b;margin:10px 0 0}.steam-science-note{max-width:760px;margin:10px auto;color:var(--muted,#64756d);font-size:12px;line-height:1.6}.steam-observation-panel[hidden]{display:none}
@media(max-width:520px){.steam-stage{min-height:170px;padding:12px}.steam-tank{width:180px}.steam-light-beam span{width:70px;height:70px}.steam-mission{padding:13px}.steam-prediction,.steam-answer{flex-basis:100%}}
@media(prefers-reduced-motion:reduce){.steam-floating-object,.steam-magnet-target,.steam-plant-pot,.steam-ramp-track span{transition:none}.steam-ramp-ball.steam-ball-roll{animation:none;left:135px}}


/* v8.8 pattern construction and creation studio */
.pattern-mission{max-width:820px;margin:12px auto;padding:16px;border:1px solid #dbe7df;border-radius:22px;background:linear-gradient(145deg,#f5fbf5,#f4f8ff)}
.pattern-mission-top{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;color:#527e65;font-size:12px;font-weight:900;letter-spacing:.04em}.pattern-mission h3{margin:12px 0 5px;font-size:clamp(19px,4vw,25px);color:#2e5140}.pattern-mission>p{margin:6px 0 14px;color:#60756a;line-height:1.65}
.pattern-sequence{display:flex;align-items:stretch;justify-content:center;gap:7px;flex-wrap:wrap;margin:16px auto;padding:14px 10px;border:1px solid #dce8e0;border-radius:17px;background:#fff;min-height:82px}.pattern-symbol{display:flex;min-width:54px;min-height:58px;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:5px 4px;border:1px solid #e5ece7;border-radius:12px;background:#fbfdfb}.pattern-symbol b{font-size:27px;line-height:1.1}.pattern-symbol small{font-size:10px;color:#718277;font-weight:750}.pattern-symbol.is-small{min-width:46px;min-height:48px}.pattern-symbol.is-small b{font-size:21px}.pattern-slot{display:flex;min-width:74px;min-height:65px;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:2px dashed #9db8a5;border-radius:13px;background:#f3faf4;color:#527e65;font-size:25px;font-weight:900}.pattern-slot small{font-size:10px}.pattern-slot.is-active{outline:3px solid #e8c66d;outline-offset:2px;background:#fff9e9}.pattern-slot.is-filled{border-style:solid;border-color:#83b292;background:#f1faf3}.pattern-slot.is-error{border-color:#d87878;background:#fff1f1}.pattern-slot.is-correct{border-color:#4c9c69;background:#e7f6eb}
.pattern-builder{padding:14px;border:1px solid #dce8e0;border-radius:17px;background:#fff}.pattern-builder-title{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;align-items:center}.pattern-builder-title span,.pattern-slots-status{font-size:12px;color:#6a7d72}.pattern-bank{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;margin:13px 0}.pattern-token{padding:4px;border:2px solid transparent;border-radius:14px;background:#f5f9f6;cursor:pointer}.pattern-token .pattern-symbol{border:0;background:transparent}.pattern-token.is-picked{border-color:#e0b953;background:#fff9e8}.pattern-token:disabled{opacity:.45;cursor:default}.pattern-slots-status{text-align:center;margin:6px 0 10px}.pattern-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.pattern-actions .button{min-height:42px}.pattern-hint{margin:12px 2px;color:#60756a;font-size:13px}.pattern-hint summary{cursor:pointer;font-weight:800;color:#527e65}.pattern-hint p{padding:8px 12px;border-radius:12px;background:#fff}.pattern-feedback{margin:12px 0 4px;padding:11px 13px;border-radius:12px;background:#fff;color:#536b5b;font-size:13px;line-height:1.6}.pattern-round-label{text-align:right;font-size:12px!important;color:#75867b!important}.pattern-design-slots{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:15px 0;padding:14px;background:#fff;border:1px solid #e0e9e2;border-radius:16px}.pattern-design-slots .pattern-slot:disabled{opacity:.45}.pattern-design-preview{margin:14px 0;padding:12px;border-radius:15px;background:#fff;text-align:center;color:#536b5b}.pattern-design-preview .pattern-sequence{margin:10px auto}.pattern-design-preview p{font-size:13px}.pattern-created-sequence{gap:4px}.pattern-created-sequence .pattern-symbol{min-width:39px;min-height:45px}.pattern-created-sequence .pattern-symbol b{font-size:20px}.pattern-creator-note{font-size:12px!important;text-align:center}
@media(max-width:560px){.pattern-mission{padding:12px}.pattern-sequence{gap:4px;padding:9px 5px}.pattern-symbol{min-width:43px;min-height:51px}.pattern-symbol b{font-size:23px}.pattern-slot{min-width:62px;min-height:58px}.pattern-actions .button{flex:1 1 42%}.pattern-created-sequence .pattern-symbol{min-width:31px}}

/* v8.9.0：分類挑戰站 */
.sort-workspace{display:grid;gap:16px;margin:16px 0}
.sort-items{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.sort-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:10px 5px}
.sort-choice small{font-size:12px;line-height:1.35}
.sort-choice.is-selected{outline:3px solid var(--accent,#e28a45);outline-offset:2px;transform:translateY(-2px)}
.sort-choice.is-assigned{background:var(--surface-soft,#fff4df)}
.sort-bins{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.sort-bin{display:flex;align-items:center;justify-content:center;gap:10px;white-space:normal}
.sort-bin-count{display:inline-grid;place-items:center;min-width:25px;min-height:25px;border-radius:50%;background:#fff;color:#6b4b2e;font-weight:800}
.sort-target{text-align:center;padding:12px;border-radius:16px;background:var(--surface-soft,#fff4df)}
.sort-target p{margin:5px 0}
.sort-round-feedback{min-height:1.5em}
@media(max-width:560px){.sort-items{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.sort-choice{min-height:76px!important}.sort-bins{grid-template-columns:1fr}.sort-bin{min-height:54px}}
/* Spot-the-difference paired-scene interaction */
.diff-board{background:#fffdf8;border:1px solid #eadfca;border-radius:16px;padding:10px;min-width:0;text-align:center;box-shadow:0 3px 10px rgba(70,52,28,.06)}
.diff-board>strong{display:block;font-size:clamp(12px,2.8vw,16px);color:#60482f}
.diff-tile{display:flex;align-items:center;justify-content:center;aspect-ratio:1;min-width:0;border:1px solid #e9dfd0;border-radius:10px;background:#fff;font-size:clamp(19px,5vw,36px);line-height:1;padding:2px;overflow:hidden}
button.diff-tile{width:100%;cursor:pointer;touch-action:manipulation}
button.diff-tile:focus-visible{outline:3px solid #326da8;outline-offset:2px}
button.diff-tile.diff-miss{background:#fff0e8;border-color:#d58a68;transform:scale(.94)}
@media(max-width:420px){.diff-board-wrap{gap:6px!important}.diff-board{padding:6px}.diff-grid{gap:3px!important}.diff-tile{border-radius:7px}}
