:root{--primary:#076b68;--deep:#064b49;--accent:#f4c54a;--bg:#f2f7f8;--surface:#fff;--ink:#172c38;--muted:#526774;--line:#dbe5e9;--soft:#e0f3ef;--font:Tahoma;--danger:#b72c42}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.9 var(--font),Arial,sans-serif}body[data-theme=candy]{--primary:#933373;--deep:#652557;--accent:#ffcf5d;--bg:#fff5fb;--soft:#fae4f3;--line:#edd3e4}body[data-theme=forest]{--primary:#326b39;--deep:#214b26;--accent:#ecce4f;--bg:#f2f8ef;--soft:#e0efda;--line:#d3e4cc}body[data-theme=night]{--primary:#7764dc;--deep:#5142aa;--accent:#ffd25f;--bg:#151d30;--surface:#222e45;--ink:#f1f5ff;--muted:#b5c6de;--line:#3a4863;--soft:#333858}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button,a{transition:background .15s,transform .15s}button{cursor:pointer;border:0;border-radius:12px;padding:10px 20px;font-weight:700;color:#fff;background:var(--primary)}button:hover{filter:brightness(1.07)}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #e5a700;outline-offset:3px}button.secondary,.tab{background:var(--soft);color:var(--primary)}button.danger{color:var(--danger);background:#ffedf0}button.small{padding:5px 12px;font-size:14px}a{color:var(--primary)}h1,h2,h3,p{margin:0 0 14px}h1{font-size:clamp(26px,3vw,38px);line-height:1.6}h2{font-size:24px}h3{font-size:19px}small,.muted{color:var(--muted);font-size:14px}header{background:var(--surface);border-bottom:1px solid var(--line);height:86px;display:flex;align-items:center;justify-content:space-between;padding:0 34px;gap:20px;position:sticky;top:0;z-index:30}.brand{display:flex;gap:12px;align-items:center}.brand b{font-size:21px}.brand small{display:block;line-height:1.4}.brandmark{display:grid;place-items:center;background:var(--primary);color:#fff;width:47px;height:47px;border-radius:15px;font-size:32px}.logo{width:48px;height:48px;object-fit:contain;border-radius:10px}.userpill{display:flex;gap:10px;align-items:center;font-size:14px}.avatar{width:42px;height:42px;object-fit:cover;border-radius:50%;display:grid;place-items:center;background:var(--soft);color:var(--primary);font-weight:bold}.shell{display:grid;grid-template-columns:235px minmax(0,1fr);max-width:1600px;margin:auto;min-height:calc(100vh - 86px)}aside{padding:30px 18px;border-left:1px solid var(--line);background:var(--surface)}nav{display:grid;gap:8px;position:sticky;top:115px}nav button{display:flex;align-items:center;gap:14px;text-align:right;background:transparent;color:var(--muted);border-radius:12px;padding:12px 17px}nav button.active{color:var(--primary);background:var(--soft)}nav span{font-size:23px;width:28px}main{padding:34px;min-width:0}.intro{display:flex;justify-content:space-between;align-items:center;gap:24px}.eyebrow{font-size:14px;font-weight:bold;color:var(--primary);margin-bottom:4px}.hero{position:relative;overflow:hidden;background:var(--primary);color:white;padding:28px 32px;border-radius:24px;display:grid;grid-template-columns:1.5fr 1fr;gap:20px;margin:24px 0}.hero p{color:#e3f3f0;max-width:600px}.hero button{background:var(--accent);color:#27352d}.hero .scoreart{direction:ltr;align-self:center;opacity:.85;min-width:0}.hero svg{width:100%;height:120px}.stats{display:flex;gap:12px;margin:24px 0;flex-wrap:wrap}.stat{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px 22px;flex:1;min-width:140px}.stat b{font-size:27px;display:block;color:var(--primary);line-height:1.5}.toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:20px 0}.toolbar label{margin:0}.tabs{display:flex;gap:8px;flex-wrap:wrap}.tabs button.selected{background:var(--primary);color:#fff}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.card{background:var(--surface);border:1px solid var(--line);border-radius:20px;overflow:hidden}.cardtop{background:var(--soft);padding:18px 22px;display:flex;align-items:center;justify-content:space-between;min-height:84px}.cardtop .symbol{font-size:38px;color:var(--primary);line-height:1}.cardbody{padding:20px}.card h3{min-height:37px;margin-bottom:10px}.cardfooter{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:16px}.badge{display:inline-block;border-radius:20px;padding:3px 10px;background:var(--soft);color:var(--primary);font-size:13px;font-weight:bold}.badge.gold{background:#fff0bd;color:#705713}.panel{background:var(--surface);border:1px solid var(--line);border-radius:20px;padding:26px;margin-bottom:20px}.twocol{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(240px,1fr);gap:20px}.steps{padding-right:24px}.steps li{margin-bottom:12px}.prose{white-space:pre-line;line-height:2.2}.note-box{padding:16px 20px;border-right:4px solid var(--primary);background:var(--soft);border-radius:12px;margin:18px 0}.empty{padding:45px 20px;text-align:center;color:var(--muted)}.auth{max-width:520px;margin:45px auto;background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:35px}.auth .brand{justify-content:center;margin-bottom:20px}label{display:block;margin:12px 0 6px;font-size:15px;font-weight:700}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--surface);color:var(--ink);min-height:46px}textarea{min-height:110px;resize:vertical}input[type=checkbox],input[type=radio]{width:20px;min-height:20px;accent-color:var(--primary)}input[type=range]{padding:0;min-height:25px}.fieldrow{display:grid;grid-template-columns:1fr 1fr;gap:16px}.error{background:#fff0f2;color:#a5263c;padding:12px;border-radius:12px;margin:12px 0}.success{background:#dcf7e6;color:#12603a;padding:12px;border-radius:12px;margin:12px 0}.question{border:1px solid var(--line);border-radius:15px;padding:18px;margin-bottom:16px}.choice{display:flex;align-items:flex-start;gap:12px;border:1px solid var(--line);padding:10px;border-radius:10px;font-weight:normal;cursor:pointer}.choice input{flex:none;margin-top:6px}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse;white-space:nowrap;text-align:right}td,th{padding:12px;border-bottom:1px solid var(--line)}th{font-size:14px;color:var(--muted)}td.wrap{white-space:normal;min-width:180px}.piano-case{background:linear-gradient(130deg,#283746,#0e1722);border-radius:20px;padding:22px 18px 18px;color:white;box-shadow:0 10px 25px #13223722;margin:20px 0}.piano-brand{display:flex;justify-content:space-between;color:#ccd8e1;font-size:14px;margin:0 8px 16px;direction:ltr;letter-spacing:2px}.keyboard-scroll{overflow-x:auto;padding-bottom:8px;direction:ltr}.keyboard{height:225px;position:relative;direction:ltr;user-select:none}.key{position:absolute;top:0;padding:0;touch-action:none;border-radius:0 0 7px 7px;display:flex;align-items:flex-end;justify-content:center;font-weight:normal}.key.white{height:210px;background:linear-gradient(90deg,#e5e8e9,#fff 20%,#fff 80%,#e5e8e9);color:#273746;border:1px solid #73808b;box-shadow:0 6px 0 #a4abb2;z-index:1}.key.black{height:132px;background:linear-gradient(90deg,#111923,#34404a,#0e151f);color:white;border:1px solid #080d12;box-shadow:0 5px 0 #03070b;z-index:2}.key span{font-size:13px;line-height:1.5;margin-bottom:13px;letter-spacing:0}.key.black span{font-size:11px}.key.playing{background:var(--accent);color:#1d302b;transform:translateY(3px)}.staff-wrap{overflow-x:auto;background:white;border-radius:14px;border:1px solid var(--line);direction:ltr;padding:5px;touch-action:pan-x}.staff{display:block;min-width:600px;width:100%;height:240px}.staff .note{cursor:pointer}.staff .note:focus{outline:none;fill:#d38500}.staff .playing{fill:#ce8610;stroke:#ce8610}.palette{display:flex;gap:8px;flex-wrap:wrap;direction:ltr}.palette button{min-width:52px}.composer .toolbar select{width:auto;max-width:180px}.composer .toolbar input{max-width:100px}.recorder{border:2px dashed var(--line);border-radius:16px;padding:20px}audio{width:100%;max-width:480px}video{width:100%;max-height:400px}.attachment img{max-width:100%;max-height:380px;border-radius:12px}iframe{width:100%;aspect-ratio:16/9;border:0;border-radius:15px}.recording{animation:pulse 1s infinite;background:#c72b45}#toast{position:fixed;bottom:24px;left:24px;background:var(--ink);color:var(--surface);border-radius:14px;padding:12px 24px;z-index:100;max-width:90vw;display:none}dialog{border:1px solid var(--line);border-radius:22px;max-width:820px;width:calc(100% - 30px);background:var(--surface);color:var(--ink);max-height:90vh;padding:25px}dialog::backdrop{background:#08192888}dialog .close{float:left}.deletebar{border-top:1px solid var(--line);margin-top:25px;padding-top:20px}.question-edit{padding:16px;border:1px solid var(--line);border-radius:12px;margin:12px 0}.printonly{display:none}@keyframes pulse{50%{opacity:.6}}@media(max-width:1100px){.cards{grid-template-columns:repeat(2,minmax(0,1fr))}.shell{grid-template-columns:190px minmax(0,1fr)}main{padding:24px}.twocol{grid-template-columns:1fr}}@media(max-width:760px){header{padding:12px 16px;height:auto;min-height:76px}.brand b{font-size:17px}.brand small,.userpill .username{display:none}.shell{display:block}aside{padding:8px;border:0;position:sticky;top:76px;z-index:20;overflow-x:auto}nav{display:flex;position:static;min-width:max-content;gap:4px}nav button{padding:7px 12px;font-size:14px;gap:6px}nav span{font-size:18px;width:auto}main{padding:20px 14px}.hero{grid-template-columns:1fr;padding:24px}.hero .scoreart{display:none}.cards{grid-template-columns:1fr 1fr;gap:12px}.cardbody{padding:14px}.cardtop{padding:12px}.card h3{font-size:17px}.cardfooter{display:block}.cardfooter button{width:100%;margin-top:8px}.panel{padding:18px}.intro{align-items:flex-start}.fieldrow{grid-template-columns:1fr}.auth{margin:25px 14px;padding:24px}.stat{padding:12px;min-width:110px}.stat b{font-size:24px}.toolbar{gap:8px}.hero h2{font-size:23px}.userpill button{padding:7px 10px}.brandmark{width:38px;height:38px}.twocol{display:block}}@media(max-width:390px){.cards{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}@media print{header,aside,.toolbar,button,.piano-case,.recorder,#toast,.noprint{display:none!important}.shell,main,.twocol{display:block;padding:0}body{background:white;color:black;font-size:14px}.panel{border:0;padding:10px;margin:0;break-inside:avoid}.printonly{display:block}.staff{min-width:0}.question{break-inside:avoid}.choice{padding:4px}a{color:black}}
body{font-family:var(--font),Arial,sans-serif}.staff text[font-size="92"],.staff text[font-size="38"],.symbol{font-family:serif!important}.staff .playing ellipse{fill:#ce8610;stroke:#ce8610}.key span{font-family:var(--font),Arial,sans-serif;unicode-bidi:plaintext}.hero .staff line,.hero .staff g{stroke:#b9e3de}.hero .staff ellipse{fill:#b9e3de}.hero .staff text{fill:#e1f5f1}.card:nth-child(4n+2) .cardtop{background:#fff1c6}.card:nth-child(4n+3) .cardtop{background:#e5edff}.card:nth-child(4n+4) .cardtop{background:#fbe4ef}body[data-theme=night] .cardtop{background:var(--soft)}

/* شاشة دخول أوضح */
.auth{max-width:560px}.auth .brand{justify-content:center;margin-bottom:26px;text-align:right}.auth .brand>div{max-width:260px}.auth .brand b{font-size:27px;line-height:1.25}.auth .brand small{font-size:15px;margin-top:5px}.auth .logo{width:128px;height:128px;border-radius:22px;object-fit:contain;padding:8px;background:#fff;border:1px solid var(--line);box-shadow:0 10px 26px #093e3a1c}.auth .brandmark{width:112px;height:112px;border-radius:28px;font-size:68px;box-shadow:0 10px 26px #093e3a1c}@media(max-width:760px){.auth .logo{width:100px;height:100px}.auth .brandmark{width:90px;height:90px;font-size:54px}.auth .brand small{display:block}.auth .brand b{font-size:21px}}

/* Touch scrolling and adaptive piano */
.staff-wrap{touch-action:pan-y pinch-zoom}.keyboard-scroll{touch-action:pan-x pan-y pinch-zoom;-webkit-overflow-scrolling:touch}.key{touch-action:pan-x pan-y pinch-zoom}.piano-controls{direction:rtl;gap:6px}.piano-controls button{padding:8px 10px;font-size:13px}.piano-range,.piano-help{direction:rtl;font-size:13px;color:#e1edf5;letter-spacing:0}.piano-case{min-width:0}.keyboard{max-width:none}.staff .note{touch-action:pan-y pinch-zoom}@media(max-width:1024px){.piano-case{padding:14px 8px}.key span{font-size:11px}.key.black span{font-size:9px}.piano-controls button{flex:1 1 40%}}
/* A welcoming learning space, while preserving the selected theme. */
body{font-size:17px;line-height:1.85;background-image:radial-gradient(circle at 90% 0%,#b7e5ff35,transparent 35%),radial-gradient(circle at 0% 50%,#eadcff50,transparent 40%)}h1,h2,h3{line-height:1.55;letter-spacing:0}h1{font-weight:800}.panel,.card{box-shadow:0 7px 24px #24345c07}.card{border-radius:24px}.cardbody{padding:24px}.cardtop{background-image:radial-gradient(circle at 10% 30%,#ffffff80 0 20px,transparent 21px)}button{min-height:44px}.hero{background:linear-gradient(125deg,var(--deep),var(--primary));box-shadow:0 14px 32px #22315b16}.foundation-hero{display:flex;align-items:center;gap:28px;padding:30px;border-radius:28px;background:linear-gradient(115deg,#ebe5ff,#e2faf3);color:#253450;margin:10px 0 24px}.foundation-hero img{width:40%;max-width:330px}.foundation-hero h1{color:#59479d}.foundation-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:20px 0}.foundation-tabs button{background:#fff;color:#384165;border:2px solid #e4e5f2;padding:18px 12px}.foundation-tabs button.active{background:#ece6ff;border-color:#9b82df}.foundation-tabs small{display:block;color:#626580;font-weight:normal}.foundation-lab{border-top:6px solid #ac96e9}.clef-canvas{display:block;width:100%;max-width:450px;max-height:420px;margin:auto;background:#fbfcff;border:2px dashed #c5bee4;border-radius:20px;touch-action:pan-y pinch-zoom}.rhythm-units{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.rhythm-unit{display:flex;flex-direction:column;align-items:center;background:#fff2ce;color:#5b4527;padding:18px 12px}.rhythm-unit:nth-child(2){background:#e2f4f0;color:#215e57}.rhythm-unit:nth-child(3){background:#eee5ff;color:#59458c}.rhythm-unit:nth-child(4){background:#ffe8ef;color:#814054}.rhythm-unit b{font:44px serif}.rhythm-unit small{color:inherit;font-weight:normal;line-height:1.8}.rhythm-strip{display:flex;flex-wrap:wrap;direction:ltr;gap:8px;margin:16px 0}.beat-active{outline:3px solid #e99721!important;background:#ffdc88!important;color:#3e321e!important}.tap-pad{display:block;width:100%;max-width:330px;min-height:100px;margin:20px auto;background:linear-gradient(140deg,#7460c9,#a087eb);font-size:22px;touch-action:pan-y pinch-zoom}.drum-pads{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:24px 0}.drum-pad{aspect-ratio:1;border-radius:50%;border:8px solid #dccafa;box-shadow:0 8px 0 #b7a1cd;background:radial-gradient(circle,#fff,#ece5ff);color:#65518b;display:flex;flex-direction:column;align-items:center;justify-content:center;touch-action:pan-y pinch-zoom}.drum-pad span{font-size:32px;color:#af9ace}.drum-hat{background:radial-gradient(circle,#fff7cc,#e8bb55);border-color:#f0d884;color:#77591d}.drum-snare{background:radial-gradient(circle,#fff,#ffe1eb);border-color:#efaec4;color:#95516c}.drum-kick{background:radial-gradient(circle,#fff,#d4f2ed);border-color:#9ed9ce;color:#2a7466}.drum-row{display:grid;grid-template-columns:80px repeat(8,minmax(28px,1fr));gap:5px;margin:9px 0;direction:ltr;align-items:center}.drum-row button{padding:8px 0;background:#f1f0f8;color:#626079;border-radius:8px}.drum-row button[aria-pressed=true]{background:#8570c8;color:white}.drum-row strong{font-size:12px}.drum-grid{overflow:auto}.learning-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}.learning-step{border-radius:16px;padding:16px;background:var(--soft);border-top:4px solid var(--primary)}.learning-step b{display:block}.song-coach{border:2px solid #d8c9f4;background:#faf7ff;color:#43365e}.song-coach .toolbar{margin:12px 0}@media(max-width:760px){.foundation-hero{padding:22px;gap:10px}.foundation-hero img{width:34%}.foundation-tabs,.rhythm-units{grid-template-columns:repeat(2,1fr)}.drum-pads{grid-template-columns:repeat(2,1fr);max-width:420px;margin:22px auto}.drum-row{grid-template-columns:52px repeat(8,minmax(23px,1fr));gap:3px}.learning-steps{grid-template-columns:1fr}.foundation-hero h1{font-size:26px}.foundation-tabs button{padding:12px 6px}}@media print{.foundation-tabs,.drum-pads,.drum-grid{display:none}}

.lesson-cover{width:100%;height:130px;object-fit:contain;background:#fbfcff;border-radius:14px;margin-bottom:14px}.foundation-lab [data-map] .note:nth-of-type(3n+1){color:#9671d4}.foundation-lab [data-map] .note:nth-of-type(3n+2){color:#299c91}.foundation-lab [data-map] .note:nth-of-type(3n){color:#db8a35}
.band-banner{padding:28px;border-radius:25px;background:linear-gradient(120deg,#e8e0fa,#def5ef);color:#29395b;margin-bottom:22px}.band-mixer{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.pulse-lights{display:flex;direction:ltr;gap:14px;justify-content:center;padding:20px}.pulse-lights span{width:50px;height:50px;border-radius:50%;background:#ddd8ee;color:#483576;display:grid;place-items:center;font-weight:bold}.pulse-lights span.on{background:#f9bb43;color:#3d3018;box-shadow:0 0 0 7px #f9bb4333}.band-grid-scroll{overflow-x:auto;direction:ltr;-webkit-overflow-scrolling:touch}.band-grid{min-width:660px}.sequencer-row{display:grid;grid-template-columns:80px repeat(var(--steps),minmax(30px,1fr));gap:4px;margin:6px 0;align-items:center;text-align:center}.sequencer-row b{font-size:13px}.sequencer-row span{font-size:12px;white-space:nowrap}.sequencer-row button{padding:2px;background:#edeaf5;color:#807299;min-height:44px;border-radius:6px;touch-action:pan-x pan-y pinch-zoom}.sequencer-row button[aria-pressed=true]{background:#7861b7;color:white}.sequencer-row .beat-boundary{border-left:3px solid #c6bce1}.sequencer-row .current-step{outline:3px solid #eeb33c;outline-offset:-3px}.real-drums{position:relative;max-width:900px;margin:auto;direction:ltr}.real-drums img{display:block;width:100%;border-radius:20px}.drum-hotspot{position:absolute;transform:translate(-50%,-50%);width:7%;height:9%;min-width:32px;min-height:32px;padding:0;border-radius:50%;background:#fff8;color:#493785;border:2px solid #7052ac;touch-action:pan-y pinch-zoom}.drum-stick{position:absolute;width:9px;height:110px;background:linear-gradient(90deg,#9d6432,#ffdf9f,#b1834f);border-radius:8px;transform-origin:bottom;pointer-events:none;opacity:0;z-index:3}.bass-photo{position:relative;max-width:420px;margin:auto;direction:ltr}.bass-photo img{width:100%;display:block}.bass-string{position:absolute;top:23%;height:66%;min-height:0;width:2.5%;min-width:8px;padding:0;background:transparent;border-radius:0;touch-action:pan-y pinch-zoom}.bass-string:hover,.bass-string:focus{background:#ffc83166}.guitar-art{display:block;width:100%;max-height:340px;background:#faf5eb;border-radius:24px}.guitar-art [data-pluck]{cursor:pointer;touch-action:pan-y pinch-zoom}.piano-case label{color:#edf4ff}.game-choices{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0}.game-result{min-height:55px;background:var(--soft);padding:15px;border-radius:15px}.rhythm-unit strong{font-size:16px}@media(max-width:700px){.band-mixer{grid-template-columns:1fr 1fr}.sequencer-row button{min-height:42px}.band-banner{padding:20px}.drum-stick{height:60px;width:6px}.guitar-art{min-height:200px}.foundation-tabs{grid-template-columns:1fr 1fr}.foundation-tabs small{font-size:12px}.real-drums{margin:0 -10px}.pulse-lights{gap:12px}.pulse-lights span{width:43px;height:43px}}

/* Rhythm library + interactive darbuka */
.rhythm-library-note{margin:14px 0 18px;padding:14px 16px;border-radius:16px;background:var(--soft);line-height:2}
.pulse-lights{flex-wrap:wrap}.darbuka-panel{overflow:hidden}.darbuka-stage{display:grid;place-items:center;padding:18px}.darbuka-body{position:relative;width:min(520px,92vw);aspect-ratio:1.55;border-radius:50% 50% 35% 35%;background:radial-gradient(circle at 50% 36%,#f4d59c 0 34%,#c78649 35% 40%,#8e532e 41% 58%,#5c3928 59% 100%);box-shadow:inset 0 0 0 10px #d9a565,0 20px 40px #3c2c1c25}.darbuka-body:after{content:"";position:absolute;left:25%;right:25%;bottom:-25%;height:48%;background:linear-gradient(#8e532e,#5d3928);clip-path:polygon(18% 0,82% 0,100% 100%,0 100%);z-index:0}.darbuka-pad{position:absolute;z-index:2;border-radius:50%;min-width:82px;min-height:82px;padding:8px;background:#fffdebd9;color:#4d3624;border:3px solid #6c4a2e;box-shadow:0 8px 18px #2c190f30;display:flex;flex-direction:column;align-items:center;justify-content:center}.darbuka-pad b{font-size:22px}.darbuka-pad small{font-size:11px;color:inherit}.darbuka-pad.dum{width:35%;height:45%;left:32.5%;top:25%}.darbuka-pad.tak{width:18%;height:23%;right:6%;top:18%}.darbuka-pad.slap{width:18%;height:23%;left:6%;top:18%}.darbuka-pad.ka{width:16%;height:20%;right:14%;bottom:11%}.darbuka-pad:active{transform:scale(.94)}

/* Music games */
.games-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0 24px}.game-card{min-height:118px;background:#fff;color:#33405c;border:2px solid #e5e5f2;border-radius:20px;padding:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-align:center}.game-card>span{font-size:28px;line-height:1.1}.game-card>b{font-size:15px}.game-card>small{font-size:11px;line-height:1.5;color:#66708b}.game-card.active{background:#eee8ff;border-color:#8a72ca;box-shadow:0 8px 20px #7159b322}.game-board{min-height:330px;border-top:6px solid #8a72ca}.game-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.game-score{min-width:92px;padding:10px 14px;border-radius:14px;background:var(--soft);font-weight:800;text-align:center}.rhythm-echo{display:grid;grid-template-columns:1fr 1fr;gap:18px;max-width:520px;margin:24px auto}.rhythm-echo button{min-height:120px;border-radius:30px;font-size:28px;background:radial-gradient(circle,#fff4d3,#e2b76d);color:#51391e;border:5px solid #d49b4c}.mini-note-buttons{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0}.pattern-memory{direction:ltr;display:grid;grid-template-columns:repeat(8,1fr);gap:8px;max-width:720px;margin:24px auto}.pattern-memory button{min-width:0;aspect-ratio:1;min-height:48px;padding:0;background:#eeeaf7;color:#68559f;font-size:24px}.pattern-memory button[aria-pressed=true]{background:#745db5;color:#fff}
@media(max-width:900px){.games-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:620px){.games-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.game-card{min-height:105px;padding:10px}.game-head{display:block}.game-score{display:inline-block;margin-bottom:10px}.darbuka-pad{min-width:58px;min-height:58px}.darbuka-pad b{font-size:17px}.darbuka-pad small{font-size:9px}.rhythm-echo button{min-height:92px}.pattern-memory{gap:4px}.pattern-memory button{min-height:38px;font-size:18px}}

/* Real audio references supplied by the user */
.real-audio-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin-top:14px}.real-audio-grid article{border:1px solid var(--line,#d9e4e4);border-radius:18px;padding:16px;background:rgba(255,255,255,.72)}.real-audio-grid h3{margin:0 0 10px}.real-audio-grid audio{width:100%;margin:4px 0 10px}.real-audio-grid button{width:100%}

/* Admin sound library */
.sound-admin-banner{background:linear-gradient(120deg,#dff6ef,#eee7ff)}
.sound-bank-card{background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:22px;margin-bottom:22px;box-shadow:0 8px 24px #24345c0a}
.sound-bank-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}
.sound-bank-head h2{margin-top:8px;margin-bottom:2px}
.sound-bank-rename{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:14px 0 18px;margin:8px 0 18px}
.sound-slot-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.sound-slot{border:1px solid var(--line);border-radius:18px;padding:16px;background:linear-gradient(180deg,var(--surface),var(--soft))}
.sound-slot>div:first-child{display:flex;flex-direction:column;margin-bottom:10px}.sound-slot>div:first-child b{font-size:17px}.sound-slot>div:first-child small{line-height:1.55}
.sound-slot audio{width:100%;max-width:none;margin:6px 0}.sound-file-name{font-size:12px;word-break:break-all;color:var(--muted);margin:0 0 10px}.sound-empty{padding:14px;border-radius:12px;background:var(--surface);border:1px dashed var(--line);color:var(--muted);margin:8px 0 12px}
.sound-upload-label{display:block;border:2px dashed #a9b5c7;border-radius:14px;padding:14px;text-align:center;background:var(--surface);cursor:pointer}.sound-upload-label input{display:block;margin-top:8px;padding:6px;min-height:40px}
@media(max-width:760px){.sound-bank-card{padding:15px}.sound-bank-head{display:block}.sound-bank-head .toolbar{margin-top:10px}.sound-slot-grid{grid-template-columns:1fr}.sound-slot{padding:14px}.sound-slot .toolbar{display:grid;grid-template-columns:1fr 1fr}.sound-slot .toolbar button{width:100%;padding:10px 8px}.real-audio-grid{grid-template-columns:1fr}.band-grid-scroll{margin-inline:-8px;padding-inline:8px}.real-drums .drum-hotspot{min-width:40px;min-height:40px}.darbuka-body{width:min(470px,96vw)}.game-card{touch-action:manipulation}.game-choices button,.rhythm-echo button{min-height:54px}.panel audio{max-width:100%}}
@media(max-width:430px){main{padding:14px 10px}.panel{padding:14px}.games-grid{grid-template-columns:1fr 1fr}.game-card{min-height:98px}.sound-slot .toolbar{grid-template-columns:1fr}.toolbar>button{flex:1 1 auto}.darbuka-pad.dum{width:38%;height:48%;left:31%;top:24%}.darbuka-pad{min-width:52px;min-height:52px}.darbuka-pad b{font-size:15px}.darbuka-pad small{display:none}}

/* Extra touch-first music games */
.simon-pads{display:grid;grid-template-columns:repeat(2,minmax(120px,1fr));gap:16px;max-width:560px;margin:24px auto}.simon-pads button{min-height:120px;border-radius:28px;font-size:26px}.simon-pads button:nth-child(1){background:#9b6d35}.simon-pads button:nth-child(2){background:#b5842d}.simon-pads button:nth-child(3){background:#3a6d88}.simon-pads button:nth-child(4){background:#7c4c71}.note-rush-target{display:grid;place-items:center;min-height:150px;max-width:420px;margin:20px auto;border-radius:28px;background:linear-gradient(135deg,#efe7ff,#dcf6ef);font-size:54px;font-weight:900;color:#5b4a91}.sound-pairs{display:grid;grid-template-columns:repeat(4,minmax(62px,1fr));gap:12px;max-width:650px;margin:24px auto}.sound-pairs button{aspect-ratio:1;min-height:72px;font-size:28px;border-radius:20px;background:#ede7fa;color:#59458d}.giant-tap{display:block;width:min(420px,100%);min-height:150px;margin:24px auto;border-radius:34px;font-size:28px;background:linear-gradient(135deg,#1d7c78,#7b61c9);touch-action:manipulation}.rhythm-builder{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;max-width:680px;margin:24px auto}.rhythm-builder button{min-height:92px;border-radius:24px;font-size:22px;background:linear-gradient(#f7dba1,#c89049);color:#4c321e;border:3px solid #b87833;touch-action:manipulation}
@media(max-width:620px){.simon-pads{gap:10px}.simon-pads button{min-height:96px;font-size:22px}.note-rush-target{min-height:120px;font-size:42px}.sound-pairs{grid-template-columns:repeat(4,1fr);gap:7px}.sound-pairs button{min-height:58px;font-size:24px;padding:4px}.rhythm-builder{grid-template-columns:repeat(2,1fr)}.rhythm-builder button{min-height:76px}.giant-tap{min-height:120px}}

/* ===== Student Experience V5: vivid, playful, touch-first ===== */
:root{--primary:#6b4fd3;--deep:#4a349b;--accent:#ffbd3d;--bg:#f7f4ff;--surface:#fff;--ink:#24304a;--muted:#65708a;--line:#e5ddfa;--soft:#eee8ff;--success:#1aa36f;--pink:#ff6fae;--sky:#5fc6ff;--mint:#62d7b3}
body{background:
 radial-gradient(circle at 8% 7%,color-mix(in srgb,var(--accent) 18%,transparent) 0 90px,transparent 92px),
 radial-gradient(circle at 92% 25%,color-mix(in srgb,var(--primary) 12%,transparent) 0 130px,transparent 132px),var(--bg);font-weight:500;min-height:100vh}
header{box-shadow:0 8px 30px #44347d0d;border-bottom:0}.brandmark{background:linear-gradient(145deg,var(--primary),color-mix(in srgb,var(--primary) 65%,#ff75b8));box-shadow:0 8px 18px color-mix(in srgb,var(--primary) 28%,transparent)}
nav button{font-size:15px;font-weight:800}nav button.active{box-shadow:inset 4px 0 0 var(--accent);transform:translateX(-2px)}
.panel,.card,.stat{box-shadow:0 12px 32px #4e3f7c10}.card{transition:.18s ease}.card:hover{transform:translateY(-4px);box-shadow:0 18px 36px #4e3f7c1a}.symbol{filter:drop-shadow(0 4px 4px #0001)}
.hero,.band-banner,.kid-hero{background:linear-gradient(135deg,var(--primary),color-mix(in srgb,var(--primary) 65%,#ff6fae));box-shadow:0 20px 45px color-mix(in srgb,var(--primary) 25%,transparent)}
.hero:after,.band-banner:after,.kid-hero:after{content:'♫  ♪  ✦  ♬';position:absolute;left:18px;bottom:0;font-size:clamp(28px,5vw,70px);opacity:.13;letter-spacing:12px;transform:rotate(-8deg);pointer-events:none}.band-banner,.kid-hero{position:relative;overflow:hidden;border-radius:26px;padding:28px;color:#fff;margin-bottom:22px}.band-banner p,.kid-hero p{color:#fff;opacity:.92}.hero-stickers{font-size:clamp(34px,8vw,86px);letter-spacing:8px;filter:drop-shadow(0 8px 8px #0002)}
button{box-shadow:0 5px 12px color-mix(in srgb,var(--primary) 18%,transparent)}button:active{transform:scale(.97)}.game-card{position:relative;overflow:hidden;background:linear-gradient(180deg,#fff,color-mix(in srgb,var(--soft) 55%,#fff));border-color:color-mix(in srgb,var(--primary) 18%,#fff);box-shadow:0 9px 20px #513e8612}.game-card:before{content:'';position:absolute;width:72px;height:72px;border-radius:50%;background:color-mix(in srgb,var(--accent) 24%,transparent);top:-35px;left:-25px}.game-card>span{font-size:36px}.game-card.active{transform:translateY(-3px);background:linear-gradient(160deg,color-mix(in srgb,var(--soft) 75%,#fff),#fff);box-shadow:0 13px 24px color-mix(in srgb,var(--primary) 20%,transparent)}
.level-pill{position:absolute;top:8px;right:8px;font-size:10px;border-radius:999px;padding:2px 7px;background:#fff;color:var(--primary);border:1px solid var(--line)}.level-beginner{background:#e6fff2;color:#13704d}.level-medium{background:#fff4ce;color:#8b6400}.level-advanced{background:#ffe5ed;color:#9a2e55}
.game-board{border-top:6px solid var(--accent);background:linear-gradient(180deg,#fff,color-mix(in srgb,var(--soft) 24%,#fff))}.game-result{font-weight:700;border:1px dashed color-mix(in srgb,var(--primary) 25%,transparent)}
.color-admin-grid{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:12px;margin:12px 0 20px}.color-admin-grid label{padding:12px;background:var(--soft);border-radius:14px}.color-admin-grid input[type=color]{display:block;width:100%;height:54px;padding:3px;border:0;border-radius:12px;background:transparent}
.panel-title-row{display:flex;align-items:center;justify-content:space-between;gap:18px}.melody-practice-card{border:2px solid color-mix(in srgb,var(--primary) 18%,#fff)}.melody-preview,.melody-targets{display:flex;gap:8px;overflow-x:auto;padding:10px 2px 14px;scrollbar-width:thin}.melody-preview span,.melody-chip{flex:0 0 auto;padding:7px 11px;border-radius:12px;background:var(--soft);color:var(--primary);font-weight:800;border:1px solid var(--line)}
.practice-dialog{width:min(1180px,98vw);max-width:none;height:min(94vh,900px);max-height:none;border:0;border-radius:28px;padding:0;background:var(--bg);color:var(--ink);box-shadow:0 30px 90px #17132566}.practice-dialog::backdrop{background:#171325bb;backdrop-filter:blur(5px)}.practice-shell{height:100%;overflow:auto;padding:22px}.practice-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.practice-progress{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 16px;border-radius:16px;background:linear-gradient(90deg,var(--soft),color-mix(in srgb,var(--accent) 16%,#fff));margin:4px 0 14px}.melody-chip.current{background:var(--accent);color:#3b2d00;transform:scale(1.08)}.melody-chip.done{background:#dff8ed;color:#14704c}.melody-chip.demo{outline:4px solid var(--sky)}.practice-piano .piano-case{min-height:390px}.practice-piano .keyboard-scroll{min-height:300px}.practice-piano .keyboard{height:290px}.practice-piano .key.white{height:285px}.practice-piano .key.black{height:175px}.practice-piano .key.target-key{box-shadow:inset 0 0 0 8px var(--accent),0 0 24px var(--accent)!important;z-index:9}.practice-piano .key.target-key span{background:var(--accent);color:#302200}.hide-key-names .practice-piano .key span{display:none}.practice-bottom{justify-content:center}.practice-actions{position:sticky;bottom:0;background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(8px);padding:12px;border-radius:16px}
.celebration-layer{position:fixed;inset:0;pointer-events:none;z-index:99999;overflow:hidden}.celebration-layer>span{position:absolute;left:var(--x);top:-10vh;font-size:clamp(26px,5vw,56px);animation:celebrate-fall var(--d) cubic-bezier(.2,.8,.2,1) forwards;transform:rotate(var(--r))}.celebration-badge{position:absolute;left:50%;top:42%;transform:translate(-50%,-50%);background:#fff;border:5px solid var(--accent);border-radius:28px;padding:22px 38px;text-align:center;box-shadow:0 30px 80px #382b6f55;animation:badge-pop .45s ease both}.celebration-badge b{display:block;font-size:clamp(30px,7vw,64px);color:var(--primary)}.celebration-badge small{font-size:16px;color:var(--ink)}@keyframes celebrate-fall{0%{transform:translateY(-10vh) rotate(0);opacity:0}10%{opacity:1}100%{transform:translateY(115vh) rotate(620deg);opacity:.95}}@keyframes badge-pop{0%{transform:translate(-50%,-50%) scale(.2) rotate(-8deg);opacity:0}75%{transform:translate(-50%,-50%) scale(1.08) rotate(2deg)}100%{transform:translate(-50%,-50%) scale(1)}}
.draw-hero{display:flex;align-items:center;justify-content:space-between;gap:20px}.drawing-panel{padding:18px}.drawing-tools,.stamp-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}.drawing-tools label{display:flex;align-items:center;gap:7px;background:var(--soft);padding:7px 10px;border-radius:12px}.stamp-row{padding:10px;background:linear-gradient(90deg,var(--soft),#fff);border-radius:16px}.stamp-btn{min-width:50px;padding:7px;background:#fff;color:var(--primary);border:2px solid var(--line);font-size:26px}.drawing-canvas-wrap{width:100%;overflow:auto;background:#e8e9f1;border-radius:20px;padding:10px;box-shadow:inset 0 0 0 1px #d5d7e2}.drawing-canvas-wrap canvas{display:block;width:100%;height:auto;aspect-ratio:14/8.5;background:#fff;border-radius:14px;touch-action:none;box-shadow:0 5px 18px #0001}
/* richer student home */
.learning-step{border-top:4px solid var(--accent);background:linear-gradient(180deg,var(--surface),var(--soft))}.foundation-hero{background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 88%,#fff),color-mix(in srgb,var(--pink) 70%,var(--primary)));color:#fff}.foundation-hero p{color:#fff}.badge.gold{background:var(--accent);color:#483500}
@media(max-width:1000px){.color-admin-grid{grid-template-columns:repeat(3,1fr)}.shell{grid-template-columns:190px minmax(0,1fr)}main{padding:24px}.practice-piano .key.white{height:245px}.practice-piano .key.black{height:150px}}
@media(max-width:760px){header{height:70px;padding:0 12px}.brand b{font-size:16px}.brand small,.username{display:none}.shell{display:block;min-height:calc(100vh - 70px);padding-bottom:88px}aside{position:fixed;bottom:0;left:0;right:0;z-index:60;padding:7px;background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(12px);border:0;border-top:1px solid var(--line);box-shadow:0 -8px 26px #30236d16}nav{display:flex;gap:5px;overflow-x:auto;position:static;scrollbar-width:none}nav::-webkit-scrollbar{display:none}nav button{min-width:83px;flex:0 0 auto;display:grid;place-items:center;gap:0;padding:6px 7px;font-size:10px;border-radius:14px}nav span{width:auto;font-size:22px;line-height:1.15}nav button.active{box-shadow:inset 0 -4px 0 var(--accent);transform:none}main{padding:16px 11px}.hero,.kid-hero,.band-banner{border-radius:20px;padding:20px}.panel-title-row,.practice-top,.draw-hero{display:block}.panel-title-row button,.practice-top button{width:100%;margin-top:8px}.color-admin-grid{grid-template-columns:repeat(2,1fr)}.practice-dialog{width:100vw;height:100dvh;border-radius:0}.practice-shell{padding:12px}.practice-piano .piano-case{min-height:330px}.practice-piano .keyboard-scroll{min-height:245px}.practice-piano .keyboard{height:235px}.practice-piano .key.white{height:230px}.practice-piano .key.black{height:142px}.practice-piano .key span{font-size:10px}.melody-targets{padding-bottom:8px}.celebration-badge{width:min(88vw,420px);padding:18px}.drawing-panel{padding:10px}.drawing-canvas-wrap{padding:5px}.drawing-canvas-wrap canvas{width:140%;max-width:none}.game-card>span{font-size:31px}}
@media(max-width:430px){.color-admin-grid{grid-template-columns:1fr 1fr}.hero-stickers{font-size:34px}.game-card{min-height:112px}.practice-piano .keyboard-scroll{min-height:220px}.practice-piano .keyboard{height:210px}.practice-piano .key.white{height:205px}.practice-piano .key.black{height:125px}}
.game-level-legend{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 16px}.game-level-legend button.selected{background:var(--primary);color:#fff}.game-card[hidden]{display:none!important}.level-pill{font-style:normal}

/* ===== Number Piano V6 ===== */
.number-hero{background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 13%,#fff),color-mix(in srgb,var(--accent) 22%,#fff))}.number-title{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:8px 0 18px}.number-score{min-width:150px;text-align:center;background:linear-gradient(145deg,var(--accent),#fff0a8);padding:14px;border-radius:20px;color:#463300}.number-score b{display:block;font-size:34px}.number-score span{font-weight:800;font-size:12px}.number-map{display:grid;grid-template-columns:repeat(9,minmax(65px,1fr));gap:9px}.number-map-card{padding:11px 8px;border-radius:16px;text-align:center;background:linear-gradient(180deg,#fff,var(--soft));border:2px solid color-mix(in srgb,var(--primary) 17%,#fff)}.number-map-card b{display:block;font-size:26px;color:var(--primary)}.number-map-card span{font-size:12px;font-weight:800}.number-layout{align-items:start}.number-phrase-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}.number-phrase-list button{text-align:right}.number-phrase-list button.active{background:var(--primary);color:#fff}.number-controls{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:14px}.number-controls label{display:flex;gap:8px;align-items:center;background:var(--soft);padding:9px 11px;border-radius:14px}.number-practice{position:sticky;top:90px}.number-current{text-align:center;background:linear-gradient(135deg,var(--soft),#fff);border-radius:22px;padding:12px;margin-bottom:12px}.number-current small,.number-current span{display:block}.number-current b{font-size:54px;color:var(--primary);line-height:1}.number-current span{font-weight:900;margin-top:4px}.number-sequence{display:flex;gap:8px;overflow-x:auto;padding:10px 4px 15px;scrollbar-width:thin}.number-token{min-width:70px;background:#fff;color:var(--ink);border:2px solid var(--line);border-radius:16px;padding:8px 7px;box-shadow:none}.number-token b{display:block;font-size:28px}.number-token small{display:block;font-size:11px}.number-token.current{background:var(--accent);border-color:var(--accent);transform:translateY(-3px) scale(1.04);box-shadow:0 8px 18px color-mix(in srgb,var(--accent) 45%,transparent)}.number-token.done{background:#dff8ed;border-color:#8cdec0;color:#126747}.number-token.demo{outline:4px solid var(--sky)}.number-piano .piano-case{min-height:360px}.number-piano .keyboard{height:270px}.number-piano .key.white{height:265px}.number-piano .key.black{height:160px}.key.numbered-key .key-number{position:absolute;left:50%;bottom:58px;transform:translateX(-50%);z-index:4;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--accent);color:#3b2a00;font-size:20px;box-shadow:0 4px 10px #0002}.key.black.numbered-key .key-number{bottom:42px;width:28px;height:28px;font-size:16px}.number-feedback{margin-top:12px;padding:12px 14px;border-radius:14px;background:var(--soft);font-weight:800;text-align:center}.video-portrait{width:min(100%,380px);margin:auto;aspect-ratio:9/16;border-radius:20px;overflow:hidden;background:#111}.video-portrait iframe{width:100%;height:100%;border:0}.piano-brand+label{display:flex;gap:8px;align-items:center;justify-content:flex-end;padding:0 12px 8px;font-weight:800}.piano-brand+label select{max-width:240px}
@media(max-width:900px){.number-map{grid-template-columns:repeat(5,1fr)}.number-practice{position:static}.number-piano .key.white{height:235px}.number-piano .key.black{height:142px}}
@media(max-width:620px){.number-title{display:block}.number-score{margin-top:10px;width:100%}.number-map{grid-template-columns:repeat(3,1fr)}.number-phrase-list{grid-template-columns:1fr}.number-current b{font-size:46px}.number-token{min-width:62px}.number-piano .piano-case{min-height:330px}.number-piano .keyboard-scroll{min-height:235px}.number-piano .keyboard{height:225px}.number-piano .key.white{height:220px}.number-piano .key.black{height:132px}.key.numbered-key .key-number{bottom:48px;width:31px;height:31px;font-size:18px}}

/* V7 — guided number piano, mini game piano, admin visibility */
.number-library-tools{display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap}.number-search{flex:1;min-width:min(100%,260px)}.number-search input{width:100%;font-size:16px;padding:13px 15px;border-radius:16px}.number-categories{display:flex;gap:7px;flex-wrap:wrap}.number-categories .selected{background:var(--primary);color:#fff}.number-library{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}.number-lesson-card{overflow:hidden}.number-card-art{min-height:112px;border-radius:20px 20px 0 0;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 20%,#fff),color-mix(in srgb,var(--accent) 35%,#fff));display:flex;align-items:center;justify-content:space-between;padding:18px}.number-card-art span{font-size:58px}.number-card-art b{padding:7px 12px;border-radius:999px;background:#fff9;font-size:13px}.number-app{max-width:1380px;margin:auto}.number-topbar{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;margin-bottom:12px}.number-topbar>div{display:flex;flex-direction:column}.number-topbar small{color:var(--muted)}.number-stage{background:linear-gradient(180deg,#fff,color-mix(in srgb,var(--soft) 35%,#fff));border:1px solid color-mix(in srgb,var(--primary) 16%,#fff);box-shadow:0 18px 48px color-mix(in srgb,var(--primary) 12%,transparent);border-radius:28px;padding:18px;margin-bottom:18px;overflow:hidden}.number-stage-head{display:flex;align-items:center;justify-content:space-between;gap:18px}.number-stage-head h1{margin:4px 0 0;font-size:clamp(24px,3vw,38px)}.number-controls.compact{justify-content:flex-end}.number-now-row{display:grid;grid-template-columns:minmax(180px,260px) 1fr;gap:12px;margin:14px 0}.number-now,.number-next{border-radius:22px;padding:14px 18px}.number-now{background:linear-gradient(135deg,var(--primary),color-mix(in srgb,var(--primary) 65%,#ff68ab));color:#fff;text-align:center;box-shadow:0 12px 30px color-mix(in srgb,var(--primary) 25%,transparent)}.number-now small,.number-now span{display:block}.number-now b{display:block;font-size:clamp(58px,8vw,94px);line-height:.95;margin:5px 0}.number-now span{font-weight:900}.number-next{background:color-mix(in srgb,var(--accent) 13%,#fff);border:2px dashed color-mix(in srgb,var(--accent) 65%,#fff)}.number-next small{font-weight:900;color:var(--muted)}.number-next>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}.upcoming-chip{min-width:50px;text-align:center;padding:10px 12px;border-radius:14px;background:#fff;border:1px solid var(--line);font-size:22px;font-weight:900}.upcoming-chip.first{background:var(--accent);color:#372700;transform:scale(1.08)}.number-stage .number-sequence{padding:10px 2px 18px;scroll-snap-type:x proximity}.number-stage .number-token{scroll-snap-align:center}.number-token.next-token{border-color:color-mix(in srgb,var(--accent) 55%,#fff);background:color-mix(in srgb,var(--accent) 10%,#fff)}.number-piano-focus{border-radius:24px;padding:10px;background:linear-gradient(180deg,#211f2d,#111019);box-shadow:inset 0 1px 0 #ffffff20,0 12px 30px #0002}.number-piano .piano-case{background:transparent;border:0;padding:0}.number-piano .piano-brand{color:#fff}.number-piano .piano-controls{display:none}.number-piano .piano-range,.number-piano .piano-help{color:#ddd}.number-piano .key{transition:transform .12s ease,box-shadow .15s ease,filter .15s ease,background .15s ease}.number-piano .key.target-key{z-index:20!important;filter:saturate(1.3);box-shadow:inset 0 0 0 8px #ffd43b,0 0 0 5px #fff,0 0 34px 13px #ffd43baa!important;animation:numberKeyPulse .9s infinite alternate;transform:translateY(-4px)}.number-piano .key.white.target-key{background:linear-gradient(#fff9a6,#ffd83d)!important}.number-piano .key.black.target-key{background:linear-gradient(#ffd83d,#d79b00)!important}.number-piano .key.next-key{box-shadow:inset 0 0 0 5px #7edcff,0 0 16px #7edcff88!important;filter:brightness(1.08)}.number-piano .key.just-correct{animation:correctKeyFlash .45s ease}.number-piano .key.demo-key{box-shadow:inset 0 0 0 7px #7ce5aa,0 0 25px #7ce5aa!important;z-index:18}.number-piano .key-number{font-weight:1000}@keyframes numberKeyPulse{from{filter:brightness(1) saturate(1.2)}to{filter:brightness(1.16) saturate(1.6)}}@keyframes correctKeyFlash{0%{filter:brightness(1)}50%{filter:brightness(1.6)}100%{filter:brightness(1)}}.number-feedback{font-size:16px;border:1px solid color-mix(in srgb,var(--primary) 16%,#fff)}.number-phrase-panel{margin-top:0}.number-phrase-list{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}.number-phrase-list button{display:flex;align-items:center;gap:9px}.number-phrase-list button>b{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:var(--soft);color:var(--primary)}.number-phrase-list button.active>b{background:#fff;color:var(--primary)}.number-map-details summary,.number-app details summary{cursor:pointer;font-weight:900}

.game-try-piano{display:grid;grid-template-columns:minmax(130px,190px) minmax(260px,1fr);gap:14px;align-items:center;padding:12px;margin:12px 0 16px;border-radius:18px;background:linear-gradient(135deg,color-mix(in srgb,var(--sky) 16%,#fff),color-mix(in srgb,var(--accent) 10%,#fff));border:1px solid var(--line)}.game-try-piano>div:first-child{display:flex;flex-direction:column;gap:3px}.game-try-piano small{color:var(--muted)}.mini-keyboard{position:relative;height:112px;min-width:260px;border:8px solid #222;border-radius:13px;background:#111;overflow:hidden;touch-action:manipulation}.mini-key{position:absolute;top:0;border-radius:0 0 7px 7px;padding:0;border:1px solid #777;box-shadow:none;touch-action:manipulation}.mini-key.white{height:96px;background:#fff;color:#333;z-index:1}.mini-key.black{height:61px;background:linear-gradient(#333,#050505);color:#fff;z-index:3}.mini-key span{position:absolute;bottom:5px;left:0;right:0;text-align:center;font-size:10px;font-weight:900}.mini-key.black span{display:none}.mini-key.playing{filter:brightness(1.25);box-shadow:inset 0 0 0 5px var(--accent)!important;transform:translateY(2px)}

.sticky-admin-actions{position:sticky;top:78px;z-index:15;background:color-mix(in srgb,var(--bg) 92%,transparent);backdrop-filter:blur(10px);padding:10px;border-radius:16px;border:1px solid var(--line)}.visibility-group{padding:16px}.visibility-list{display:grid;gap:8px}.visibility-row{display:grid;grid-template-columns:minmax(220px,1fr) auto;gap:14px;align-items:center;padding:10px 12px;border-radius:14px;background:color-mix(in srgb,var(--soft) 45%,#fff);border:1px solid var(--line)}.visibility-row small{display:block;color:var(--muted);font-family:monospace;font-size:10px}.visibility-roles{display:flex;gap:7px;flex-wrap:wrap}.visibility-check{display:flex!important;flex-direction:row!important;gap:6px!important;align-items:center!important;background:#fff;padding:7px 10px;border:1px solid var(--line);border-radius:999px;font-weight:800}.visibility-check input{width:18px;height:18px;margin:0}

.rhythm-unit{position:relative}.rhythm-unit:after{content:'🔊 اضغط واسمع';display:block;margin-top:7px;font-size:10px;color:var(--primary);font-weight:900}

@media(max-width:760px){.number-topbar{grid-template-columns:auto 1fr}.number-topbar>.badge{grid-column:1/-1}.number-stage{padding:10px;border-radius:20px}.number-stage-head{display:block}.number-controls.compact{margin-top:10px;display:grid;grid-template-columns:1fr 1fr}.number-controls.compact label{grid-column:1/-1}.number-now-row{grid-template-columns:1fr 1fr}.number-now,.number-next{padding:10px}.number-now b{font-size:58px}.number-next>div{gap:5px}.upcoming-chip{min-width:38px;padding:7px;font-size:18px}.number-piano-focus{margin-left:-7px;margin-right:-7px;padding:7px}.number-piano .keyboard-scroll{min-height:260px}.number-piano .keyboard{height:250px}.number-piano .key.white{height:245px}.number-piano .key.black{height:148px}.number-piano .key.target-key{box-shadow:inset 0 0 0 6px #ffd43b,0 0 0 3px #fff,0 0 26px 8px #ffd43baa!important}.game-try-piano{grid-template-columns:1fr;padding:10px}.mini-keyboard{height:100px;min-width:220px}.mini-key.white{height:84px}.mini-key.black{height:54px}.visibility-row{grid-template-columns:1fr}.visibility-roles{justify-content:flex-start}.sticky-admin-actions{top:72px}}
@media(max-width:430px){.number-stage-head h1{font-size:22px}.number-now-row{grid-template-columns:43% 57%;gap:7px}.number-now b{font-size:50px}.number-now small,.number-next small{font-size:11px}.upcoming-chip{min-width:32px;padding:6px 5px}.number-stage .number-token{min-width:58px}.number-piano .keyboard-scroll{min-height:235px}.number-piano .keyboard{height:225px}.number-piano .key.white{height:220px}.number-piano .key.black{height:132px}}
@media(orientation:landscape) and (max-height:650px){.number-topbar{margin-bottom:5px}.number-stage{padding:8px 12px}.number-stage-head h1{font-size:20px}.number-now-row{grid-template-columns:180px 1fr;margin:6px 0}.number-now{padding:7px 10px}.number-now b{font-size:45px}.number-stage .number-sequence{padding:5px 2px 8px}.number-piano .keyboard-scroll{min-height:190px}.number-piano .keyboard{height:180px}.number-piano .key.white{height:175px}.number-piano .key.black{height:108px}.number-piano .piano-help,.number-piano .piano-range{display:none}}

/* V8 — acoustic piano + continuous full-song practice */
.piano-real-sound{display:flex;align-items:center;gap:9px;margin:0 12px 8px;padding:8px 11px;border-radius:14px;background:linear-gradient(135deg,#ffffff14,#ffffff08);color:#fff;border:1px solid #ffffff20}.piano-real-sound>span{font-size:24px}.piano-real-sound div{display:flex;flex-direction:column;line-height:1.25}.piano-real-sound b{font-size:13px}.piano-real-sound small{font-size:11px;color:#ddd}.number-mode-switch{display:inline-flex;gap:6px;margin-top:10px;padding:5px;border-radius:16px;background:color-mix(in srgb,var(--primary) 7%,#fff);border:1px solid color-mix(in srgb,var(--primary) 15%,#fff)}.number-mode-switch button{padding:9px 13px;border-radius:12px;background:transparent;color:var(--ink);box-shadow:none}.number-mode-switch button.active{background:var(--primary);color:#fff;box-shadow:0 7px 17px color-mix(in srgb,var(--primary) 22%,transparent)}.number-song-progress{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:10px 0 0;padding:8px 12px;border-radius:14px;background:#fff;border:1px solid var(--line)}.number-song-progress b{color:var(--primary)}.number-song-progress span{font-size:12px;font-weight:900;color:var(--muted)}.number-token.phrase-start{margin-inline-start:18px;position:relative}.number-token.phrase-start:first-child{margin-inline-start:0}.number-token.phrase-start em{position:absolute;top:-17px;inset-inline-start:0;white-space:nowrap;font-style:normal;font-size:9px;font-weight:900;color:var(--primary);background:#fff;border:1px solid color-mix(in srgb,var(--primary) 20%,#fff);padding:2px 5px;border-radius:7px}.number-phrase-panel.full-mode{opacity:.78}.number-phrase-panel.full-mode .number-phrase-list button{border-style:dashed}.number-phrase-panel.full-mode .number-phrase-list:before{content:'يمكنك الضغط على أي جملة للرجوع مباشرة إلى وضع التدريب جملة جملة.';grid-column:1/-1;color:var(--muted);font-size:12px;font-weight:800;margin-bottom:3px}
@media(max-width:620px){.number-mode-switch{display:grid;grid-template-columns:1fr 1fr;width:100%}.number-mode-switch button{padding:9px 6px;font-size:12px}.number-song-progress{font-size:12px}.piano-real-sound{margin-inline:5px}}
/* V9 PRO STUDIO: practice transport */
.number-controls.compact select{min-width:105px;font-size:14px}.number-controls.compact [data-rhythm-toggle]{white-space:nowrap}.number-stage::before{content:'PRO PRACTICE';display:inline-block;font-size:10px;font-weight:1000;letter-spacing:.12em;padding:5px 8px;border-radius:999px;background:color-mix(in srgb,var(--primary) 10%,#fff);color:var(--primary);margin-bottom:4px}
@media(max-width:760px){.number-controls.compact{grid-template-columns:1fr 1fr}.number-controls.compact label{grid-column:auto}.number-controls.compact [data-speed]{width:100%}}


/* V11 — professional sampled piano voices + master volume */
.piano-sound-console{display:grid;grid-template-columns:minmax(190px,.8fr) minmax(300px,1.4fr);gap:12px;align-items:center;margin:0 10px 10px;padding:12px;border-radius:17px;background:linear-gradient(135deg,#191922,#292836);color:#fff;border:1px solid #ffffff20;box-shadow:inset 0 1px 0 #ffffff12}
.piano-sound-title{display:flex;align-items:center;gap:10px;min-width:0}.piano-sound-title>span{font-size:28px}.piano-sound-title>div{display:flex;flex-direction:column;min-width:0}.piano-sound-title b{font-size:14px}.piano-sound-title small{font-size:11px;line-height:1.45;color:#d9d9e4}
.piano-sound-controls{display:grid;grid-template-columns:minmax(170px,1fr) minmax(210px,1fr) auto;gap:9px;align-items:end;min-width:0}.piano-sound-controls label{display:grid;gap:5px;font-size:11px;font-weight:900;color:#eeeeF5;min-width:0}.piano-sound-controls select{width:100%;min-height:44px;border-radius:11px;border:1px solid #ffffff30;background:#fff;color:#25232f;padding:8px 10px;font-size:14px;font-weight:800}.piano-volume-label{grid-template-columns:auto minmax(95px,1fr) auto!important;align-items:center;column-gap:8px!important}.piano-volume-label input{width:100%;accent-color:#ffd43b}.piano-volume-label output{min-width:42px;text-align:center;padding:5px 6px;border-radius:8px;background:#ffffff14;color:#fff;font-size:12px;font-weight:900}.piano-sample-status{align-self:center;white-space:nowrap;padding:7px 9px;border-radius:9px;background:#ffffff10;color:#d8f8df;font-size:11px;font-weight:900}
.piano-sound-console+.piano-controls{margin-top:2px}
@media(max-width:760px){.piano-sound-console{grid-template-columns:1fr;padding:10px;margin-inline:4px}.piano-sound-controls{grid-template-columns:1fr}.piano-volume-label{grid-template-columns:auto minmax(120px,1fr) auto!important}.piano-sample-status{text-align:center}.piano-sound-title small{font-size:10px}}
@media(max-width:430px){.piano-sound-title>span{font-size:23px}.piano-sound-controls select{font-size:13px}.piano-volume-label{grid-template-columns:auto 1fr auto!important}}

/* V13 — piano chord controls + kid gallery */
.piano-chord-panel{display:grid;grid-template-columns:minmax(150px,1fr) minmax(170px,1fr) auto auto;gap:9px;align-items:end;grid-column:1/-1}.piano-chord-panel label{display:grid;gap:5px;font-size:11px;font-weight:900;color:#eeeeF5}.piano-chord-panel select{width:100%;min-height:42px;border-radius:11px;border:1px solid #ffffff30;background:#fff;color:#25232f;padding:8px 10px;font-size:14px;font-weight:800}.piano-chord-panel button{min-height:42px}
.kid-gallery-panel{background:linear-gradient(180deg,#fff,color-mix(in srgb,var(--soft) 35%,#fff))}.kid-gallery-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px;margin-top:10px}.kid-gallery-card{background:#fff;border:1px solid var(--line);border-radius:22px;padding:12px;box-shadow:0 10px 24px #4e3f7c10;display:flex;flex-direction:column;gap:10px;overflow:hidden}.kid-gallery-card img{width:100%;height:180px;object-fit:cover;border-radius:18px;background:linear-gradient(135deg,#faf7ff,#eef6ff)}.kid-gallery-card b{display:block;color:var(--primary);margin-bottom:4px}.kid-gallery-card small{color:var(--muted);line-height:1.6}
@media(max-width:760px){.piano-chord-panel{grid-template-columns:1fr 1fr}.piano-chord-panel button{width:100%}.kid-gallery-card img{height:150px}}
@media(max-width:430px){.piano-chord-panel{grid-template-columns:1fr}.kid-gallery-grid{grid-template-columns:1fr 1fr}.kid-gallery-card img{height:118px}.kid-gallery-card{padding:10px}}

/* V14 — vocal recording studio + admin loop library */
.vocal-hero{display:grid;grid-template-columns:minmax(0,1.4fr) auto;gap:20px;align-items:center;background:linear-gradient(135deg,var(--primary),#ff6fae);color:#fff;border-radius:28px;padding:28px;margin-bottom:20px;position:relative;overflow:hidden}.vocal-hero h1{margin:8px 0}.vocal-hero p{color:#fff;opacity:.93;max-width:760px}.vocal-hero-art{font-size:clamp(34px,6vw,72px);letter-spacing:8px;white-space:nowrap}.vocal-grid{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(280px,.85fr);gap:22px}.vocal-controls,.vocal-side{display:grid;gap:14px;align-content:start}.vocal-controls label,.vocal-side label{display:grid;gap:7px;font-weight:900}.vocal-controls input[type=range]{width:100%}.vocal-controls output{display:inline-block;min-width:52px;text-align:center;color:var(--primary);font-weight:1000}.vocal-count{min-height:92px;display:grid;place-items:center;border-radius:24px;background:linear-gradient(135deg,var(--soft),#fff4d8);border:2px dashed color-mix(in srgb,var(--primary) 28%,#fff);font-size:52px;font-weight:1000;color:var(--primary)}.record-button{background:linear-gradient(135deg,#e43b5f,#ff6d88)}.record-button.recording{animation:vocalPulse 1s infinite}@keyframes vocalPulse{50%{transform:scale(.98);filter:brightness(1.12)}}.vocal-status{padding:12px 14px;border-radius:14px;background:color-mix(in srgb,var(--soft) 60%,#fff);border:1px solid var(--line);font-weight:800}.vocal-piano{padding:14px;border-radius:18px;background:linear-gradient(135deg,#f0ecff,#e9f8ff);border:1px solid var(--line)}.vocal-piano small{display:block;color:var(--muted);margin:4px 0 10px}.vocal-preview{margin-top:20px;padding:18px;border-radius:20px;background:#eefbf5;border:1px solid #ccebdc}.vocal-preview audio{width:100%;margin:8px 0}.recording-library{display:grid;gap:12px}.recording-item{display:grid;grid-template-columns:minmax(170px,.8fr) minmax(260px,1.6fr) auto;gap:12px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:16px;background:#fff}.recording-item b,.recording-item small{display:block}.recording-item small{color:var(--muted);font-size:11px}.recording-item audio{width:100%}.loop-admin-panel{margin-top:24px;border-top:6px solid var(--accent)}.loop-admin-list{display:grid;gap:10px;margin-top:18px}.loop-admin-item{display:grid;grid-template-columns:minmax(170px,1fr) minmax(240px,1.3fr) auto auto;gap:10px;align-items:center;padding:12px;border-radius:16px;border:1px solid var(--line);background:linear-gradient(180deg,#fff,var(--soft))}.loop-admin-item b,.loop-admin-item small{display:block}.loop-admin-item small{color:var(--muted);font-size:11px}.loop-admin-item audio{width:100%}
@media(max-width:820px){.vocal-hero{grid-template-columns:1fr}.vocal-hero-art{text-align:center}.vocal-grid{grid-template-columns:1fr}.recording-item,.loop-admin-item{grid-template-columns:1fr}.recording-item audio,.loop-admin-item audio{width:100%}.vocal-record-actions{display:grid;grid-template-columns:1fr 1fr}}
@media(max-width:430px){.vocal-hero{padding:18px}.vocal-hero-art{font-size:34px}.vocal-count{min-height:76px;font-size:44px}.vocal-record-actions{grid-template-columns:1fr}}

/* V14 — grade filters + lesson illustrations */
.game-filter-stack{display:grid;gap:8px;margin-bottom:14px}.game-grade-tag{margin-top:5px;color:var(--primary)!important;font-weight:900;font-size:10px!important}.lesson-visual-banner{max-width:900px;margin:10px 0 18px;border-radius:24px;overflow:hidden;border:1px solid var(--line);background:#fff}.lesson-visual-banner img{display:block;width:100%;height:220px;object-fit:cover}.kid-gallery-grid{grid-template-columns:repeat(auto-fit,minmax(165px,1fr))}
@media(max-width:620px){.lesson-visual-banner img{height:150px}.kid-gallery-grid{grid-template-columns:1fr 1fr}}

/* V14 — rhythm loop browser */
.band-loop-panel{margin-top:22px;border-top:6px solid var(--accent)}.loop-browser{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:14px 0}.loop-card{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;gap:4px 9px;text-align:start;align-items:center;background:linear-gradient(180deg,#fff,var(--soft));color:var(--ink);border:1px solid var(--line);box-shadow:none}.loop-card>span{grid-row:1/3;font-size:28px}.loop-card>b{color:var(--primary)}.loop-card>small{color:var(--muted)}.loop-card.active{outline:3px solid var(--accent);background:#fff7dc}.loop-volume{display:grid;grid-template-columns:auto minmax(160px,1fr) auto;gap:10px;align-items:center;font-weight:900}.loop-volume input{width:100%}.loop-volume output{min-width:48px;color:var(--primary);font-weight:1000}
@media(max-width:540px){.loop-browser{grid-template-columns:1fr 1fr}.loop-card{padding:10px;font-size:12px}.loop-card>span{font-size:22px}.loop-volume{grid-template-columns:1fr}.loop-volume output{display:none}}
.vocal-home-card{display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(135deg,#fff0f6,#eef5ff);border:2px solid color-mix(in srgb,var(--pink) 22%,#fff)}.vocal-home-card h2{margin:8px 0}.vocal-home-card p{margin:0;color:var(--muted)}
@media(max-width:620px){.vocal-home-card{display:grid}.vocal-home-card button{width:100%}}

/* V15 — immersive song training + pro transport */
.number-top-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.number-rotate-hint{display:none}.pro-transport{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;min-width:min(680px,100%)}.transport-row{display:flex;align-items:end;gap:7px;flex-wrap:wrap}.transport-row label{display:grid;gap:4px;min-width:120px}.transport-row select{min-height:40px}.transport-state{display:inline-flex;align-items:center;min-height:40px;padding:5px 9px;border-radius:10px;background:color-mix(in srgb,var(--soft) 55%,#fff);border:1px solid var(--line);font-size:11px;font-weight:900;color:var(--muted)}.loop-mini-volume{min-width:145px!important}.loop-mini-volume input{width:140px}.tempo-console{display:grid;grid-template-columns:auto minmax(180px,1fr) auto;align-items:center;gap:10px;padding:8px 10px;border-radius:14px;background:#161922;color:#fff}.tempo-console>div:first-child{display:grid;line-height:1.1}.tempo-console strong{font-size:19px}.tempo-console small{font-size:10px;color:#bfc8da}.tempo-console input{width:100%;accent-color:var(--accent)}.tempo-buttons{display:flex;gap:5px;align-items:center;flex-wrap:wrap}.tempo-buttons button,.tempo-buttons select{min-height:38px;padding:7px 9px;font-size:12px}.number-immersive-body{overflow:hidden!important}.number-app.immersive{position:fixed!important;inset:0!important;z-index:10000!important;background:#10131b!important;color:#fff!important;overflow:hidden!important;padding:7px!important;display:grid!important;grid-template-rows:auto minmax(0,1fr)!important}.number-app.immersive .number-topbar{margin:0 0 5px!important;padding:5px 8px!important;background:#171b26!important;border:1px solid #ffffff1c!important;border-radius:12px!important;color:#fff!important}.number-app.immersive .number-topbar small{color:#bec7d7}.number-app.immersive .number-topbar [data-number-back],.number-app.immersive [data-completed]{display:none}.number-app.immersive .number-stage{min-height:0!important;height:100%!important;overflow:hidden!important;padding:6px 8px!important;margin:0!important;border-radius:14px!important;background:#111620!important;display:grid!important;grid-template-rows:auto auto auto minmax(0,1fr) auto!important}.number-app.immersive .number-stage:before{display:none}.number-app.immersive .number-stage-head{display:grid!important;grid-template-columns:minmax(210px,.7fr) minmax(0,2fr)!important;gap:8px!important;align-items:start!important}.number-app.immersive .number-stage-head h1,.number-app.immersive .number-stage-head .eyebrow{display:none}.number-app.immersive .number-mode-switch{margin:0!important;background:#202635!important;border-color:#ffffff20!important}.number-app.immersive .number-mode-switch button{color:#e8edf7}.number-app.immersive .number-mode-switch button.active{color:#fff}.number-app.immersive .pro-transport{min-width:0!important;gap:5px!important}.number-app.immersive .transport-row{gap:5px!important}.number-app.immersive .transport-row label{min-width:100px!important;font-size:10px}.number-app.immersive .transport-row button,.number-app.immersive .transport-row select{min-height:34px!important;padding:5px 7px!important;font-size:11px!important}.number-app.immersive .transport-state{min-height:34px!important;background:#252b39!important;border-color:#ffffff1d!important;color:#c9d1df!important}.number-app.immersive .loop-mini-volume{display:none!important}.number-app.immersive .tempo-console{padding:5px 8px!important;grid-template-columns:auto minmax(100px,1fr) auto!important}.number-app.immersive .tempo-console strong{font-size:16px}.number-app.immersive .tempo-buttons button,.number-app.immersive .tempo-buttons select{min-height:32px!important;padding:4px 7px!important}.number-app.immersive .number-song-progress{margin:5px 0!important;padding:5px 9px!important;background:#1c2230!important;border-color:#ffffff1c!important;color:#fff!important}.number-app.immersive .number-now-row{margin:4px 0!important;grid-template-columns:150px 1fr!important;gap:6px!important}.number-app.immersive .number-now,.number-app.immersive .number-next{padding:5px 10px!important;min-height:55px!important;background:#1c2230!important;border-color:#ffffff1c!important}.number-app.immersive .number-now b{font-size:38px!important}.number-app.immersive .number-now span,.number-app.immersive .number-next small,.number-app.immersive .number-now small{color:#c4cce0!important}.number-app.immersive .number-sequence{padding:3px 2px 6px!important;min-height:62px!important;max-height:72px!important;overflow-x:auto!important;overflow-y:hidden!important}.number-app.immersive .number-token{min-width:54px!important;padding:5px 7px!important;background:#202735!important;color:#fff!important;border-color:#ffffff22!important}.number-app.immersive .number-token.current{background:var(--accent)!important;color:#302400!important}.number-app.immersive .number-token.done{background:#173b31!important;color:#bdf7db!important}.number-app.immersive .number-piano-focus{min-height:0!important;height:100%!important;overflow:hidden!important;margin:0!important;padding:4px!important;background:#080a0f!important}.number-app.immersive .number-piano{height:100%!important}.number-app.immersive .number-piano .piano-case{height:100%!important;display:grid!important;grid-template-rows:auto auto minmax(0,1fr)!important;min-height:0!important}.number-app.immersive .number-piano .piano-brand,.number-app.immersive .number-piano .piano-controls,.number-app.immersive .number-piano .piano-range,.number-app.immersive .number-piano .piano-help,.number-app.immersive .number-piano .piano-chord-panel{display:none!important}.number-app.immersive .number-piano .piano-sound-console{margin:0 0 4px!important;padding:5px 8px!important;grid-template-columns:auto minmax(350px,1fr)!important;background:#171b25!important}.number-app.immersive .number-piano .piano-sound-title small{display:none}.number-app.immersive .number-piano .piano-sound-controls{grid-template-columns:minmax(180px,1fr) minmax(200px,1fr) auto!important}.number-app.immersive .number-piano .keyboard-scroll{height:100%!important;min-height:0!important}.number-app.immersive .number-piano .keyboard{height:100%!important;min-height:230px!important}.number-app.immersive .number-piano .key.white{height:100%!important;min-height:225px!important}.number-app.immersive .number-piano .key.black{height:62%!important;min-height:135px!important}.number-app.immersive .number-feedback{margin:4px 0 0!important;padding:5px 9px!important;min-height:34px!important;background:#1c2230!important;border-color:#ffffff1c!important;color:#fff!important}.number-app.immersive .number-phrase-panel,.number-app.immersive .number-map-details,.number-app.immersive>details{display:none!important}
@media(max-width:1024px) and (orientation:portrait){.number-app.immersive .number-rotate-hint{position:absolute;inset:0;z-index:12000;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:30px;background:#10131bf2;color:#fff}.number-app.immersive .number-rotate-hint span{font-size:76px;animation:rotatePhone 1.5s ease-in-out infinite}.number-app.immersive .number-rotate-hint b{font-size:24px;margin-top:12px}.number-app.immersive .number-rotate-hint small{margin-top:8px;color:#ccd3e0}}@keyframes rotatePhone{0%,100%{transform:rotate(0)}50%{transform:rotate(90deg)}}
@media(max-width:900px){.pro-transport{min-width:0}.tempo-console{grid-template-columns:1fr}.transport-row{display:grid;grid-template-columns:1fr 1fr}.transport-row label{min-width:0}.transport-state{display:none}.number-top-actions{grid-column:1/-1;justify-content:stretch}.number-top-actions>*{flex:1}.number-app.immersive .number-stage-head{grid-template-columns:160px minmax(0,1fr)!important}.number-app.immersive .transport-row{display:flex!important}.number-app.immersive .transport-row [data-rhythm-state],.number-app.immersive .transport-row [data-loop-state],.number-app.immersive .transport-row .loop-mini-volume{display:none!important}.number-app.immersive .number-piano .piano-sound-console{grid-template-columns:1fr!important}.number-app.immersive .number-piano .piano-sound-title{display:none!important}.number-app.immersive .number-piano .piano-sound-controls{grid-template-columns:1fr 1fr!important}.number-app.immersive .number-piano .piano-sample-status{display:none!important}}
@media(max-width:760px) and (orientation:landscape){.number-app.immersive{padding:3px!important}.number-app.immersive .number-topbar{min-height:34px!important}.number-app.immersive .number-stage{grid-template-rows:auto auto auto minmax(0,1fr) auto!important}.number-app.immersive .number-stage-head{grid-template-columns:130px minmax(0,1fr)!important}.number-app.immersive .number-mode-switch button{font-size:10px!important;padding:5px!important}.number-app.immersive .transport-row [data-reset],.number-app.immersive .transport-row label:nth-of-type(1){display:none!important}.number-app.immersive .tempo-console{grid-template-columns:auto minmax(90px,1fr) auto!important}.number-app.immersive .tempo-buttons [data-speed-minus],.number-app.immersive .tempo-buttons [data-speed-plus],.number-app.immersive .tempo-buttons select{display:none!important}.number-app.immersive .number-now-row{grid-template-columns:115px 1fr!important}.number-app.immersive .number-now b{font-size:30px!important}.number-app.immersive .number-sequence{min-height:50px!important;max-height:54px!important}.number-app.immersive .number-piano .piano-sound-console{display:none!important}.number-app.immersive .number-piano .piano-case{grid-template-rows:minmax(0,1fr)!important}.number-app.immersive .number-piano .keyboard{min-height:190px!important}.number-app.immersive .number-piano .key.white{min-height:185px!important}.number-app.immersive .number-piano .key.black{min-height:110px!important}.number-app.immersive .number-feedback{font-size:12px!important}}

/* V16 — loops-only practice transport */
.loop-main-select{display:flex;align-items:center;gap:7px;min-width:min(320px,100%);flex:1 1 260px}.loop-main-select select{min-width:220px;max-width:100%;font-weight:800}.pro-transport .transport-row{align-items:center}.pro-transport [data-loop-toggle],.pro-transport [data-loop-stop]{white-space:nowrap}.number-app.immersive .loop-main-select{min-width:240px}.number-app.immersive .loop-main-select select{max-width:310px}
@media(max-width:760px){.loop-main-select{grid-column:1/-1;display:grid;grid-template-columns:auto 1fr}.loop-main-select select{width:100%;min-width:0}.pro-transport [data-loop-toggle],.pro-transport [data-loop-stop]{min-height:48px}}

/* V17 mobile safety: never cover the whole site with a rotation overlay. */
.number-rotate-hint{display:none!important}
@media(max-width:1100px) and (pointer:coarse){
  body:not(.number-immersive-body){overflow:auto!important}
  .number-app:not(.immersive){position:static!important;inset:auto!important;overflow:visible!important;background:transparent!important;color:inherit!important;padding:0!important;display:block!important}
}

/* V18 — hard mobile portrait safety. Portrait must never be hidden by immersive mode. */
.site-footer{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;padding:18px 16px 24px;margin-top:24px;border-top:1px solid var(--line);color:var(--muted);font-size:13px;text-align:center;background:color-mix(in srgb,var(--surface) 82%,transparent)}
.site-footer b{color:var(--ink);font-weight:800}
@media(max-width:1024px) and (orientation:portrait){
  html,body{min-height:100%!important;height:auto!important;overflow-x:hidden!important;overflow-y:auto!important;background:var(--bg)!important}
  body.number-immersive-body{overflow:auto!important;position:static!important;height:auto!important}
  #app,.shell,main{visibility:visible!important;opacity:1!important;min-height:1px!important}
  .number-app.immersive{position:static!important;inset:auto!important;z-index:auto!important;height:auto!important;min-height:0!important;overflow:visible!important;padding:0!important;background:transparent!important;color:inherit!important;display:block!important}
  .number-app.immersive .number-topbar{background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important;padding:10px!important;margin-bottom:10px!important}
  .number-app.immersive .number-topbar small{color:var(--muted)!important}
  .number-app.immersive .number-topbar [data-number-back],.number-app.immersive [data-completed]{display:inline-flex!important}
  .number-app.immersive .number-stage{height:auto!important;min-height:0!important;overflow:visible!important;display:block!important;background:var(--surface)!important;color:var(--ink)!important;padding:10px!important;margin:0!important}
  .number-app.immersive .number-stage-head{display:block!important}
  .number-app.immersive .number-stage-head h1,.number-app.immersive .number-stage-head .eyebrow{display:block!important}
  .number-app.immersive .number-song-progress,.number-app.immersive .number-now,.number-app.immersive .number-next,.number-app.immersive .number-feedback{background:var(--surface)!important;color:var(--ink)!important;border-color:var(--line)!important}
  .number-app.immersive .number-now span,.number-app.immersive .number-next small,.number-app.immersive .number-now small{color:var(--muted)!important}
  .number-app.immersive .number-sequence{max-height:none!important;overflow-x:auto!important;overflow-y:visible!important}
  .number-app.immersive .number-piano-focus,.number-app.immersive .number-piano{height:auto!important;min-height:0!important;overflow:visible!important;background:transparent!important}
  .number-app.immersive .number-piano .piano-case{height:auto!important;display:block!important}
  .number-app.immersive .number-piano .piano-brand,.number-app.immersive .number-piano .piano-controls,.number-app.immersive .number-piano .piano-range,.number-app.immersive .number-piano .piano-help{display:flex!important}
  .number-app.immersive .number-piano .piano-range,.number-app.immersive .number-piano .piano-help{display:block!important}
  .number-app.immersive .number-piano .piano-sound-console{display:grid!important;background:#171b25!important}
  .number-app.immersive .number-piano .keyboard-scroll{height:auto!important;min-height:235px!important}
  .number-app.immersive .number-piano .keyboard{height:225px!important;min-height:225px!important}
  .number-app.immersive .number-piano .key.white{height:220px!important;min-height:220px!important}
  .number-app.immersive .number-piano .key.black{height:132px!important;min-height:132px!important}
  .number-app.immersive .number-phrase-panel,.number-app.immersive .number-map-details,.number-app.immersive>details{display:block!important}
  .number-rotate-hint{display:none!important}
}
@media(max-width:620px){.site-footer{padding:14px 10px 20px;font-size:12px}.site-footer span,.site-footer b{width:100%}}
.device-record-fallback{margin-top:10px;padding:14px;border:1px dashed color-mix(in srgb,var(--primary) 35%,var(--line));border-radius:16px;background:color-mix(in srgb,var(--soft) 70%,#fff)}.device-record-fallback p{margin:5px 0 10px;color:var(--muted)}.device-capture-label{position:relative;overflow:hidden;cursor:pointer}.device-capture-label input{position:absolute;inset:0;opacity:0;cursor:pointer}

/* V19 — mobile portrait/landscape hard safety and touch practice mode */
@media (pointer:coarse){
  html,body{display:block!important;visibility:visible!important;opacity:1!important;width:100%!important;min-height:100%!important;height:auto!important;overflow-x:hidden!important;overflow-y:auto!important;position:static!important}
  body.number-immersive-body{overflow-y:auto!important;position:static!important;height:auto!important}
  #app{display:block!important;visibility:visible!important;opacity:1!important;width:100%!important;min-height:1px!important}
  .shell,main{visibility:visible!important;opacity:1!important;min-height:1px!important}
  .number-app.immersive{position:static!important;inset:auto!important;z-index:auto!important;height:auto!important;min-height:0!important;overflow:visible!important;background:transparent!important;color:inherit!important;padding:0!important;display:block!important}
  .number-app.touch-practice{position:relative!important;inset:auto!important;z-index:auto!important;width:100%!important;height:auto!important;min-height:0!important;overflow:visible!important;background:transparent!important;color:inherit!important;padding:0!important;display:block!important}
  .number-app.touch-practice .number-stage{display:block!important;height:auto!important;min-height:0!important;overflow:visible!important;padding:10px!important;background:var(--surface)!important;color:var(--ink)!important}
  .number-app.touch-practice .number-piano-focus,.number-app.touch-practice .number-piano,.number-app.touch-practice .number-piano .piano-case{height:auto!important;min-height:0!important;overflow:visible!important}
  .number-app.touch-practice .keyboard-scroll{min-height:240px!important;overflow-x:auto!important;overflow-y:hidden!important}
  .number-app.touch-practice .keyboard{height:230px!important;min-height:230px!important}
  .number-app.touch-practice .key.white{height:225px!important;min-height:225px!important}
  .number-app.touch-practice .key.black{height:138px!important;min-height:138px!important}
  .number-app.touch-practice .number-sequence{overflow-x:auto!important;overflow-y:visible!important;max-height:none!important}
  .number-rotate-hint{display:none!important}
}
@media (pointer:coarse) and (orientation:portrait){
  header{position:sticky!important;top:0!important}
  aside{position:sticky!important;top:76px!important}
  .number-app.touch-practice .number-now-row{grid-template-columns:1fr 1fr!important}
  .number-app.touch-practice .number-controls.compact{display:grid!important;grid-template-columns:1fr 1fr!important}
  .number-app.touch-practice .loop-main-select,.number-app.touch-practice .tempo-console{grid-column:1/-1!important;width:100%!important}
  .number-app.touch-practice .piano-sound-console{display:grid!important;grid-template-columns:1fr!important}
}
@media (pointer:coarse) and (orientation:landscape){
  .number-app.touch-practice .number-stage{padding:7px!important}
  .number-app.touch-practice .number-now-row{grid-template-columns:150px 1fr!important}
  .number-app.touch-practice .keyboard-scroll{min-height:205px!important}
  .number-app.touch-practice .keyboard{height:195px!important;min-height:195px!important}
  .number-app.touch-practice .key.white{height:190px!important;min-height:190px!important}
  .number-app.touch-practice .key.black{height:116px!important;min-height:116px!important}
}
.feedback-admin-box{margin:16px 0;padding:16px;border:1px solid var(--line);border-radius:16px;background:color-mix(in srgb,var(--soft) 55%,#fff)}.feedback-admin-box h3{margin-bottom:8px}.feedback-admin-box .choice{margin:8px 0;background:var(--surface)}

/* V19 — vocal studio pro */
.studio-mixer-card{padding:14px;border-radius:18px;border:1px solid var(--line);background:linear-gradient(135deg,color-mix(in srgb,var(--soft) 65%,#fff),#fff)}.studio-mixer-card h3{margin:0 0 10px;color:var(--primary)}.studio-switches{display:grid;grid-template-columns:auto auto minmax(160px,1fr);gap:10px;align-items:center}.studio-switches .choice{margin:0;min-height:48px;align-items:center}.studio-switches label:not(.choice){margin:0}.studio-tip{padding:14px;border-radius:18px;background:#fff8df;border:1px solid #f3df9d}.studio-tip b{color:#7a5b00}.studio-tip p{margin:5px 0 0;color:#665b38}.vocal-controls>label output,.studio-mixer-card output{display:inline-block;min-width:50px;text-align:center;font-weight:900;color:var(--primary)}#mixdevice:disabled{opacity:.5}.device-record-fallback{display:block!important}
@media(max-width:650px){.studio-switches{grid-template-columns:1fr 1fr}.studio-switches label:not(.choice){grid-column:1/-1}.vocal-grid{grid-template-columns:1fr!important}.vocal-side{min-width:0}.vocal-studio-panel{padding:14px}.vocal-controls .fieldrow{grid-template-columns:1fr 1fr}.vocal-controls input,.vocal-controls select{font-size:16px}}
@media(max-width:390px){.studio-switches,.vocal-controls .fieldrow{grid-template-columns:1fr}.studio-switches label:not(.choice){grid-column:auto}.vocal-record-actions{grid-template-columns:1fr!important}}

/* V20 — reliable audio interaction */
.staff [data-note]{cursor:pointer;touch-action:manipulation;outline:none}.staff [data-note]:focus-visible{filter:drop-shadow(0 0 5px var(--accent))}.staff [data-note].playing ellipse{fill:var(--accent)!important;stroke:var(--primary)!important}.staff [data-note].playing text{font-weight:900}.piano-test-sound{min-height:42px;white-space:nowrap}.audio-ready-note{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:10px 12px;margin:10px 0;border:1px solid color-mix(in srgb,var(--primary) 18%,#fff);background:color-mix(in srgb,var(--soft) 50%,#fff);border-radius:14px}.audio-ready-note b{color:var(--primary)}
@media(max-width:760px){.piano-test-sound{width:100%}.staff-wrap{touch-action:pan-x pan-y}.staff [data-note]{touch-action:manipulation}}
.lesson-audio-transport{padding:10px;border-radius:15px;background:color-mix(in srgb,var(--soft) 55%,#fff);border:1px solid var(--line)}.compact-choice{display:flex!important;align-items:center!important;gap:7px!important;margin:0!important;padding:7px 10px!important;background:var(--surface);border:1px solid var(--line);border-radius:10px}.compact-choice input{width:18px!important;height:18px!important;min-height:18px!important;margin:0!important}.lesson-audio-transport [data-example-speed]{min-width:58px}
@media(max-width:620px){.lesson-audio-transport{display:grid;grid-template-columns:1fr 1fr}.lesson-audio-transport label{grid-column:1/-1}.lesson-audio-transport button{width:100%}}

/* V21 — Organ Performance Mode: piano + notes + loops + tempo + chords in one performance surface */
.number-app.organ-console .number-stage{background:linear-gradient(180deg,#171b25,#0d1017);border:1px solid #ffffff20;color:#fff;box-shadow:0 22px 55px #0003;padding:12px;border-radius:24px}.number-app.organ-console .number-stage:before{content:'ORGAN • PERFORMANCE MODE';background:#ffffff12;color:#dce5f5;border:1px solid #ffffff18}.number-app.organ-console .number-stage-head{align-items:stretch;gap:10px}.number-app.organ-console .number-stage-head>div:first-child{min-width:190px;padding:10px 12px;border-radius:16px;background:#202634;border:1px solid #ffffff14}.number-app.organ-console .number-stage-head h1{color:#fff;font-size:clamp(20px,2.3vw,30px)}.number-app.organ-console .number-stage-head .eyebrow{color:#9fd8ff}.number-app.organ-console .number-mode-switch{background:#0f131b;border-color:#ffffff18}.number-app.organ-console .number-mode-switch button{color:#dce4f2}.number-app.organ-console .number-mode-switch button.active{color:#fff}.number-app.organ-console .pro-transport{padding:8px;border-radius:16px;background:#202634;border:1px solid #ffffff14}.number-app.organ-console .transport-row{align-items:center}.number-app.organ-console .transport-row label{color:#dce4f2}.number-app.organ-console .transport-state{background:#111620;border-color:#ffffff18;color:#9eddbf}.number-app.organ-console .tempo-console{background:#0f131b;border:1px solid #ffffff16}.number-app.organ-console .number-song-progress{background:#1b2130;border-color:#ffffff16;color:#fff}.number-app.organ-console .number-song-progress b{color:#ffd966}.number-app.organ-console .number-song-progress span{color:#c7d0df}.number-app.organ-console .number-now-row{grid-template-columns:minmax(125px,185px) 1fr;margin:8px 0;gap:8px}.number-app.organ-console .number-now,.number-app.organ-console .number-next{padding:8px 12px;border-radius:15px}.number-app.organ-console .number-now b{font-size:clamp(38px,5vw,62px);margin:1px 0}.number-app.organ-console .number-next{background:#202634;border-color:#ffffff22}.number-app.organ-console .number-next small{color:#b9c4d6}.number-app.organ-console .upcoming-chip{padding:6px 9px;min-width:40px;font-size:17px;background:#111620;color:#f7f8fb;border-color:#ffffff18}.number-app.organ-console .upcoming-chip.first{background:#ffd43b;color:#2d2400}.number-app.organ-console .number-sequence{padding:4px 1px 8px;max-height:78px;overflow-x:auto;overflow-y:hidden}.number-app.organ-console .number-token{background:#202735;color:#fff;border-color:#ffffff1c;min-width:56px;padding:5px 8px}.number-app.organ-console .number-token.current{background:#ffd43b;color:#2d2400}.number-app.organ-console .number-token.done{background:#173b31;color:#bdf7db}.number-app.organ-console .number-piano-focus{margin:0;padding:6px;border-radius:18px;background:linear-gradient(180deg,#0b0d12,#050609);box-shadow:inset 0 1px 0 #ffffff1c}.number-app.organ-console .number-piano .piano-case{background:transparent!important}.number-app.organ-console .number-piano .piano-brand{padding:3px 7px;color:#e8edf7}.number-app.organ-console .number-piano .piano-sound-console{margin:0 0 5px;padding:7px 9px;background:#181d27;border-color:#ffffff1a;grid-template-columns:minmax(160px,.65fr) minmax(330px,1.5fr)}.number-app.organ-console .number-piano .piano-sound-title small{font-size:9px;line-height:1.2}.number-app.organ-console .number-piano .piano-sound-controls{grid-template-columns:minmax(150px,1fr) minmax(170px,1fr) auto auto;gap:6px}.number-app.organ-console .number-piano .piano-sound-controls select{min-height:36px;padding:5px 8px}.number-app.organ-console .number-piano .piano-test-sound{min-height:36px;padding:6px 9px}.number-app.organ-console .number-piano .piano-chord-panel{display:grid!important;grid-template-columns:minmax(130px,1fr) minmax(145px,1fr) auto auto;gap:6px;margin-top:6px}.number-app.organ-console .number-piano .piano-chord-panel select,.number-app.organ-console .number-piano .piano-chord-panel button{min-height:36px;padding:5px 8px}.number-app.organ-console .number-piano .piano-controls{display:flex;gap:5px;margin:2px 0 5px;flex-wrap:wrap}.number-app.organ-console .number-piano .piano-controls button{min-height:34px;padding:5px 8px;font-size:11px}.number-app.organ-console .number-piano .piano-range,.number-app.organ-console .number-piano .piano-help{margin:2px 0;color:#aab5c7;font-size:10px}.number-app.organ-console .number-piano .keyboard-scroll{min-height:220px}.number-app.organ-console .number-piano .keyboard{height:215px}.number-app.organ-console .number-piano .key.white{height:210px}.number-app.organ-console .number-piano .key.black{height:126px}.number-app.organ-console .number-feedback{margin:6px 0 0;background:#171d28;border-color:#ffffff18;color:#dfe7f4;padding:7px 10px}.number-top-actions [data-immersive]{background:linear-gradient(135deg,#4032a7,#6f59d9);color:#fff;border:0;font-weight:900}

/* Desktop fullscreen: keep ALL organ controls visible, only hide secondary lesson panels. */
.number-app.immersive.organ-performance .number-stage{grid-template-rows:auto auto auto minmax(0,1fr) auto!important}.number-app.immersive.organ-performance .number-piano .piano-chord-panel{display:grid!important}.number-app.immersive.organ-performance .number-piano .piano-controls{display:flex!important}.number-app.immersive.organ-performance .number-piano .piano-brand{display:flex!important}.number-app.immersive.organ-performance .number-piano .piano-range{display:block!important}.number-app.immersive.organ-performance .number-piano .piano-help{display:none!important}.number-app.immersive.organ-performance .number-piano .piano-case{grid-template-rows:auto auto auto minmax(0,1fr)!important}.number-app.immersive.organ-performance .number-piano .keyboard{min-height:205px!important}.number-app.immersive.organ-performance .number-piano .key.white{min-height:200px!important}.number-app.immersive.organ-performance .number-piano .key.black{min-height:120px!important}

/* Touch devices: organ mode is a large in-page console, never a blocking overlay. */
@media(pointer:coarse){.number-app.touch-practice.organ-performance{width:100%!important}.number-app.touch-practice.organ-performance .number-topbar{position:relative;z-index:1}.number-app.touch-practice.organ-performance .number-stage{background:linear-gradient(180deg,#171b25,#0d1017)!important;color:#fff!important;padding:8px!important;border-radius:18px!important}.number-app.touch-practice.organ-performance .number-stage-head{display:grid!important;grid-template-columns:1fr!important}.number-app.touch-practice.organ-performance .number-stage-head>div:first-child{display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px}.number-app.touch-practice.organ-performance .number-stage-head h1{font-size:18px!important;margin:0!important}.number-app.touch-practice.organ-performance .number-stage-head .eyebrow{display:none!important}.number-app.touch-practice.organ-performance .number-mode-switch{margin:0!important}.number-app.touch-practice.organ-performance .pro-transport{padding:6px!important}.number-app.touch-practice.organ-performance .transport-row{display:grid!important;grid-template-columns:1fr auto auto!important;gap:5px!important}.number-app.touch-practice.organ-performance .transport-row>[data-hear],.number-app.touch-practice.organ-performance .transport-row>[data-reset],.number-app.touch-practice.organ-performance .transport-state{display:none!important}.number-app.touch-practice.organ-performance .loop-main-select{grid-column:1/2!important;min-width:0!important}.number-app.touch-practice.organ-performance .loop-main-select select{min-width:0!important;width:100%!important}.number-app.touch-practice.organ-performance .loop-mini-volume{grid-column:1/-1!important;display:grid!important;grid-template-columns:auto 1fr;align-items:center;min-width:0!important}.number-app.touch-practice.organ-performance .loop-mini-volume input{width:100%!important}.number-app.touch-practice.organ-performance .tempo-console{grid-template-columns:auto 1fr!important;padding:6px!important}.number-app.touch-practice.organ-performance .tempo-buttons{grid-column:1/-1;display:flex!important;gap:4px!important}.number-app.touch-practice.organ-performance .tempo-buttons button,.number-app.touch-practice.organ-performance .tempo-buttons select{min-height:34px;padding:5px 7px;font-size:10px}.number-app.touch-practice.organ-performance .number-song-progress{margin:5px 0 0;padding:6px 8px}.number-app.touch-practice.organ-performance .number-now-row{grid-template-columns:110px 1fr!important;margin:5px 0!important}.number-app.touch-practice.organ-performance .number-now b{font-size:34px!important}.number-app.touch-practice.organ-performance .number-next{min-width:0}.number-app.touch-practice.organ-performance .upcoming-chip{font-size:15px;min-width:32px;padding:5px}.number-app.touch-practice.organ-performance .number-sequence{max-height:58px!important;padding:2px 0 5px!important}.number-app.touch-practice.organ-performance .number-token{min-width:50px!important;padding:4px 6px!important}.number-app.touch-practice.organ-performance .number-piano-focus{margin:0!important;padding:4px!important}.number-app.touch-practice.organ-performance .number-piano .piano-sound-console{display:grid!important;grid-template-columns:1fr!important;padding:5px!important}.number-app.touch-practice.organ-performance .number-piano .piano-sound-title{display:none!important}.number-app.touch-practice.organ-performance .number-piano .piano-sound-controls{display:grid!important;grid-template-columns:1fr 1fr!important;gap:4px!important}.number-app.touch-practice.organ-performance .number-piano .piano-sample-status,.number-app.touch-practice.organ-performance .number-piano .piano-test-sound{display:none!important}.number-app.touch-practice.organ-performance .number-piano .piano-chord-panel{display:grid!important;grid-template-columns:1fr 1fr!important;gap:4px!important}.number-app.touch-practice.organ-performance .number-piano .piano-chord-panel button{min-height:34px}.number-app.touch-practice.organ-performance .number-piano .piano-controls{display:grid!important;grid-template-columns:repeat(4,1fr)!important;gap:3px!important}.number-app.touch-practice.organ-performance .number-piano .piano-controls button{font-size:9px;padding:4px 2px;min-height:32px}.number-app.touch-practice.organ-performance .number-piano .piano-brand,.number-app.touch-practice.organ-performance .number-piano .piano-range,.number-app.touch-practice.organ-performance .number-piano .piano-help{display:none!important}.number-app.touch-practice.organ-performance .number-piano .keyboard-scroll{min-height:190px!important}.number-app.touch-practice.organ-performance .number-piano .keyboard{height:185px!important;min-height:185px!important}.number-app.touch-practice.organ-performance .number-piano .key.white{height:180px!important;min-height:180px!important}.number-app.touch-practice.organ-performance .number-piano .key.black{height:108px!important;min-height:108px!important}.number-app.touch-practice.organ-performance .number-feedback{font-size:11px;padding:5px 7px}.number-app.touch-practice.organ-performance+.number-phrase-panel{margin-top:8px}}
@media(pointer:coarse) and (orientation:landscape){.number-app.touch-practice.organ-performance .number-stage-head{grid-template-columns:minmax(160px,.55fr) minmax(0,1.8fr)!important}.number-app.touch-practice.organ-performance .number-now-row{grid-template-columns:100px 1fr!important}.number-app.touch-practice.organ-performance .number-piano .keyboard-scroll{min-height:165px!important}.number-app.touch-practice.organ-performance .number-piano .keyboard{height:160px!important;min-height:160px!important}.number-app.touch-practice.organ-performance .number-piano .key.white{height:155px!important;min-height:155px!important}.number-app.touch-practice.organ-performance .number-piano .key.black{height:94px!important;min-height:94px!important}}

/* V22 — Lucky Game */
.lucky-game-panel{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(240px,.8fr);gap:18px;align-items:center;margin:0 0 18px;padding:20px 22px;border-radius:26px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 28%,#fff),color-mix(in srgb,var(--primary) 15%,#fff));border:1px solid color-mix(in srgb,var(--primary) 18%,#fff);box-shadow:0 14px 34px #4e3f7c12}.lucky-game-copy{display:flex;align-items:center;gap:16px;min-width:0}.lucky-dice{display:grid;place-items:center;width:78px;height:78px;border-radius:24px;background:#fff;font-size:42px;box-shadow:0 10px 24px #5a467d18;flex:0 0 auto}.lucky-game-copy h2{margin:2px 0 4px;font-size:clamp(24px,4vw,36px);color:var(--primary)}.lucky-game-copy p{margin:0;color:var(--muted);line-height:1.7}.lucky-game-action{display:grid;gap:9px}.lucky-game-button{min-height:62px;border-radius:20px;font-size:20px;font-weight:1000;background:linear-gradient(135deg,var(--primary),color-mix(in srgb,var(--primary) 62%,#ff6fae));color:#fff}.lucky-game-button.rolling{animation:luckyShake .18s linear infinite}.lucky-game-button.winner{animation:luckyWin .6s ease}.lucky-game-result{min-height:44px;display:grid;place-items:center;text-align:center;padding:9px 12px;border-radius:14px;background:#fff;border:1px dashed color-mix(in srgb,var(--primary) 30%,#fff);font-weight:900;color:var(--primary)}@keyframes luckyShake{25%{transform:rotate(-3deg) scale(.98)}75%{transform:rotate(3deg) scale(1.02)}}@keyframes luckyWin{0%{transform:scale(1)}50%{transform:scale(1.08)}100%{transform:scale(1)}}@media(max-width:700px){.lucky-game-panel{grid-template-columns:1fr;padding:15px}.lucky-game-copy{align-items:flex-start}.lucky-dice{width:62px;height:62px;font-size:34px;border-radius:18px}.lucky-game-button{min-height:56px;font-size:18px}}

/* V23 — stability, phrase selector, circular lucky wheel, admin controls */
.phrase-select-label{display:grid;gap:5px;min-width:210px;font-weight:900}.phrase-select-label select{min-height:46px;border-radius:12px;border:1px solid var(--line);background:#fff;color:var(--ink);padding:8px 12px;font-size:15px}.number-phrase-list button{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
[data-loop-controls]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}[data-loop-controls][hidden]{display:none!important}
.admin-control-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}.admin-control-grid>section{padding:16px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(180deg,#fff,color-mix(in srgb,var(--soft) 38%,#fff))}.admin-control-grid h3{margin:0 0 12px;color:var(--primary)}.admin-control-grid .choice{margin:8px 0}.admin-control-grid input[type=range]{width:100%}
.lucky-wheel-panel{display:grid;grid-template-columns:minmax(260px,1fr) minmax(260px,420px);gap:24px;align-items:center;margin:0 0 20px;padding:22px;border:1px solid var(--line);border-radius:28px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 20%,#fff),color-mix(in srgb,var(--primary) 10%,#fff));overflow:hidden}.lucky-wheel-copy h2{font-size:clamp(26px,4vw,40px);margin:4px 0;color:var(--primary)}.lucky-wheel-copy p{color:var(--muted);line-height:1.7}.lucky-spin-button{min-height:56px;border-radius:18px;font-size:18px;margin-top:10px}.lucky-wheel-wrap{position:relative;width:min(76vw,360px);aspect-ratio:1;margin:auto}.lucky-pointer{position:absolute;top:-12px;left:50%;transform:translateX(-50%);z-index:5;font-size:34px;color:var(--primary);filter:drop-shadow(0 3px 3px #0002)}.lucky-wheel{position:relative;width:100%;height:100%;border-radius:50%;background:conic-gradient(#ffd166 0 45deg,#7bdff2 45deg 90deg,#f7aef8 90deg 135deg,#b9fbc0 135deg 180deg,#ff99c8 180deg 225deg,#a0c4ff 225deg 270deg,#caffbf 270deg 315deg,#ffc6ff 315deg 360deg);border:12px solid #fff;box-shadow:0 18px 40px #4e3f7c25,inset 0 0 0 4px color-mix(in srgb,var(--primary) 25%,transparent);transition:transform 2.6s cubic-bezier(.12,.72,.16,1)}.lucky-wheel:after{content:'';position:absolute;inset:14%;border-radius:50%;background:#fff;border:5px solid color-mix(in srgb,var(--primary) 20%,#fff)}.lucky-wheel>b{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);z-index:3;font-size:46px;color:var(--primary)}.lucky-wheel>span{--a:calc(var(--i)*45deg + 22.5deg);position:absolute;left:50%;top:50%;z-index:2;font-size:28px;transform:rotate(var(--a)) translateY(-42%) translateY(-125px) rotate(calc(-1 * var(--a)));transform-origin:0 0}.lucky-game-result{min-height:48px;margin:12px 0;padding:10px 13px;border-radius:14px;background:#fff;border:1px dashed color-mix(in srgb,var(--primary) 30%,#fff);display:grid;place-items:center;font-weight:900;color:var(--primary)}
.game-loading{padding:28px;text-align:center;font-weight:900;color:var(--primary)}
@media(max-width:760px){.admin-control-grid{grid-template-columns:1fr}.lucky-wheel-panel{grid-template-columns:1fr;padding:16px}.lucky-wheel-wrap{width:min(78vw,310px)}.lucky-wheel>span{transform:rotate(var(--a)) translateY(-42%) translateY(-106px) rotate(calc(-1 * var(--a)))}.phrase-select-label{width:100%;min-width:0}.number-phrase-panel .panel-title-row{display:grid;grid-template-columns:1fr}}
@media(max-width:430px){.lucky-wheel-wrap{width:min(82vw,280px)}.lucky-wheel>span{font-size:24px;transform:rotate(var(--a)) translateY(-42%) translateY(-94px) rotate(calc(-1 * var(--a)))}}

/* V23 iPad/mobile performance tuning */
@media (pointer:coarse){
  .card,.game-card,.panel{box-shadow:none}
  button,a{transition-duration:.08s}
  .game-card:hover,.card:hover{transform:none}
  .celebration-layer span:nth-of-type(n+13){display:none}
}
.games-grid .game-card{contain:layout paint}.number-sequence{scroll-behavior:auto}.number-phrase-list{scroll-behavior:auto}

/* V24 — smart next-note arrows, sound-bank admin and database backup */
.note-roadmap{display:grid;grid-template-columns:minmax(90px,1fr) 54px minmax(110px,1.1fr) 64px minmax(90px,1fr);gap:8px;align-items:center;margin:10px 0 12px;padding:10px 12px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(135deg,#fff,color-mix(in srgb,var(--soft) 50%,#fff));position:relative;overflow:hidden}.note-roadmap span{display:grid;gap:2px;text-align:center;padding:7px 9px;border-radius:13px;background:#fff;border:1px solid color-mix(in srgb,var(--primary) 12%,#fff)}.note-roadmap small{color:var(--muted);font-weight:800}.note-roadmap b{color:var(--primary);font-size:15px}.note-roadmap .road-current{background:color-mix(in srgb,var(--accent) 14%,#fff);border-color:color-mix(in srgb,var(--accent) 48%,#fff)}.note-roadmap .road-arrow{font-size:32px;line-height:1;text-align:center;color:var(--primary);font-weight:1000}.note-roadmap em{grid-column:1/-1;text-align:center;font-style:normal;font-weight:900;color:var(--muted);font-size:12px}.note-roadmap.hint-active{animation:roadHint .75s ease-in-out 2;box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 20%,transparent)}
.number-piano .key.target-key.guide-right::after,.practice-piano .key.target-key.guide-right::after{content:'→'}.number-piano .key.target-key.guide-left::after,.practice-piano .key.target-key.guide-left::after{content:'←'}.number-piano .key.target-key.guide-repeat::after,.practice-piano .key.target-key.guide-repeat::after{content:'↻'}.number-piano .key.target-key.guide-right::after,.number-piano .key.target-key.guide-left::after,.number-piano .key.target-key.guide-repeat::after,.practice-piano .key.target-key.guide-right::after,.practice-piano .key.target-key.guide-left::after,.practice-piano .key.target-key.guide-repeat::after{position:absolute;top:10px;left:50%;transform:translateX(-50%);display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#fff4b8;color:#5d4500;border:2px solid #e8bd2e;font-size:25px;font-weight:1000;z-index:12;pointer-events:none;box-shadow:0 5px 14px #0002}.number-piano .key.black.target-key::after,.practice-piano .key.black.target-key::after{top:7px;width:30px;height:30px;font-size:21px}.key.hint-pulse{animation:keyHintPulse .58s ease-in-out 3!important}
.builtin-kit-panel{border-top:6px solid var(--accent)}.builtin-kit-grid{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:16px}.builtin-kit-grid label{display:grid;gap:9px;padding:15px;border-radius:17px;background:var(--soft);font-weight:900}.builtin-kit-grid select{min-height:46px}.database-backup-panel{border-inline-start:6px solid var(--primary)}.backup-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px;margin:16px 0}.backup-stats span{display:grid;place-items:center;min-height:78px;padding:10px;border-radius:15px;background:var(--soft);color:var(--muted);text-align:center}.backup-stats b{font-size:23px;color:var(--primary)}
@keyframes keyHintPulse{0%,100%{filter:brightness(1);transform:translateY(0)}50%{filter:brightness(1.28);transform:translateY(-4px)}}@keyframes roadHint{0%,100%{transform:scale(1)}50%{transform:scale(1.012)}}
@media(max-width:760px){.note-roadmap{grid-template-columns:1fr 34px 1.1fr 42px 1fr;padding:8px;gap:5px}.note-roadmap .road-arrow{font-size:25px}.note-roadmap b{font-size:12px}.note-roadmap small{font-size:10px}.builtin-kit-grid{grid-template-columns:1fr}.database-backup-panel .panel-title-row{display:grid;grid-template-columns:1fr}.database-backup-panel .button{width:100%;text-align:center}}
@media(max-width:430px){.note-roadmap{grid-template-columns:1fr 28px 1fr 34px 1fr}.note-roadmap span{padding:6px 4px}.note-roadmap em{font-size:10px}.number-piano .key.target-key.guide-right::after,.number-piano .key.target-key.guide-left::after,.number-piano .key.target-key.guide-repeat::after{width:29px;height:29px;font-size:20px;top:7px}}
.percussion-rack{border-top:5px solid color-mix(in srgb,var(--accent) 75%,#fff)}.percussion-rack select{min-width:220px}.percussion-pad-grid{display:grid;grid-template-columns:repeat(4,minmax(110px,1fr));gap:10px;margin-top:14px}.percussion-pad-grid button{min-height:62px;border-radius:17px;font-weight:900}.sound-bank-card[data-bank-card] .sound-slot audio{height:40px}
@media(max-width:700px){.percussion-pad-grid{grid-template-columns:repeat(2,1fr)}.percussion-rack .panel-title-row{display:grid;grid-template-columns:1fr}.percussion-rack select{width:100%;min-width:0}}

/* V25 — direct game flow, progressive memory levels, learning notes */
.game-concept-note{margin:12px 0 16px;border:1px solid color-mix(in srgb,var(--accent) 45%,var(--line));border-radius:16px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 12%,#fff),#fff);overflow:hidden}.game-concept-note summary{cursor:pointer;padding:12px 14px;font-weight:900;color:var(--primary);min-height:46px;display:flex;align-items:center}.game-concept-note p{margin:0;padding:0 14px 14px;line-height:1.8;color:var(--ink)}
.sound-pairs.progressive,.visual-pairs{display:grid;grid-template-columns:repeat(auto-fit,minmax(72px,1fr));gap:10px;max-width:760px;margin:20px auto}.sound-pairs.progressive button,.visual-pairs button{aspect-ratio:1;min-height:68px;border-radius:18px;font-size:26px;background:linear-gradient(150deg,#f4efff,#eaf8ff);color:var(--primary);border:2px solid color-mix(in srgb,var(--primary) 18%,#fff);box-shadow:0 6px 14px #45366f12;transition:transform .16s ease,background .16s ease,border-color .16s ease}.sound-pairs.progressive button.open,.visual-pairs button.open{transform:translateY(-2px);background:#fff7db;border-color:var(--accent)}.sound-pairs.progressive button.matched,.visual-pairs button.matched{background:#e2faee;border-color:#5ac895;color:#15714e;transform:scale(.97)}.sound-pairs.progressive button span,.visual-pairs button span{display:grid;place-items:center;width:100%;height:100%}.visual-pairs button{font-size:34px}.game-board{scroll-margin-top:88px}
@media(max-width:620px){.sound-pairs.progressive,.visual-pairs{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.sound-pairs.progressive button,.visual-pairs button{min-height:58px;border-radius:14px;padding:4px}.visual-pairs button{font-size:28px}}
@media(max-width:390px){.sound-pairs.progressive,.visual-pairs{grid-template-columns:repeat(4,minmax(0,1fr))}.sound-pairs.progressive button,.visual-pairs button{min-height:52px;font-size:22px}}

/* V26 — professional sound memory: rhythm + musical notes */
.sound-memory-legend{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 14px}.sound-memory-legend span{padding:7px 10px;border-radius:999px;background:color-mix(in srgb,var(--soft) 70%,#fff);border:1px solid var(--line);font-size:12px;font-weight:900;color:var(--ink)}
.sound-pairs.progressive button.open span{font-size:26px}.sound-pairs.progressive button.matched{background:linear-gradient(135deg,#dcf8e9,#f4fff9);color:#14704c;border-color:#9bdcbc}
@media(max-width:430px){.sound-memory-legend{gap:5px}.sound-memory-legend span{font-size:10px;padding:6px 8px}}

/* V27 — Kids Music Arcade */
.arcade-zone-banner{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:center;padding:22px 24px;margin:18px 0;border-radius:28px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 14%,#fff),color-mix(in srgb,var(--accent) 22%,#fff));border:1px solid color-mix(in srgb,var(--primary) 14%,#fff);overflow:hidden;position:relative}.arcade-zone-banner:after{content:'♪ ♫ ★ ♪ ♬';position:absolute;inset-inline-end:-12px;bottom:-20px;font-size:70px;opacity:.08;transform:rotate(-8deg)}.arcade-zone-banner h2{margin:8px 0 5px}.arcade-zone-icons{font-size:clamp(34px,7vw,72px);letter-spacing:8px;white-space:nowrap;filter:drop-shadow(0 8px 8px #0001)}
.arcade-game-card{border:2px solid color-mix(in srgb,var(--accent) 50%,var(--line));background:linear-gradient(155deg,#fff,color-mix(in srgb,var(--accent) 14%,#fff));min-height:138px}.arcade-game-card>span{font-size:42px}.arcade-pill{position:absolute;inset-inline-start:8px;top:8px;font-size:9px;font-style:normal;font-weight:1000;letter-spacing:.08em;border-radius:999px;padding:3px 7px;background:#2e245c;color:#fff;z-index:2}
.arcade-shell{overflow:hidden}.arcade-title{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;margin-bottom:12px}.arcade-title h2{margin:5px 0}.arcade-title p{margin:0;color:var(--muted)}.arcade-character{display:grid;place-items:center;width:76px;height:76px;border-radius:24px;background:linear-gradient(145deg,color-mix(in srgb,var(--accent) 36%,#fff),color-mix(in srgb,var(--sky) 20%,#fff));font-size:42px;box-shadow:0 10px 20px #3d32641a}.arcade-level{font-weight:1000;padding:8px 12px;border-radius:999px;background:var(--primary);color:#fff;white-space:nowrap}.arcade-hud{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:9px 12px;border-radius:14px;background:color-mix(in srgb,var(--soft) 62%,#fff);font-weight:900}.arcade-stage{min-height:260px;margin:12px 0;border-radius:24px;padding:16px;background:linear-gradient(180deg,#fff,color-mix(in srgb,var(--soft) 32%,#fff));border:1px solid var(--line);overflow:hidden;position:relative}.arcade-actions{justify-content:center}.arcade-result{text-align:center;font-size:16px;min-height:48px}.arcade-prompt{display:flex;align-items:center;justify-content:center;gap:14px;font-size:18px;font-weight:900;margin-bottom:14px}.arcade-prompt [data-countdown]{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:var(--primary);color:#fff}
.note-bubbles{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;min-height:185px;align-items:center}.note-bubble{--bubble:#ff7aa8;width:92px;height:92px;border:0;border-radius:50%;background:radial-gradient(circle at 35% 28%,#fff9 0 9%,transparent 10%),linear-gradient(145deg,color-mix(in srgb,var(--bubble) 68%,#fff),var(--bubble));color:#fff;box-shadow:inset -9px -12px 20px #0001,0 12px 22px #3a2b5c20;animation:arcadeFloat 2.8s ease-in-out infinite alternate;animation-delay:var(--delay);position:relative}.note-bubble:after{content:'';position:absolute;width:2px;height:32px;background:#8f86a6;bottom:-30px;left:50%}.note-bubble span{display:block;font-size:24px}.note-bubble b{font-size:18px}.note-bubble.bubble-win{animation:arcadePop .4s ease forwards}.note-bubble.bubble-miss{transform:translateX(5px);filter:grayscale(.45)}
.xylophone-game{display:flex;align-items:flex-end;justify-content:center;gap:8px;min-height:210px;padding:20px 4px}.xylo-bar{--bar:#ff7aa8;flex:1;max-width:74px;min-width:38px;border:0;border-radius:18px 18px 12px 12px;background:linear-gradient(180deg,color-mix(in srgb,var(--bar) 60%,#fff),var(--bar));color:#2c2750;box-shadow:inset 0 -8px 16px #0001,0 10px 18px #3f346018;transition:transform .15s,filter .15s}.xylo-bar span{writing-mode:vertical-rl;font-weight:1000}.xylo-bar.xylo-demo,.xylo-bar.xylo-hit{transform:translateY(-10px) scale(1.03);filter:brightness(1.2);box-shadow:0 0 0 5px #fff,0 0 24px var(--accent)}
.animal-stage{min-height:230px;padding:14px;border-radius:22px;background:linear-gradient(#dff8ff 0 52%,#dff2c9 52% 100%)}.animal-curtain{text-align:center;font-weight:1000;margin-bottom:12px;color:#56498c}.animal-grid{display:grid;grid-template-columns:repeat(3,minmax(88px,1fr));gap:12px}.animal-player{min-height:96px;border-radius:22px;border:2px solid #fff;background:#fff9;box-shadow:0 9px 18px #3f346018;color:#423765}.animal-player span{display:block;font-size:40px}.animal-player b{display:block}.animal-player em{font-style:normal;opacity:.5}.animal-player.animal-demo,.animal-player.animal-hit{transform:translateY(-7px) rotate(-2deg);box-shadow:0 0 0 5px var(--accent),0 15px 22px #3f346024}
.runner-world{min-height:245px}.runner-sky{text-align:center;font-size:26px;letter-spacing:35px}.runner-track{position:relative;height:120px;margin-top:10px;border-radius:22px;background:linear-gradient(#cbeafe 0 35%,#b7e3a1 35% 58%,#6c6d79 58% 100%);overflow:hidden}.runner-track:after{content:'';position:absolute;left:0;right:0;bottom:22px;height:4px;background:repeating-linear-gradient(90deg,#fff 0 35px,transparent 35px 70px)}.runner{position:absolute;left:8%;bottom:28px;font-size:48px;z-index:4;transition:left .25s ease}.runner-obstacle{position:absolute;bottom:30px;font-size:28px}.finish-flag{position:absolute;right:4%;bottom:30px;font-size:42px}.runner-jump{display:block;margin:14px auto 0;width:min(420px,100%);min-height:68px;border-radius:999px;font-size:20px}.runner-jump-anim{animation:runnerJump .25s ease}
.drum-hero-lanes{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;min-height:220px;padding-top:60px;position:relative}.drum-hero-pad{min-height:125px;border-radius:24px;background:linear-gradient(180deg,#fff,#eee8ff);color:#423765;border:2px solid var(--line)}.drum-hero-pad span{display:block;font-size:34px}.drum-hero-pad b{display:block;margin-top:8px}.drum-hero-pad.drum-hero-ready{box-shadow:0 0 0 5px var(--accent),0 0 30px color-mix(in srgb,var(--accent) 65%,transparent);transform:translateY(-4px)}.drum-target{position:absolute;top:5px;font-size:34px;z-index:4}.drum-target.drop{animation:drumDrop .65s ease-in forwards}.drum-hero-good{filter:brightness(1.18)}.drum-hero-bad{animation:arcadeShake .2s ease}
.note-road{position:relative;display:grid;gap:8px;min-height:250px}.road-lane{height:68px;border-radius:16px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;font-weight:1000;position:relative;overflow:hidden}.road-lane:after{content:'';position:absolute;left:0;right:0;bottom:8px;height:3px;background:repeating-linear-gradient(90deg,#fff9 0 20px,transparent 20px 40px)}.road-lane button{width:54px;height:54px;border-radius:50%;padding:0;font-size:22px;z-index:2}.lane-high{background:#dcecff}.lane-mid{background:#e8ddff}.lane-low{background:#ffe9c9}.road-car{position:absolute;left:8%;top:45%;font-size:42px;transition:top .35s,left .35s;z-index:3}
.melody-garden{min-height:235px;border-radius:20px;background:linear-gradient(#dff5ff 0 52%,#d9f0c8 52% 100%);position:relative;padding-top:32px}.garden-sun{position:absolute;right:20px;top:12px;font-size:38px}.garden-flowers{display:flex;align-items:flex-end;justify-content:center;gap:10px;min-height:160px}.music-flower{--flower:#ff7aa8;width:72px;min-height:108px;border-radius:50% 50% 20px 20px;border:0;background:linear-gradient(180deg,color-mix(in srgb,var(--flower) 25%,#fff),#fff);color:#423765}.music-flower span{display:block;font-size:40px}.music-flower b{display:block}.music-flower.flower-demo,.music-flower.flower-bloom{transform:translateY(-7px);box-shadow:0 0 0 5px var(--flower),0 14px 22px #3f346018}.garden-ground{text-align:center;font-size:29px;white-space:nowrap;overflow:hidden}
.sound-pop-zone{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:15px;min-height:205px}.sound-pop{--pop:#ff7aa8;width:104px;height:104px;border-radius:50%;border:0;background:radial-gradient(circle at 32% 27%,#fff9 0 8%,transparent 9%),linear-gradient(145deg,color-mix(in srgb,var(--pop) 65%,#fff),var(--pop));color:#fff;box-shadow:0 12px 24px #3f346020}.sound-pop span{display:block;font-size:34px}.sound-pop b{display:block}.sound-pop-win{animation:arcadePop .35s ease forwards}.sound-pop-miss{animation:arcadeShake .22s ease}
@keyframes arcadeFloat{from{transform:translateY(0) rotate(-2deg)}to{transform:translateY(-10px) rotate(2deg)}}@keyframes arcadePop{0%{transform:scale(1)}70%{transform:scale(1.28)}100%{transform:scale(0);opacity:0}}@keyframes arcadeShake{0%,100%{transform:translateX(0)}35%{transform:translateX(-7px)}70%{transform:translateX(7px)}}@keyframes runnerJump{50%{transform:translateY(-30px) rotate(-5deg)}}@keyframes drumDrop{from{transform:translateY(0)}to{transform:translateY(88px)}}
@media(max-width:760px){.arcade-zone-banner{grid-template-columns:1fr;padding:17px}.arcade-zone-icons{text-align:center;font-size:36px}.arcade-title{grid-template-columns:auto 1fr}.arcade-title .arcade-level{grid-column:1/-1;justify-self:start}.arcade-character{width:62px;height:62px;font-size:34px}.arcade-stage{padding:10px;min-height:220px}.note-bubble{width:76px;height:76px}.animal-grid{grid-template-columns:repeat(3,1fr);gap:7px}.animal-player{min-height:84px;padding:7px}.animal-player span{font-size:34px}.drum-hero-lanes{gap:6px}.drum-hero-pad{min-height:105px;padding:7px}.xylophone-game{gap:5px}.xylo-bar{min-width:28px}.music-flower{width:58px;min-height:96px;padding:6px}.sound-pop{width:86px;height:86px;padding:6px}}
@media(max-width:430px){.arcade-title{grid-template-columns:1fr}.arcade-character{display:none}.arcade-zone-icons{letter-spacing:3px}.note-bubbles{gap:9px}.note-bubble{width:68px;height:68px}.note-bubble b{font-size:15px}.animal-grid{grid-template-columns:repeat(2,1fr)}.drum-hero-lanes{grid-template-columns:repeat(2,1fr);padding-top:48px}.drum-hero-pad{min-height:82px}.runner-sky{letter-spacing:12px}.road-lane{height:60px}.music-flower{width:48px}.sound-pop{width:76px;height:76px}.sound-pop span{font-size:27px}}
@media(prefers-reduced-motion:reduce){.note-bubble,.drum-target,.runner,.xylo-bar,.animal-player,.music-flower,.sound-pop{animation:none!important;transition:none!important}}
.sound-bulk-upload{display:grid;grid-template-columns:minmax(220px,1fr) minmax(230px,1fr) auto;gap:12px;align-items:center;margin:14px 0 18px;padding:14px;border-radius:16px;background:linear-gradient(135deg,color-mix(in srgb,var(--sky) 12%,#fff),color-mix(in srgb,var(--accent) 10%,#fff));border:1px dashed color-mix(in srgb,var(--primary) 28%,var(--line))}.sound-bulk-upload>div{display:flex;flex-direction:column;gap:3px}.sound-bulk-upload small{color:var(--muted);line-height:1.55}.sound-bulk-upload input{min-height:44px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:12px}.sound-bulk-upload button{min-height:44px}@media(max-width:760px){.sound-bulk-upload{grid-template-columns:1fr}.sound-bulk-upload button{width:100%}}

/* V28 — visual text editor */
.text-rule-hidden{display:none!important}.text-edit-mode .text-edit-target{outline:2px dashed color-mix(in srgb,var(--accent) 78%,#fff);outline-offset:2px;cursor:crosshair!important}.text-edit-mode .text-edit-target:hover{background:color-mix(in srgb,var(--accent) 12%,transparent)}.text-admin-float{position:fixed;z-index:99999;left:18px;right:18px;bottom:18px;display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 16px;border-radius:18px;background:#181522;color:#fff;box-shadow:0 16px 50px #0007;border:1px solid #ffffff25}.text-admin-float b{color:#ffd56a}.text-admin-float span{flex:1 1 260px;color:#e8e5f3}.text-admin-float button{margin-inline-start:auto}.text-source-preview{padding:12px 14px;border-radius:14px;background:var(--soft);border:1px solid var(--line);font-weight:800;line-height:1.8}.text-rules-list{display:grid;gap:10px}.text-rule-card{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:14px;align-items:center;padding:13px;border:1px solid var(--line);border-radius:16px;background:color-mix(in srgb,var(--soft) 35%,#fff)}.text-rule-card>div:first-child{display:grid;gap:5px;min-width:0}.text-rule-card b,.text-rule-card small{overflow-wrap:anywhere}.text-rule-roles{display:flex;gap:8px;flex-wrap:wrap}.text-rule-roles span{padding:5px 8px;border-radius:999px;background:#fff;border:1px solid var(--line);font-size:11px;font-weight:800}.backup-main-action{display:grid;place-items:center;text-align:center;gap:8px;padding:26px;border-radius:20px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 8%,#fff),color-mix(in srgb,var(--accent) 11%,#fff));margin:18px 0}.backup-download{font-size:18px;padding:14px 22px}.backup-warning{display:flex;gap:10px;align-items:flex-start;padding:14px;border-radius:15px;background:#fff7dc;border:1px solid #f0d783}.backup-warning b{color:#8b6100}

/* V28 — Atari Music Challenge */
.atari-zone-banner{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:24px 26px;border-radius:26px;margin-bottom:18px;background:linear-gradient(135deg,#17162a,#31305b 55%,#54458b);color:#fff;overflow:hidden;position:relative}.atari-zone-banner h2{margin:7px 0;color:#fff}.atari-zone-banner p{color:#e9e7ff;max-width:760px}.atari-shell{border-radius:22px;overflow:hidden;background:linear-gradient(180deg,#111424,#1d2038);color:#fff;border:2px solid #4f5589;box-shadow:inset 0 0 0 2px #0a0c17}.atari-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;padding:16px 18px;border-bottom:1px solid #ffffff1f;background:linear-gradient(90deg,#191c31,#2c2b4c)}.atari-head h2{margin:3px 0;color:#fff}.atari-head p{margin:0;color:#c8c9dc}.atari-icon{font-size:42px;filter:drop-shadow(0 4px 0 #0005)}.atari-score{font-family:monospace;font-size:20px;font-weight:1000;padding:9px 12px;border-radius:10px;background:#090a13;color:#7df7b1;border:1px solid #53a87a}.atari-stage{min-height:330px;padding:18px;background:linear-gradient(180deg,#0c1020,#12192c);position:relative;overflow:hidden}.atari-shell>.toolbar,.atari-shell>.game-result{margin-inline:16px}.atari-space{position:relative;min-height:310px;border:2px solid #48517c;border-radius:16px;background:radial-gradient(circle at 20% 20%,#ffffff22 0 1px,transparent 2px),radial-gradient(circle at 70% 35%,#ffffff18 0 1px,transparent 2px),linear-gradient(#080b18,#151b35);background-size:42px 42px,57px 57px,auto;overflow:hidden}.atari-danger-line{position:absolute;left:0;right:0;bottom:42px;height:4px;background:#ff536f;box-shadow:0 0 14px #ff536f}.invader{position:absolute;top:16px;left:calc(8% + var(--lane)*13%);width:82px;min-height:74px;border-radius:14px;background:#222c4c;color:#fff;border:2px solid #8d9cff;box-shadow:0 0 16px #4c5fff55;animation:invaderFall var(--fall) linear forwards}.invader span{display:block;font-size:30px}.invader b{font-size:13px}.invader-hit{background:#19704b!important;transform:scale(.85);opacity:.2}.invader-miss{background:#7c2132!important}.beat-defender{display:grid;place-items:center;gap:20px;min-height:290px}.beat-orbit{position:relative;width:150px;height:150px;border-radius:50%;display:grid;place-items:center;background:#090b16;border:3px solid #47527d}.beat-core{font-size:52px}.beat-ring{position:absolute;inset:18px;border:5px solid #74e2b3;border-radius:50%;opacity:.35}.beat-ring.beat-pulse{animation:beatRing .45s ease-out}.shield-button{min-width:240px;min-height:82px;border-radius:22px;font-size:22px;background:linear-gradient(135deg,#4265c7,#7252c6)}.snake-hud{padding:10px;border-radius:12px;background:#080a12;color:#c8ffdb;margin-bottom:10px;text-align:center}.note-snake-grid{display:grid;grid-template-columns:repeat(8,1fr);gap:4px;max-width:650px;margin:auto}.snake-cell{aspect-ratio:1;border-radius:8px;background:#202942;border:1px solid #3c496b;display:grid;place-items:center;font-size:12px}.snake-cell span{font-size:20px}.snake-cell b{font-size:10px}.snake-player{font-size:25px;background:#2b855b;box-shadow:0 0 14px #5cff9d66}.snake-controls{display:grid;grid-template-columns:repeat(3,70px);justify-content:center;gap:7px;margin-top:13px}.snake-controls button{min-height:48px}.snake-controls [data-dir="up"]{grid-column:2}.snake-controls [data-dir="left"]{grid-column:1;grid-row:2}.snake-controls [data-dir="right"]{grid-column:3;grid-row:2}.snake-controls [data-dir="down"]{grid-column:2;grid-row:2}.drum-lanes{display:grid;grid-template-columns:repeat(4,1fr);gap:9px;position:relative;min-height:280px}.drum-lane{position:relative;overflow:hidden;border-radius:14px;background:#202842;color:#fff;border:2px solid #48577d;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:6px;padding-bottom:18px}.drum-lane>span{font-size:34px}.drum-lane>i{position:absolute;top:15px;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#ffcf55;color:#2e2500;font-style:normal;opacity:0;transform:translateY(-30px)}.drum-lane>i.active{opacity:1;animation:laneDrop .55s ease-out}.lane-hit-line{position:absolute;left:0;right:0;bottom:64px;height:4px;background:#73eead;z-index:5;pointer-events:none}.tournament-clock{display:grid;place-items:center;width:105px;height:105px;border-radius:50%;margin:0 auto 14px;background:#080a12;border:5px solid #ffcf55;color:#fff}.tournament-clock b{font-size:40px}.tournament-clock span{font-size:11px}.tournament-question{text-align:center}.tournament-options{display:grid;grid-template-columns:repeat(2,minmax(110px,1fr));gap:10px;max-width:520px;margin:16px auto}.tournament-options button{min-height:58px;font-size:18px}
@keyframes invaderFall{from{transform:translateY(0)}to{transform:translateY(215px)}}@keyframes beatRing{0%{transform:scale(.5);opacity:1}100%{transform:scale(1.6);opacity:0}}@keyframes laneDrop{0%{transform:translateY(-30px)}100%{transform:translateY(170px)}}
@media(max-width:760px){.text-rule-card{grid-template-columns:1fr}.atari-zone-banner{display:block}.atari-head{grid-template-columns:auto 1fr}.atari-score{grid-column:1/-1}.atari-stage{min-height:280px;padding:10px}.invader{width:62px;left:calc(3% + var(--lane)*13%);font-size:11px}.note-snake-grid{gap:3px}.snake-cell{border-radius:5px}.drum-lanes{gap:5px;min-height:230px}.drum-lane{padding:5px}.drum-lane b{font-size:11px}.shield-button{min-width:190px}.text-admin-float{left:8px;right:8px;bottom:8px}}
@media(max-width:430px){.atari-stage{min-height:240px}.invader{width:50px;min-height:58px}.invader span{font-size:22px}.invader b{font-size:10px}.snake-controls{grid-template-columns:repeat(3,58px)}.tournament-options{grid-template-columns:1fr 1fr}.text-admin-float span{display:none}}
.atari-game-card{background:linear-gradient(180deg,#1b1d33,#292d52)!important;color:#fff!important;border-color:#59649d!important}.atari-game-card b,.atari-game-card small{color:#fff!important}.atari-game-card .game-grade-tag{color:#d8dcff!important}.atari-pill{background:#11162b!important;color:#7df7b1!important;border:1px solid #4bba7a!important}

/* V29 — Android install + student protection + upgraded Atari games */
.android-app-card{border:1px solid color-mix(in srgb,var(--primary) 22%,#fff);background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 10%,#fff),color-mix(in srgb,var(--accent) 9%,#fff));border-radius:24px;padding:18px;margin:18px 0;display:grid;grid-template-columns:auto 1fr auto;gap:14px;align-items:center}.android-app-card .android-icon{font-size:42px}.android-app-card h3{margin:0 0 4px}.android-app-card p{margin:0;color:var(--muted)}.android-app-actions{display:flex;gap:8px;flex-wrap:wrap}.android-admin-box{border:1px solid var(--line);border-radius:20px;padding:16px;background:linear-gradient(180deg,#fff,color-mix(in srgb,var(--soft) 32%,#fff))}.android-admin-box input[type=file]{width:100%}.android-version-row{display:grid;grid-template-columns:minmax(160px,.5fr) minmax(220px,1.5fr);gap:12px}.student-copy-protected main,.student-copy-protected aside,.student-copy-protected header,.student-copy-protected footer{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.student-copy-protected input,.student-copy-protected textarea,.student-copy-protected select{-webkit-user-select:text;user-select:text}.pwa-install-note{font-size:12px;color:var(--muted);margin-top:6px}
.piano-tiles-stage{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;min-height:280px;background:#101522;padding:10px;border-radius:18px}.tile-lane{position:relative;overflow:hidden;background:linear-gradient(#182033,#0c101b);border:1px solid #34405e;border-radius:12px;color:#fff;min-height:260px;box-shadow:none}.tile-lane b{position:absolute;bottom:10px;left:0;right:0;text-align:center}.tile-lane .falling-tile{position:absolute;top:-70px;left:14%;right:14%;height:70px;border-radius:12px;background:linear-gradient(180deg,#ffd85b,#ff8e66);display:grid;place-items:center;font-size:30px;opacity:.15}.tile-lane.tile-active .falling-tile{opacity:1;animation:tileDrop .8s linear forwards}.tile-lane.tile-hit{background:#214f3d}.tiles-hud{display:flex;justify-content:space-between;gap:10px;margin-bottom:10px;font-weight:900}.pitch-maze{display:grid;gap:16px}.maze-progress{display:grid;grid-template-columns:repeat(9,1fr);gap:5px;align-items:center;padding:14px;border-radius:16px;background:linear-gradient(90deg,#eef8ff,#fff6d8)}.maze-progress span,.maze-progress b{display:grid;place-items:center;min-height:38px}.maze-choices,.battle-options{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.maze-choices button,.battle-options button{min-height:74px;font-size:17px}.chord-battle{display:grid;gap:16px}.boss-row{display:flex;align-items:center;justify-content:space-between;font-size:54px;padding:16px;border-radius:18px;background:linear-gradient(135deg,#1d1f31,#382956);color:#fff}.boss-hp{font-size:24px;letter-spacing:4px}.battle-options{grid-template-columns:repeat(2,1fr)}
@keyframes tileDrop{from{transform:translateY(0)}to{transform:translateY(240px)}}
@media(max-width:650px){.android-app-card{grid-template-columns:auto 1fr}.android-app-actions{grid-column:1/-1}.android-version-row{grid-template-columns:1fr}.piano-tiles-stage{min-height:230px}.tile-lane{min-height:210px}.maze-choices,.battle-options{grid-template-columns:1fr}.boss-row{font-size:40px}}

/* V30 — compact, admin-configurable number practice */
.number-app [hidden]{display:none!important}
.number-top-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.practice-quickbar{display:grid;grid-template-columns:minmax(180px,.75fr) auto auto minmax(150px,.7fr);align-items:center;gap:8px;margin-bottom:8px}
.practice-phrase-picker{display:flex;align-items:center;gap:7px;margin:0;padding:6px 9px;border-radius:12px;background:#202634;border:1px solid #ffffff16;color:#dce4f2;min-width:0}
.practice-phrase-picker span{white-space:nowrap;font-size:12px}.practice-phrase-picker select{min-height:36px;padding:5px 8px;min-width:0;background:#111620;color:#fff;border-color:#ffffff22}
.practice-quick-actions{display:flex;gap:6px;align-items:center}.practice-quick-actions button{min-height:36px;padding:6px 10px;white-space:nowrap}
.practice-extra-tools{margin:0;min-width:0}.practice-extra-tools>summary{list-style:none;cursor:pointer;min-height:36px;display:flex;align-items:center;justify-content:center;padding:6px 10px;border-radius:11px;background:#202634;border:1px solid #ffffff18;color:#e5ebf7;font-weight:900;font-size:12px}.practice-extra-tools>summary::-webkit-details-marker{display:none}.practice-extra-tools[open]>summary{margin-bottom:7px;background:#2b3345}.practice-extra-tools .number-controls.compact{display:grid;margin:0;padding:8px}.practice-extra-tools .transport-row{margin:0}.practice-extra-tools [data-loop-controls]{width:100%}.practice-extra-tools .tempo-console{margin-top:7px}
.number-stage-title{padding:5px 8px 2px}.number-stage-title h1{font-size:20px!important;margin:0!important;color:#fff}.number-stage-title .eyebrow{font-size:11px!important}
.practice-custom-note{display:flex;align-items:center;gap:10px;margin:5px 0 8px;padding:8px 11px;border-radius:12px;background:#fff7cf;color:#493800;border:1px solid #f2d86a}.practice-custom-note b{white-space:nowrap}.practice-custom-note span{font-weight:700}
.number-app.layout-compact .number-topbar{margin-bottom:7px;gap:9px}.number-app.layout-compact .number-topbar button{padding:6px 10px;min-height:34px;font-size:12px}.number-app.layout-compact .number-topbar b{font-size:14px}.number-app.layout-compact .number-topbar small{font-size:11px}.number-app.layout-compact .number-stage{padding:8px;border-radius:18px;margin-bottom:10px}.number-app.layout-compact .number-stage:before{display:none}.number-app.layout-compact .number-mode-switch{margin:0;display:flex;gap:3px;padding:3px}.number-app.layout-compact .number-mode-switch button{min-height:32px;padding:5px 8px;font-size:11px;white-space:nowrap}.number-app.layout-compact .number-song-progress{margin:4px 0;padding:5px 8px;min-height:32px}.number-app.layout-compact .number-song-progress b,.number-app.layout-compact .number-song-progress span{font-size:11px}.number-app.layout-compact .number-now-row{grid-template-columns:105px 1fr;margin:5px 0;gap:6px}.number-app.layout-compact .number-now,.number-app.layout-compact .number-next{padding:5px 8px;border-radius:12px}.number-app.layout-compact .number-now small,.number-app.layout-compact .number-next small{font-size:10px}.number-app.layout-compact .number-now b{font-size:34px;margin:0}.number-app.layout-compact .number-now span{font-size:10px}.number-app.layout-compact .number-next>div{gap:5px;margin-top:3px}.number-app.layout-compact .upcoming-chip{min-width:31px;padding:4px 6px;font-size:14px;border-radius:9px}.number-app.layout-compact .number-sequence{padding:2px 0 5px;max-height:57px}.number-app.layout-compact .number-token{min-width:48px;padding:3px 5px;border-radius:10px}.number-app.layout-compact .number-token b{font-size:20px}.number-app.layout-compact .number-token small{font-size:9px}.number-app.layout-compact .number-piano-focus{padding:4px;border-radius:14px}.number-app.layout-compact .number-piano .piano-case{margin:0}.number-app.layout-compact .number-piano .piano-sound-console{display:block!important;margin:0 0 4px!important;padding:4px 6px!important}.number-app.layout-compact .number-piano .piano-sound-controls{display:grid!important;grid-template-columns:minmax(170px,1fr) minmax(160px,.8fr) auto auto!important;gap:5px!important;align-items:end}.number-app.layout-compact .number-piano .piano-sound-controls label{margin:0;font-size:10px}.number-app.layout-compact .number-piano .piano-sound-controls select{min-height:32px!important;padding:3px 7px!important;font-size:11px}.number-app.layout-compact .number-piano .piano-volume-label{display:grid!important;grid-template-columns:auto 1fr auto;align-items:center;gap:4px}.number-app.layout-compact .number-piano .piano-volume-label input{min-height:18px}.number-app.layout-compact .number-feedback{margin-top:4px;padding:5px 8px;font-size:10px;border-radius:10px}.number-app.layout-compact+.number-phrase-panel,.number-app.layout-compact~.number-map-details,.number-app.layout-compact~details.panel{margin-bottom:10px;padding:13px 16px}.number-app.layout-compact~details.panel summary{font-size:13px}
.number-app.piano-size-small .number-piano .keyboard-scroll{min-height:160px!important}.number-app.piano-size-small .number-piano .keyboard{height:155px!important;min-height:155px!important}.number-app.piano-size-small .number-piano .key.white{height:150px!important;min-height:150px!important}.number-app.piano-size-small .number-piano .key.black{height:92px!important;min-height:92px!important}.number-app.piano-size-small .key.numbered-key .key-number{bottom:38px;width:30px;height:30px;font-size:17px}.number-app.piano-size-small .key.black.numbered-key .key-number{bottom:27px;width:25px;height:25px;font-size:14px}
.number-app.piano-size-medium .number-piano .keyboard-scroll{min-height:205px!important}.number-app.piano-size-medium .number-piano .keyboard{height:200px!important;min-height:200px!important}.number-app.piano-size-medium .number-piano .key.white{height:195px!important;min-height:195px!important}.number-app.piano-size-medium .number-piano .key.black{height:118px!important;min-height:118px!important}
.number-app.piano-size-large .number-piano .keyboard-scroll{min-height:265px!important}.number-app.piano-size-large .number-piano .keyboard{height:260px!important;min-height:260px!important}.number-app.piano-size-large .number-piano .key.white{height:255px!important;min-height:255px!important}.number-app.piano-size-large .number-piano .key.black{height:154px!important;min-height:154px!important}
.practice-admin-banner{margin-bottom:16px}.practice-admin-panel{padding:20px}.practice-layout-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.practice-layout-grid>div{padding:14px;border-radius:16px;border:1px solid var(--line);background:color-mix(in srgb,var(--soft) 42%,#fff)}.practice-layout-grid h3{margin:0 0 8px;color:var(--primary)}.practice-choice{margin:6px 0;background:var(--surface)}.practice-savebar{display:flex!important;align-items:center;justify-content:flex-start;gap:10px;background:color-mix(in srgb,var(--surface) 92%,transparent);backdrop-filter:blur(12px);padding:10px 12px;border:1px solid var(--line);border-radius:16px}.practice-savebar button{min-height:44px}
@media(max-width:1000px){.practice-quickbar{grid-template-columns:1fr 1fr}.practice-extra-tools{grid-column:1/-1}.practice-quick-actions{justify-content:flex-end}.number-app.layout-compact .number-piano .piano-sound-controls{grid-template-columns:1fr 1fr!important}.practice-layout-grid{grid-template-columns:1fr}}
@media(max-width:650px){.practice-quickbar{grid-template-columns:1fr}.practice-phrase-picker,.practice-quick-actions,.number-mode-switch,.practice-extra-tools{width:100%}.practice-quick-actions button,.number-mode-switch button{flex:1}.number-app.layout-compact .number-topbar{grid-template-columns:auto 1fr}.number-app.layout-compact .number-top-actions{grid-column:1/-1;justify-content:flex-start}.number-app.layout-compact .number-now-row{grid-template-columns:95px 1fr}.number-app.layout-compact .number-piano .piano-sound-controls{grid-template-columns:1fr!important}.number-app.layout-compact .number-piano .piano-volume-label{grid-template-columns:auto 1fr auto!important}.practice-custom-note{display:grid;gap:2px}.practice-savebar{position:sticky;bottom:8px;z-index:20;display:grid!important;grid-template-columns:1fr 1fr}.practice-savebar button{width:100%;padding:8px}}


/* =========================================================
   V31 — MADA International Academy full visual system
   ========================================================= */
:root{--mada-navy:#102b55;--mada-navy-2:#071d3c;--mada-blue:#1389db;--mada-cyan:#46c8ee;--mada-pink:#ea178e;--mada-magenta:#c9159f;--mada-orange:#ff8b00;--mada-yellow:#ffd132;--mada-purple:#852a9c;--mada-green:#3ebd75;--mada-soft:#f5f9ff;--primary:#e91e8c;--accent:#ffb000;--bg:#f6faff;--surface:#fff;--ink:#10264a;--muted:#6e7d99;--line:#dfe8f5;--soft:#eef6ff}
html{background:var(--mada-soft)}body{background:radial-gradient(circle at 18% 8%,#e8f7ff 0 9%,transparent 25%),radial-gradient(circle at 78% 18%,#fff1f8 0 8%,transparent 22%),var(--bg);color:var(--ink);font-family:"Segoe UI",Tahoma,Arial,sans-serif}body:before{content:"";position:fixed;inset:auto 0 0 0;height:90px;background:linear-gradient(7deg,#ffd132 0 10%,#ff8b00 10% 20%,#ea178e 20% 31%,#852a9c 31% 43%,#1389db 43% 56%,transparent 56%);opacity:.035;pointer-events:none;z-index:-1}button,.button{border-radius:14px;font-weight:850}.button,.toolbar>button:not(.secondary):not(.danger),form>button:not(.secondary):not(.danger),.admin-savebar button{background:linear-gradient(135deg,var(--mada-pink),var(--mada-orange));box-shadow:0 7px 17px #e91e8c20}.secondary{background:#fff!important;color:var(--mada-navy)!important;border:1px solid #d9e6f5!important;box-shadow:0 4px 11px #16355d0b}.secondary:hover{border-color:#8ecdf2!important;background:#f8fcff!important}.panel,.card,.admin-settings-card{border:1px solid #e2ebf6;border-radius:22px;background:#fff;box-shadow:0 10px 30px #173b6510}input,select,textarea{border:1px solid #d6e3f1;border-radius:13px;background:#fff;color:var(--ink);min-height:44px}input:focus,select:focus,textarea:focus{outline:3px solid #49bdf12b;border-color:#42aee7}.badge{border-radius:999px}.badge.gold{background:#fff4cb;color:#7d5a00;border-color:#ffe080}.eyebrow{color:var(--mada-pink);font-weight:900;letter-spacing:.02em}
.mada-topbar{position:sticky;top:0;z-index:42;min-height:70px;padding:10px 22px;background:#fffffff5;border-bottom:1px solid #e4edf7;box-shadow:0 4px 18px #173b650b;backdrop-filter:blur(12px);display:grid;grid-template-columns:1fr minmax(320px,620px) 1fr;align-items:center;gap:20px}.global-search-wrap{grid-column:2;position:relative;display:flex;align-items:center;gap:9px;background:#f3f7fc;border:1px solid #e2eaf4;border-radius:999px;padding:0 16px;min-height:46px}.global-search-wrap>span{font-size:25px;color:#61799a}.global-search-wrap input{border:0;background:transparent;box-shadow:none;min-height:42px;width:100%;padding:0}.global-search-results{position:absolute;top:54px;right:0;left:0;background:#fff;border:1px solid #dce8f5;border-radius:18px;box-shadow:0 18px 42px #102b5526;padding:8px;z-index:100}.global-search-results button{width:100%;display:flex;align-items:center;gap:10px;text-align:right;background:#fff!important;color:var(--ink)!important;box-shadow:none!important}.global-search-results button:hover{background:#f3f9ff!important}.global-search-results button>span{font-size:22px}.global-search-results small{display:block;color:var(--muted)}.userpill{grid-column:1;display:flex;align-items:center;gap:10px;justify-self:start}.user-meta{display:grid}.user-meta small{color:var(--muted)}.userpill .avatar{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;object-fit:cover;background:linear-gradient(135deg,#53baf1,#7b67e9);color:#fff;font-weight:900}.topbar-mobile-brand{display:none}
.mada-shell{display:grid;grid-template-columns:minmax(0,1fr) 258px;align-items:start;gap:0;max-width:1700px;margin:auto;direction:ltr}.mada-sidebar{grid-column:2;grid-row:1;direction:rtl;position:sticky;top:70px;height:calc(100vh - 70px);background:linear-gradient(180deg,var(--mada-navy),var(--mada-navy-2));padding:16px 14px 22px;overflow:auto;border-radius:0 0 0 28px;box-shadow:-8px 0 28px #102b5514}.mada-sidebar .sidebar-brand{background:#fff;border-radius:20px;padding:11px;margin-bottom:14px;min-height:98px;display:grid;place-items:center}.mada-sidebar .brand{display:grid;place-items:center;text-align:center}.mada-sidebar .brand img{max-height:76px;max-width:195px}.mada-sidebar .brand-copy{display:none}.mada-sidebar nav{display:grid;gap:6px}.mada-sidebar nav button{display:flex;align-items:center;gap:11px;min-height:48px;width:100%;padding:10px 13px;background:transparent!important;color:#f1f6ff!important;border:1px solid transparent;box-shadow:none!important;text-align:right;border-radius:14px}.mada-sidebar nav button:hover{background:#ffffff12!important;border-color:#ffffff12}.mada-sidebar nav button.active,.mada-sidebar nav button[aria-current="page"]{background:linear-gradient(100deg,var(--mada-pink),#ff3b75,var(--mada-orange))!important;color:#fff!important;box-shadow:0 8px 20px #e91e8c33!important}.mada-sidebar nav button span{width:28px;text-align:center;font-size:20px}.mada-sidebar nav button b{font-size:14px}.sidebar-decoration{pointer-events:none;text-align:center;color:#fff;font-size:25px;line-height:2.4;opacity:.7;padding-top:22px}.mada-shell>main{grid-column:1;grid-row:1;direction:rtl;min-width:0;padding:24px 26px 55px;max-width:1420px;width:100%;margin:auto}.site-footer{margin:0 auto;background:linear-gradient(135deg,var(--mada-navy-2),var(--mada-navy));color:#dce9ff;border:0}.site-footer a{color:#fff}
.mada-welcome{display:flex;justify-content:space-between;gap:18px;align-items:center;margin:0 0 16px}.mada-welcome h1{margin:4px 0 0;font-size:clamp(22px,3vw,34px)}.welcome-badges{display:flex;gap:8px;flex-wrap:wrap}.welcome-badges span{padding:8px 13px;border-radius:999px;background:#fff;border:1px solid #e2ebf5;font-weight:800}.mada-home-hero{min-height:300px;border-radius:34px;overflow:hidden;position:relative;display:grid;grid-template-columns:1fr 1.4fr 1fr;align-items:end;padding:20px 22px 0;background:radial-gradient(circle at 50% 47%,#fff 0 15%,#fff8d5 30%,transparent 52%),linear-gradient(135deg,#77cdf8 0%,#d7f4ff 31%,#fff 54%,#ffe5f2 78%,#ffc95b 100%);box-shadow:0 18px 42px #1c6aa120;border:1px solid #fff}.mada-home-hero:after{content:"♪  ★  ♫  ♥  ♬";position:absolute;left:8%;right:8%;top:18px;color:#fff;font-size:32px;word-spacing:65px;text-shadow:0 3px 0 #ffffff66;opacity:.8}.hero-kid{width:100%;max-height:275px;object-fit:contain;position:relative;z-index:2;filter:drop-shadow(0 10px 14px #1b4d7f1f)}.hero-center{align-self:center;text-align:center;z-index:3;padding:15px 8px 32px}.hero-logo{display:block;max-width:230px;max-height:120px;object-fit:contain;margin:0 auto 8px}.hero-center h2{margin:4px auto;color:#0c6fab;font-size:clamp(21px,2.2vw,31px)}.hero-center p{max-width:620px;margin:8px auto 14px;color:#3c5b76}.hero-benefits{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.hero-benefits span{background:#ffffffd9;border-radius:999px;padding:8px 13px;font-weight:900;box-shadow:0 5px 12px #15456c12}.mada-section{margin-top:22px}.section-heading{display:flex;justify-content:space-between;align-items:end;gap:15px;margin-bottom:12px}.section-heading h2{margin:3px 0;font-size:25px}.section-heading p{margin:3px 0;color:var(--muted)}.mada-module-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.mada-module{min-height:165px;padding:19px 14px;border:0!important;color:var(--mada-navy)!important;text-align:center;display:grid;align-content:center;gap:7px;box-shadow:0 10px 24px #16355d12!important;transition:.18s transform,.18s box-shadow}.mada-module:hover{transform:translateY(-5px);box-shadow:0 16px 30px #16355d1c!important}.mada-module>span{font-size:42px}.mada-module b{font-size:17px}.mada-module small{color:#5c708d}.mada-module.rhythm{background:linear-gradient(145deg,#fff6d8,#ffe6a0)!important}.mada-module.notes{background:linear-gradient(145deg,#e8f8ff,#cbefff)!important}.mada-module.ear{background:linear-gradient(145deg,#fff0f8,#ffd8ea)!important}.mada-module.color{background:linear-gradient(145deg,#edfbed,#d5f4dc)!important}.mada-module.competition{background:linear-gradient(145deg,#f0ecff,#ded4ff)!important}.number-preview-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.number-preview-card{background:#fff!important;color:var(--ink)!important;text-align:right;border:1px solid #e2ebf5!important;box-shadow:0 9px 22px #173b6510!important;padding:15px}.number-preview-card:hover{transform:translateY(-3px)}.number-preview-top{display:flex;align-items:center;justify-content:space-between}.number-preview-top>span{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;color:#fff;font-weight:1000;background:linear-gradient(135deg,var(--mada-pink),var(--mada-orange))}.number-preview-card h3{margin:10px 0 5px}.number-preview-card small{color:var(--muted)}.number-dots{display:flex;gap:5px;margin-top:12px;direction:ltr}.number-dots i{font-style:normal;display:grid;place-items:center;width:29px;height:29px;border-radius:50%;color:#fff;font-weight:900;background:hsl(calc(var(--i)*52deg + 10deg) 82% 52%)}.game-category-preview{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.game-category-preview button{min-height:125px;color:var(--ink)!important;box-shadow:0 8px 20px #15345d10!important}.game-category-preview button span{display:block;font-size:34px}.game-category-preview button b,.game-category-preview button small{display:block}.game-category-preview button small{color:#60738f;margin-top:4px}.gc-rhythm{background:#fff5d4!important}.gc-ear{background:#ffe7f1!important}.gc-memory{background:#e9f7ff!important}.gc-piano{background:#eaf7eb!important}.gc-theory{background:#f1edff!important}.home-lessons-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.home-lesson-card{overflow:hidden}.home-lesson-card .cardtop{background:linear-gradient(90deg,#f9fcff,#fff5fa)}.show-more-lessons{text-align:center;margin-top:14px}
.mada-about{display:grid;grid-template-columns:125px minmax(0,1fr) auto;gap:20px;align-items:center;margin-top:24px;padding:20px;background:linear-gradient(135deg,#fff,#f4faff 55%,#fff4fa)}.about-photo{width:112px;height:112px;border-radius:26px;overflow:hidden;display:grid;place-items:center;background:linear-gradient(135deg,#d7f2ff,#ffe1ef);border:4px solid #fff;box-shadow:0 9px 22px #173b6518}.about-photo img{width:100%;height:100%;object-fit:cover}.about-photo span{font-size:48px}.about-copy h2{margin:4px 0}.about-copy>b{color:#2b6d9c}.about-copy p{margin:7px 0 0;color:#5a6c85;line-height:1.8}.about-admin-upload,.logo-admin-row{display:grid;grid-template-columns:140px 1fr;gap:16px;align-items:center;padding:13px;background:#f7fbff;border-radius:18px}.about-admin-upload>div:first-child{height:125px;border-radius:18px;background:#e9f4ff;display:grid;place-items:center;overflow:hidden;font-size:45px}.about-admin-upload img{width:100%;height:100%;object-fit:cover}.admin-logo-preview{max-width:130px;max-height:105px;object-fit:contain}.color-admin-grid{display:grid;grid-template-columns:repeat(5,minmax(100px,1fr));gap:10px}.color-admin-grid label{background:#f7fbff;border:1px solid #e2ebf5;border-radius:14px;padding:10px;display:grid;gap:6px}.color-admin-grid input[type=color]{width:100%;padding:3px}.admin-savebar{position:sticky;bottom:10px;z-index:10;background:#ffffffed;padding:10px;border-radius:17px;border:1px solid #e4edf7;box-shadow:0 8px 22px #173b6520}
.admin-page-title{padding:20px 22px;border-radius:24px;margin-bottom:16px;background:linear-gradient(120deg,#eaf8ff,#fff,#fff0f7);border:1px solid #e3edf7}.admin-page-title h1{margin:4px 0}.admin-control-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.admin-control-grid>section{padding:15px;border:1px solid #e1ebf5;border-radius:18px;background:#fbfdff}.admin-settings-card hr{border:0;border-top:1px solid #e3ecf5;margin:24px 0}
/* Games as categorized colorful learning zones */
.game-category-tabs{display:grid;grid-template-columns:repeat(8,minmax(105px,1fr));gap:8px;margin:14px 0 18px;overflow-x:auto;padding-bottom:3px}.game-category-tab{background:#fff!important;color:var(--mada-navy)!important;border:1px solid #dfeaf5!important;box-shadow:0 6px 15px #15345d0d!important;min-height:72px;display:grid;place-items:center;align-content:center;gap:2px}.game-category-tab span{font-size:25px}.game-category-tab b{font-size:12px}.game-category-tab.selected{background:linear-gradient(135deg,var(--mada-pink),var(--mada-orange))!important;color:#fff!important;border-color:transparent!important}.games-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.game-card{min-height:175px;border:1px solid #e0eaf5!important;color:var(--mada-navy)!important;background:linear-gradient(160deg,#fff,#f6fbff)!important;box-shadow:0 10px 22px #173b6510!important;position:relative;overflow:hidden}.game-card:nth-child(6n+1){background:linear-gradient(145deg,#fff8dd,#ffedb1)!important}.game-card:nth-child(6n+2){background:linear-gradient(145deg,#e9f8ff,#cfedff)!important}.game-card:nth-child(6n+3){background:linear-gradient(145deg,#fff0f7,#ffdce9)!important}.game-card:nth-child(6n+4){background:linear-gradient(145deg,#edf9ed,#d9f0dd)!important}.game-card:nth-child(6n+5){background:linear-gradient(145deg,#f2eeff,#e3dcff)!important}.game-card>span{font-size:42px}.game-card>b{font-size:16px}.game-card small{color:#5e708a!important}.game-card:hover{transform:translateY(-4px)}.game-filter-stack{border-radius:18px;background:#fff;padding:10px 12px;border:1px solid #e2ebf5;margin-bottom:13px}.arcade-zone-banner{background:linear-gradient(135deg,#71cff7,#e8faff 35%,#ffe0f0 70%,#ffd665)!important;color:var(--mada-navy)!important}.arcade-zone-banner p,.arcade-zone-banner h2{color:var(--mada-navy)!important}.atari-zone-banner{background:linear-gradient(135deg,#102b55,#243f75 62%,#852a9c)!important}.game-board{margin-top:15px;scroll-margin-top:90px}.arcade-shell{border:2px solid #d9e8f5!important;box-shadow:0 14px 30px #173b6514;background:#fff}.arcade-title{background:linear-gradient(110deg,#e7f8ff,#fff,#fff1f7)!important}.arcade-stage{background:linear-gradient(180deg,#fbfdff,#f3f9ff)!important}
.melody-train{display:grid;gap:16px;min-height:270px;align-content:center}.train-track{text-align:center;font-size:26px;letter-spacing:8px}.train-wagons{display:flex;direction:ltr;justify-content:center;align-items:center;gap:3px;min-height:62px}.train-engine{font-size:48px}.train-wagons i{width:48px;height:43px;display:grid;place-items:center;border-radius:12px 12px 8px 8px;background:#e8eef6;color:#668;font-style:normal;font-weight:900;border-bottom:5px solid #bcc8d8}.train-wagons i.filled{background:var(--train);color:#fff;border-bottom-color:#243b62}.train-notes{display:flex;justify-content:center;gap:9px;flex-wrap:wrap}.train-notes button{width:75px;min-height:75px;border-radius:20px!important;background:var(--train)!important;color:#fff!important}.train-notes span{font-size:26px}.star-scale-sky{min-height:280px;border-radius:22px;padding:20px;background:linear-gradient(180deg,#173a75,#315ea2 60%,#b4e8ff);color:#fff}.star-path{display:flex;justify-content:center;gap:9px;font-size:30px;margin-bottom:20px}.star-field{display:flex;justify-content:center;gap:13px;flex-wrap:wrap}.star-field button{width:92px;height:92px;border-radius:50%!important;background:var(--star)!important;color:#fff!important;border:4px solid #ffffff99!important}.star-field span{font-size:34px}.star-field button.star-caught{transform:scale(.7);opacity:.45}.candy-beat{display:grid;gap:18px;align-content:center;min-height:270px}.candy-order{display:flex;justify-content:center;gap:7px;direction:ltr}.candy-order i{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#e8edf5;font-style:normal;font-weight:900}.candy-order i.done{background:#fff0b7;transform:scale(1.08)}.candy-pads{display:grid;grid-template-columns:repeat(4,minmax(90px,1fr));gap:11px}.candy-pads button{min-height:110px;background:var(--candy)!important;color:#fff!important}.candy-pads span{display:block;font-size:40px}.candy-pads .candy-demo{transform:scale(1.08);box-shadow:0 0 0 6px #fff,0 0 0 11px var(--candy)!important}.freeze-party{min-height:285px;border-radius:24px;background:linear-gradient(135deg,#34206e,#8f2ea5 45%,#ef287d 75%,#ffad22);display:grid;place-items:center;align-content:center;gap:12px;position:relative;overflow:hidden}.freeze-character{font-size:92px;transition:.12s transform}.freeze-character.dance-beat{transform:rotate(-9deg) scale(1.08)}.freeze-character.freeze-now{filter:grayscale(.3);transform:scale(.9)}.freeze-lights{display:flex;gap:20px}.freeze-lights i{width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 0 22px #fff}.freeze-stop{font-size:22px!important;min-width:190px;min-height:66px;background:#fff!important;color:#e31867!important}.freeze-lights i:nth-child(2){background:#ffd132}.freeze-lights i:nth-child(3){background:#44d3ff}.freeze-lights i:nth-child(4){background:#83ff7a}
/* Number lessons: strong visual lock between current number and current key */
.number-app{background:linear-gradient(180deg,#fafdff,#f4f8ff)!important}.number-stage{border-radius:24px!important;background:linear-gradient(180deg,#10213d,#0b1528)!important}.number-now b{background:linear-gradient(135deg,var(--mada-pink),var(--mada-orange));color:#fff!important;border-radius:18px!important}.number-token.current{background:linear-gradient(135deg,var(--mada-pink),var(--mada-orange))!important;color:#fff!important;transform:translateY(-2px)}.number-piano .target-key{box-shadow:inset 0 -8px 0 #e91e8c,0 0 0 4px #ffca40,0 0 25px #ffca4080!important}.number-map-card:nth-child(7n+1) b{background:#f03b64}.number-map-card:nth-child(7n+2) b{background:#ff8b00}.number-map-card:nth-child(7n+3) b{background:#e3b600}.number-map-card:nth-child(7n+4) b{background:#3dbd75}.number-map-card:nth-child(7n+5) b{background:#1689d7}.number-map-card:nth-child(7n+6) b{background:#5967dc}.number-map-card:nth-child(7n+7) b{background:#b72bb2}.number-map-card b{color:#fff;border-radius:50%;width:42px;height:42px;display:grid;place-items:center;margin:auto}.number-library .card{border-radius:20px}.number-hero{background:linear-gradient(120deg,#e6f7ff,#fff,#fff0f7,#fff3cb)!important;color:var(--mada-navy)!important}
/* Authentication and general pages inherit MADA identity */
.authwrap{background:radial-gradient(circle at 20% 20%,#8cdbff 0 8%,transparent 26%),radial-gradient(circle at 82% 18%,#ffd2e5 0 10%,transparent 28%),linear-gradient(135deg,#effaff,#fff8fc,#fff8e5)!important}.authcard{border-radius:28px!important;border:1px solid #e2ebf5!important;box-shadow:0 20px 55px #173b6520!important}.authcard .brand img{max-width:230px;max-height:125px}.band-banner,.kid-hero{border-radius:25px!important;box-shadow:0 10px 25px #173b6510}.toolbar{gap:8px}
@media(max-width:1180px){.mada-module-grid{grid-template-columns:repeat(3,1fr)}.number-preview-grid{grid-template-columns:repeat(2,1fr)}.game-category-tabs{grid-template-columns:repeat(4,1fr)}.games-grid{grid-template-columns:repeat(3,1fr)}.color-admin-grid{grid-template-columns:repeat(3,1fr)}.home-lessons-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.mada-topbar{grid-template-columns:1fr auto;padding:8px 12px}.global-search-wrap{grid-column:1;grid-row:2;grid-column:1/-1;order:3}.userpill{grid-column:1;grid-row:1}.topbar-mobile-brand{display:block;grid-column:2;grid-row:1}.topbar-mobile-brand .brand-copy{display:none}.topbar-mobile-brand img{height:48px;max-width:110px;object-fit:contain}.mada-shell{display:block}.mada-sidebar{position:static;height:auto;border-radius:0;padding:7px 8px;background:var(--mada-navy)}.mada-sidebar .sidebar-brand,.sidebar-decoration{display:none}.mada-sidebar nav{display:flex;overflow-x:auto;gap:5px}.mada-sidebar nav button{min-width:112px;justify-content:center}.mada-shell>main{padding:16px 12px 45px}.mada-home-hero{grid-template-columns:.8fr 1.6fr .8fr;min-height:260px}.hero-kid{max-height:220px}.hero-center p{display:none}.mada-module-grid{grid-template-columns:repeat(2,1fr)}.game-category-preview{grid-template-columns:repeat(3,1fr)}.games-grid{grid-template-columns:repeat(2,1fr)}.mada-about{grid-template-columns:100px 1fr}.mada-about>button{grid-column:1/-1}.admin-control-grid{grid-template-columns:1fr}.user-meta{display:none}}
@media(max-width:620px){.mada-topbar .userpill .secondary.small{font-size:0;width:42px;padding:0}.mada-topbar .userpill #texteditquick:before{content:'✏️';font-size:18px}.mada-topbar .userpill #logout:before{content:'↪';font-size:18px}.mada-home-hero{display:block;min-height:245px;padding:13px}.hero-kid{display:none}.hero-center{padding:5px 8px 20px}.hero-logo{max-width:190px}.hero-benefits span{font-size:12px}.mada-module-grid,.number-preview-grid,.game-category-preview,.home-lessons-grid,.games-grid{grid-template-columns:1fr 1fr}.mada-module{min-height:130px}.mada-module>span{font-size:34px}.game-category-tabs{grid-template-columns:repeat(4,110px)}.section-heading{align-items:start;flex-direction:column}.mada-about{grid-template-columns:1fr;text-align:center}.about-photo{margin:auto}.about-admin-upload,.logo-admin-row{grid-template-columns:1fr}.color-admin-grid{grid-template-columns:1fr 1fr}.candy-pads{grid-template-columns:1fr 1fr}.train-notes button{width:62px;min-height:62px}.star-field button{width:75px;height:75px}.number-now-row{grid-template-columns:1fr!important}.mada-welcome{align-items:start;flex-direction:column}.welcome-badges{width:100%}}
@media(max-width:420px){.mada-module-grid,.number-preview-grid,.game-category-preview,.home-lessons-grid,.games-grid{grid-template-columns:1fr}.game-category-tabs{grid-template-columns:repeat(4,100px)}.mada-sidebar nav button{min-width:95px}.mada-sidebar nav button b{font-size:12px}.color-admin-grid{grid-template-columns:1fr}.global-search-wrap{min-width:0}.freeze-character{font-size:70px}}

/* V32 — stable compact dashboard matching Mada visual identity */
html{scroll-behavior:smooth}body{overflow-x:hidden}.mada-topbar{height:78px;min-height:78px;position:sticky;top:0;z-index:50;background:#ffffffee;backdrop-filter:blur(10px)}.mada-shell{min-height:calc(100vh - 78px)}.mada-sidebar{top:78px;height:calc(100vh - 78px)}.mada-shell>main{padding-top:16px}.v32-hero{height:315px;min-height:315px;max-height:315px;grid-template-columns:1fr 1.35fr 1fr;align-items:center;padding:10px 18px 0;margin:0;border-radius:30px;background:radial-gradient(circle at 50% 40%,#fff 0 17%,#fff9d9 29%,transparent 50%),linear-gradient(135deg,#69c8fa 0%,#dff6ff 30%,#fff 52%,#ffe5f0 75%,#ffcb58 100%)}.v32-hero:before{content:'♪  ★  ♫  ♥  ♬  ★';position:absolute;inset:20px 4% auto;color:#fff;font-size:27px;letter-spacing:25px;opacity:.82;text-align:center;pointer-events:none}.v32-hero:after{content:'';position:absolute;left:-6%;right:-6%;bottom:-55px;height:120px;border-radius:50%;background:#ffffff88;filter:blur(2px);pointer-events:none}.v32-hero .hero-side{height:295px;display:flex;align-items:flex-end;justify-content:center;position:relative;z-index:2}.v32-hero .hero-side img{display:block;width:100%;height:275px;max-width:330px;object-fit:contain}.v32-hero .hero-center{align-self:center;padding:5px 4px 18px;position:relative;z-index:4}.v32-hero .hero-logo{width:auto;height:auto;max-width:245px;max-height:105px}.v32-hero .hero-greeting{display:inline-block;padding:5px 11px;border-radius:999px;background:#ffffffd9;color:#173b67;font-weight:800;font-size:13px;margin-bottom:3px}.v32-hero h1{font-size:clamp(22px,2.25vw,32px);line-height:1.35;color:#0f6fab;margin:4px 0 7px}.v32-hero p{font-size:15px;line-height:1.65;max-width:620px;margin:0 auto 11px;color:#3d5773}.v32-hero .hero-benefits{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;max-width:520px;margin:auto}.v32-hero .hero-benefits button{background:#ffffffdf!important;color:#173b67!important;padding:8px 8px;border:1px solid #fff;box-shadow:0 6px 14px #173b6714}.quick-section{margin-top:16px}.mada-section{content-visibility:auto;contain-intrinsic-size:400px}.mada-home-hero{content-visibility:visible}.mada-module,.game-category-preview button,.number-preview-card{will-change:transform}.mada-sidebar nav button{cursor:pointer}.mada-sidebar nav button b{white-space:normal}.userpill button{white-space:nowrap}.global-search-wrap{max-width:670px}.home-lesson-card .lesson-cover{display:none}
@media(max-width:1100px){.v32-hero{height:285px;min-height:285px;max-height:285px}.v32-hero .hero-side{height:260px}.v32-hero .hero-side img{height:245px}.v32-hero .hero-center p{font-size:14px}}
@media(max-width:900px){.mada-topbar{height:auto;min-height:76px}.v32-hero{height:270px;min-height:270px;max-height:270px;grid-template-columns:.75fr 1.5fr .75fr}.v32-hero .hero-side{height:245px}.v32-hero .hero-side img{height:225px}.v32-hero .hero-logo{max-height:82px}.v32-hero .hero-benefits{grid-template-columns:repeat(2,1fr)}.mada-sidebar{height:auto}}
@media(max-width:620px){.v32-hero{height:auto;min-height:250px;max-height:none;display:block;padding:14px 12px}.v32-hero .hero-side{display:none}.v32-hero .hero-center{padding:3px 3px 12px}.v32-hero .hero-logo{max-height:90px}.v32-hero h1{font-size:23px}.v32-hero p{display:block;font-size:13px}.v32-hero .hero-benefits{grid-template-columns:1fr 1fr}.mada-shell>main{padding-top:10px}}


/* V36 — mobile/tablet: one unobtrusive back arrow only. No bottom toolbar, no home/menu overlay. */
.mobile-simple-back{display:none!important}
.mada-phone-tablet .mobile-simple-back{
  display:grid!important;position:fixed;left:max(10px,env(safe-area-inset-left));
  bottom:max(12px,env(safe-area-inset-bottom));z-index:78;width:40px;height:40px;
  padding:0;border-radius:50%;place-items:center;background:#ffffffee!important;color:#17365d!important;
  border:1px solid #dbe6f2!important;box-shadow:0 5px 16px #102b5524!important;
  font-size:22px;line-height:1;font-weight:900;opacity:.94;backdrop-filter:blur(8px);
}
.mada-phone-tablet .mobile-simple-back:active{transform:scale(.94)}
.mada-phone-tablet .mobile-simple-back[hidden]{display:none!important}


/* V36 + Hum-to-Track studio: intentionally only the recording feature, no mobile-navigation redesign. */
.hum-track-card{margin:0 0 20px;padding:22px;border-radius:28px;border:1px solid #dfe9f5;background:linear-gradient(145deg,#fff 0%,#fff8df 35%,#fff0f8 68%,#edf7ff 100%);box-shadow:0 14px 36px #163b6414;overflow:hidden}.hum-head{display:flex;justify-content:space-between;gap:20px;align-items:center}.hum-head h2{margin:7px 0 5px;font-size:clamp(22px,2.6vw,32px);color:#102d54}.hum-head p{max-width:820px;margin:0;color:#526b86}.hum-logo{display:flex;gap:10px;align-items:center;font-size:44px;white-space:nowrap}.hum-logo span{font-size:26px;color:#e91e8c}.hum-style-row{display:grid;grid-template-columns:minmax(220px,.7fr) minmax(260px,1fr);gap:14px;align-items:end;margin:18px 0 12px}.hum-style-row label{margin:0}.hum-voice-choice{min-height:48px;align-items:center;background:#ffffffa8}.hum-wave{position:relative;min-height:170px;border-radius:24px;overflow:hidden;background:linear-gradient(180deg,#0c1730,#101d3d);border:1px solid #203358;display:grid;place-items:center}.hum-wave canvas{position:absolute;inset:0;width:100%;height:100%}.hum-wave-message{position:relative;z-index:2;padding:8px 14px;border-radius:999px;background:#07122ab8;color:#fff;font-weight:1000;backdrop-filter:blur(6px)}.hum-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:14px 0}.hum-record{min-width:190px;background:linear-gradient(135deg,#ff386a,#e91e8c);box-shadow:0 9px 20px #e91e8c30}.hum-record.recording{animation:vocalPulse .85s infinite}.hum-file{position:relative;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.hum-file input{position:absolute;inset:0;opacity:0;cursor:pointer}.hum-status{text-align:center;padding:10px 13px;border-radius:14px;background:#ffffffa8;border:1px solid #e4edf7;font-weight:800;color:#35506d}.hum-analysis{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:10px}.hum-analysis span{padding:7px 11px;border-radius:999px;background:#fff;border:1px solid #dce7f3;font-weight:900;color:#153966}.hum-result{margin-top:13px;padding:14px;border-radius:18px;background:#edfff4;border:1px solid #bfe9ce;display:grid;grid-template-columns:minmax(150px,.65fr) minmax(260px,1.4fr) auto;gap:12px;align-items:center}.hum-result[hidden]{display:none}.hum-result b,.hum-result small{display:block}.hum-result small{color:#4d6e5a}.hum-result audio{width:100%}
@media(max-width:760px){.hum-track-card{padding:15px;border-radius:22px}.hum-head{display:block}.hum-logo{justify-content:center;margin-top:8px;font-size:34px}.hum-style-row{grid-template-columns:1fr}.hum-wave{min-height:145px}.hum-result{grid-template-columns:1fr}.hum-result audio{width:100%}.hum-actions>*{flex:1 1 150px;min-width:0}}

/* V37 standalone activity surfaces: native scrolling, no forced CSS rotation */
body.mada-focused{overflow:hidden!important}
.mada-immersive{position:fixed!important;inset:0!important;z-index:1200!important;width:100%!important;max-width:none!important;height:100dvh!important;margin:0!important;padding:12px!important;overflow:auto!important;overscroll-behavior:contain;background:#f6faff;box-sizing:border-box;touch-action:pan-y}
.mada-activity-bar{position:sticky;top:-12px;z-index:30;display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px;background:#fff;border-bottom:2px solid #e3d9f7}
.mada-activity-bar button{min-height:44px}.mada-immersive canvas{max-width:100%}.mada-immersive .game-choices{flex-wrap:wrap}
@media(max-height:500px){.mada-immersive .game-head h2{font-size:20px}.mada-immersive .game-try-piano{margin:6px 0}.mada-activity-bar{padding:5px}}

/* V40 — artist page, standalone wheel games, no-ad layout */
.artist-profile-hero{display:grid;grid-template-columns:minmax(260px,390px) minmax(0,1fr);gap:30px;align-items:center;padding:28px;background:linear-gradient(145deg,#fff7dc 0%,#fff 40%,#fff0f7 72%,#e9f7ff 100%);overflow:hidden}.artist-profile-photo{min-height:430px;border-radius:30px;overflow:hidden;background:linear-gradient(145deg,#102e5c,#6a3b91);box-shadow:0 18px 34px #14345c20}.artist-profile-photo img{display:block;width:100%;height:100%;min-height:430px;max-height:560px;object-fit:cover;object-position:center top}.artist-photo-placeholder{min-height:430px;display:grid;place-items:center;font-size:110px;color:#fff}.artist-profile-copy h1{font-size:clamp(31px,4vw,52px);line-height:1.25;margin:5px 0 8px;color:#102d54}.artist-profile-copy h3{color:#6d3e79;font-size:19px}.artist-profile-copy p{max-width:820px;font-size:17px;line-height:2;color:#405a75}.artist-tracks-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.artist-track-card{display:grid;grid-template-columns:74px minmax(0,1fr);gap:14px;padding:17px;border:1px solid #e1eaf4;border-radius:22px;background:#fff;box-shadow:0 10px 24px #14345c0d}.artist-track-icon{width:66px;height:66px;border-radius:22px;display:grid;place-items:center;font-size:31px;background:linear-gradient(145deg,#fff2c8,#ffe2f1)}.artist-track-card h3{margin:2px 0 4px}.artist-track-card p{margin:0 0 7px;color:var(--muted)}.artist-track-card audio{max-width:none;width:100%}.artist-video-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.artist-video-card{padding:12px;border-radius:22px;background:#fff;border:1px solid #e1eaf4;box-shadow:0 10px 24px #14345c0d}.artist-video-card iframe{width:100%;border-radius:16px}.artist-video-card h3{margin:10px 5px 4px}.artist-admin-actions{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}.artist-admin-panel{border:2px solid #e9d9f5}.artist-admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.artist-admin-grid form{padding:18px;border-radius:18px;background:#f8fbff;border:1px solid #e3ebf5}.artist-track-card.is-hidden,.artist-video-card.is-hidden{opacity:.55;filter:grayscale(.25)}
.game-focus-page{max-width:1120px;margin:0 auto}.game-focus-top{position:sticky;top:0;z-index:22;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-4px 0 12px;padding:9px 10px;border-radius:16px;background:#ffffffeb;border:1px solid #e1eaf4;backdrop-filter:blur(10px)}.game-focus-top h1{font-size:clamp(20px,3vw,31px);margin:0}.standalone-game-board{min-height:480px;padding:18px;border-radius:26px;border:1px solid #e0e9f5;background:linear-gradient(145deg,#fff,#f7fbff);box-shadow:0 16px 36px #17365d12}.standalone-game-board .game-board{min-height:420px}
.percussion-showcase{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.percussion-instrument{display:grid;grid-template-columns:minmax(160px,230px) minmax(0,1fr);gap:16px;align-items:center;padding:18px;border:1px solid #e0e9f4;border-radius:24px;background:linear-gradient(145deg,#fffaf0,#fff)}.percussion-instrument img{width:100%;max-height:220px;object-fit:contain;filter:drop-shadow(0 13px 18px #27364e22)}.percussion-instrument h3{margin:0 0 5px}.percussion-instrument .toolbar{margin:10px 0 0}.percussion-instrument button{min-width:95px}.drum-pro-note{padding:10px 13px;border-radius:13px;background:#ecf9f0;color:#245e3a;margin:10px 0;font-weight:700}
@media(max-width:820px){.artist-profile-hero{grid-template-columns:1fr}.artist-profile-photo{min-height:340px;max-width:440px;width:100%;margin:auto}.artist-profile-photo img,.artist-photo-placeholder{min-height:340px}.artist-tracks-grid,.artist-video-grid,.artist-admin-grid{grid-template-columns:1fr}.percussion-showcase{grid-template-columns:1fr}.percussion-instrument{grid-template-columns:150px 1fr}}
@media(max-width:520px){.artist-profile-hero{padding:15px;gap:16px}.artist-profile-photo{min-height:300px}.artist-profile-photo img,.artist-photo-placeholder{min-height:300px}.artist-track-card{grid-template-columns:52px minmax(0,1fr);padding:12px}.artist-track-icon{width:48px;height:48px;border-radius:15px;font-size:24px}.percussion-instrument{grid-template-columns:1fr;text-align:center}.percussion-instrument img{max-height:180px;margin:auto}.percussion-instrument .toolbar{justify-content:center}.standalone-game-board{padding:10px;min-height:420px}}

/* V41 — Home + navigation layout manager */
.mada-sidebar nav a.custom-nav-link{display:flex;align-items:center;gap:11px;min-height:48px;width:100%;padding:10px 13px;background:transparent;color:#f1f6ff;text-decoration:none;border:1px solid transparent;border-radius:14px;font-weight:800}.mada-sidebar nav a.custom-nav-link:hover{background:#ffffff12;border-color:#ffffff12}.mada-sidebar nav a.custom-nav-link span{width:28px;text-align:center;font-size:20px}.mada-sidebar nav a.custom-nav-link b{font-size:14px}
.layout-admin-banner{background:linear-gradient(135deg,#172f5d,#273d80 58%,#7d3ad7);color:#fff}.layout-admin-banner p{color:#e6edff}.layout-list{display:grid;gap:9px;margin:14px 0 24px}.layout-row{display:grid;grid-template-columns:34px 92px minmax(180px,1fr) auto;gap:10px;align-items:center;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}.layout-row:hover{border-color:color-mix(in srgb,var(--primary) 40%,var(--line))}.layout-grip{font-size:20px;color:var(--muted);text-align:center;cursor:ns-resize}.layout-visible{display:flex!important;align-items:center;gap:7px;margin:0!important;font-weight:800;font-size:13px}.layout-visible input{width:18px!important;min-height:18px!important}.layout-move{display:flex;gap:5px}.layout-move button{min-width:36px;padding:5px 9px}.nav-layout-row{grid-template-columns:34px 92px 58px minmax(150px,1fr) minmax(180px,1.2fr) auto auto}.nav-layout-row:not([data-custom="1"]){grid-template-columns:34px 92px 58px minmax(180px,1fr) 0 auto}.nav-layout-row:not([data-custom="1"]) [data-nav-url]{display:none}.nav-icon-input{text-align:center;font-size:20px;padding:5px!important;min-height:40px!important}.nav-layout-row input{margin:0;min-height:40px}.custom-nav-add{border:1px dashed var(--line);border-radius:15px;padding:14px 16px}.custom-nav-add summary{cursor:pointer;font-weight:900;color:var(--primary)}.layout-savebar{position:sticky;bottom:10px;z-index:15;display:flex;gap:10px;justify-content:center;background:color-mix(in srgb,var(--surface) 90%,transparent);backdrop-filter:blur(10px);border:1px solid var(--line);border-radius:18px;padding:12px;margin:20px 0;box-shadow:0 10px 28px #102b5520}
#main.home-width-1100{max-width:1100px}#main.home-width-1300{max-width:1300px}#main.home-width-1500{max-width:1500px}#main.home-width-full{max-width:none}.home-density-compact .mada-section{margin-top:14px}.home-density-compact .mada-home-hero{min-height:245px}.home-density-compact .mada-module{min-height:130px;padding:14px 10px}.home-density-compact .panel{padding:18px}.home-density-comfortable .mada-section{margin-top:24px}#main .quick-section .mada-module-grid{grid-template-columns:repeat(var(--home-quick-cols,5),minmax(0,1fr))}
@media(max-width:1100px){#main .quick-section .mada-module-grid{grid-template-columns:repeat(min(var(--home-quick-cols,3),3),minmax(0,1fr))}.nav-layout-row,.nav-layout-row:not([data-custom="1"]){grid-template-columns:30px 82px 52px 1fr auto}.nav-layout-row [data-nav-url]{grid-column:3/5}.nav-layout-row [data-delete-custom]{grid-column:5}.layout-move{grid-column:auto}}
@media(max-width:760px){.layout-row,.nav-layout-row,.nav-layout-row:not([data-custom="1"]){grid-template-columns:28px 78px 1fr auto}.layout-row>b{grid-column:3}.nav-layout-row .nav-icon-input{grid-column:3}.nav-layout-row [data-nav-label]{grid-column:1/-1}.nav-layout-row [data-nav-url]{grid-column:1/-1}.nav-layout-row [data-delete-custom]{grid-column:3}.layout-move{grid-column:4;grid-row:1}.layout-savebar{bottom:6px;flex-wrap:wrap}.layout-savebar button{flex:1;min-width:180px}#main .quick-section .mada-module-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:430px){#main .quick-section .mada-module-grid{grid-template-columns:1fr}.layout-row,.nav-layout-row,.nav-layout-row:not([data-custom="1"]){grid-template-columns:28px 1fr auto}.layout-visible{grid-column:2}.layout-row>b,.nav-layout-row .nav-icon-input{grid-column:2}.layout-move{grid-column:3;grid-row:1/3}.nav-layout-row [data-nav-label],.nav-layout-row [data-nav-url]{grid-column:1/-1}}

/* ===== V42: MADA MUSIC ARCADE PRO ===== */
.pro-arcade{--pro1:#6d5dfc;--pro2:#23b5d3;--pro3:#ffb703;overflow:hidden}.pro-arcade-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:14px;align-items:center;margin-bottom:12px}.pro-hero-icon{width:78px;height:78px;border-radius:26px;display:grid;place-items:center;font-size:42px;background:linear-gradient(145deg,#fff,#f0edff);border:1px solid #e3defb;box-shadow:inset 0 -8px 18px #6d5dfc12}.pro-head-copy h2{margin:5px 0 3px}.pro-head-copy p{margin:0;color:var(--muted)}.pro-best{padding:9px 12px;border-radius:16px;background:#fff7d9;border:1px solid #f4d878;font-size:12px;white-space:nowrap}.pro-best b{display:block;font-size:20px;color:#7b5b00}.pro-hud{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:12px 0}.pro-hud>span{min-height:44px;display:flex;align-items:center;justify-content:center;gap:5px;padding:8px;border-radius:14px;background:#f7f7fc;border:1px solid var(--line);font-size:13px;font-weight:900}.pro-stage{position:relative;min-height:320px;padding:16px;border:1px solid var(--line);border-radius:26px;background:linear-gradient(180deg,#fff,#f8f7ff);overflow:hidden}.pro-actions{justify-content:center;margin-top:12px}.pro-result{text-align:center;min-height:42px;font-size:15px;font-weight:800}.pro-finish{min-height:285px;display:grid;place-items:center;align-content:center;text-align:center;gap:7px}.pro-finish>span{font-size:80px;animation:proTrophy 1.1s ease-in-out infinite alternate}.pro-finish h3{font-size:28px;margin:0}.pro-finish p{margin:0;color:var(--muted)}
.pro-theme-field .pro-stage{background:linear-gradient(#dff5ff 0 37%,#8ed66b 37% 100%)}.pro-theme-treasure .pro-stage{background:linear-gradient(180deg,#fff8db,#ffe7a7)}.pro-theme-rainbow .pro-stage{background:linear-gradient(180deg,#eefaff,#fff8f0)}.pro-theme-castle .pro-stage{background:linear-gradient(180deg,#e7efff,#f5ecff)}.pro-theme-gold .pro-stage{background:radial-gradient(circle at 50% 20%,#fffbe8,#fff2be)}.pro-theme-farm .pro-stage{background:linear-gradient(#dff5ff 0 45%,#c9ed9a 45% 100%)}.pro-theme-train .pro-stage{background:linear-gradient(#e7f7ff,#f7f3ee)}.pro-theme-neon .pro-stage,.pro-theme-grid .pro-stage{background:linear-gradient(155deg,#171a31,#25284e);color:#fff}.pro-theme-boss .pro-stage{background:radial-gradient(circle at 50% 25%,#35345e,#131525 70%);color:#fff}
.penalty-scoreboard{display:flex;justify-content:space-between;gap:10px;font-weight:1000;margin-bottom:10px}.music-goal{position:relative;max-width:680px;height:240px;margin:auto;border:8px solid #fff;border-bottom-width:12px;border-radius:16px 16px 2px 2px;background:linear-gradient(#ffffff2b,#ffffff0a);box-shadow:0 12px 28px #32552d33}.goal-net{position:absolute;inset:0;background-image:linear-gradient(#ffffff66 1px,transparent 1px),linear-gradient(90deg,#ffffff66 1px,transparent 1px);background-size:28px 28px;pointer-events:none}.goal-zone{position:relative;width:29%;height:82px;margin:12px 1.5%;border:2px solid #ffffffc7;border-radius:18px;background:#ffffffd9;color:#26334a;font-weight:1000;z-index:2}.goal-zone span{display:block;font-size:24px}.goal-correct{background:#d8ffe3!important;transform:scale(1.05)}.goal-wrong{background:#ffe0e5!important;animation:proShake .25s linear 2}.football{position:absolute;bottom:-5px;left:50%;font-size:38px;z-index:5;transition:.55s ease}.football.ball-score{transform:translate(-80px,-160px) rotate(380deg) scale(.85)}
.treasure-map{max-width:760px;margin:auto}.treasure-path{display:flex;align-items:center;justify-content:center;gap:12px;margin:4px 0 18px}.treasure-path span{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:#fff2bc;border:2px dashed #d09f21;font-size:22px}.treasure-path span.found{background:#fff;border-style:solid;transform:translateY(-3px)}.treasure-path b{font-size:38px}.treasure-question{text-align:center;font-weight:1000;font-size:21px;margin:16px}.treasure-chests{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.treasure-chest{min-height:126px;border-radius:24px;background:linear-gradient(145deg,#9b5b27,#d08b3b);border:4px solid #f6c25f;color:#fff}.treasure-chest span{display:block;font-size:45px}.treasure-chest b{display:block;margin-top:4px}.treasure-open{background:linear-gradient(145deg,#2db56d,#7ee2a8)!important;transform:translateY(-5px)}.treasure-trap{background:linear-gradient(145deg,#812b35,#d45b6a)!important;animation:proShake .25s linear 2}
.scale-ladder{display:grid;grid-template-columns:minmax(260px,1fr) minmax(220px,.8fr);gap:22px;align-items:center;max-width:800px;margin:auto}.ladder-visual{position:relative;height:255px;display:flex;flex-direction:column-reverse;justify-content:space-between;padding:7px 45px}.ladder-visual:before,.ladder-visual:after{content:'';position:absolute;top:0;bottom:0;width:9px;border-radius:9px;background:#9a6236}.ladder-visual:before{left:37px}.ladder-visual:after{right:37px}.ladder-step{height:8px;border-radius:8px;background:#c4874e;display:flex;align-items:center;justify-content:center;z-index:1}.ladder-step span{font-size:18px;transform:translateY(-12px);opacity:.5}.ladder-step.done{background:#ffd166}.ladder-step.done span{opacity:1}.ladder-kid{position:absolute;left:6px;bottom:calc(var(--step)*28px + 4px);font-size:34px;transition:bottom .4s ease}.ladder-task{text-align:center}.ladder-options{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin-top:18px}.ladder-options button{min-height:64px;border-radius:18px;font-size:18px}
.orchestra-defense{max-width:720px;margin:auto;text-align:center}.castle-top{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 16px;border-radius:18px;background:#ffffffbf}.castle-top span{font-size:36px}.castle-top em{font-style:normal;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#6d5dfc;color:#fff;font-weight:1000}.incoming-instrument{min-height:130px;display:grid;place-items:center;align-content:center;animation:instrumentFloat 1.5s ease-in-out infinite alternate}.incoming-instrument span{font-size:64px}.incoming-instrument b{font-size:18px}.family-gates{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.family-gates button{min-height:68px;border-radius:18px}
.golden-ear{text-align:center}.ear-orbit{position:relative;width:170px;height:170px;margin:6px auto 12px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle,#fff,#ffeaa0);border:3px solid #f3c653}.ear-orbit>span{font-size:80px}.ear-orbit i{position:absolute;font-style:normal;font-size:28px;color:#c39200;animation:noteOrbit 3s linear infinite}.ear-orbit i:nth-of-type(2){animation-delay:-1.5s}.ear-round{font-weight:900;margin-bottom:12px}.ear-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;max-width:560px;margin:auto}.ear-choices button{min-height:70px;border-radius:20px;font-size:17px}
.sound-farm{text-align:center;max-width:790px;margin:auto}.farm-sky{font-size:30px;letter-spacing:12px}.farm-sign{display:inline-block;padding:8px 16px;border-radius:14px;background:#fff8;margin:9px;font-weight:1000}.farm-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.farm-cards button{min-height:112px;border-radius:24px;background:#fff;border:2px solid #e4d8a8;color:#3c4560}.farm-cards span{display:block;font-size:40px}.farm-cards b{font-size:13px}.farm-ground{font-size:28px;letter-spacing:15px;margin-top:10px}
.rhythm-train{max-width:820px;margin:auto}.station-sign{text-align:center;padding:10px;border-radius:16px;background:#fff;border:1px solid #ded8cd;font-size:17px}.train-track{display:flex;align-items:flex-end;min-height:120px;gap:4px;border-bottom:8px double #665f59;margin:12px 0;padding:8px}.engine{font-size:58px}.train-car{width:62px;height:62px;border-radius:12px 12px 8px 8px;background:#ffcf70;border:3px solid #b57818;display:grid;place-items:center;position:relative;font-size:28px}.train-car small{position:absolute;bottom:2px;right:4px;font-size:10px}.train-total{margin-inline-start:auto;align-self:center;padding:9px 12px;border-radius:13px;background:#fff;font-weight:1000}.train-total.ready{background:#d9ffe4}.train-pieces{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.train-pieces button{min-height:80px;border-radius:20px}.train-pieces span{display:block;font-size:26px}.train-clear{display:block;margin:10px auto 0}
.metro-mania{text-align:center;max-width:650px;margin:auto}.metro-display{width:170px;height:120px;margin:5px auto 14px;border-radius:24px;display:grid;grid-template-columns:auto auto;place-content:center;gap:0 8px;background:#080b16;border:3px solid #46e6b2;color:#7df7d0;box-shadow:0 0 25px #46e6b233}.metro-display span{font-size:38px;grid-row:1/3}.metro-display b{font:1000 40px/1 monospace}.metro-display small{font-size:11px;letter-spacing:.15em}.metro-dots{display:flex;justify-content:center;gap:8px;margin:10px}.metro-dots i{width:18px;height:18px;border-radius:50%;background:#484c70}.metro-dots i.on{background:#ffcf57;box-shadow:0 0 14px #ffcf57}.metro-tap{width:min(360px,100%);min-height:95px;border-radius:28px;font-size:28px;background:linear-gradient(145deg,#6d5dfc,#25b7d3)}.metro-accuracy{margin-top:12px;color:#d8dbff}
.rhythm-grid-game{max-width:780px;margin:auto;text-align:center}.grid-counter{font-weight:1000;margin-bottom:16px;color:#e9ebff}.rhythm-step-grid{display:grid;grid-template-columns:repeat(var(--steps),minmax(42px,1fr));gap:7px;overflow-x:auto;padding:7px}.rhythm-step-grid button{aspect-ratio:1;min-height:52px;border-radius:14px;background:#2e345f;border:2px solid #525a94;color:#abb1dc}.rhythm-step-grid button[aria-pressed=true]{background:#ffca58;color:#2b2745;border-color:#ffe2a4}.rhythm-step-grid button.demo{transform:translateY(-8px);box-shadow:0 0 20px #72f0c2;border-color:#72f0c2}.rhythm-step-grid button.reveal{outline:4px solid #ff6f8d}.grid-check{margin-top:16px;min-width:220px;background:linear-gradient(135deg,#34b98a,#5d72df)}
.boss-arena{text-align:center;max-width:720px;margin:auto}.boss-health{display:grid;grid-template-columns:auto minmax(100px,1fr) auto;gap:10px;align-items:center}.boss-health>div{height:16px;border-radius:999px;background:#5b2442;overflow:hidden}.boss-health i{display:block;height:100%;background:linear-gradient(90deg,#ff5d7a,#ffb05a);transition:width .35s ease}.music-boss{font-size:92px;margin:14px;filter:drop-shadow(0 10px 0 #0005);animation:bossBob .75s ease-in-out infinite alternate}.boss-question{font-size:20px;font-weight:1000;margin:10px}.boss-options{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;max-width:560px;margin:auto}.boss-options button{min-height:66px;border-radius:18px;background:#303760;border:2px solid #5a6293;color:#fff}.boss-options button:hover{background:#3a4478}
@keyframes proTrophy{to{transform:translateY(-7px) rotate(4deg)}}@keyframes proShake{25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}@keyframes instrumentFloat{to{transform:translateY(10px)}}@keyframes noteOrbit{from{transform:rotate(0deg) translateX(72px) rotate(0deg)}to{transform:rotate(360deg) translateX(72px) rotate(-360deg)}}@keyframes bossBob{to{transform:translateY(8px) scale(1.04)}}
@media(max-width:700px){.pro-arcade-head{grid-template-columns:auto minmax(0,1fr)}.pro-best{grid-column:1/-1;display:flex;justify-content:space-between;align-items:center}.pro-best b{display:inline}.pro-hud{grid-template-columns:1fr 1fr}.scale-ladder{grid-template-columns:1fr}.ladder-visual{height:215px}.family-gates{grid-template-columns:1fr 1fr}.farm-cards{grid-template-columns:repeat(3,1fr)}.rhythm-step-grid{grid-template-columns:repeat(var(--steps),52px);justify-content:start}.treasure-chests{grid-template-columns:1fr}.treasure-chest{min-height:90px}.goal-zone{width:45%;margin:8px 2%}.music-goal{height:270px}.ear-choices{grid-template-columns:1fr}.boss-options{grid-template-columns:1fr 1fr}}
@media(max-width:430px){.pro-stage{padding:11px;min-height:300px}.pro-hero-icon{width:58px;height:58px;border-radius:18px;font-size:32px}.pro-head-copy h2{font-size:20px}.pro-hud>span{font-size:11px}.farm-cards{grid-template-columns:1fr 1fr}.train-track{overflow-x:auto}.train-car{flex:0 0 54px}.family-gates{grid-template-columns:1fr 1fr}.ladder-options{grid-template-columns:repeat(3,1fr)}.boss-health{grid-template-columns:1fr}.boss-health>div{order:3}.boss-options{grid-template-columns:1fr}.music-boss{font-size:74px}}
@media(prefers-reduced-motion:reduce){.pro-arcade *{animation:none!important;transition:none!important}}

/* V43 TOUCH ARCADE — mobile/iPad first */
.touch-arcade-shell{--touch-bg:#f7fbff;--touch-line:#dce8f4;overflow:hidden}.touch-arcade-head{display:grid;grid-template-columns:auto minmax(0,1fr);gap:14px;align-items:center}.touch-arcade-icon{width:72px;height:72px;border-radius:24px;display:grid;place-items:center;font-size:40px;background:linear-gradient(145deg,#fff7c8,#e4f7ff);border:1px solid #dce8f4}.touch-arcade-head h2{margin:5px 0}.touch-arcade-head p{margin:0;color:var(--muted)}.touch-hud{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}.touch-hud span{display:flex;justify-content:center;align-items:center;min-height:44px;border-radius:14px;background:#fff;border:1px solid var(--touch-line);font-weight:900}.touch-stage{position:relative;min-height:360px;border-radius:24px;overflow:hidden;border:1px solid var(--touch-line);background:linear-gradient(180deg,#fdfefe,#f1f8ff);user-select:none;-webkit-user-select:none}.touch-stage *{-webkit-tap-highlight-color:transparent}.touch-toolbar{justify-content:center;margin-top:12px}.touch-result{text-align:center;min-height:42px;font-weight:900}.touch-game-card{background:linear-gradient(145deg,#eafaff,#fff2ce)!important;border-color:#cae7f3!important}.touch-pill{background:#0d7ca6!important;color:#fff!important;border:0!important}

.touch-football-field{position:relative;min-height:360px;height:100%;background:repeating-linear-gradient(90deg,#43a84e 0 12.5%,#48b253 12.5% 25%);overflow:hidden;touch-action:none}.touch-football-field:after{content:"";position:absolute;left:50%;bottom:-80px;width:270px;height:160px;border:3px solid #ffffff8c;border-radius:50%;transform:translateX(-50%)}.touch-goal{position:absolute;left:7%;right:7%;top:18px;height:160px;border:7px solid #fff;border-bottom-width:10px;display:grid;grid-template-columns:repeat(3,1fr);background-image:linear-gradient(#ffffff45 1px,transparent 1px),linear-gradient(90deg,#ffffff45 1px,transparent 1px);background-size:24px 24px;box-shadow:0 10px 25px #183d1f33}.touch-goal-zone{display:grid;place-items:start center;padding-top:13px;border-inline-end:2px dashed #ffffff73;z-index:2}.touch-goal-zone:last-of-type{border-inline-end:0}.touch-goal-zone span{background:#ffffffe6;color:#17324d;border-radius:999px;padding:6px 12px;font-weight:1000;min-width:48px;text-align:center}.touch-goal-zone.chosen{background:#ffffff20}.touch-goal-zone.correct{background:#70ff8a5c}.touch-goal-zone.wrong{background:#ff6f8057}.touch-keeper{position:absolute;bottom:5px;left:46%;font-size:44px;animation:touchKeeper 1.4s ease-in-out infinite alternate;z-index:3}.touch-kick-line{position:absolute;left:18%;right:18%;bottom:95px;border-top:3px dashed #ffffff8a}.touch-ball{position:absolute;left:50%;bottom:35px;transform:translate(-50%,0);width:68px;height:68px;border:0;background:#fff;border-radius:50%;font-size:43px;display:grid;place-items:center;padding:0;z-index:8;box-shadow:0 8px 15px #0003;touch-action:none}.touch-ball.dragging{box-shadow:0 0 0 8px #ffffff4d,0 8px 15px #0003}.touch-ball.shoot{animation:touchBallShot .52s cubic-bezier(.18,.78,.28,1) forwards;pointer-events:none}.touch-swipe-hint{position:absolute;left:12px;bottom:15px;color:#fff;background:#183d1fb8;padding:7px 10px;border-radius:999px;font-size:12px;font-weight:900}

.touch-runner-road{position:relative;min-height:360px;display:grid;grid-template-columns:repeat(3,1fr);overflow:hidden;background:linear-gradient(#87d8ff 0 22%,#666 22% 100%);touch-action:none}.touch-runner-road:after{content:"";position:absolute;left:0;right:0;bottom:38px;height:7px;background:#fff;box-shadow:0 -82px #ffffff55,0 -164px #ffffff55}.touch-runner-lane{border-inline-end:3px dashed #ffffff9c;display:flex;justify-content:center;padding-top:90px}.touch-runner-lane:last-of-type{border:0}.touch-runner-lane b{height:max-content;background:#fff;color:#253753;padding:7px 12px;border-radius:999px;z-index:2}.touch-runner-kid{position:absolute;bottom:50px;left:calc((var(--lane) * 33.333%) + 16.666%);font-size:48px;transform:translateX(-50%);transition:left .18s ease;z-index:5}.touch-runner-gate{position:absolute;top:78px;left:calc((var(--gate-lane) * 33.333%) + 16.666%);font-size:38px;transform:translateX(-50%);animation:runnerGate var(--gate-time) linear forwards;z-index:4}.touch-runner-controls{position:absolute;left:50%;bottom:6px;transform:translateX(-50%);display:flex;gap:70px;z-index:8}.touch-runner-controls button{width:56px;height:44px;border-radius:14px;background:#ffffffdc;color:#17324d;border:0}.touch-runner-swipe{position:absolute;top:12px;left:50%;transform:translateX(-50%);background:#17324dc7;color:#fff;padding:5px 10px;border-radius:999px;font-size:11px;font-weight:900;z-index:6}

.touch-catcher-world{position:relative;min-height:360px;background:linear-gradient(#a8e4ff,#f5fdff 70%,#d9f5c2 70%);overflow:hidden;touch-action:none}.touch-target-note{position:absolute;z-index:8;top:10px;left:50%;transform:translateX(-50%);background:#fff;border-radius:999px;padding:7px 14px;font-weight:1000;white-space:nowrap}.touch-fall-layer{position:absolute;inset:0}.touch-falling-note{position:absolute;transform:translate(-50%,-50%);width:58px;height:58px;border-radius:50%;display:grid;place-items:center;align-content:center;background:linear-gradient(145deg,#fff,#ffe78f);border:2px solid #fff;box-shadow:0 5px 12px #0002}.touch-falling-note span{font-size:20px;line-height:16px}.touch-falling-note b{font-size:12px}.touch-basket{position:absolute;left:50%;bottom:28px;transform:translateX(-50%);font-size:62px;transition:left .08s linear;z-index:5}.touch-catcher-buttons{position:absolute;left:10px;right:10px;bottom:7px;display:flex;justify-content:space-between;z-index:8}.touch-catcher-buttons button{width:54px;height:42px;background:#ffffffcc;color:#17324d;border:0;border-radius:13px}

.touch-jump-world{position:relative;min-height:360px;background:linear-gradient(#8cdcff,#e8fbff 66%,#78c95f 66%);overflow:hidden;touch-action:none}.touch-ground{position:absolute;left:0;right:0;bottom:65px;height:8px;background:#4a7f37}.touch-jumper{position:absolute;left:20%;bottom:70px;font-size:52px;z-index:5}.touch-jumper.jump{animation:touchJump .52s ease-out}.touch-obstacle{position:absolute;left:100%;bottom:72px;font-size:44px}.touch-beat-lamp{position:absolute;top:12px;left:12px;background:#fff;padding:7px 12px;border-radius:999px;font-weight:1000;z-index:6}.touch-tap-hint{position:absolute;right:12px;top:12px;background:#17324dbd;color:#fff;padding:7px 12px;border-radius:999px;font-weight:900}

.touch-bubble-world{position:relative;min-height:360px;background:radial-gradient(circle at 20% 20%,#fff 0 4px,transparent 5px),linear-gradient(#c7f4ff,#f8fdff);overflow:hidden;touch-action:manipulation}.touch-bubble-target{position:absolute;z-index:10;left:50%;top:10px;transform:translateX(-50%);background:#fff;padding:7px 13px;border-radius:999px;font-weight:900;white-space:nowrap}.touch-moving-bubble{position:absolute;transform:translate(-50%,-50%);width:72px;height:72px;border-radius:50%;border:2px solid #ffffffdd;background:radial-gradient(circle at 30% 25%,#fff 0 8%,#bcefff80 12%,#91dfff80 55%,#d29bff6b);color:#17324d;display:grid;place-items:center;align-content:center;box-shadow:inset -8px -10px 18px #738dd12e,0 8px 15px #466b8933}.touch-moving-bubble span{font-size:24px;line-height:20px}.touch-moving-bubble b{font-size:12px}.touch-moving-bubble.bubble-wrong{animation:proShake .22s linear 2;background:#ff9ca7b5}

.touch-space-world{position:relative;min-height:360px;overflow:hidden;background:radial-gradient(circle at 10% 15%,#fff 0 1px,transparent 2px),radial-gradient(circle at 75% 25%,#fff 0 1px,transparent 2px),linear-gradient(#07152f,#14264d);background-size:38px 38px,51px 51px,auto;touch-action:none}.touch-space-target{position:absolute;top:10px;left:50%;transform:translateX(-50%);background:#ffffffeb;color:#17324d;padding:7px 13px;border-radius:999px;font-weight:1000;z-index:9}.touch-space-layer{position:absolute;inset:0}.touch-note-planet{position:absolute;transform:translate(-50%,-50%);display:grid;place-items:center;z-index:3}.touch-note-planet span{font-size:45px}.touch-note-planet b{background:#fff;color:#17324d;border-radius:999px;padding:2px 7px;font-size:11px}.touch-ship{position:absolute;left:50%;bottom:42px;transform:translateX(-50%) rotate(-45deg);font-size:54px;z-index:6;transition:left .06s linear}.touch-fire{position:absolute;right:12px;bottom:10px;min-width:98px;min-height:48px;border-radius:18px;background:#ffbe2e;color:#3b2a00;border:0;font-weight:1000;z-index:10}.touch-laser{position:absolute;transform:translate(-50%,-50%);font-size:35px;color:#6dffb0;text-shadow:0 0 9px #37ff96;z-index:5}

@keyframes touchKeeper{from{left:18%}to{left:72%}}@keyframes touchBallShot{to{transform:translate(calc(-50% + var(--shot-x)), -225px) rotate(700deg) scale(.7)}}@keyframes runnerGate{from{top:76px;transform:translateX(-50%) scale(.65)}to{top:285px;transform:translateX(-50%) scale(1.25)}}@keyframes touchJump{0%{bottom:70px}48%{bottom:175px}100%{bottom:70px}}
@media(max-width:700px){.touch-stage,.touch-football-field,.touch-runner-road,.touch-catcher-world,.touch-jump-world,.touch-bubble-world,.touch-space-world{min-height:330px}.touch-goal{left:3%;right:3%;height:145px}.touch-ball{width:64px;height:64px}.touch-runner-controls{gap:86px}.touch-moving-bubble{width:64px;height:64px}.touch-note-planet span{font-size:40px}}
@media(max-width:430px){.touch-arcade-head{grid-template-columns:58px 1fr}.touch-arcade-icon{width:56px;height:56px;border-radius:18px;font-size:31px}.touch-hud{gap:5px}.touch-hud span{font-size:12px}.touch-stage,.touch-football-field,.touch-runner-road,.touch-catcher-world,.touch-jump-world,.touch-bubble-world,.touch-space-world{min-height:300px}.touch-goal{height:126px;border-width:5px}.touch-goal-zone span{padding:4px 8px;font-size:11px}.touch-keeper{font-size:35px}.touch-ball{bottom:28px;width:58px;height:58px;font-size:36px}.touch-runner-kid{font-size:42px}.touch-runner-lane b{font-size:11px;padding:5px 8px}.touch-basket{font-size:55px}.touch-moving-bubble{width:58px;height:58px}.touch-fire{min-width:84px;font-size:12px}}
@media(prefers-reduced-motion:reduce){.touch-keeper{animation:none}.touch-ball.shoot,.touch-runner-gate,.touch-jumper.jump{animation-duration:.01ms!important}}

/* V44 — Touch Arcade Plus + Melody Pack editor */
.touch-plus-shell .touch-stage{min-height:390px}.plus-tiles-world,.plus-race-world,.plus-drum-world,.plus-hockey-world,.plus-maze-world,.plus-gesture-world{position:relative;min-height:390px;height:100%;overflow:hidden;touch-action:none}.plus-tiles-world{background:linear-gradient(#203057,#111a31)}.plus-lane-labels{position:absolute;inset:0 0 auto;display:grid;grid-template-columns:repeat(4,1fr);z-index:4}.plus-lane-labels span{padding:9px;text-align:center;color:#fff;font-weight:900;border-inline-end:1px solid #ffffff42}.plus-tiles-layer{position:absolute;inset:0 0 78px;display:grid;grid-template-columns:repeat(4,1fr);background:repeating-linear-gradient(90deg,transparent 0 calc(25% - 1px),#ffffff28 calc(25% - 1px) 25%)}.plus-falling-tile{position:absolute;top:-16%;width:21%;height:78px;margin-left:2%;border:0;border-radius:14px;background:#fff;color:#17264a;font-size:20px;font-weight:1000;box-shadow:0 8px 16px #0004;transform:translateX(calc(var(--lane,0)*100%));touch-action:none}.plus-falling-tile[data-lane="0"]{left:0}.plus-falling-tile[data-lane="1"]{left:25%}.plus-falling-tile[data-lane="2"]{left:50%}.plus-falling-tile[data-lane="3"]{left:75%}.plus-falling-tile.hit{transform:scale(.86);opacity:.25}.plus-hitline{position:absolute;left:0;right:0;bottom:82px;border-top:5px solid #ffd84d;color:#fff;text-align:center;font-weight:900;padding-top:5px}.plus-tile-pads{position:absolute;left:0;right:0;bottom:0;height:74px;display:grid;grid-template-columns:repeat(4,1fr);gap:3px;padding:5px}.plus-tile-pads button{min-width:0;border-radius:12px;background:#fff;color:#17264a;border:0;font-weight:1000}
.plus-race-world{background:linear-gradient(#8bdcff 0 25%,#67ba69 25%)}.plus-race-sky{height:64px;display:grid;place-items:center;font-weight:900;color:#17324d}.plus-race-road{position:absolute;top:64px;bottom:0;left:10%;right:10%;overflow:hidden;background:#50545a;clip-path:polygon(30% 0,70% 0,100% 100%,0 100%);touch-action:none}.plus-race-road:after{content:"";position:absolute;inset:0;background:repeating-linear-gradient(180deg,transparent 0 55px,#fff8 56px 75px,transparent 76px 130px);width:3px;left:50%;z-index:0}.plus-race-layer{position:absolute;inset:0;z-index:2}.plus-road-note{position:absolute;top:-12%;transform:translateX(-50%);display:grid;place-items:center;color:#fff;font-weight:1000;z-index:3}.plus-road-note span{font-size:34px}.plus-road-note b{background:#fff;color:#17324d;border-radius:999px;padding:2px 7px;font-size:11px}.plus-race-car{position:absolute;left:calc((var(--lane)*33.333%) + 16.666%);bottom:28px;transform:translateX(-50%);font-size:50px;transition:left .16s ease;z-index:5}.plus-race-controls{position:absolute;left:50%;bottom:7px;transform:translateX(-50%);display:flex;gap:90px;z-index:8}.plus-race-controls button{width:55px;height:44px;background:#ffffffe6;color:#17324d;border:0;border-radius:14px}
.plus-drum-world{background:linear-gradient(#492765,#19142b)}.plus-drum-layer{position:absolute;inset:0 0 84px;background:repeating-linear-gradient(90deg,transparent 0 calc(33.333% - 1px),#ffffff32 calc(33.333% - 1px) 33.333%)}.plus-drum-note{position:absolute;top:-12%;transform:translateX(-50%);width:54px;height:54px;border-radius:50%;display:grid;place-items:center;background:#fff;font-size:30px;box-shadow:0 4px 13px #0005}.plus-drum-note.hit{opacity:.2;transform:translateX(-50%) scale(1.25)}.plus-drum-hitline{position:absolute;left:0;right:0;bottom:90px;border-top:6px solid #ffd64d;box-shadow:0 0 18px #ffd64d}.plus-drum-pads{position:absolute;left:0;right:0;bottom:0;height:84px;display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:6px}.plus-drum-pads button{border:0;border-radius:16px;background:#fff;color:#25163c;display:flex;align-items:center;justify-content:center;gap:5px}.plus-drum-pads button span{font-size:25px}.plus-drum-pads button b{font-weight:1000}
.plus-hockey-world{background:radial-gradient(circle at 50% 50%,#e9fbff,#a8e4ef);border:4px solid #fff}.plus-hockey-world:after{content:"";position:absolute;left:50%;top:18%;bottom:4%;border-left:2px dashed #3b8ba280}.plus-hockey-target{position:absolute;top:8px;left:50%;transform:translateX(-50%);z-index:5;background:#fff;padding:7px 15px;border-radius:999px;font-weight:900}.plus-hockey-layer{position:absolute;inset:0;z-index:2}.plus-hockey-puck{position:absolute;width:62px;height:62px;border-radius:50%;transform:translate(-50%,-50%);display:grid;place-items:center;background:#fff;border:5px solid #3a7384;box-shadow:0 5px 12px #0003;font-size:12px;font-weight:1000}.plus-mallet{position:absolute;left:50%;top:78%;transform:translate(-50%,-50%);font-size:48px;z-index:4;pointer-events:none}
.plus-maze-world{background:#fff5d8}.plus-maze-goal{height:45px;display:grid;place-items:center;font-weight:1000}.plus-maze-grid{position:absolute;left:50%;top:52px;transform:translateX(-50%);width:min(310px,88%);aspect-ratio:1;display:grid;grid-template-columns:repeat(5,1fr);grid-template-rows:repeat(5,1fr);border:3px solid #324760;border-radius:14px;overflow:hidden}.plus-maze-cell{border:1px solid #ffffff80}.plus-maze-cell.wall{background:#324760}.plus-maze-cell.open{background:#d9f1bb}.plus-maze-notes{position:absolute;inset:0;pointer-events:none}.plus-maze-note,.plus-maze-kid{position:absolute;transform:translate(-50%,-50%);z-index:3}.plus-maze-note{background:#fff;border:2px solid #d69b00;border-radius:50%;width:38px;height:38px;display:grid;place-items:center;font-weight:1000}.plus-maze-note.collected{opacity:.2;transform:translate(-50%,-50%) scale(.6)}.plus-maze-kid{font-size:34px;transition:left .14s,top .14s;pointer-events:none}.plus-maze-arrows{position:absolute;bottom:5px;left:50%;transform:translateX(-50%);display:grid;grid-template-columns:repeat(4,48px);gap:4px}.plus-maze-arrows button{height:44px;padding:0;border-radius:12px;background:#fff;color:#17324d;border:1px solid #cbd9e6}
.plus-gesture-world{background:linear-gradient(145deg,#e9f8ff,#fff2cf);display:grid;align-content:center;gap:22px;padding:18px}.plus-gesture-notes{display:flex;align-items:center;justify-content:center;gap:16px}.plus-gesture-notes span{width:76px;height:76px;border-radius:24px;background:#fff;display:grid;place-items:center;font-size:26px;font-weight:1000;border:2px solid #cfe0ee}.plus-gesture-notes i{font-size:28px}.plus-gesture-pad{min-height:150px;border:3px dashed #7ca6be;border-radius:28px;background:#ffffff9e;display:grid;place-items:center;text-align:center;padding:20px}.plus-gesture-pad strong{font-size:28px}.plus-gesture-pad small{display:block;color:#49657a}.plus-gesture-buttons{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.plus-gesture-buttons button{min-height:50px;border-radius:15px}
.melody-import-panel{display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(135deg,#f1fbff,#fff7dd)}.melody-import-panel h2{margin:4px 0}.melody-import-panel p{margin:0;color:var(--muted);max-width:720px}.number-editor-intro{display:grid;gap:4px;padding:12px 14px;border-radius:14px;background:#eefaff;border:1px solid #cae7f3;margin-bottom:12px}.number-editor-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.number-editor-form textarea{font-family:inherit;line-height:1.65}.number-editor-grid textarea{direction:ltr;text-align:left;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}.number-editor-grid small{display:block;color:var(--muted);margin-top:4px}.custom-number-card{border-style:dashed}.number-lyrics-panel{margin:10px 0 12px;border:1px solid #dce8f4;border-radius:16px;background:#fff}.number-lyrics-panel summary{padding:10px 14px;font-weight:900;cursor:pointer}.number-lyrics-panel div{white-space:pre-wrap;line-height:1.9;padding:0 14px 14px;color:#233a54}
@media(max-width:700px){.touch-plus-shell .touch-stage,.plus-tiles-world,.plus-race-world,.plus-drum-world,.plus-hockey-world,.plus-maze-world,.plus-gesture-world{min-height:350px}.melody-import-panel{align-items:stretch;flex-direction:column}.number-editor-grid{grid-template-columns:1fr}.plus-maze-grid{width:min(275px,88%)}.plus-hockey-puck{width:54px;height:54px}.plus-gesture-pad{min-height:125px}}
@media(max-width:430px){.touch-plus-shell .touch-stage,.plus-tiles-world,.plus-race-world,.plus-drum-world,.plus-hockey-world,.plus-maze-world,.plus-gesture-world{min-height:320px}.plus-race-road{left:4%;right:4%}.plus-race-car{font-size:44px}.plus-race-controls{gap:105px}.plus-drum-note{width:47px;height:47px;font-size:26px}.plus-hockey-puck{width:48px;height:48px;border-width:4px}.plus-maze-arrows{grid-template-columns:repeat(4,44px)}.plus-gesture-notes span{width:62px;height:62px;border-radius:18px;font-size:22px}}

/* V45 — Song Lab: direct audio upload, transcription and melody segment analysis */
.song-lab-form{max-width:980px}
.song-lab-upload,.song-lab-analysis{display:grid;gap:14px;padding:18px;border:1px solid var(--border,#dce5ef);border-radius:22px;background:linear-gradient(145deg,var(--surface,#fff),rgba(255,255,255,.78));margin-bottom:16px}
.song-lab-upload audio,.number-reference-audio audio{width:100%;min-height:46px}
.song-file-pick{display:grid;gap:8px;font-weight:700}
.song-file-pick input{min-height:48px;padding:8px;border:1px dashed var(--primary,#e91e8c);border-radius:14px;background:#fff}
.song-segment-grid{display:grid;grid-template-columns:minmax(150px,1.3fr) minmax(110px,.7fr) auto minmax(110px,.7fr) auto;gap:10px;align-items:end}
.song-segment-grid label{display:grid;gap:6px}
.song-segment-grid button{min-height:46px}
.melody-pack-details{border:1px solid var(--border,#dce5ef);border-radius:16px;padding:12px 14px;margin-bottom:16px}
.melody-pack-details summary{cursor:pointer;font-weight:800}
.number-reference-audio{display:grid;gap:8px;padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.84);border:1px solid var(--border,#dce5ef);margin:10px 0 14px}
.ai-song-settings input[type=password]{width:100%;min-height:48px;font-size:16px}
@media(max-width:780px){.song-segment-grid{grid-template-columns:1fr 1fr}.song-segment-grid label:first-child{grid-column:1/-1}.song-segment-grid button{width:100%}.song-lab-upload,.song-lab-analysis{padding:14px;border-radius:18px}.song-lab-form .toolbar{display:flex;flex-wrap:wrap}.song-lab-form .toolbar button{flex:1 1 180px;min-height:48px}}
@media(max-width:440px){.song-segment-grid{grid-template-columns:1fr}.song-segment-grid label:first-child{grid-column:auto}.song-lab-form .toolbar button{flex-basis:100%}}

/* V46 — Simple Song Analyzer + Academy Feedback */
.song-lab-v46{max-width:980px;margin:auto}.song-easy-step{position:relative;display:grid;grid-template-columns:58px minmax(0,1fr);gap:16px;padding:20px;border:1px solid var(--border,#dbe5f1);border-radius:22px;background:var(--surface,#fff);margin-bottom:16px}.song-step-number{width:52px;height:52px;border-radius:18px;display:grid;place-items:center;font-size:24px;font-weight:900;background:var(--accent,#ffb000);color:#10264a}.song-step-copy{min-width:0}.song-step-copy h3{margin:.15rem 0 .35rem}.song-step-copy p{margin:0;color:var(--muted,#61708a)}.song-file-pick-v46{grid-column:1/-1;min-height:88px;border:2px dashed color-mix(in srgb,var(--primary,#e91e8c) 40%,#cbd5e1);border-radius:18px;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:1.05rem;background:color-mix(in srgb,var(--primary,#e91e8c) 6%,#fff);cursor:pointer}.song-file-pick-v46 input{position:absolute;opacity:0;pointer-events:none}.song-lab-v46 audio{grid-column:1/-1;width:100%}.song-auto-analyze,.song-save-button{grid-column:1/-1;min-height:58px;border-radius:18px;font-size:1.05rem;font-weight:900}.song-auto-progress{grid-column:1/-1;height:12px;border-radius:99px;overflow:hidden;background:#e7edf5}.song-auto-progress span{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--primary,#e91e8c),var(--accent,#ffb000));transition:width .25s ease}.song-analysis-stages{grid-column:1/-1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.song-analysis-stages span{padding:9px 8px;border-radius:12px;background:#f2f5f9;text-align:center;font-size:.86rem;font-weight:700;color:#65758b}.song-analysis-stages span.working{background:#fff4cc;color:#725400}.song-analysis-stages span.done{background:#def8e9;color:#146c3a}.song-analysis-stages span.warn{background:#fff0e5;color:#9a4b12}.song-auto-status{grid-column:1/-1;margin:0;padding:12px 14px;border-radius:14px;background:#f6f8fb;color:#42526a}.song-result-stats{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:4px 0 8px}.song-result-stats>div{padding:14px;border-radius:16px;background:#f7f8fc;text-align:center}.song-result-stats b{display:block;font-size:1.25rem}.song-result-stats span{font-size:.8rem;color:#69778d}.song-result-step>.fieldrow,.song-result-step>label,.song-result-step>.song-publish-options,.song-result-step>.song-save-button{grid-column:1/-1}.song-publish-options{display:flex;gap:18px;flex-wrap:wrap}.song-advanced{margin-top:12px;padding:14px 16px;border:1px solid var(--border,#dbe5f1);border-radius:18px;background:#fafbfd}.song-advanced>summary{cursor:pointer;font-weight:800}.feedback-send-hero{display:flex;align-items:center;gap:18px}.feedback-icon{width:72px;height:72px;border-radius:24px;display:grid;place-items:center;font-size:32px;background:color-mix(in srgb,var(--primary,#e91e8c) 11%,#fff)}.feedback-compose{max-width:720px;margin-inline:auto}.feedback-compose form{display:grid;gap:16px}.feedback-send-note{display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:14px;background:#f5f8fc}.feedback-send-note p{margin:0;color:#56657b}.feedback-send-button{min-height:54px;font-size:1rem;font-weight:900}.feedback-list{display:grid;gap:12px}.feedback-card{padding:16px;border:1px solid var(--border,#dbe5f1);border-radius:18px;background:var(--surface,#fff)}.feedback-card.unread{border-inline-start:5px solid var(--primary,#e91e8c)}.feedback-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.feedback-head small{display:block;color:#6c7b90;margin-top:3px}.feedback-card p{white-space:pre-wrap;line-height:1.8;margin:12px 0}.feedback-card .toolbar{margin-top:8px}
@media(max-width:680px){.song-easy-step{grid-template-columns:44px minmax(0,1fr);padding:14px;gap:10px}.song-step-number{width:42px;height:42px;border-radius:14px;font-size:20px}.song-analysis-stages{grid-template-columns:repeat(2,minmax(0,1fr))}.song-result-stats{grid-template-columns:1fr 1fr 1fr;gap:6px}.song-result-stats>div{padding:10px 6px}.song-result-stats b{font-size:1rem}.feedback-send-hero{align-items:flex-start}.feedback-icon{width:54px;height:54px;border-radius:18px}.feedback-head{flex-direction:column}.song-file-pick-v46{min-height:72px}}
/* V47 — teacher voice-to-melody recorder */
.song-source-grid{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:14px;min-width:0}.song-source-grid .song-file-pick-v46{grid-column:auto;min-height:150px;flex-direction:column;gap:6px}.song-source-grid .song-file-pick-v46 small{font-weight:600;color:var(--muted,#61708a)}.song-record-card{min-width:0;display:grid;gap:12px;padding:16px;border:2px solid color-mix(in srgb,var(--primary,#e91e8c) 28%,#dbe5f1);border-radius:18px;background:color-mix(in srgb,var(--primary,#e91e8c) 4%,#fff)}.song-record-head{display:flex;align-items:center;gap:12px}.song-record-head>div{min-width:0;display:grid;gap:3px}.song-record-head b{font-size:1.02rem}.song-record-head small{color:var(--muted,#61708a);line-height:1.5}.song-record-icon{width:46px;height:46px;border-radius:15px;display:grid;place-items:center;font-size:23px;background:color-mix(in srgb,var(--primary,#e91e8c) 10%,#fff);flex:0 0 auto}.song-record-actions{display:flex;gap:8px;flex-wrap:wrap}.song-record-actions button{min-height:46px;flex:1 1 130px}.song-record-meter{height:9px;background:#e8edf4;border-radius:99px;overflow:hidden}.song-record-meter span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--primary,#e91e8c),var(--accent,#ffb000));transition:width .08s linear}.song-record-status{margin:0;min-height:24px;color:#526279;font-weight:650}.song-source-step audio{margin-top:2px}
@media(max-width:720px){.song-source-grid{grid-template-columns:1fr}.song-source-grid .song-file-pick-v46{min-height:96px}.song-record-card{padding:14px}.song-record-actions button{flex-basis:110px}}

/* V48 — mobile navigation drawer + admin recording management */
.mobile-menu-toggle,.mobile-menu-backdrop,.mobile-drawer-head{display:none}
.admin-recording-filters{display:grid;grid-template-columns:minmax(220px,1fr) 190px 190px;gap:10px;margin:14px 0 18px}
.admin-recordings-list{display:grid;gap:12px}
.admin-recording-card{display:grid;grid-template-columns:minmax(220px,1.25fr) minmax(220px,1fr) auto auto;align-items:center;gap:14px;padding:14px;border:1px solid var(--border,#dce8f5);border-radius:20px;background:var(--surface,#fff)}
.admin-recording-meta{display:flex;align-items:center;gap:12px;min-width:0}.admin-recording-avatar{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:#f1f6ff;font-size:25px;flex:0 0 auto}.admin-recording-meta>div{display:grid;min-width:0}.admin-recording-meta b,.admin-recording-meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.admin-recording-meta small{color:var(--muted)}.admin-recording-card audio{width:100%;min-width:0}.admin-recording-status{display:flex;gap:6px;flex-wrap:wrap}.song-source-delete{margin-top:8px}
@media(max-width:1100px){.admin-recording-card{grid-template-columns:minmax(210px,1fr) minmax(190px,1fr) auto}.admin-recording-status{grid-column:1/3}.admin-recording-filters{grid-template-columns:1fr 1fr}.admin-recording-filters input{grid-column:1/-1}}
@media(max-width:900px){
 .mada-topbar{grid-template-columns:auto minmax(0,1fr) auto!important;gap:8px!important;padding:8px 10px!important}
 .mobile-menu-toggle{display:inline-flex!important;grid-column:3;grid-row:1;align-items:center;justify-content:center;gap:6px;min-width:88px;min-height:48px;padding:8px 12px;border-radius:15px;font-weight:900;box-shadow:none!important}
 .mobile-menu-toggle span{font-size:22px}.mobile-menu-toggle b{font-size:13px}
 .topbar-mobile-brand{grid-column:2!important;grid-row:1!important;justify-self:center}.userpill{grid-column:1!important;grid-row:1!important;justify-self:start}.global-search-wrap{grid-column:1/-1!important;grid-row:2!important;width:100%;max-width:none!important}
 .mada-shell{display:block!important}
 .mada-sidebar{display:block!important;position:fixed!important;z-index:120!important;top:0!important;right:0!important;bottom:0!important;left:auto!important;width:min(88vw,350px)!important;height:auto!important;padding:12px 12px 24px!important;border-radius:24px 0 0 24px!important;overflow-y:auto!important;overflow-x:hidden!important;transform:translateX(110%);transition:transform .22s ease;background:linear-gradient(180deg,var(--mada-navy),var(--mada-navy-2))!important;box-shadow:-18px 0 45px #102b5545!important}
 body.mobile-nav-open .mada-sidebar{transform:translateX(0)}
 .mobile-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:10px;color:#fff;padding:4px 2px 10px}.mobile-drawer-head>b{font-size:18px}.mobile-drawer-head button{min-width:46px;min-height:42px}
 .mada-sidebar .sidebar-brand{display:grid!important;min-height:82px!important;margin-bottom:10px!important}.mada-sidebar .sidebar-brand img{max-height:62px!important}
 .mada-sidebar nav{display:grid!important;overflow:visible!important;gap:6px!important}.mada-sidebar nav button,.mada-sidebar nav a.custom-nav-link{min-width:0!important;width:100%!important;justify-content:flex-start!important;min-height:50px!important;padding:10px 13px!important}.mada-sidebar nav button b,.mada-sidebar nav a.custom-nav-link b{font-size:14px!important}
 .sidebar-decoration{display:none!important}
 .mobile-menu-backdrop{display:block;position:fixed;z-index:115;inset:0;border:0!important;border-radius:0!important;background:#071a3388!important;box-shadow:none!important;padding:0!important}
 .mobile-menu-backdrop[hidden]{display:none!important}
 body.mobile-nav-open{overflow:hidden}
 .mada-shell>main{padding:14px 10px 48px!important}
}
@media(max-width:650px){.admin-recording-filters{grid-template-columns:1fr}.admin-recording-filters input{grid-column:auto}.admin-recording-card{grid-template-columns:1fr;padding:12px}.admin-recording-status{grid-column:auto}.admin-recording-card .danger{width:100%}.admin-recording-card audio{width:100%}}
@media(max-width:430px){.mobile-menu-toggle{min-width:54px;padding:7px}.mobile-menu-toggle b{display:none}.topbar-mobile-brand img{max-width:90px!important}.userpill>button{padding:8px!important;font-size:11px!important}}
@media(max-width:650px){.userpill{gap:5px}.userpill #texteditquick{display:none}.userpill .avatar{width:36px;height:36px}.userpill #logout{min-width:52px;min-height:42px;padding:7px 9px!important}}

/* ===== V49 PRO CONTROL / THEMES / CHAT / GAME ADMIN ===== */
body[data-theme=royal]{--soft:#ece6ff;--line:#d9cff8}body[data-theme=royal] .panel,body[data-theme=royal] .card{border-radius:26px;box-shadow:0 12px 34px #5d3fd30e}body[data-theme=royal] .band-banner{background:linear-gradient(135deg,#5d3fd3,#37267f)}
body[data-theme=sunrise]{--soft:#fff0e5;--line:#f0d8c9}body[data-theme=sunrise] .panel,body[data-theme=sunrise] .card{border-radius:18px}body[data-theme=sunrise] .band-banner{background:linear-gradient(135deg,#e05d35,#b83b2c)}
body[data-theme=studio]{--soft:#e2e8ee;--line:#ccd5df}body[data-theme=studio] .panel,body[data-theme=studio] .card{border-radius:12px;box-shadow:0 8px 18px #14223510}body[data-theme=studio] header{border-bottom:3px solid var(--accent)}body[data-theme=studio] .band-banner{background:linear-gradient(135deg,#24364b,#111b29)}
body[data-theme=neon]{--soft:#252d4a;--line:#36415f;--muted:#b9c6df}body[data-theme=neon] .panel,body[data-theme=neon] .card{border-color:#394765;box-shadow:0 0 0 1px #36e0c022,0 12px 34px #0004}body[data-theme=neon] .band-banner{background:linear-gradient(135deg,#6941c6,#18274b);box-shadow:inset 0 0 0 1px #36e0c044}body[data-theme=neon] button{box-shadow:0 0 0 1px #36e0c022}
body[data-theme=ocean] .band-banner{background:linear-gradient(135deg,#087e8b,#075a70)}body[data-theme=forest] .band-banner{background:linear-gradient(135deg,#397447,#24552e)}body[data-theme=night] .band-banner{background:linear-gradient(135deg,#6a5bd0,#2d315f)}body[data-theme=candy] .band-banner{background:linear-gradient(135deg,#933373,#6b285a)}

.global-page-back{display:grid!important;position:fixed;left:18px;top:102px;z-index:45;width:48px;height:48px;padding:0;place-items:center;border-radius:50%;box-shadow:0 8px 24px #0002;font-size:22px;background:var(--surface)!important;color:var(--primary)!important;border:1px solid var(--line)!important}.global-page-back[hidden]{display:none!important}@media(max-width:900px){.global-page-back{left:12px;top:auto;bottom:18px;width:50px;height:50px}}
.game-page-actions{display:flex;gap:8px;justify-content:flex-start;margin-bottom:10px}.games-main-banner .game-page-actions button{background:#ffffffdd!important;color:var(--primary)!important}.featured-game-card{outline:3px solid color-mix(in srgb,var(--accent) 70%,transparent);position:relative}.featured-pill{position:absolute;top:7px;right:7px;background:var(--accent);color:#3c3217;border-radius:999px;padding:2px 8px;font-size:11px;font-style:normal;font-weight:900;z-index:3}

.chat-admin-layout{display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr);gap:18px;align-items:start}.chat-thread-list{padding:16px}.chat-thread-items{display:grid;gap:8px;max-height:680px;overflow:auto}.chat-thread-item{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:10px;align-items:center;text-align:right;background:var(--surface);color:var(--ink);border:1px solid var(--line);padding:10px;border-radius:15px}.chat-thread-item.selected{background:var(--soft);border-color:var(--primary)}.chat-thread-item span:nth-child(2){min-width:0}.chat-thread-item small,.chat-thread-item em{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;color:var(--muted);font-style:normal}.chat-thread-item i{background:var(--primary);color:#fff;min-width:24px;height:24px;border-radius:99px;display:grid;place-items:center;font-style:normal}.chat-avatar{font-size:26px}.chat-conversation{padding:18px}.chat-conversation-head{display:flex;justify-content:space-between;gap:12px;align-items:center;border-bottom:1px solid var(--line);padding-bottom:12px}.chat-messages{display:flex;flex-direction:column;gap:10px;min-height:260px;max-height:580px;overflow:auto;padding:16px 4px}.chat-bubble{max-width:min(82%,680px);padding:12px 14px;border-radius:18px;background:var(--soft);border:1px solid var(--line);align-self:flex-start}.chat-bubble.mine{align-self:flex-end;background:color-mix(in srgb,var(--primary) 12%,var(--surface));border-color:color-mix(in srgb,var(--primary) 30%,var(--line))}.chat-bubble p{white-space:pre-wrap;margin:6px 0 8px}.chat-bubble-head{display:flex;gap:10px;align-items:center;justify-content:space-between}.chat-bubble-head small{font-size:11px}.chat-message-actions{display:flex;gap:6px;justify-content:flex-end}.chat-compose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end;border-top:1px solid var(--line);padding-top:12px}.chat-compose textarea{margin:0;min-height:70px}.chat-compose button{min-height:50px}.user-chat{max-width:980px;margin:auto}@media(max-width:820px){.chat-admin-layout{grid-template-columns:1fr}.chat-thread-items{max-height:290px}.chat-messages{max-height:480px}.chat-compose{grid-template-columns:1fr}.chat-bubble{max-width:92%}}

.game-admin-list{display:grid;gap:12px}.game-admin-row{display:grid;grid-template-columns:100px minmax(0,1fr);gap:14px;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}.game-admin-order{display:grid;grid-template-columns:1fr 1fr;gap:6px;align-content:start}.game-admin-order span{grid-column:1/-1;font-size:36px;text-align:center}.game-admin-fields>b{display:block;margin-bottom:8px}.game-admin-fields>b small{font-weight:400;color:var(--muted);margin-inline-start:8px}.game-admin-toggles{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.game-admin-toggles .choice{margin:0}.admin-game-preview{min-height:420px}.game-health-panel{border-right:5px solid var(--primary)}@media(max-width:700px){.game-admin-row{grid-template-columns:1fr}.game-admin-order{grid-template-columns:50px 50px 1fr}.game-admin-order span{grid-column:auto;grid-row:1;text-align:right}.game-admin-fields .fieldrow{grid-template-columns:1fr}}

/* Touch Ultra games */
.touch-ultra-shell{max-width:900px;margin:auto}.touch-ultra-head{display:flex;gap:14px;align-items:center;margin-bottom:10px}.touch-ultra-head>span{font-size:44px}.touch-ultra-head em{font-style:normal;font-size:11px;letter-spacing:1px;color:var(--primary);font-weight:900}.touch-ultra-head h2{margin:2px 0}.touch-ultra-hud{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0}.touch-ultra-hud b{padding:7px 12px;border-radius:12px;background:var(--soft)}.touch-ultra-hud i{font-style:normal}.touch-ultra-stage{position:relative;min-height:420px;border-radius:22px;overflow:hidden;background:linear-gradient(180deg,color-mix(in srgb,var(--primary) 12%,#fff),color-mix(in srgb,var(--accent) 12%,#fff));border:1px solid var(--line);touch-action:none}.conductor-world,.note-surf-world,.rhythm-catch-world,.pitch-rocket-world,.beat-gates-world{position:relative;min-height:420px;height:100%;touch-action:none}.orchestra-row{font-size:42px;text-align:center;padding:22px}.conductor-cue{text-align:center;font-size:26px;font-weight:900;color:var(--primary);min-height:54px}.conductor-pad{width:150px;height:150px;border-radius:50%;background:var(--surface);border:3px dashed var(--primary);display:grid;place-items:center;margin:8px auto;user-select:none}.conductor-pad span{font-size:58px}.conductor-pad small{font-weight:900}.direction-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:10px}.direction-grid button{padding:10px 5px}.surf-target{position:absolute;top:10px;right:14px;z-index:4;background:var(--surface);border-radius:13px;padding:8px 12px;font-weight:900}.surf-layer,.rhythm-catch-layer{position:absolute;inset:0}.note-surfer{position:absolute;left:12%;top:50%;font-size:42px;transform:translate(-50%,-50%);transition:top .08s linear}.surf-note{position:absolute;transform:translate(-50%,-50%);font-size:26px;background:var(--surface);border:1px solid var(--line);border-radius:50%;width:58px;height:58px;display:grid;place-items:center}.surf-note b{font-size:11px}.beat-basket{position:absolute;left:50%;bottom:5%;font-size:54px;transform:translateX(-50%)}.falling-beat{position:absolute;transform:translate(-50%,-50%);font-size:40px;color:var(--primary);font-weight:900}.rhythm-catch-hint{position:absolute;top:10px;right:10px;background:var(--surface);padding:6px 10px;border-radius:10px;font-weight:900}.orchestra-drag-world{min-height:420px;display:grid;align-content:center;gap:28px;padding:20px}.orchestra-token{width:140px;min-height:120px;display:grid;place-items:center;margin:auto;border-radius:24px;background:var(--surface);border:2px solid var(--line);touch-action:none;user-select:none}.orchestra-token.dragging{transform:scale(1.08);border-color:var(--primary)}.orchestra-token span{font-size:58px}.orchestra-token b{display:block}.orchestra-families{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.orchestra-families button{min-height:70px}.pitch-target-line{position:absolute;left:6%;right:6%;top:50%;border-top:3px dashed var(--accent);transition:top .2s}.pitch-target-line span{position:absolute;right:0;top:-32px;background:var(--surface);border-radius:10px;padding:4px 9px;font-weight:900}.pitch-rocket{position:absolute;left:50%;top:50%;font-size:52px;transform:translate(-50%,-50%) rotate(-45deg);transition:top .06s}.pitch-axis{position:absolute;left:8px;top:10px;bottom:10px;display:flex;flex-direction:column;justify-content:space-between;font-weight:900}.gate-track{position:absolute;inset:60px 20px;display:flex;align-items:center;justify-content:space-around;border-bottom:4px solid var(--primary)}.beat-gate{font-size:38px;opacity:.45;transition:.15s}.beat-gate.active{opacity:1;transform:scale(1.35)}.beat-ball{position:absolute;left:50%;bottom:-26px;transform:translateX(-50%);width:74px;height:74px;border-radius:50%;font-size:30px;background:var(--accent);color:#332c17}.beat-gates-bpm{position:absolute;top:12px;right:12px;background:var(--surface);border-radius:12px;padding:8px 12px;font-weight:900}@media(max-width:600px){.touch-ultra-stage,.conductor-world,.note-surf-world,.rhythm-catch-world,.pitch-rocket-world,.beat-gates-world{min-height:360px}.direction-grid{grid-template-columns:1fr 1fr}.orchestra-families{grid-template-columns:1fr 1fr}.orchestra-row{font-size:30px}.touch-ultra-head>span{font-size:34px}}

/* V49 — pro theme previews, sample workflow, daily challenge */
.theme-preview-grid{display:grid;grid-template-columns:repeat(4,minmax(120px,1fr));gap:10px;margin:12px 0 6px}.theme-preview-card{position:relative;min-height:92px;display:grid;align-content:center;justify-items:center;gap:3px;border:2px solid transparent;border-radius:18px;padding:10px;color:#fff;overflow:hidden}.theme-preview-card span{font-size:26px}.theme-preview-card b{font-size:14px}.theme-preview-card small{font-size:10px;color:inherit;opacity:.82}.theme-preview-card.selected{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 22%,transparent)}.theme-preview-candy{background:linear-gradient(135deg,#933373,#ff8fbd)}.theme-preview-ocean{background:linear-gradient(135deg,#087e8b,#45b9ca)}.theme-preview-forest{background:linear-gradient(135deg,#397447,#83ad5b)}.theme-preview-night{background:linear-gradient(135deg,#222e45,#7c6ee6)}.theme-preview-royal{background:linear-gradient(135deg,#5d3fd3,#9c7ced)}.theme-preview-sunrise{background:linear-gradient(135deg,#e05d35,#ffad55)}.theme-preview-studio{background:linear-gradient(135deg,#24364b,#60758c)}.theme-preview-neon{background:linear-gradient(135deg,#6941c6,#146d79)}.theme-preview-help{margin-top:4px}
.pro-sample-workflow{border-inline-start:5px solid var(--accent);background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 5%,var(--surface)),color-mix(in srgb,var(--accent) 8%,var(--surface)))}.pro-sample-actions{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.sample-name-guide{display:grid;gap:5px;padding:13px;border-radius:14px;background:var(--surface);border:1px solid var(--line)}.sample-name-guide span{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;direction:ltr;text-align:left}.sample-name-guide small{color:var(--muted)}
.daily-music-challenge{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:18px 20px;margin:0 0 18px;border-radius:22px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 18%,var(--surface)),color-mix(in srgb,var(--primary) 9%,var(--surface)));border:1px solid color-mix(in srgb,var(--accent) 45%,var(--line))}.daily-music-challenge h2{margin:3px 0 5px}.daily-music-challenge p{margin:0;color:var(--muted)}.daily-music-challenge button{min-height:52px;white-space:nowrap}
@media(max-width:760px){.theme-preview-grid{grid-template-columns:repeat(2,minmax(120px,1fr))}.daily-music-challenge{grid-template-columns:1fr}.daily-music-challenge button{width:100%}}

/* V50 — cheerful learning platform + YouTube reference number library */
.number-hero-v50{position:relative;overflow:hidden;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 14%,var(--surface)),color-mix(in srgb,var(--accent) 20%,var(--surface)));border:1px solid color-mix(in srgb,var(--primary) 22%,var(--line))}
.number-hero-v50:after{content:'♪  ♫  ♩';position:absolute;inset-inline-end:3%;bottom:-15px;font-size:72px;font-weight:900;letter-spacing:14px;opacity:.06;pointer-events:none}.number-hero-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px}.number-hero-actions span{font-size:12px;color:var(--muted);font-weight:800}.number-hero-actions button{min-height:46px}
.number-learning-journey{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 0 18px}.number-learning-journey article{display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto;column-gap:10px;align-items:center;background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:12px 14px}.number-learning-journey article>span{grid-row:1/3;font-size:30px}.number-learning-journey b{font-size:15px}.number-learning-journey small{color:var(--muted);font-size:11px}
.number-reference-banner{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px;background:linear-gradient(120deg,color-mix(in srgb,var(--primary) 8%,var(--surface)),color-mix(in srgb,var(--accent) 12%,var(--surface)));border-inline-start:5px solid var(--accent)}.number-reference-banner h2{margin:4px 0}.number-reference-banner p{margin:0;color:var(--muted);max-width:760px}.number-reference-banner>button{min-height:52px;white-space:nowrap}.number-reference-chips{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.number-reference-chips span{font-size:11px;font-weight:800;background:var(--surface);border:1px solid var(--line);padding:5px 9px;border-radius:999px}

.channel-library-hero{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:20px;align-items:center;padding:26px;margin-bottom:14px;border-radius:28px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 14%,var(--surface)),color-mix(in srgb,var(--accent) 22%,var(--surface)));border:1px solid color-mix(in srgb,var(--primary) 28%,var(--line));overflow:hidden}.channel-library-hero:before{content:'';position:absolute;width:230px;height:230px;border-radius:50%;inset-inline-end:-75px;top:-95px;background:color-mix(in srgb,var(--accent) 18%,transparent)}.channel-library-hero h1{margin:4px 0 8px;font-size:clamp(26px,4vw,44px);line-height:1.18}.channel-library-hero p{max-width:780px;margin:0;color:var(--muted);font-size:15px}.channel-library-stats{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.channel-library-stats span{display:flex;align-items:baseline;gap:5px;border:1px solid var(--line);background:color-mix(in srgb,var(--surface) 88%,transparent);padding:7px 11px;border-radius:14px;font-size:12px}.channel-library-stats b{font-size:18px;color:var(--primary)}.channel-hero-art{position:relative;z-index:1;display:grid;grid-template-columns:repeat(2,78px);gap:8px;justify-content:center;transform:rotate(-3deg)}.channel-hero-art span{height:78px;border-radius:20px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--line);font-size:34px;font-weight:1000;box-shadow:0 10px 24px #00000012}.channel-hero-art span:nth-child(1){transform:rotate(7deg)}.channel-hero-art span:nth-child(2){transform:translateY(8px) rotate(-5deg)}.channel-hero-art span:nth-child(3){transform:translateY(-4px) rotate(4deg)}.channel-hero-art span:nth-child(4){background:var(--accent)}
.learning-path-strip{display:grid;grid-template-columns:1fr auto 1fr auto 1fr auto 1fr;align-items:center;gap:9px;margin:0 0 14px;padding:11px;border-radius:18px;border:1px solid var(--line);background:var(--surface)}.learning-path-strip>div{display:flex;align-items:center;justify-content:center;gap:7px;min-height:48px;border-radius:13px;background:var(--soft);font-weight:800}.learning-path-strip b{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--primary);color:white}.learning-path-strip i{font-style:normal;color:var(--muted);font-size:22px}
.channel-library-toolbar{display:grid;gap:12px;margin-bottom:14px}.channel-toolbar-main{display:grid;grid-template-columns:auto minmax(220px,1fr) minmax(130px,180px) minmax(140px,190px);gap:9px;align-items:end}.channel-toolbar-main label{display:grid;gap:4px;font-size:12px;font-weight:800}.channel-toolbar-main select,.channel-search{min-width:0}.channel-search{display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:7px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding-inline:11px}.channel-search input{border:0!important;background:transparent!important;margin:0!important;min-width:0;outline:none!important;box-shadow:none!important}.channel-categories{display:flex;gap:7px;overflow:auto;padding-bottom:2px;scrollbar-width:thin}.channel-categories button{white-space:nowrap}
.channel-video-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.channel-video-card{display:flex;flex-direction:column;min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:20px;overflow:hidden;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}.channel-video-card:hover{transform:translateY(-3px);border-color:color-mix(in srgb,var(--primary) 38%,var(--line));box-shadow:0 12px 28px #00000010}.channel-thumb{position:relative;aspect-ratio:16/9;background:var(--soft);overflow:hidden}.channel-thumb img{width:100%;height:100%;object-fit:cover;display:block}.channel-thumb:after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,#0007,transparent 55%);pointer-events:none}.channel-play{position:absolute;z-index:2;inset:50% auto auto 50%;transform:translate(-50%,-50%);width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#ffffffea;color:#d82242;font-size:20px;padding-inline-start:3px;box-shadow:0 7px 20px #0003}.channel-featured{position:absolute;z-index:3;top:9px;inset-inline-start:9px;background:#fff6c7;color:#65510a;border:1px solid #f3db70;border-radius:999px;padding:4px 8px;font-size:10px}.channel-card-copy{display:flex;flex:1;flex-direction:column;padding:13px}.channel-card-copy h3{font-size:15px;line-height:1.45;margin:7px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.channel-card-copy small{color:var(--muted);font-size:10px;margin-bottom:11px}.channel-card-copy button{margin-top:auto;min-height:42px}.channel-card-badges{display:flex;gap:5px;flex-wrap:wrap}.channel-card-badges span{font-size:9px;font-weight:900;background:var(--soft);border:1px solid var(--line);padding:3px 7px;border-radius:999px}
.channel-practice-page{max-width:1420px;margin:auto}.channel-practice-top{display:grid;grid-template-columns:auto minmax(0,1fr);gap:13px;align-items:start;margin-bottom:13px}.channel-practice-top h1{margin:3px 0 4px}.channel-practice-top p{margin:0;color:var(--muted)}.channel-practice-layout{display:grid;grid-template-columns:minmax(270px,380px) minmax(0,1fr);gap:16px;align-items:start}.channel-video-panel,.channel-piano-panel{background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:14px}.channel-video-frame{position:relative;width:min(100%,310px);aspect-ratio:9/16;margin:auto;border-radius:18px;overflow:hidden;background:#111;box-shadow:0 12px 28px #0002}.channel-video-frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0}.channel-source-note{display:grid;gap:4px;margin-top:10px;padding:10px;border-radius:13px;background:var(--soft);font-size:11px}.channel-source-note span{color:var(--muted)}.channel-source-note a{color:var(--primary);font-weight:900}.channel-practice-guide{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;margin-bottom:12px}.channel-practice-guide>div{display:flex;align-items:center;gap:7px;padding:9px;border-radius:13px;background:var(--soft);font-size:11px;font-weight:900}.channel-practice-guide b{width:26px;height:26px;border-radius:50%;background:var(--primary);color:#fff;display:grid;place-items:center}.channel-root-select{display:grid;grid-template-columns:auto minmax(120px,220px);align-items:center;gap:10px;margin:8px 0 12px;font-weight:900}.channel-root-select select{margin:0}.channel-number-pads{display:grid;grid-template-columns:repeat(8,1fr);gap:6px;margin:10px 0}.channel-number-pads button{min-width:0;min-height:58px;padding:5px;display:grid;place-items:center;background:color-mix(in srgb,var(--primary) 8%,var(--surface));color:var(--ink);border:1px solid color-mix(in srgb,var(--primary) 26%,var(--line))}.channel-number-pads b{font-size:22px;color:var(--primary)}.channel-number-pads small{font-size:9px}.channel-capture{display:grid;gap:9px;padding:12px;border:1px solid var(--line);background:var(--soft);border-radius:16px;margin:10px 0}.channel-capture>div:first-child{display:grid;gap:4px}.channel-capture strong{display:flex;gap:5px;flex-wrap:wrap;min-height:48px;align-items:center}.channel-capture strong>span{display:grid;place-items:center;min-width:42px;height:42px;background:var(--surface);border:1px solid var(--line);border-radius:11px;color:var(--primary);font-size:18px}.channel-capture strong small{font-size:8px;color:var(--muted)}.channel-live-piano{overflow:auto;border-radius:16px;padding:9px;background:color-mix(in srgb,var(--soft) 70%,var(--surface))}

.number-home-v50{background:linear-gradient(145deg,color-mix(in srgb,var(--primary) 5%,var(--surface)),var(--surface));border-radius:26px}.home-number-actions{display:flex;gap:8px;flex-wrap:wrap}.home-learning-flow{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;padding:9px;margin-bottom:12px;border-radius:16px;background:var(--soft);font-weight:800;font-size:12px}.home-learning-flow span{display:flex;gap:5px;align-items:center}.home-learning-flow b{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:var(--primary);color:#fff}.home-learning-flow i{font-style:normal;color:var(--muted)}

@media(max-width:1120px){.channel-video-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.channel-toolbar-main{grid-template-columns:auto 1fr 1fr}.channel-search{grid-column:2/-1}.channel-practice-layout{grid-template-columns:320px minmax(0,1fr)}}
@media(max-width:820px){.number-learning-journey{grid-template-columns:1fr 1fr}.number-reference-banner{grid-template-columns:1fr}.number-reference-banner>button{width:100%}.channel-library-hero{grid-template-columns:1fr}.channel-hero-art{display:none}.learning-path-strip{grid-template-columns:1fr 1fr}.learning-path-strip i{display:none}.channel-toolbar-main{grid-template-columns:1fr 1fr}.channel-toolbar-main>[data-channel-back],.channel-search{grid-column:1/-1}.channel-video-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.channel-practice-layout{grid-template-columns:1fr}.channel-video-panel{display:grid;grid-template-columns:minmax(180px,260px) minmax(0,1fr);gap:10px;align-items:start}.channel-source-note{margin:0}.channel-number-pads{grid-template-columns:repeat(4,1fr)}}
@media(max-width:520px){.number-learning-journey{grid-template-columns:1fr}.channel-library-hero{padding:18px;border-radius:20px}.channel-library-hero h1{font-size:27px}.channel-toolbar-main{grid-template-columns:1fr}.channel-toolbar-main>*{grid-column:1!important}.channel-video-grid{grid-template-columns:1fr}.channel-video-card{display:grid;grid-template-columns:132px minmax(0,1fr);min-height:132px}.channel-thumb{aspect-ratio:auto;height:100%;min-height:132px}.channel-card-copy{padding:10px}.channel-card-copy h3{font-size:13px;margin:5px 0}.channel-card-copy small{display:none}.channel-card-copy button{font-size:11px;min-height:38px}.channel-practice-top{grid-template-columns:1fr}.channel-video-panel{grid-template-columns:1fr}.channel-video-frame{width:min(100%,260px)}.channel-practice-guide{grid-template-columns:1fr 1fr 1fr}.channel-practice-guide>div{display:grid;justify-items:center;text-align:center}.channel-root-select{grid-template-columns:1fr}.channel-number-pads{grid-template-columns:repeat(4,1fr)}.channel-capture .toolbar{display:grid;grid-template-columns:1fr 1fr}.home-number-actions{width:100%}.home-number-actions button{flex:1;min-width:140px}}


/* V51 — universal back + menu on every internal screen */
.universal-page-nav{position:sticky;top:8px;z-index:92;display:flex;align-items:center;gap:8px;width:max-content;max-width:100%;margin:0 0 12px auto;padding:6px;border:1px solid var(--line);border-radius:18px;background:color-mix(in srgb,var(--surface) 94%,transparent);box-shadow:0 8px 24px #0a23401c;backdrop-filter:blur(12px)}
.universal-page-nav>button{min-height:42px;box-shadow:none!important}.universal-page-nav .universal-menu{font-weight:900}
.universal-route-panel{position:fixed;z-index:160;top:86px;right:24px;width:min(760px,calc(100% - 48px));max-height:calc(100% - 110px);overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:24px;box-shadow:0 24px 70px #071a3340;padding:16px}
.universal-route-panel[hidden]{display:none!important}.universal-route-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.universal-route-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.universal-route-grid button{text-align:right;justify-content:flex-start;min-height:48px}
.mada-immersive>.universal-page-nav{top:58px;margin:4px 10px 10px auto}.mada-activity-bar [data-activity-menu]{display:inline-flex!important}
@media(max-width:900px){.universal-page-nav{top:4px;margin:0 0 10px auto}.universal-route-panel{top:66px;right:10px;width:calc(100% - 20px);max-height:calc(100% - 84px);padding:12px;border-radius:20px}.universal-route-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.universal-page-nav>button{min-height:46px}}
@media(max-width:430px){.universal-route-grid{grid-template-columns:1fr}.universal-back,.universal-menu{font-size:14px;padding:9px 12px!important}}

/* ===== V52 RESPONSIVE SHELL — one real menu, no duplicate overlay ===== */
html,body,#app{max-width:100%;overflow-x:hidden}
img,svg,canvas,video,iframe{max-width:100%}
.universal-page-nav,.universal-route-panel{display:none!important}

/* Desktop: the right sidebar IS the menu. Do not show a second menu button. */
body:not(.mada-compact-nav) .mobile-menu-toggle,
body:not(.mada-compact-nav) .mobile-drawer-head,
body:not(.mada-compact-nav) .mobile-menu-backdrop,
body:not(.mada-compact-nav) .mada-activity-bar [data-activity-menu]{display:none!important}

/* Phone/tablet and narrower browser windows use one drawer navigation system. */
body.mada-compact-nav.academy-shell-active{overflow:hidden!important}
body.mada-compact-nav.academy-shell-active #app{height:100dvh;min-height:100dvh;display:flex;flex-direction:column;overflow:hidden}
body.mada-compact-nav.academy-shell-active .mada-topbar{flex:0 0 auto;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:8px!important;padding:8px 10px!important;width:100%;max-width:100%;position:relative!important;top:auto!important}
body.mada-compact-nav .mobile-menu-toggle{display:inline-flex!important;grid-column:3;grid-row:1;align-items:center;justify-content:center;gap:6px;min-width:88px;min-height:46px;padding:7px 12px;border-radius:15px;font-weight:900;box-shadow:none!important}
body.mada-compact-nav .mobile-menu-toggle span{font-size:22px}
body.mada-compact-nav .mobile-menu-toggle b{font-size:13px}
body.mada-compact-nav .topbar-mobile-brand{display:block!important;grid-column:2!important;grid-row:1!important;justify-self:center;min-width:0}
body.mada-compact-nav .topbar-mobile-brand .brand-copy{display:none!important}
body.mada-compact-nav .topbar-mobile-brand img{height:44px;max-width:110px;object-fit:contain}
body.mada-compact-nav .userpill{grid-column:1!important;grid-row:1!important;justify-self:start;min-width:0}
body.mada-compact-nav .global-search-wrap{grid-column:1/-1!important;grid-row:2!important;width:100%!important;max-width:none!important;min-width:0}
body.mada-compact-nav .mada-shell{display:block!important;flex:1 1 0;min-height:0!important;height:auto!important;width:100%!important;max-width:none!important;overflow:hidden!important;margin:0!important}
body.mada-compact-nav .mada-shell>main{display:block!important;width:100%!important;max-width:100%!important;height:100%!important;min-height:0!important;margin:0!important;padding:14px 12px 24px!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-width:none;-ms-overflow-style:none}
body.mada-compact-nav .mada-shell>main::-webkit-scrollbar{width:0;height:0;display:none}
body.mada-compact-nav.academy-shell-active>.site-footer,
body.mada-compact-nav.academy-shell-active #app>.site-footer{display:none!important}

body.mada-compact-nav .mada-sidebar{display:block!important;position:fixed!important;z-index:1500!important;top:0!important;right:0!important;bottom:0!important;left:auto!important;width:min(88vw,360px)!important;max-width:calc(100vw - 18px)!important;height:100dvh!important;padding:12px 12px 24px!important;border-radius:24px 0 0 24px!important;overflow-y:auto!important;overflow-x:hidden!important;transform:translateX(110%);transition:transform .22s ease;background:linear-gradient(180deg,var(--mada-navy),var(--mada-navy-2))!important;box-shadow:-18px 0 45px #102b5545!important;scrollbar-width:none}
body.mada-compact-nav .mada-sidebar::-webkit-scrollbar{display:none}
body.mada-compact-nav.mobile-nav-open .mada-sidebar{transform:translateX(0)!important}
body.mada-compact-nav .mobile-drawer-head{display:flex!important;align-items:center;justify-content:space-between;gap:10px;color:#fff;padding:4px 2px 10px}
body.mada-compact-nav .mobile-drawer-head>b{font-size:18px}
body.mada-compact-nav .mobile-drawer-head button{min-width:46px;min-height:42px}
body.mada-compact-nav .mada-sidebar .sidebar-brand{display:grid!important;min-height:78px!important;margin-bottom:8px!important}
body.mada-compact-nav .mada-sidebar .sidebar-brand img{max-height:58px!important}
body.mada-compact-nav .mada-sidebar nav{display:grid!important;position:static!important;overflow:visible!important;min-width:0!important;gap:6px!important}
body.mada-compact-nav .mada-sidebar nav button,
body.mada-compact-nav .mada-sidebar nav a.custom-nav-link{min-width:0!important;width:100%!important;justify-content:flex-start!important;min-height:48px!important;padding:9px 12px!important}
body.mada-compact-nav .sidebar-decoration{display:none!important}
body.mada-compact-nav .mobile-menu-backdrop{display:block!important;position:fixed!important;z-index:1490!important;inset:0!important;border:0!important;border-radius:0!important;background:#071a3388!important;box-shadow:none!important;padding:0!important}
body.mada-compact-nav .mobile-menu-backdrop[hidden]{display:none!important}
body.mada-compact-nav.mobile-nav-open{overflow:hidden!important}

/* Every internal screen keeps one back control; navigation is the header menu on compact screens. */
body.mada-compact-nav .global-page-back{left:10px!important;right:auto!important;top:auto!important;bottom:max(10px,env(safe-area-inset-bottom))!important;width:46px!important;height:46px!important;z-index:80!important}
body:not(.mada-compact-nav) .global-page-back{left:18px!important;top:102px!important;bottom:auto!important}

/* Full-screen activities: no duplicate desktop menu; on phone/tablet open the same drawer. */
.mada-activity-bar [data-activity-menu]{display:none!important}
body.mada-compact-nav .mada-activity-bar [data-activity-menu]{display:inline-flex!important}
body.mada-focused.mada-compact-nav .mada-sidebar{z-index:1600!important}
body.mada-focused.mada-compact-nav .mobile-menu-backdrop{z-index:1590!important}
.mada-immersive{max-width:100vw!important;overflow-x:hidden!important;scrollbar-width:none}
.mada-immersive::-webkit-scrollbar{display:none}

/* No visible scrollbars on touch UI; swipe remains available when content is longer. */
body.mada-compact-nav .keyboard-scroll,
body.mada-compact-nav .tablewrap,
body.mada-compact-nav .chat-messages,
body.mada-compact-nav .chat-thread-items,
body.mada-compact-nav .game-category-tabs,
body.mada-compact-nav nav{scrollbar-width:none;-ms-overflow-style:none}
body.mada-compact-nav .keyboard-scroll::-webkit-scrollbar,
body.mada-compact-nav .tablewrap::-webkit-scrollbar,
body.mada-compact-nav .chat-messages::-webkit-scrollbar,
body.mada-compact-nav .chat-thread-items::-webkit-scrollbar,
body.mada-compact-nav .game-category-tabs::-webkit-scrollbar,
body.mada-compact-nav nav::-webkit-scrollbar{display:none}

/* Tablet sizing: use the full screen width instead of the old narrow desktop column. */
body.mada-compact-nav .cards{grid-template-columns:repeat(2,minmax(0,1fr))}
body.mada-compact-nav .mada-module-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
body.mada-compact-nav .games-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
body.mada-compact-nav .panel,body.mada-compact-nav .card{max-width:100%}
body.mada-compact-nav .fieldrow{min-width:0}
body.mada-compact-nav input,body.mada-compact-nav select,body.mada-compact-nav textarea{max-width:100%}
body.mada-compact-nav .touch-ultra-stage,
body.mada-compact-nav .conductor-world,
body.mada-compact-nav .note-surf-world,
body.mada-compact-nav .rhythm-catch-world,
body.mada-compact-nav .pitch-rocket-world,
body.mada-compact-nav .beat-gates-world{min-height:clamp(280px,52dvh,420px)}

@media(max-width:760px){
 body.mada-compact-nav .cards,body.mada-compact-nav .mada-module-grid,body.mada-compact-nav .games-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.mada-compact-nav .mada-shell>main{padding:10px 8px 18px!important}
 body.mada-compact-nav .panel{padding:14px!important}
 body.mada-compact-nav .mobile-menu-toggle{min-width:56px;padding:7px 9px}
 body.mada-compact-nav .mobile-menu-toggle b{display:none}
 body.mada-compact-nav .user-meta{display:none!important}
}
@media(max-width:480px){
 body.mada-compact-nav .cards,body.mada-compact-nav .mada-module-grid,body.mada-compact-nav .games-grid{grid-template-columns:1fr}
 body.mada-compact-nav .mada-topbar{padding:6px 7px!important;gap:5px!important}
 body.mada-compact-nav .topbar-mobile-brand img{height:38px;max-width:84px}
 body.mada-compact-nav .global-search-wrap input{min-height:42px!important}
 body.mada-compact-nav .userpill #logout{min-width:46px!important;padding:6px 8px!important}
}
@media(max-height:560px) and (orientation:landscape){
 body.mada-compact-nav .mada-topbar{grid-template-columns:auto minmax(160px,1fr) auto!important;padding:4px 8px!important;gap:6px!important}
 body.mada-compact-nav .topbar-mobile-brand{display:none!important}
 body.mada-compact-nav .global-search-wrap{grid-column:2!important;grid-row:1!important;margin:0!important}
 body.mada-compact-nav .global-search-wrap input{min-height:40px!important}
 body.mada-compact-nav .userpill{grid-column:1!important;grid-row:1!important}
 body.mada-compact-nav .mobile-menu-toggle{grid-column:3!important;grid-row:1!important;min-height:40px!important}
 body.mada-compact-nav .mada-shell>main{padding:8px!important}
 .mada-activity-bar{padding:5px 7px!important;gap:6px!important}
 .mada-activity-bar button{min-height:38px!important;padding:6px 10px!important}
}

/* V53 — Maqam Lab + interactive zero-to-music path */
.mada-module.maqam{background:linear-gradient(145deg,#fff1da,#f0e9ff)}
.maqam-hero{position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;align-items:center;padding:28px;border-radius:28px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 12%,#fff),color-mix(in srgb,var(--accent) 18%,#fff));border:1px solid color-mix(in srgb,var(--primary) 16%,transparent);margin-bottom:16px}
.maqam-hero h1{margin:.3rem 0 .5rem;font-size:clamp(1.75rem,3vw,2.7rem)}
.maqam-hero p{margin:0;max-width:780px;font-size:1.05rem;line-height:1.9}
.maqam-hero-notes{display:flex;gap:10px;font-size:clamp(2rem,5vw,4.5rem);opacity:.75;transform:rotate(-8deg)}
.maqam-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 16px}
.maqam-tabs button{min-height:48px}.maqam-tabs button.selected{outline:3px solid color-mix(in srgb,var(--accent) 55%,transparent);transform:translateY(-1px)}
.maqam-control-panel{overflow:hidden}.maqam-system-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}.maqam-system-switch button{min-height:54px;font-size:1.02rem}.maqam-system-switch .selected{background:var(--primary);color:#fff}
.maqam-control-grid{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:12px;align-items:end}.maqam-control-grid label{display:grid;gap:6px;min-width:0}.maqam-control-grid select,.maqam-control-grid input{width:100%;min-width:0}.maqam-control-grid input[type=range]{accent-color:var(--primary)}
.scale-info{display:grid;gap:4px;margin:16px 0;padding:14px 16px;border-radius:16px;background:color-mix(in srgb,var(--primary) 7%,var(--surface));border:1px solid color-mix(in srgb,var(--primary) 15%,transparent)}.scale-info b{font-size:1.1rem}.scale-info span{line-height:1.7}.scale-info small{color:var(--muted,#667085)}
.maqam-play-actions{display:flex;gap:8px;flex-wrap:wrap}.maqam-play-actions button{min-height:44px}
.degree-pads{display:grid;grid-template-columns:repeat(8,minmax(72px,1fr));gap:10px}.degree-pad{display:grid;justify-items:center;gap:3px;min-height:92px;padding:10px 6px;border-radius:18px;background:color-mix(in srgb,var(--surface) 92%,var(--primary));color:var(--ink);border:2px solid color-mix(in srgb,var(--primary) 18%,transparent)}.degree-pad b{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--primary);color:#fff;font-size:1.05rem}.degree-pad span{font-weight:800}.degree-pad small{font-size:.74rem;opacity:.75}.degree-pad.selected{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 20%,transparent)}.degree-pad.is-playing{transform:translateY(-4px);background:color-mix(in srgb,var(--accent) 20%,var(--surface))}
.microtune-box{display:grid;grid-template-columns:minmax(220px,1fr) minmax(220px,420px) auto;gap:14px;align-items:center;margin-top:16px;padding:16px;border-radius:18px;background:color-mix(in srgb,var(--accent) 11%,var(--surface))}.microtune-box>div{display:grid;gap:3px}.microtune-box [data-degree-tune-label]{font-weight:800;color:var(--primary)}.microtune-box small{line-height:1.6}.microtune-box input[type=range]{width:100%;accent-color:var(--primary)}
.maqam-organ-panel{overflow:hidden}.mini-recorder{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end}.mini-recorder small{width:100%;text-align:end}.maqam-keyboard-scroll{overflow-x:auto;overflow-y:hidden;padding:12px 4px 8px;overscroll-behavior-inline:contain;scrollbar-width:thin}.maqam-keyboard{direction:ltr;position:relative;display:flex;align-items:flex-start;width:max-content;min-width:100%;height:230px;padding:0 4px}.maqam-key{position:relative;touch-action:manipulation;user-select:none;border-radius:0 0 10px 10px}.maqam-key.white{width:58px;height:220px;background:#fff;border:1px solid #cfd4dc;color:#182230;z-index:1}.maqam-key.black{width:36px;height:135px;background:#1d2735;color:#fff;margin-left:-18px;margin-right:-18px;z-index:3;border:1px solid #111722}.maqam-key.in-scale.white{background:linear-gradient(#fff 0 53%,color-mix(in srgb,var(--accent) 36%,#fff) 53%)}.maqam-key.in-scale.black{background:linear-gradient(#17202c 0 55%,color-mix(in srgb,var(--primary) 64%,#17202c) 55%)}.maqam-key.pressed{filter:brightness(.83);transform:translateY(2px)}.maqam-key span{position:absolute;bottom:36px;left:0;right:0;font-size:1.05rem;font-weight:900}.maqam-key small{position:absolute;bottom:10px;left:2px;right:2px;font-size:.66rem;line-height:1.15;white-space:normal}.maqam-key.black span{bottom:28px}.maqam-key.black small{bottom:7px}
.maqam-card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.maqam-card{position:relative;display:grid;grid-template-columns:auto 1fr;grid-template-areas:'icon title' 'icon sub';gap:2px 10px;align-items:center;text-align:start;padding:15px;border-radius:18px;background:color-mix(in srgb,var(--surface) 95%,var(--primary));color:var(--ink);border:1px solid color-mix(in srgb,var(--primary) 16%,transparent)}.maqam-card-icon{grid-area:icon;font-size:1.8rem}.maqam-card b{grid-area:title}.maqam-card small{grid-area:sub}.maqam-card em{position:absolute;top:8px;left:8px;padding:3px 7px;border-radius:999px;background:color-mix(in srgb,var(--accent) 28%,#fff);font-size:.7rem;font-style:normal;font-weight:800}.maqam-card.active{border:2px solid var(--primary);background:color-mix(in srgb,var(--primary) 10%,var(--surface))}
.starter-hero{display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,280px);gap:18px;align-items:center}.starter-progress{display:grid;gap:6px}.starter-progress>b{font-size:2rem;color:var(--primary)}.starter-progress>div{height:12px;border-radius:999px;background:color-mix(in srgb,var(--ink) 10%,transparent);overflow:hidden}.starter-progress i{display:block;height:100%;background:linear-gradient(90deg,var(--primary),var(--accent));border-radius:inherit}.starter-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}.starter-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;align-items:center;text-align:start;min-height:100px;padding:14px;border-radius:20px;background:var(--surface);color:var(--ink);border:1px solid color-mix(in srgb,var(--primary) 14%,transparent)}.starter-card>span{font-size:2rem}.starter-card>div{display:grid;gap:2px;min-width:0}.starter-card small{opacity:.65}.starter-card b{font-size:1.04rem}.starter-card em{font-style:normal;font-size:.84rem;opacity:.75}.starter-card strong{color:var(--primary)}.starter-card.done{background:color-mix(in srgb,var(--accent) 10%,var(--surface));border-color:color-mix(in srgb,var(--accent) 45%,transparent)}.starter-work{min-height:220px}.starter-work h2{margin-top:0}.starter-actions{display:flex;gap:10px;flex-wrap:wrap}.starter-result{margin-top:14px;padding:12px 14px;border-radius:14px;background:color-mix(in srgb,var(--primary) 7%,var(--surface));font-weight:800}.pulse-dot{font-size:4rem;line-height:1;text-align:center;color:color-mix(in srgb,var(--primary) 45%,#bbb);transition:transform .12s,color .12s}.pulse-dot.hit{transform:scale(1.28);color:var(--accent)}
.mini-note-keys{direction:ltr;display:flex;align-items:flex-start;overflow-x:auto;padding:8px 0 14px;min-height:165px}.mini-note-keys button{position:relative;flex:0 0 62px;height:150px;border-radius:0 0 9px 9px;background:#fff;color:#111;border:1px solid #bbb}.mini-note-keys button.black{flex-basis:40px;height:94px;margin-left:-20px;margin-right:-20px;z-index:2;background:#1d2735;color:#fff}.starter-degree-pads{grid-template-columns:repeat(8,minmax(64px,1fr))}.starter-degree-pads button{display:grid;gap:4px;place-items:center;min-height:74px;border-radius:14px;background:var(--surface);color:var(--ink);border:2px solid color-mix(in srgb,var(--primary) 16%,transparent)}.starter-degree-pads button.ok{background:color-mix(in srgb,#2fb344 18%,var(--surface));border-color:#2fb344}.starter-degree-pads button.target{background:color-mix(in srgb,var(--accent) 25%,var(--surface));border-color:var(--primary);transform:translateY(-2px)}.starter-melody-now{font-size:1.2rem;margin-bottom:10px}.starter-melody-now strong{font-size:2rem;color:var(--primary)}
@media(max-width:1180px){.maqam-control-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.maqam-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.starter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.degree-pads{grid-template-columns:repeat(4,minmax(72px,1fr))}}
@media(max-width:700px){.maqam-hero{grid-template-columns:1fr;padding:20px}.maqam-hero-notes{display:none}.maqam-control-grid{grid-template-columns:1fr}.maqam-system-switch{grid-template-columns:1fr 1fr}.degree-pads{grid-template-columns:repeat(2,minmax(0,1fr))}.microtune-box{grid-template-columns:1fr}.maqam-card-grid{grid-template-columns:1fr}.starter-hero{grid-template-columns:1fr}.starter-grid{grid-template-columns:1fr}.starter-card{min-height:88px}.maqam-keyboard{height:190px}.maqam-key.white{width:50px;height:182px}.maqam-key.black{width:32px;height:112px;margin-left:-16px;margin-right:-16px}.mini-recorder{justify-content:flex-start}.mini-recorder small{text-align:start}.starter-degree-pads{grid-template-columns:repeat(4,minmax(56px,1fr))}}

/* V54 — unified foundation path + restored touch/music games */
.foundation-path-hero{align-items:center}.foundation-progress-summary{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;max-width:430px;margin-top:16px}.foundation-progress-summary b{font-size:24px}.foundation-progress-summary span{align-self:center}.foundation-progress-summary>div{grid-column:1/-1;height:12px;border-radius:999px;background:color-mix(in srgb,var(--primary) 12%,var(--surface));overflow:hidden}.foundation-progress-summary i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--primary),var(--accent));border-radius:inherit;transition:width .35s ease}.foundation-path-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}.foundation-path-card{min-height:118px;text-align:right;display:grid;grid-template-columns:52px 1fr auto;gap:10px;align-items:center;background:var(--surface);border:1px solid color-mix(in srgb,var(--primary) 16%,transparent);border-radius:20px;padding:14px;color:var(--ink)}.foundation-path-card>span{font-size:32px}.foundation-path-card div{min-width:0;display:grid;gap:3px}.foundation-path-card small,.foundation-path-card em{font-style:normal;color:color-mix(in srgb,var(--ink) 66%,transparent);font-size:12px}.foundation-path-card b{font-size:16px}.foundation-path-card strong{font-size:13px;white-space:nowrap}.foundation-path-card.active{outline:3px solid color-mix(in srgb,var(--primary) 28%,transparent);border-color:var(--primary)}.foundation-path-card.done{background:color-mix(in srgb,var(--accent) 11%,var(--surface))}.foundation-stage-work{min-height:390px}.foundation-stage-head{display:flex;gap:14px;align-items:center;margin-bottom:14px}.foundation-stage-head>span{font-size:40px}.foundation-stage-head small{color:var(--primary);font-weight:800}.foundation-stage-head h2{margin:1px 0}.foundation-stage-head p{margin:0;color:color-mix(in srgb,var(--ink) 68%,transparent)}.foundation-stage-host{min-width:0}.foundation-extra-tools summary{cursor:pointer;font-weight:900;font-size:18px}.foundation-melody-seq{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.foundation-melody-seq b{width:48px;height:48px;border-radius:14px;display:grid;place-items:center;background:color-mix(in srgb,var(--primary) 10%,var(--surface));font-size:20px}.foundation-melody-seq b.current{outline:3px solid var(--accent);transform:translateY(-2px)}.foundation-melody-seq b.ok{background:color-mix(in srgb,#3dbb73 22%,var(--surface))}.foundation-number-pads{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:8px}.foundation-number-pads button{min-height:72px;display:grid;place-items:center}.foundation-number-pads button b{font-size:22px}.foundation-number-pads button small{font-size:11px}.foundation-number-pads button.target{outline:4px solid var(--accent);animation:foundationPulse 1s infinite}@keyframes foundationPulse{50%{transform:translateY(-4px)}}.foundation-compose-track{display:flex;gap:6px;flex-wrap:wrap;min-height:68px;padding:12px;border:2px dashed color-mix(in srgb,var(--primary) 28%,transparent);border-radius:16px;margin:12px 0}.foundation-compose-track span{padding:9px 11px;border-radius:12px;background:color-mix(in srgb,var(--primary) 10%,var(--surface))}
.music-interactive-banner{background:linear-gradient(120deg,color-mix(in srgb,var(--accent) 16%,var(--surface)),color-mix(in srgb,var(--primary) 8%,var(--surface)))}.music-motion-shell{display:grid;gap:14px}.music-motion-head{display:flex;gap:14px;align-items:center}.music-motion-head>span{font-size:42px}.music-motion-head em{font-style:normal;font-size:11px;font-weight:900;letter-spacing:.08em;color:var(--primary)}.music-motion-head h2{margin:2px 0}.music-motion-head p{margin:0}.music-motion-hud{display:flex;gap:10px;flex-wrap:wrap}.music-motion-hud b{padding:8px 12px;border-radius:999px;background:color-mix(in srgb,var(--primary) 8%,var(--surface))}.music-motion-hud i{font-style:normal}.music-motion-stage{min-height:300px;border-radius:20px;padding:14px;background:color-mix(in srgb,var(--primary) 5%,var(--surface));overflow:hidden;position:relative}.pitch-glider-track{height:340px;max-width:340px;margin:auto;position:relative;border-inline-start:5px solid color-mix(in srgb,var(--ink) 25%,transparent);background:repeating-linear-gradient(to bottom,transparent 0 11.8%,color-mix(in srgb,var(--ink) 8%,transparent) 12% 12.4%)}.pitch-target{position:absolute;right:15%;left:15%;height:38px;transform:translateY(-50%);border:2px dashed var(--accent);border-radius:14px;display:grid;place-items:center;font-weight:900}.pitch-ball{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:60px;height:60px;border-radius:50%;font-size:28px;touch-action:none}.staff-drop-wrap{position:relative;height:330px}.staff-drop-staff{position:absolute;inset:20px 8%;background:linear-gradient(#fff0,#fff0);border-radius:16px}.staff-drop-staff>i{position:absolute;left:0;right:0;border-top:2px solid color-mix(in srgb,var(--ink) 35%,transparent)}.staff-drop-target{position:absolute;left:42%;transform:translateY(-50%);font-weight:900;background:var(--accent);padding:5px 10px;border-radius:999px}.staff-drop-note{position:absolute;width:54px;height:54px;border-radius:50%;touch-action:none;font-size:28px}.melody-source,.chord-key-row,.instrument-family-row,.echo-note-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-bottom:14px}.melody-source button,.echo-note-row button{min-height:64px}.melody-source button small,.echo-note-row button small{display:block}.melody-source button.selected{outline:3px solid var(--accent)}.melody-grid{display:grid;grid-template-columns:repeat(8,minmax(44px,1fr));gap:7px}.melody-grid button{min-height:70px}.melody-grid button small{display:block;font-size:10px}.rhythm-lanes{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));height:330px;gap:8px}.rhythm-lanes button{position:relative;overflow:hidden;border-radius:16px}.rhythm-lanes button b{position:absolute;bottom:8px;inset-inline:0}.rhythm-lanes [data-drop]{position:absolute;top:-36px;left:50%;transform:translateX(-50%);font-size:30px}.rhythm-lanes [data-drop].fall{animation:rhythmDrop 1.5s linear forwards}@keyframes rhythmDrop{to{top:78%}}.chord-key-row{grid-template-columns:repeat(7,minmax(0,1fr))}.chord-key-row button.selected{background:var(--accent);color:#111}.instrument-big{min-height:150px;display:grid;place-items:center}.instrument-big span{font-size:80px}.instrument-big b{font-size:24px}.instrument-family-row{grid-template-columns:repeat(4,minmax(0,1fr))}.tempo-runner{position:relative;height:110px;border-radius:20px;background:linear-gradient(90deg,#f3d9d9 0 20%,#d8f3df 35% 75%,#f3d9d9 90% 100%);margin-bottom:14px}.tempo-runner span{position:absolute;left:12%;bottom:26px;font-size:42px;transition:left .2s}.echo-note-row{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1100px){.foundation-path-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:760px){.foundation-path-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.foundation-path-card{grid-template-columns:40px 1fr;min-height:106px;padding:11px}.foundation-path-card>strong{grid-column:2}.foundation-number-pads{grid-template-columns:repeat(4,minmax(0,1fr))}.melody-source,.chord-key-row,.instrument-family-row,.echo-note-row{grid-template-columns:repeat(4,minmax(0,1fr))}.melody-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.music-motion-stage{min-height:280px;padding:10px}}@media(max-width:420px){.foundation-path-grid{grid-template-columns:1fr}.foundation-number-pads{grid-template-columns:repeat(4,minmax(0,1fr))}.rhythm-lanes{height:270px}.instrument-family-row{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* ===== V55 MOBILE PERFORMANCE + NATIVE SCROLL + BILINGUAL UI ===== */
html{overflow-x:hidden;scroll-behavior:auto;-webkit-text-size-adjust:100%}
body{overflow-x:hidden;overscroll-behavior-y:auto}
body.mada-compact-nav.academy-shell-active{overflow-y:auto!important;overflow-x:hidden!important;position:static!important;height:auto!important;min-height:100%!important;touch-action:pan-y pinch-zoom!important;-webkit-overflow-scrolling:touch}
body.mada-compact-nav.academy-shell-active #app{height:auto!important;min-height:100%!important;display:block!important;overflow:visible!important}
body.mada-compact-nav.academy-shell-active .mada-topbar{position:sticky!important;top:0!important;z-index:1000!important}
body.mada-compact-nav .mada-shell{display:block!important;height:auto!important;min-height:0!important;overflow:visible!important;flex:none!important}
body.mada-compact-nav .mada-shell>main{display:block!important;height:auto!important;min-height:calc(100dvh - 92px)!important;overflow:visible!important;overscroll-behavior:auto!important;touch-action:pan-y pinch-zoom!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:auto!important}
body.mada-compact-nav .mada-shell>main::-webkit-scrollbar{display:initial!important;width:auto!important;height:auto!important}
body.mada-compact-nav.mobile-nav-open{overflow:hidden!important}
body.mada-compact-nav .mada-sidebar{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y!important}
body.mada-compact-nav .panel,body.mada-compact-nav .card,body.mada-compact-nav .game-card,body.mada-compact-nav .mada-module{box-shadow:none!important}
body.mada-compact-nav .game-card,body.mada-compact-nav .card{content-visibility:auto;contain-intrinsic-size:180px}
body.mada-compact-nav .games-grid{align-items:start}
body.mada-compact-nav .touch-ultra-stage,body.mada-compact-nav .conductor-world,body.mada-compact-nav .note-surf-world,body.mada-compact-nav .rhythm-catch-world,body.mada-compact-nav .orchestra-drag-world,body.mada-compact-nav .pitch-rocket-world,body.mada-compact-nav .beat-gates-world,body.mada-compact-nav .music-motion-stage{touch-action:pan-y!important}
body.mada-compact-nav .touch-shot-ball,body.mada-compact-nav .orchestra-token,body.mada-compact-nav .pitch-ball,body.mada-compact-nav .staff-drop-note,body.mada-compact-nav .key,body.mada-compact-nav .maqam-key{touch-action:none!important}
body.mada-compact-nav .keyboard-scroll,body.mada-compact-nav .maqam-keyboard-scroll{touch-action:pan-x pan-y!important;-webkit-overflow-scrolling:touch}
body.mada-compact-nav button,body.mada-compact-nav input,body.mada-compact-nav select,body.mada-compact-nav textarea{touch-action:manipulation}
@media(pointer:coarse){
 .mada-sidebar,.mobile-menu-backdrop{transition-duration:.16s!important}
 .card,.panel,.game-card,.mada-module{filter:none!important}
 button:hover{filter:none}
}
@media(max-width:760px){
 body.mada-compact-nav .games-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
 body.mada-compact-nav .game-card{min-height:148px!important;padding:10px!important}
 body.mada-compact-nav .game-card>span{font-size:34px!important}
}
@media(max-width:430px){body.mada-compact-nav .games-grid{grid-template-columns:1fr 1fr!important}.language-toggle{min-width:58px!important;padding:6px 7px!important;font-size:11px!important}}
@media(max-height:540px) and (orientation:landscape){body.mada-compact-nav .mada-shell>main{min-height:0!important;padding:6px 8px 18px!important}.touch-ultra-stage,.music-motion-stage{min-height:250px!important}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}.mada-sidebar,.game-card,.card,.panel,.mada-module{transition:none!important}}
.language-toggle{white-space:nowrap;min-width:72px}
body.lang-en{direction:ltr;text-align:left}
body.lang-en .mada-sidebar nav button,body.lang-en .mada-sidebar nav a.custom-nav-link,body.lang-en table{text-align:left}
body.lang-en aside{border-left:0;border-right:1px solid var(--line)}
body.lang-en .mobile-menu-toggle{direction:ltr}
.maqam-transpose{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(0,1.3fr);gap:14px;align-items:center;margin-top:14px;padding:14px 16px;border-radius:18px;border:1px solid var(--line);background:color-mix(in srgb,var(--accent) 8%,var(--surface))}
.maqam-transpose>div:first-child{display:grid;gap:3px}.maqam-transpose small{color:var(--muted)}.transpose-buttons{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.transpose-buttons button{min-width:0;padding:8px 6px}
@media(max-width:720px){.maqam-transpose{grid-template-columns:1fr}.transpose-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}.transpose-buttons button:first-child,.transpose-buttons button:last-child{grid-column:auto}}

@media(max-width:620px){
 .mada-topbar .userpill .language-toggle.secondary.small{font-size:10px!important;width:auto!important;min-width:58px!important;padding:6px 7px!important}
}

/* V55 automatic lightweight rendering for modest phones/tablets */
.mada-lite-device .mada-topbar{backdrop-filter:none!important}
.mada-lite-device .v32-hero:before,.mada-lite-device .v32-hero:after,.mada-lite-device .sidebar-decoration{display:none!important}
.mada-lite-device .hero,.mada-lite-device .band-banner,.mada-lite-device .lucky-wheel-panel{box-shadow:none!important;filter:none!important}
.mada-lite-device .game-card,.mada-lite-device .card,.mada-lite-device .panel{backdrop-filter:none!important}
.mada-lite-device .lucky-wheel{transition-duration:1.6s!important}

/* V56 — Sound Crew games inspired by character-based music play */
.sound-crew-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:14px 0}.sound-crew-grid.compact{grid-template-columns:repeat(3,minmax(0,1fr))}.sound-crew-card{min-width:0;min-height:116px;padding:12px;border-radius:20px;border:2px solid var(--line,#d9e7f0);background:linear-gradient(180deg,#fff,#f7fbff);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;touch-action:manipulation;transition:transform .14s ease,border-color .14s ease,background .14s ease}.sound-crew-card span{font-size:2rem;line-height:1}.sound-crew-card b{font-size:.95rem}.sound-crew-card small{opacity:.72}.sound-crew-card.active,.sound-crew-card.flash{border-color:var(--primary,#6b50d8);background:color-mix(in srgb,var(--primary,#6b50d8) 12%,#fff);transform:translateY(-2px)}.sound-crew-card.solo{max-width:220px;margin:auto}.sound-crew-mission,.sound-rail-prompt{padding:12px 14px;border-radius:16px;background:#f4f7ff;margin:10px 0;text-align:center}.sound-rail{position:relative;height:92px;margin:12px 4px 18px}.sound-rail-line{position:absolute;left:8%;right:8%;top:48%;height:8px;border-radius:99px;background:linear-gradient(90deg,#cfd8e8,#8ca7d9)}.sound-rail i{position:absolute;top:calc(48% - 12px);width:24px;height:24px;border-radius:50%;background:#fff;border:4px solid #8297bd;transform:translateX(-50%)}.sound-rail-ball{position:absolute;top:calc(48% - 16px);left:8%;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#3d79ff;color:#fff;z-index:2;transform:translateX(-50%);transition:left .38s cubic-bezier(.2,.8,.2,1);box-shadow:0 5px 12px rgba(61,121,255,.24)}.sound-role-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:14px}.sound-role-row button{min-height:52px}.sound-sort-current{display:grid;place-items:center;min-height:160px}.lang-en .sound-crew-card b,.lang-en .sound-crew-card small{direction:ltr}
@media(max-width:760px){.sound-crew-grid,.sound-crew-grid.compact{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.sound-crew-card{min-height:102px;padding:10px}.sound-role-row{grid-template-columns:repeat(2,minmax(0,1fr))}.sound-rail{height:76px}.sound-crew-card.active,.sound-crew-card.flash{transform:none}}
@media(prefers-reduced-motion:reduce){.sound-crew-card,.sound-rail-ball{transition:none!important}}
/* V57 — Sound Journey inspired by the user's reference video, with original academy visuals */
.sj-shell{max-width:980px;margin:auto}.sj-head{display:flex;gap:14px;align-items:center;margin-bottom:12px}.sj-head .sj-orb{font-size:42px}.sj-head small{font-weight:900;letter-spacing:.08em;color:var(--accent)}.sj-head h2{margin:2px 0 4px}.sj-head p{margin:0;color:var(--muted)}.sj-tabs,.sj-actions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}.sj-tabs button.active{outline:3px solid color-mix(in srgb,var(--accent) 28%,transparent)}.sj-track{position:relative;height:min(670px,68dvh);min-height:500px;overflow:hidden;border-radius:24px;background:linear-gradient(160deg,#767285,#5f5a70 55%,#514c62);border:1px solid rgba(255,255,255,.13);isolation:isolate}.sj-road{position:absolute;left:50%;top:2%;bottom:2%;width:10px;transform:translateX(-50%);background:repeating-linear-gradient(to bottom,rgba(255,255,255,.75) 0 12px,transparent 12px 23px);border-radius:20px;opacity:.58}.sj-ball{position:absolute;left:50%;top:8%;z-index:6;transform:translate(-50%,-50%);font-size:29px;filter:drop-shadow(0 7px 5px rgba(0,0,0,.28));transition:top .72s cubic-bezier(.2,.8,.2,1)}.sj-station{position:absolute;left:3%;right:3%;top:var(--y);height:74px;transform:translateY(-50%);display:grid;grid-template-columns:minmax(140px,230px) 1fr;align-items:center;gap:12px;transition:filter .25s,transform .25s}.sj-station.active{filter:brightness(1.18);transform:translateY(-50%) scale(1.015)}.sj-label{color:white;text-shadow:0 2px 6px #000;min-width:0}.sj-label b{display:block;font-size:15px}.sj-label span{display:block;font-size:12px;opacity:.86}.sj-crew{display:flex;justify-content:space-around;align-items:center;min-width:0}.sj-mascot{appearance:none;border:0;background:transparent!important;padding:0;min-height:0;display:grid;place-items:center;color:white;text-shadow:0 2px 5px #000;transform:rotate(var(--rot,0deg));transition:transform .2s}.sj-mascot:hover,.sj-mascot:focus-visible{transform:scale(1.1)}.sj-mascot span{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;font-size:27px;background:var(--sj);box-shadow:0 7px 12px rgba(0,0,0,.28),inset 0 0 0 4px rgba(255,255,255,.16)}.sj-mascot b,.sj-mascot small{display:none}.sj-m1{--rot:-7deg}.sj-m2{--rot:8deg}.sj-panel{margin-top:12px;padding:14px;border:1px solid var(--border);border-radius:18px;background:var(--card)}.sj-panel>div:first-child small{display:block;color:var(--muted)}.sj-panel strong{font-size:18px}.sj-quiz-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.sj-quiz-grid button{min-width:0;padding:10px 5px;background:color-mix(in srgb,var(--sj) 20%,var(--card));border-color:color-mix(in srgb,var(--sj) 45%,var(--border))}.sj-quiz-grid span{display:block;font-size:25px}.sj-quiz-grid b{font-size:12px}.foundation-sound-journey-card{background:linear-gradient(120deg,color-mix(in srgb,var(--accent) 12%,var(--card)),var(--card));border:1px solid var(--border);border-radius:18px;padding:14px}
@media(max-width:720px){.sj-track{height:64dvh;min-height:470px;border-radius:18px}.sj-station{grid-template-columns:118px 1fr;gap:4px;left:2%;right:2%}.sj-label b{font-size:12px}.sj-label span{font-size:10px}.sj-mascot span{width:37px;height:37px;font-size:21px}.sj-quiz-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sj-head p{font-size:13px}.sj-panel{padding:10px}}
@media(prefers-reduced-motion:reduce){.sj-ball,.sj-station,.sj-mascot{transition:none!important}}

/* V58 — true full-direction layout + reference-video sound journey */
html[dir="rtl"] body{direction:rtl;text-align:right}
html[dir="ltr"] body{direction:ltr;text-align:left}
@media(min-width:1101px){
 html[dir="rtl"] .mada-shell{grid-template-columns:minmax(0,1fr) 235px!important;grid-template-areas:"main sidebar"!important}
 html[dir="rtl"] .mada-shell>.mada-sidebar{grid-area:sidebar!important;border-left:0!important;border-right:1px solid var(--line)!important}
 html[dir="rtl"] .mada-shell>main{grid-area:main!important}
 html[dir="ltr"] .mada-shell{grid-template-columns:235px minmax(0,1fr)!important;grid-template-areas:"sidebar main"!important}
 html[dir="ltr"] .mada-shell>.mada-sidebar{grid-area:sidebar!important;border-right:1px solid var(--line)!important;border-left:0!important}
 html[dir="ltr"] .mada-shell>main{grid-area:main!important}
}
html[dir="ltr"] .mada-topbar,html[dir="ltr"] .userpill,html[dir="ltr"] .toolbar,html[dir="ltr"] .tabs,html[dir="ltr"] .fieldrow,html[dir="ltr"] .choice,html[dir="ltr"] .intro,html[dir="ltr"] .cardfooter,html[dir="ltr"] .mobile-drawer-head{direction:ltr}
html[dir="ltr"] nav button,html[dir="ltr"] nav a.custom-nav-link,html[dir="ltr"] .mada-sidebar,html[dir="ltr"] .panel,html[dir="ltr"] .card,html[dir="ltr"] dialog,html[dir="ltr"] label,html[dir="ltr"] .prose,html[dir="ltr"] td,html[dir="ltr"] th{text-align:left!important}
html[dir="rtl"] nav button,html[dir="rtl"] nav a.custom-nav-link,html[dir="rtl"] .mada-sidebar,html[dir="rtl"] label{text-align:right}
html[dir="ltr"] .note-box{border-right:0!important;border-left:4px solid var(--primary)!important}
html[dir="ltr"] dialog .close{float:right!important}
html[dir="ltr"] #toast{left:auto!important;right:24px!important}
html[dir="ltr"] .steps{padding-right:0!important;padding-left:24px!important}
html[dir="ltr"] .mini-recorder{justify-content:flex-start!important}html[dir="ltr"] .mini-recorder small{text-align:start!important}
body.lang-en.mada-compact-nav .mada-sidebar{left:0!important;right:auto!important;border-radius:0 24px 24px 0!important;transform:translateX(-110%)!important;box-shadow:18px 0 45px #102b5545!important}
body.lang-en.mada-compact-nav.mobile-nav-open .mada-sidebar{transform:translateX(0)!important}
body:not(.lang-en).mada-compact-nav .mada-sidebar{right:0!important;left:auto!important;border-radius:24px 0 0 24px!important;transform:translateX(110%)!important}
body:not(.lang-en).mada-compact-nav.mobile-nav-open .mada-sidebar{transform:translateX(0)!important}
html[dir="ltr"] .mobile-menu-toggle{order:-1}html[dir="ltr"] .global-search-wrap{direction:ltr}html[dir="ltr"] .global-search-results{text-align:left}
html[dir="ltr"] input,html[dir="ltr"] select,html[dir="ltr"] textarea{direction:ltr;text-align:left}
html[dir="ltr"] input[type="email"],html[dir="ltr"] input[type="url"],html[dir="ltr"] input[type="number"]{direction:ltr}
/* Musical widgets that must stay left-to-right */
.keyboard,.keyboard-scroll,.staff-wrap,.maqam-keyboard,.maqam-keyboard-scroll,.mini-note-keys{direction:ltr!important}
.sj-reference-mode{max-width:760px;margin-inline:auto}.sj-reference-mode .sj-video-wrap{position:relative;width:min(100%,430px);margin:12px auto 16px;aspect-ratio:9/16;border-radius:22px;overflow:hidden;background:#747087;border:1px solid color-mix(in srgb,var(--line) 55%,transparent);box-shadow:0 14px 40px rgba(15,18,38,.18)}
.sj-reference-mode canvas{display:block;width:100%;height:100%;touch-action:manipulation}.sj-video-badge{position:absolute;top:12px;left:12px;color:#fff;font:700 15px/1.18 Arial,sans-serif;text-shadow:0 2px 5px #000;pointer-events:none}.sj-video-badge b{font-size:13px}.sj-reference-mode .sj-panel{max-width:760px;margin-inline:auto}.sj-reference-mode .sj-head{max-width:760px;margin-inline:auto}.sj-reference-mode .sj-tabs{justify-content:center}.sj-reference-mode .sj-quiz-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:520px){.sj-reference-mode{margin-inline:-2px}.sj-reference-mode .sj-video-wrap{width:min(100%,390px);border-radius:16px}.sj-reference-mode .sj-head{align-items:flex-start}.sj-reference-mode .sj-head .sj-orb{font-size:32px}.sj-reference-mode .sj-quiz-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sj-reference-mode .sj-actions button{flex:1 1 45%;min-width:0}}
html[dir="ltr"] .mada-sidebar,html[dir="ltr"] .mada-shell>main,html[dir="ltr"] .site-footer,html[dir="ltr"] .piano-controls,html[dir="ltr"] .piano-range,html[dir="ltr"] .piano-help{direction:ltr!important}
html[dir="rtl"] .mada-sidebar,html[dir="rtl"] .mada-shell>main,html[dir="rtl"] .site-footer{direction:rtl!important}
html[dir="ltr"] .mada-sidebar nav button{justify-content:flex-start!important}
html[dir="rtl"] .mada-sidebar nav button{justify-content:flex-start!important}

/* V59 — universal smart Back control on every signed-in screen */
.global-page-back{display:flex!important;position:fixed!important;z-index:120!important;align-items:center!important;justify-content:center!important;gap:7px!important;width:auto!important;min-width:92px!important;height:46px!important;padding:0 15px!important;border-radius:999px!important;font-size:16px!important;font-weight:900!important;background:var(--surface)!important;color:var(--primary)!important;border:1px solid var(--line)!important;box-shadow:0 8px 24px #0002!important}
.global-page-back[hidden]{display:none!important}
.global-page-back>span{font-size:20px;line-height:1}.global-page-back>b{font:inherit}
html[dir="rtl"] .global-page-back{left:18px!important;right:auto!important;top:102px!important;bottom:auto!important}
html[dir="ltr"] .global-page-back{right:18px!important;left:auto!important;top:102px!important;bottom:auto!important}
body.mada-compact-nav .global-page-back{top:auto!important;bottom:max(12px,env(safe-area-inset-bottom))!important}
html[dir="rtl"] body.mada-compact-nav .global-page-back{left:12px!important;right:auto!important}
html[dir="ltr"] body.mada-compact-nav .global-page-back{right:12px!important;left:auto!important}
body.mada-focused .global-page-back{z-index:9999!important;top:12px!important;bottom:auto!important}
@media(max-width:520px){.global-page-back{min-width:84px!important;height:44px!important;padding:0 12px!important;font-size:15px!important}}
/* V59 — listen then play the exact reference audio as a music game */
.sj-play{margin-top:14px;padding:12px;border:1px solid var(--line);border-radius:18px;background:color-mix(in srgb,var(--surface) 94%,var(--accent) 6%)}
.sj-play-progress{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px}.sj-play-progress b{font-size:1.15rem;color:var(--primary)}
.sj-play-grid [data-sj-play-choice].next{outline:3px solid var(--accent);outline-offset:2px;transform:translateY(-2px)}
.sj-play-grid [data-sj-play-choice].correct{background:color-mix(in srgb,#41c76f 20%,var(--surface));border-color:#41c76f}.sj-play-grid [data-sj-play-choice].wrong{animation:sjWrong .28s linear 1;border-color:#d64545}
@keyframes sjWrong{25%{transform:translateX(-5px)}50%{transform:translateX(5px)}75%{transform:translateX(-3px)}}
/* V60 direct-open learning + original music game lab */
.foundation-focus-page,.game-focus-page{display:grid;gap:16px;min-width:0}.foundation-focus-top,.game-focus-top{display:flex;gap:14px;align-items:center;justify-content:flex-start;flex-wrap:wrap;padding:14px 16px;border:1px solid var(--line);border-radius:20px;background:var(--surface,#fff)}.foundation-focus-top>div,.game-focus-top>div{min-width:0;flex:1}.foundation-focus-top h1,.game-focus-top h1{margin:3px 0 0;font-size:clamp(22px,4vw,34px)}.foundation-stage-focus{scroll-margin-top:90px}.home-lesson-card,.number-lesson-card{cursor:pointer}
.mada-featured-music-pack{margin:0 0 20px;padding:22px;border-radius:28px;border:1px solid color-mix(in srgb,var(--primary) 18%,#fff);background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 18%,#fff),color-mix(in srgb,var(--primary) 9%,#fff));overflow:hidden}.mada-featured-pack-head{display:flex;justify-content:space-between;align-items:center;gap:18px;flex-wrap:wrap}.mada-featured-pack-head h2{margin:7px 0 4px;font-size:clamp(24px,4vw,38px);color:var(--primary)}.mada-featured-pack-head p{margin:0;max-width:760px;color:var(--muted);line-height:1.7}.mada-featured-pack-art{font-size:40px}.mada-featured-pack-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin-top:18px}.mada-featured-pack-grid>button{min-height:150px;padding:16px;border:1px solid var(--line);border-radius:20px;background:#fff;color:var(--ink);text-align:start;display:grid;gap:6px;align-content:start;transition:.18s transform,.18s box-shadow}.mada-featured-pack-grid>button:active{transform:scale(.98)}.mada-featured-pack-grid>button>span{font-size:32px}.mada-featured-pack-grid>button>b{font-size:17px}.mada-featured-pack-grid>button>small{color:var(--muted);line-height:1.45}.mada-featured-pack-grid>button>em{font-style:normal;font-weight:900;color:var(--primary);margin-top:auto}
.mada-tune-picker{display:grid;grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:8px;margin-bottom:14px}.mada-tune-picker button{min-height:58px;border-radius:15px;display:flex;gap:8px;align-items:center;justify-content:center}.mada-tune-picker button.selected{outline:3px solid color-mix(in srgb,var(--primary) 55%,#fff);background:color-mix(in srgb,var(--primary) 8%,#fff)}.mada-note-pads{display:grid;grid-template-columns:repeat(4,1fr);gap:9px}.mada-note-pads button{min-height:84px;border-radius:16px;background:#fff;color:var(--ink);border:2px solid var(--line);display:grid;place-items:center}.mada-note-pads button b{font-size:26px}.mada-note-pads button.target{background:color-mix(in srgb,var(--accent) 35%,#fff);border-color:var(--accent);animation:madaTargetPulse .8s infinite}.mada-note-pads button.flash{background:color-mix(in srgb,var(--primary) 20%,#fff);transform:translateY(-3px)}.mada-note-pads button.correct{background:#dff8e6;border-color:#4cae69}.mada-note-pads button.wrong{background:#ffe3e3;border-color:#e65d5d}.mada-seq-progress{text-align:center;font-weight:900;margin-top:10px;color:var(--primary)}@keyframes madaTargetPulse{50%{transform:scale(1.04)}}
.mada-rush-board{position:relative;height:min(56vh,440px);min-height:300px;display:grid;grid-template-columns:repeat(4,1fr);overflow:hidden;border-radius:22px;background:linear-gradient(#141a38,#20285b);border:3px solid #fff;box-shadow:inset 0 0 0 1px #ffffff30}.mada-rush-lane{height:100%;border-radius:0;background:transparent;border:0;border-inline-end:1px solid #ffffff26;color:#fff;position:relative}.mada-rush-lane span{position:absolute;bottom:7%;left:50%;transform:translateX(-50%);display:grid;place-items:center;width:52px;height:52px;border:2px solid #fff9;border-radius:14px;font-size:22px;font-weight:900}.mada-hit-line{position:absolute;z-index:4;left:0;right:0;bottom:16%;height:5px;background:#fff;box-shadow:0 0 14px #fff}.mada-falling-tile{position:absolute;z-index:5;height:72px;border-radius:14px;background:linear-gradient(180deg,#fff,#d5e7ff);box-shadow:0 8px 18px #0006;pointer-events:none}.mada-battle-cue{display:grid;place-items:center;min-height:150px;font-size:90px;font-weight:1000}.mada-battle-pads{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.mada-battle-pads button{min-height:84px;font-size:38px;border-radius:18px}.mada-battle-pads button.flash{background:var(--accent);transform:translateY(-5px)}.mada-battle-pads button.wrong{background:#e86b6b}
.mada-creature-stage{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}.mada-creature-stage button{min-height:150px;border-radius:24px;background:linear-gradient(180deg,#fff,#f3f4ff);color:var(--ink);display:grid;place-items:center;align-content:center;gap:5px;border:2px solid var(--line)}.mada-creature-stage button span{font-size:46px}.mada-creature-stage button.active{border-color:var(--primary);background:color-mix(in srgb,var(--primary) 12%,#fff);animation:madaCreatureBounce .7s infinite alternate}.mada-creature-stage button small{color:var(--muted);text-align:center}@keyframes madaCreatureBounce{to{transform:translateY(-6px)}}
.mada-studio-grid{display:grid;gap:8px}.mada-studio-row{display:grid;grid-template-columns:48px repeat(8,minmax(34px,1fr));gap:5px;align-items:center}.mada-studio-row>b{text-align:center;font-size:26px}.mada-studio-row button{min-height:46px;padding:0;border-radius:10px;background:#fff;color:var(--ink);border:1px solid var(--line)}.mada-studio-row button.on{background:var(--primary);color:#fff}.mada-studio-row button.playhead{outline:3px solid var(--accent)}
@media(max-width:700px){.mada-featured-music-pack{padding:14px;border-radius:20px}.mada-featured-pack-grid{grid-template-columns:1fr 1fr}.mada-featured-pack-grid>button{min-height:132px;padding:12px}.mada-note-pads{grid-template-columns:repeat(4,1fr);gap:6px}.mada-note-pads button{min-height:68px}.mada-rush-board{height:390px;min-height:300px}.mada-battle-pads button{min-height:72px;font-size:32px}.mada-studio-grid{overflow-x:auto;padding-bottom:4px}.mada-studio-row{min-width:520px}.foundation-focus-top,.game-focus-top{align-items:flex-start}.foundation-focus-top>button,.game-focus-top>button{min-height:44px}}
@media(max-width:430px){.mada-featured-pack-grid{grid-template-columns:1fr}.mada-featured-pack-grid>button{min-height:110px}.mada-note-pads button b{font-size:22px}.mada-rush-board{height:350px}}
.sj-segment-library{margin:12px 0;padding:12px;border-radius:18px;background:color-mix(in srgb,var(--primary) 6%,#fff);border:1px solid var(--line)}.sj-segment-library>b{display:block;margin-bottom:8px}.sj-segment-library>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}.sj-segment-library button{min-height:68px;padding:7px;border-radius:14px;background:#fff;color:var(--ink);border:2px solid color-mix(in srgb,var(--sj) 45%,#fff);display:grid;place-items:center}.sj-segment-library button>span{display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:var(--sj);color:#fff;font-weight:900}.sj-segment-library button small{color:var(--muted)}.sj-segment-library button.active{background:color-mix(in srgb,var(--sj) 12%,#fff);transform:translateY(-2px)}@media(max-width:540px){.sj-segment-library>div{grid-template-columns:repeat(2,1fr)}}

/* V61 — Note Names Lab, touch music games, and true landscape practice */
.note-lab-hero{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px;align-items:center;padding:24px 28px;margin-bottom:18px;border-radius:26px;background:linear-gradient(120deg,#eef8ff,#fff7d9,#fff0f6);border:1px solid #dce7f3}.note-lab-hero h1{margin:4px 0 6px}.note-lab-equation{display:flex;align-items:center;gap:9px;direction:ltr}.note-lab-equation b{display:grid;place-items:center;width:62px;height:62px;border-radius:20px;background:#fff;border:2px solid var(--line);font-size:25px;color:var(--primary)}.note-lab-equation i{font-style:normal;font-weight:900;color:var(--muted)}.note-name-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px}.note-name-card{min-height:142px;padding:12px 7px;border-radius:20px;background:#fff;color:var(--ink);border:2px solid color-mix(in srgb,var(--primary) 15%,#fff);display:grid;place-items:center;align-content:center;gap:1px}.note-name-card span{font-size:22px}.note-name-card strong{font-size:31px;line-height:1.1}.note-name-card b{font-size:18px;color:var(--primary)}.note-name-card small{font-size:13px}.note-name-card:active{transform:translateY(3px) scale(.98)}.note-name-card.n1{background:#fff1f1}.note-name-card.n2{background:#fff5e8}.note-name-card.n3{background:#fffbe1}.note-name-card.n4{background:#ecfaef}.note-name-card.n5{background:#eaf6ff}.note-name-card.n6{background:#f3edff}.note-name-card.n7{background:#fff0fa}.note-live-label{min-width:130px;text-align:center;padding:9px 14px;border-radius:16px;background:var(--soft)}.note-live-label b{display:block;font-size:28px;line-height:1.1}.note-live-label span{font-weight:800;font-size:12px}.note-score{display:flex;align-items:baseline;gap:7px}.note-score b{font-size:34px;color:var(--primary)}.note-challenge-controls{display:flex;gap:9px;flex-wrap:wrap;margin:8px 0 12px}.note-choice-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.note-choice-grid button{min-height:86px;padding:7px;border-radius:17px;display:grid;place-items:center;background:linear-gradient(180deg,#fff,var(--soft));color:var(--ink);border:1px solid var(--line)}.note-choice-grid strong{font-size:24px}.note-choice-grid b{font-size:13px;color:var(--primary)}.note-choice-grid small{font-size:11px}.note-challenge-result{margin-top:12px;padding:10px 12px;border-radius:13px;background:var(--soft);font-weight:800;text-align:center}
@media(max-width:900px){.note-lab-hero{grid-template-columns:1fr}.note-lab-equation{justify-content:center}.note-name-grid,.note-choice-grid{grid-template-columns:repeat(4,1fr)}}
@media(max-width:520px){.note-name-grid,.note-choice-grid{grid-template-columns:repeat(2,1fr)}.note-name-card{min-height:112px}.note-lab-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.note-lab-actions button{padding:8px}}

.touch-music-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:12px}.touch-music-head h2{margin:4px 0}.touch-music-icon{font-size:42px}.touch-game-hud{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin-top:12px;padding:9px 12px;border-radius:14px;background:var(--soft);font-weight:900}.touch-solfege-pads{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.solfege-pad{min-height:126px;padding:8px 4px;border-radius:18px;color:#1c2830;border:2px solid transparent;display:grid;place-items:center;align-content:center;background:#fff}.solfege-pad strong{font-size:27px}.solfege-pad b{font-size:15px}.solfege-pad small{font-size:11px}.solfege-pad.sp0{background:#ffd7dc}.solfege-pad.sp1{background:#ffe3c6}.solfege-pad.sp2{background:#fff0a8}.solfege-pad.sp3{background:#ccefd7}.solfege-pad.sp4{background:#cceaff}.solfege-pad.sp5{background:#dfd5ff}.solfege-pad.sp6{background:#ffd5ee}.solfege-pad.active{border-color:#152238;transform:translateY(4px) scale(.97);box-shadow:0 0 0 5px #fff,0 0 22px #ffca40}.melody-trace-stage{height:min(44vh,340px);min-height:250px;position:relative;border-radius:22px;overflow:hidden;background:linear-gradient(180deg,#eaf7ff,#fff9d9);touch-action:none;user-select:none}.melody-trace-stage svg{position:absolute;inset:0;width:100%;height:100%;color:#6577a0}.melody-trace-stage>[data-nodes]{position:absolute;inset:0}.trace-node{position:absolute;width:62px;height:62px;margin:-31px 0 0 -31px;border-radius:50%;display:grid;place-items:center;align-content:center;padding:0;background:#fff;color:var(--ink);border:3px solid #94a8c6;box-shadow:0 6px 13px #1e2b4522}.trace-node b{font-size:19px}.trace-node small{font-size:10px}.trace-node.next{border-color:#ffb900;box-shadow:0 0 0 6px #fff4b8,0 0 22px #ffb900}.trace-node.done{background:#7de0aa;border-color:#34a76a}.note-river-stage{position:relative;display:grid;grid-template-columns:repeat(4,1fr);height:min(48vh,380px);min-height:280px;overflow:hidden;border-radius:22px;background:#101828;direction:ltr}.river-lane{position:relative;border-radius:0;background:linear-gradient(180deg,#1d2a43,#111827);border-left:1px solid #ffffff18;color:#fff;padding:0}.river-lane span{position:absolute;bottom:8px;left:0;right:0;display:grid;place-items:center;font-size:22px;z-index:3}.river-lane small{font-size:11px}.river-lane:active{background:#27475f}.river-play-line{position:absolute;left:0;right:0;bottom:58px;height:5px;background:#ffca40;box-shadow:0 0 18px #ffca40;pointer-events:none;z-index:4}.river-note{position:absolute;top:-48px;width:42px;height:42px;border-radius:12px;background:#fff;color:#121827;display:grid;place-items:center;font-size:26px;z-index:5;opacity:0}.river-note.drop{opacity:1;animation:v61RiverDrop 1.45s linear forwards}@keyframes v61RiverDrop{from{transform:translateY(0)}to{transform:translateY(calc(min(48vh,380px) - 105px))}}.rhythm-touch-circle{width:min(100%,520px);aspect-ratio:1.55/1;margin:auto;position:relative;border-radius:28px;background:radial-gradient(circle at center,#f8fbff,#e8f1fb);overflow:hidden}.drum-touch-pad{position:absolute;width:118px;height:88px;border-radius:50%;background:#fff;color:#172c38;border:3px solid var(--line);display:grid;place-items:center;align-content:center}.drum-touch-pad b{font-size:22px}.drum-touch-pad small{font-size:11px}.dp0{left:7%;top:34%}.dp1{right:7%;top:34%}.dp2{left:34%;top:5%}.dp3{left:34%;bottom:5%}.drum-touch-pad.cue{border-color:#ffad00;background:#fff1a7;box-shadow:0 0 0 7px #fff,0 0 30px #ffbd2e}.pulse-core{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:72px;height:72px;border-radius:50%;display:grid;place-items:center;background:#20354e;color:#fff;font-size:25px;font-weight:900}.pulse-core.pulse{animation:v61Pulse .45s ease}@keyframes v61Pulse{50%{transform:translate(-50%,-50%) scale(1.18);background:#e91e63}}.chord-target{display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;padding:12px;border-radius:18px;background:var(--soft);margin-bottom:12px}.chord-target b{font-size:28px}.chord-note-pads{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.chord-note-pads button{min-height:105px;background:#fff;color:var(--ink);border:2px solid var(--line);border-radius:18px;display:grid;place-items:center;align-content:center}.chord-note-pads strong{font-size:27px}.chord-note-pads b{font-size:13px}.chord-note-pads button.chosen{background:#dceeff;border-color:#2b8ed6;transform:translateY(3px)}.chord-note-pads button.correct{background:#cff2dc;border-color:#3eb473}.chord-note-pads button.wrong{background:#ffe0e4;border-color:#d85265}.note-orbit-stage{position:relative;height:min(50vh,390px);min-height:290px;border-radius:24px;overflow:hidden;background:radial-gradient(circle,#fff9d9 0 20%,#e8f4ff 21% 62%,#dceafa 63%);direction:ltr}.orbit-center{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:110px;height:110px;border-radius:50%;display:grid;place-items:center;align-content:center;background:#162946;color:#fff;z-index:3;text-align:center}.orbit-center b{font-size:18px}.orbit-center small{font-size:10px}.orbit-note{position:absolute;top:0;left:0;width:62px;height:62px;border-radius:50%;padding:0;display:grid;place-items:center;align-content:center;background:#fff;color:var(--ink);border:3px solid #91acd0;will-change:transform}.orbit-note strong{font-size:20px}.orbit-note small{font-size:9px}.orbit-note.hit{background:#80e3ad;border-color:#2c9c62}.standalone-game-board .touch-music-head+*{max-width:1100px;margin-inline:auto}
@media(max-width:700px){.touch-solfege-pads,.chord-note-pads{grid-template-columns:repeat(4,1fr)}.solfege-pad,.chord-note-pads button{min-height:88px}.rhythm-touch-circle{aspect-ratio:1.4}.drum-touch-pad{width:92px;height:70px}.trace-node{width:54px;height:54px;margin:-27px 0 0 -27px}}

.number-rotate-overlay,.practice-rotate-overlay{display:none}
@media (pointer:coarse) and (orientation:portrait) and (max-width:1400px){
 body.number-practice-landscape .number-rotate-overlay,.melody-practice-landscape .practice-rotate-overlay{display:grid;position:fixed;inset:0;z-index:10000;place-items:center;background:linear-gradient(160deg,#10213d,#192f54);color:#fff;text-align:center;padding:24px}.number-rotate-overlay>div,.practice-rotate-overlay>div{display:grid;gap:9px;place-items:center}.number-rotate-overlay span,.practice-rotate-overlay span{font-size:74px;animation:v61Rotate 1.3s ease-in-out infinite alternate}.number-rotate-overlay b,.practice-rotate-overlay b{font-size:25px}.number-rotate-overlay small,.practice-rotate-overlay small{color:#cdd8eb;font-size:16px}@keyframes v61Rotate{from{transform:rotate(-18deg)}to{transform:rotate(72deg)}}
}
@media (pointer:coarse) and (orientation:landscape) and (max-width:1400px){
 body.number-practice-landscape{overflow:hidden!important;height:100dvh!important}.number-practice-landscape .mada-topbar,.number-practice-landscape .mada-sidebar,.number-practice-landscape .mobile-menu-backdrop,.number-practice-landscape footer,.number-practice-landscape #mobile-simple-back{display:none!important}.number-practice-landscape .mada-shell{display:block!important;height:100dvh!important;min-height:0!important;max-width:none!important}.number-practice-landscape #main{height:100dvh!important;overflow:hidden!important;padding:4px 6px!important;max-width:none!important}.number-practice-landscape .number-app{height:100%!important;max-width:none!important;display:flex!important;flex-direction:column!important;gap:3px!important;overflow:hidden!important;background:#f5f8fd!important}.number-practice-landscape .number-topbar{flex:0 0 auto!important;margin:0!important;min-height:36px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:5px!important}.number-practice-landscape .number-topbar button{min-height:32px!important;padding:4px 9px!important;font-size:11px!important}.number-practice-landscape .number-topbar b{font-size:12px!important}.number-practice-landscape .number-topbar small{display:none!important}.number-practice-landscape .number-top-actions .badge,.number-practice-landscape [data-practice-layout-admin]{display:none!important}.number-practice-landscape .number-stage{flex:1 1 auto!important;min-height:0!important;margin:0!important;padding:5px!important;border-radius:12px!important;overflow:hidden!important;display:flex!important;flex-direction:column!important;gap:3px!important}.number-practice-landscape .practice-quickbar{flex:0 0 auto!important;display:grid!important;grid-template-columns:minmax(130px,.8fr) auto auto!important;gap:4px!important;margin:0!important}.number-practice-landscape .practice-phrase-picker{min-height:30px!important;padding:2px 6px!important}.number-practice-landscape .practice-phrase-picker span{font-size:9px!important}.number-practice-landscape .practice-phrase-picker select{min-height:28px!important;padding:2px 5px!important;font-size:10px!important}.number-practice-landscape .number-mode-switch button,.number-practice-landscape .practice-quick-actions button{min-height:30px!important;padding:3px 7px!important;font-size:10px!important}.number-practice-landscape .practice-extra-tools{display:none!important}.number-practice-landscape .number-stage-title,.number-practice-landscape .number-lyrics-panel,.number-practice-landscape .number-reference-audio{display:none!important}.number-practice-landscape .number-song-progress{flex:0 0 auto!important;margin:0!important;padding:3px 7px!important;min-height:25px!important}.number-practice-landscape .number-song-progress b,.number-practice-landscape .number-song-progress span{font-size:9px!important}.number-practice-landscape .number-now-row{flex:0 0 auto!important;display:grid!important;grid-template-columns:90px 1fr!important;gap:4px!important;margin:0!important}.number-practice-landscape .number-now,.number-practice-landscape .number-next{padding:3px 7px!important;border-radius:9px!important;min-height:48px!important}.number-practice-landscape .number-now b{font-size:27px!important;margin:0!important}.number-practice-landscape .number-now small,.number-practice-landscape .number-now span,.number-practice-landscape .number-next small{font-size:8px!important}.number-practice-landscape .upcoming-chip{min-width:28px!important;padding:2px 5px!important;font-size:12px!important;border-radius:7px!important}.number-practice-landscape .note-roadmap{display:none!important}.number-practice-landscape .number-sequence{flex:0 0 auto!important;max-height:43px!important;padding:1px 0 3px!important;margin:0!important;overflow-x:auto!important}.number-practice-landscape .number-token{min-width:42px!important;padding:2px 4px!important;border-radius:8px!important}.number-practice-landscape .number-token b{font-size:17px!important}.number-practice-landscape .number-token small,.number-practice-landscape .number-token em{font-size:7px!important}.number-practice-landscape .practice-custom-note{display:none!important}.number-practice-landscape .number-piano-focus{flex:1 1 auto!important;min-height:0!important;padding:3px!important;margin:0!important;overflow:hidden!important;display:flex!important}.number-practice-landscape .number-piano{flex:1 1 auto!important;min-height:0!important;width:100%!important}.number-practice-landscape .number-piano .piano-case{height:100%!important;min-height:0!important;margin:0!important;padding:0!important;display:flex!important;flex-direction:column!important}.number-practice-landscape .number-piano .piano-sound-console{display:none!important}.number-practice-landscape .number-piano .keyboard-scroll{flex:1 1 auto!important;min-height:0!important;height:auto!important;padding:0!important;overflow-x:hidden!important}.number-practice-landscape .number-piano .keyboard{height:100%!important;min-height:0!important}.number-practice-landscape .number-piano .key.white{height:calc(100% - 7px)!important;min-height:0!important}.number-practice-landscape .number-piano .key.black{height:60%!important;min-height:0!important}.number-practice-landscape .number-piano .key span{font-size:9px!important;margin-bottom:5px!important}.number-practice-landscape .key.numbered-key .key-number{bottom:25%!important;width:26px!important;height:26px!important;font-size:14px!important}.number-practice-landscape .key.black.numbered-key .key-number{bottom:16%!important;width:22px!important;height:22px!important;font-size:12px!important}.number-practice-landscape .number-feedback{flex:0 0 auto!important;margin:0!important;padding:3px 7px!important;font-size:9px!important;line-height:1.25!important}.number-practice-landscape .number-phrase-panel,.number-practice-landscape .number-map-details{display:none!important}
 body.melody-practice-landscape{overflow:hidden!important}.melody-practice-landscape .practice-dialog{width:100vw!important;height:100dvh!important;max-width:none!important;max-height:none!important;margin:0!important;border-radius:0!important;padding:0!important;inset:0!important}.melody-practice-landscape .practice-shell{height:100%!important;overflow:hidden!important;padding:5px!important;display:grid!important;grid-template-rows:auto auto auto minmax(0,1fr) auto!important;gap:3px!important}.melody-practice-landscape .practice-top{display:grid!important;grid-template-columns:1fr auto!important;gap:5px!important;margin:0!important}.melody-practice-landscape .practice-top h2{font-size:15px!important;margin:0!important;line-height:1.2!important}.melody-practice-landscape .practice-top p,.melody-practice-landscape .practice-top .badge{display:none!important}.melody-practice-landscape .practice-top button{width:auto!important;margin:0!important;padding:4px 9px!important;min-height:30px!important}.melody-practice-landscape .melody-targets{max-height:39px!important;padding:2px 0!important;overflow-x:auto!important}.melody-practice-landscape .melody-chip{padding:2px 6px!important;font-size:9px!important;border-radius:7px!important}.melody-practice-landscape .practice-progress{margin:0!important;padding:4px 8px!important;min-height:29px!important;font-size:10px!important}.melody-practice-landscape .practice-piano{min-height:0!important;overflow:hidden!important}.melody-practice-landscape .practice-piano .piano-case{height:100%!important;min-height:0!important;margin:0!important;padding:0!important;display:flex!important;flex-direction:column!important}.melody-practice-landscape .practice-piano .piano-sound-console,.melody-practice-landscape .practice-piano .piano-brand,.melody-practice-landscape .practice-piano .piano-controls,.melody-practice-landscape .practice-piano .piano-range,.melody-practice-landscape .practice-piano .piano-help{display:none!important}.melody-practice-landscape .practice-piano .keyboard-scroll{flex:1!important;min-height:0!important;height:auto!important;padding:0!important;overflow-x:hidden!important}.melody-practice-landscape .practice-piano .keyboard{height:100%!important;min-height:0!important}.melody-practice-landscape .practice-piano .key.white{height:calc(100% - 6px)!important;min-height:0!important}.melody-practice-landscape .practice-piano .key.black{height:60%!important;min-height:0!important}.melody-practice-landscape .practice-bottom{display:none!important}.melody-practice-landscape .practice-actions{position:static!important;margin:0!important;padding:3px!important;display:flex!important;gap:4px!important;background:#eef3f8!important}.melody-practice-landscape .practice-actions button{min-height:29px!important;padding:3px 8px!important;font-size:9px!important;margin:0!important}
}

/* V61 — landscape play mode for touch instruments */
.play-rotate-overlay{display:none}
@media (pointer:coarse) and (orientation:portrait) and (max-width:1400px){
 body.studio-play-landscape .play-rotate-overlay,
 body.maqam-play-landscape .play-rotate-overlay{display:flex!important;position:fixed;inset:0;z-index:20050;background:linear-gradient(145deg,#f4f8ff,#fff5df);align-items:center;justify-content:center;flex-direction:column;gap:10px;text-align:center;padding:28px;color:#16345b}
 .play-rotate-overlay span{font-size:58px;line-height:1;animation:v61RotateHint 1.4s ease-in-out infinite alternate}
 .play-rotate-overlay b{font-size:23px}.play-rotate-overlay small{font-size:14px;max-width:330px;line-height:1.6;color:#52677d}
}
@keyframes v61RotateHint{from{transform:rotate(-16deg)}to{transform:rotate(16deg)}}
@media (pointer:coarse) and (orientation:landscape) and (max-width:1400px){
 body.studio-play-landscape,body.maqam-play-landscape{overflow:hidden!important;height:100dvh!important}
 body.studio-play-landscape .mada-immersive,body.maqam-play-landscape .mada-immersive{overflow:hidden!important;height:100dvh!important;max-height:100dvh!important;padding:4px!important;touch-action:none}
 body.studio-play-landscape .mada-activity-bar,body.maqam-play-landscape .mada-activity-bar{position:relative!important;top:0!important;min-height:34px!important;padding:2px 4px!important;gap:4px!important;flex-wrap:nowrap!important}
 body.studio-play-landscape .mada-activity-bar button,body.maqam-play-landscape .mada-activity-bar button{min-height:30px!important;padding:3px 8px!important;font-size:10px!important}
 body.studio-play-landscape .mada-activity-bar small,body.maqam-play-landscape .mada-activity-bar small{display:none!important}
 body.studio-play-landscape .global-page-back,body.maqam-play-landscape .global-page-back,body.studio-play-landscape .universal-page-nav,body.maqam-play-landscape .universal-page-nav{display:none!important}
 .studio-play-landscape .mada-immersive>.eyebrow,.studio-play-landscape .mada-immersive>h1,.studio-play-landscape .mada-immersive>p.muted{display:none!important}
 .studio-play-landscape .mada-immersive>section.panel:not(:first-of-type){display:none!important}
 .studio-play-landscape .mada-immersive>section.panel:first-of-type{height:calc(100dvh - 42px)!important;min-height:0!important;margin:0!important;padding:4px 6px!important;display:flex!important;flex-direction:column!important;gap:3px!important;overflow:hidden!important}
 .studio-play-landscape .mada-immersive>section.panel:first-of-type>.toolbar{flex:0 0 auto!important;display:flex!important;flex-wrap:nowrap!important;gap:5px!important;margin:0!important}
 .studio-play-landscape .mada-immersive>section.panel:first-of-type>.toolbar label{font-size:9px!important;display:flex!important;align-items:center!important;gap:3px!important;white-space:nowrap!important}
 .studio-play-landscape .mada-immersive>section.panel:first-of-type>.toolbar select,.studio-play-landscape .mada-immersive>section.panel:first-of-type>.toolbar input,.studio-play-landscape .mada-immersive>section.panel:first-of-type>.toolbar button{min-height:28px!important;height:28px!important;padding:2px 6px!important;font-size:9px!important}
 .studio-play-landscape #fullpiano{flex:1 1 auto!important;min-height:0!important;overflow:hidden!important}
 .studio-play-landscape #fullpiano .piano-case{height:100%!important;min-height:0!important;margin:0!important;padding:0!important;display:flex!important;flex-direction:column!important;gap:2px!important}
 .studio-play-landscape #fullpiano .piano-brand,.studio-play-landscape #fullpiano .piano-controls,.studio-play-landscape #fullpiano .piano-range,.studio-play-landscape #fullpiano .piano-help,.studio-play-landscape #fullpiano .piano-sound-title,.studio-play-landscape #fullpiano .piano-chord-panel{display:none!important}
 .studio-play-landscape #fullpiano .piano-sound-console{flex:0 0 auto!important;padding:2px 5px!important;margin:0!important;min-height:30px!important;border-radius:8px!important}
 .studio-play-landscape #fullpiano .piano-sound-controls{display:flex!important;align-items:center!important;gap:5px!important;flex-wrap:nowrap!important}
 .studio-play-landscape #fullpiano .piano-sound-controls label{font-size:9px!important;display:flex!important;align-items:center!important;gap:3px!important;white-space:nowrap!important}
 .studio-play-landscape #fullpiano .piano-sound-controls select,.studio-play-landscape #fullpiano .piano-sound-controls input{min-height:26px!important;height:26px!important;font-size:9px!important}
 .studio-play-landscape #fullpiano .piano-sample-status,.studio-play-landscape #fullpiano .piano-test-sound{display:none!important}
 .studio-play-landscape #fullpiano .keyboard-scroll{flex:1 1 auto!important;min-height:0!important;height:auto!important;overflow-x:hidden!important;padding:0!important}
 .studio-play-landscape #fullpiano .keyboard{height:100%!important;min-height:0!important}
 .studio-play-landscape #fullpiano .key.white{height:calc(100% - 5px)!important;min-height:0!important}.studio-play-landscape #fullpiano .key.black{height:60%!important;min-height:0!important}
 .studio-play-landscape #played{flex:0 0 auto!important;margin:0!important;padding:2px 7px!important;min-height:22px!important;font-size:9px!important}.studio-play-landscape #played+small{display:none!important}

 .maqam-play-landscape .maqam-hero{display:none!important}
 .maqam-play-landscape [data-tab-panel="lab"]{height:calc(100dvh - 42px)!important;min-height:0!important;display:grid!important;grid-template-columns:minmax(250px,.38fr) minmax(0,.62fr)!important;grid-template-rows:auto minmax(0,1fr)!important;gap:4px!important;overflow:hidden!important}
 .maqam-play-landscape [data-tab-panel="lab"]>section.panel{margin:0!important;min-height:0!important;padding:4px 6px!important;overflow:hidden!important}
 .maqam-play-landscape [data-tab-panel="lab"]>section.panel:nth-of-type(1){grid-column:1/-1!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:5px!important;align-items:center!important}
 .maqam-play-landscape [data-tab-panel="lab"]>section.panel:nth-of-type(2){grid-column:1!important;grid-row:2!important;display:flex!important;flex-direction:column!important;gap:4px!important}
 .maqam-play-landscape [data-tab-panel="lab"]>section.panel:nth-of-type(3){grid-column:2!important;grid-row:2!important;display:flex!important;flex-direction:column!important;gap:3px!important}
 .maqam-play-landscape [data-tab-panel="lab"]>section.panel:nth-of-type(4){display:none!important}
 .maqam-play-landscape .maqam-system-switch{display:flex!important;grid-template-columns:none!important;gap:3px!important}.maqam-play-landscape .maqam-system-switch button{min-height:28px!important;padding:3px 7px!important;font-size:9px!important}
 .maqam-play-landscape .maqam-control-grid{display:flex!important;align-items:end!important;gap:4px!important;grid-template-columns:none!important}.maqam-play-landscape .maqam-control-grid label{font-size:8px!important;min-width:0!important}.maqam-play-landscape .maqam-control-grid select,.maqam-play-landscape .maqam-control-grid input{min-height:27px!important;height:27px!important;padding:2px 5px!important;font-size:9px!important}
 .maqam-play-landscape .maqam-transpose{margin:0!important;padding:2px 4px!important;min-width:300px!important;display:flex!important;align-items:center!important;gap:4px!important}.maqam-play-landscape .maqam-transpose>div:first-child small{display:none!important}.maqam-play-landscape .maqam-transpose>div:first-child b,.maqam-play-landscape .maqam-transpose>div:first-child span{font-size:8px!important}.maqam-play-landscape .transpose-buttons{display:flex!important;gap:2px!important;flex-wrap:nowrap!important}.maqam-play-landscape .transpose-buttons button{min-height:26px!important;padding:2px 5px!important;font-size:8px!important}
 .maqam-play-landscape .scale-info,.maqam-play-landscape .maqam-play-actions{display:none!important}
 .maqam-play-landscape .panel-title-row{margin:0!important;min-height:0!important}.maqam-play-landscape .panel-title-row p,.maqam-play-landscape .panel-title-row .eyebrow{display:none!important}.maqam-play-landscape .panel-title-row h2{font-size:12px!important;margin:0!important;line-height:1.15!important}
 .maqam-play-landscape .degree-pads{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:3px!important;margin:0!important}.maqam-play-landscape .degree-pad{min-height:40px!important;padding:2px!important}.maqam-play-landscape .degree-pad b{font-size:13px!important}.maqam-play-landscape .degree-pad span,.maqam-play-landscape .degree-pad small{font-size:7px!important}
 .maqam-play-landscape .microtune-box{margin:0!important;padding:4px!important;display:grid!important;grid-template-columns:1fr!important;gap:3px!important}.maqam-play-landscape .microtune-box>div small{display:none!important}.maqam-play-landscape .microtune-box>div b,.maqam-play-landscape .microtune-box>div span{font-size:8px!important}.maqam-play-landscape .microtune-box input{height:18px!important}.maqam-play-landscape .microtune-box button{display:none!important}
 .maqam-play-landscape .mini-recorder{display:flex!important;gap:3px!important;flex-wrap:nowrap!important}.maqam-play-landscape .mini-recorder button{min-height:27px!important;padding:2px 5px!important;font-size:8px!important}.maqam-play-landscape .mini-recorder small{display:none!important}
 .maqam-play-landscape .maqam-organ-panel .panel-title-row{flex:0 0 auto!important}.maqam-play-landscape .maqam-keyboard-scroll{flex:1 1 auto!important;min-height:0!important;height:auto!important;margin:0!important;overflow-x:auto!important;overflow-y:hidden!important}.maqam-play-landscape .maqam-keyboard{height:100%!important;min-height:0!important}.maqam-play-landscape .maqam-key.white{height:calc(100% - 4px)!important;min-height:0!important}.maqam-play-landscape .maqam-key.black{height:60%!important;min-height:0!important}.maqam-play-landscape .maqam-key span{font-size:9px!important}.maqam-play-landscape .maqam-key small{font-size:7px!important}
}

/* V62 — iPad-first maqam performance + meaningful touch music games */
.v62-game-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.v62-game-head>div{display:flex;align-items:center;gap:12px;min-width:0}.v62-game-head h2{margin:2px 0}.v62-game-head p{margin:2px 0;color:var(--muted)}.v62-game-head>strong{min-width:56px;height:56px;border-radius:18px;background:var(--soft);display:grid;place-items:center;font-size:24px;color:var(--primary)}.v62-game-icon{font-size:42px}.v62-game-stage{min-height:300px}.v62-game-result{margin-top:12px;padding:10px 13px;border-radius:14px;background:var(--soft);font-weight:800;text-align:center}.v62-game-actions{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:10px}.v62-game-actions button{min-height:44px}.v62-highway{height:min(58vh,470px);min-height:330px;border-radius:24px;overflow:hidden;position:relative;display:grid;grid-template-columns:repeat(4,1fr);background:linear-gradient(180deg,#101a30,#172940);direction:ltr}.v62-lane{position:relative;background:linear-gradient(180deg,#ffffff09,#ffffff02);border:0;border-inline-start:1px solid #ffffff1c;color:#fff;padding:0}.v62-lane b{position:absolute;bottom:10px;left:0;right:0;font-size:14px}.v62-hit-line{position:absolute;left:0;right:0;bottom:78px;height:6px;background:#ffd13d;box-shadow:0 0 18px #ffd13d;z-index:5;pointer-events:none}.v62-falling-note{position:absolute;top:0;width:48px;height:48px;border-radius:15px;background:#fff;color:#142033;display:grid;place-items:center;font-size:28px;z-index:6;box-shadow:0 8px 18px #0005}.v62-falling-note.hit{background:#8ff0b7;transform:scale(1.22)!important;opacity:0}.v62-note-pads,.v62-big-piano{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}.v62-note-pads button,.v62-big-piano button{min-height:120px;border-radius:20px;background:linear-gradient(180deg,#fff,#eef6ff);color:var(--ink);border:2px solid var(--line);display:grid;place-items:center;align-content:center;padding:8px 4px;touch-action:manipulation}.v62-note-pads button strong,.v62-big-piano button strong{font-size:28px}.v62-note-pads button b,.v62-big-piano button b{font-size:15px;color:var(--primary)}.v62-note-pads button small,.v62-big-piano button small{font-size:11px}.v62-note-pads button.cue{background:#fff0a9;border-color:#ffb600;box-shadow:0 0 0 5px #fff7c5}.v62-note-pads button.pressed,.v62-big-piano button:active{transform:translateY(3px) scale(.98)}.v62-big-piano button.good{background:#b9f4cc;border-color:#36b56a}.v62-big-piano button.bad{background:#ffd1d1;border-color:#d95757}.v62-drum-pads{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.v62-drum-pads button{min-height:170px;border-radius:50%;background:radial-gradient(circle at 38% 32%,#fff,#dce8f5);color:var(--ink);border:4px solid #c5d2e3;display:grid;place-items:center;align-content:center;gap:4px;touch-action:manipulation}.v62-drum-pads button span{font-size:46px}.v62-drum-pads button b{font-size:20px}.v62-drum-pads button.cue{background:#fff0a7;border-color:#ffad00;box-shadow:0 0 0 7px #fff6c9,0 0 26px #ffbd2e}.v62-catch-field{position:relative;height:min(55vh,430px);min-height:320px;border-radius:24px;overflow:hidden;background:linear-gradient(180deg,#ddf7ff,#fff6d9)}.v62-note-bubble{position:absolute;width:96px;height:96px;border-radius:50%;display:grid;place-items:center;align-content:center;background:#fff;color:var(--ink);border:3px solid #8fcce7;box-shadow:0 10px 18px #25415e22;animation:v62Float 3.4s ease-in-out infinite alternate}.v62-note-bubble strong{font-size:27px}.v62-note-bubble b{font-size:14px;color:var(--primary)}.v62-note-bubble.b0{left:6%;top:12%}.v62-note-bubble.b1{left:28%;top:52%;animation-delay:-.8s}.v62-note-bubble.b2{left:47%;top:20%;animation-delay:-1.5s}.v62-note-bubble.b3{right:8%;top:55%;animation-delay:-2.2s}.v62-note-bubble.b4{right:24%;top:7%;animation-delay:-.4s}.v62-note-bubble.b5{left:10%;bottom:4%;animation-delay:-2.7s}.v62-note-bubble.good{background:#b9f4cc;border-color:#32b365}.v62-note-bubble.bad{background:#ffd4d4;border-color:#d95757}@keyframes v62Float{to{transform:translateY(-18px) translateX(8px)}}.v62-swipe-board{height:min(56vh,430px);min-height:320px;border-radius:24px;overflow:hidden;position:relative;background:#f7fbff;touch-action:none;user-select:none}.v62-swipe-board>div{height:calc(100% / 7);border-bottom:1px solid #cfddeb;display:flex;align-items:center;padding-inline:12px;font-weight:800;color:#536a82}.v62-swipe-board>svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.v62-swipe-board polyline{fill:none;stroke:var(--primary);stroke-width:10;stroke-linecap:round;stroke-linejoin:round}.v62-target-display{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:0 auto 14px;padding:12px;border-radius:18px;background:var(--soft)}.v62-target-display strong{font-size:34px;min-width:52px;text-align:center}
@media(max-width:760px){.v62-note-pads,.v62-big-piano{grid-template-columns:repeat(4,1fr)}.v62-note-pads button,.v62-big-piano button{min-height:86px}.v62-drum-pads{grid-template-columns:1fr 1fr}.v62-drum-pads button{min-height:130px}.v62-game-head{align-items:flex-start}.v62-game-head p{font-size:12px}.v62-highway{height:62vh}}

/* The V61 touch mini-games were removed from the registry in V62. */

@media (pointer:coarse) and (orientation:landscape) and (max-width:1400px){
 body.maqam-play-landscape{overflow:hidden!important;height:100dvh!important;background:var(--bg)!important}
 body.maqam-play-landscape #app{height:100dvh!important;overflow:hidden!important}
 body.maqam-play-landscape main#main,body.maqam-play-landscape #main{height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;padding:0!important;margin:0!important}
 body.maqam-play-landscape .mada-immersive{height:100dvh!important;max-height:100dvh!important;overflow:hidden!important;padding:3px!important;display:flex!important;flex-direction:column!important;gap:3px!important;touch-action:none}
 body.maqam-play-landscape .mada-activity-bar{flex:0 0 34px!important;min-height:34px!important;height:34px!important;margin:0!important;padding:2px 4px!important}
 .maqam-play-landscape .maqam-hero{display:none!important}
 .maqam-play-landscape [data-tab-panel="lab"]{flex:1 1 auto!important;height:auto!important;min-height:0!important;display:grid!important;grid-template-columns:1fr!important;grid-template-rows:auto auto minmax(0,1fr)!important;gap:3px!important;overflow:hidden!important}
 .maqam-play-landscape [data-tab-panel="lab"]>section.panel{margin:0!important;padding:3px 5px!important;min-height:0!important;overflow:hidden!important;border-radius:10px!important}
 .maqam-play-landscape [data-tab-panel="lab"]>section.panel:nth-of-type(1){grid-column:1!important;grid-row:1!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:end!important;gap:4px!important;max-height:78px!important}
 .maqam-play-landscape [data-tab-panel="lab"]>section.panel:nth-of-type(2){grid-column:1!important;grid-row:2!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(220px,.34fr)!important;gap:4px!important;align-items:center!important;max-height:70px!important}
 .maqam-play-landscape [data-tab-panel="lab"]>section.panel:nth-of-type(3){grid-column:1!important;grid-row:3!important;display:flex!important;flex-direction:column!important;gap:2px!important;min-height:0!important;overflow:hidden!important}
 .maqam-play-landscape [data-tab-panel="lab"]>section.panel:nth-of-type(4){display:none!important}
 .maqam-play-landscape .maqam-system-switch{display:flex!important;gap:3px!important;align-items:center!important}.maqam-play-landscape .maqam-system-switch button{height:29px!important;min-height:29px!important;padding:2px 7px!important;font-size:9px!important;white-space:nowrap!important}
 .maqam-play-landscape .maqam-control-grid{display:grid!important;grid-template-columns:1.25fr .9fr 1.2fr .75fr!important;gap:3px!important;align-items:end!important}.maqam-play-landscape .maqam-control-grid label{font-size:7px!important;line-height:1!important;min-width:0!important}.maqam-play-landscape .maqam-control-grid select,.maqam-play-landscape .maqam-control-grid input{height:27px!important;min-height:27px!important;padding:1px 4px!important;font-size:9px!important;width:100%!important}.maqam-play-landscape .maqam-control-grid input[type=range]{height:22px!important}
 .maqam-play-landscape .maqam-transpose{display:grid!important;grid-template-columns:1fr!important;gap:1px!important;margin:0!important;padding:2px 3px!important;min-width:245px!important}.maqam-play-landscape .maqam-transpose>div:first-child{display:flex!important;justify-content:space-between!important;gap:5px!important}.maqam-play-landscape .maqam-transpose>div:first-child small{display:none!important}.maqam-play-landscape .maqam-transpose>div:first-child b,.maqam-play-landscape .maqam-transpose>div:first-child span{font-size:8px!important}.maqam-play-landscape .transpose-buttons{display:flex!important;gap:2px!important;flex-wrap:nowrap!important}.maqam-play-landscape .transpose-buttons button{height:25px!important;min-height:25px!important;padding:1px 5px!important;font-size:7px!important;white-space:nowrap!important}
 .maqam-play-landscape .scale-info,.maqam-play-landscape .maqam-play-actions{display:none!important}
 .maqam-play-landscape .panel-title-row{margin:0!important;min-height:0!important}.maqam-play-landscape [data-tab-panel="lab"]>section.panel:nth-of-type(2) .panel-title-row{display:none!important}
 .maqam-play-landscape .degree-pads{display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:2px!important;margin:0!important;min-width:0!important}.maqam-play-landscape .degree-pad{height:54px!important;min-height:54px!important;padding:1px!important;border-radius:7px!important}.maqam-play-landscape .degree-pad b{font-size:12px!important}.maqam-play-landscape .degree-pad span{font-size:7px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}.maqam-play-landscape .degree-pad small{font-size:6px!important;white-space:nowrap!important}
 .maqam-play-landscape .microtune-box{margin:0!important;padding:3px!important;display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:2px!important;height:54px!important;overflow:hidden!important}.maqam-play-landscape .microtune-box>div{display:flex!important;justify-content:space-between!important;gap:3px!important}.maqam-play-landscape .microtune-box>div small{display:none!important}.maqam-play-landscape .microtune-box>div b,.maqam-play-landscape .microtune-box>div span{font-size:7px!important}.maqam-play-landscape .microtune-box input{height:15px!important}.maqam-play-landscape .microtune-box button{display:none!important}
 .maqam-play-landscape .maqam-organ-panel .panel-title-row{flex:0 0 31px!important;min-height:31px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:5px!important}.maqam-play-landscape .maqam-organ-panel .panel-title-row>div>p,.maqam-play-landscape .maqam-organ-panel .panel-title-row .eyebrow{display:none!important}.maqam-play-landscape .maqam-organ-panel .panel-title-row h2{font-size:11px!important;margin:0!important;white-space:nowrap!important}
 .maqam-play-landscape .mini-recorder{display:flex!important;gap:3px!important;flex-wrap:nowrap!important;align-items:center!important}.maqam-play-landscape .mini-recorder button{height:27px!important;min-height:27px!important;padding:1px 6px!important;font-size:8px!important;white-space:nowrap!important}.maqam-play-landscape .mini-recorder small{display:none!important}
 .maqam-play-landscape .maqam-keyboard-scroll{flex:1 1 auto!important;min-height:0!important;height:auto!important;margin:0!important;padding:0!important;overflow:hidden!important;touch-action:none!important}.maqam-play-landscape .maqam-keyboard{width:100%!important;min-width:0!important;max-width:100%!important;height:100%!important;min-height:0!important;padding:0!important;display:flex!important;overflow:hidden!important}.maqam-play-landscape .maqam-key.white{flex:1 1 0!important;width:auto!important;min-width:0!important;height:calc(100% - 2px)!important;border-radius:0 0 5px 5px!important}.maqam-play-landscape .maqam-key.black{flex:0 0 clamp(18px,2.7vw,28px)!important;width:clamp(18px,2.7vw,28px)!important;height:61%!important;margin-left:calc(clamp(18px,2.7vw,28px) / -2)!important;margin-right:calc(clamp(18px,2.7vw,28px) / -2)!important;border-radius:0 0 4px 4px!important}.maqam-play-landscape .maqam-key span{bottom:24px!important;font-size:9px!important}.maqam-play-landscape .maqam-key small{bottom:4px!important;font-size:6px!important;line-height:1!important}.maqam-play-landscape .maqam-key.black span{bottom:19px!important}.maqam-play-landscape .maqam-key.black small{bottom:3px!important}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:560px){
 .maqam-play-landscape [data-tab-panel="lab"]{grid-template-rows:66px 56px minmax(0,1fr)!important}.maqam-play-landscape [data-tab-panel="lab"]>section.panel:nth-of-type(1){max-height:66px!important}.maqam-play-landscape [data-tab-panel="lab"]>section.panel:nth-of-type(2){max-height:56px!important}.maqam-play-landscape .degree-pad{height:43px!important;min-height:43px!important}.maqam-play-landscape .microtune-box{height:43px!important}.maqam-play-landscape .maqam-organ-panel .panel-title-row{flex-basis:28px!important;min-height:28px!important}
}
.maqam-student-challenge{background:linear-gradient(120deg,#f6fbff,#fff9e8)}.maqam-challenge-score{display:flex;align-items:center;gap:7px;padding:8px 13px;border-radius:15px;background:#fff;border:1px solid var(--line)}.maqam-challenge-score span{font-size:22px}.maqam-challenge-score b{font-size:25px;color:var(--primary)}
@media (pointer:coarse) and (orientation:landscape) and (max-width:1400px){.maqam-play-landscape [data-tab-panel="lab"]>section.panel:nth-of-type(4),.maqam-play-landscape [data-tab-panel="lab"]>section.panel:nth-of-type(5){display:none!important}}

/* ===== V63 Maqam Studio: vivid page + admin control ===== */
.maqam-v63{--mq-a:#18b7b0;--mq-b:#7357e6;--mq-c:#ffbf47;--mq-d:#ff6d91;display:grid;gap:14px}
.maqam-v63.maqam-theme-aurora{--mq-a:#16b7af;--mq-b:#7660ef;--mq-c:#ffd25f;--mq-d:#ff7297}
.maqam-v63.maqam-theme-candy{--mq-a:#ef5da8;--mq-b:#7a62e8;--mq-c:#ffd45f;--mq-d:#62d7cf}
.maqam-v63.maqam-theme-ocean{--mq-a:#087e8b;--mq-b:#3b82f6;--mq-c:#ffd166;--mq-d:#36c5a4}
.maqam-v63.maqam-theme-royal{--mq-a:#6746d9;--mq-b:#392b7d;--mq-c:#e6bc4a;--mq-d:#c66cf0}
.maqam-v63.maqam-theme-studio{--mq-a:#263a50;--mq-b:#111c2b;--mq-c:#e0a84b;--mq-d:#4fb9c4}
.maqam-v63 .maqam-v63-hero{min-height:190px;background:linear-gradient(120deg,color-mix(in srgb,var(--mq-a) 90%,#fff),color-mix(in srgb,var(--mq-b) 80%,#fff) 55%,color-mix(in srgb,var(--mq-d) 70%,#fff));color:#fff;border:0;box-shadow:0 18px 45px color-mix(in srgb,var(--mq-b) 20%,transparent)}
.maqam-v63 .maqam-v63-hero:before,.maqam-v63 .maqam-v63-hero:after{content:"";position:absolute;border-radius:999px;filter:blur(2px);opacity:.22;pointer-events:none}.maqam-v63 .maqam-v63-hero:before{width:260px;height:260px;background:#fff;inset:-115px auto auto -80px}.maqam-v63 .maqam-v63-hero:after{width:210px;height:210px;background:var(--mq-c);inset:auto -55px -115px auto}
.maqam-v63 .maqam-hero-copy{position:relative;z-index:2}.maqam-v63 .maqam-hero-copy .eyebrow{color:#fff;background:#ffffff20;border:1px solid #ffffff35;padding:6px 11px;border-radius:999px;display:inline-flex}.maqam-v63 .maqam-hero-copy h1{color:#fff;text-shadow:0 2px 10px #00000020}.maqam-v63 .maqam-hero-copy p{color:#fff;opacity:.96}
.maqam-hero-badges{display:flex;gap:7px;flex-wrap:wrap;margin-top:14px}.maqam-hero-badges span{background:#ffffff1f;border:1px solid #ffffff3a;padding:6px 10px;border-radius:999px;font-weight:800;font-size:.84rem;backdrop-filter:blur(5px)}
.maqam-hero-visual{position:relative;z-index:2;width:min(310px,32vw);height:140px;display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:1fr 1fr;gap:10px;align-items:center}.maqam-hero-visual i,.maqam-hero-visual b{display:grid;place-items:center;border-radius:20px;background:#ffffff1d;border:1px solid #ffffff38;color:#fff;box-shadow:inset 0 1px 0 #ffffff44}.maqam-hero-visual i{font-size:2.2rem;font-style:normal}.maqam-hero-visual b{font-size:1.2rem;background:color-mix(in srgb,var(--mq-c) 35%,#ffffff20)}
.maqam-v63-flow{display:grid;gap:14px}.maqam-v63-section{position:relative;overflow:hidden;border:1px solid color-mix(in srgb,var(--mq-a) 16%,var(--line));box-shadow:0 10px 30px color-mix(in srgb,var(--mq-b) 7%,transparent)}
.maqam-section-accent{position:absolute;inset:10px auto auto 12px;width:38px;height:38px;display:grid;place-items:center;border-radius:14px;background:linear-gradient(135deg,color-mix(in srgb,var(--mq-a) 18%,#fff),color-mix(in srgb,var(--mq-c) 22%,#fff));font-size:1.25rem;z-index:1}.lang-en .maqam-section-accent{inset:10px 12px auto auto}
.maqam-v63 .section-controls{background:linear-gradient(135deg,color-mix(in srgb,var(--mq-a) 6%,var(--surface)),var(--surface))}.maqam-v63 .section-degrees{background:linear-gradient(135deg,color-mix(in srgb,var(--mq-c) 10%,var(--surface)),var(--surface))}.maqam-v63 .section-organ{background:linear-gradient(135deg,color-mix(in srgb,var(--mq-b) 6%,var(--surface)),var(--surface))}.maqam-v63 .section-challenge{background:linear-gradient(135deg,color-mix(in srgb,var(--mq-d) 8%,var(--surface)),color-mix(in srgb,var(--mq-c) 6%,var(--surface)))}.maqam-v63 .section-library{background:linear-gradient(135deg,color-mix(in srgb,var(--mq-a) 5%,var(--surface)),var(--surface))}
.maqam-v63 .maqam-system-switch button{border-radius:18px;background:color-mix(in srgb,var(--surface) 92%,var(--mq-a));color:var(--ink);border:1px solid color-mix(in srgb,var(--mq-a) 22%,var(--line))}.maqam-v63 .maqam-system-switch button.selected{background:linear-gradient(135deg,var(--mq-a),var(--mq-b));color:#fff;box-shadow:0 8px 20px color-mix(in srgb,var(--mq-b) 18%,transparent)}
.maqam-v63 .degree-pad{border:1px solid color-mix(in srgb,var(--mq-a) 20%,var(--line));background:linear-gradient(180deg,#fff,color-mix(in srgb,var(--mq-a) 8%,#fff));transition:transform .14s ease,box-shadow .14s ease}.maqam-v63 .degree-pad:hover,.maqam-v63 .degree-pad.selected{transform:translateY(-2px);box-shadow:0 8px 18px color-mix(in srgb,var(--mq-a) 15%,transparent)}
.maqam-v63 .maqam-card{min-height:88px;transition:.16s ease}.maqam-v63 .maqam-card:nth-child(4n+1){background:linear-gradient(135deg,color-mix(in srgb,var(--mq-a) 12%,#fff),#fff)}.maqam-v63 .maqam-card:nth-child(4n+2){background:linear-gradient(135deg,color-mix(in srgb,var(--mq-c) 18%,#fff),#fff)}.maqam-v63 .maqam-card:nth-child(4n+3){background:linear-gradient(135deg,color-mix(in srgb,var(--mq-d) 12%,#fff),#fff)}.maqam-v63 .maqam-card:nth-child(4n+4){background:linear-gradient(135deg,color-mix(in srgb,var(--mq-b) 10%,#fff),#fff)}.maqam-v63 .maqam-card:hover{transform:translateY(-2px);box-shadow:0 8px 18px #0000000d}
.maqam-admin-config{margin-top:18px;padding:20px;border-radius:24px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 6%,var(--surface)),color-mix(in srgb,var(--accent) 7%,var(--surface)));border:1px solid var(--line)}
.maqam-admin-config textarea{min-height:80px}.maqam-admin-grid{display:grid;grid-template-columns:1fr 1.1fr .9fr;gap:14px;margin-top:14px}.maqam-admin-grid>section{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:14px}.maqam-admin-grid h3{margin:.2rem 0 .7rem}.maqam-admin-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}.maqam-admin-order{display:grid;gap:7px}.maqam-order-row{display:flex;justify-content:space-between;align-items:center;gap:8px;border:1px solid var(--line);border-radius:13px;padding:8px 10px;background:color-mix(in srgb,var(--surface) 96%,var(--primary))}.maqam-order-row>div{display:flex;gap:4px}
@media(max-width:1100px){.maqam-admin-grid{grid-template-columns:1fr}.maqam-hero-visual{width:240px}}
@media(max-width:720px){.maqam-hero-visual{display:none}.maqam-v63 .maqam-v63-hero{min-height:0}.maqam-admin-checks{grid-template-columns:1fr}}

/* V63: landscape player is class based, so admin re-ordering never breaks iPad layout */
@media (pointer:coarse) and (orientation:landscape) and (max-width:1400px){
 body.maqam-play-landscape .maqam-v63-flow{grid-template-rows:66px 56px minmax(0,1fr)!important;grid-template-columns:1fr!important;height:calc(100dvh - 42px)!important;overflow:hidden!important;gap:3px!important}
 body.maqam-play-landscape .maqam-v63-flow>.section-controls{display:grid!important;grid-column:1!important;grid-row:1!important;max-height:66px!important;order:1!important}
 body.maqam-play-landscape .maqam-v63-flow>.section-degrees{display:grid!important;grid-column:1!important;grid-row:2!important;max-height:56px!important;order:2!important}
 body.maqam-play-landscape .maqam-v63-flow>.section-organ{display:flex!important;grid-column:1!important;grid-row:3!important;min-height:0!important;order:3!important}
 body.maqam-play-landscape .maqam-v63-flow>.section-challenge,body.maqam-play-landscape .maqam-v63-flow>.section-library{display:none!important}
}
@media (pointer:coarse) and (orientation:landscape) and (max-width:1400px){
 body.maqam-play-landscape .maqam-v63-flow>section.panel.section-controls{display:grid!important;grid-column:1!important;grid-row:1!important;max-height:66px!important;order:1!important}
 body.maqam-play-landscape .maqam-v63-flow>section.panel.section-degrees{display:grid!important;grid-column:1!important;grid-row:2!important;max-height:56px!important;order:2!important}
 body.maqam-play-landscape .maqam-v63-flow>section.panel.section-organ{display:flex!important;grid-column:1!important;grid-row:3!important;min-height:0!important;max-height:none!important;order:3!important;flex-direction:column!important}
 body.maqam-play-landscape .maqam-v63-flow>section.panel.section-challenge,body.maqam-play-landscape .maqam-v63-flow>section.panel.section-library{display:none!important}
}

/* ===== V64 Full English + Interactive Rhythm Course ===== */
.rhythm-course-page{display:grid;gap:18px}.rhythm-course-hero{position:relative;overflow:hidden;border-radius:28px;padding:24px;background:linear-gradient(135deg,#fff4ce,#e8f8ff 45%,#f5eaff);border:1px solid var(--line);box-shadow:0 16px 38px #26364d12}.rhythm-course-hero:after{content:'♩  ♪  ♫';position:absolute;inset:auto 18px 8px auto;font-size:54px;opacity:.08;font-weight:900}.rhythm-course-hero h1{margin:.15rem 0 .45rem}.rhythm-course-hero p{max-width:760px;color:var(--muted);margin:0}.rhythm-course-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.rhythm-course-card{display:flex;align-items:center;gap:13px;text-align:start;min-height:110px;padding:16px;border-radius:22px;background:var(--surface);border:1px solid var(--line);box-shadow:0 9px 24px #1a30450a;transition:.15s ease}.rhythm-course-card:hover,.rhythm-course-card:focus-visible{transform:translateY(-2px);box-shadow:0 14px 30px #1b446814}.rhythm-course-card>span{width:54px;height:54px;flex:0 0 54px;display:grid;place-items:center;border-radius:18px;background:linear-gradient(135deg,#ffe989,#f6d9ff);font-size:29px}.rhythm-course-card:nth-child(2n)>span{background:linear-gradient(135deg,#c9f4ef,#dcecff)}.rhythm-course-card:nth-child(3n)>span{background:linear-gradient(135deg,#ffd8e8,#fff0b8)}.rhythm-course-card b{display:block;font-size:1.02rem}.rhythm-course-card small{display:block;margin-top:5px;color:var(--muted);line-height:1.45}.rhythm-course-activity{display:grid;gap:14px}.rhythm-course-head{display:flex;align-items:center;gap:14px;padding:18px 20px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(120deg,#fff8d9,#eaf9ff,#f8edff)}.rhythm-course-head>span{width:66px;height:66px;display:grid;place-items:center;border-radius:21px;background:#fff;border:1px solid #ffffffaa;box-shadow:0 8px 22px #182f4612;font-size:34px}.rhythm-course-head h1{margin:1px 0 3px}.rhythm-course-head p{margin:0;color:var(--muted)}.rhythm-big-pulse{width:120px;height:120px;margin:12px auto;display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle,#25b6ad 0 22%,#dff8f5 23% 58%,#fff 59%);font-size:54px;color:#11887f;transition:.12s ease;box-shadow:0 12px 35px #168f851b}.rhythm-big-pulse.on{transform:scale(1.12);box-shadow:0 0 0 12px #20b7ad18,0 18px 45px #168f8530}.rhythm-course-tap{width:min(100%,680px);min-height:140px;margin:auto;border-radius:28px;font-size:1.3rem;font-weight:900;background:linear-gradient(135deg,#17aaa2,#7163e8);color:#fff;box-shadow:0 14px 34px #3d67a02c}.rhythm-symbol-hero{display:grid;place-items:center;gap:4px;padding:24px;border-radius:26px;background:linear-gradient(135deg,#eef9ff,#fff8d6);border:1px solid var(--line)}.rhythm-symbol-hero>b{font-size:70px;line-height:1}.rhythm-symbol-hero>strong{font-size:30px;color:var(--primary)}.rhythm-count-row,.rhythm-choice-big,.titi-touch-pair{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.rhythm-count-row button,.rhythm-choice-big button,.titi-touch-pair button{min-height:92px;border-radius:20px;background:var(--surface);border:2px solid var(--line);font-size:24px;font-weight:900;touch-action:manipulation}.rhythm-count-row button small{display:block;font-size:12px;color:var(--muted)}.rhythm-count-row button.target{border-color:var(--accent);box-shadow:0 0 0 5px color-mix(in srgb,var(--accent) 18%,transparent)}.rhythm-count-row button.ok{background:#e7fff2;border-color:#42bb7e}.rhythm-choice-big{grid-template-columns:repeat(3,minmax(0,1fr))}.rhythm-choice-big button{font-size:40px}.rhythm-choice-big button b{display:block;font-size:15px}.titi-touch-pair{grid-template-columns:1fr 1fr;max-width:600px;margin:auto}.titi-touch-pair button{min-height:150px;background:linear-gradient(145deg,#f0fbff,#fff0f8);font-size:30px}.rhythm-sequence{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;padding:17px;border-radius:22px;background:var(--soft)}.rhythm-sequence span{padding:11px 14px;border-radius:14px;background:#fff;border:1px solid var(--line);font-weight:900}.rhythm-sequence span.current{background:var(--primary);color:#fff;transform:scale(1.05)}.rhythm-bar-builder{min-height:118px;border:2px dashed var(--line);border-radius:22px;padding:12px;display:grid;grid-template-columns:repeat(4,1fr);gap:8px;background:color-mix(in srgb,var(--soft) 75%,#fff)}.rhythm-bar-builder button,.rhythm-bar-builder .empty-slot{min-height:82px;display:grid;place-items:center;border-radius:17px;background:#fff;border:1px solid var(--line);font-weight:900}.rhythm-token-palette{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.rhythm-token-palette button{min-height:64px;border-radius:17px;padding:9px 18px;font-weight:900}.rhythm-course-back{justify-self:start}

/* V64 touch music games */
.v64-game-head{display:flex;align-items:center;gap:14px;margin-bottom:14px}.v64-game-head>span{width:62px;height:62px;flex:0 0 62px;display:grid;place-items:center;border-radius:20px;background:linear-gradient(135deg,#dff8f5,#eee8ff);font-size:32px}.v64-game-head h2{margin:0 0 3px}.v64-game-head p{margin:0;color:var(--muted)}.v64-train{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:14px 0}.v64-train>div{min-height:98px;border-radius:20px;border:2px dashed var(--line);display:grid;place-items:center;background:var(--soft);font-size:16px;font-weight:900}.v64-train>div.filled{border-style:solid;border-color:#28a89f;background:#eafffa}.v64-palette{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.v64-palette button{min-width:140px;min-height:76px;border-radius:20px;font-size:20px;font-weight:900}.v64-echo-pads{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.v64-echo-pads button{min-height:150px;border-radius:24px;background:linear-gradient(155deg,#fff,#eef9ff);border:2px solid var(--line);touch-action:manipulation}.v64-echo-pads button span{display:block;font-size:44px;color:var(--primary)}.v64-echo-pads button b{font-size:18px}.v64-swipe-stage{width:100%;min-height:310px;border-radius:28px;background:linear-gradient(150deg,#e9fbff,#f7ecff);border:2px solid #d4e2ec;display:grid;place-items:center;align-content:center;gap:8px;touch-action:none}.v64-swipe-stage b{font-size:110px;line-height:.9;color:var(--primary)}.v64-swipe-stage small{font-size:16px;color:var(--muted)}.v64-staff-drop{position:relative;height:min(52vh,390px);min-height:260px;border-radius:26px;background:#fff;border:1px solid var(--line);overflow:hidden;touch-action:none}.v64-staff-lines{position:absolute;inset:23% 5%;background:repeating-linear-gradient(to bottom,transparent 0 18%,#27384a 18% 19.2%,transparent 19.2% 20%)}.v64-drag-note{position:absolute;width:58px;height:58px;border-radius:50%;z-index:3;font-size:30px;padding:0;touch-action:none}.v64-target-line{position:absolute;left:5%;right:5%;height:14px;border-radius:9px;background:#ffd14f66;border:2px solid #f0b813;transform:translateY(-50%)}.v64-drum-pads{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.v64-drum-pads button{min-height:170px;border-radius:50% 50% 26px 26px;background:linear-gradient(160deg,#fff,#eaf5ff);border:3px solid var(--line);touch-action:manipulation;box-shadow:inset 0 -14px 26px #55718a0c}.v64-drum-pads button:active{transform:scale(.96);background:#e7fff5}.v64-drum-pads button span{display:block;font-size:45px}.v64-drum-pads button b{display:block;margin-top:6px}.v64-chord-keys{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:7px}.v64-chord-keys button{min-height:120px;border-radius:16px;background:#fff;border:2px solid var(--line);touch-action:manipulation}.v64-chord-keys button.selected{background:linear-gradient(180deg,#dff9f4,#c8eee7);border-color:#1eaa9f;box-shadow:0 0 0 4px #26b1a41b}

@media(max-width:900px){.rhythm-course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.v64-echo-pads{grid-template-columns:repeat(5,minmax(70px,1fr));overflow-x:auto}.v64-drum-pads button{min-height:140px}.v64-chord-keys{grid-template-columns:repeat(9,minmax(64px,1fr));overflow-x:auto}}
@media(max-width:600px){.rhythm-course-grid{grid-template-columns:1fr}.rhythm-course-card{min-height:92px}.rhythm-count-row{grid-template-columns:repeat(4,1fr)}.rhythm-choice-big{grid-template-columns:1fr 1fr}.rhythm-choice-big button:last-child{grid-column:1/-1}.v64-train{grid-template-columns:repeat(2,1fr)}.v64-drum-pads{grid-template-columns:1fr 1fr}.v64-drum-pads button{min-height:130px}.v64-swipe-stage{min-height:240px}}
@media(pointer:coarse){.rhythm-course-card,.rhythm-count-row button,.rhythm-choice-big button,.titi-touch-pair button,.v64-palette button,.v64-echo-pads button,.v64-drum-pads button,.v64-chord-keys button{min-touch-target:44px;-webkit-tap-highlight-color:transparent;user-select:none}.rhythm-course-page button,.v64-game-head~button{touch-action:manipulation}}

/* V66 — mobile/iPhone/Android Songs-by-Numbers piano visibility hard fix */
@media (pointer:coarse), (max-width:900px){
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano-focus{display:flex!important;visibility:visible!important;opacity:1!important;min-height:var(--number-safe-piano-h,245px)!important;overflow:hidden!important;flex:1 0 auto!important}
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano{display:block!important;visibility:visible!important;opacity:1!important;width:100%!important;min-height:calc(var(--number-safe-piano-h,245px) - 6px)!important;overflow:visible!important}
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .piano-case{display:flex!important;flex-direction:column!important;height:100%!important;min-height:calc(var(--number-safe-piano-h,245px) - 6px)!important;overflow:hidden!important;margin:0!important;padding:0!important}
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .piano-brand,
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .piano-controls,
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .piano-range,
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .piano-help,
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .piano-sound-console{display:none!important}
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .keyboard-scroll{display:block!important;visibility:visible!important;opacity:1!important;flex:1 1 auto!important;height:100%!important;min-height:calc(var(--number-safe-piano-h,245px) - 8px)!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0!important;-webkit-overflow-scrolling:touch}
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .keyboard{display:block!important;visibility:visible!important;height:100%!important;min-height:calc(var(--number-safe-piano-h,245px) - 12px)!important}
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .key.white{height:calc(100% - 5px)!important;min-height:calc(var(--number-safe-piano-h,245px) - 18px)!important}
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .key.black{height:61%!important;min-height:76px!important}
}
@media (pointer:coarse) and (orientation:portrait) and (max-width:1400px){
 body.number-practice-landscape{height:auto!important;min-height:100dvh!important;overflow-y:auto!important}
 body.number-practice-landscape #main{height:auto!important;min-height:100dvh!important;overflow:visible!important}
 body.number-practice-landscape .number-app{height:auto!important;min-height:100dvh!important;overflow:visible!important}
 body.number-practice-landscape .number-stage{overflow:visible!important}
 body.number-practice-landscape .number-rotate-overlay{display:flex!important;position:sticky!important;inset:auto!important;top:4px!important;z-index:120!important;min-height:48px!important;padding:6px 12px!important;border-radius:14px!important;margin:0 0 6px!important;background:linear-gradient(135deg,#10213dee,#214d79ee)!important;align-items:center!important;justify-content:center!important;gap:10px!important}
 body.number-practice-landscape .number-rotate-overlay>div{display:flex!important;align-items:center!important;gap:9px!important}
 body.number-practice-landscape .number-rotate-overlay span{font-size:27px!important;animation:none!important}
 body.number-practice-landscape .number-rotate-overlay b{font-size:13px!important}
 body.number-practice-landscape .number-rotate-overlay small{font-size:10px!important}
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano-focus{min-height:var(--number-safe-piano-h,270px)!important;margin-top:5px!important}
}
@media (pointer:coarse) and (orientation:landscape) and (max-width:1400px){
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano-focus{min-height:var(--number-safe-piano-h,150px)!important;flex:1 1 auto!important}
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano,
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .piano-case{min-height:calc(var(--number-safe-piano-h,150px) - 6px)!important}
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .keyboard-scroll{min-height:calc(var(--number-safe-piano-h,150px) - 8px)!important}
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .keyboard{min-height:calc(var(--number-safe-piano-h,150px) - 12px)!important}
 body.number-practice-landscape .number-app.force-mobile-piano .number-piano .key.white{min-height:calc(var(--number-safe-piano-h,150px) - 18px)!important}
}
@media (pointer:coarse) and (orientation:landscape) and (max-height:480px){
 body.number-practice-landscape .number-song-progress,body.number-practice-landscape .number-feedback{display:none!important}
 body.number-practice-landscape .number-sequence{max-height:31px!important;padding:0!important}
 body.number-practice-landscape .number-token{min-width:36px!important;padding:1px 3px!important}.number-practice-landscape .number-token b{font-size:14px!important}
 body.number-practice-landscape .number-now-row{min-height:38px!important;grid-template-columns:72px 1fr!important}
 body.number-practice-landscape .number-now,body.number-practice-landscape .number-next{min-height:38px!important;padding:2px 5px!important}
 body.number-practice-landscape .number-now b{font-size:22px!important}
}

/* V67 Instrument Lab */
.instrument-lab-hero{display:flex;justify-content:space-between;gap:22px;align-items:center;padding:28px;border-radius:28px;background:linear-gradient(135deg,#dff7ff,#fff3cb 52%,#ffe5f3);border:1px solid #cfe8ef;margin-bottom:18px;overflow:hidden}.instrument-lab-hero h1{font-size:clamp(28px,4vw,52px);margin:.2em 0}.instrument-hero-icons{font-size:clamp(34px,6vw,78px);white-space:nowrap}.instrument-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}.instrument-card{min-height:210px;text-align:start;border:1px solid #d9e4ec;border-radius:24px;background:#fff;padding:20px;box-shadow:0 10px 26px #19384a12;transition:.18s transform,.18s box-shadow}.instrument-card:hover,.instrument-card:focus-visible{transform:translateY(-3px);box-shadow:0 16px 34px #19384a1e}.instrument-card>span{font-size:50px}.instrument-card h2{margin:8px 0 4px}.instrument-card p{min-height:44px;color:var(--muted,#667)}.instrument-card b{color:var(--primary)}.instrument-page-head{display:flex;gap:18px;align-items:center;margin:4px 0 16px}.instrument-page-head h1{margin:0}.instrument-page-head p{margin:4px 0;color:var(--muted,#667)}.instrument-stage{overflow:hidden}.instrument-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-bottom:14px}.instrument-toolbar label{display:flex;gap:8px;align-items:center}.pro-drum-kit{display:grid;grid-template-columns:repeat(7,1fr);grid-template-rows:120px 150px;gap:12px;align-items:end;min-height:300px;padding:16px;background:radial-gradient(circle at 50% 100%,#d8eef6,#f7fbfd 58%,#edf5f8)}.drum-piece{border-radius:50%;min-height:100px;border:5px solid #263947;background:radial-gradient(circle,#fff,#cad9df);box-shadow:0 10px 0 #7d9099;touch-action:manipulation}.drum-piece span{font-size:28px;display:block}.drum-piece.hit{transform:translateY(6px) scale(.97);box-shadow:0 4px 0 #7d9099}.drum-piece-kick{grid-column:3/6;grid-row:2;min-height:145px}.drum-piece-snare{grid-column:2/4;grid-row:2}.drum-piece-floor{grid-column:5/7;grid-row:2}.drum-sequencer{overflow:auto}.seq-row{display:grid;grid-template-columns:100px repeat(16,minmax(38px,1fr));gap:5px;min-width:820px;align-items:center;margin:7px 0}.seq-row button{aspect-ratio:1;border-radius:8px;padding:0;background:#eef3f6;color:#6e7c84}.seq-row button.on{background:var(--primary);color:#fff}.seq-row button.playhead{outline:3px solid var(--accent);outline-offset:1px}.string-board{display:flex;flex-direction:column;gap:8px;padding:14px;background:linear-gradient(90deg,#4e3324,#9a6748 10%,#b8835e 50%,#9a6748 90%,#4e3324);border-radius:18px;overflow:auto}.string-row{display:grid;grid-template-columns:100px minmax(760px,1fr);gap:5px;align-items:center}.string-row:after{content:"";position:absolute}.open-string,.frets button{min-height:54px;background:#fffdf6e8;border:1px solid #4d3928;border-radius:9px}.frets{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(62px,1fr);position:relative}.frets:before{content:"";position:absolute;left:0;right:0;top:50%;height:3px;background:#e6d9a7;z-index:0}.frets button{position:relative;z-index:1;background:#fffdf6d8}.frets button.playing,.open-string.playing{background:#fff0a6;transform:translateY(-2px)}.synth-keys{display:grid;grid-template-columns:repeat(8,1fr);min-height:260px;gap:5px}.synth-keys button{background:linear-gradient(#fff,#edf1f6);border:1px solid #b8c5d0;border-radius:0 0 16px 16px;font-size:18px;touch-action:none}.synth-keys button:active{background:#d5f3ff}.instrument-mini-tools,.exercise-options,.exercise-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.exercise-card{max-width:760px;margin:auto;text-align:center;padding:30px}.exercise-options{justify-content:center}.exercise-options button{min-width:140px;min-height:60px}.instrument-stage .piano-shell{max-width:none}
@media(max-width:900px){.instrument-lab-hero{padding:20px}.instrument-hero-icons{font-size:42px}.pro-drum-kit{grid-template-columns:repeat(4,1fr);grid-template-rows:auto}.drum-piece,.drum-piece-kick,.drum-piece-snare,.drum-piece-floor{grid-column:auto;grid-row:auto;min-height:90px}.string-row{grid-template-columns:78px minmax(720px,1fr)}.synth-keys{min-height:220px}.instrument-page-head{align-items:flex-start;flex-direction:column}.instrument-page-head>button{align-self:flex-start}}
@media(max-width:600px){.instrument-grid{grid-template-columns:1fr 1fr}.instrument-card{min-height:170px;padding:14px}.instrument-card>span{font-size:38px}.instrument-card p{font-size:13px}.pro-drum-kit{grid-template-columns:repeat(3,1fr);padding:8px;gap:8px}.drum-piece{min-height:82px}.instrument-toolbar{font-size:13px}.synth-keys{min-height:190px;gap:2px}.synth-keys button span{writing-mode:vertical-rl;font-size:12px}.instrument-lab-hero{display:block}.instrument-hero-icons{margin-top:10px}}

/* ===== V68 — one-screen Songs by Numbers for every touch tablet/phone ===== */
body.number-touch-practice.number-practice-landscape{
  overflow:hidden!important;height:100dvh!important;max-height:100dvh!important;background:#eef4fb!important;
  overscroll-behavior:none!important;
}
body.number-touch-practice.number-practice-landscape #app,
body.number-touch-practice.number-practice-landscape .mada-shell{
  height:100dvh!important;max-height:100dvh!important;min-height:0!important;overflow:hidden!important;display:block!important;
}
body.number-touch-practice.number-practice-landscape .mada-topbar,
body.number-touch-practice.number-practice-landscape .mada-sidebar,
body.number-touch-practice.number-practice-landscape .mobile-menu-backdrop,
body.number-touch-practice.number-practice-landscape footer,
body.number-touch-practice.number-practice-landscape #mobile-simple-back{
  display:none!important;
}
body.number-touch-practice.number-practice-landscape #main{
  height:100dvh!important;max-height:100dvh!important;min-height:0!important;overflow:hidden!important;
  padding:3px!important;margin:0!important;max-width:none!important;width:100vw!important;
}
body.number-touch-practice .number-rotate-overlay{display:none!important}
body.number-touch-practice .number-app.touch-practice{
  height:calc(100dvh - 6px)!important;max-height:calc(100dvh - 6px)!important;min-height:0!important;
  width:100%!important;max-width:none!important;display:grid!important;grid-template-rows:auto minmax(0,1fr)!important;
  gap:3px!important;overflow:hidden!important;background:#f3f7fc!important;
}
body.number-touch-practice .number-app.touch-practice .number-topbar{
  min-height:34px!important;max-height:38px!important;height:36px!important;margin:0!important;padding:2px 3px!important;
  display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:5px!important;align-items:center!important;
}
body.number-touch-practice .number-app.touch-practice .number-topbar>div:nth-child(2){min-width:0!important;overflow:hidden!important}
body.number-touch-practice .number-app.touch-practice .number-topbar b{font-size:clamp(10px,1.6vw,14px)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:block!important}
body.number-touch-practice .number-app.touch-practice .number-topbar small{display:none!important}
body.number-touch-practice .number-app.touch-practice .number-topbar button{min-height:30px!important;height:30px!important;padding:2px 8px!important;font-size:10px!important;border-radius:10px!important}
body.number-touch-practice .number-app.touch-practice .number-top-actions{display:none!important}
body.number-touch-practice .number-app.touch-practice .number-stage{
  min-height:0!important;height:100%!important;max-height:100%!important;margin:0!important;padding:3px!important;
  border-radius:12px!important;overflow:hidden!important;display:grid!important;
  grid-template-rows:auto auto auto minmax(0,1fr)!important;gap:3px!important;align-content:stretch!important;
}
body.number-touch-practice .number-app.touch-practice .number-stage-title,
body.number-touch-practice .number-app.touch-practice .number-lyrics-panel,
body.number-touch-practice .number-app.touch-practice .number-reference-audio,
body.number-touch-practice .number-app.touch-practice .number-song-progress,
body.number-touch-practice .number-app.touch-practice .note-roadmap,
body.number-touch-practice .number-app.touch-practice .practice-custom-note,
body.number-touch-practice .number-app.touch-practice .number-feedback,
body.number-touch-practice .number-app.touch-practice .number-phrase-panel,
body.number-touch-practice .number-app.touch-practice .number-map-details,
body.number-touch-practice .number-app.touch-practice .practice-extra-tools{display:none!important}
body.number-touch-practice .number-app.touch-practice .practice-quickbar{
  margin:0!important;min-height:34px!important;display:grid!important;grid-template-columns:minmax(150px,1fr) auto auto!important;
  gap:3px!important;align-items:center!important;overflow:hidden!important;
}
body.number-touch-practice .number-app.touch-practice .practice-phrase-picker{
  min-height:31px!important;height:31px!important;padding:1px 5px!important;border-radius:9px!important;min-width:0!important;
}
body.number-touch-practice .number-app.touch-practice .practice-phrase-picker span{font-size:8px!important}
body.number-touch-practice .number-app.touch-practice .practice-phrase-picker select{height:27px!important;min-height:27px!important;font-size:9px!important;padding:1px 4px!important;min-width:0!important}
body.number-touch-practice .number-app.touch-practice .number-mode-switch{margin:0!important;padding:2px!important;gap:2px!important;white-space:nowrap!important}
body.number-touch-practice .number-app.touch-practice .number-mode-switch button,
body.number-touch-practice .number-app.touch-practice .practice-quick-actions button{
  min-height:29px!important;height:29px!important;padding:2px 6px!important;font-size:9px!important;border-radius:8px!important;white-space:nowrap!important;
}
body.number-touch-practice .number-app.touch-practice .practice-quick-actions{display:flex!important;gap:2px!important;flex-wrap:nowrap!important}
body.number-touch-practice .number-app.touch-practice .number-now-row{
  margin:0!important;min-height:48px!important;max-height:58px!important;display:grid!important;grid-template-columns:minmax(76px,110px) minmax(0,1fr)!important;gap:3px!important;
}
body.number-touch-practice .number-app.touch-practice .number-now,
body.number-touch-practice .number-app.touch-practice .number-next{min-height:48px!important;height:100%!important;padding:2px 6px!important;border-radius:9px!important;overflow:hidden!important}
body.number-touch-practice .number-app.touch-practice .number-now b{font-size:clamp(23px,4.6vh,38px)!important;line-height:.95!important;margin:0!important}
body.number-touch-practice .number-app.touch-practice .number-now small,
body.number-touch-practice .number-app.touch-practice .number-now span,
body.number-touch-practice .number-app.touch-practice .number-next small{font-size:7px!important;line-height:1!important}
body.number-touch-practice .number-app.touch-practice [data-upcoming]{display:flex!important;gap:3px!important;align-items:center!important;justify-content:flex-start!important;height:100%!important;overflow:hidden!important}
body.number-touch-practice .number-app.touch-practice .upcoming-chip{min-width:30px!important;height:31px!important;padding:1px 6px!important;font-size:13px!important;border-radius:7px!important;display:grid!important;place-items:center!important}
body.number-touch-practice .number-app.touch-practice .number-sequence{
  margin:0!important;padding:0 1px!important;min-height:34px!important;max-height:42px!important;overflow-x:auto!important;overflow-y:hidden!important;
  display:flex!important;gap:3px!important;align-items:center!important;-webkit-overflow-scrolling:touch;scrollbar-width:none!important;
}
body.number-touch-practice .number-app.touch-practice .number-sequence::-webkit-scrollbar{display:none!important}
body.number-touch-practice .number-app.touch-practice .number-token{
  flex:0 0 auto!important;min-width:38px!important;height:32px!important;padding:1px 4px!important;border-radius:7px!important;display:grid!important;place-items:center!important;align-content:center!important;
}
body.number-touch-practice .number-app.touch-practice .number-token b{font-size:14px!important;line-height:1!important}
body.number-touch-practice .number-app.touch-practice .number-token small{font-size:6px!important;line-height:1!important}
body.number-touch-practice .number-app.touch-practice .number-token em{display:none!important}
body.number-touch-practice .number-app.touch-practice .number-piano-focus{
  grid-row:4!important;min-height:0!important;height:100%!important;max-height:none!important;margin:0!important;padding:2px!important;
  overflow:hidden!important;display:flex!important;border-radius:10px!important;
}
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano,
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .piano-case,
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .keyboard-scroll,
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .keyboard{
  min-height:0!important;height:100%!important;max-height:100%!important;
}
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano{display:flex!important;flex:1 1 auto!important;overflow:hidden!important;width:100%!important}
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .piano-case{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;margin:0!important;padding:0!important;overflow:hidden!important;width:100%!important}
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .piano-brand,
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .piano-controls,
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .piano-range,
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .piano-help,
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .piano-sound-console,
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .piano-chord-panel{display:none!important}
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .keyboard-scroll{
  display:block!important;flex:1 1 auto!important;overflow-x:auto!important;overflow-y:hidden!important;padding:0!important;margin:0!important;
  -webkit-overflow-scrolling:touch;touch-action:pan-x!important;scrollbar-width:none!important;
}
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .keyboard-scroll::-webkit-scrollbar{display:none!important}
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .keyboard{display:block!important;position:relative!important;width:max-content!important;min-width:100%!important}
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .key.white{height:100%!important;min-height:0!important}
body.number-touch-practice .number-app.touch-practice.force-mobile-piano .number-piano .key.black{height:61%!important;min-height:54px!important}
body.number-touch-practice .number-app.touch-practice .key.numbered-key .key-number{bottom:12%!important;width:clamp(24px,4.3vh,34px)!important;height:clamp(24px,4.3vh,34px)!important;font-size:clamp(12px,2.3vh,18px)!important}
body.number-touch-practice .number-app.touch-practice .key.black.numbered-key .key-number{bottom:10%!important;width:clamp(20px,3.6vh,29px)!important;height:clamp(20px,3.6vh,29px)!important;font-size:clamp(10px,2vh,15px)!important}

/* Wide tablets, including Samsung/iPad desktop-view widths above 1400px. */
@media (orientation:landscape){
 body.number-touch-practice .number-app.touch-practice .number-stage{grid-template-rows:34px 54px 38px minmax(0,1fr)!important}
 body.number-touch-practice .number-app.touch-practice .number-piano-focus{min-height:180px!important}
}
/* Portrait remains one screen; only the piano itself may pan horizontally. */
@media (orientation:portrait){
 body.number-touch-practice .number-app.touch-practice{height:calc(100dvh - 4px)!important;max-height:calc(100dvh - 4px)!important}
 body.number-touch-practice .number-app.touch-practice .number-topbar{height:34px!important;max-height:34px!important}
 body.number-touch-practice .number-app.touch-practice .number-stage{grid-template-rows:auto 52px 35px minmax(0,1fr)!important}
 body.number-touch-practice .number-app.touch-practice .practice-quickbar{grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:'pick actions' 'mode mode'!important;gap:2px!important}
 body.number-touch-practice .number-app.touch-practice .practice-phrase-picker{grid-area:pick!important}
 body.number-touch-practice .number-app.touch-practice .number-mode-switch{grid-area:mode!important;justify-self:center!important}
 body.number-touch-practice .number-app.touch-practice .practice-quick-actions{grid-area:actions!important}
 body.number-touch-practice .number-app.touch-practice .number-piano-focus{min-height:235px!important}
}
@media (orientation:landscape) and (max-height:520px){
 body.number-touch-practice .number-app.touch-practice .number-topbar{height:30px!important;min-height:30px!important;max-height:30px!important}
 body.number-touch-practice .number-app.touch-practice .number-stage{grid-template-rows:30px 42px 30px minmax(0,1fr)!important}
 body.number-touch-practice .number-app.touch-practice .number-now-row{min-height:42px!important;max-height:42px!important}
 body.number-touch-practice .number-app.touch-practice .number-now,
 body.number-touch-practice .number-app.touch-practice .number-next{min-height:42px!important}
 body.number-touch-practice .number-app.touch-practice .number-sequence{min-height:30px!important;max-height:30px!important}
 body.number-touch-practice .number-app.touch-practice .number-token{height:27px!important;min-width:34px!important}
 body.number-touch-practice .number-app.touch-practice .number-piano-focus{min-height:145px!important}
}

/* ===== V69 PRO MUSIC ACADEMY ===== */
:root{--v69-radius:22px;--v69-shadow:0 12px 36px rgba(16,38,74,.10)}
.mada-topbar{min-height:68px;padding:10px 18px;gap:12px;border-bottom:1px solid rgba(16,38,74,.08);backdrop-filter:saturate(1.15) blur(12px)}
.userpill.ui-header-compact{gap:8px;padding:6px 8px}.userpill.ui-header-compact .avatar{width:38px;height:38px}.userpill.ui-header-compact .user-meta small{font-size:11px}.logout-icon{min-width:44px}
.layout-header-options{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.layout-header-options .choice{min-width:210px;flex:1}
.theory-hero,.chordlab-hero{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:30px;border-radius:28px;background:linear-gradient(120deg,#e9fbff,#fff5d9 48%,#ffeaf5);box-shadow:var(--v69-shadow);margin-bottom:20px}.theory-hero h1,.chordlab-hero h1{font-size:clamp(28px,4vw,46px);margin:8px 0}.theory-hero p,.chordlab-hero p{max-width:880px;line-height:1.9}.theory-hero-notes,.chordlab-icon{font-size:clamp(34px,6vw,72px);white-space:nowrap;opacity:.86}.theory-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:16px}.theory-card{appearance:none;border:1px solid rgba(17,75,96,.1);background:#fff;border-radius:24px;padding:22px;text-align:start;box-shadow:0 8px 24px rgba(31,74,95,.08);transition:.18s transform,.18s box-shadow}.theory-card:hover,.theory-card:focus-visible{transform:translateY(-3px);box-shadow:0 14px 30px rgba(31,74,95,.14)}.theory-card>span{font-size:38px}.theory-card h2{margin:9px 0 6px}.theory-card p{min-height:52px;color:#5c7180;line-height:1.55}.theory-card b{color:var(--primary)}.theory-head{display:flex;gap:16px;align-items:flex-start;margin-bottom:16px}.theory-head>div{flex:1}.theory-lesson-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:12px 0 16px}.theory-lesson-strip>div{background:#fff;border-radius:18px;padding:14px;border:1px solid rgba(16,38,74,.08)}.theory-lesson-strip b,.theory-lesson-strip span{display:block}.theory-lesson-strip span{color:#617581;margin-top:5px}.theory-exercise{max-width:900px;margin-inline:auto}.theory-progress{display:flex;justify-content:space-between;align-items:center}.theory-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-top:18px}.theory-choices button{min-height:68px;font-size:17px}.theory-choices button.correct{outline:3px solid #31b76a;background:#eafff1}.theory-choices button.wrong{outline:3px solid #e65b5b;background:#fff0f0}.theory-msg{min-height:26px;font-weight:700}
.chordlab-input,.chordlab-results{border-radius:24px}.chordlab-input-grid{display:grid;grid-template-columns:2fr 1fr;gap:14px}.chordlab-record{align-items:center}.chordlab-input audio{display:block;width:100%;margin:14px 0}.analysis-progress{height:8px;background:#edf2f7;border-radius:999px;overflow:hidden;margin-top:12px}.analysis-progress i{display:block;height:100%;width:0;background:linear-gradient(90deg,#13a3ad,#7c58dd,#ff5f8f);transition:width .15s}.chord-timeline{display:flex;gap:8px;overflow-x:auto;padding:14px 2px 18px;scroll-snap-type:x proximity}.chord-segment{flex:0 0 var(--w);min-width:76px;scroll-snap-align:start;background:linear-gradient(180deg,#f5fbff,#edf3ff);border:1px solid #dce6ef;border-radius:16px;padding:9px;text-align:center}.chord-segment small{display:block;color:#6c7e8d;font-size:11px}.chord-segment button{width:100%;margin-top:7px;font-size:20px;font-weight:900;background:#fff;color:#172c38;border:1px solid #cddbe7}.chord-disclaimer{margin-top:8px}
.instrument-lab-hero{border-radius:28px!important;box-shadow:var(--v69-shadow)!important;background:linear-gradient(125deg,#e8fbff,#fff8e4,#f7ecff)!important}.instrument-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important}.instrument-card{border-radius:24px!important;min-height:220px!important;box-shadow:0 10px 28px rgba(24,60,82,.09)!important}.instrument-card>span{font-size:44px!important}.instrument-stage{border-radius:26px!important}.realistic-drum-kit{position:relative;min-height:480px;max-width:920px;margin:auto;background:radial-gradient(circle at 50% 70%,#dfe9ef 0,#c7d6de 24%,#9eb4c0 25%,#f8fbfd 45%,#eef5f8 70%);border-radius:48% 48% 28% 28%;padding:28px}.realistic-drum-kit .drum-piece{position:absolute;display:flex;flex-direction:column;align-items:center;justify-content:center;border:7px solid #263642;background:radial-gradient(circle,#fdfefe 0,#d8e8ef 68%,#9db1bc 70%);color:#182b38;box-shadow:0 9px 18px rgba(0,0,0,.18),inset 0 0 0 5px rgba(255,255,255,.8);border-radius:50%;touch-action:manipulation}.realistic-drum-kit .drum-piece span{font-size:30px}.realistic-drum-kit .drum-piece b{font-size:12px}.realistic-drum-kit .drum-piece-kick{width:180px;height:180px;left:50%;bottom:18px;transform:translateX(-50%);background:radial-gradient(circle,#fff 0,#dce8ec 58%,#1d2d38 60%,#14202a 100%);color:#fff}.realistic-drum-kit .drum-piece-snare{width:130px;height:130px;left:29%;bottom:130px}.realistic-drum-kit .drum-piece-tom{width:118px;height:118px;left:43%;top:100px}.realistic-drum-kit .drum-piece-floor{width:145px;height:145px;right:18%;bottom:100px}.realistic-drum-kit .drum-piece-hat{width:150px;height:70px;left:8%;top:105px;border-radius:50%;background:radial-gradient(ellipse,#ffeaa8,#c49a3a)}.realistic-drum-kit .drum-piece-crash{width:190px;height:82px;right:5%;top:22px;border-radius:50%;background:radial-gradient(ellipse,#fff1a6,#c49a3a)}.realistic-drum-kit .drum-piece-ride{width:180px;height:78px;left:5%;top:5px;border-radius:50%;background:radial-gradient(ellipse,#fff0a8,#c8a043)}.realistic-drum-kit .drum-piece.hit{transform:scale(.94)}.realistic-drum-kit .drum-piece-kick.hit{transform:translateX(-50%) scale(.96)}
.mallet-stage{overflow-x:auto}.mallet-bars{display:flex;align-items:flex-end;gap:8px;min-width:680px;padding:24px 14px}.mallet-bars button{flex:1;height:var(--h);min-height:180px;border:0;border-radius:12px 12px 18px 18px;box-shadow:0 8px 16px rgba(0,0,0,.12);display:flex;flex-direction:column;justify-content:flex-end;align-items:center;padding:14px 4px;color:#132f3f;background:hsl(calc(var(--i)*28deg),72%,62%);touch-action:manipulation}.mallet-bars.glockenspiel button{background:linear-gradient(90deg,#d8e0e5,#f9fbfc 40%,#aeb9c2 60%,#e9eef1);color:#152631;border:1px solid #9eabb4}.mallet-bars button.playing{transform:translateY(4px);filter:brightness(1.14)}
/* refined responsive shell */
@media (max-width:1100px),(pointer:coarse){.mada-topbar{min-height:58px;padding:7px 9px}.userpill{gap:5px}.userpill .avatar{width:34px;height:34px}.userpill .secondary.small{min-height:38px;padding:7px 10px}.global-search-wrap{min-width:0;flex:1}.global-search-wrap input{height:42px}.site-footer{padding-bottom:max(18px,env(safe-area-inset-bottom))}.theory-hero,.chordlab-hero{padding:20px}.theory-hero-notes,.chordlab-icon{font-size:42px}.instrument-page-head{gap:8px}.realistic-drum-kit{min-height:390px;transform-origin:top center}.chordlab-input-grid{grid-template-columns:1fr}}
@media (max-width:720px){.theory-hero,.chordlab-hero{display:block}.theory-hero-notes,.chordlab-icon{margin-top:10px}.theory-grid{grid-template-columns:1fr 1fr}.theory-card{padding:15px;min-height:180px}.theory-card p{min-height:0}.theory-lesson-strip{grid-template-columns:1fr}.theory-head{display:block}.theory-head button{margin-bottom:10px}.realistic-drum-kit{min-height:340px;transform:scale(.9);margin-bottom:-30px}.mallet-bars{min-width:560px}.user-meta{display:none}.logout-icon{font-size:22px}.chordlab-hero h1,.theory-hero h1{font-size:30px}}
@media (max-width:440px){.theory-grid{grid-template-columns:1fr}.global-search-wrap{display:none!important}.realistic-drum-kit{transform:scale(.78);margin-inline:-40px;margin-bottom:-90px}.chordlab-input .toolbar{display:grid;grid-template-columns:1fr 1fr}.chordlab-record span{grid-column:1/-1}}
@media (max-width:900px),(pointer:coarse){#texteditquick{display:none!important}.mada-topbar .userpill{margin-inline-start:auto}.mada-topbar .language-toggle{padding-inline:9px}.mada-topbar .logout-icon{width:42px;min-width:42px;padding:6px!important}.mada-topbar .topbar-mobile-brand .brand-copy{display:none}}
.pro-sequencer{overflow-x:auto}.pro-sequencer .seq-row{display:grid;grid-template-columns:minmax(110px,150px) repeat(20,minmax(34px,1fr));gap:5px;align-items:center;min-width:900px;margin:6px 0}.pro-sequencer .seq-row>button:not(.seq-mute){aspect-ratio:1;border-radius:8px;padding:0;font-size:11px;background:#edf3f6;color:#547080}.pro-sequencer .seq-row>button.on{background:linear-gradient(145deg,#10a6af,#6a55db);color:#fff;box-shadow:0 0 0 2px rgba(20,150,160,.18)}.pro-sequencer .seq-row>button.playhead{outline:3px solid #ffbf31;outline-offset:1px}.pro-sequencer .seq-mute{position:sticky;inset-inline-start:0;z-index:2;text-align:start;background:#fff;color:#173245;border:1px solid #dbe5ea}.pro-sequencer .seq-mute[aria-pressed=true]{background:#ffe9e9;color:#9b3434}.drum-machine-toolbar{align-items:end}

/* V71 realistic child drum kit */
.real-drum-page{padding:18px!important;background:linear-gradient(180deg,#ffffff,#f5fbff)!important}
.real-drum-toolbar{justify-content:center;gap:14px 22px;padding:12px 14px;margin:0 auto 12px;max-width:760px;border:1px solid #dbe8ef;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(31,68,90,.07)}
.real-drum-toolbar strong{font-weight:900;color:#18384f;font-size:16px}
.drum-ready{display:inline-flex;align-items:center;gap:6px;padding:8px 12px;border-radius:999px;background:#fff7d8;color:#755b00;font-weight:800;font-size:13px;white-space:nowrap}
.drum-ready.ready{background:#e7f9ee;color:#13713a}
.image-drum-kit{position:relative;width:min(100%,1100px);aspect-ratio:4/3;margin:0 auto;overflow:hidden;border-radius:24px;background:#fff;box-shadow:0 14px 38px rgba(22,54,75,.12);touch-action:none;user-select:none;-webkit-user-select:none}
.image-drum-kit>img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;-webkit-user-drag:none;user-select:none}
.drum-hotspot{position:absolute!important;left:var(--x)!important;top:var(--y)!important;width:var(--w)!important;height:var(--h)!important;min-width:0!important;min-height:0!important;padding:0!important;transform:translate(-50%,-50%);border-radius:50%!important;border:2px solid transparent!important;background:transparent!important;box-shadow:none!important;z-index:3;touch-action:none!important;cursor:pointer;overflow:visible}
.drum-hotspot-kick{z-index:2}
.drum-hotspot:hover,.drum-hotspot:focus-visible{border-color:transparent!important;background:transparent!important;outline:none!important}
.drum-hotspot.hit{transform:translate(-50%,-50%) scale(.98);border-color:transparent!important;background:transparent!important;box-shadow:none!important}
.drum-hotspot-crash.hit,.drum-hotspot-ride.hit,.drum-hotspot-hat.hit{animation:none}
@keyframes mada-cymbal-hit{0%{transform:translate(-50%,-50%) rotate(0) scale(1)}45%{transform:translate(-50%,-50%) rotate(2deg) scale(.96)}100%{transform:translate(-50%,-50%) rotate(-1deg) scale(1)}}
.drum-help{max-width:1100px;margin:10px auto 0;text-align:center;color:#4e6877;font-weight:700;font-size:14px}
@media(max-width:900px){.real-drum-page{padding:10px!important}.real-drum-toolbar{gap:10px;padding:10px}.image-drum-kit{border-radius:18px}}
@media(max-width:600px){.real-drum-toolbar{display:grid;grid-template-columns:1fr;justify-items:center}.drum-help{font-size:12px}.image-drum-kit{width:100%;box-shadow:0 8px 24px rgba(22,54,75,.1)}}
@media(orientation:landscape) and (max-height:620px){.instrument-page-head{margin-bottom:6px!important}.instrument-page-head p{display:none}.real-drum-toolbar{margin-bottom:6px;padding:6px 10px}.image-drum-kit{width:min(76vw,920px);max-height:calc(100vh - 150px)}.drum-help{display:none}}


/* ===== V73 KIDS HOME — cleaner, brighter, easier ===== */
body[data-mada-page="home"] .global-page-back,
body[data-mada-page="home"] #mobile-simple-back{display:none!important}

.v73-kids-hero{position:relative!important;min-height:360px!important;height:auto!important;max-height:none!important;padding:22px 24px!important;border-radius:34px!important;background:
 radial-gradient(circle at 12% 18%,#fff8 0 2%,transparent 2.4%),
 radial-gradient(circle at 88% 22%,#fff9 0 2.2%,transparent 2.6%),
 radial-gradient(circle at 50% 44%,#fff 0 18%,#fff9dc 33%,transparent 55%),
 linear-gradient(135deg,#7bd9ff 0%,#c9f3ff 26%,#fff 51%,#ffe0f1 76%,#ffd16f 100%)!important;
 box-shadow:0 18px 45px #174f7e20!important;border:2px solid #fff!important;overflow:hidden!important}
.v73-kids-hero:before{content:'★   ♪   ♫   ●   ★   ♬';position:absolute;inset:14px 4% auto!important;color:#fff!important;font-size:24px!important;letter-spacing:14px!important;opacity:.82!important;text-align:center!important;pointer-events:none}
.v73-kids-hero:after{content:'';position:absolute!important;inset:auto -8% -90px!important;height:165px!important;border-radius:50%!important;background:#ffffff80!important;filter:none!important;pointer-events:none}
.v73-kids-hero .hero-side{height:auto!important;min-height:295px;align-items:center!important;position:relative;z-index:2}
.v73-kids-hero .hero-art-card{position:relative;width:min(100%,300px);aspect-ratio:1/.92;border-radius:30px;background:#ffffffb8;border:2px solid #fff;box-shadow:0 14px 30px #1b52731a;display:grid;place-items:center;overflow:hidden;transform:rotate(-2deg)}
.v73-kids-hero .hero-side-drums .hero-art-card{transform:rotate(2deg)}
.v73-kids-hero .hero-art-card img{width:92%!important;height:92%!important;max-width:none!important;object-fit:contain!important;filter:drop-shadow(0 10px 10px #2e58731f)}
.v73-kids-hero .hero-art-card i{position:absolute;top:13px;inset-inline-end:13px;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#ff9b00;font-style:normal;font-size:22px;box-shadow:0 5px 12px #0001}
.v73-kids-hero .hero-center{padding:16px 10px 28px!important;align-self:center!important}
.v73-kids-hero .hero-greeting{font-size:13px!important;background:#fff!important;border:1px solid #ffffff!important;box-shadow:0 5px 14px #173b6712;color:#1b5782!important}
.v73-kids-hero .hero-logo{max-height:100px!important;margin-bottom:5px!important}
.v73-kids-hero h1{font-size:clamp(26px,2.6vw,38px)!important;line-height:1.35!important;color:#126ba6!important;margin:4px 0 7px!important;text-shadow:0 2px 0 #fff}
.v73-kids-hero p{font-size:15px!important;line-height:1.7!important;color:#405e75!important;margin:0 auto 15px!important;max-width:650px!important}
.v73-main-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;max-width:590px!important;margin:auto!important}
.v73-main-actions button{display:grid!important;grid-template-columns:48px 1fr!important;grid-template-rows:auto auto!important;align-items:center!important;text-align:start!important;gap:0 9px!important;min-height:74px!important;padding:11px 13px!important;border-radius:20px!important;background:#fffffff2!important;color:#173b67!important;border:1px solid #fff!important;box-shadow:0 9px 20px #173b6715!important;transition:transform .16s ease,box-shadow .16s ease!important}
.v73-main-actions button:nth-child(1){border-bottom:5px solid #3cbf7a!important}.v73-main-actions button:nth-child(2){border-bottom:5px solid #ff7aa8!important}.v73-main-actions button:nth-child(3){border-bottom:5px solid #6f8dff!important}.v73-main-actions button:nth-child(4){border-bottom:5px solid #ffc846!important}
.v73-main-actions button:hover{transform:translateY(-4px) scale(1.015);box-shadow:0 14px 26px #173b6720!important}
.v73-main-actions button>span{grid-row:1/3;font-size:34px;display:grid;place-items:center;width:48px;height:48px;border-radius:16px;background:#f7fbff}
.v73-main-actions button>b{font-size:15px;line-height:1.35}.v73-main-actions button>small{font-size:10px;color:#71849a;line-height:1.35}

.v73-quick-section{margin-top:18px!important;padding:18px;border-radius:30px;background:linear-gradient(180deg,#ffffffb8,#ffffff6e);border:1px solid #eaf0f6}
.v73-quick-section .section-heading{align-items:center!important;margin-bottom:15px!important}.v73-quick-section .section-heading h2{font-size:clamp(24px,2.2vw,32px)!important;color:#15395e!important;margin:3px 0!important}.v73-quick-section .section-heading p{font-size:13px;margin:0!important}.v73-quick-section .eyebrow{color:#e23982!important;font-size:13px!important}
.v73-quick-section .welcome-badges span{background:#fff!important;box-shadow:0 5px 13px #1b4e7610!important;border:1px solid #e7edf4!important}
#main .v73-kid-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:13px!important}
.v73-kid-grid .mada-module{position:relative;min-height:190px!important;border-radius:28px!important;padding:20px 16px 17px!important;overflow:hidden!important;box-shadow:0 12px 26px #173b6712!important;border:2px solid #fff!important;text-align:center!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:5px!important}
.v73-kid-grid .mada-module:before{content:'';position:absolute;width:92px;height:92px;border-radius:50%;top:-35px;inset-inline-end:-27px;background:#fff8}
.v73-kid-grid .mada-module:after{content:'✦';position:absolute;bottom:8px;inset-inline-start:12px;color:#fff;font-size:22px;opacity:.8}
.v73-kid-grid .mada-module .v73-card-icon{position:relative;z-index:1;width:70px;height:70px;border-radius:23px;display:grid;place-items:center;background:#fff;box-shadow:0 8px 18px #173b6713;font-size:40px!important;margin-bottom:3px}
.v73-kid-grid .mada-module b{position:relative;z-index:1;font-size:18px!important;color:#17395c!important}
.v73-kid-grid .mada-module small{position:relative;z-index:1;font-size:12px!important;color:#61758b!important;min-height:22px}
.v73-kid-grid .mada-module em{position:relative;z-index:1;font-style:normal;font-size:11px;font-weight:900;color:#245d82;background:#ffffffb8;padding:5px 10px;border-radius:999px;margin-top:4px}
.v73-kid-grid .mada-module.rhythm{background:linear-gradient(145deg,#fff8d6,#ffe29a)!important}.v73-kid-grid .mada-module.notes{background:linear-gradient(145deg,#dff6ff,#bdeaff)!important}.v73-kid-grid .mada-module.ear{background:linear-gradient(145deg,#ffe7f2,#ffcde1)!important}.v73-kid-grid .mada-module.color{background:linear-gradient(145deg,#e3fae7,#c5f0d0)!important}.v73-kid-grid .mada-module.competition{background:linear-gradient(145deg,#eeeaff,#d8d0ff)!important}.v73-kid-grid .mada-module.maqam{background:linear-gradient(145deg,#fff0dd,#ffd6b3)!important}
.v73-kid-grid .mada-module:hover{transform:translateY(-6px) rotate(.2deg)!important;box-shadow:0 18px 32px #173b671c!important}

/* Cleaner top bar on the child-facing home */
body[data-mada-page="home"] .mada-topbar{box-shadow:0 5px 18px #143d6410;border-bottom-color:#eaf0f5!important}
body[data-mada-page="home"] .global-search-wrap{max-width:560px!important}

@media(max-width:1100px){#main .v73-kid-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}.v73-kids-hero{grid-template-columns:.82fr 1.55fr .82fr!important}.v73-kids-hero .hero-art-card{width:min(100%,235px)}.v73-kids-hero .hero-side{min-height:265px}.v73-main-actions button{min-height:70px}}
@media(max-width:820px){.v73-kids-hero{display:block!important;padding:16px!important}.v73-kids-hero .hero-side{display:none!important}.v73-kids-hero .hero-center{padding:6px 5px 12px!important}.v73-kids-hero h1{font-size:27px!important}.v73-kids-hero p{font-size:13px!important}.v73-main-actions{max-width:620px!important}.v73-quick-section{padding:13px!important}#main .v73-kid-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}.v73-kid-grid .mada-module{min-height:165px!important}.v73-kid-grid .mada-module .v73-card-icon{width:60px;height:60px;font-size:34px!important}}
@media(max-width:520px){.v73-kids-hero{border-radius:24px!important}.v73-kids-hero .hero-logo{max-height:82px!important}.v73-kids-hero h1{font-size:23px!important}.v73-main-actions{grid-template-columns:1fr 1fr!important;gap:7px!important}.v73-main-actions button{grid-template-columns:38px 1fr!important;min-height:67px!important;padding:8px 9px!important;border-radius:16px!important}.v73-main-actions button>span{width:38px;height:38px;font-size:27px;border-radius:12px}.v73-main-actions button>b{font-size:12px}.v73-main-actions button>small{font-size:8px}.v73-quick-section .section-heading{display:flex!important;align-items:flex-start!important}.v73-quick-section .welcome-badges{display:flex!important}#main .v73-kid-grid{grid-template-columns:1fr 1fr!important;gap:9px!important}.v73-kid-grid .mada-module{min-height:145px!important;border-radius:22px!important;padding:13px 9px!important}.v73-kid-grid .mada-module .v73-card-icon{width:52px;height:52px;font-size:30px!important;border-radius:17px}.v73-kid-grid .mada-module b{font-size:14px!important}.v73-kid-grid .mada-module small{font-size:10px!important}.v73-kid-grid .mada-module em{font-size:9px;padding:4px 7px}}
@media(max-width:360px){#main .v73-kid-grid{grid-template-columns:1fr!important}.v73-main-actions{grid-template-columns:1fr!important}}

/* ===== V74 MIDI AUTO ACCOMPANIMENT ===== */
.v73-kid-grid .midi-auto-home{background:linear-gradient(145deg,#e6f4ff,#c8dcff)!important}
.midi-auto-hero{position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1fr) 220px;align-items:center;gap:18px;padding:26px 28px;margin-bottom:18px;border-radius:30px;background:linear-gradient(135deg,#e8f5ff,#f7eeff 55%,#fff0d5);border:1px solid #dbe8f4;box-shadow:0 14px 34px #173b6710}
.midi-auto-hero:before{content:'MIDI  •  AUTO BAND  •  STYLE  •  CHORD';position:absolute;inset:10px auto auto 20px;font-size:10px;letter-spacing:.16em;font-weight:900;color:#306a9a25;direction:ltr}
.midi-auto-hero h1{margin:5px 0 7px;color:#183c68;font-size:clamp(27px,3vw,42px);line-height:1.28}.midi-auto-hero p{max-width:800px;color:#526b84;margin:0;line-height:1.8}.midi-hero-badges{display:flex;gap:7px;flex-wrap:wrap;margin-top:15px}.midi-hero-badges span{padding:6px 10px;border-radius:999px;background:#ffffffc9;border:1px solid #dce7f2;font-size:11px;font-weight:900;color:#31597c}.midi-hero-device{position:relative;z-index:2;width:190px;height:145px;margin:auto;border-radius:28px;background:linear-gradient(145deg,#1d3150,#0e1727);box-shadow:0 16px 28px #10284730;display:grid;place-items:center;font-size:76px;color:white}.midi-hero-device:after{content:'';position:absolute;left:16px;right:16px;bottom:29px;height:20px;border-radius:6px;background:repeating-linear-gradient(90deg,#fff 0 9px,#182237 9px 12px)}.midi-hero-device small{position:absolute;bottom:6px;color:#b9c9dc;font-size:9px;letter-spacing:.14em;direction:ltr}
.midi-auto-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(290px,.75fr);gap:16px;align-items:start}.midi-auto-main,.midi-auto-side{display:grid;gap:14px}.midi-auto-layout .panel{margin:0;border-radius:24px;box-shadow:0 8px 24px #173b670b}.midi-panel-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.midi-panel-head h2{margin:2px 0;font-size:21px}.midi-panel-head .eyebrow{font-size:11px}.midi-status{padding:10px 12px;border-radius:13px;background:#f1f7fb;color:#416079;font-size:12px;margin:0 0 12px}.midi-device-grid,.midi-controls-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.midi-controls-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.midi-device-grid label,.midi-controls-grid label,.midi-channel-grid label{margin:0;font-size:11px;color:#556d82}.midi-device-grid select,.midi-controls-grid select,.midi-channel-grid select{margin-top:4px;background:#fbfdff}.midi-live-readout{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px}.midi-live-readout span{padding:7px 10px;border-radius:12px;background:#f9fbfd;border:1px solid #e2ebf3;font-size:11px}.midi-live-readout b{color:#286ea1}.midi-now{padding:7px 11px;border-radius:14px;background:#163b67;color:#fff;font-size:11px}.midi-now b{font-size:21px;margin-inline-start:5px;color:#ffd464}.midi-tempo-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;margin-top:12px}.midi-tempo-row label{margin:0;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px}.midi-tempo-row input{margin:0}.midi-tempo-row output{min-width:38px;text-align:center;font-weight:1000;color:#245e8f}.midi-parts{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px}.midi-parts label{display:flex;align-items:center;gap:5px;margin:0;padding:7px 10px;border-radius:12px;background:#f2f7fb;border:1px solid #e1eaf2;font-size:11px}.midi-parts input,.midi-check input{width:18px;min-height:18px;margin:0}.midi-progression{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;direction:ltr}.midi-progression button{position:relative;display:grid;place-items:center;min-height:84px;padding:8px;background:#f4f8fc;color:#173b67;border:2px solid #e0e9f2;border-radius:18px}.midi-progression button small{font-size:9px;color:#708397}.midi-progression button b{font-size:27px}.midi-progression button.active{background:linear-gradient(145deg,#fff0b8,#ffd665);border-color:#f1b72d;transform:translateY(-2px);box-shadow:0 8px 18px #d79e2528}.midi-progression button.manual:after{content:'●';position:absolute;top:5px;right:8px;color:#347eb6;font-size:9px}.midi-chord-palette{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px;direction:ltr}.midi-chord-palette button{min-width:48px;padding:7px 10px;background:#edf4fa;color:#24557c}.midi-transport{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;margin-top:13px}.midi-start{min-height:54px;font-size:16px;background:linear-gradient(135deg,#16805f,#2ebd78)!important;box-shadow:0 8px 18px #16805f22}.midi-start.stop{background:linear-gradient(135deg,#b72c42,#df4960)!important}.midi-yamaha-card{background:linear-gradient(155deg,#fff,#eef5ff)!important}.midi-yamaha-card ol{padding-inline-start:22px;color:#53697e;font-size:12px;line-height:1.8}.midi-yamaha-card li{margin-bottom:6px}.midi-check{display:flex;align-items:center;gap:7px;padding:9px;border-radius:12px;background:#fff8dc;border:1px solid #f0df9f;font-size:11px!important}.midi-channel-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.midi-style-file p,.midi-compat p,.midi-compat small{font-size:11px;color:#617489;line-height:1.7}.midi-file-drop{display:flex!important;align-items:center;justify-content:center;min-height:56px;border:2px dashed #9bbbd3;border-radius:15px;background:#f4f9fc;color:#285f89;cursor:pointer}.midi-file-drop input{display:none}.midi-file-name{margin-top:8px;padding:7px 9px;border-radius:10px;background:#f6f8fa;font-size:10px;direction:ltr;text-align:center;color:#65798b;overflow:hidden;text-overflow:ellipsis}.midi-compat{border-top:5px solid #42b883!important}
@media(max-width:1080px){.midi-auto-layout{grid-template-columns:1fr}.midi-auto-side{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}.midi-controls-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.midi-auto-hero{grid-template-columns:1fr;padding:20px}.midi-hero-device{display:none}.midi-auto-side{grid-template-columns:1fr}.midi-device-grid,.midi-controls-grid{grid-template-columns:1fr 1fr}.midi-progression{grid-template-columns:repeat(4,minmax(70px,1fr));overflow-x:auto}.midi-panel-head{align-items:flex-start;flex-direction:column}.midi-panel-head>button{width:100%}.midi-tempo-row{grid-template-columns:1fr}.midi-tempo-row>button{width:100%}.midi-transport{grid-template-columns:1fr 100px}.midi-auto-layout .panel{padding:16px}}
@media(max-width:480px){.midi-auto-hero{border-radius:22px;padding:17px}.midi-auto-hero h1{font-size:24px}.midi-hero-badges span:nth-child(3){display:none}.midi-device-grid,.midi-controls-grid{grid-template-columns:1fr}.midi-progression{grid-template-columns:repeat(4,78px);margin-inline:-4px;padding:3px 4px}.midi-progression button{min-height:74px}.midi-progression button b{font-size:22px}.midi-chord-palette{display:grid;grid-template-columns:repeat(5,1fr)}.midi-chord-palette button{min-width:0;padding:7px 3px}.midi-live-readout{display:grid;grid-template-columns:1fr}.midi-transport{grid-template-columns:1fr}.midi-transport button{width:100%}}

/* ===== V75 AUTO ARRANGER PRO: MIDI/AUDIO IMPORT + REAL SAMPLE MIXER ===== */
.midi-import-card{position:relative;overflow:hidden;margin-bottom:16px!important;background:linear-gradient(145deg,#ffffff,#f2f8ff)!important;border:1px solid #d8e8f6!important}
.midi-import-card:before{content:'AUDIO → ANALYZE → ARRANGE → MIDI';position:absolute;inset:12px auto auto 18px;direction:ltr;font-size:9px;font-weight:1000;letter-spacing:.14em;color:#3174a91d;pointer-events:none}
.midi-big-drop{display:grid!important;place-items:center;text-align:center;gap:4px;min-height:150px;margin:0!important;padding:22px;border:2px dashed #84afd0;border-radius:22px;background:linear-gradient(145deg,#f7fbff,#edf6ff);cursor:pointer;color:#234f75;transition:.18s ease}
.midi-big-drop:hover{transform:translateY(-2px);border-color:#287db7;background:#eef8ff}.midi-big-drop>span{font-size:40px}.midi-big-drop>b{font-size:16px}.midi-big-drop>small{font-size:11px;color:#6b8398;direction:ltr}.midi-big-drop input{display:none}
.midi-import-status{margin-top:10px;padding:10px 12px;border-radius:13px;background:#f4f7fa;color:#526b80;font-size:12px;font-weight:800}.midi-import-card audio{display:block;width:100%;max-width:none;margin-top:10px}.midi-import-card audio[hidden]{display:none!important}
.midi-import-result{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;margin-top:10px}.midi-import-result:empty{display:none}.midi-import-result>div{display:grid;gap:1px;padding:10px 11px;border-radius:14px;background:#fff;border:1px solid #dfeaf3}.midi-import-result small{font-size:9px;color:#6c8193}.midi-import-result b{font-size:18px;color:#204f77;direction:ltr}
.midi-import-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px}.midi-import-actions>span{flex:1;min-width:220px;font-size:10px;line-height:1.7;color:#6a7c8c}.midi-import-actions button:disabled{opacity:.45}
.midi-mixer{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:12px;padding:11px;border-radius:17px;background:#f6f9fc;border:1px solid #e1eaf2}.midi-mixer label{display:grid;grid-template-columns:auto minmax(80px,1fr) auto;align-items:center;gap:7px;margin:0;font-size:11px;color:#38566f}.midi-mixer input{min-width:0;margin:0}.midi-mixer output{font-size:10px;min-width:32px;text-align:center;font-weight:900;color:#286b9e}
.midi-compat strong{color:#1b6e58}.midi-auto-layout .midi-style-card{background:linear-gradient(160deg,#fff,#fbfdff)!important}
@media(max-width:860px){.midi-import-result{grid-template-columns:repeat(3,minmax(0,1fr))}.midi-mixer{grid-template-columns:1fr}.midi-mixer label{grid-template-columns:90px minmax(0,1fr) 42px}}
@media(max-width:520px){.midi-big-drop{min-height:125px;padding:16px}.midi-big-drop>span{font-size:34px}.midi-import-result{grid-template-columns:1fr 1fr}.midi-import-result b{font-size:16px}.midi-import-actions{display:grid}.midi-import-actions>span{min-width:0}.midi-import-actions button{width:100%}}

/* ===== V76 SMART ARRANGER CREATIVE PERFORMANCE TOOLS ===== */
.midi-head-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.midi-head-actions button{min-height:42px}.midi-panic-mini{background:#fff0f2!important;color:#a71f35!important;border:1px solid #f1c3cb!important}.midi-smart-arranger{margin-top:14px;padding:14px;border-radius:20px;background:linear-gradient(145deg,#fff8e8,#f2f8ff 58%,#f6efff);border:1px solid #e5e5ee}.midi-smart-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px}.midi-smart-title h3{font-size:16px;margin:2px 0}.midi-smart-title>b{max-width:310px;padding:7px 10px;border-radius:12px;background:#fff;border:1px solid #e5e8ee;color:#3c627f;font-size:10px;text-align:center}.midi-moods{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}.midi-moods button{min-height:50px;padding:7px 5px;background:#fff!important;color:#244d71!important;border:1px solid #dce7ef!important;box-shadow:0 5px 12px #173b670b!important}.midi-moods button:hover{transform:translateY(-2px)}.midi-variation-row{display:flex;align-items:center;gap:7px;margin-top:10px;padding:8px 10px;border-radius:15px;background:#ffffffb8;border:1px solid #e4e9ee}.midi-variation-row>span{font-size:11px;font-weight:900;color:#597083;margin-inline-end:5px}.midi-variation-row button{width:44px;height:40px;padding:0;background:#edf3f8!important;color:#315a7d!important;border:1px solid #d8e2ea!important}.midi-variation-row button.active{background:linear-gradient(135deg,#295f91,#487fb0)!important;color:#fff!important;border-color:#295f91!important;box-shadow:0 6px 14px #295f9130!important}.midi-smart-checks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:10px}.midi-smart-checks label{display:flex;align-items:center;gap:7px;margin:0;padding:9px 10px;border-radius:13px;background:#fff;border:1px solid #e1e8ee;font-size:10px;color:#3f5f79}.midi-smart-checks input{width:18px;min-height:18px;margin:0}.midi-progression-tools{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:10px}.midi-progression-tools button{padding:7px 10px;font-size:11px}.midi-live-sections{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin-top:12px}.midi-live-sections button{min-height:48px;background:linear-gradient(145deg,#f4efff,#e8f3ff)!important;color:#284f75!important;border:1px solid #d8e2f0!important}.midi-live-sections button:nth-child(2){background:linear-gradient(145deg,#fff6d7,#ffe9a5)!important;color:#775a10!important}.midi-live-sections button:nth-child(4){background:linear-gradient(145deg,#fff0f2,#ffdfe4)!important;color:#9b3142!important}.midi-transport-v76{grid-template-columns:minmax(170px,1fr) auto auto auto}.midi-panic{background:linear-gradient(135deg,#9f1730,#df3f58)!important;color:#fff!important;box-shadow:0 8px 18px #b72c4230!important}.midi-download{background:linear-gradient(135deg,#176f9e,#2b9ccb)!important;color:#fff!important;box-shadow:0 8px 18px #176f9e24!important}.midi-project-card{background:linear-gradient(150deg,#fffdf6,#eef8ff)!important;border-top:5px solid #f3c44e!important}.midi-project-card p{font-size:11px;line-height:1.7;color:#60758a}.midi-project-card>div{display:grid;grid-template-columns:1fr 1fr;gap:7px}.midi-project-card button{min-height:44px}.midi-auto-hero .midi-hero-badges span:nth-last-child(-n+2){background:#fff2f4;border-color:#f2cbd1;color:#8d3444}
@media(max-width:900px){.midi-moods{grid-template-columns:repeat(3,1fr)}.midi-smart-checks{grid-template-columns:1fr 1fr}.midi-transport-v76{grid-template-columns:1fr 1fr}.midi-head-actions{width:100%;justify-content:stretch}.midi-head-actions button{flex:1}}
@media(max-width:580px){.midi-smart-title{display:grid}.midi-smart-title>b{max-width:none}.midi-moods{grid-template-columns:1fr 1fr}.midi-smart-checks{grid-template-columns:1fr}.midi-live-sections{grid-template-columns:1fr 1fr}.midi-transport-v76{grid-template-columns:1fr}.midi-head-actions{display:grid;grid-template-columns:1fr}.midi-variation-row{justify-content:center;flex-wrap:wrap}.midi-progression-tools{display:grid;grid-template-columns:1fr 1fr}.midi-progression-tools button{min-height:42px}}

/* ===== V78 INTERACTIVE FOUNDATION + RHYTHM LAB ===== */
.foundation-path-hero.v78{position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(310px,.75fr);align-items:center;gap:22px;padding:30px;border-radius:34px;background:radial-gradient(circle at 82% 20%,rgba(255,255,255,.9) 0 9%,transparent 26%),linear-gradient(135deg,#e8f8ff 0%,#fff8d8 40%,#ffe9f5 72%,#eee9ff 100%);border:1px solid #ffffff;box-shadow:0 20px 48px rgba(40,82,132,.15)}
.foundation-path-hero.v78:before{content:'♪  ♫  ★  𝄞  ♩';position:absolute;top:12px;inset-inline:5% 5%;color:rgba(255,255,255,.9);font-size:30px;letter-spacing:26px;white-space:nowrap;pointer-events:none}.foundation-hero-copy{position:relative;z-index:2}.foundation-path-hero.v78 h1{margin:7px 0 8px;font-size:clamp(30px,4.8vw,54px);line-height:1.18;color:#154d78}.foundation-path-hero.v78 p{font-size:16px;max-width:760px;color:#4c6279;line-height:1.9}.foundation-hero-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:17px}.foundation-hero-actions button{min-height:50px;border-radius:16px}.foundation-hero-art-v78{height:245px;position:relative;display:grid;place-items:center}.foundation-hero-art-v78>strong{width:105px;height:105px;border-radius:32px;display:grid;place-items:center;font-size:50px;background:#fff;box-shadow:0 20px 40px rgba(69,73,157,.2);animation:v78Float 3.2s ease-in-out infinite}.foundation-hero-art-v78 .orbit{position:absolute;inset:50%;width:240px;height:240px;transform:translate(-50%,-50%);border:2px dashed rgba(111,88,188,.2);border-radius:50%;animation:v78Orbit 16s linear infinite}.foundation-hero-art-v78 .orbit-b{width:175px;height:175px;animation-duration:11s;animation-direction:reverse}.foundation-hero-art-v78 .orbit span{position:absolute;width:52px;height:52px;border-radius:17px;display:grid;place-items:center;background:#fff;font-size:25px;box-shadow:0 9px 22px rgba(35,57,93,.14)}.foundation-hero-art-v78 .orbit span:nth-child(1){left:50%;top:-26px;transform:translateX(-50%)}.foundation-hero-art-v78 .orbit span:nth-child(2){right:-26px;top:50%;transform:translateY(-50%)}.foundation-hero-art-v78 .orbit span:nth-child(3){left:20px;bottom:-10px}.foundation-progress-summary{max-width:520px}.foundation-path-grid{gap:12px}.foundation-path-card{position:relative;overflow:hidden;border-radius:21px!important;background:linear-gradient(145deg,#fff,#f7fbff)!important;border:1px solid #dfeaf4!important;box-shadow:0 8px 22px rgba(36,64,105,.08)!important;transition:.18s transform,.18s box-shadow,.18s border-color}.foundation-path-card:hover{transform:translateY(-4px);box-shadow:0 16px 30px rgba(36,64,105,.14)!important;border-color:#9dcaf0!important}.foundation-path-card>span{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(145deg,#eef8ff,#fff6dc);font-size:27px}.foundation-path-card.done:after{content:'✓';position:absolute;top:8px;inset-inline-end:8px;width:25px;height:25px;display:grid;place-items:center;border-radius:50%;background:#44bf7a;color:#fff;font-weight:900}.foundation-stage-head.v78{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:15px;padding:16px 18px;border-radius:22px;background:linear-gradient(135deg,#f6fbff,#fff7e2);border:1px solid #e4edf5;margin-bottom:16px}.foundation-stage-head.v78>span{width:64px;height:64px;border-radius:20px;display:grid;place-items:center;background:#fff;font-size:34px;box-shadow:0 8px 20px rgba(38,65,105,.1)}.foundation-stage-head.v78 h2{margin:2px 0 2px;font-size:clamp(22px,3vw,31px)}.foundation-step-flow{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:900;color:#65748b;white-space:nowrap}.foundation-step-flow i{font-style:normal;width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#5d3db2;border:1px solid #ded8f5}.foundation-step-flow b{color:#c3badd}
.micro-card{display:grid;grid-template-columns:130px minmax(0,1fr);gap:18px;align-items:center;max-width:850px;margin:0 auto 18px;padding:22px;border-radius:26px;background:linear-gradient(135deg,#fff,#f4faff);border:1px solid #dceaf5;box-shadow:0 12px 28px rgba(32,65,105,.08)}.micro-symbol{min-height:116px;border-radius:24px;display:grid;place-items:center;background:linear-gradient(145deg,#ffe9b8,#fff8e8);font-size:72px;color:#173b67}.micro-label{display:inline-flex;padding:5px 11px;border-radius:999px;background:#efe9ff;color:#664cb2;font-weight:1000;letter-spacing:.08em}.micro-card h3{margin:8px 0 4px;font-size:24px}.micro-card p{margin:0;color:var(--muted)}.rest-card .micro-symbol{background:#eaf5ff}.foundation-beat-dots{display:flex;justify-content:center;gap:12px;margin:16px 0}.foundation-beat-dots button{width:74px;height:74px;padding:0;border-radius:50%;background:#eef3fb;color:#27415f;font-size:24px;box-shadow:inset 0 0 0 4px #fff,0 7px 17px rgba(45,74,110,.08)}.foundation-beat-dots button small{display:block;font-size:9px}.foundation-beat-dots button.on{background:#ffcf57;color:#553e00;transform:scale(1.1);box-shadow:0 0 0 8px rgba(255,207,87,.22)}.foundation-beat-dots.two button{width:90px;height:90px}.tap-pad.v78{display:block;max-width:620px;width:100%;min-height:88px;margin:14px auto;border-radius:25px;background:linear-gradient(135deg,#7359da,#e0529b);font-size:20px;box-shadow:0 13px 24px rgba(110,72,190,.2)}.subdivision-track{max-width:700px;margin:16px auto;padding:18px;border-radius:22px;background:#f6f8fc;border:1px solid #e2e8f0}.subdivision-track>div{display:grid;grid-template-columns:70px 1fr 1fr;gap:8px}.subdivision-track b,.subdivision-track span{min-height:60px;border-radius:16px;display:grid;place-items:center;background:#fff;font-weight:1000}.subdivision-track span{background:#ffe8f2;color:#aa2a68}.foundation-answer-row{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:14px}.foundation-answer-row button{min-width:90px;min-height:70px;font-size:25px}.rhythm-road.mini,.rhythm-road.v78{display:flex;gap:9px;justify-content:center;flex-wrap:wrap;margin:18px auto;direction:ltr}.rhythm-road span{min-width:100px;min-height:100px;border-radius:20px;display:grid;place-items:center;background:#edf8ff;color:#173b67;font-size:43px;border:1px solid #d7e9f7}.rhythm-road span small{font-size:11px}.rhythm-road span.rest{background:#f1eef8;color:#65578b}.staff-learning-card{max-width:920px;margin:auto}.staff-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.interactive-staff-v78{position:relative;height:340px;border-radius:26px;background:linear-gradient(180deg,#edf6ff,#fff);border:1px solid #d5e6f4;overflow:hidden}.staff-line-v78{position:absolute;left:9%;right:9%;height:18px;padding:0;border-radius:0;background:transparent;border-top:4px solid #356cc6;color:#173b67}.staff-line-v78 b{position:absolute;inset-inline-start:-42px;top:-18px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#356cc6;border:2px solid #bcd2f4}.staff-line-v78.l5{top:20%}.staff-line-v78.l4{top:35%}.staff-line-v78.l3{top:50%}.staff-line-v78.l2{top:65%}.staff-line-v78.l1{top:80%}.staff-line-v78.active{border-color:#ffb500;filter:none}.staff-space-v78{position:absolute;left:9%;right:9%;height:11%;padding:0;background:transparent;color:transparent;border:0;border-radius:0}.staff-space-v78 b{position:absolute;inset-inline-end:3%;top:50%;transform:translateY(-50%);width:30px;height:30px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#6d53a9;border:2px solid #d2c7ef}.staff-space-v78.s4{top:22.5%}.staff-space-v78.s3{top:37.5%}.staff-space-v78.s2{top:52.5%}.staff-space-v78.s1{top:67.5%}.staff-space-v78.active{background:rgba(255,214,72,.18)}.staff-clef-v78{position:absolute;left:15%;top:8%;font-size:205px;line-height:1;color:#121d38;pointer-events:none}.foundation-info-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;max-width:760px;margin:15px auto}.foundation-info-grid article{padding:14px;border-radius:18px;background:#fff;border:1px solid #e0e9f0;text-align:center}.foundation-info-grid b{display:block;font-size:28px;color:#6c50ad}.foundation-info-grid span{font-size:12px;color:#69788a}.meter-card-v78,.meter-explain-v78{display:flex;align-items:center;justify-content:center;gap:18px;max-width:700px;margin:0 auto 16px;padding:18px;border-radius:22px;background:linear-gradient(135deg,#ecf8ff,#fff8d9);border:1px solid #e0e8ed}.meter-big,.meter-explain-v78>b{font-size:34px;font-weight:1000;line-height:.85;padding:12px 18px;border-radius:15px;background:#fff;color:#25649a}.rhythm-train-stage{display:flex;align-items:end;gap:7px;overflow-x:auto;padding:24px 10px 16px;border-radius:25px;background:linear-gradient(180deg,#dff7ff,#fff6d8);direction:ltr}.rhythm-engine{font-size:55px;flex:none}.rhythm-car{flex:none;width:100px;height:90px;border-radius:18px;background:#fff!important;color:#254464!important;border:2px solid #c6dbea!important;display:grid;place-items:center}.rhythm-car b{font-size:36px}.rhythm-car small{font-size:10px}.rhythm-car.on{background:#ffcf57!important;transform:translateY(-8px);box-shadow:0 10px 20px rgba(117,84,0,.17)}
.rhythm-course-hero.v78{position:relative;overflow:hidden;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(260px,.75fr);gap:22px;align-items:center;border-radius:34px;padding:28px;background:radial-gradient(circle at 78% 25%,#fff 0 8%,transparent 26%),linear-gradient(135deg,#e9f8ff,#fff4ca 50%,#ffe5f0);border:1px solid #fff;box-shadow:0 18px 40px rgba(37,72,112,.13)}.rhythm-course-hero.v78 h1{font-size:clamp(31px,4.2vw,52px);color:#194f78;margin:8px 0}.rhythm-course-hero.v78 p{max-width:780px;color:#50667d}.rhythm-journey-mini{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:13px}.rhythm-journey-mini span{padding:8px 12px;border-radius:999px;background:#ffffffd9;border:1px solid #fff;font-weight:900}.rhythm-journey-mini b{color:#b9a9d3}.rhythm-course-hero-art.v78{display:grid;grid-template-columns:1fr 1fr;gap:10px;transform:rotate(-2deg)}.rhythm-course-hero-art.v78 b{min-height:92px;border-radius:24px;display:grid;place-items:center;background:#fff;font-size:44px;color:#243f66;box-shadow:0 10px 24px rgba(43,62,91,.12);animation:v78Float 3s ease-in-out infinite}.rhythm-course-hero-art.v78 b:nth-child(2){animation-delay:.4s}.rhythm-course-hero-art.v78 b:nth-child(3){animation-delay:.8s}.rhythm-course-hero-art.v78 b:nth-child(4){animation-delay:1.2s}.rhythm-course-grid.v78{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}.rhythm-course-card{position:relative;overflow:hidden;min-height:150px!important;border-radius:22px!important;background:linear-gradient(145deg,#fff,#f7fbff)!important;color:#1e3652!important;border:1px solid #e0e8f0!important;box-shadow:0 9px 22px rgba(39,70,105,.08)!important;text-align:start!important;transition:.18s transform,.18s box-shadow}.rhythm-course-card:hover{transform:translateY(-4px);box-shadow:0 17px 30px rgba(39,70,105,.14)!important}.rhythm-course-card>span{font-size:36px}.rhythm-course-card em{font-style:normal;color:#66778a;font-size:11px;line-height:1.55}.rhythm-course-card.orange{background:linear-gradient(145deg,#fff,#fff1dc)!important}.rhythm-course-card.pink{background:linear-gradient(145deg,#fff,#ffeaf3)!important}.rhythm-course-card.purple{background:linear-gradient(145deg,#fff,#f0eaff)!important}.rhythm-course-card.green{background:linear-gradient(145deg,#fff,#e9faef)!important}.rhythm-course-card.yellow,.rhythm-course-card.gold{background:linear-gradient(145deg,#fff,#fff7d6)!important}.rhythm-course-card.cyan,.rhythm-course-card.blue{background:linear-gradient(145deg,#fff,#e9f8ff)!important}.rhythm-course-head.v78{display:grid;grid-template-columns:auto 1fr;gap:14px;align-items:center;padding:15px 17px;border-radius:22px;background:linear-gradient(135deg,#f2f9ff,#fff9df);border:1px solid #dceaf4;margin-bottom:15px}.rhythm-course-head.v78>span{width:64px;height:64px;border-radius:20px;background:#fff;display:grid;place-items:center;font-size:34px;box-shadow:0 8px 18px rgba(42,66,100,.09)}.rhythm-course-head.v78 h1{margin:2px 0;font-size:clamp(24px,3vw,34px)}.rhythm-course-head.v78 p{margin:0;color:#637487}.rhythm-mini-video{max-width:780px;margin:0 auto 17px}.mini-video-screen{position:relative;overflow:hidden;min-height:220px;padding:30px;border-radius:28px;background:radial-gradient(circle at 70% 22%,rgba(255,255,255,.75),transparent 23%),linear-gradient(135deg,#dff4ff,#fff4d0 55%,#ffe7f4);display:grid;place-items:center;text-align:center;border:1px solid #d9e9f3}.mini-video-screen>b{font-size:76px;line-height:1;color:#1f3f66;z-index:2}.mini-video-screen>strong{font-size:23px;letter-spacing:.06em;z-index:2}.mini-video-screen>span{font-size:13px;color:#50677e;z-index:2}.mini-orbit{position:absolute;width:165px;height:165px;border:2px dashed rgba(104,77,178,.2);border-radius:50%;animation:v78Orbit 12s linear infinite}.mini-beat-line{display:flex;gap:8px;position:absolute;bottom:18px}.mini-beat-line i{width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 2px 9px rgba(48,71,101,.15)}.value-card-row{display:flex;justify-content:center;gap:12px;flex-wrap:wrap;margin:15px}.value-card-row article{min-width:170px;padding:18px;border-radius:23px;background:#fff;border:1px solid #dfe8f0;text-align:center}.value-card-row article>b{font-size:52px;display:block}.value-card-row article strong,.value-card-row article small{display:block}.sixteenth-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;max-width:700px;margin:15px auto}.sixteenth-grid button{min-height:95px;border-radius:22px;background:#edf8ff;color:#1e4a6b}.sixteenth-grid button b,.sixteenth-grid button span{display:block}.sixteenth-grid button b{font-size:20px}.sixteenth-grid button.ok{background:#d9f5e3;color:#17613b}.note-value-ladder{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 0}.note-value-ladder button{min-height:160px;background:#fff;color:#27425e;border:1px solid #dce7ef;border-radius:23px}.note-value-ladder b{display:block;font-size:52px}.note-value-ladder strong,.note-value-ladder span{display:block}.note-value-ladder span{margin-top:7px;font-size:24px;color:#7859b8}.echo-cover{display:flex;align-items:center;justify-content:center;gap:12px;padding:20px;border-radius:22px;background:#eef8ff;font-size:21px}.echo-cover span{font-size:40px}.echo-road{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin:15px}.echo-road span{width:80px;height:80px;border-radius:20px;display:grid;place-items:center;background:#fff;border:2px solid #dfe8f0;font-size:34px}.echo-road span.current{border-color:#ffb700;box-shadow:0 0 0 6px rgba(255,183,0,.14)}.echo-road span.done{background:#def6e7;border-color:#80d9a4}.body-rhythm-seq{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;margin:16px}.body-rhythm-seq span{min-width:105px;min-height:105px;border-radius:23px;background:#fff;border:1px solid #dde8f0;display:grid;place-items:center;font-size:38px}.body-rhythm-seq span small{font-size:11px}.body-rhythm-seq span.on{background:#fff0bf;transform:translateY(-7px)}.body-rhythm-seq span.done{background:#def5e8}.body-rhythm-controls,.final-answer-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-width:720px;margin:15px auto}.body-rhythm-controls button{min-height:95px;font-size:30px}.body-rhythm-controls b{display:block;font-size:13px}.final-challenge-card{display:flex;align-items:center;gap:14px;padding:20px;border-radius:24px;background:linear-gradient(135deg,#fff9d4,#ffe8f0);border:1px solid #f0e3c4}.final-challenge-card span{font-size:46px}.final-challenge-card b{flex:1;font-size:20px}.final-challenge-card strong{padding:8px 12px;border-radius:999px;background:#fff}.final-answer-grid{grid-template-columns:repeat(5,1fr)}.final-answer-grid button{min-height:105px;background:#fff;color:#27425f;border:1px solid #dce6ed}.final-answer-grid b{display:block;font-size:37px}.final-answer-grid small{display:block;font-size:10px}
@keyframes v78Float{50%{transform:translateY(-8px)}}@keyframes v78Orbit{to{transform:translate(-50%,-50%) rotate(360deg)}}
@media(max-width:1050px){.rhythm-course-grid.v78{grid-template-columns:repeat(3,1fr)}.foundation-path-hero.v78,.rhythm-course-hero.v78{grid-template-columns:1fr minmax(230px,.6fr)}.foundation-step-flow{display:none}.note-value-ladder{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.foundation-path-hero.v78,.rhythm-course-hero.v78{grid-template-columns:1fr;padding:20px;border-radius:26px}.foundation-hero-art-v78,.rhythm-course-hero-art.v78{display:none}.foundation-path-hero.v78 h1,.rhythm-course-hero.v78 h1{font-size:30px}.foundation-stage-head.v78{grid-template-columns:auto 1fr;padding:12px}.foundation-stage-head.v78>span{width:52px;height:52px;font-size:28px}.micro-card{grid-template-columns:90px 1fr;padding:15px}.micro-symbol{min-height:90px;font-size:55px}.rhythm-course-grid.v78{grid-template-columns:repeat(2,1fr)}.foundation-beat-dots button{width:60px;height:60px}.interactive-staff-v78{height:280px}.staff-clef-v78{font-size:165px}.foundation-info-grid{grid-template-columns:1fr 1fr 1fr}.sixteenth-grid{grid-template-columns:repeat(2,1fr)}.body-rhythm-controls{grid-template-columns:1fr 1fr 1fr}.final-answer-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:460px){.rhythm-course-grid.v78{grid-template-columns:1fr}.micro-card{grid-template-columns:1fr;text-align:center}.micro-symbol{min-height:80px}.foundation-beat-dots{gap:7px}.foundation-beat-dots button{width:52px;height:52px;font-size:18px}.interactive-staff-v78{height:240px}.staff-clef-v78{font-size:140px}.staff-line-v78 b{inset-inline-start:-30px;width:25px;height:25px;font-size:10px}.foundation-info-grid{grid-template-columns:1fr}.note-value-ladder{grid-template-columns:1fr 1fr}.final-answer-grid{grid-template-columns:repeat(2,1fr)}.rhythm-car{width:82px;height:78px}.rhythm-engine{font-size:45px}}
@media(prefers-reduced-motion:reduce){.foundation-hero-art-v78 .orbit,.foundation-hero-art-v78>strong,.rhythm-course-hero-art.v78 b,.mini-orbit{animation:none!important}}

/* ===== V79 CLEAN ACCOUNT MENU + FOUNDATION VIDEOS ===== */
.mada-topbar{overflow:visible!important}
.account-shell{position:relative!important;z-index:120;flex:0 0 auto!important}
.account-trigger{display:flex!important;align-items:center!important;gap:9px!important;min-height:46px!important;padding:5px 9px!important;border:1px solid color-mix(in srgb,var(--primary) 14%,var(--line))!important;border-radius:16px!important;background:var(--surface)!important;color:var(--ink)!important;box-shadow:0 5px 16px rgba(18,48,70,.07)!important;white-space:nowrap!important}
.account-trigger:hover{background:color-mix(in srgb,var(--primary) 5%,var(--surface))!important;filter:none!important}
.account-trigger .avatar{width:36px!important;height:36px!important;flex:none!important}
.account-trigger .user-meta{display:grid!important;text-align:start!important;line-height:1.25!important;max-width:150px!important}
.account-trigger .user-meta b{font-size:12px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-trigger .user-meta small{font-size:10px!important;color:var(--muted)!important}
.account-chevron{font-size:17px;color:var(--muted);transition:transform .15s ease}
.account-trigger[aria-expanded="true"] .account-chevron{transform:rotate(180deg)}
.account-menu{position:absolute!important;top:calc(100% + 8px)!important;inset-inline-end:0!important;width:min(260px,calc(100vw - 24px))!important;padding:8px!important;border:1px solid var(--line)!important;border-radius:18px!important;background:var(--surface)!important;color:var(--ink)!important;box-shadow:0 18px 48px rgba(14,37,62,.20)!important;z-index:9999!important;text-align:start!important}
.account-menu[hidden]{display:none!important}
.account-menu-head{display:grid;gap:2px;padding:9px 11px 11px;border-bottom:1px solid var(--line);margin-bottom:5px}
.account-menu-head b{font-size:14px}.account-menu-head small{font-size:11px;color:var(--muted)}
.account-menu>button{width:100%!important;min-height:43px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;text-align:start!important;padding:8px 11px!important;border-radius:12px!important;background:transparent!important;color:var(--ink)!important;box-shadow:none!important}
.account-menu>button:hover{background:var(--soft)!important;filter:none!important}
.account-menu hr{border:0;border-top:1px solid var(--line);margin:5px 4px}
.account-menu .account-logout{color:#b72c42!important}

.foundation-video-library-v79{margin:18px 0 22px;padding:20px;border:1px solid color-mix(in srgb,var(--primary) 16%,var(--line));border-radius:26px;background:linear-gradient(145deg,#fff,color-mix(in srgb,var(--primary) 4%,#fff));box-shadow:0 10px 28px rgba(24,57,83,.07)}
.foundation-video-count{padding:6px 11px;border-radius:999px;background:var(--soft);color:var(--primary);font-weight:900;font-size:12px;white-space:nowrap}
.foundation-video-grid-v79{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px}
.foundation-video-grid-v79 article{min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:0 7px 18px rgba(18,47,72,.07)}
.foundation-video-grid-v79 video{display:block;width:100%;aspect-ratio:16/9;background:#edf3fa;object-fit:cover}
.foundation-video-grid-v79 article>div{display:grid;gap:4px;padding:11px}
.foundation-video-grid-v79 b{font-size:14px}.foundation-video-grid-v79 small{font-size:11px;color:var(--muted);min-height:34px}
.foundation-video-grid-v79 button{min-height:39px;padding:7px 8px;font-size:11px;margin-top:3px}
.foundation-reference-videos{margin-top:12px;border:1px dashed var(--line);border-radius:15px;padding:10px 12px;background:color-mix(in srgb,var(--soft) 55%,#fff)}
.foundation-reference-videos summary{cursor:pointer;font-weight:900}.foundation-reference-videos>div{display:flex;gap:8px;flex-wrap:wrap;padding-top:9px}.foundation-reference-videos a{padding:7px 10px;border-radius:10px;background:#fff;border:1px solid var(--line);font-weight:800;text-decoration:none}
.rhythm-video-strip-v79{margin:18px 0 20px;padding:16px;border-radius:22px;background:linear-gradient(135deg,color-mix(in srgb,var(--accent) 11%,#fff),#fff);border:1px solid var(--line)}
.rhythm-video-grid-v79{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.rhythm-video-grid-v79 article{overflow:hidden;border:1px solid var(--line);border-radius:16px;background:#fff}.rhythm-video-grid-v79 video{width:100%;display:block;aspect-ratio:16/9;object-fit:cover;background:#eef4fb}.rhythm-video-grid-v79 b{display:block;padding:9px 12px;font-size:13px}
/* Never place a decorative treble clef on the staff-learning card; the clef has its own accurate lesson. */
.staff-clef-v78{display:none!important}

@media(max-width:1180px){.foundation-video-grid-v79{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px),(pointer:coarse){
 .account-trigger{min-height:42px!important;padding:3px 6px!important}.account-trigger .user-meta{display:none!important}.account-chevron{font-size:14px}.account-menu{position:fixed!important;top:64px!important;inset-inline-end:10px!important}
 .foundation-video-grid-v79{grid-template-columns:repeat(2,minmax(0,1fr))}.rhythm-video-grid-v79{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:560px){.foundation-video-library-v79{padding:13px;border-radius:20px}.foundation-video-grid-v79{grid-template-columns:1fr}.foundation-video-grid-v79 article{display:grid;grid-template-columns:150px minmax(0,1fr);align-items:stretch}.foundation-video-grid-v79 video{height:100%;min-height:116px;aspect-ratio:auto}.foundation-video-grid-v79 small{min-height:0}.rhythm-video-grid-v79{grid-template-columns:1fr}.rhythm-video-grid-v79 article{display:grid;grid-template-columns:130px 1fr;align-items:center}.rhythm-video-grid-v79 video{height:100%;aspect-ratio:auto;min-height:95px}}
/* V79 final alignment fixes */
html[dir="rtl"] .account-menu{right:0!important;left:auto!important}
html[dir="ltr"] .account-menu{left:0!important;right:auto!important}
.foundation-video-grid-v79{grid-template-columns:repeat(3,minmax(0,1fr))!important}
@media(max-width:900px),(pointer:coarse){html[dir="rtl"] .account-menu{right:10px!important;left:auto!important}html[dir="ltr"] .account-menu{left:10px!important;right:auto!important}.foundation-video-grid-v79{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:560px){.foundation-video-grid-v79{grid-template-columns:1fr!important}}

/* ===== V80 FINAL WEB: full-song number practice only ===== */
.practice-quickbar.full-song-only{grid-template-columns:minmax(220px,1fr) auto!important;align-items:center!important;gap:10px!important}
.practice-full-song-badge{display:flex;align-items:center;gap:8px;min-height:44px;padding:7px 12px;border-radius:14px;background:color-mix(in srgb,var(--primary) 8%,#fff);border:1px solid color-mix(in srgb,var(--primary) 18%,var(--line));color:var(--ink)}
.practice-full-song-badge>b{font-size:14px;color:var(--primary)}
.practice-full-song-badge>small{font-size:11px;color:var(--muted)}
.number-practice-landscape .practice-quickbar.full-song-only{grid-template-columns:minmax(190px,1fr) auto!important}
.number-practice-landscape .practice-full-song-badge{min-height:30px!important;padding:3px 7px!important;font-size:10px!important}
.number-practice-landscape .practice-full-song-badge>b{font-size:10px!important}.number-practice-landscape .practice-full-song-badge>small{font-size:8px!important}
body.number-touch-practice .number-app.touch-practice .practice-quickbar.full-song-only{grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:none!important}
body.number-touch-practice .number-app.touch-practice .practice-full-song-badge{min-width:0!important}
@media(max-width:650px){.practice-quickbar.full-song-only{grid-template-columns:1fr!important}.practice-full-song-badge,.practice-quick-actions{width:100%}.practice-quick-actions{justify-content:stretch}.practice-quick-actions button{flex:1}}

/* ===== V81 NUMBERS GUIDED / SOLO / ASSESSMENT + FULL HEIGHT NAV ===== */
.number-practice-mode-v81{display:flex;gap:7px;align-items:center;justify-content:center;flex-wrap:wrap;padding:5px;border-radius:16px;background:color-mix(in srgb,var(--surface) 8%,transparent)}
.number-practice-mode-v81 button{min-height:42px;padding:8px 12px;border-radius:13px}
.number-practice-mode-v81 button.active{background:#ffd43b!important;color:#2f2500!important;box-shadow:0 0 0 2px #fff,0 5px 16px #ffd43b55!important}
.number-practice-mode-v81 .assessment-start{background:linear-gradient(135deg,#6948df,#954ff0)!important;color:#fff!important}
.number-app.solo-mode .number-piano .key.target-key,.number-app.solo-mode .number-piano .key.next-key{box-shadow:none!important;animation:none!important;filter:none!important;transform:none!important}
.number-app.solo-mode .number-piano .key.white.target-key,.number-app.solo-mode .number-piano .key.white.next-key{background:linear-gradient(90deg,#e5e8e9,#fff 20%,#fff 80%,#e5e8e9)!important}
.number-app.solo-mode .number-piano .key.black.target-key,.number-app.solo-mode .number-piano .key.black.next-key{background:linear-gradient(90deg,#111923,#34404a,#0e151f)!important}
.number-app.solo-mode .number-token.current{background:#202735!important;color:#fff!important;border-color:#ffffff22!important;transform:none!important;box-shadow:none!important}
.number-app.solo-mode .number-token.next-token{background:#202735!important;color:#fff!important;border-color:#ffffff22!important}
.number-app.solo-mode .upcoming-chip.first{background:#111620!important;color:#fff!important;transform:none!important}
.number-app.solo-mode .key.numbered-key .key-number{background:#eef2f7!important;color:#25344d!important;box-shadow:0 2px 8px #0002!important}
.number-app.assessment-mode .number-feedback{background:linear-gradient(135deg,#fff8d6,#fff)!important;color:#483900!important;border-color:#f1cf55!important}
.number-catalog-manager summary{cursor:pointer;font-weight:1000;font-size:18px}.number-catalog-manager-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0}.number-catalog-manager-grid .choice{margin:0;background:var(--surface);align-items:center}.number-catalog-manager-grid .choice span{display:grid;gap:2px}.number-catalog-manager-grid small{font-size:11px}.number-shorts-panel{margin-top:20px}.number-shorts-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}.number-short-card{overflow:hidden;border:1px solid var(--line);border-radius:19px;background:var(--surface);box-shadow:0 8px 20px #102b5510}.number-short-card img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:var(--soft)}.number-short-card>div{display:grid;gap:7px;padding:12px}.number-short-card b{line-height:1.5}.number-short-card small{color:var(--muted)}.number-short-card .button{display:block;text-align:center;text-decoration:none;background:var(--primary);color:#fff;padding:9px 12px;border-radius:12px;font-weight:900}
@media(min-width:1401px){.mada-shell>.mada-sidebar{position:sticky!important;top:78px!important;height:calc(100dvh - 78px)!important;min-height:calc(100dvh - 78px)!important;max-height:calc(100dvh - 78px)!important;align-self:start!important;border-radius:0 0 0 28px!important;overflow-y:auto!important}.mada-sidebar nav{padding-bottom:32px}}
body.mada-compact-nav .mada-sidebar{top:0!important;bottom:0!important;height:100dvh!important;min-height:100dvh!important;max-height:100dvh!important}
@media(max-width:950px){.number-catalog-manager-grid,.number-shorts-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.number-catalog-manager-grid,.number-shorts-grid{grid-template-columns:1fr}.number-practice-mode-v81{display:grid;grid-template-columns:1fr 1fr;width:100%}.number-practice-mode-v81 .assessment-start{grid-column:1/-1}.number-practice-mode-v81 button{width:100%}}

/* ===== V83 DREAM DRUM + EGYPTIAN PERCUSSION ===== */
.egyptian-percussion-stage{background:linear-gradient(145deg,#fffdf7,#fff7e8 45%,#f4fbff);overflow:hidden}
.egyptian-percussion-note{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:14px 16px;margin-bottom:14px;border:1px solid #eed8ae;border-radius:18px;background:#fffaf0}
.egyptian-percussion-note b{color:#743c13}.egyptian-percussion-note span{font-size:13px;color:var(--muted)}
.egyptian-percussion-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.egyptian-percussion-group{padding:16px;border:1px solid #eadfc9;border-radius:22px;background:#fff;box-shadow:0 10px 24px #54320b10}
.egyptian-percussion-group h2{font-size:19px;margin:0 0 12px;color:#6c3c17}
.egyptian-pad-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.egyptian-pad-grid button{min-height:88px;padding:10px;border-radius:18px;background:linear-gradient(145deg,#fff8e5,#ffecc7)!important;color:#392612!important;border:1px solid #efd6a4!important;box-shadow:0 6px 14px #5f3b1112!important;display:grid;place-items:center;gap:3px}
.egyptian-pad-grid button span{font-size:29px;line-height:1}.egyptian-pad-grid button b{font-size:14px}.egyptian-pad-grid button.hit{transform:scale(.95);box-shadow:0 0 0 4px #ffcc5b66!important;filter:brightness(1.05)}
@media(max-width:900px){.egyptian-percussion-groups{grid-template-columns:1fr}.egyptian-pad-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:600px){.egyptian-pad-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.egyptian-pad-grid button{min-height:78px}.egyptian-percussion-note{align-items:flex-start;flex-direction:column}}

#main .mada-module.egyptian{background:linear-gradient(145deg,#fff1d9,#ffe0bf)!important}
#main .mada-module.egyptian .v73-card-icon{filter:drop-shadow(0 5px 8px #7d4b1730)}


/* ===== V84 ADMIN CONTROL CENTER ===== */
.nav-role-layout-row{grid-template-columns:30px auto minmax(44px,64px) minmax(150px,1fr) minmax(220px,auto) auto!important;align-items:center;gap:9px}
.home-role-layout-row{grid-template-columns:30px auto minmax(180px,1fr) minmax(220px,auto) auto!important}
.nav-role-matrix{display:flex;gap:6px;flex-wrap:wrap;align-items:center;justify-content:flex-start}
.nav-role-toggle{display:flex;align-items:center;gap:4px;margin:0!important;padding:5px 8px;border:1px solid var(--line);border-radius:999px;background:var(--surface);font-size:11px;font-weight:800;white-space:nowrap}
.nav-role-toggle input{width:16px!important;min-height:16px!important;margin:0!important}.nav-role-toggle:has(input:checked){background:var(--soft);color:var(--primary)}.nav-role-toggle:has(input:disabled){opacity:.45}
.nav-role-legend{display:flex;gap:9px;flex-wrap:wrap;margin:0 0 12px}.nav-role-legend span{padding:6px 10px;border-radius:999px;background:var(--soft);font-weight:800;font-size:12px}
.admin-control-shortcuts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.admin-control-shortcuts button{min-height:54px}
@media(max-width:1000px){.nav-role-layout-row,.home-role-layout-row{grid-template-columns:30px 1fr auto!important}.nav-role-layout-row>.layout-visible,.home-role-layout-row>.layout-visible{grid-column:2}.nav-role-layout-row>[data-nav-icon]{grid-column:2}.nav-role-layout-row>[data-nav-label],.home-role-layout-row>b{grid-column:2}.nav-role-matrix{grid-column:2/-1}.nav-role-layout-row>[data-nav-url]{grid-column:2/-1}.layout-move{grid-column:3;grid-row:1/4}.admin-control-shortcuts{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.admin-control-shortcuts{grid-template-columns:1fr}.nav-role-matrix{gap:4px}.nav-role-toggle{padding:4px 6px}}

/* ===== V86 SCHOOL ADMIN + QR + STUDENT ANALYTICS ===== */
.staff-permission-box{margin:14px 0;padding:15px;border:1px solid var(--line);border-radius:18px;background:linear-gradient(145deg,var(--surface),var(--soft))}.staff-permission-box h3{margin:0 0 10px}.staff-permission-box .choice{margin:7px 0}
.import-students-panel{border:1px solid color-mix(in srgb,var(--primary) 22%,var(--line));background:linear-gradient(145deg,#fff,#f6fbff)}.import-students-panel form{display:grid;gap:12px}.import-students-panel input[type=file]{padding:14px;border:1px dashed color-mix(in srgb,var(--primary) 38%,var(--line));border-radius:14px;background:#fff}.import-summary{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px}.import-summary>*{padding:8px 11px;border-radius:999px;background:var(--soft);font-weight:900}.import-result-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;max-height:60vh;overflow:auto;padding:4px}.import-result-grid article{display:grid;place-items:center;gap:5px;padding:12px;border:1px solid var(--line);border-radius:17px;background:var(--surface);text-align:center}.import-result-grid code{direction:ltr;padding:5px 8px;border-radius:8px;background:#111827;color:#fff;font-size:12px}.import-result-grid em{font-style:normal;color:var(--muted);font-size:11px}
.qr-admin-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-top:14px}.qr-student-card{display:grid;place-items:center;gap:6px;text-align:center;padding:15px;border:1px solid var(--line);border-radius:20px;background:var(--surface);box-shadow:0 9px 24px #102b5510}.qr-student-card h3{margin:3px 0}.qr-box{display:grid;place-items:center;padding:9px;background:#fff;border-radius:14px;border:1px solid #e5e7eb}.qr-box svg{max-width:100%;height:auto}.qr-login-main{background:linear-gradient(135deg,#e9f8ff,#fff4da)!important;color:#14324d!important}.qr-scanner{display:grid;gap:12px}.qr-scanner video{width:100%;max-height:56vh;object-fit:cover;border-radius:18px;background:#111}.qr-scanner .scan-frame{position:relative;overflow:hidden;border-radius:18px}.qr-scanner .scan-frame:after{content:"";position:absolute;inset:15%;border:3px solid #ffd43b;border-radius:18px;box-shadow:0 0 0 999px #0004;pointer-events:none}
.student-analytics-panel .block{display:block;color:var(--muted);font-size:10px;margin-top:2px}.student-analytics-panel td,.student-analytics-panel th{white-space:nowrap}.student-progress-hero{background:linear-gradient(135deg,#effbff,#fff9dc 55%,#fff0f7)}.student-progress-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:13px}.student-progress-stats span{display:grid;gap:3px;padding:13px;text-align:center;border:1px solid var(--line);border-radius:16px;background:#fff}.student-progress-stats b{font-size:20px;color:var(--primary)}.student-progress-stats small{color:var(--muted)}.teacher-star-note{padding:11px 13px;border-radius:14px;background:#fff;border:1px solid #f2d77b;margin-top:12px}.analytics-star{font-size:18px;letter-spacing:1px}.analytics-score-good{font-weight:900;color:#087d4d}.analytics-score-mid{font-weight:900;color:#a76500}.analytics-score-low{font-weight:900;color:#b42318}
@media(max-width:1050px){.qr-admin-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.import-result-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.student-progress-stats{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.qr-admin-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.student-progress-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:480px){.qr-admin-grid,.import-result-grid{grid-template-columns:1fr}.student-progress-stats{grid-template-columns:1fr 1fr}}

/* MADA V92: seasonal unobtrusive backgrounds and tree navigation */
body[data-season="winter"] .mada-topbar{background-image:linear-gradient(100deg,rgba(199,229,255,.16),rgba(246,249,255,.10))}
body[data-season="winter"] .mada-home-hero{background-image:radial-gradient(circle at 14% 12%,rgba(255,255,255,.73),transparent 30%),linear-gradient(125deg,rgba(166,211,248,.18),transparent 65%)}
body[data-season="summer"] .mada-home-hero{background-image:radial-gradient(circle at 20% 12%,rgba(255,232,110,.27),transparent 37%),linear-gradient(120deg,rgba(148,232,180,.15),transparent 70%)}
.v92-student-rank{display:inline-block;margin-inline-start:8px;border-radius:100px;padding:5px 12px;background:#fff7dc;color:#6f5517;font-size:.78em}
.v92-folder-tree{display:grid;gap:12px;margin-top:18px}.v92-folder{border:1px solid #d6e3f0;border-radius:15px;background:var(--surface,#fff);padding:8px 12px;margin:5px 0;min-width:0}
.v92-folder>summary{cursor:pointer;padding:11px 5px;font-weight:700;list-style-position:inside}.v92-folder[open]>summary{color:var(--primary,#7058ad)}.v92-grade{margin-inline-start:12px}.v92-class{margin-inline-start:12px}
.v92-folder .tablewrap{max-height:520px;overflow:auto;max-width:100%}.v92-school-logo-admin{margin-top:20px}
.v92-artist-history{border-radius:20px}.v92-profile-points{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.v92-profile-points p{padding:14px;margin:0;background:rgba(132,161,200,.09);border-radius:14px;line-height:1.75}
.v92-challenge-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.v92-challenge-grid button{min-height:64px;white-space:normal;padding:12px}.v92-challenge-score{font-size:1.1em;font-weight:bold}.v92-challenge-question{font-size:clamp(19px,3vw,25px);line-height:1.7}.v92-challenge-banner{padding:22px;border-radius:18px;background:linear-gradient(125deg,#eaf4ff,#fff4d6)}
@media(max-width:650px){.v92-grade,.v92-class{margin-inline-start:3px}.v92-folder{padding:6px}.v92-challenge-grid{gap:8px}.v92-challenge-grid button{min-height:54px}}

/* V93: clear edit/delete controls for school branches and class registration codes */
.v93-branches-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,275px),1fr));gap:12px;margin-top:12px}
.v93-branch{border:1px solid var(--border,#dbe5f1);border-radius:16px;background:var(--surface,#fff);padding:14px;display:flex;flex-direction:column;justify-content:space-between;gap:13px;min-width:0}
.v93-branch-name{display:flex;flex-direction:column;gap:6px;overflow-wrap:anywhere;min-width:0}.v93-branch-name b{font-size:1rem;color:var(--ink,#153544)}.v93-branch-name small{font-size:.76rem;color:var(--muted,#66758a);text-align:start}
.v93-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:8px;direction:rtl}.v93-actions button{margin:0;white-space:nowrap;min-height:36px;padding:7px 11px}
.v93-protected{border-radius:12px;background:#f0f3f7;color:#65758b;padding:7px 12px;font-size:.83rem;font-weight:700}
@media(max-width:700px){.v93-branches-grid{grid-template-columns:1fr}.v93-actions button{min-height:42px}.v93-branch{padding:12px}}

/* V95 student activity report and unified import */
.mada-v95-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:18px 0}
.mada-v95-kpis>div{padding:18px;border:1px solid #d9e5f3;border-radius:16px;background:#f7fbff;display:flex;flex-direction:column;gap:5px;text-align:center}
.mada-v95-kpis b{font-size:clamp(22px,3vw,32px);color:#123a67}.mada-v95-kpis small{color:#576f8b}
.mada-v95-filters{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin-bottom:16px}
.mada-v95-filters label{flex:1 1 150px}.mada-v95-filters select,.mada-v95-filters input{width:100%;max-width:100%}
.mada-v95-usage .tablewrap{overflow-x:auto}.mada-v95-usage table{min-width:820px}.mada-v95-usage td{vertical-align:middle}
@media(max-width:680px){.mada-v95-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.mada-v95-kpis>div{padding:12px}.mada-v95-filters label{min-width:130px}}

/* V97 rollback: avoid stray navigation panels if an older V96 script is still cached.
   The existing V95 mobile rules above restore normal, native page scrolling. */
.mada-native-tabs{display:none!important}


/* ===== V98: RESPONSIVE NUMBER PRACTICE — APPLIES TO EVERY SONG =====
 * Restore document scrolling. Only the note ribbon and piano keys may scroll sideways.
 * No forced device rotation, fixed-height viewport or clipped lesson controls.
 */
body.number-responsive-page {
  height:auto!important; max-height:none!important; min-height:100%!important;
  overflow-x:hidden!important; overflow-y:auto!important;
  overscroll-behavior-y:auto!important; position:static!important;
  -webkit-overflow-scrolling:touch;
}
body.number-responsive-page #app,
body.number-responsive-page .mada-shell,
body.number-responsive-page #main {
  height:auto!important; max-height:none!important; min-height:0!important;
  overflow:visible!important; position:relative;
}
body.number-responsive-page #main { max-width:100%; min-width:0; }
body.number-responsive-page .mada-topbar,
body.number-responsive-page .mada-sidebar { visibility:visible!important; }
body.number-responsive-page .number-rotate-overlay { display:none!important; }
.number-app.number-responsive {
  display:block!important; position:relative!important; inset:auto!important;
  overflow:visible!important; width:100%!important; max-width:1300px;
  height:auto!important; min-height:0!important; max-height:none!important;
  margin-inline:auto; padding:0!important; isolation:auto;
}
.number-app.number-responsive [hidden] {display:none!important;}
.number-app.number-responsive .number-topbar {
  display:grid!important; grid-template-columns:auto minmax(0,1fr) auto!important;
  align-items:center!important; gap:12px!important;
  height:auto!important; min-height:0!important; max-height:none!important;
  padding:12px 14px!important; margin:0 0 12px!important;
  background:#fff; border:1px solid #dde6ed; border-radius:16px;
  position:static!important; overflow:visible!important;
}
.number-app.number-responsive .number-topbar>div:nth-child(2){min-width:0;overflow-wrap:anywhere;}
.number-app.number-responsive .number-topbar b {
  display:block!important; overflow-wrap:anywhere!important;
  white-space:normal!important; line-height:1.45; font-size:clamp(16px,2.4vw,26px)!important;
}
.number-app.number-responsive .number-topbar small {display:block;line-height:1.4;}
.number-app.number-responsive .number-topbar button {min-height:44px; padding:8px 12px; font-size:clamp(12px,1.5vw,16px);}
.number-app.number-responsive .number-top-actions {display:flex!important;gap:8px;flex-wrap:wrap;align-items:center;}
.number-app.number-responsive .number-stage {
  display:flex!important; flex-direction:column!important;
  height:auto!important; max-height:none!important; min-height:0!important;
  overflow:visible!important; gap:12px!important;
  margin:0 0 16px!important; padding:clamp(10px,2vw,20px)!important;
  background:var(--surface,#fff)!important; color:var(--ink,#172c38)!important;
  border:1px solid var(--line,#dbe5e9)!important; border-radius:20px!important;
  box-shadow:0 6px 20px #152e4810!important;
}
.number-app.number-responsive .number-stage::before{display:none!important;content:none!important;}
.number-app.number-responsive .number-stage>*{max-width:100%;min-width:0;flex-shrink:0;}
.number-app.number-responsive .practice-quickbar.full-song-only {
  display:grid!important; grid-template-columns:minmax(0,1fr)!important;
  grid-template-areas:none!important; gap:10px!important;
  min-height:0!important; max-height:none!important; height:auto!important;
  margin:0!important; padding:0!important; overflow:visible!important;
}
.number-app.number-responsive .practice-full-song-badge {
  display:flex!important; min-width:0!important; width:100%; height:auto!important;
  flex-wrap:wrap; padding:10px 12px!important; border-radius:14px;
  font-size:13px!important; line-height:1.5!important;
  background:#f6faff; color:var(--ink);
}
.number-app.number-responsive .practice-full-song-badge>b{font-size:clamp(14px,2vw,18px)!important;}
.number-app.number-responsive .practice-full-song-badge>small{font-size:12px!important;line-height:1.4!important;}
.number-app.number-responsive .number-practice-mode-v81 {
  display:flex!important; flex-wrap:wrap!important; justify-content:flex-start!important;
  gap:9px!important; margin:0!important; padding:0!important;
  background:transparent!important; width:100%!important;
}
.number-app.number-responsive .number-practice-mode-v81 button {
  flex:1 1 155px!important; width:auto!important; min-width:0!important;
  min-height:44px!important; height:auto!important; line-height:1.4!important;
  padding:10px!important; border-radius:12px!important; white-space:normal!important;
  font-size:clamp(13px,1.8vw,16px)!important;
}
.number-app.number-responsive .practice-quick-actions {
  display:flex!important; flex-wrap:wrap!important; gap:9px!important;
  width:100%!important; margin:0!important; height:auto!important;
}
.number-app.number-responsive .practice-quick-actions button {
  flex:1 1 180px!important; width:auto!important; min-width:0!important;
  min-height:44px!important; height:auto!important; font-size:clamp(12px,1.7vw,15px)!important;
  padding:9px 10px!important; white-space:normal!important; line-height:1.5!important;
}
.number-app.number-responsive .number-now-row {
  display:grid!important; grid-template-columns:minmax(100px,.32fr) minmax(0,1fr)!important;
  gap:10px!important; margin:0!important; min-height:0!important; max-height:none!important;
  height:auto!important;
}
.number-app.number-responsive .number-now,
.number-app.number-responsive .number-next {
  min-width:0!important; min-height:72px!important; height:auto!important;
  border-radius:14px!important; padding:10px 12px!important; overflow:visible!important;
}
.number-app.number-responsive .number-now b {
  font-size:clamp(30px,5vw,56px)!important; line-height:1.1!important;
  margin:3px 0!important;
}
.number-app.number-responsive .number-now small,
.number-app.number-responsive .number-next small,
.number-app.number-responsive .number-now span {
  font-size:clamp(11px,1.6vw,14px)!important;line-height:1.4!important;
}
.number-app.number-responsive .number-next{background:#f7faff!important;color:#243c52!important;border:1px solid #dfebf3!important;}
.number-app.number-responsive .number-next small{color:#536b7d!important;}
.number-app.number-responsive .number-now small,.number-app.number-responsive .number-now span{color:#fff!important;}
.number-app.number-responsive .number-next .upcoming-chip{color:#243c52!important;background:#fff!important;border:1px solid #d8e4ef!important;}
.number-app.number-responsive .number-next .upcoming-chip.first{color:#493700!important;background:#ffe57e!important;border-color:#f0cf54!important;}
.number-app.number-responsive [data-upcoming]{display:flex!important;gap:7px!important;align-items:center!important;flex-wrap:wrap!important;margin-top:5px!important;}
.number-app.number-responsive .upcoming-chip {
  min-width:40px!important; padding:6px 8px!important;
  font-size:clamp(14px,2vw,19px)!important; background:#fff; border-radius:10px;
}
.number-app.number-responsive .number-sequence {
  display:flex!important; align-items:center!important; gap:7px!important;
  flex-shrink:0!important; width:100%; max-width:100%;
  height:auto!important; min-height:70px!important; max-height:none!important;
  padding:8px 6px 12px!important; margin:0!important;
  overflow-x:auto!important; overflow-y:hidden!important;
  scroll-snap-type:none!important; overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch; scrollbar-width:thin;
}
.number-app.number-responsive .number-token {
  flex:0 0 auto!important; display:grid!important; place-items:center!important;
  align-content:center!important; min-width:60px!important; height:56px!important;
  padding:4px 7px!important; border-radius:11px!important;
}
.number-app.number-responsive .number-token b {font-size:22px!important;line-height:1.15!important;}
.number-app.number-responsive .number-token small{font-size:11px!important;line-height:1.25!important;}
.number-app.number-responsive .number-token em {display:none!important;}
.number-app.number-responsive .number-piano-focus {
  display:block!important; grid-row:auto!important;
  position:relative!important; inset:auto!important; transform:none!important;
  width:100%!important; min-width:0!important;
  height:auto!important; max-height:none!important; min-height:0!important;
  margin:0!important; padding:8px!important; border-radius:16px!important;
  overflow:hidden!important; flex:0 0 auto!important;
}
.number-app.number-responsive .number-piano,
.number-app.number-responsive .number-piano .piano-case {
  display:block!important; position:relative!important; min-width:0!important;
  height:auto!important; max-height:none!important; min-height:0!important;
  width:100%!important; margin:0!important; padding:0!important; overflow:visible!important;
}
.number-app.number-responsive .number-piano .keyboard-scroll {
  display:block!important; position:relative!important;
  width:100%!important; max-width:100%!important;
  min-width:0!important; height:auto!important; max-height:none!important; min-height:0!important;
  overflow-x:auto!important; overflow-y:hidden!important;
  padding:0 0 6px!important; margin:0!important;
  touch-action:pan-x pan-y!important;
  -webkit-overflow-scrolling:touch; overscroll-behavior-x:contain;
}
.number-app.number-responsive .number-piano .keyboard {
  position:relative!important; display:block!important;
  height:228px!important; min-height:0!important; max-height:none!important;
}
.number-app.number-responsive .number-piano .key.white {
  height:220px!important; min-height:0!important; max-height:none!important;
}
.number-app.number-responsive .number-piano .key.black {
  height:133px!important; min-height:0!important; max-height:none!important;
}
.number-app.number-responsive .number-piano .key { touch-action:pan-x!important; }
.number-app.number-responsive .key.numbered-key .key-number {
  bottom:14%!important; width:clamp(25px,3.3vw,34px)!important;
  height:clamp(25px,3.3vw,34px)!important; font-size:clamp(14px,2vw,20px)!important;
}
.number-app.number-responsive .key.black.numbered-key .key-number {
  bottom:10%!important; width:clamp(20px,2.7vw,28px)!important;
  height:clamp(20px,2.7vw,28px)!important; font-size:clamp(11px,1.6vw,16px)!important;
}
.number-app.number-responsive .number-piano-options {
  display:block; color:#ebeff8; border:1px solid #303a4d;
  margin:8px 0 0!important; padding:0 8px!important; border-radius:12px;
  background:#1d2533; overflow:hidden;
}
.number-app.number-responsive .number-piano-options>summary {
  cursor:pointer; padding:9px 4px; color:#f2f5ff; font-size:13px; line-height:1.5;
}
.number-app.number-responsive .number-piano-options[open] {padding-bottom:12px!important;}
.number-app.number-responsive .number-piano-options .piano-sound-console {
  display:grid!important; grid-template-columns:minmax(0,1fr)!important;
  height:auto!important; max-height:none!important; width:100%;
  overflow:visible!important; padding:8px!important;
}
.number-app.number-responsive .number-piano-options .piano-sound-controls,
.number-app.number-responsive .number-piano-options .piano-chord-panel {
  display:grid!important; grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr))!important;
  gap:8px!important; width:100%!important; min-width:0!important;
}
.number-app.number-responsive .number-piano-options .piano-controls {
  display:flex!important; flex-wrap:wrap!important; justify-content:center;
}
.number-app.number-responsive .number-piano-options .piano-controls button {min-height:40px;}
.number-app.number-responsive .number-piano-options .piano-range,
.number-app.number-responsive .number-piano-options .piano-help{font-size:12px;}
.number-app.number-responsive .number-feedback {
  display:block; height:auto!important; min-height:74px!important; max-height:none!important;
  padding:10px 12px!important; margin:0!important; border-radius:12px!important;
  color:#153b50!important; background:#edf8f5!important; font-size:13px!important;
}
.number-app.number-responsive .practice-extra-tools,
.number-app.number-responsive .number-song-progress,
.number-app.number-responsive .number-lyrics-panel,
.number-app.number-responsive .number-reference-audio,
.number-app.number-responsive .number-stage-title,
.number-app.number-responsive .note-roadmap,
.number-app.number-responsive .practice-custom-note,
.number-app.number-responsive .number-map-details {max-height:none!important; height:auto!important;}
.number-app.number-responsive .practice-extra-tools {
  border:1px solid #e4eaf1;border-radius:12px;padding:8px 12px;
  background:#f8fbfe; color:#18344d;
}
.number-app.number-responsive .practice-extra-tools .transport-row,
.number-app.number-responsive .practice-extra-tools .tempo-console {min-width:0;width:100%;max-width:100%;}
@media(max-width:760px) {
  body.number-responsive-page #main {padding:10px!important;}
  .number-app.number-responsive .number-topbar {
    grid-template-columns:auto minmax(0,1fr)!important;
    gap:8px!important; padding:9px!important;
  }
  .number-app.number-responsive .number-top-actions {grid-column:1/-1;justify-content:flex-start;}
  .number-app.number-responsive .number-topbar button {font-size:12px!important;}
  .number-app.number-responsive .number-stage {padding:10px!important;gap:10px!important;}
  .number-app.number-responsive .practice-full-song-badge>small{display:block!important;}
  .number-app.number-responsive .number-now-row {
    grid-template-columns:minmax(86px,.35fr) minmax(0,1fr)!important; gap:7px!important;
  }
  .number-app.number-responsive .number-now,
  .number-app.number-responsive .number-next {padding:9px!important;min-height:68px!important;}
  .number-app.number-responsive .number-token{min-width:53px!important;height:52px!important;}
  .number-app.number-responsive .number-token b{font-size:19px!important;}
  .number-app.number-responsive .number-piano-focus{padding:6px!important;}
  .number-app.number-responsive .number-piano .keyboard{height:208px!important;}
  .number-app.number-responsive .number-piano .key.white{height:200px!important;}
  .number-app.number-responsive .number-piano .key.black{height:120px!important;}
}
@media(max-width:400px){
  .number-app.number-responsive .number-topbar {grid-template-columns:1fr!important;}
  .number-app.number-responsive .number-topbar [data-number-back]{width:max-content;}
  .number-app.number-responsive .number-top-actions {grid-column:1!important;}
  .number-app.number-responsive .number-now-row {grid-template-columns:minmax(76px,.4fr) minmax(0,1fr)!important;}
  .number-app.number-responsive .number-next .upcoming-chip{min-width:34px!important;padding:5px!important;}
  .number-app.number-responsive .number-piano .keyboard{height:195px!important;}
  .number-app.number-responsive .number-piano .key.white{height:188px!important;}
  .number-app.number-responsive .number-piano .key.black{height:112px!important;}
}
@media(orientation:landscape) and (max-height:540px){
 .number-app.number-responsive .number-piano .keyboard{height:184px!important;}
 .number-app.number-responsive .number-piano .key.white{height:177px!important;}
 .number-app.number-responsive .number-piano .key.black{height:108px!important;}
 .number-app.number-responsive .number-stage{gap:8px!important;}
}
.number-app.number-responsive.number-expanded-piano .number-piano .keyboard{height:clamp(235px,42vh,340px)!important;}
.number-app.number-responsive.number-expanded-piano .number-piano .key.white{height:calc(clamp(235px,42vh,340px) - 8px)!important;}
.number-app.number-responsive.number-expanded-piano .number-piano .key.black{height:calc(clamp(235px,42vh,340px) * .60)!important;}
@media(prefers-reduced-motion:reduce){
 .number-app.number-responsive .number-piano .key.target-key {animation:none!important;}
}


/* ===== V99 PROFESSIONAL COMPACT NUMBER PRACTICE =====
   All melodies share this surface. Preserve native vertical page scrolling,
   reserve horizontal overflow for the score and piano, never lock orientation.
*/
body.number-responsive-page {
  width:100%!important; max-width:100%!important;
  height:auto!important; min-height:100%!important;
  overflow-x:clip!important; overflow-y:auto!important;
  position:static!important; overscroll-behavior-y:auto!important;
  -webkit-overflow-scrolling:touch;
}
body.number-responsive-page .mada-topbar,
body.number-responsive-page .mada-sidebar,
body.number-responsive-page .site-footer,
body.number-responsive-page .mobile-menu-backdrop,
body.number-responsive-page #mobile-simple-back,
body.number-responsive-page .global-page-back,
body.number-responsive-page .universal-page-nav,
body.number-responsive-page .mada-activity-bar {display:none!important}
body.number-responsive-page .mada-shell {
  display:block!important; width:100%!important; max-width:none!important;
  height:auto!important; min-height:0!important; overflow:visible!important;
  padding:0!important; margin:0!important;
}
body.number-responsive-page #main {
  display:block!important; width:100%!important; max-width:none!important;
  min-width:0!important; padding:clamp(5px,1.1vw,12px)!important;
  padding-bottom:max(8px,env(safe-area-inset-bottom))!important;
  margin:0 auto!important; overflow:visible!important;
}
body.number-responsive-page .number-app.number-compact-v99 {
  width:100%!important; max-width:1440px!important; height:auto!important;
  min-height:0!important; overflow:visible!important; margin-inline:auto!important;
  display:block!important; background:transparent!important;
}
body.number-responsive-page .number-app.number-compact-v99 [hidden]{display:none!important}
body.number-responsive-page .number-app.number-compact-v99 .number-topbar {
  display:grid!important; grid-template-columns:auto minmax(0,1fr) auto!important;
  gap:clamp(6px,1vw,12px)!important; align-items:center!important;
  width:100%!important; min-height:0!important; height:auto!important;
  padding:7px 11px!important; margin:0 0 7px!important;
  border:1px solid #dce4ed!important; border-radius:13px!important;
  box-shadow:none!important; background:#fff!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-topbar>div:nth-child(2) {
  display:block!important; overflow:hidden!important; min-width:0!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-topbar b {
  display:block!important; font-size:clamp(13px,1.55vw,19px)!important;
  line-height:1.35!important; font-weight:900!important;
  white-space:normal!important; overflow-wrap:anywhere!important; margin:0!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-topbar small {
  font-size:11px!important; line-height:1.25!important; color:#677587!important;
  margin-top:1px!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-topbar button {
  min-height:38px!important; height:auto!important; padding:5px 10px!important;
  border-radius:10px!important; font-size:12px!important; white-space:nowrap!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-top-actions {
  display:flex!important; align-items:center!important; justify-content:flex-end!important;
  flex-wrap:nowrap!important; gap:6px!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-top-actions .badge {
  font-size:11px!important; padding:5px 8px!important; white-space:nowrap!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-stage {
  display:flex!important; flex-direction:column!important;
  gap:6px!important; width:100%!important; height:auto!important;
  min-height:0!important; max-height:none!important; overflow:visible!important;
  margin:0 0 7px!important; padding:clamp(6px,1.1vw,12px)!important;
  border-radius:14px!important; box-shadow:none!important;
  border:1px solid #e1e8f0!important; background:#fff!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-stage>* {
  flex-shrink:0!important; min-width:0!important; max-width:100%!important;
}
body.number-responsive-page .number-app.number-compact-v99 .practice-quickbar.full-song-only {
  display:grid!important; grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:7px!important; padding:0!important; margin:0!important;
  height:auto!important; min-height:0!important; overflow:visible!important;
}
/* The lesson title and guided/solo buttons already explain the exercise. */
body.number-responsive-page .number-app.number-compact-v99 .practice-full-song-badge {display:none!important}
body.number-responsive-page .number-app.number-compact-v99 .number-practice-mode-v81,
body.number-responsive-page .number-app.number-compact-v99 .practice-quick-actions {
  display:flex!important; grid-column:auto!important; width:100%!important;
  min-width:0!important; align-items:stretch!important; flex-wrap:nowrap!important;
  padding:0!important; margin:0!important; gap:6px!important; background:transparent!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-practice-mode-v81 button,
body.number-responsive-page .number-app.number-compact-v99 .practice-quick-actions button {
  display:flex!important; justify-content:center!important; align-items:center!important;
  flex:1 1 0!important; width:auto!important; min-width:0!important;
  min-height:42px!important; height:auto!important; padding:6px 8px!important;
  border-radius:10px!important; font-size:clamp(11px,1.2vw,14px)!important;
  line-height:1.35!important; white-space:normal!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-song-progress {
  display:flex!important; flex-wrap:wrap!important; align-items:center!important;
  justify-content:space-between!important; gap:4px!important;
  min-height:22px!important; padding:2px 8px!important; margin:0!important;
  font-size:11px!important; line-height:1.2!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-song-progress b,
body.number-responsive-page .number-app.number-compact-v99 .number-song-progress span {font-size:11px!important}
body.number-responsive-page .number-app.number-compact-v99 .number-now-row {
  display:grid!important; grid-template-columns:minmax(85px,1fr) minmax(0,3fr)!important;
  gap:6px!important; width:100%!important; height:auto!important;
  min-height:0!important; margin:0!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-now,
body.number-responsive-page .number-app.number-compact-v99 .number-next {
  display:flex!important; align-items:center!important; flex-wrap:wrap!important;
  justify-content:center!important; gap:4px 7px!important;
  min-height:50px!important; height:auto!important; padding:5px 9px!important;
  border-radius:10px!important; overflow:hidden!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-now {
  background:linear-gradient(120deg,#117a82,#245b86)!important; color:#fff!important;
  box-shadow:none!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-now b {
  display:inline-block!important; font-size:clamp(21px,3vw,30px)!important;
  line-height:1.15!important; margin:0!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-now small,
body.number-responsive-page .number-app.number-compact-v99 .number-next small,
body.number-responsive-page .number-app.number-compact-v99 .number-now span {
  display:inline-block!important; font-size:clamp(9px,1.1vw,12px)!important;
  line-height:1.3!important; margin:0!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-next {background:#f5faff!important; border:1px solid #d8e7f3!important}
body.number-responsive-page .number-app.number-compact-v99 [data-upcoming] {
  display:flex!important; flex:1 1 auto!important; min-width:0!important;
  align-items:center!important; flex-wrap:nowrap!important; gap:4px!important;
  overflow-x:auto!important; scrollbar-width:none;
  margin:0!important;
}
body.number-responsive-page .number-app.number-compact-v99 .upcoming-chip {
  display:grid!important; place-items:center!important; flex:0 0 auto!important;
  min-width:30px!important; height:31px!important; padding:3px 5px!important;
  font-size:15px!important; border-radius:8px!important; transform:none!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-sequence {
  display:flex!important; width:100%!important; align-items:center!important;
  min-height:42px!important; height:42px!important;
  gap:5px!important; padding:2px 3px 4px!important; margin:0!important;
  overflow-x:auto!important; overflow-y:hidden!important;
  scrollbar-width:thin; -webkit-overflow-scrolling:touch;
  scroll-snap-type:none!important; overscroll-behavior-x:contain!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-token {
  flex:0 0 auto!important; min-width:43px!important; width:auto!important;
  height:36px!important; padding:2px 7px!important; border-radius:8px!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-token b {font-size:16px!important;line-height:1!important}
body.number-responsive-page .number-app.number-compact-v99 .number-token small {font-size:9px!important;line-height:1.1!important}
body.number-responsive-page .number-app.number-compact-v99 .number-piano-focus {
  display:block!important; width:100%!important; min-width:0!important;
  height:auto!important; padding:4px!important; margin:0!important;
  border-radius:12px!important; overflow:hidden!important;
  box-shadow:none!important; background:#1a2232!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-piano,
body.number-responsive-page .number-app.number-compact-v99 .piano-case {width:100%!important;max-width:100%!important}
body.number-responsive-page .number-app.number-compact-v99 .keyboard-scroll {
  width:100%!important; max-width:100%!important; min-height:0!important;
  height:auto!important; overflow-x:auto!important; overflow-y:hidden!important;
  touch-action:pan-x pan-y!important; overscroll-behavior-x:contain!important;
  -webkit-overflow-scrolling:touch;
}
body.number-responsive-page .number-app.number-compact-v99 .keyboard {
  height:clamp(170px,30dvh,255px)!important; max-height:none!important;
}
body.number-responsive-page .number-app.number-compact-v99 .key.white {
  height:calc(clamp(170px,30dvh,255px) - 8px)!important; min-height:0!important;
}
body.number-responsive-page .number-app.number-compact-v99 .key.black {
  height:calc(clamp(170px,30dvh,255px) * .60)!important; min-height:0!important;
}
body.number-responsive-page .number-app.number-compact-v99 .key {touch-action:pan-x pan-y!important}
body.number-responsive-page .number-app.number-compact-v99 .key.numbered-key .key-number {
  bottom:13%!important; width:clamp(24px,3vw,31px)!important;
  height:clamp(24px,3vw,31px)!important; font-size:clamp(13px,1.6vw,17px)!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-feedback {
  display:block!important; min-height:34px!important; height:auto!important;
  padding:5px 10px!important; margin:0!important; border-radius:8px!important;
  font-size:clamp(11px,1.25vw,13px)!important; line-height:1.4!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-piano-options {
  margin:4px 0 0!important; border-radius:8px!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-piano-options>summary {
  min-height:31px!important; padding:5px 7px!important; font-size:11px!important;
}
body.number-responsive-page .number-app.number-compact-v99 .practice-extra-tools {
  width:100%!important; margin:0!important; padding:0!important; border-radius:9px!important;
}
body.number-responsive-page .number-app.number-compact-v99 .practice-extra-tools>summary {
  min-height:32px!important; padding:6px 10px!important; font-size:12px!important;
}
body.number-responsive-page .number-app.number-compact-v99 .number-map-details {
  margin:6px 0!important; padding:5px 9px!important; border-radius:10px!important;
}
/* Mobile phones: keep key controls legible without four stacked tool panels. */
@media(max-width:700px) {
  body.number-responsive-page #main {padding:5px!important}
  body.number-responsive-page .number-app.number-compact-v99 .number-topbar {
    grid-template-columns:minmax(0,1fr) auto!important; gap:5px!important;
    padding:6px 8px!important; margin-bottom:5px!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .number-topbar [data-number-back] {grid-column:2!important;grid-row:1!important}
  body.number-responsive-page .number-app.number-compact-v99 .number-topbar>div:nth-child(2) {
    grid-column:1!important; grid-row:1!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .number-top-actions {
    grid-column:1/-1!important; grid-row:2!important; justify-content:space-between!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .number-topbar b {
    font-size:clamp(13px,3.6vw,16px)!important;line-height:1.25!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .number-topbar small {display:none!important}
  body.number-responsive-page .number-app.number-compact-v99 .number-topbar button {
    min-height:34px!important; padding:4px 8px!important; font-size:11px!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .number-top-actions .badge {font-size:10px!important}
  body.number-responsive-page .number-app.number-compact-v99 .number-stage {gap:5px!important;padding:6px!important}
  body.number-responsive-page .number-app.number-compact-v99 .practice-quickbar.full-song-only {
    grid-template-columns:1fr!important; gap:5px!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .number-practice-mode-v81 button,
  body.number-responsive-page .number-app.number-compact-v99 .practice-quick-actions button {
    min-height:38px!important; font-size:clamp(10px,2.6vw,12px)!important;
    padding:5px 6px!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .number-now-row {
    grid-template-columns:minmax(79px,.7fr) minmax(0,1.5fr)!important; gap:5px!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .number-now,
  body.number-responsive-page .number-app.number-compact-v99 .number-next {
    min-height:43px!important; padding:4px 6px!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .number-now b {font-size:23px!important}
  body.number-responsive-page .number-app.number-compact-v99 .number-now span {display:none!important}
  body.number-responsive-page .number-app.number-compact-v99 .number-sequence {
    height:38px!important; min-height:38px!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .number-token {
    height:33px!important; min-width:39px!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .keyboard {
    height:clamp(164px,26dvh,228px)!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .key.white {
    height:calc(clamp(164px,26dvh,228px) - 8px)!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .key.black {
    height:calc(clamp(164px,26dvh,228px) * .60)!important;
  }
}
@media(max-width:700px) and (orientation:landscape) and (max-height:480px) {
  body.number-responsive-page .number-app.number-compact-v99 .number-topbar {
    grid-template-columns:auto minmax(0,1fr) auto!important;
  }
  body.number-responsive-page .number-app.number-compact-v99 .number-topbar [data-number-back] {grid-column:auto!important;grid-row:auto!important}
  body.number-responsive-page .number-app.number-compact-v99 .number-topbar>div:nth-child(2) {grid-column:auto!important;grid-row:auto!important}
  body.number-responsive-page .number-app.number-compact-v99 .number-top-actions {grid-column:auto!important;grid-row:auto!important}
  body.number-responsive-page .number-app.number-compact-v99 .number-top-actions .badge {display:none!important}
  body.number-responsive-page .number-app.number-compact-v99 .keyboard {height:155px!important}
  body.number-responsive-page .number-app.number-compact-v99 .key.white {height:147px!important}
  body.number-responsive-page .number-app.number-compact-v99 .key.black {height:95px!important}
}
@media(min-width:701px) and (max-height:760px) and (orientation:landscape) {
  body.number-responsive-page .number-app.number-compact-v99 .keyboard {height:clamp(175px,28dvh,215px)!important}
  body.number-responsive-page .number-app.number-compact-v99 .key.white {height:calc(clamp(175px,28dvh,215px) - 8px)!important}
  body.number-responsive-page .number-app.number-compact-v99 .key.black {height:calc(clamp(175px,28dvh,215px) * .60)!important}
  body.number-responsive-page .number-app.number-compact-v99 .number-stage {gap:4px!important;padding:7px!important}
  body.number-responsive-page .number-app.number-compact-v99 .number-topbar {margin-bottom:5px!important}
}
body.number-responsive-page .number-app.number-compact-v99.number-expanded-piano .keyboard {height:clamp(230px,42dvh,380px)!important}
body.number-responsive-page .number-app.number-compact-v99.number-expanded-piano .key.white {height:calc(clamp(230px,42dvh,380px) - 8px)!important}
body.number-responsive-page .number-app.number-compact-v99.number-expanded-piano .key.black {height:calc(clamp(230px,42dvh,380px) * .6)!important}
/* The earlier site-wide .number-topbar>div rule used column direction.
   Explicitly override it so the score and expand control occupy one row. */
body.number-responsive-page .number-app.number-compact-v99 .number-top-actions{
  flex-direction:row!important; flex-wrap:nowrap!important; width:auto!important;
}
@media(max-width:700px){
 body.number-responsive-page .number-app.number-compact-v99 .number-topbar{
   grid-template-columns:auto minmax(0,1fr) auto!important;
 }
 body.number-responsive-page .number-app.number-compact-v99 .number-topbar [data-number-back]{grid-column:1!important;grid-row:1!important}
 body.number-responsive-page .number-app.number-compact-v99 .number-topbar>div:nth-child(2){grid-column:2!important;grid-row:1!important}
 body.number-responsive-page .number-app.number-compact-v99 .number-top-actions{grid-column:3!important;grid-row:1!important}
 body.number-responsive-page .number-app.number-compact-v99 .number-top-actions [data-completed]{display:none!important}
 body.number-responsive-page .number-app.number-compact-v99 .number-top-actions [data-immersive]{
   max-width:46px!important; min-width:42px!important; overflow:hidden!important;
   white-space:nowrap!important; text-overflow:clip!important;
 }
}
/* Prevent the legacy @media(max-width:900px) rule from pushing actions to another row. */
body.number-responsive-page .number-app.number-compact-v99 .number-topbar [data-number-back]{grid-column:1!important;grid-row:1!important}
body.number-responsive-page .number-app.number-compact-v99 .number-topbar>div:nth-child(2){grid-column:2!important;grid-row:1!important}
body.number-responsive-page .number-app.number-compact-v99 .number-topbar .number-top-actions{grid-column:3!important;grid-row:1!important;justify-content:flex-end!important}
body.number-responsive-page .number-app.number-compact-v99 .number-song-progress [data-completed]{
  display:inline-flex!important; align-items:center!important; margin:0!important;
  font-size:10px!important; min-height:19px!important; padding:1px 7px!important;
  border-radius:20px!important;
}

/* =====================================================================
   V100 — landscape performance view for all "اعزف بالأرقام" lessons.
   One real keyboard, one lesson state. No cloned keys or nested scroll page.
   On browsers without orientation.lock (iOS Safari), the performance view
   alone rotates while the rest of the site keeps its natural orientation.
   ===================================================================== */
body.number-responsive-page.number-piano-landscape {
  overflow:hidden!important; overflow-x:hidden!important; overflow-y:hidden!important;
  width:100%!important; height:100dvh!important; min-height:0!important;
  touch-action:none; overscroll-behavior:none!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-responsive.number-landscape-performance {
  position:fixed!important; inset:0!important; z-index:50000!important;
  display:grid!important; grid-template-rows:auto minmax(0,1fr)!important;
  gap:4px!important; width:100vw!important; max-width:none!important;
  height:100dvh!important; min-height:0!important; max-height:100dvh!important;
  padding:5px max(5px,env(safe-area-inset-right)) 5px max(5px,env(safe-area-inset-left))!important;
  margin:0!important; overflow:hidden!important; isolation:isolate!important;
  background:#f4f8fc!important; transform:none!important;
  color:#263c51!important; direction:rtl;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-topbar {
  display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;
  align-items:center!important; column-gap:8px!important;
  min-height:34px!important; height:auto!important; max-height:43px!important;
  padding:3px 8px!important; margin:0!important; border-radius:9px!important;
  border:1px solid #d9e4ee!important;background:#fff!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-topbar>div:nth-child(2) {
  grid-row:1!important;grid-column:2!important;min-width:0!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-topbar b {
  display:block!important; max-width:100%!important;
  font-size:clamp(11px,1.9vw,17px)!important;line-height:1.2!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-topbar small,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance [data-completed],
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance [data-practice-layout-admin],
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance [data-immersive] {display:none!important}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-topbar [data-number-back]{
  grid-row:1!important;grid-column:1!important;min-height:29px!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-top-actions{
  grid-row:1!important;grid-column:3!important;display:flex!important;align-items:center!important;
  width:auto!important;min-width:0!important;gap:3px!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-topbar button{
  min-height:29px!important;max-height:34px!important; padding:4px 9px!important;
  font-size:clamp(10px,1.45vw,13px)!important;white-space:nowrap!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-stage{
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  grid-template-rows:auto auto auto minmax(0,1fr) auto!important;
  gap:3px!important;min-height:0!important;max-height:none!important;
  height:100%!important;overflow:hidden!important;margin:0!important;
  padding:4px 7px!important;border-radius:10px!important;
  background:#f8fafc!important;box-shadow:none!important;border:1px solid #d9e5ee!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .practice-quickbar.full-song-only {
  display:flex!important;flex-wrap:nowrap!important;align-items:center!important;
  justify-content:space-between!important;gap:5px!important;min-height:0!important;
  padding:0!important;margin:0!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .practice-full-song-badge,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-stage-title,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-lyrics-panel,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-reference-audio,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .practice-extra-tools,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-now-row,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .note-roadmap,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .practice-custom-note,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-map-details,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-piano-options {display:none!important}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-practice-mode-v81,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .practice-quick-actions{
  display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;gap:4px!important;
  flex:0 1 auto!important;min-width:0!important;margin:0!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .practice-quickbar button {
  min-height:28px!important; max-height:34px!important; padding:3px clamp(6px,1.4vw,14px)!important;
  border-radius:8px!important;font-size:clamp(10px,1.45vw,13px)!important;
  line-height:1.2!important;white-space:nowrap!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-song-progress {
  display:flex!important;align-items:center!important;justify-content:space-between!important;
  min-height:22px!important; height:22px!important; max-height:22px!important;
  padding:2px 8px!important; margin:0!important;border-radius:6px!important;
  overflow:hidden!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-song-progress>* {
  font-size:11px!important;line-height:1.2!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-sequence {
  display:flex!important;align-items:center!important;gap:4px!important;
  min-height:30px!important; height:34px!important; max-height:34px!important;
  padding:1px 3px!important;margin:0!important;
  overflow-x:auto!important;overflow-y:hidden!important;
  scroll-behavior:auto!important; touch-action:pan-x!important;
  -webkit-overflow-scrolling:touch;overscroll-behavior-x:contain!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-token {
  display:grid!important; min-width:36px!important;height:29px!important;min-height:29px!important;
  padding:2px 5px!important;flex:0 0 auto!important;border-radius:6px!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-token b{font-size:15px!important}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-token small {display:none!important}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-piano-focus {
  display:flex!important;flex:1 1 auto!important; min-height:0!important;
  height:100%!important;max-height:100%!important;width:100%!important;
  overflow:hidden!important; padding:0!important;margin:0!important;border-radius:10px!important;
  background:#172131!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-piano,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-piano .piano-case {
  display:flex!important;flex:1 1 auto!important;flex-direction:column!important;
  width:100%!important;min-width:0!important;height:100%!important;
  min-height:0!important;max-height:100%!important;overflow:hidden!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-piano .keyboard-scroll {
  display:block!important;flex:1 1 auto!important;min-height:0!important;
  width:100%!important;height:100%!important;max-height:100%!important;
  padding:0!important; margin:0!important;
  overflow-x:auto!important;overflow-y:hidden!important;
  touch-action:pan-x!important; overscroll-behavior-x:contain!important;
  -webkit-overflow-scrolling:touch;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-piano .keyboard {
  position:relative!important;height:100%!important;min-height:0!important;max-height:none!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .key.white {
  height:calc(100% - 4px)!important;min-height:0!important;max-height:none!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .key.black {
  height:60%!important;min-height:0!important;max-height:none!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .key {
  -webkit-user-select:none!important;user-select:none!important; touch-action:pan-x!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-feedback {
  display:block!important;flex:0 0 auto!important; min-height:25px!important;
  height:26px!important;max-height:26px!important;overflow:hidden!important;
  padding:4px 9px!important; margin:0!important;
  border-radius:6px!important; font-size:11px!important;line-height:1.4!important;
  text-overflow:ellipsis!important;white-space:nowrap!important;
}
/* Rotate the actual performance panel only when the browser cannot rotate
   the viewport. The parent lesson stays in place and retains its state. */
@media (orientation:portrait) and (pointer:coarse) {
 body.number-responsive-page.number-piano-landscape #main .number-app.number-responsive.number-landscape-performance {
   top:0!important;left:100vw!important;right:auto!important;bottom:auto!important;
   width:100dvh!important;max-width:none!important;
   height:100vw!important;max-height:100vw!important;
   transform-origin:top left!important;transform:rotate(90deg)!important;
 }
}
@media (orientation:landscape) and (max-height:410px) {
 body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-stage{gap:2px!important;padding:3px 6px!important}
 body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-topbar{min-height:29px!important;max-height:34px!important}
 body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-sequence{height:29px!important;min-height:29px!important;max-height:29px!important}
 body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .practice-quickbar button{min-height:26px!important;max-height:28px!important}
}
@media (orientation:landscape) and (max-height:320px) {
 body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .practice-quick-actions{display:none!important}
}

/* V101: student exams, teacher feedback and assigned assessments. Matches existing MADA colors. */
.number-exam-panel{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px;border:1px solid #e8d7ff;background:#faf7ff;border-radius:15px;margin-block:10px;color:#253451;direction:rtl}
.number-exam-panel[hidden]{display:none!important}
.number-exam-panel [data-exam-preview]{flex:1 1 220px;min-width:0}
.number-exam-panel strong,.number-exam-panel small{display:block;line-height:1.5}
.number-exam-panel small{color:#516276}
.number-exam-panel p{margin:5px 0 0;font-size:.91rem}
.number-exam-panel button{min-height:40px;white-space:normal}
.number-exam-panel [data-exam-status]{flex-basis:100%;font-weight:700}
.number-exam-assigned{border:2px solid #ffe36b!important;background:#fffefa}
.number-exam-assignment{display:flex;gap:10px;align-items:center;justify-content:space-between;padding:9px 0;border-top:1px solid #f1e8d2}
.number-exam-assignment span{display:grid;gap:2px}
.number-exam-assignment small{color:#667}
.number-exam-assignment button{white-space:normal}
.number-assignment-table{overflow-x:auto}
.number-assignment-table th,.number-assignment-table td{text-align:right}
@media(max-width:550px){.number-exam-assignment{align-items:stretch;flex-direction:column}.number-exam-panel{padding:8px;gap:7px}.number-exam-panel button{font-size:.83rem;flex:1 1 115px}}

/* V101: keep exam send action inside rotated landscape piano viewport. */
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance.assessment-mode .number-stage{grid-template-rows:auto auto auto minmax(58px,1fr) auto auto!important}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-exam-panel:not([hidden]){
 display:flex!important;flex-wrap:nowrap!important;align-items:center!important;min-height:42px!important;max-height:67px!important;
 margin:0!important;padding:3px 7px!important;gap:6px!important;overflow:hidden!important;border-radius:7px!important;
}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-exam-panel [data-exam-preview]{flex:1 1 155px!important;min-width:0!important;font-size:11px!important;line-height:1.2!important}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-exam-panel [data-exam-preview] strong,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-exam-panel [data-exam-preview] small{font-size:11px!important;line-height:1.2!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-exam-panel p{display:none!important}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-exam-panel button{flex:0 1 auto!important;min-height:30px!important;max-height:42px!important;margin:0!important;padding:4px 7px!important;font-size:11px!important;max-width:45%!important}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-exam-panel [data-exam-retry]{display:none!important}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance .number-exam-panel [data-exam-status]{flex:1 1 120px!important;min-width:0!important;max-height:40px!important;overflow:auto!important;font-size:11px!important;line-height:1.3!important}

/* V102 — Piano exam progress, time limit, and finished results */
.number-exam-hud{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;padding:6px 12px;margin-block:5px;border-radius:12px;background:#eff9f9;border:1px solid #8ed3d3;color:#1f5260;font-size:clamp(.8rem,1.6vw,1rem);font-weight:800;direction:rtl}
.number-exam-hud[hidden]{display:none!important}
.number-exam-hud strong{font-variant-numeric:tabular-nums;white-space:nowrap;color:#0a7075}
.number-exam-panel:not(.exam-finished){border-color:#a6d9d9;background:#f8fdfd}
.number-exam-panel:not(.exam-finished) [data-exam-preview] p{margin-bottom:0}
.number-exam-panel.exam-finished{position:fixed!important;z-index:2147483000!important;inset:auto 12px max(12px,env(safe-area-inset-bottom))!important;max-width:min(560px,calc(100vw - 24px))!important;max-height:min(78dvh,600px);overflow:auto;margin:0 auto!important;box-shadow:0 0 0 200vmax rgba(10,24,40,.42),0 18px 55px rgba(0,0,0,.28);border:2px solid #06a0a6;background:#fff;border-radius:18px;padding:16px;direction:rtl}
.number-exam-panel.exam-finished [data-exam-preview]{flex-basis:100%}
.number-exam-panel.exam-finished [data-exam-preview] strong{font-size:clamp(1.08rem,2.3vw,1.4rem);color:#174454}
.number-exam-panel.exam-finished [data-exam-preview] small{font-weight:700}
.number-exam-panel.exam-finished button{flex:1 1 190px;min-height:48px;font-weight:800}
.number-exam-panel.exam-finished button[data-exam-send]{background:#087e84;color:#fff}
@media(max-height:540px){.number-exam-panel.exam-finished{max-height:calc(100dvh - 14px);inset:auto 8px 7px!important;padding:9px 12px;gap:5px}.number-exam-panel.exam-finished p{margin:3px 0;font-size:.82rem}.number-exam-panel.exam-finished button{min-height:36px}.number-exam-hud{padding:3px 7px;margin:2px 0}}
/* Exam integrity: never show the answer ribbon, highlighted expected notes or reference audio during the exam. */
.number-app.assessment-mode .number-now-row,
.number-app.assessment-mode .number-sequence,
.number-app.assessment-mode [data-direction-guide],
.number-app.assessment-mode .number-reference-audio,
.number-app.assessment-mode .practice-custom-note,
.number-app.assessment-mode .practice-extra-tools {display:none!important}
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance.assessment-mode .number-sequence,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance.assessment-mode .number-now-row,
body.number-responsive-page.number-piano-landscape #main .number-app.number-landscape-performance.assessment-mode [data-direction-guide]{display:none!important}

/* MADA V103 — picture-card home: aligned with official Mada colors.
   Scoped styles protect lessons, piano, and the admin screens. */
#main.v103-home{padding:clamp(10px,1.6vw,24px);min-width:0;overflow:visible}
#main .v103-home-shell{--m103-yellow:#ffe650;--m103-orange:#f18b00;--m103-pink:#e62584;--m103-blue:#1667af;--m103-navy:#354559;direction:inherit;max-width:1320px;margin:0 auto;color:var(--m103-navy);font-family:inherit}
#main .v103-welcome{height:auto;min-height:124px;display:grid;grid-template-columns:minmax(0,1fr) 142px auto;gap:14px;align-items:center;background:linear-gradient(114deg,#fffdf4 0%,#fff 59%,#f1f8ff 100%);border:1px solid #e0e6ed;border-radius:23px;padding:16px 20px;box-shadow:0 8px 22px #35455910;position:relative;inset:auto}
#main .v103-welcome-copy{min-width:0}
#main .v103-hello{display:block;font-size:clamp(13px,1.5vw,17px);font-weight:800;color:var(--m103-blue);line-height:1.35}
#main .v103-welcome h1{font-size:clamp(19px,2.6vw,30px);font-weight:900;color:var(--m103-navy);margin:4px 0 5px;line-height:1.3;overflow-wrap:anywhere}
#main .v103-classline{display:inline-flex;align-items:center;gap:5px;margin:0;background:#fff4bd;border:1px solid #ffe18b;border-radius:100px;padding:4px 12px;font-size:clamp(12px,1.3vw,15px);font-weight:800;color:#5b491e;line-height:1.5;direction:auto;max-width:100%;overflow-wrap:anywhere}
#main .v103-school-logo{width:142px;max-width:100%;height:90px;object-fit:contain;justify-self:center}
#main .v103-language{background:white;color:var(--m103-navy);border:1px solid #d9e2ea;border-radius:13px;padding:6px 10px;min-height:39px;font-size:13px;justify-self:end;align-self:start;white-space:nowrap;box-shadow:0 2px 8px #172c3810}
#main .v103-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:14px 2px 10px}
#main .v103-heading h2{font-size:clamp(17px,2vw,23px);line-height:1.3;margin:0 0 4px;color:var(--m103-navy)}
#main .v103-heading p{margin:0;color:#6d7784;font-size:13px;line-height:1.35}
#main .v103-progress{white-space:nowrap;display:inline-flex;border-radius:50px;background:#fff8d4;color:#785f03;padding:7px 12px;font-size:12px;font-weight:800}
#main .v103-pages{display:flex;gap:7px;position:static;top:auto;inset:auto;z-index:auto;max-width:100%;overflow-x:auto;white-space:nowrap;margin:0 0 10px;padding:0 0 2px;direction:inherit}
#main .v103-pages button{background:#fff;min-height:39px;display:inline-flex;width:auto;min-width:0;align-items:center;justify-content:center;gap:6px;border:1px solid #dee6ec;padding:7px 15px;border-radius:14px;color:var(--m103-navy);font-size:13px;text-align:center;box-shadow:none}
#main .v103-pages button.selected{background:var(--m103-blue);color:#fff;border-color:var(--m103-blue)}
#main .v103-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;direction:inherit}
#main .v103-grid[hidden],#main .v103-home-shell [hidden]{display:none!important}
#main button.v103-tile{--stripe:var(--m103-blue);background:#fff;display:grid;grid-template-columns:104px minmax(0,1fr) auto;align-items:center;gap:10px;position:relative;padding:10px;border-radius:19px;min-width:0;min-height:133px;text-align:start;color:var(--m103-navy);border:1px solid #e3e9ed;box-shadow:0 5px 14px #3545590e;line-height:1.3;overflow:hidden;isolation:isolate;touch-action:manipulation;transition:transform .13s ease,box-shadow .13s ease}
#main button.v103-tile::before{content:'';position:absolute;inset:0 auto 0 0;width:5px;background:var(--stripe);z-index:2}
#main button.v103-tile::after{content:'';position:absolute;inset:0;background:linear-gradient(125deg,color-mix(in srgb,var(--stripe) 7%,white),transparent 64%);z-index:-1;pointer-events:none}
#main button.v103-tile.v103-yellow{--stripe:var(--m103-yellow)}
#main button.v103-tile.v103-orange{--stripe:var(--m103-orange)}
#main button.v103-tile.v103-pink{--stripe:var(--m103-pink)}
#main button.v103-tile.v103-blue{--stripe:var(--m103-blue)}
#main button.v103-tile:hover{transform:translateY(-2px);box-shadow:0 8px 20px #35455917;filter:none}
#main button.v103-tile:active{transform:scale(.988)}
#main .v103-tile-art{display:block;background:#f7faff;border-radius:13px;height:98px;min-width:0;overflow:hidden}
#main .v103-tile-art img{width:100%;height:100%;object-fit:cover;display:block}
#main .v103-tile-body{display:block;min-width:0}
#main .v103-tile-body b{display:block;font-size:clamp(15px,1.5vw,19px);line-height:1.35;color:var(--m103-navy);font-weight:900;overflow-wrap:anywhere}
#main .v103-tile-body small{display:block;font-size:clamp(11px,1vw,13px);line-height:1.45;color:#60727d;margin-top:5px;overflow-wrap:anywhere}
#main .v103-tile-arrow{font-size:19px;color:var(--stripe);align-self:end;display:inline-block}
#main .v103-home-note{font-size:12px;color:#657381;text-align:center;margin:11px 0 0}
/* Classroom lessons page */
#main .v103-lesson-page{max-width:1220px;margin:0 auto;min-width:0}
#main .v103-lesson-head{display:flex;align-items:center;gap:15px;padding:15px;background:white;border:1px solid #e4ebef;border-radius:20px;margin-bottom:12px}
#main .v103-lesson-head>div{min-width:0}
#main .v103-lesson-head h1{font-size:clamp(19px,2.2vw,28px);line-height:1.25;margin:3px 0;color:#354559}
#main .v103-lesson-head span{font-size:13px;color:#1667af;font-weight:800}
#main .v103-lesson-head button{font-size:13px;padding:8px 11px;min-height:43px;flex:none}
#main .v103-grade-picker{max-width:380px;margin:10px 0}
#main .v103-term-tabs{position:static;display:flex;flex-direction:row;gap:9px;margin-bottom:12px;top:auto}
#main .v103-term-tabs button{flex:1;justify-content:center;text-align:center;background:white;color:#354559;border:1px solid #e0e8ed;border-radius:12px;min-height:44px}
#main .v103-term-tabs button.selected{background:#1667af;color:white}
#main .v103-lessons-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
#main .v103-lesson-tile{display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;align-items:center;background:white;color:#354559;text-align:start;border-radius:17px;border:1px solid #e2e8ed;padding:11px;min-width:0;min-height:118px;box-shadow:0 5px 15px #35455910}
#main .v103-lesson-tile img{width:112px;height:91px;object-fit:cover;border-radius:11px}
#main .v103-lesson-tile span{display:block;min-width:0}
#main .v103-lesson-tile small{color:#1667af;font-size:12px;font-weight:800;display:block;line-height:1.4}
#main .v103-lesson-tile b{display:block;line-height:1.45;font-size:15px;margin:3px 0;overflow-wrap:anywhere}
#main .v103-lesson-tile em{display:block;font-style:normal;color:#e62584;font-weight:800;font-size:12px}
#main .v103-empty{grid-column:1/-1;padding:24px;text-align:center;border-radius:18px;background:white;color:#657381}
@media(max-width:1300px){#main .v103-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#main .v103-lessons-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:900px){#main.v103-home{padding:10px 12px}#main .v103-welcome{min-height:105px;grid-template-columns:minmax(0,1fr) 94px auto;gap:10px;padding:10px 13px}#main .v103-school-logo{width:94px;height:71px}#main button.v103-tile{min-height:122px;grid-template-columns:89px minmax(0,1fr);gap:8px}#main .v103-tile-art{height:91px}#main .v103-tile-arrow{display:none}}
@media(max-width:540px){#main.v103-home{padding:8px 9px 16px!important}#main .v103-welcome{min-height:100px;grid-template-columns:minmax(0,1fr) 80px;gap:7px;padding:10px 11px;padding-inline-end:10px}#main .v103-school-logo{grid-column:2;grid-row:1;align-self:center;width:80px;height:62px}#main .v103-welcome-copy{grid-column:1;grid-row:1;padding-top:26px}#main .v103-language{position:absolute;top:7px;inset-inline-start:10px;min-height:28px;padding:3px 7px;font-size:11px;border-radius:9px}#main .v103-welcome h1{font-size:clamp(18px,4.9vw,24px)}#main .v103-classline{font-size:11px;padding:3px 8px}#main .v103-heading{margin:12px 2px 9px}#main .v103-heading h2{font-size:17px}#main .v103-heading p{font-size:11px}#main .v103-progress{font-size:10px;padding:5px 7px}#main .v103-pages{margin-bottom:8px}#main .v103-pages button{font-size:12px;min-height:35px;padding:6px 12px}#main .v103-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}#main button.v103-tile{display:flex;flex-direction:column;justify-content:flex-start;align-items:stretch;gap:6px;text-align:start;padding:7px;min-height:151px;border-radius:15px}#main .v103-tile-art{width:100%;height:71px;border-radius:9px}#main .v103-tile-body b{font-size:clamp(13px,3.4vw,15px);line-height:1.3}#main .v103-tile-body small{font-size:10px;line-height:1.25;margin-top:2px}#main .v103-home-note{margin-top:9px;font-size:10px}#main .v103-lesson-head{padding:10px;gap:8px;align-items:flex-start}#main .v103-lesson-head button{min-height:38px;font-size:12px;padding:7px}#main .v103-lessons-grid{grid-template-columns:1fr}#main .v103-lesson-tile{grid-template-columns:86px minmax(0,1fr);min-height:102px}#main .v103-lesson-tile img{width:86px;height:80px}}
@media(max-width:350px){#main .v103-heading{align-items:flex-start;flex-direction:column;gap:5px}#main .v103-tile-art{height:58px}#main button.v103-tile{min-height:142px}#main .v103-tile-body b{font-size:12px}}
@media(min-width:1450px){#main .v103-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#main button.v103-tile{min-height:138px}}
@media(prefers-reduced-motion:reduce){#main button.v103-tile{transition:none}}

/* V104 selectable MADA card themes. Keep normal page and keyboard scroll rules unchanged. */
#main .v104-quick-theme{flex:none;padding:6px 10px;border-radius:12px;background:white;border:1px solid #dde4ee;color:#354559;min-height:38px;font-size:12px;box-shadow:none}
#main .v103-heading{flex-wrap:wrap}
body[data-home-card-theme="kids"] #main .v103-home-shell{--m103-navy:#303c52}
body[data-home-card-theme="kids"] #main .v103-welcome{background:linear-gradient(115deg,#fff9d8,#fff1f8 52%,#e6f4ff);border-color:#f9d5a2;border-radius:29px;box-shadow:0 8px 16px #efb5c626}
body[data-home-card-theme="kids"] #main .v103-welcome h1{color:#293f64}
body[data-home-card-theme="kids"] #main button.v103-tile{border-radius:25px;border-color:#f1dfd2;box-shadow:0 6px 17px #e0a8a91f;background:linear-gradient(145deg,color-mix(in srgb,var(--stripe) 13%,white),#fff 75%);min-height:143px}
body[data-home-card-theme="kids"] #main .v103-tile-art{border-radius:20px;background:#fff9e8}
body[data-home-card-theme="kids"] #main .v103-pages button.selected{background:#e62584;border-color:#e62584}
body[data-home-card-theme="kids"] #main .v103-tile-arrow{color:#df4787}
body[data-home-card-theme="kids"] #main .v103-home-note{color:#785675}
body[data-home-card-theme="compact"] #main .v103-welcome{min-height:96px;border-radius:14px;background:#fff;border-left:4px solid #1667af;box-shadow:none;padding:12px 16px}
body[data-home-card-theme="compact"] #main button.v103-tile{border-radius:12px;min-height:100px;padding:7px;grid-template-columns:78px minmax(0,1fr) auto;background:#fff;box-shadow:0 2px 7px #35455909}
body[data-home-card-theme="compact"] #main .v103-tile-art{height:76px;border-radius:8px}
body[data-home-card-theme="compact"] #main .v103-tile-body b{font-size:15px}
body[data-home-card-theme="compact"] #main .v103-tile-body small{font-size:11px;margin-top:3px}
body[data-home-card-theme="compact"] #main .v103-grid{gap:8px}
body[data-home-card-theme="compact"] #main .v103-pages button{border-radius:9px}
body[data-home-card-theme="night"] #main.v103-home{background:#182339;border-radius:20px}
body[data-home-card-theme="night"] #main .v103-home-shell{--m103-navy:#f5f7fc}
body[data-home-card-theme="night"] #main .v103-welcome{background:linear-gradient(125deg,#263b58,#24314d);border-color:#39506c;box-shadow:none}
body[data-home-card-theme="night"] #main .v103-welcome h1,body[data-home-card-theme="night"] #main .v103-heading h2{color:#fff}
body[data-home-card-theme="night"] #main .v103-hello{color:#fed94c}
body[data-home-card-theme="night"] #main .v103-heading p,body[data-home-card-theme="night"] #main .v103-home-note{color:#d5e0ed}
body[data-home-card-theme="night"] #main button.v103-tile{background:#263650;border-color:#43546b;box-shadow:none}
body[data-home-card-theme="night"] #main .v103-tile-body b{color:#fff}
body[data-home-card-theme="night"] #main .v103-tile-body small{color:#d2e1f1}
body[data-home-card-theme="night"] #main .v103-tile-art{background:#ecf4ff}
body[data-home-card-theme="night"] #main .v103-pages button{background:#31425c;color:#fff;border-color:#53657b}
body[data-home-card-theme="night"] #main .v103-pages button.selected{background:#1667af;border-color:#1667af}
body[data-home-card-theme="night"] #main .v103-language{background:#40526a;color:#fff}
body[data-home-card-theme="night"] #main .v103-progress{background:#fff2ae;color:#544600}
body[data-home-card-theme="night"] #main .v103-classline{background:#ffeb94;color:#493f24}
/* Admin design picker with visible mini-previews; administration only. */
#main .v104-theme-picker{padding:16px 0;border-block:1px solid #e4e9ee;margin:18px 0}
#main .v104-theme-head h3{margin:0 0 5px}
#main .v104-theme-head p{color:#627185;margin:0 0 12px;font-size:13px}
#main .v104-theme-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
#main button.v104-theme-option{text-align:start;display:flex;flex-direction:column;gap:7px;background:white;color:#334159;border:2px solid #dfe7ed;border-radius:17px;padding:8px;min-height:165px;box-shadow:none}
#main button.v104-theme-option.selected{border-color:#1667af;box-shadow:0 0 0 2px #1667af23}
#main .v104-theme-option b{font-weight:900;font-size:14px;color:#293b57}
#main .v104-theme-option small{font-size:11px;color:#617284;line-height:1.4}
#main .v104-theme-sample{height:75px;width:100%;display:flex;align-items:flex-start;justify-content:space-between;gap:5px;border-radius:10px;background:linear-gradient(135deg,#fff9df,#f3f8ff);padding:9px}
#main .v104-theme-badge{font-size:23px;line-height:1}
#main .v104-theme-mini{display:grid;grid-template-columns:1fr 1fr;gap:4px;width:52%;height:55px}
#main .v104-theme-mini i{background:white;border-left:4px solid #1667af;border-radius:4px;box-shadow:0 1px 3px #23364d17}
#main .v104-theme-mini i:nth-child(2){border-color:#e62584}
#main .v104-theme-mini i:nth-child(3){border-color:#f18b00}
#main .v104-theme-mini i:nth-child(4){border-color:#ffe650}
#main .v104-option-kids .v104-theme-sample{background:linear-gradient(135deg,#fff4c2,#ffdef0)}
#main .v104-option-kids .v104-theme-mini i{border-radius:8px;background:#fff9f1}
#main .v104-option-compact .v104-theme-sample{background:#f0f4fa}
#main .v104-option-compact .v104-theme-mini i{border-radius:2px}
#main .v104-option-night .v104-theme-sample{background:linear-gradient(120deg,#182339,#304261)}
#main .v104-option-night .v104-theme-mini i{background:#445473}
#main .v104-theme-hint{font-size:12px;color:#657381}
@media(max-width:940px){#main .v104-theme-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:540px){body[data-home-card-theme="kids"] #main button.v103-tile{min-height:155px}body[data-home-card-theme="compact"] #main button.v103-tile{min-height:132px;display:flex;flex-direction:column;gap:5px}body[data-home-card-theme="compact"] #main .v103-tile-art{height:62px;width:100%}body[data-home-card-theme="night"] #main.v103-home{border-radius:12px}#main .v104-theme-options{gap:7px}#main button.v104-theme-option{min-height:158px}}
/* Night design legibility on wide iPads and mobile devices. */
body[data-home-card-theme="night"] #main button.v103-tile::after{background:linear-gradient(125deg,#354b67 0%,transparent 78%)}
body[data-home-card-theme="night"] #main .v103-school-logo{background:#fff;border-radius:12px;padding:5px;box-shadow:0 2px 7px #0002}
