:root{color-scheme:dark;--lime:#d5f76a;--cream:#fff4ce;--ink:#161b29;--muted:#8d9b9c}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 50% 20%,#293742 0,#141925 65%);color:var(--cream);font-family:Consolas,'Courier New',monospace;min-height:100svh}.cabinet{max-width:850px;margin:auto;padding:26px 30px 14px}header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.brand{font-size:54px;line-height:.95;font-weight:1000;letter-spacing:-5px;text-decoration:none;color:var(--lime);text-shadow:3px 4px #527345}.brand span{color:#ffad67}.brand small{display:block;font-size:9px;letter-spacing:2px;margin-top:12px;color:var(--cream);text-shadow:none}.tools{display:flex;gap:8px}button{font:700 12px Consolas,monospace;cursor:pointer;border:1px solid #53606b;background:#25313d;color:var(--cream);border-radius:7px;min-height:40px;padding:8px 13px;touch-action:none}button:hover{filter:brightness(1.18)}button:focus-visible{outline:3px solid var(--lime);outline-offset:3px}.hud{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;gap:12px;border-top:1px solid #4a565a;padding:15px 0}.hud small{display:block;color:var(--muted);font-size:10px;letter-spacing:1px;margin-bottom:6px}.hud b{font-size:15px;letter-spacing:.4px}.hud .hearts{color:#ff877d}.screen{position:relative;border:5px solid #455951;box-shadow:0 0 0 2px #0d141c,0 16px 50px #0005;border-radius:8px;overflow:hidden;background:#17232b}canvas{width:100%;display:block;image-rendering:pixelated;touch-action:none}.overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:#111b29eF;padding:22px;z-index:2}.overlay.hidden{display:none}.eyebrow{color:#ffb875;font-size:10px;letter-spacing:3px}.overlay h1{font-size:clamp(40px,8vw,80px);letter-spacing:-5px;margin:8px 0 12px;color:var(--lime);text-shadow:4px 5px #4d693d}.overlay h2{font-size:30px;margin:12px;color:var(--lime)}.overlay p{line-height:1.7;font-size:12px;max-width:360px;color:#becbbf;margin:8px 0 20px}.overlay .primary{background:var(--lime);color:#17232b;border:0;box-shadow:0 4px #6c8b43;padding:14px 28px;letter-spacing:1px;font-size:15px;margin:8px}.secondary{background:transparent;margin:7px}.badges{display:flex;gap:15px;justify-content:center;font-size:10px;color:#f3d19d;margin-bottom:12px}.level-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;margin:12px}.level-grid button{width:46px}.level-grid button:disabled{opacity:.3;cursor:default}#toast{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);pointer-events:none;background:#15202bf0;border:1px solid var(--lime);color:var(--lime);padding:8px 15px;font-size:12px;white-space:nowrap;opacity:0;transition:opacity .15s}.power{display:flex;align-items:center;gap:12px;font-size:9px;color:var(--muted);letter-spacing:.7px;margin:18px 0}.power>div{flex:1;height:7px;background:#36454b;border-radius:3px;overflow:hidden}.power i{display:block;background:#ffa873;height:100%;width:0}.controls{display:flex;align-items:center;justify-content:space-between;max-width:480px;margin:auto;padding:0 5px;user-select:none;-webkit-user-select:none}.dpad{display:grid;grid-template:repeat(3,40px)/repeat(3,40px);gap:3px}.dpad button{padding:0;font-size:17px;background:#34434b;box-shadow:0 3px #0f1621}.up{grid-area:1/2}.left{grid-area:2/1}.down{grid-area:3/2}.right{grid-area:2/3}.action-buttons{display:flex;gap:18px;align-items:center}.action-buttons button{width:62px;height:62px;border-radius:50%;font-size:25px;border:3px solid #28323d;box-shadow:0 4px #0d1420}.action-buttons small{display:block;font-size:8px;letter-spacing:.5px}.punch{background:#d5f76a;color:#23352c;transform:translateY(-10px)}.dodge{background:#e8a271;color:#31261f}button.held{filter:brightness(1.4);box-shadow:none;translate:0 2px}footer{display:flex;justify-content:space-between;gap:10px;color:#758585;font-size:8px;letter-spacing:.5px;margin:20px 0}kbd{font:inherit;color:#bec8b6} @media(min-width:800px){.controls{opacity:.75}.dpad{grid-template:repeat(3,30px)/repeat(3,30px)}.dpad button{min-height:30px}.action-buttons button{width:53px;height:53px} .cabinet{max-width:780px;padding-top:22px}header{margin-bottom:14px}.brand{font-size:48px}}@media(max-width:520px){.cabinet{padding:16px 10px 8px}header{margin-bottom:16px}.brand{font-size:41px}.brand small{font-size:7px;letter-spacing:1px}.tools button{padding:7px 9px;font-size:10px}.hud{gap:7px;padding:11px 2px;grid-template-columns:1.4fr 1fr .9fr .9fr}.hud small{font-size:8px;letter-spacing:0}.hud b{font-size:11px}.screen{border-width:3px;border-radius:4px}.power{gap:7px;font-size:7px;margin:15px 0}.overlay{padding:15px}.overlay p{font-size:11px;margin-bottom:12px}.overlay h1{margin:6px 0}.badges{font-size:8px;gap:10px}footer{justify-content:center;font-size:7px}footer span:first-child{display:none}.controls{padding:0 15px}.dpad{grid-template:repeat(3,43px)/repeat(3,43px)} }@media(max-height:600px) and (orientation:landscape){.cabinet{max-width:700px;padding:8px 120px}header{margin-bottom:5px}.brand{font-size:24px}.brand small{display:none}.hud{padding:5px 0}.hud b{font-size:9px}.hud small{font-size:7px;margin:1px}.controls{position:fixed;inset:40% 15px auto;max-width:none;pointer-events:none}.controls button{pointer-events:auto}.power{margin:8px 0}footer{display:none}}

/* Keep the board and touch controls together on short phone screens. */
@media (min-height:601px),(orientation:portrait){.screen{width:min(100%,calc((100svh - 365px)*1.133333));margin-inline:auto}.overlay h1{font-size:clamp(36px,7vw,66px)}.overlay .primary{padding:11px 20px}.overlay p{line-height:1.5}.overlay .eyebrow{font-size:8px}.overlay .badges{font-size:8px}}
/* Overlays scroll instead of clipping their buttons when the board is small. The auto margins centre a menu that fits exactly
   as before and start one that doesn't at the top so all of it can be scrolled to. Items keep their full height (a wrapped
   button label stays inside its button) and sideways overflow stays clipped like the board's. No scrollbar is drawn: where
   scrollbars take space (Windows, Linux, macOS set to always show them) one would narrow the menu and move it sideways. */
.overlay{overflow-x:hidden;overflow-y:auto;justify-content:flex-start;scrollbar-width:none}.overlay::-webkit-scrollbar{display:none}.overlay>*{flex-shrink:0}.overlay::before{content:'';margin-top:auto}.overlay::after{content:'';margin-bottom:auto}.overlay button{touch-action:manipulation}
/* On the smallest boards the level buttons narrow instead of being cut off at the sides. */
.level-grid{max-width:100%;margin-inline:0;grid-template-columns:repeat(5,minmax(0,46px))}.level-grid button{max-width:100%;padding-inline:0}
/* A toast wider than the board wraps inside it instead of being cut off. One that fits the board stays on one line, as before. */
#toast{width:max-content;max-width:100%;white-space:normal;text-align:center}
/* Touch screens 800px+ wide (landscape phones, tablets) keep full-size touch controls. */
@media(min-width:800px) and (pointer:coarse){.controls{opacity:1}.dpad{grid-template:repeat(3,40px)/repeat(3,40px)}.dpad button{min-height:40px}.action-buttons button{width:62px;height:62px}}
/* Short landscape phones: fit the whole board between the HUD and the bottom edge. */
@media(max-height:600px) and (orientation:landscape){.screen{width:min(100%,calc((100svh - 135px)*1.133333));margin-inline:auto}}
/* Short portrait phones: the landscape layout's compact header, so the board stays large. */
@media (max-height:640px) and (orientation:portrait){.cabinet{padding-top:8px}header{margin-bottom:8px}.brand{font-size:30px}.brand small{display:none}.hud{padding:6px 2px}.power{margin:8px 0}footer{display:none}.screen{width:min(100%,calc((100svh - 271px)*1.133333))}}


