
:root{color-scheme:dark}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#000;color:#b4d7ca;font:12px ui-monospace,SFMono-Regular,Menlo,monospace;overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
button{font:inherit;color:inherit;-webkit-appearance:none;appearance:none;touch-action:manipulation}
#viewport{position:fixed;inset:0;background:#000;overflow:hidden}
#safeProbe{position:fixed;left:0;top:0;pointer-events:none;visibility:hidden;padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px);padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
#gameStage{position:absolute;left:0;top:0;width:100px;height:54px;overflow:hidden;background:#07121b;transition:left .23s ease-out,top .23s ease-out,width .23s ease-out,height .23s ease-out;will-change:left,top,width,height}
#scene{width:100%;height:100%;display:block;image-rendering:pixelated}
#keypad{position:absolute;left:0;top:0;width:200px;height:249px;transform-origin:center center;transition:opacity .17s ease-out,transform .23s ease-out;touch-action:manipulation;will-change:opacity}
#keypadArt{display:block;width:100%;height:100%;pointer-events:none;object-fit:fill;image-rendering:auto}
#lcd{position:absolute;left:8.5%;top:13.5%;width:83.2%;height:17%;pointer-events:none;opacity:1;image-rendering:auto;border-radius:3px}
.hit{position:absolute;display:block;border:0;background:transparent;padding:0;margin:0;cursor:pointer;z-index:3;border-radius:8%;touch-action:manipulation}
.hit:active{background:rgba(231,248,216,.13);box-shadow:inset 0 0 10px 3px rgba(8,8,8,.35)}
.hit:disabled{pointer-events:none}
#hitDel{left:3.6%;top:34.3%;width:30.0%;height:22.4%}
#hitU{left:39.2%;top:34.3%;width:29.0%;height:22.4%}
#hitGo{left:68.5%;top:34.3%;width:30.2%;height:22.4%}
#hitL{left:3.6%;top:59%;width:30.0%;height:22.4%}
#hitD{left:39.2%;top:59%;width:29.0%;height:22.4%}
#hitR{left:68.5%;top:59%;width:30.2%;height:22.4%}
#keypad.in-execution{opacity:0;pointer-events:none;transform:scale(.93)}
#mobileStatus{position:absolute;pointer-events:none;font-size:clamp(9px,1.8vh,13px);line-height:1.35;color:#93abaf;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:95vw;text-shadow:0 1px 3px black;opacity:1;transition:opacity .16s}
#mobileStatus.in-execution{opacity:0}
#restart{position:absolute;z-index:6;min-height:26px;min-width:75px;background:#182d33;border:1px solid #50727c;border-radius:4px;box-shadow:0 1px 5px #000a;padding:4px 9px;letter-spacing:.04em;font-weight:700;white-space:nowrap}
#restart:active{background:#335461}
#rotate{display:none;position:absolute;inset:0;z-index:30;background:#05090b;color:#d4eeea;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:9px;padding:30px;font:700 19px ui-monospace,monospace}
#rotate small{font-size:11px;font-weight:400;color:#8aa8ab}
#legacy{position:absolute;width:0;height:0;overflow:hidden;visibility:hidden;pointer-events:none}
@media (orientation:portrait){#rotate{display:flex}}
@media(prefers-reduced-motion:reduce){#gameStage,#keypad{transition:none}}

#routeStrip{position:absolute;left:0;top:0;display:flex;align-items:center;gap:7px;height:23px;max-width:100%;padding:3px 7px;border:1px solid #244941;border-radius:3px;background:linear-gradient(#081d1a,#07120f);color:#8be2a0;white-space:nowrap;overflow:hidden;font:11px/1 ui-monospace,SFMono-Regular,Menlo,monospace}
#routeStrip.in-execution{z-index:2;pointer-events:none;background:rgba(3,19,16,.83);border-color:rgba(77,141,114,.72);box-shadow:0 0 8px rgba(0,0,0,.45)}
#routeStrip .routeLabel{font-size:9px;color:#75a69b;letter-spacing:.07em;flex:none}
#routeText{display:flex;gap:0;white-space:nowrap;overflow:hidden;flex:1;min-width:0;align-items:center}
#routeText .routeChar{padding:1px 0;min-width:0;flex:none}
#routeText .current{color:#071b0b;background:#9af35c;border-radius:2px;box-shadow:0 0 4px #59f820;font-weight:800}
#routeText .completed{color:#537d61}
#routeCount{font-size:9px;flex:none;color:#79b89a}

/* Same six approved keycap images, displayed smaller without shrinking touch targets below ~44pt. */
#buttonDeck{position:absolute;left:2%;top:33.1%;width:96%;height:49.7%;background:linear-gradient(90deg,#111315 0%,#1b1d20 5%,#121417 40%,#181a1d 96%,#111315 100%);border-left:2px solid #3c3b39;border-right:2px solid #3c3b39;border-top:2px solid #111414;border-bottom:2px solid #0d0e0f;box-shadow:inset 0 5px 13px #000b,inset 0 -5px 13px #0009}
#buttonDeck .hit{width:23%;height:35%;padding:0;overflow:visible;background:none;touch-action:manipulation}
#buttonDeck .hit img{width:100%;height:100%;display:block;object-fit:fill;pointer-events:none;-webkit-user-drag:none}
#buttonDeck #hitDel,#buttonDeck #hitL{left:4.6%}
#buttonDeck #hitU,#buttonDeck #hitD{left:38.5%}
#buttonDeck #hitGo,#buttonDeck #hitR{left:72%}
#buttonDeck #hitDel,#buttonDeck #hitU,#buttonDeck #hitGo{top:4.2%}
#buttonDeck #hitL,#buttonDeck #hitD,#buttonDeck #hitR{top:52%}
#buttonDeck .hit:active{background:rgba(180,220,179,.18);box-shadow:0 0 9px #8fffa344;filter:brightness(1.18)}
