:root{--bg:#0b0e18;--surface:#111723;--surface2:#171d2a;--surface3:#1c2433;--stroke:#303a49;--text:#f2eee8;--muted:#a5afbe;--dim:#6d7b8f;--amber:#edb778;--amber2:#f3cb96;--blue:#9ab8d9;--good:#b5d4af;--error:#f1a7a0;--shadow:0 24px 70px #0007}*{box-sizing:border-box}html{scroll-behaviour:smooth}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,'Segoe UI',Arial,system-ui,sans-serif;font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased}button,input{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,input:focus-visible,a:focus-visible{outline:2px solid var(--amber);outline-offset:3px}button{transition:background .2s,border-color .2s,transform .2s,color .2s}button:not(:disabled):active{transform:translateY(1px)}a{color:var(--amber2);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,p{margin-top:0}p{color:var(--muted)}.shell{max-width:1840px;margin:auto;padding:0 24px}.masthead{min-height:110px;display:flex;align-items:center;gap:48px;border-bottom:1px solid var(--stroke);padding:20px 5px}.brand{display:flex;align-items:center;gap:13px;flex:none}.brand-emblem{width:37px;height:41px;border:1px solid #745838;padding:8px 6px;display:flex;align-items:flex-end;gap:3px;transform:skewX(-8deg)}.brand-emblem span{flex:1;display:block;background:var(--amber);border-radius:1px}.brand-emblem span:nth-child(1){height:65%}.brand-emblem span:nth-child(2){height:82%}.brand-emblem span:nth-child(3){height:100%}.brand-emblem span:nth-child(4){height:76%}.brand-emblem span:nth-child(5){height:57%}.brand-name{font-size:13px;letter-spacing:.18em;font-weight:800;white-space:nowrap}.brand-name b{color:var(--amber);font-weight:550}.brand-sub{font-size:9px;letter-spacing:.145em;color:var(--dim);margin-top:3px}.brand-sub span{color:#b4c0ce}.title-area{flex:1;min-width:100px}.eyebrow,.micro-label{display:block;font-size:10px;letter-spacing:.17em;color:var(--amber);font-weight:750}.eyebrow{margin:0 0 4px}.title-area h1{margin:0;font-size:clamp(23px,2.35vw,37px);letter-spacing:.1em;line-height:1;font-weight:790}.title-area h1 span{color:var(--amber);font-weight:380}.header-actions{display:flex;align-items:center;gap:8px}.utility{background:transparent;color:#d6dce6;border:1px solid #354054;border-radius:5px;padding:11px 13px;font-size:11px;font-weight:650;letter-spacing:.04em;white-space:nowrap}.utility span{padding-left:8px;color:var(--amber)}.utility:hover,.outline-btn:hover{border-color:var(--amber);background:#30291f}.workbench{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,370px);grid-template-rows:auto auto auto;gap:17px;align-items:start;padding:20px 0 12px}.viewport-panel{grid-column:1;grid-row:1;position:relative;min-width:0;height:clamp(510px,58vw,700px);background:radial-gradient(ellipse at 50% 35%,#263142 0%,#0b0f1b 72%);border:1px solid #354053;overflow:hidden;border-radius:9px;box-shadow:var(--shadow)}.scene-mount{position:absolute;inset:0}.scene-mount canvas{display:block;touch-action:none}.stage-header{position:absolute;z-index:3;top:0;left:0;right:0;height:55px;display:flex;justify-content:space-between;align-items:center;padding:0 23px;border-bottom:1px solid #ffffff23;background:#090d19ba;color:#bcc7d3;font-size:10px;font-weight:720;letter-spacing:.12em;pointer-events:none}.stage-header>div:first-child{display:flex;align-items:center;gap:9px}.live-led{height:7px;width:7px;border-radius:50%;background:#9ad4a6;box-shadow:0 0 9px #81e4a7}.stage-serial{color:#8290a4;letter-spacing:.1em}.stage-left{pointer-events:none;position:absolute;z-index:2;top:76px;left:24px;text-shadow:0 1px 15px #06090f}.index-label{font-size:11px;letter-spacing:.22em;font-weight:720;color:var(--amber)}.index-label small{font-size:9px;color:#c5c9ce;letter-spacing:.14em}.stage-title{margin-top:13px;font-size:clamp(15px,2vw,22px);line-height:1.2;letter-spacing:.07em;font-weight:780}.stage-title em{font-style:normal;color:var(--amber);font-weight:400}.stage-instruction{position:absolute;bottom:16px;right:18px;color:#a7b4c4;font-size:10px;letter-spacing:.08em;z-index:3;text-align:right;text-shadow:0 2px 9px #000}.stage-instruction span{color:var(--amber);padding:0 5px}.viewbar{position:absolute;left:20px;bottom:43px;z-index:3;display:flex;gap:5px;padding:5px;background:#0b111ed9;border:1px solid #394357;border-radius:7px;backdrop-filter:blur(12px)}.view-btn{padding:8px 12px;color:#bcc7d7;background:transparent;border:1px solid transparent;border-radius:4px;font-size:11px}.view-btn.active{background:#533922;color:var(--amber2);border-color:#976a3b}.view-btn:hover{background:#2b3443}.loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:5px;background:#0d1424;z-index:2;color:var(--text);text-align:center}.loading strong{font-size:18px}.loading span{font-size:12px;color:var(--muted)}.spinner{width:32px;height:32px;border:2px solid #4a4c54;border-top-color:var(--amber);border-radius:50%;animation:spin 1.1s linear infinite;margin-bottom:18px}@keyframes spin{to{transform:rotate(360deg)}}.error-box{position:absolute;z-index:4;inset:auto 20px 105px 20px;padding:18px 20px;background:#1b2634ed;border:1px solid #92634c;border-radius:7px;box-shadow:0 12px 36px #0008}.error-box p{margin:7px 0 12px}.error-box button{border:1px solid var(--amber);color:var(--amber2);padding:8px 13px;background:#33241e}.inspector{grid-column:2;grid-row:1/span 2;min-width:0;background:#111722;border:1px solid var(--stroke);border-radius:9px;overflow:hidden;box-shadow:0 10px 50px #0002}.inspector-heading{display:flex;justify-content:space-between;align-items:center;padding:21px 21px 17px;background:linear-gradient(120deg,#202b39,#121922)}.inspector-heading h2{font-size:22px;font-weight:590;margin:4px 0 0;letter-spacing:-.02em}.serial-circle{width:53px;height:53px;border:1px solid #6f5b46;color:var(--amber);display:flex;flex-direction:column;justify-content:center;align-items:center;border-radius:50%;font-size:22px;line-height:1.05;font-weight:650}.serial-circle span{font-size:8px;letter-spacing:.2em;color:#c0b4a8;margin-top:3px}.selected-card{margin:18px 18px 5px;border:1px solid #4e433c;background:linear-gradient(130deg,#332519,#1b1e27 72%);padding:17px 19px;border-radius:6px}.selected-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;color:var(--amber2);font-size:10px;letter-spacing:.1em;font-weight:740}.focus-tag{padding:4px 7px;border:1px solid #73613c;border-radius:3px;font-size:8px;color:var(--amber);white-space:nowrap}.selected-number{display:flex;align-items:center;justify-content:space-between;margin:10px 0 15px}.selected-number>strong{font-size:64px;line-height:1;font-weight:380;letter-spacing:-.05em}.selected-number>div{text-align:right}.selected-number>div span{font-size:26px;color:#f7d8a9;letter-spacing:.01em;font-variant-numeric:tabular-nums;display:block}.selected-number>div small{font-size:9px;letter-spacing:.14em;color:#aa9f96}.status-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding-top:13px;border-top:1px solid #ffffff23}.status-pair>div{display:flex;flex-direction:column}.status-pair label{font-size:11px;color:#c0b7ad}.status-pair strong{font-weight:700;font-size:15px;font-variant-numeric:tabular-nums}.control-area{padding:17px 19px 4px}.control-section-head{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:20px;font-size:10px;letter-spacing:.12em;color:var(--blue);font-weight:700}.text-btn{background:none;border:none;padding:5px 0;color:var(--amber);font-size:9px;font-weight:750;letter-spacing:.06em;text-align:right}.text-btn:hover{text-decoration:underline}.control{margin-bottom:20px}.control-title{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:9px}.control label{font-size:12px;font-weight:600;color:#e0e3e8}.control output{font-variant-numeric:tabular-nums;color:var(--amber);font-size:12px}input[type=range]{height:4px;width:100%;cursor:pointer;accent-color:var(--amber);display:block;margin:9px 0 7px}.endpoints{display:flex;justify-content:space-between;color:#6e8093;font-size:9px}.audio-board{margin:0 18px 17px;background:#0d1420;border:1px solid #303b4f;padding:13px 13px 11px;border-radius:5px}.audio-head{display:flex;align-items:center;justify-content:space-between;color:var(--blue);font-size:10px;letter-spacing:.075em;font-weight:760}.audio-head span:last-child{color:#adc89f;font-size:9px}#scope{width:100%;height:60px;display:block;background:#0c1220;border-bottom:1px solid #26384b;margin:9px 0}.audio-bottom{display:grid;grid-template-columns:72px 1fr 32px 74px;align-items:center;gap:8px;font-size:10px;color:#bac6d5}.audio-bottom input{min-width:0}.sound-toggle{background:#282b35;border:1px solid #536070;color:#f1d4a5;font-size:10px;padding:7px 4px;border-radius:3px}.inspector-note{padding:0 20px 23px;font-size:11px;color:#8f9cad;line-height:1.6}.inspector-note strong{color:#c3cedb}.learning-panel{grid-column:1;grid-row:2;background:#121a26;border:1px solid var(--stroke);padding:24px 27px;border-radius:8px}.lesson-intro{display:flex;justify-content:space-between;gap:30px}.lesson-intro h2{font-size:25px;margin:6px 0 8px;line-height:1.2;font-weight:580}.lesson-intro p{max-width:680px;font-size:12px;margin:0}.lesson-intro p strong{color:#f3d2a1}.completion-ring{width:92px;height:92px;flex:none;border:5px solid #3b4758;border-top-color:var(--amber);border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center}.completion-ring strong{font-size:23px;line-height:1.2}.completion-ring span{font-size:9px;letter-spacing:.15em;color:var(--muted)}.checkpoint-row{margin-top:20px;display:grid;grid-template-columns:repeat(5,1fr);gap:9px}.checkpoint{min-width:0;padding:11px 11px 10px;background:#192330;border:1px solid #354152;border-radius:5px;text-align:left;color:var(--text)}.checkpoint:hover{border-color:#c99862}.checkpoint.selected{border-color:#a97a4a;background:#2e2a2a}.checkpoint.ready{background:#182a2a;border-color:#507563}.checkpoint strong{font-size:15px;color:#eee5da;display:block}.checkpoint small{display:block;font-size:9px;color:var(--muted);letter-spacing:.09em;margin-top:2px}.checkpoint .checkstat{margin-top:9px;display:flex;gap:8px;font-size:9px;color:#c9a77e;flex-wrap:wrap}.checkpoint.ready .checkstat{color:var(--good)}.challenge-row{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-top:18px;padding-top:16px;border-top:1px solid #344154}.challenge-progress>span{font-size:10px;letter-spacing:.13em;font-weight:780;color:var(--blue)}.challenge-progress p{font-size:12px;margin:6px 0 0;max-width:590px}.challenge-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;min-width:245px}.primary-btn,.outline-btn{border-radius:4px;padding:12px 14px;font-size:11px;font-weight:770;letter-spacing:.06em;white-space:nowrap}.primary-btn{border:1px solid #f0bc7d;color:#1b1a19;background:var(--amber)}.primary-btn:hover:not(:disabled){background:#ffcd91}.primary-btn span{padding-left:7px}.outline-btn{color:#d6be9f;border:1px solid #665a4e;background:transparent}.sequence-dots{display:flex;gap:5px;margin-top:8px}.sequence-dots:empty{display:none}.sequence-dots i{display:block;width:19px;height:5px;background:#435266;border-radius:2px}.sequence-dots i.on{background:var(--amber)}.sequence-dots i.off{background:var(--error)}.result-panel{margin-top:17px;display:flex;align-items:center;gap:18px;padding:15px;background:#2a271f;border:1px solid #8a6b43;border-radius:5px}.result-panel[hidden]{display:none}.result-overline{font-size:10px;color:var(--amber)}.result-panel>strong{font-size:23px;color:var(--amber2)}.result-panel>div{display:flex;flex-direction:column;margin-left:auto}.result-panel>div span:first-child{font-size:22px}.result-panel>div span:last-child{font-size:9px;color:var(--muted)}.keyboard-panel{grid-column:1;grid-row:3;border:1px solid var(--stroke);background:#101722;border-radius:7px;padding:18px 21px;min-width:0}.keys-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.keys-heading h2{font-size:18px;margin:3px 0 0;font-weight:600}.keys-heading>span{font-size:10px;color:#879caf;letter-spacing:.11em}.note-keys{display:grid;grid-template-columns:repeat(15,minmax(0,1fr));gap:5px}.note-key{position:relative;min-width:0;min-height:87px;border:1px solid #6b4b37;border-top-color:#b1865f;border-radius:4px;background:linear-gradient(130deg,#966038,#4e342b 82%);box-shadow:inset 2px 0 3px #ffffff15,inset -2px 0 4px #0005;color:#fbe3ca;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:8px 2px}.note-key:hover{border-color:#eec38b;filter:brightness(1.2)}.note-key.focus{border-bottom:4px solid var(--amber)}.note-key.chosen{box-shadow:inset 0 0 0 2px #ffe5b7,0 0 14px #ac733755}.note-key.playing{background:linear-gradient(130deg,#cf9866,#795344);transform:translateY(2px)}.note-key span{font-size:12px;font-weight:800}.note-key small{font-size:10px;opacity:.8}.context-panel{grid-column:2;grid-row:3;background:#1a1d26;border:1px solid #383b43;border-radius:7px;padding:23px 22px;min-height:206px}.context-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.context-head>span:last-child{font-size:9px;letter-spacing:.1em;color:#9b9ead}.context-panel h3{margin:11px 0;font-size:19px;line-height:1.2;font-weight:600}.context-panel p{font-size:12px;line-height:1.65;margin-bottom:10px}.context-panel strong{color:#dfd6c9}.context-panel a{font-size:11px;letter-spacing:.02em}footer{display:flex;justify-content:space-between;gap:10px;border-top:1px solid #303849;color:#78899c;padding:18px 4px 28px;font-size:10px;letter-spacing:.07em}.warm{color:var(--amber)}.modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px}.modal[hidden]{display:none}.modal-underlay{position:absolute;inset:0;background:#030608d9;backdrop-filter:blur(7px)}.modal-card{position:relative;background:#171e2d;border:1px solid #755d47;max-width:630px;max-height:min(86vh,850px);overflow-y:auto;border-radius:10px;padding:30px 35px;box-shadow:var(--shadow)}.modal-card h2{font-size:30px;font-weight:550;margin:8px 0 21px}.modal-card p{font-size:13px;line-height:1.8;margin-bottom:14px}.modal-card strong{color:#f4cf97}.modal-card .tiny{font-size:11px;border-top:1px solid #3b4755;padding-top:16px}.close{position:absolute;right:18px;top:10px;color:#f8dcac;border:0;background:transparent;font-size:29px}@media(max-width:1270px){.shell{padding:0 15px}.masthead{gap:18px}.brand-sub{display:none}.workbench{grid-template-columns:minmax(0,1fr) 335px;gap:12px}.lesson-intro h2{font-size:22px}.challenge-row{align-items:stretch;flex-direction:column}.challenge-actions{justify-content:flex-start}.stage-instruction{font-size:8px}.utility{padding:10px 8px}}@media(max-width:1020px){.masthead{flex-wrap:wrap;gap:14px;padding:14px 3px}.brand{order:1}.title-area{order:2}.header-actions{order:3;width:100%;justify-content:flex-start}.workbench{grid-template-columns:minmax(0,1fr) 320px}.viewport-panel{height:570px}.stage-instruction{max-width:65%;line-height:1.7}.note-key{min-height:70px}}@media(max-width:850px){.workbench{display:flex;flex-direction:column}.viewport-panel,.learning-panel,.inspector,.keyboard-panel,.context-panel{width:100%}.viewport-panel{height:clamp(390px,67vw,600px);flex:none}.inspector{order:3}.learning-panel{order:2}.keyboard-panel{order:4}.context-panel{order:5}.inspector-heading{padding:18px}.control-area{display:grid;grid-template-columns:1fr 1fr;gap:0 22px}.control-section-head{grid-column:1/-1}.selected-card{margin-bottom:16px}.audio-board{max-width:100%}.note-keys{grid-template-columns:repeat(15,minmax(42px,1fr));overflow-x:auto;padding-bottom:8px}.keyboard-panel{overflow-x:auto}.stage-title{font-size:17px}footer{flex-direction:column}}@media(max-width:540px){.shell{padding:0 10px}.masthead{gap:11px}.brand-name{font-size:11px}.title-area{min-width:0}.title-area h1{font-size:24px}.eyebrow{font-size:8px;letter-spacing:.08em}.header-actions{gap:6px}.utility{flex:1;font-size:10px}.viewport-panel{height:430px}.stage-header{padding:0 11px;height:42px}.stage-serial{display:none}.stage-left{top:59px;left:13px}.index-label{font-size:9px}.stage-title{font-size:14px}.viewbar{left:8px;bottom:46px;padding:3px;gap:0}.view-btn{padding:6px 7px;font-size:9px}.stage-instruction{bottom:8px;left:8px;right:8px;max-width:unset;font-size:8px;text-align:left}.learning-panel{padding:20px 15px}.lesson-intro{gap:12px}.lesson-intro h2{font-size:20px}.lesson-intro p{font-size:11px}.completion-ring{width:64px;height:64px;border-width:3px}.completion-ring strong{font-size:16px}.completion-ring span{font-size:7px}.checkpoint-row{gap:4px}.checkpoint{padding:9px 5px}.checkpoint strong{font-size:12px}.checkpoint small{font-size:8px}.checkpoint .checkstat{font-size:8px;gap:4px}.control-area{display:block}.audio-bottom{grid-template-columns:60px 1fr 28px 67px}.context-panel{padding:19px}.result-panel{gap:9px;flex-wrap:wrap}.modal-card{padding:22px 18px}.modal-card h2{font-size:25px}.loading strong{font-size:15px}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behaviour:auto!important;animation-duration:.001ms!important;transition-duration:.001ms!important}}
.loading[hidden]{display:none}
