:root{font-family:Inter,Noto Sans JP,Hiragino Kaku Gothic ProN,Yu Gothic,sans-serif;color:#071e58;background:#f7fbff;font-synthesis:none;--blue: #0865eb;--navy: #071e58;--green: #25bd37;--card: rgba(255, 255, 255, .96);--shadow: 0 6px 16px rgba(33, 100, 158, .16), 0 1px 3px rgba(23, 78, 125, .1)}*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh;background:linear-gradient(180deg,#eff9ff 0,#fff 40%,#eff9ff)}body.tutorial-active{overflow:hidden}button{font:inherit}button:focus-visible{outline:4px solid #ffbc1c;outline-offset:3px}.topbar{height:116px;padding:18px 20px;display:grid;grid-template-columns:94px 1fr 174px;align-items:center;gap:18px;background:linear-gradient(110deg,#d5f2ff,#c7ebff 60%,#d9f4ff);box-shadow:0 3px 10px #2c75ae1f;position:relative;z-index:5}.topbar h1{margin:0;text-align:center;font:800 clamp(36px,5.5vw,64px)/1 Georgia,serif;letter-spacing:4px;text-shadow:0 2px 0 #fff,0 3px 4px rgba(0,0,0,.18)}.icon-button,.help-button,.stage-button{background:#fff;border:0;color:var(--blue);box-shadow:var(--shadow);cursor:pointer}.icon-button{width:94px;height:82px;border-radius:18px;display:grid;place-items:center}.icon-button svg{width:52px;height:52px;fill:none;stroke:currentColor;stroke-width:3.5;stroke-linecap:round}.top-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}.help-button{width:58px;height:58px;flex:0 0 auto;border-radius:50%;display:grid;place-items:center}.help-button svg{width:38px;height:38px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round}.stage-button{min-height:66px;border-radius:15px;font-weight:800;font-size:27px;padding:10px 16px}.stage-menu,.settings-menu{position:fixed;z-index:30;top:106px;width:min(340px,calc(100vw - 32px));max-height:calc(100vh - 122px);overflow-y:auto;padding:22px;border-radius:20px;background:#fff;box-shadow:0 15px 45px #052c6247;transform:translateY(-18px);opacity:0;pointer-events:none;transition:.2s ease}.stage-menu{right:16px}.settings-menu{left:16px}.stage-menu.open,.settings-menu.open{transform:translateY(0);opacity:1;pointer-events:auto}.stage-menu h2,.settings-menu h2{margin:0 0 14px;font-size:22px}.stage-menu-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.stage-menu-heading h2{margin:0}.sound-toggle{width:auto!important;min-height:42px;margin:0!important;padding:7px 11px!important;border-color:#b9d6ec!important;background:#fff!important;color:var(--navy)!important;font-size:14px;font-weight:900;white-space:nowrap}.completion-progress{position:relative;height:28px;margin:13px 0 4px;overflow:hidden;border-radius:999px;background:#e7f1f8}.completion-progress span{position:absolute;inset:0 auto 0 0;width:var(--progress);border-radius:inherit;background:linear-gradient(90deg,#2cbd4c,#77d98a);transition:width .35s ease}.completion-progress b{position:relative;width:100%;height:100%;display:grid;place-items:center;color:#173b62;font-size:11px;line-height:1;letter-spacing:1px;white-space:nowrap}.progress-meta{margin:5px 3px 1px;display:flex;justify-content:space-between;color:#54718e;font-size:12px;font-weight:900}.free-play-toggle{justify-content:center!important;border-color:#b9d6ec!important;background:#fff!important;color:#315d83!important;font-size:13px;font-weight:900;text-align:center!important}.stage-menu button{width:100%;display:flex;align-items:center;gap:13px;border:2px solid #d4e7f8;border-radius:13px;background:#f6fbff;color:var(--navy);margin-top:9px;padding:10px;cursor:pointer;text-align:left}.stage-menu button.current{color:#fff;border-color:#0870ef;background:#0870ef}.stage-menu button.locked{border-color:#e0e7ed;background:#f3f5f7;color:#8494a3;opacity:.72;cursor:not-allowed}.stage-menu button.locked>b{background:#e4e9ed;color:#6e7c88;font-size:14px}.stage-menu button[data-stage]>b{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#fffc;color:#075ed5}.stage-menu button>span{min-width:0}.menu-record{margin-top:2px;display:block;color:#64829e;font-size:11px;font-weight:900}.menu-record span{color:#e99b00;letter-spacing:1px}.stage-menu button.current .menu-record{color:#dceeff}.stage-menu button.boss-stage:not(.current){border-color:#efb235;background:#fff8df}.boss-label{margin-right:6px;padding:2px 6px;border-radius:999px;background:#e77a00;color:#fff;font-size:9px;font-style:normal;letter-spacing:.7px}.settings-menu button{width:100%;min-height:62px;margin-top:10px;padding:9px 12px;display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:11px;border:2px solid #d4e7f8;border-radius:14px;background:#f6fbff;color:var(--navy);cursor:pointer;text-align:left}.settings-menu button>span{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:#e2f1ff;color:#0967cf;font-size:22px;font-weight:900}.settings-menu button>b{font-size:15px}.settings-menu button>small{color:#607d98;font-size:12px;font-weight:900}.settings-menu button:hover{border-color:#8cbde5;background:#eff8ff}.settings-menu .reset-progress-button{border-color:#efc2c2;background:#fff7f7;color:#ad2929}.settings-menu .reset-progress-button>span{background:#ffe5e5;color:#c23434}.settings-menu .reset-progress-button:hover{border-color:#dc7777;background:#fff0f0}body.reset-active,body.chapter-active{overflow:hidden}.chapter-shortcuts{margin-top:10px;display:grid;grid-template-columns:1fr 1fr;gap:8px}.stage-menu .chapter-shortcut{min-height:68px;margin:0;padding:8px;gap:7px}.stage-menu .chapter-shortcut>span{font-size:25px}.stage-menu .chapter-shortcut b{font-size:13px}.stage-menu .chapter-shortcut small{margin-top:3px;display:block;color:#607d98;font-size:9px}.stage-menu .chapter-shortcut.rpn-chapter{border-color:#d5c5f4;background:#faf7ff}.chapter-chooser-scrim{position:fixed;z-index:130;inset:0;display:grid;place-items:center;padding:22px;background:#031436c7;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px)}.chapter-chooser{width:min(720px,100%);padding:34px;border:3px solid #cae7ff;border-radius:28px;background:linear-gradient(145deg,#fff,#f4faff);box-shadow:0 24px 70px #01122d6b;text-align:center}.chapter-chooser-kicker{margin:0 0 5px;color:#0870ef;font:900 13px/1.2 Georgia,serif;letter-spacing:3px}.chapter-chooser h2{margin:0;color:var(--navy);font-size:31px}.chapter-chooser-intro{margin:10px 0 24px;color:#55738e;font-size:15px;font-weight:700;line-height:1.6}.chapter-choice-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.chapter-choice{min-height:260px;padding:22px;display:flex;flex-direction:column;align-items:center;justify-content:center;border:3px solid;border-radius:23px;cursor:pointer;transition:transform .15s,box-shadow .15s}.chapter-choice:hover{transform:translateY(-4px)}.chapter-choice-icon{font-size:58px;line-height:1.1}.chapter-choice b{margin-top:7px;font-size:27px}.chapter-choice small{margin:9px 0 16px;font-size:14px;font-weight:700;line-height:1.6}.chapter-choice strong{font-size:15px}.stack-choice{border-color:#5aa8ed;background:linear-gradient(145deg,#edf8ff,#dcefff);color:#074eae;box-shadow:0 7px #2782d2}.rpn-choice{border-color:#9a75dd;background:linear-gradient(145deg,#f7f0ff,#e6d8ff);color:#5424a6;box-shadow:0 7px #7042c4}.reset-dialog-scrim{position:fixed;z-index:120;inset:0;display:grid;place-items:center;padding:20px;background:#031436b8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}.reset-dialog{width:min(460px,100%);box-sizing:border-box;padding:27px 25px 24px;border:3px solid #ffd1d1;border-radius:24px;background:#fff;box-shadow:0 22px 60px #01122d61;color:var(--navy);text-align:center}.reset-dialog-icon{width:58px;height:58px;margin:0 auto 12px;display:grid;place-items:center;border-radius:50%;background:#fff0f0;color:#c23434;font-size:35px;font-weight:900}.reset-dialog h2{margin:0 0 12px;font-size:24px}.reset-dialog p{margin:0;color:#496782;font-size:15px;font-weight:700;line-height:1.7}.reset-dialog .reset-dialog-note{margin-top:9px;color:#71879b;font-size:13px}.reset-dialog-actions{margin-top:20px;display:grid;grid-template-columns:1fr 1fr;gap:12px}.reset-dialog-actions button{min-height:52px;border:2px solid #c8d9e7;border-radius:13px;background:#f7fbfe;color:#385977;font-size:15px;font-weight:900;cursor:pointer}.reset-dialog-actions .danger{border-color:#b51f1f;background:#d93d3d;color:#fff}.reset-dialog-actions .danger:hover{background:#bd2828}main{width:min(900px,calc(100% - 48px));margin:26px auto 0;padding-bottom:30px}.card{background:var(--card);border:1px solid #dcebf6;border-radius:28px;box-shadow:var(--shadow)}.challenge{position:relative;min-height:290px;text-align:center;padding:0 28px 36px}.boss-challenge-banner{position:absolute;top:15px;right:18px;padding:6px 12px;border-radius:999px;background:#6d3bd0;color:#fff;box-shadow:0 4px 10px #40208033;font-size:13px;font-weight:900}.label{display:inline-block;transform:translateY(-3px);min-width:178px;padding:10px 28px;border:2px solid #f0a500;border-radius:15px;background:linear-gradient(100deg,#ffe887,#fff3bd);color:#171717;font-size:36px;font-weight:700}.goal-copy{margin:7px 0 0;color:#54718e;font-size:17px;font-weight:700}.goal-copy b{color:var(--blue);letter-spacing:2px}.challenge h2{margin:10px 0 26px;font-size:32px}.target-sequence,.output-sequence{display:flex;align-items:center;justify-content:center;gap:clamp(10px,4vw,44px)}.target-letter{font-size:clamp(54px,9vw,88px);line-height:1;font-weight:800;color:var(--navy);transition:.2s}.target-letter.active{color:#f18700;transform:scale(1.08)}.target-letter.done{color:#8ca1ba}.arrow{font-size:clamp(30px,5vw,48px);color:var(--navy)}.incoming{margin-top:20px;min-height:116px;padding:14px 32px;display:flex;align-items:center;justify-content:space-between;gap:20px}.incoming h2{margin:0;color:var(--blue);font-size:26px;white-space:nowrap}.incoming-list{display:flex;gap:24px}.letter-chip{width:88px;height:82px;display:grid;place-items:center;border:2px solid #d8dce2;border-radius:13px;background:#fff;box-shadow:0 4px 7px #0002;color:#14234e;font-size:52px;font-weight:800}.letter-chip.next{color:#fff;border:4px solid #b7e8ff;outline:3px solid var(--blue);background:linear-gradient(#0784f8,#0866e9);box-shadow:0 7px #034bc4,0 9px 12px #1261b84a}.letter-chip.used{color:#99a1ac;opacity:.62;background:#f0f1f3}.stack-area{margin-top:20px;min-height:560px;padding:18px 28px 28px}.stack-area h2{margin:0 0 14px;text-align:center;color:var(--blue);font-size:32px}.stack-area small{font-size:.8em}.stack-wrap{min-height:478px;display:flex;align-items:flex-end;justify-content:center;gap:16px}.stack{width:270px;padding:12px 16px 10px;border:3px solid var(--blue);border-radius:20px;display:flex;flex-direction:column;gap:8px}.stack-slot{height:83px;border-radius:13px;display:grid;place-items:center;font-size:58px;line-height:1;font-weight:800}.stack-slot.empty{border:2px dashed #8cc7fb;background:linear-gradient(100deg,#ecf8ff,#f8fbfe)}.stack-slot.filled{border:2px solid;color:#111}.color-0{background:linear-gradient(100deg,#b9e3ff,#daefff);border-color:#0481ef!important}.color-1{background:linear-gradient(100deg,#c5f49b,#e4ffc9);border-color:#38aa1f!important}.color-2{background:linear-gradient(100deg,#ffe79d,#fff3c7);border-color:#e3a20b!important}.top-marker{align-self:flex-end;margin-bottom:38px;min-width:170px;color:var(--blue);font-size:29px;font-weight:800}.top-marker span{font-size:62px;line-height:.5;vertical-align:middle}.top-marker.muted{color:#7fa4c8;font-size:22px}.stack-wrap.dual{min-height:410px;align-items:flex-end;gap:28px}.stack-panel{width:250px;padding:14px;border:3px solid #c5dced;border-radius:22px;background:#f7fbff;color:var(--navy);cursor:pointer;box-shadow:0 5px 12px #1450821f}.stack-panel.selected{border-color:var(--blue);background:#edf7ff;box-shadow:0 0 0 4px #bce7ff,0 7px 16px #0865eb33}.stack-panel .stack{width:100%;margin-top:10px}.stack-name,.selection-mark{display:block;text-align:center}.stack-name{font-size:24px;font-weight:800}.selection-mark{min-height:25px;margin-top:4px;color:#6e91ae;font-size:16px;font-weight:700}.stack-panel.selected .selection-mark{color:var(--blue)}.status{margin-top:20px;min-height:105px;padding:15px 34px;display:flex;align-items:center;justify-content:center;gap:28px}.status-item{position:relative;display:flex;align-items:center;gap:14px;font-size:24px;font-weight:700}.status svg,.footer-actions svg{width:64px;height:64px;fill:none;stroke:var(--blue);stroke-width:2.7;stroke-linecap:round;stroke-linejoin:round}.status strong{font-size:46px;color:var(--blue);white-space:nowrap}.status strong.next-target{color:#f18700}.status strong small{font-size:20px;margin-left:5px}.divider{width:2px;height:62px;background:#a5c8e7}.status-restart{border:0;background:transparent;color:var(--blue);display:flex;flex-direction:column;align-items:center;gap:2px;font-size:15px;font-weight:800;cursor:pointer}.status-restart svg{width:44px;height:44px}.combo-badge{position:absolute;right:0;bottom:-13px;padding:2px 7px;border-radius:999px;background:#fff0c4;color:#d66b00;font-size:10px;font-style:normal;font-weight:900;white-space:nowrap;animation:combo-in .25s ease-out}.message{min-height:31px;margin:10px 0;text-align:center;color:#46749d;font-size:17px;font-weight:700}.message.success{color:#168d2d}.message.error{color:#d43030}.score-strip{min-height:82px;margin-top:12px;padding:12px 24px;display:grid;grid-template-columns:repeat(4,1fr);align-items:center;text-align:center}.score-strip>span{padding:0 15px;border-right:1px solid #c9ddec}.score-strip>span:last-child{border:0}.score-strip small,.score-strip strong{display:block}.score-strip small{color:#63819c;font-size:13px;font-weight:800}.score-strip strong{margin-top:2px;color:var(--navy);font-size:23px}.score-strip .score-stars{color:#eca400;letter-spacing:2px}.score-strip .score-rule{color:#168d2d;font-size:18px}.score-strip .score-streak{color:#d66b00}.hint-button{min-height:48px;margin:0 auto 12px;padding:8px 18px;display:block;border:2px solid #e6a400;border-radius:999px;background:#fff9d7;color:#765000;box-shadow:0 4px 10px #8b650026;font-size:16px;font-weight:900;cursor:pointer}.hint-button small{margin-left:7px;color:#9a7130;font-size:11px}.hint-button:hover{background:#fff0a8}.progressive-hint{max-width:720px;margin:0 auto 12px;padding:12px 18px;display:flex;align-items:center;gap:13px;border:2px solid #efb22d;border-radius:16px;background:linear-gradient(110deg,#fff9dc,#fffdf1);color:#684900;box-shadow:0 5px 15px #6b4b1020}.progressive-hint>span{flex:0 0 auto;padding:5px 9px;border-radius:999px;background:#f4b814;color:#352500;font-size:11px;font-weight:900}.progressive-hint p{margin:0;font-size:14px;font-weight:800;line-height:1.5}.rpn-progressive-hint{border-color:#a684e4;background:linear-gradient(110deg,#f6efff,#fdfaff);color:#4e2a8d}.rpn-progressive-hint>span{background:#7545cd;color:#fff}.rpn-hint-button{margin-top:14px}.challenge-mode-button{min-height:44px;margin:0 auto 8px;padding:7px 17px;display:block;border:2px solid #8254dc;border-radius:999px;background:#f2ebff;color:#5624af;box-shadow:0 4px 10px #4c278426;font-size:14px;font-weight:900;cursor:pointer}.challenge-mode-button.active{background:#6f3dcc;color:#fff}.clear-challenge{margin:10px auto 2px}.controls{display:grid;grid-template-columns:1fr 1fr;gap:38px}.controls.dual-controls{grid-template-columns:repeat(3,1fr);gap:18px}.control-button{min-height:150px;border-radius:23px;border:4px solid;color:#fff;box-shadow:0 8px,0 12px 18px #184a7c33;display:flex;align-items:center;justify-content:center;gap:28px;cursor:pointer;transition:transform .1s,filter .1s}.control-button:hover:not(:disabled){filter:brightness(1.08);transform:translateY(-2px)}.control-button:active:not(:disabled){transform:translateY(5px);box-shadow:0 3px}.control-button.push{background:linear-gradient(120deg,#187bdc,#0962eb);border-color:#b7e9ff;box-shadow-color:#0344bd}.control-button.pop{background:linear-gradient(120deg,#28b837,#35d843);border-color:#a4f7ae;box-shadow-color:#078a1b}.control-button.transfer{background:linear-gradient(120deg,#8a55db,#6740bd);border-color:#ddcaff;box-shadow-color:#44218e}.control-button:disabled{opacity:.42;cursor:not-allowed;box-shadow:0 5px #7d8b96}.control-button svg{width:86px;height:86px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.control-button span{display:flex;flex-direction:column;font-size:45px;font-weight:800;line-height:1.05;letter-spacing:2px}.control-button small{font-size:30px;margin-bottom:7px}.dual-controls .control-button{gap:12px}.dual-controls .control-button svg{width:58px;height:65px}.dual-controls .control-button span{font-size:29px}.dual-controls .control-button small{font-size:16px}.recommended{position:relative;z-index:1;outline:5px solid #ffc31f;outline-offset:5px;animation:recommended-pulse 1.05s ease-in-out infinite}.recommended:after{position:absolute;top:-19px;right:-10px;padding:4px 9px;border-radius:999px;background:#ffb800;color:#382300;content:"次はここ！";font-size:13px;font-weight:900;letter-spacing:0;box-shadow:0 3px 8px #6a470033}.output{margin-top:26px;padding:10px 35px 20px}.output h2{margin:0 0 8px;text-align:center;color:var(--blue);font-size:28px}.output-sequence{gap:clamp(8px,2.5vw,25px)}.output-box{width:78px;height:72px;display:grid;place-items:center;border:2px solid #d8dde4;border-radius:10px;background:#fff;box-shadow:inset 0 2px 4px #0000000c;font-size:43px;font-weight:800}.output-box.filled{border-color:#60aaf5;background:#ebf6ff}.push-arrive{animation:push-arrive .34s cubic-bezier(.2,.9,.3,1.2)}.pop-release{animation:pop-release .28s ease-out}.pop-arrive{animation:pop-arrive .38s cubic-bezier(.18,.9,.25,1.25)}.output .arrow{font-size:34px}.footer-actions{display:flex;justify-content:center;gap:18px;margin-top:8px}.footer-actions:empty{display:none}.footer-actions button{min-height:54px;border:0;background:transparent;color:var(--blue);font-size:28px;font-weight:800;display:flex;align-items:center;gap:12px;cursor:pointer}.footer-actions svg{width:46px;height:46px}.footer-actions .next-stage{color:#fff;background:var(--blue);border-radius:14px;padding:5px 22px;font-size:21px}.all-clear{margin-top:18px;padding:22px;text-align:center;border-color:#f0bd36;background:linear-gradient(120deg,#fff6c8,#fff)}.all-clear strong,.all-clear span{display:block}.all-clear strong{color:#b36a00;font-size:30px}.all-clear span{margin-top:6px;color:var(--navy);font-size:20px;font-weight:800}.clear-summary{position:relative;margin-top:18px;padding:18px 24px 21px;overflow:hidden;border:3px solid #f1bd2e;background:linear-gradient(135deg,#fff9d9,#fff 55%,#e9f8ff);text-align:center;animation:clear-card-in .5s cubic-bezier(.18,.85,.25,1.15)}.clear-summary:before,.clear-summary:after{position:absolute;color:#ffbd1d;content:"✦";font-size:45px;animation:sparkle 1s ease-in-out infinite alternate}.clear-summary:before{top:12px;left:9%}.clear-summary:after{right:9%;bottom:8px;animation-delay:.3s}.clear-stars{color:#f3a900;font-size:36px;letter-spacing:5px;text-shadow:0 2px 0 #fff}.clear-summary h2{margin:2px 0 8px;color:#d77900;font-size:34px}.clear-summary p{margin:0;display:flex;align-items:center;justify-content:center;gap:18px;color:#46647f;font-weight:800}.clear-summary p strong{color:var(--blue);font-size:28px}.new-best{display:inline-block;margin-top:10px;padding:4px 12px;border-radius:999px;background:#ed7b00;color:#fff;font-size:13px;letter-spacing:1px}.medal-list{margin-top:10px;display:flex;flex-wrap:wrap;justify-content:center;gap:7px}.medal-list span{padding:4px 9px;border:1px solid #efbd38;border-radius:999px;background:#fff8d9;color:#865300;font-size:12px;font-weight:900}.game-toast{position:fixed;z-index:90;top:max(130px,calc(env(safe-area-inset-top) + 95px));left:50%;min-width:230px;padding:15px 24px;display:flex;align-items:center;justify-content:center;gap:12px;border:3px solid #fff;border-radius:999px;color:#fff;box-shadow:0 12px 35px #001b4e55;font-size:24px;font-weight:900;pointer-events:none;transform:translate(-50%);animation:toast-in .3s cubic-bezier(.2,.9,.25,1.25)}.game-toast strong{font-size:28px}.game-toast.success{background:linear-gradient(120deg,#ffae00,#f27600)}.game-toast.good{background:linear-gradient(120deg,#1db83a,#099a28)}.game-toast.error{background:linear-gradient(120deg,#e55757,#c93131)}.game-toast.leaving{animation:toast-out .2s ease-in forwards}.tutorial-scrim{position:fixed;z-index:100;inset:0;background:#031436b8;-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:tutorial-scrim-in .22s ease-out}.tutorial-focus{position:relative;z-index:101!important;outline:5px solid #fff;outline-offset:4px;box-shadow:0 0 0 10px #ffb321,0 16px 45px #00164380!important;animation:tutorial-focus-pulse 1.35s ease-in-out infinite}.tutorial-surface{z-index:101!important}.tutorial-coach{position:fixed;z-index:102;left:50%;width:min(560px,calc(100% - 32px));padding:24px 28px 25px;border:3px solid #b9e6ff;border-radius:24px;background:#fff;box-shadow:0 25px 70px #00164373;text-align:center;transform:translate(-50%)}.tutorial-coach:after{position:absolute;left:50%;width:20px;height:20px;background:#fff;content:"";transform:translate(-50%) rotate(45deg)}.tutorial-top{top:max(28px,calc(env(safe-area-inset-top) + 18px));animation:tutorial-coach-from-top .28s ease-out}.tutorial-top:after{bottom:-10px}.tutorial-bottom{bottom:max(28px,calc(env(safe-area-inset-bottom) + 18px));animation:tutorial-coach-from-bottom .28s ease-out}.tutorial-bottom:after{top:-10px}.tutorial-close{position:absolute;top:14px;right:16px;width:44px;height:44px;border:0;border-radius:50%;background:#edf6fc;color:var(--navy);font-size:31px;line-height:1;cursor:pointer}.tutorial-progress{display:flex;justify-content:center;gap:9px;margin:2px 48px 14px}.tutorial-progress span{width:44px;height:8px;border-radius:10px;background:#dbe8f2}.tutorial-progress span.current{background:var(--blue)}.tutorial-progress span.done{background:#66b8fa}.tutorial-step-label{margin:0;color:var(--blue);font-size:15px;font-weight:900;letter-spacing:2px}.tutorial-coach h2{margin:7px 0 10px;color:var(--navy);font-size:28px}.tutorial-body{margin:10px auto 18px;max-width:500px;color:#24476c;font-size:17px;font-weight:700;line-height:1.55}.tutorial-buttons{display:grid;grid-template-columns:1fr 1.4fr;gap:14px}.tutorial-buttons button{min-height:58px;border:2px solid #b8d8ef;border-radius:14px;background:#f4f9fc;color:var(--navy);font-size:20px;font-weight:800;cursor:pointer}.tutorial-buttons button.primary{border-color:var(--blue);background:var(--blue);color:#fff}.tutorial-buttons button:disabled{opacity:.38;cursor:not-allowed}#pushButton.tutorial-focus svg{animation:tutorial-push-arrow 1s ease-in-out infinite}#popButton.tutorial-focus svg{animation:tutorial-pop-arrow 1s ease-in-out infinite}@keyframes push-arrive{0%{opacity:.15;transform:translateY(-34px) scale(.86)}70%{transform:translateY(3px) scale(1.04)}to{opacity:1;transform:none}}@keyframes pop-release{45%{transform:translateY(-8px);filter:brightness(1.12)}to{transform:none}}@keyframes pop-arrive{0%{opacity:.15;transform:translateY(-28px) scale(.75)}70%{transform:translateY(3px) scale(1.08)}to{opacity:1;transform:none}}@keyframes tutorial-scrim-in{0%{opacity:0}}@keyframes tutorial-focus-pulse{50%{outline-color:#fff5a8;outline-offset:8px;filter:brightness(1.08)}}@keyframes tutorial-coach-from-top{0%{opacity:0;transform:translate(-50%,-18px) scale(.98)}to{opacity:1;transform:translate(-50%)}}@keyframes tutorial-coach-from-bottom{0%{opacity:0;transform:translate(-50%,18px) scale(.98)}to{opacity:1;transform:translate(-50%)}}@keyframes tutorial-push-arrow{50%{transform:translateY(8px)}}@keyframes tutorial-pop-arrow{50%{transform:translateY(-8px)}}@keyframes recommended-pulse{50%{outline-color:#fff07a;outline-offset:9px;filter:brightness(1.09)}}@keyframes clear-card-in{0%{opacity:0;transform:translateY(18px) scale(.97)}}@keyframes sparkle{to{transform:rotate(25deg) scale(1.25);opacity:.55}}@keyframes toast-in{0%{opacity:0;transform:translate(-50%,-18px) scale(.8)}}@keyframes toast-out{to{opacity:0;transform:translate(-50%,-12px) scale(.92)}}@keyframes combo-in{0%{opacity:0;transform:scale(.65)}}@media(prefers-reduced-motion:reduce){.push-arrive,.pop-release,.pop-arrive,.tutorial-scrim,.tutorial-focus,.tutorial-coach,.recommended,.clear-summary,.game-toast,#pushButton.tutorial-focus svg,#popButton.tutorial-focus svg{animation:none!important}}@media(min-width:761px)and (max-height:1000px){.topbar{height:86px;padding:10px 18px;grid-template-columns:72px 1fr 150px}.topbar h1{font-size:clamp(34px,4.5vw,48px)}.icon-button{width:72px;height:62px}.icon-button svg{width:42px;height:42px}.help-button{width:48px;height:48px}.help-button svg{width:32px;height:32px}.stage-button{min-height:54px;padding:7px 12px;font-size:20px}.stage-menu,.settings-menu{top:78px;max-height:calc(100vh - 90px)}main{width:min(820px,calc(100% - 36px));margin-top:14px}.card{border-radius:22px}.challenge{min-height:198px;padding:0 22px 21px}.label{min-width:150px;padding:6px 22px;font-size:28px}.goal-copy{margin-top:3px;font-size:14px}.challenge h2{margin:5px 0 13px;font-size:25px}.target-letter{font-size:clamp(46px,7vw,66px)}.target-sequence{gap:clamp(9px,3vw,28px)}.target-sequence .arrow{font-size:34px}.incoming{min-height:78px;margin-top:12px;padding:8px 24px}.incoming h2{font-size:21px}.incoming-list{gap:16px}.letter-chip{width:64px;height:58px;font-size:38px}.stack-area{min-height:340px;margin-top:12px;padding:10px 22px 16px}.stack-area.dual-mode{min-height:280px}.stack-area h2{margin-bottom:8px;font-size:25px}.stack-wrap{min-height:288px}.stack-wrap.dual{min-height:224px}.stack{width:230px;padding:8px 12px;gap:5px}.stack-slot{height:51px;border-radius:10px;font-size:38px}.top-marker{min-width:125px;margin-bottom:24px;font-size:22px}.top-marker span{font-size:45px}.stack-panel{width:220px;padding:9px}.stack-panel .stack{margin-top:5px}.stack-name{font-size:19px}.selection-mark{min-height:20px;margin-top:1px;font-size:13px}.status{min-height:72px;margin-top:12px;padding:8px 24px;gap:18px}.status-item{gap:8px;font-size:18px}.status svg{width:46px;height:46px}.status strong{font-size:34px}.status-restart svg{width:34px;height:34px}.divider{height:44px}.score-strip{min-height:62px;margin-top:8px;padding:7px 18px}.score-strip strong{font-size:18px}.message{min-height:24px;margin:6px 0;font-size:14px}.hint-button{min-height:40px;margin-bottom:7px;padding:5px 15px;font-size:14px}.controls{gap:22px}.controls.dual-controls{gap:14px}.control-button{min-height:104px;border-radius:19px;gap:16px}.control-button svg{width:58px;height:62px}.control-button span{font-size:32px}.control-button small{margin-bottom:4px;font-size:20px}.dual-controls .control-button{gap:7px}.dual-controls .control-button svg{width:42px;height:48px}.dual-controls .control-button span{font-size:22px}.dual-controls .control-button small{font-size:12px}.output{margin-top:16px;padding:8px 28px 13px}.output h2{font-size:22px}.output-box{width:62px;height:56px;font-size:34px}}@media(min-width:1000px)and (max-height:1000px){main{width:min(1180px,calc(100% - 36px));display:grid;grid-template-columns:minmax(0,1fr) 360px;grid-auto-rows:auto;gap:8px 12px;align-items:start}main>.challenge{grid-column:1 / -1;grid-row:1;min-height:154px;padding-bottom:13px}main>.challenge .label{font-size:23px}main>.challenge h2{margin:2px 0 7px;font-size:21px}main>.challenge .target-letter{font-size:49px}main>.challenge .target-sequence .arrow{font-size:27px}main>.incoming{grid-column:1 / -1;grid-row:2;min-height:62px;margin:0;padding-block:5px}main>.incoming .letter-chip{width:54px;height:48px;font-size:32px}main>.stack-area{grid-column:1;grid-row:3 / span 6;min-height:365px;height:100%;margin:0}main>.stack-area.dual-mode{min-height:365px}main>.stack-area .stack-wrap,main>.stack-area .stack-wrap.dual{min-height:309px}main>.stack-area .stack-slot{height:64px;font-size:42px}main>.status{grid-column:2;grid-row:3;min-height:62px;margin:0;padding:6px 10px;gap:8px}main>.status .status-item{gap:4px;font-size:13px}main>.status svg{width:31px;height:31px}main>.status strong{font-size:26px}main>.status .status-restart{min-width:38px;font-size:10px}main>.status .status-restart svg{width:26px;height:26px}main>.status .divider{height:34px}main>.score-strip{grid-column:2;grid-row:4;min-height:50px;margin:0;padding:4px 6px}main>.score-strip small{font-size:10px}main>.score-strip strong{font-size:15px}main>.score-strip .score-rule{font-size:13px}main>.message{grid-column:2;grid-row:5;min-height:20px;margin:0;font-size:12px;line-height:20px}main>.progressive-hint{grid-column:2;grid-row:6;width:100%;margin:0;padding:7px 9px}main>.progressive-hint p{font-size:11px}main>.hint-button{grid-column:2;grid-row:7;width:220px;min-height:35px;margin:0;padding:4px 10px;justify-self:end;font-size:12px}main>.hint-button small{display:none}main>.challenge-mode-button{grid-column:2;grid-row:7;min-height:35px;margin:0;padding:4px 10px;justify-self:start;font-size:11px}main>.controls{grid-column:2;grid-row:8;gap:7px}main>.controls>.control-button{min-height:92px}main>.dual-controls .control-button{min-height:92px;gap:2px}main>.dual-controls .control-button svg{width:29px;height:36px}main>.dual-controls .control-button span{font-size:16px}main>.dual-controls .control-button small{font-size:9px}main>.output{grid-column:2;grid-row:9;margin:0;padding:5px 10px 8px}main>.output h2{margin-bottom:4px;font-size:17px}main>.output-sequence{gap:4px}main>.output .output-box{width:45px;height:42px;font-size:27px}main>.output .arrow{font-size:19px}main>.clear-summary,main>.all-clear,main>.footer-actions{grid-column:1 / -1}}@media(max-width:760px){.chapter-chooser-scrim{padding:12px}.chapter-chooser{padding:23px 15px 20px;border-radius:22px}.chapter-chooser h2{font-size:24px}.chapter-chooser-intro{margin:8px 0 15px;font-size:13px}.chapter-choice-grid{grid-template-columns:1fr;gap:12px}.chapter-choice{min-height:145px;padding:13px;display:grid;grid-template-columns:64px 1fr;grid-template-rows:auto auto auto;text-align:left}.chapter-choice-icon{grid-row:1 / 4;font-size:43px;text-align:center}.chapter-choice b{margin:0;font-size:21px}.chapter-choice small{margin:3px 0 5px;font-size:12px}.chapter-choice strong{font-size:12px}.progressive-hint{padding:9px 11px;gap:8px}.progressive-hint p{font-size:12px}.topbar{height:calc(82px + env(safe-area-inset-top));grid-template-columns:56px 1fr 132px;gap:8px;padding:calc(10px + env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 10px max(12px,env(safe-area-inset-left))}.topbar h1{font-size:clamp(24px,7vw,38px);letter-spacing:1px}.icon-button{width:54px;height:54px;border-radius:12px}.icon-button svg{width:34px}.top-actions{gap:6px}.help-button{width:42px;height:42px}.help-button svg{width:29px;height:29px}.stage-button{min-height:48px;font-size:15px;padding:5px}.stage-menu,.settings-menu{top:calc(76px + env(safe-area-inset-top));max-height:calc(100dvh - 92px - env(safe-area-inset-top))}.stage-menu{right:max(16px,env(safe-area-inset-right))}.settings-menu{left:max(16px,env(safe-area-inset-left))}main{width:calc(100% - 20px);margin-top:18px;padding-bottom:calc(145px + env(safe-area-inset-bottom))}.card{border-radius:20px}.challenge{min-height:205px;padding:0 12px 25px}.label{min-width:120px;font-size:24px;padding:7px 15px}.goal-copy{margin-top:4px;font-size:13px}.challenge h2{margin:8px 0 20px;font-size:22px}.target-sequence{gap:8px}.target-letter{font-size:clamp(38px,13vw,60px)}.arrow{font-size:26px}.incoming{padding:12px;flex-direction:column;gap:10px}.incoming h2{font-size:20px}.incoming-list{width:100%;justify-content:center;gap:9px}.letter-chip{width:min(58px,16vw);height:58px;font-size:36px;border-radius:9px}.stack-area{min-height:440px;padding:16px 8px}.stack-area h2{font-size:24px}.stack-wrap{min-height:375px;gap:8px}.stack{width:min(230px,63vw);padding:8px 10px;gap:6px}.stack-slot{height:66px;font-size:44px}.top-marker{min-width:90px;font-size:18px;margin-bottom:28px}.top-marker span{font-size:38px}.stack-area.dual-mode{min-height:410px}.stack-wrap.dual{min-height:335px;align-items:flex-end;gap:8px}.stack-panel{width:calc(50% - 4px);padding:8px 5px;border-width:2px;border-radius:15px}.stack-panel.selected{box-shadow:0 0 0 3px #bce7ff,0 5px 12px #0865eb2e}.stack-panel .stack{width:100%;padding:7px;border-width:2px;border-radius:13px;gap:5px}.stack-panel .stack-slot{height:58px;font-size:38px;border-radius:9px}.stack-name{font-size:17px}.selection-mark{min-height:20px;font-size:13px}.status{padding:12px;gap:10px}.status-item{gap:6px;font-size:14px}.status svg{width:42px;height:42px}.status-restart{font-size:12px}.status-restart svg{width:34px;height:34px}.status strong{font-size:31px}.divider{height:44px}.score-strip{min-height:68px;padding:8px 4px}.score-strip>span{padding:0 4px}.score-strip small{font-size:11px}.score-strip strong{font-size:18px}.score-strip .score-stars{font-size:16px;letter-spacing:0}.score-strip .score-rule{font-size:14px}.controls{position:fixed;z-index:20;right:0;bottom:0;left:0;gap:12px;padding:10px max(10px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));background:#f7fbffeb;box-shadow:0 -6px 18px #071e5826;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}.controls.dual-controls{grid-template-columns:repeat(3,1fr);gap:7px}.control-button{min-height:96px;gap:8px;border-width:3px;border-radius:17px}.control-button svg{width:52px;height:58px}.control-button span{font-size:27px}.control-button small{font-size:18px}.dual-controls .control-button{gap:3px}.dual-controls .control-button svg{width:34px;height:42px}.dual-controls .control-button span{font-size:18px;letter-spacing:0}.dual-controls .control-button small{font-size:10px}.recommended{outline-width:3px;outline-offset:2px}.recommended:after{top:-14px;right:-4px;padding:3px 7px;font-size:10px}.output{padding:9px 10px 15px}.output h2{font-size:22px}.output-sequence{gap:6px}.output-box{width:min(52px,13vw);height:50px;font-size:30px}.output .arrow,.footer-actions button{font-size:22px}.all-clear{padding:16px}.all-clear strong{font-size:24px}.all-clear span{font-size:17px}.clear-summary{padding:14px 10px 17px}.clear-stars,.clear-summary h2{font-size:28px}.clear-summary p{gap:8px;flex-wrap:wrap;font-size:13px}.clear-summary p strong{width:100%;font-size:24px}.game-toast{top:calc(env(safe-area-inset-top) + 88px);min-width:190px;padding:10px 17px;font-size:19px}.tutorial-coach{width:calc(100% - 20px);padding:16px 14px 14px;border-width:2px;border-radius:18px}.tutorial-top{top:calc(env(safe-area-inset-top) + 78px)}.tutorial-bottom{bottom:calc(env(safe-area-inset-bottom) + 126px)}.tutorial-close{top:9px;right:9px;width:38px;height:38px;font-size:27px}.tutorial-progress{gap:5px;margin:2px 42px 8px}.tutorial-progress span{width:30px;height:6px}.tutorial-step-label{font-size:12px}.tutorial-coach h2{margin:4px 35px 6px;font-size:20px}.tutorial-body{margin:6px 3px 11px;font-size:14px;line-height:1.45}.tutorial-buttons{gap:8px}.tutorial-buttons button{min-height:44px;font-size:15px}.tutorial-focus{outline-width:3px;outline-offset:2px;box-shadow:0 0 0 7px #ffb321,0 12px 32px #00164380!important}}@media(max-width:760px)and (min-height:700px){:root{--mobile-top-safe: max(24px, env(safe-area-inset-top))}body{height:100dvh;overflow:hidden}.topbar{height:calc(68px + var(--mobile-top-safe));padding-top:calc(7px + var(--mobile-top-safe));padding-bottom:7px}.icon-button{width:48px;height:48px}.topbar h1{font-size:clamp(20px,5.5vw,28px)}.help-button{width:44px;height:44px}.stage-button{min-height:44px;font-size:14px}.stage-menu,.settings-menu{top:calc(62px + var(--mobile-top-safe));max-height:calc(100dvh - 72px - var(--mobile-top-safe))}main{height:calc(100dvh - 164px - var(--mobile-top-safe) - env(safe-area-inset-bottom));margin-top:0;padding:6px 0 0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto auto;gap:5px;overflow:hidden}.tutorial-top{top:calc(var(--mobile-top-safe) + 78px)}.challenge{min-height:0;padding:0 8px 8px;border-radius:16px}.label{min-width:84px;padding:3px 12px;border-radius:9px;font-size:17px}.goal-copy{display:none}.goal-copy.mission-copy{display:block;margin:1px 0 0;overflow:hidden;font-size:10px;line-height:13px;white-space:nowrap;text-overflow:ellipsis}.challenge h2{margin:2px 0 5px;font-size:16px}.target-sequence{gap:clamp(3px,1.5vw,7px)}.target-letter{font-size:clamp(28px,8.5vw,38px)}.target-sequence .arrow{font-size:18px}.incoming{min-height:0;margin-top:0;padding:5px 8px;flex-direction:row;gap:7px;border-radius:14px}.incoming h2{font-size:14px}.incoming-list{gap:5px}.letter-chip{width:min(43px,10.5vw);height:38px;border-radius:7px;font-size:24px;box-shadow:0 2px 4px #0002}.letter-chip.next{border-width:2px;outline-width:2px;box-shadow:0 4px #034bc4}.stack-area,.stack-area.dual-mode{min-height:0;height:100%;margin-top:0;padding:5px 6px 6px;border-radius:16px;overflow:hidden}.stack-area h2{margin-bottom:3px;font-size:16px}.stack-wrap,.stack-wrap.dual{min-height:0;height:calc(100% - 24px);align-items:flex-end}.stack{width:min(190px,53vw);max-height:100%;padding:5px 7px;border-width:2px;border-radius:12px;gap:3px}.stack-slot{height:clamp(32px,4.8dvh,44px);border-radius:7px;font-size:clamp(27px,4.5dvh,38px)}.top-marker{min-width:78px;margin-bottom:15px;font-size:15px}.top-marker span{font-size:30px}.stack-panel{max-height:100%;padding:4px;border-radius:11px}.stack-panel .stack{width:100%;margin-top:4px;padding:4px}.stack-panel .stack-slot{height:clamp(39px,6dvh,52px);font-size:clamp(27px,5dvh,36px)}.stack-name{font-size:14px}.selection-mark{min-height:15px;margin-top:1px;font-size:11px}.status{min-height:56px;margin-top:0;padding:4px 8px;gap:7px;border-radius:14px}.status-item{gap:3px;font-size:11px;line-height:1.25}.status svg{width:30px;height:30px}.status strong{font-size:25px}.status strong small{font-size:12px;margin-left:2px}.divider{height:34px}.status-restart{min-width:42px;font-size:10px}.status-restart svg{width:27px;height:27px}.message{min-height:20px;margin:0;font-size:12px;line-height:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.score-strip{display:none}.hint-button{position:fixed;z-index:21;right:12px;bottom:calc(105px + env(safe-area-inset-bottom));min-height:38px;margin:0;padding:5px 11px;font-size:12px}.hint-button small{display:none}main>.progressive-hint{position:fixed;z-index:23;right:12px;bottom:calc(151px + env(safe-area-inset-bottom));left:12px;margin:0}.challenge-mode-button{position:fixed;z-index:22;bottom:calc(105px + env(safe-area-inset-bottom));left:12px;min-height:38px;margin:0;padding:5px 11px;font-size:11px}.boss-challenge-banner{top:5px;right:7px;padding:3px 7px;font-size:9px}.controls{min-height:96px;padding-top:7px;padding-bottom:calc(7px + env(safe-area-inset-bottom))}.control-button{min-height:76px}.control-button svg{width:40px;height:44px}.control-button span{font-size:23px}.control-button small{margin-bottom:3px;font-size:14px}.dual-controls .control-button{min-height:76px}.dual-controls .control-button svg{width:28px;height:34px}.dual-controls .control-button span{font-size:16px}.dual-controls .control-button small{font-size:9px}.output,.all-clear{display:none}.clear-summary{position:fixed;z-index:26;right:10px;bottom:calc(154px + env(safe-area-inset-bottom));left:10px;margin:0;padding:8px 10px 10px;border-radius:16px}.clear-summary:before,.clear-summary:after{display:none}.clear-stars{font-size:21px}.clear-summary h2{display:inline;margin:0 8px;font-size:21px}.clear-summary p{display:inline-flex;gap:6px;font-size:11px}.clear-summary p strong{width:auto;font-size:17px}.clear-summary .new-best{margin:3px 0 0 6px;padding:2px 7px;font-size:9px}.clear-summary .medal-list{margin-top:4px;gap:3px}.clear-summary .medal-list span{padding:2px 5px;font-size:9px}.clear-summary .challenge-mode-button{position:static;display:inline-block;min-height:30px;margin:4px 0 0 5px;padding:3px 8px;font-size:10px}.footer-actions{position:fixed;z-index:25;right:10px;bottom:calc(103px + env(safe-area-inset-bottom));margin:0}.footer-actions .next-stage{min-height:40px;padding:4px 13px;box-shadow:var(--shadow);font-size:15px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important}}.stage-group{margin:18px 4px 3px;color:#607e9a;font-size:13px;font-weight:900;letter-spacing:1.4px;text-transform:uppercase}.rpn-topbar{background:linear-gradient(110deg,#e8dcff,#d7c7ff 58%,#efe8ff)}.rpn-main{width:min(940px,calc(100% - 48px));display:block}.rpn-challenge{padding:0 28px 22px;text-align:center;border-color:#d9c8ff;background:linear-gradient(135deg,#fff,#faf7ff)}.rpn-label{border-color:#7b4cdb;background:linear-gradient(100deg,#d9c6ff,#eee5ff);color:#381977;font-size:25px}.rpn-lesson{margin:10px 0 2px;color:#7147c5;font-size:17px;font-weight:900;letter-spacing:.3px}.rpn-challenge h2{margin:4px 0 7px;color:var(--navy);font-size:34px}.rpn-hint{margin:0 auto;color:#526c88;font-size:16px;font-weight:700}.rpn-token-card{margin-top:18px;padding:18px 24px 23px;text-align:center}.rpn-token-card h2,.rpn-stack-card h2,.rpn-history h2{margin:0 0 14px;color:#7147c5;font-size:22px}.rpn-token-row{display:flex;align-items:center;justify-content:center;gap:12px}.rpn-token{width:76px;height:76px;display:grid;place-items:center;border:3px solid #bbc9d5;border-radius:15px;background:#f4f7fa;color:#728091;font-size:40px;font-weight:900;transition:.2s}.rpn-token.operator{color:#7b43d0;background:#f3eaff}.rpn-token.active{border-color:#7b43d0;outline:4px solid #dac8ff;background:#7b43d0;color:#fff;transform:translateY(-4px);box-shadow:0 7px #4c229b}.rpn-token.done{border-color:#9edaa8;background:#e7f8e9;color:#2a8d3a}.rpn-token-arrow{color:#9aa9b8;font-size:28px;font-weight:900}.rpn-workspace{display:grid;grid-template-columns:1.15fr 1fr;gap:18px;margin-top:18px}.rpn-stack-card{min-height:360px;padding:18px;text-align:center}.rpn-stack{width:230px;margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr)}.rpn-stack .stack-slot{width:100%}.rpn-stack-card>p{margin:8px 0 0;color:#7147c5;font-weight:900}.rpn-action-area{min-height:360px;padding:30px 24px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.rpn-next-label{color:#607b95;font-size:17px;font-weight:800}.rpn-next-token{width:100px;height:100px;margin:10px;display:grid;place-items:center;border-radius:22px;background:linear-gradient(135deg,#8454dc,#6030bb);color:#fff;box-shadow:0 7px #3c177e;font-size:58px}.rpn-action-area p{min-height:25px;margin:7px 0 17px;color:#45627d;font-weight:700}.rpn-primary{min-height:58px;padding:11px 28px;border:0;border-radius:14px;background:linear-gradient(120deg,#7947d5,#5f2fba);color:#fff;box-shadow:0 5px #3d1881;font-size:20px;font-weight:900;cursor:pointer}.rpn-primary:disabled{opacity:.4;cursor:not-allowed;box-shadow:0 4px #756c83}.rpn-history{margin-top:18px;padding:18px 24px}.rpn-history ol{margin:0;padding-left:26px;display:flex;flex-wrap:wrap;gap:8px 35px;color:#355470;font-size:16px;font-weight:700}.rpn-question{margin-top:18px;padding:34px;text-align:center}.rpn-expression{display:inline-block;padding:15px 28px;border:3px solid #7b4cdb;border-radius:17px;background:#f3eaff;color:#412074;font-size:clamp(30px,5vw,48px);font-weight:900;letter-spacing:3px}.rpn-question h2{margin:24px 0 18px;color:var(--navy);font-size:28px}.rpn-choices{display:grid;gap:12px;max-width:680px;margin:0 auto}.rpn-choices button{min-height:76px;padding:10px 18px;display:flex;align-items:center;gap:18px;border:3px solid #c9d8e4;border-radius:16px;background:#f9fcff;color:var(--navy);font-size:23px;font-weight:800;text-align:left;cursor:pointer}.rpn-choices button b{width:42px;height:42px;flex:0 0 auto;display:grid;place-items:center;border-radius:50%;background:#dcecff;color:#1769c2}.rpn-choices button:hover:not(:disabled){border-color:#7b4cdb;background:#f7f1ff}.rpn-choices button.correct{border-color:#32a94a;background:#e8f8eb}.rpn-choices button.wrong{border-color:#df5151;background:#fff0f0}.rpn-choices button:disabled{opacity:1;cursor:default}.rpn-message{min-height:48px;margin:12px 0 4px;display:grid;place-items:center;font-size:17px;white-space:normal}.rpn-score-strip{margin-top:8px;border-color:#d9c8ff}.rpn-clear-summary{border-color:#8c60de;background:linear-gradient(135deg,#f4edff,#fff 55%,#fff9d9)}.rpn-clear-summary h2{color:#7040c7}.rpn-footer-actions{min-height:65px;display:flex;align-items:center;justify-content:center;gap:20px}.rpn-restart{min-height:52px;padding:8px 18px;display:flex;align-items:center;gap:8px;border:2px solid #c6d8e8;border-radius:13px;background:#fff;color:#4c6c89;font-size:17px;font-weight:800;cursor:pointer}.rpn-restart svg{width:31px;height:31px;fill:none;stroke:currentColor;stroke-width:2.7;stroke-linecap:round}.rpn-build-label{margin:0 0 8px;color:#7147c5;font-size:18px;font-weight:900}.rpn-target-number{width:150px;height:150px;margin:0 auto;display:grid;place-items:center;align-content:center;border:5px solid #f3b323;border-radius:50%;background:linear-gradient(135deg,#fff8d9,#ffe78d);color:#764700;box-shadow:0 8px #d69200,0 12px 24px #b9750033}.rpn-target-number small{font-size:17px;font-weight:900}.rpn-target-number strong{font-size:70px;line-height:.95}.normal-expression{color:#182b53;border-color:#b99ee9;background:#fff}.rpn-build-answer{min-height:82px;padding:11px;display:flex;align-items:center;justify-content:center;gap:9px;border:3px dashed #baa5e4;border-radius:17px;background:#faf7ff}.rpn-build-answer span{width:58px;height:58px;flex:0 0 58px;display:grid;place-items:center;border-radius:11px;background:#e9e5ed;color:#a49bab;font-size:31px;font-weight:900}.rpn-build-answer span.filled{background:#7343cd;color:#fff}.rpn-piece-bank{margin:19px 0;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:12px}.rpn-piece-bank button{width:68px;height:68px;border:3px solid #7b4cdb;border-radius:13px;background:#fff;color:#502590;font-size:35px;font-weight:900;cursor:pointer;box-shadow:0 4px #c7b0ec}.rpn-piece-bank button:disabled{opacity:.25;box-shadow:none}.rpn-build-actions{display:flex;justify-content:center;gap:15px}.rpn-build-actions>button:not(.rpn-primary){padding:10px 20px;border:2px solid #bacddd;border-radius:13px;background:#f4f8fb;color:#385977;font-size:17px;font-weight:800;cursor:pointer}.rpn-build-actions button:disabled{opacity:.4;cursor:not-allowed}@media(max-width:760px){.rpn-main{width:calc(100% - 20px);padding-bottom:calc(95px + env(safe-area-inset-bottom))}.rpn-challenge{padding:0 12px 13px}.rpn-label{font-size:18px}.rpn-lesson{font-size:13px}.rpn-challenge h2{font-size:25px}.rpn-hint{font-size:13px}.rpn-token-card{padding:13px 8px 16px}.rpn-token-row{gap:5px}.rpn-token{width:min(56px,13vw);height:min(56px,13vw);border-width:2px;border-radius:10px;font-size:29px}.rpn-token.active{outline-width:2px;box-shadow:0 4px #4c229b}.rpn-token-arrow{font-size:18px}.rpn-workspace{grid-template-columns:1fr 1fr;gap:8px}.rpn-stack-card,.rpn-action-area{min-height:305px;padding:12px 7px}.rpn-stack{width:100%;max-width:120px;box-sizing:border-box}.rpn-stack .stack-slot{height:57px;font-size:38px}.rpn-next-token{width:76px;height:76px;font-size:45px}.rpn-action-area p{font-size:13px}.rpn-primary{min-height:50px;padding:9px 15px;font-size:16px}.rpn-question{padding:24px 12px}.rpn-expression{padding:12px 15px;font-size:clamp(24px,8vw,34px)}.rpn-question h2{margin:18px 0 13px;font-size:21px}.rpn-target-number{width:112px;height:112px;border-width:4px}.rpn-target-number small{font-size:14px}.rpn-target-number strong{font-size:52px}.rpn-choices button{min-height:66px;gap:10px;padding:8px 10px;font-size:17px}.rpn-build-answer{gap:4px;padding:7px 3px}.rpn-build-answer span{width:34px;height:47px;flex-basis:34px;font-size:24px}.rpn-piece-bank{gap:7px}.rpn-piece-bank button{width:51px;height:51px;font-size:28px}}@media(max-width:760px)and (min-height:700px){.rpn-main{height:auto;min-height:calc(100dvh - 68px - var(--mobile-top-safe));display:block;overflow-y:auto;padding-top:8px;padding-bottom:calc(28px + env(safe-area-inset-bottom))}.rpn-main>*{margin-top:8px}.rpn-main>.progressive-hint{position:static;margin:8px 0 0}.rpn-main>.rpn-hint-button{position:static;margin:8px auto 0}.rpn-challenge{padding-bottom:10px}.rpn-workspace{margin-top:8px}.rpn-stack-card,.rpn-action-area{min-height:270px}.rpn-message{min-height:42px;line-height:1.4;white-space:normal}.rpn-main .score-strip{display:grid}.rpn-main .clear-summary{position:static;margin:8px 0;padding:12px}body.rpn-mode{height:auto;min-height:100dvh;overflow-y:auto}body.rpn-mode .rpn-main{overflow:visible;padding-bottom:calc(110px + env(safe-area-inset-bottom))}}@media(min-width:1200px)and (min-height:700px){.rpn-main{width:min(1500px,calc(100% - 36px));height:calc(100dvh - 100px);margin-top:10px;padding-bottom:10px;display:grid;grid-template-columns:minmax(0,1fr) 390px;grid-template-rows:auto repeat(7,auto);gap:8px 14px;align-content:start;overflow:hidden}.rpn-main>.rpn-challenge{grid-column:1 / -1;grid-row:1;min-height:0;margin:0;padding:0 20px 10px}.rpn-main .rpn-label{padding:5px 22px;font-size:21px}.rpn-main .rpn-lesson{margin:3px 0 0;font-size:13px}.rpn-main .rpn-challenge h2{margin:1px 0 3px;font-size:25px}.rpn-main>.rpn-activity{min-width:0;grid-column:1;grid-row:2 / 9}.rpn-main .rpn-token-card{margin-top:0;padding:9px 16px 12px}.rpn-main .rpn-token-card h2,.rpn-main .rpn-stack-card h2,.rpn-main .rpn-history h2{margin-bottom:7px;font-size:18px}.rpn-main .rpn-token{width:58px;height:58px;border-width:2px;border-radius:11px;font-size:31px}.rpn-main .rpn-token-row{gap:8px}.rpn-main .rpn-token-arrow{font-size:21px}.rpn-main .rpn-workspace{gap:10px;margin-top:8px}.rpn-main .rpn-stack-card,.rpn-main .rpn-action-area{min-height:245px;padding:10px 16px}.rpn-main .rpn-stack{width:190px;padding:7px 10px;gap:4px}.rpn-main .rpn-stack .stack-slot{height:46px;font-size:32px}.rpn-main .rpn-stack-card>p{margin-top:4px;font-size:13px}.rpn-main .rpn-next-label{font-size:14px}.rpn-main .rpn-next-token{width:72px;height:72px;margin:7px;border-radius:16px;font-size:43px}.rpn-main .rpn-action-area p{min-height:20px;margin:4px 0 9px;font-size:13px}.rpn-main .rpn-primary{min-height:44px;padding:7px 18px;font-size:15px}.rpn-main .rpn-history{max-height:92px;margin-top:8px;padding:9px 16px;overflow-y:auto}.rpn-main .rpn-history ol{gap:4px 25px;font-size:13px}.rpn-main .rpn-question{margin-top:0;padding:18px 22px}.rpn-main .rpn-expression{padding:9px 20px;font-size:31px}.rpn-main .rpn-question h2{margin:12px 0 10px;font-size:21px}.rpn-main .rpn-choices{gap:7px}.rpn-main .rpn-choices button{min-height:56px;padding:7px 13px;font-size:17px}.rpn-main .rpn-choices button b{width:34px;height:34px}.rpn-main .rpn-target-number{width:100px;height:100px;border-width:4px}.rpn-main .rpn-target-number strong{font-size:46px}.rpn-main .rpn-build-answer{min-height:60px;padding:6px}.rpn-main .rpn-build-answer span{width:43px;height:43px;flex-basis:43px;font-size:25px}.rpn-main .rpn-piece-bank{margin:10px 0;gap:8px}.rpn-main .rpn-piece-bank button{width:49px;height:49px;font-size:27px}.rpn-main>.rpn-hint-button{position:static;width:100%;min-height:40px;margin:0;padding:5px 10px;grid-column:2;grid-row:2;font-size:13px}.rpn-main>.rpn-progressive-hint{position:static;width:100%;margin:0;padding:8px 10px;grid-column:2;grid-row:3}.rpn-main>.rpn-progressive-hint p{font-size:11px}.rpn-main>.rpn-message{min-height:42px;margin:0;grid-column:2;grid-row:4;font-size:13px;line-height:1.4;white-space:normal}.rpn-main>.rpn-score-strip{min-height:58px;margin:0;padding:6px;display:grid;grid-column:2;grid-row:5}.rpn-main>.rpn-score-strip small{font-size:9px}.rpn-main>.rpn-score-strip strong{font-size:15px}.rpn-main>.rpn-clear-summary{margin:0;padding:10px;grid-column:2;grid-row:6}.rpn-main>.rpn-clear-summary .clear-stars{font-size:20px}.rpn-main>.rpn-clear-summary h2{margin:1px 0;font-size:21px}.rpn-main>.rpn-clear-summary p{gap:4px;font-size:10px}.rpn-main>.rpn-clear-summary p strong{width:auto;font-size:16px}.rpn-main>.rpn-footer-actions{min-height:48px;grid-column:2;grid-row:7}.rpn-main .rpn-restart{min-height:42px;padding:5px 12px;font-size:14px}.rpn-main .rpn-restart svg{width:25px;height:25px}.rpn-main>.all-clear{grid-column:2;grid-row:8}}@media(min-width:1200px)and (min-height:1001px){.rpn-main{height:calc(100dvh - 142px);gap:14px 20px;align-content:center}.rpn-main>.rpn-challenge{padding:0 28px 17px}.rpn-main .rpn-label{padding:7px 27px;font-size:25px}.rpn-main .rpn-lesson{margin-top:7px;font-size:16px}.rpn-main .rpn-challenge h2{margin-top:3px;font-size:31px}.rpn-main .rpn-token-card{padding:15px 22px 18px}.rpn-main .rpn-token-card h2,.rpn-main .rpn-stack-card h2,.rpn-main .rpn-history h2{margin-bottom:11px;font-size:21px}.rpn-main .rpn-token{width:70px;height:70px;font-size:38px}.rpn-main .rpn-token-row{gap:11px}.rpn-main .rpn-workspace{gap:14px;margin-top:12px}.rpn-main .rpn-stack-card,.rpn-main .rpn-action-area{min-height:310px;padding:17px 21px}.rpn-main .rpn-stack{width:220px;padding:10px 13px;gap:6px}.rpn-main .rpn-stack .stack-slot{height:56px;font-size:38px}.rpn-main .rpn-next-token{width:92px;height:92px;margin:10px;font-size:54px}.rpn-main .rpn-action-area p{margin:7px 0 14px;font-size:15px}.rpn-main .rpn-primary{min-height:52px;padding:9px 24px;font-size:18px}.rpn-main .rpn-history{max-height:120px;margin-top:12px;padding:14px 21px}.rpn-main .rpn-history ol{font-size:15px}.rpn-main .rpn-question{padding:27px 30px}.rpn-main .rpn-expression{padding:13px 25px;font-size:40px}.rpn-main .rpn-question h2{margin:19px 0 15px;font-size:26px}.rpn-main .rpn-choices{gap:10px}.rpn-main .rpn-choices button{min-height:68px;padding:9px 17px;font-size:21px}.rpn-main .rpn-target-number{width:130px;height:130px}.rpn-main .rpn-target-number strong{font-size:60px}.rpn-main .rpn-build-answer{min-height:75px;padding:9px}.rpn-main .rpn-build-answer span{width:53px;height:53px;flex-basis:53px;font-size:29px}.rpn-main .rpn-piece-bank{margin:15px 0;gap:11px}.rpn-main .rpn-piece-bank button{width:60px;height:60px;font-size:32px}.rpn-main>.rpn-hint-button{min-height:48px;font-size:15px}.rpn-main>.rpn-progressive-hint{padding:11px 14px}.rpn-main>.rpn-progressive-hint p{font-size:13px}.rpn-main>.rpn-message{min-height:52px;font-size:15px}.rpn-main>.rpn-score-strip{min-height:68px;padding:8px}.rpn-main>.rpn-score-strip small{font-size:10px}.rpn-main>.rpn-score-strip strong{font-size:18px}.rpn-main>.rpn-footer-actions{min-height:56px}}
