:root{color-scheme:dark;--bg:#081716;--panel:#102321;--line:#29423c;--cream:#e8f2d9;--mint:#a4e9ba;--muted:#83a297;--gold:#f9ce78;--pink:#ffb5b6;font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% -20%,#244839 0,transparent 70%),var(--bg);color:var(--cream);min-height:100vh}button,select,input{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:wait;opacity:.65}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--gold);outline-offset:4px}button{border:0}button:active{transform:translateY(1px)}[hidden]{display:none!important}.arcade{max-width:1440px;margin:auto;padding:28px 42px 20px}.masthead{height:55px;display:flex;align-items:center;justify-content:space-between;margin-bottom:22px;gap:20px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:var(--cream);font-size:10px;letter-spacing:1.8px;line-height:1.6}.brand strong{font-weight:500}.brand-mark{width:41px;height:41px;border:1px solid #9bcca56b;display:grid;place-items:center;border-radius:50%;background:#123329;color:#baf4bc;font-size:19px;letter-spacing:-2px;font-weight:800}.edition{display:flex;align-items:center;gap:18px;color:var(--muted);font-size:12px;letter-spacing:2px}.edition-line{height:1px;width:35px;background:#57775e}.subtle-button{font-size:13px;background:transparent;color:var(--cream);padding:10px 12px;border:1px solid var(--line);border-radius:5px}.subtle-button:hover{background:#1b3930;border-color:#66806d}.subtle-button span{margin-left:10px}.game-shell{position:relative;isolation:isolate;width:100%;aspect-ratio:16/9;border:1px solid #456257;border-radius:12px 12px 0 0;overflow:hidden;background:#153333;box-shadow:0 28px 80px #0008}#game{display:block;width:100%;height:100%;image-rendering:pixelated;outline:0;touch-action:none}.hud{position:absolute;inset:20px 24px auto;display:flex;justify-content:space-between;gap:20px;pointer-events:none;text-shadow:2px 2px #102522}.hud-left{display:flex;align-items:center;gap:12px}.portrait{width:45px;height:49px;overflow:hidden;background:#0b2926ca;border:1px solid #83ceae6b;border-radius:6px}.portrait canvas{width:100%;height:100%;object-fit:cover;image-rendering:pixelated}.vitals{display:flex;flex-direction:column;gap:7px}.hud-label{font-size:10px;letter-spacing:1.8px;color:#e9f4df}.hearts{color:#f7ada8;font-size:18px;letter-spacing:1px;white-space:nowrap}.coin-counter{border-left:1px solid #bce6d54a;padding-left:22px;margin-left:12px;display:flex;gap:10px;align-items:center}.coin-badge{background:#b88a30;border:2px solid #f9d986;box-shadow:0 0 0 2px #633e24,inset 0 0 0 2px #cb9835;border-radius:50%;height:28px;width:28px;color:#fff0ac;display:grid;place-items:center;font-size:12px;font-weight:bold}.coin-counter>div{display:flex;flex-direction:column;gap:3px}.coin-counter strong{font-size:22px;letter-spacing:3px}.hud-right{display:flex;flex-direction:column;gap:10px;align-items:flex-end;font-size:10px;letter-spacing:1px;padding-top:4px}.route-line{width:116px;height:3px;background:#122f2bd9}.route-line span{display:block;height:100%;background:#b6e8c0;max-width:100%}.overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(90deg,#061c24a8,#06232250,#091c28a8);backdrop-filter:brightness(.8)}.title-card{text-align:center;padding-top:26px;position:relative;max-width:90%}.chapter-tag{color:var(--gold);font-size:11px;letter-spacing:3px}.title-card h1{font-size:clamp(40px,7vw,91px);line-height:.98;margin:22px 0 19px;font-weight:950;letter-spacing:-5px;color:#f4edcf;text-shadow:0 5px 0 #215e55,0 8px 0 #051e20,4px 0 #051e20,-4px 0 #051e20}.title-card h1 span{display:block;font-size:.35em;line-height:1.2;letter-spacing:5px;margin-top:14px;color:#b5eaca;text-shadow:0 3px 0 #133c38}.title-card p,.dialog-card p{font-family:system-ui,sans-serif;font-size:16px;line-height:1.5;color:#d1e2d7;margin:0 0 25px}.primary-button{display:inline-flex;align-items:center;justify-content:center;gap:20px;background:var(--mint);border:1px solid #d9ffd2;color:#17352c;padding:15px 33px;font-weight:800;font-size:15px;border-radius:5px;box-shadow:0 4px 0 #5c9879;letter-spacing:.2px;min-height:46px}.primary-button:hover{background:#caf4ca}.primary-button:active{transform:translateY(3px);box-shadow:0 1px 0 #5c9879}.primary-button.small{padding:10px 20px;min-height:38px;font-size:13px}.start-controls{display:flex;justify-content:center;gap:24px;margin:27px auto 0;font-size:10px;color:#c1dbce;letter-spacing:1px}.start-controls>span{display:flex;align-items:center;gap:5px}kbd{font-size:10px;display:inline-grid;place-items:center;min-width:17px;min-height:19px;padding:2px 4px;border:1px solid #80a09277;border-radius:3px;background:#122d2855;color:#e1edd7}.console-bar{position:relative;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:16px 23px;background:#11251f;border:1px solid #3d5645;border-top:none;border-radius:0 0 9px 9px}.location{display:flex;align-items:center;gap:12px;font-size:11px;letter-spacing:1px;white-space:nowrap}.location-square{width:7px;height:7px;background:var(--gold);box-shadow:0 0 10px #ecbf6466;transform:rotate(45deg)}.muted{color:var(--muted);font-size:10px;margin-left:12px}.console-actions{display:flex;gap:18px}.console-actions button{background:transparent;color:#b6cfbf;padding:3px;font-size:17px;white-space:nowrap}.console-actions button span{font-size:11px;margin-left:5px}.console-actions button:hover{color:var(--gold)}.footnote{display:flex;align-items:flex-start;justify-content:space-between;margin-top:16px;gap:18px;color:#75958a;font-size:10px;line-height:1.7}.footnote p{margin:0}.footnote p>span{margin:0 8px}.footnote>span{font-size:9px;text-align:right;letter-spacing:1px;padding-top:2px;max-width:200px}.dialog-card{background:#0c2523ed;padding:32px 42px;border:1px solid #557c64;border-radius:10px;text-align:center;max-width:90%;box-shadow:0 18px 80px #0018}.dialog-card h2{font-size:clamp(23px,3vw,37px);line-height:1.2;letter-spacing:-1px;margin:18px 0 14px}.dialog-card p{margin-bottom:23px}.text-button{display:block;background:none;color:#a2c8b8;font-size:12px;margin:20px auto 0;padding:5px}.text-button:hover{color:var(--gold)}.run-stats{display:flex;justify-content:center;gap:35px;margin:22px 0 28px}.run-stats>div{display:flex;flex-direction:column;gap:9px}.run-stats strong{color:var(--gold);font-size:27px}.run-stats span{font-size:10px;letter-spacing:1px}.dialog-card .playtest-note{margin:23px 0 0;font-size:11px;color:#8db1a4}.scene-toast{position:absolute;bottom:20px;left:50%;transform:translate(-50%,12px);opacity:0;transition:opacity .3s,transform .3s;background:#082923eb;border:1px solid #78b09a75;padding:10px 18px;color:#e6f4d4;font-size:12px;white-space:nowrap;pointer-events:none}.scene-toast.visible{opacity:1;transform:translate(-50%,0)}.review-badge{position:absolute;left:50%;top:80px;transform:translateX(-50%);font-size:10px;padding:8px 12px;background:#102a25e8;border:1px solid #e2c075;color:var(--gold);pointer-events:none;white-space:nowrap}.workshop{margin-top:28px;background:#10241f;border:1px solid #45604c;border-radius:10px;padding:24px}.workshop-heading{display:flex;justify-content:space-between;align-items:center}.workshop h2{font-size:24px;margin:8px 0}.workshop>p{font-family:system-ui,sans-serif;font-size:14px;color:#adc9bb;line-height:1.5;max-width:780px}.workshop-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:24px 0}.workshop label{font-size:13px;color:#cbdfce;display:block}.workshop select{display:block;width:100%;margin-top:9px;padding:10px;background:#081b16;color:#e0efdb;border:1px solid #52705b;border-radius:5px;min-height:40px;font-size:14px}.position-control input{display:block;width:100%;margin-top:20px;accent-color:#b0edbf}.position-control span{float:right;color:var(--gold)}.review-options{display:flex;flex-direction:column;gap:10px}.review-options input{accent-color:#b0edbf;margin-right:8px}.workshop-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.file-label{cursor:pointer}.workshop .workshop-status{font-size:12px;color:#a1b6a7;margin:20px 0 0;min-height:20px}.touch-controls{display:none;justify-content:space-between;gap:10px;margin-top:13px;touch-action:none}.touch-controls>div{display:flex;gap:10px}.touch-controls button{background:#1c3a30;color:#ceebd4;border:1px solid #55745c;border-radius:50%;width:58px;height:58px;font-size:23px;touch-action:none;user-select:none}.touch-controls button.pressed{background:#4a8065}.touch-controls .jump-control{background:#8bcda6;color:#153c29;width:67px;height:67px}.touch-controls .bolt-control{color:#82f5ec}.game-shell:fullscreen{width:100vw;height:100vh;aspect-ratio:auto;display:grid;place-items:center;border:none;border-radius:0;background:#061411}.game-shell:fullscreen canvas#game{width:min(100vw,177.778vh);height:auto;max-height:100vh}.game-shell:fullscreen .hud{inset:25px 30px auto}.game-shell:fullscreen .overlay{background:#09212466}body.embed .arcade{padding:0;max-width:none}body.embed .masthead,body.embed .footnote{display:none}body.embed .game-shell{border-radius:0}body.embed .console-bar{border-radius:0;padding:10px 14px}body.embed .workshop{margin:10px}.error-detail{font-family:system-ui,sans-serif;font-size:14px;max-width:460px;line-height:1.5}
@media(pointer:coarse){.touch-controls{display:flex}.footnote p{display:none}.footnote{justify-content:center}.footnote>span{max-width:none}.start-controls{display:none}.title-card p{margin-bottom:18px}.touch-controls button{min-width:48px}}
@media(min-width:1500px){.arcade{padding-top:40px}}
@media(max-width:900px){.arcade{padding:18px 20px}.masthead{margin-bottom:16px}.edition{display:none}.hud{inset:14px 16px auto}.hud-right{font-size:9px}.hud-left{gap:8px}.portrait{width:35px;height:39px}.vitals{gap:4px}.hearts{font-size:14px}.coin-counter{margin-left:5px;padding-left:14px;gap:8px}.hud-label{font-size:8px}.coin-counter strong{font-size:18px}.coin-badge{width:24px;height:24px;font-size:10px}.console-bar{padding:13px 16px}.console-actions{gap:12px}.muted{display:none}.footnote{font-size:9px}.footnote p>span{margin:0 3px}.title-card h1{letter-spacing:-3px}.dialog-card{padding:22px 25px}.dialog-card p{font-size:14px;margin-bottom:18px}.run-stats{margin:15px 0 20px}.title-card p{font-size:14px}.start-controls{font-size:8px;gap:14px;margin-top:22px}.title-card{padding-top:40px}.title-card h1{margin:14px 0}.chapter-tag{font-size:9px;letter-spacing:2px}}
@media(max-width:600px){.arcade{padding:12px 10px}.masthead{height:43px;margin-bottom:13px}.brand{font-size:8px;gap:8px}.brand-mark{width:33px;height:33px;font-size:16px}.masthead>.subtle-button{font-size:10px;padding:8px}.game-shell{aspect-ratio:16/9}.game-shell canvas#game{height:100%;object-fit:cover}.hud{inset:9px 10px auto}.portrait{width:27px;height:32px}.vitals{gap:2px}.hud-label{font-size:7px;letter-spacing:1px}.hearts{font-size:11px;letter-spacing:0}.coin-counter{padding-left:10px;margin-left:3px;gap:6px}.coin-counter strong{font-size:15px}.coin-badge{width:19px;height:19px;font-size:8px}.hud-right{font-size:7px;max-width:125px;text-align:right;line-height:1.5;letter-spacing:0}.route-line{width:66px}.title-card{padding-top:35px}.title-card h1{font-size:40px;margin:10px 0 12px;letter-spacing:-2px}.title-card h1 span{font-size:14px;letter-spacing:2px;margin-top:9px}.chapter-tag{font-size:7px;letter-spacing:1.6px}.title-card p{font-size:11px;margin-bottom:12px}.primary-button{font-size:12px;padding:10px 20px;min-height:35px;box-shadow:0 3px 0 #5c9879}.console-bar{padding:11px 10px}.location{font-size:9px;gap:7px}.console-actions{gap:12px}.console-actions button span{display:none}.console-actions button{font-size:18px}.scene-toast{font-size:8px;bottom:10px;padding:7px 10px;max-width:94%;white-space:normal;text-align:center}.touch-controls{margin:13px 7px}.footnote>span{font-size:8px}.dialog-card{padding:15px 18px;max-width:94%}.dialog-card h2{font-size:21px;margin:10px 0}.dialog-card p{font-size:11px;margin-bottom:12px}.text-button{margin-top:10px;font-size:10px}.run-stats{gap:25px;margin:12px 0 17px}.run-stats strong{font-size:19px}.run-stats span{font-size:7px}.dialog-card .playtest-note{font-size:8px;margin-top:15px}.workshop{padding:16px}.workshop h2{font-size:20px}.workshop-grid{grid-template-columns:1fr;gap:18px}.workshop-heading .chapter-tag{font-size:9px}.workshop .workshop-status{font-size:11px}.review-badge{top:52px;font-size:7px;padding:5px}.workshop-heading button{font-size:11px}.workshop-actions{gap:8px}}
@media(max-height:550px) and (orientation:landscape) and (pointer:coarse){.arcade{padding:6px 12px}.masthead,.footnote{display:none}.game-shell{width:calc(100% - 145px);margin:auto;aspect-ratio:16/9;max-height:calc(100vh - 51px)}.console-bar{width:calc(100% - 145px);margin:auto;padding:8px 12px}.touch-controls{position:fixed;inset:40% 10px auto;pointer-events:none}.touch-controls>div{flex-direction:column;pointer-events:auto;gap:5px}.touch-controls button{width:49px;height:49px}.touch-controls .jump-control{width:53px;height:53px}.game-shell .title-card{padding-top:30px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}.scene-toast{transition:none}}
body.embed{min-height:0}
.arcade:fullscreen{max-width:none;width:100vw;height:100vh;padding:4px 12px;background:#081716;overflow:auto}
.arcade:fullscreen .masthead,.arcade:fullscreen .footnote{display:none}
.arcade:fullscreen .game-shell,.arcade:fullscreen .console-bar{width:min(100%,calc((100vh - 64px)*16/9));margin:0 auto}
.arcade:fullscreen .game-shell{aspect-ratio:16/9;max-height:none}
@media(pointer:coarse){.arcade:fullscreen .game-shell,.arcade:fullscreen .console-bar{width:min(100%,calc((100vh - 148px)*16/9))}.arcade:fullscreen .touch-controls{position:static;max-width:800px;margin:8px auto 0}.arcade:fullscreen .touch-controls>div{flex-direction:row}}
@media(max-width:600px){.win-card{padding:12px 16px}.win-card .chapter-tag{font-size:7px}.win-card h2{font-size:19px;margin:7px 0}.win-card>p:not(.playtest-note){display:none}.win-card .run-stats{margin:10px 0 12px}.win-card .playtest-note{margin-top:12px}}

.maxi-status{color:#ffbd69!important;font-size:11px!important;letter-spacing:1px;text-shadow:0 0 12px #ff7800;}.maxi-status[hidden]{display:none;}

.lightning-status{font-size:9px!important;color:#c0bccb!important}.lightning-status.unlocked{color:#d9a3ff!important;text-shadow:0 0 10px #8415ff}.bolt-control[aria-disabled=true]{opacity:.45}

.reward-message{font-size:20px!important;color:#ffe6a4!important;margin:14px 0!important}.reward-message strong{font-size:32px;color:#ffce69}.reward-breakdown{font-size:11px!important;color:#a9c1b8!important;margin:6px 0!important}.win-card h2{font-size:30px}.account-dialog{width:min(480px,calc(100vw - 32px));background:#102c2b;color:#edf9ef;border:1px solid #587e70;border-radius:16px;padding:26px;box-shadow:0 25px 80px #0008}.account-dialog::backdrop{background:#001713c9}.account-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.account-heading h2{font-size:24px;margin:0}.account-dialog p{font-size:14px;line-height:1.6;color:#bad5ca}.account-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:20px}.account-dialog [hidden]{display:none!important}#login-details{text-align:center}#login-qr{display:block;margin:16px auto;background:white;padding:10px;max-width:100%;height:auto}#open-wallet{display:inline-block}#account-status{padding:12px;background:#09201e;border-radius:8px}

.win-card{max-height:100%;overflow:auto}#account-button{font-size:12px}@media(max-width:600px){#account-button{font-size:10px}.win-card h2{font-size:18px;line-height:1.1}.win-card .reward-message{display:block!important;font-size:14px!important;margin:6px 0!important}.reward-message strong{font-size:21px}.win-card .run-stats{display:none}.win-card .reward-breakdown{display:none}.win-card .playtest-note{margin-top:8px;font-size:8px}}

/* Game controls are held/tapped, never selected or dragged as text on iOS. */
.arcade button,.arcade button *,#run-status,#run-status *,.touch-controls,.touch-controls *,.console-bar,.console-bar *,.game-shell,.game-shell *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-user-drag:none}

/* Player accounts share the arcade palette; inputs remain selectable on phones. */
.account-dialog{width:min(640px,94vw);max-height:85dvh;overflow:auto}.player-form{display:grid;gap:14px;margin:18px 0}.player-form label{display:grid;gap:6px;font-size:16px}.player-form input:not([type=checkbox]){box-sizing:border-box;width:100%;min-width:0;padding:12px;border:1px solid #66816f;border-radius:8px;color:#effbdc;background:#10251f;font:inherit;user-select:text;-webkit-user-select:text}.player-balances{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;padding:18px 0}.player-balances strong{display:block;font-size:clamp(18px,4vw,28px);color:#b9f578}.player-balances span{font-size:14px}.player-history{padding-left:20px;overflow-wrap:anywhere}.player-history li{margin:12px 0}.player-form .withdraw-confirm{display:flex;align-items:flex-start;gap:10px;font-size:14px}.withdraw-confirm input{margin-top:4px}#player-progress{width:100%;accent-color:#b9f578}#account-status{overflow-wrap:anywhere}#withdraw-note{font-size:16px}.player-form button:disabled{opacity:.5;cursor:not-allowed}#player-panel h3{margin-top:24px}

.signup-art{display:block;width:100%;height:auto;border-radius:12px;border:1px solid #344c39;margin:12px 0 18px}.player-form .name-reroll{justify-self:start;font-size:14px;padding:2px 0;margin-top:-8px;color:#b3f344}.player-form .password-reveal{display:flex;align-items:center;gap:8px;font-size:14px}.password-reveal input{margin:0}.player-form small{color:#becdb9;font-size:13px}.account-dialog{background:#0b100d;color:#eef5e9}

.resend-welcome{margin:18px 0;padding:12px;border:1px solid #344c39;border-radius:8px}.resend-welcome summary{cursor:pointer;color:#b3f344}.resend-welcome p{font-size:14px}

/* Keep the two start actions together at every screen size. */
.start-login-button{display:block;margin:14px auto 0;min-height:44px;min-width:220px;padding:10px 24px;border:1px solid #85baa3;border-radius:5px;background:#0a2622dd;color:#d6f4dd;font-size:14px;font-weight:700}.start-login-button:hover{background:#21463a;color:#fff}.console-actions{flex-wrap:wrap}#sound-button span{display:inline}.title-card{max-height:100%;overflow:auto;padding:26px 12px 12px}.title-card .start-controls{margin-top:18px}.coin-counter.collected .coin-badge{animation:coin-pulse .3s ease-out}.coin-counter.collected strong{color:#fff2a7}@keyframes coin-pulse{50%{transform:scale(1.22);box-shadow:0 0 18px #ffd25f}}@media(max-width:600px){.console-bar{flex-wrap:wrap}.console-actions{gap:8px}#sound-button{min-height:40px}#sound-button span{font-size:12px}.title-card{padding-top:42px}.title-card h1{font-size:30px;margin:7px 0}.title-card h1 span{font-size:12px;margin-top:5px}.title-card>p{display:none}.title-card .primary-button,.start-login-button{min-height:38px;min-width:190px;padding:8px 18px;font-size:12px}.start-login-button{margin-top:10px}.title-card .chapter-tag{font-size:8px;letter-spacing:1px}}@media(prefers-reduced-motion:reduce){.coin-counter.collected .coin-badge{animation:none}}

@media(max-width:360px){.title-card{padding-top:30px}.title-card h1{font-size:26px}.title-card .chapter-tag{display:none}.title-card .start-login-button{margin-top:8px}}

/* Chapter selection is part of the game menu, including the existing mobile embed. */
.chapter-picker{display:flex;flex-direction:column;align-items:center;gap:7px;margin:0 auto 15px;color:#c9d9bd;font-size:11px;letter-spacing:1px}.chapter-picker select{min-height:42px;width:240px;max-width:90vw;padding:9px 14px;color:#eaffe5;background:#18251e;border:1px solid #809d6e;border-radius:5px;font-size:14px;letter-spacing:0}body.chapter-two{--mint:#b8ed74;--gold:#ffd28a;background:#130e18}body.chapter-two .game-shell{border-color:#6b526c}body.chapter-two .console-bar{background:#1c1420}body.chapter-two .overlay{background:#0a04145c}body.chapter-two .title-card h1{text-shadow:3px 3px #32133e,0 0 32px #b187384d}body.chapter-two .win-card{background:#0a0711f5}#next-chapter-button{margin-top:8px}#chapter-select,#chapters-button{-webkit-user-select:none;user-select:none}
@media(max-width:600px){.title-card{padding-top:40px;padding-bottom:10px}.title-card h1{font-size:26px;margin:4px 0}.title-card h1 span{font-size:11px;margin-top:3px}.chapter-picker{margin:8px auto;gap:3px;font-size:9px}.chapter-picker select{width:205px;min-height:35px;padding:5px 9px;font-size:12px}.title-card .start-controls{display:none}.title-card .start-login-button{margin-top:7px;min-height:34px}.title-card .chapter-tag{font-size:8px}.win-card #next-chapter-button{font-size:11px;padding:8px 12px;min-height:34px}.win-card #replay-button{margin-top:8px}}

/* Keep dialogue above the action, below the health/score HUD. */
.scene-toast{top:82px;bottom:auto;transform:translate(-50%,-8px);width:max-content;max-width:min(620px,calc(100% - 32px));white-space:normal;text-align:center;line-height:1.4;border-radius:5px}
.scene-toast.visible{transform:translate(-50%,0)}
@media(max-width:900px){.scene-toast{top:65px}}
@media(max-width:600px){.scene-toast{top:52px;font-size:10px;padding:6px 10px;max-width:94%}}
/* About two millimetres lower, across portrait, landscape and fullscreen. */
.touch-controls>div{transform:translateY(8px)}
