:root{font-family:Courier New,Consolas,monospace;color:#dce9ce;background:#202b1c;color-scheme:dark;--lcd-background: #b2bd07}*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0}body{overflow:hidden}button{font:inherit}.app{height:100vh;height:100dvh;width:100%;min-height:0;padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto;grid-template-areas:"heading" "lcd" "touch" "toolbar";justify-items:center;align-items:center;gap:8px}.app-heading{grid-area:heading;display:flex;justify-content:space-between;align-items:center;width:min(1080px,100%);font-size:12px;letter-spacing:.14em}.app-heading strong{font-size:17px}.app-heading span{color:#a9bba0}.lcd-stage{grid-area:lcd;width:100%;height:100%;min-width:0;min-height:0;display:flex;justify-content:center;align-items:center;overflow:hidden}.lcd-viewport{position:relative;display:flex;justify-content:center;align-items:center;flex:none;padding:5px;background:var(--lcd-background);aspect-ratio:84 / 48;border:3px solid #627d43;border-radius:8px;overflow:hidden;box-shadow:0 0 0 4px #35452a,0 12px 35px #0006}#lcd{display:none;flex:none;margin:0;border:0;background:var(--lcd-background);image-rendering:pixelated;touch-action:none}.nokia-panel{position:absolute;inset:0;background:#b2bd07;color:#18260d;display:flex;flex-direction:column;align-items:center;overflow:hidden}.nokia-panel[hidden]{display:none}.nokia-title-area{flex:0 0 60%;min-height:0;width:100%;display:flex;align-items:center;justify-content:center;overflow:hidden}.nokia-title-crop{position:relative;width:auto;height:99%;max-width:92%;aspect-ratio:809 / 580;overflow:hidden}.nokia-title-crop img{display:block;width:100%;height:100%;object-fit:cover;object-position:center 50%;image-rendering:auto}.nokia-panel.no-title .nokia-title-area:after{content:"SNAKE II";font-weight:900;font-size:clamp(25px,7vw,70px)}.nokia-panel.no-title .nokia-title-crop{display:none}.nokia-menu-area{flex:1;width:min(75%,775px);min-height:0;padding:2px 0 8px;display:flex;flex-direction:column;align-items:stretch;gap:3px}.nokia-page-info{text-align:center;color:#17250e;font-size:clamp(11px,1.25vw,17px);font-weight:900;line-height:1.35}.nokia-page-info:empty{display:none}.nokia-menu-items{min-height:0;flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#495e2a transparent}.nokia-option{position:relative;display:block;text-align:left;width:100%;min-height:clamp(34px,4.5vh,49px);padding:3px 12px 3px clamp(25px,3vw,42px);border:0;border-radius:0;background:transparent;color:#192512;font-size:clamp(17px,2.25vw,30px);font-weight:900;letter-spacing:.01em;cursor:pointer}.nokia-option[aria-current=true]{color:#b2bd07;background:#1b2a11}.nokia-option[aria-current=true]:before{position:absolute;content:"▶";font-size:.8em;color:#17240f;left:0;top:50%;transform:translateY(-50%)}.nokia-option:focus-visible{outline:2px dotted #14220e;outline-offset:-2px}.nokia-panel.inner-page .nokia-title-area{flex-basis:35%}.nokia-panel.inner-page .nokia-title-crop{height:94%}.nokia-panel.inner-page .nokia-menu-area{width:min(77%,800px)}.nokia-panel.inner-page .nokia-option{min-height:33px}.control-strip{grid-area:toolbar;display:flex;justify-content:center;gap:10px;flex-wrap:wrap}.control-strip button{min-height:41px;padding:9px 16px;border:1px solid #829878;border-radius:6px;background:#34472f;color:#e6efda;font-size:12px;font-weight:700;cursor:pointer;touch-action:manipulation}.control-strip button:hover{background:#506b41}#status{display:none}.remaster .lcd-viewport{box-shadow:0 0 0 4px #35452a,0 0 30px #cde88755}.snake-touch-controls{grid-area:touch;display:none}.snake-touch-controls.active{display:none}@media(min-width:951px)and (pointer:fine){.nokia-title-area{flex-basis:54%;padding-top:10px}}@media(pointer:coarse),(max-width:650px){.app{gap:6px;padding-left:max(7px,env(safe-area-inset-left));padding-right:max(7px,env(safe-area-inset-right))}.app-heading{justify-content:center;gap:7px 13px}.app-heading strong{font-size:13px}.app-heading span{font-size:9px}.lcd-viewport{padding:3px;border-width:2px;border-radius:6px;box-shadow:0 0 0 2px #35452a}.nokia-title-area{flex-basis:51%}.nokia-menu-area{width:92%;padding-bottom:3px}.nokia-option{min-height:27px;font-size:clamp(12px,4vw,19px)}.control-strip button{min-height:37px;font-size:11px}.snake-touch-controls.active{display:flex;flex-direction:column;gap:9px;align-items:center}.snake-touch-controls div{display:flex;gap:9px}.snake-touch-controls button{width:56px;height:47px;border:1px solid #799069;border-radius:7px;background:#394e32;color:#f5f8ea;font-size:20px;font-weight:700;touch-action:manipulation}}@media(orientation:landscape)and (max-height:600px)and (pointer:coarse),(orientation:landscape)and (max-height:600px)and (max-width:950px){.app{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto minmax(0,1fr) auto;grid-template-areas:"heading heading" "lcd touch" "toolbar toolbar";column-gap:12px;row-gap:5px;padding-top:max(4px,env(safe-area-inset-top));padding-bottom:max(4px,env(safe-area-inset-bottom))}.lcd-stage{min-width:0}.app-heading strong{font-size:12px}.nokia-option{min-height:23px;font-size:13px}.control-strip button{padding:5px 14px;min-height:32px}.snake-touch-controls.active,.snake-touch-controls div{gap:5px}.snake-touch-controls button{width:46px;height:35px;font-size:17px}}@media(max-height:360px)and (orientation:landscape){.app-heading span{display:none}.control-strip button{min-height:28px}.snake-touch-controls button{height:30px}}@media(max-width:650px)and (orientation:portrait){.app{grid-template-rows:auto auto auto auto;align-content:center}.lcd-stage{height:min(58vw,max(100px,calc(100dvh - 245px)))}}.app-heading{gap:8px 16px}.howto-trigger{margin-left:auto;border:1px solid #7c9870;border-radius:6px;padding:9px 12px;color:#dceccd;background:#33482c;cursor:pointer;white-space:nowrap;font:700 11px/1.25 Consolas,Courier New,monospace;letter-spacing:.07em}.howto-trigger:hover,.howto-trigger:focus-visible{color:#17260e;background:#b8cd91;outline:2px solid #d6ecb7;outline-offset:2px}.snake-howto-dialog{position:fixed;width:min(940px,calc(100vw - 24px));max-width:940px;height:min(89dvh,860px);max-height:calc(100dvh - 20px);margin:auto;padding:0;overflow:hidden;color:#e0eed3;background:#1b2a17;border:1px solid #78946e;border-radius:12px;box-shadow:0 20px 70px #000c}.snake-howto-dialog::backdrop{background:#060c06d1}.howto-shell{display:flex;flex-direction:column;height:100%;min-height:0}.howto-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;border-bottom:1px solid #536f49;padding:21px 23px 17px;background:#23391d}.howto-eyebrow{margin:0 0 5px;color:#adcb94;font:700 11px Consolas,monospace;letter-spacing:.13em}.howto-header h2{font-size:clamp(18px,3vw,26px);line-height:1.2;margin:0}.howto-subtitle{font-size:12px;color:#b5c6aa;margin:6px 0 0}.howto-close{cursor:pointer;flex:0 0 auto;width:40px;height:40px;border:1px solid #809b74;border-radius:6px;color:#e1eed9;background:#33482d;font-size:21px}.howto-close:hover,.howto-close:focus-visible{background:#5d7751;outline:2px solid #bfe5a0}.howto-scroll{overflow-y:auto;min-height:0;padding:14px 23px 26px;overscroll-behavior:contain}.howto-scroll section{border-bottom:1px solid #364c32;padding:15px 0 17px}.howto-scroll section:last-child{border:0}.howto-scroll h3{margin:0 0 10px;font-size:15px;color:#d2ebbb;text-transform:uppercase;letter-spacing:.07em}.howto-scroll p,.howto-scroll li{font:13px/1.65 system-ui,-apple-system,sans-serif;color:#d6e4ce}.howto-scroll p{margin:0 0 9px}.howto-scroll strong{color:#c4e1ab}.howto-scroll ol{padding-left:22px;margin:5px 0}.howto-two-col{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.howto-note{color:#e3ca8c!important;font-style:italic!important}.howto-maze-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}.howto-maze-card{min-width:0;padding:12px;border:1px solid #617d54;border-radius:7px;background:#283d24}.howto-maze-card h4{font-size:13px;margin:0 0 8px}.howto-map-canvas{display:block;width:100%;height:auto;aspect-ratio:21 / 10;image-rendering:pixelated;background:#b5c982}.howto-maze-card p{font-size:11px;line-height:1.4;margin:0}@media(max-width:720px){.app-heading{flex-wrap:wrap}.howto-trigger{font-size:10px;padding:7px 9px}.snake-howto-dialog{width:calc(100vw - 12px);max-height:calc(100dvh - 12px);height:94dvh}.howto-header{padding:16px 12px 13px}.howto-scroll{padding:8px 12px 16px}.howto-two-col{grid-template-columns:1fr}.howto-maze-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.howto-maze-card{padding:8px}}@media(max-width:380px){.howto-maze-grid{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){.snake-howto-dialog *{scroll-behavior:auto!important}}
