:root{--ink: #244b3e;--muted: #72816a;--surface: #e9efe2;--paper: #fffdf4;--line: #cdd9c4;--gold: #f1cd68}*{box-sizing:border-box}html{background:var(--surface)}body{margin:0;background:var(--surface);color:var(--ink);font:12px DM Sans,sans-serif}button,select{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.4;box-shadow:none}button:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #be6636;outline-offset:3px}.game-shell{width:100%;max-width:480px;margin:0 auto;padding:17px 17px 10px}.game-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.kicker{color:#7a896d;font-size:7px;font-weight:800;letter-spacing:.13em}h1{font-family:Bricolage Grotesque,sans-serif;font-size:32px;line-height:1.12;letter-spacing:-.05em;margin:3px 0 0}h1 span{color:#d27745}h2{font-family:Bricolage Grotesque,sans-serif;margin:10px 0 8px;font-size:25px;line-height:1.1;letter-spacing:-.04em}.level-picker{max-width:190px;display:flex;flex-direction:column;gap:5px;font-size:7px;color:#7a896d;letter-spacing:.12em;font-weight:700}select{color:var(--ink);border:1px solid #c4d2b8;background:var(--paper);padding:8px;min-height:36px;border-radius:9px;box-shadow:0 2px #dae3d0;max-width:100%;font-size:10px;letter-spacing:0}.game-stats{margin:14px 3px 3px}.stats-line{display:flex;justify-content:space-between;gap:8px;font-size:9px;color:#6c7f61}#level-name{font-weight:700;color:#486744}.boarding-progress{height:4px;border-radius:3px;background:#d4dfcb;margin-top:8px;overflow:hidden}#boarding-fill{display:block;height:100%;width:0;border-radius:3px;background:#6e9670;transition:width .3s ease}.board-wrap{position:relative;width:100%;margin:3px auto 0}#game{width:100%;aspect-ratio:480/514}#game canvas{display:block!important;max-width:100%;height:auto!important;touch-action:pan-y}#message{min-height:35px;margin:4px 6px 8px;display:flex;align-items:center;justify-content:center;text-align:center;color:#536f4f;font-size:10px;line-height:1.55}.controls{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.controls button{display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 3px;min-height:42px;border:1px solid #c3d1b7;background:var(--paper);color:var(--ink);font-size:10px;font-weight:700;border-radius:10px;box-shadow:0 3px #cfdbc3;transition:background .15s,transform .15s}.controls svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.controls #hint{background:var(--gold);border-color:#d9b451;box-shadow:0 3px #d3b65f}.controls button:hover:not(:disabled){background:#f5e5b2;transform:translateY(-1px)}.controls button:active:not(:disabled){transform:translateY(2px);box-shadow:none}.controls #sound[aria-pressed=true]{background:#d1e4c7}.keyboard-controls{margin-top:14px;color:#74836a;font-size:9px}.keyboard-controls summary{display:flex;align-items:center;justify-content:center;gap:9px;cursor:pointer;padding:9px;min-height:34px;list-style:none}.keyboard-controls summary::-webkit-details-marker{display:none}.keyboard-controls[open] summary span{transform:rotate(45deg)}.keyboard-controls p{line-height:1.6;text-align:center}#bus-controls{display:grid;grid-template-columns:repeat(3,1fr);gap:7px;padding-top:4px}#bus-controls button{padding:8px 3px;border:1px solid #b9cbb0;border-radius:8px;background:var(--paper);min-height:42px;color:var(--ink);font-size:9px}.game-footer{display:flex;align-items:center;justify-content:center;gap:6px;color:#859379;font-size:7px;text-align:center;line-height:1.6;margin:8px 0 0}.footer-dot{width:4px;height:4px;border-radius:50%;background:#91ac7b}#result{position:absolute;left:7%;right:7%;bottom:9%;padding:22px 18px;text-align:center;border:1px solid #fff9e7;background:#fffdf3f5;border-radius:18px;box-shadow:0 12px 30px #1e3e332d;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}#result[hidden]{display:none}#result-badge{display:grid;place-items:center;margin:auto;width:36px;height:36px;border-radius:50%;color:#fffef2;background:#648965;box-shadow:0 3px #426845;font-size:23px}#result[data-status=lost] #result-badge{background:#c47649;box-shadow:0 3px #a85e34}#result p{font-size:11px;line-height:1.6;color:#6b7961}#next{min-height:42px;border:1px solid #d9b64d;background:var(--gold);color:var(--ink);border-radius:9px;padding:10px 23px;box-shadow:0 3px #d3b65f;font-weight:700;font-size:12px}body[data-expanded=true] .game-shell{height:100dvh;max-width:720px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto auto auto;padding:12px 20px}body[data-expanded=true] .board-wrap{min-height:0;height:100%;width:min(100%,calc((100dvh - 230px) * 480 / var(--board-height, 514)));align-self:center}body[data-expanded=true] #game{height:100%}body[data-expanded=true] .game-footer{display:none}body[data-expanded=true] .keyboard-controls{margin-top:4px}body[data-expanded=true] .keyboard-controls[open]{max-height:130px;overflow:auto}@media(max-width:400px){.game-shell{padding:13px 9px 9px}h1{font-size:29px}.level-picker{max-width:156px}select{font-size:9px;padding:7px 4px}.controls{gap:6px}.controls button{font-size:9px;gap:4px}.controls svg{width:14px;height:14px}.stats-line{font-size:8px}.game-footer{font-size:6.5px}#result{padding:15px 12px;bottom:6%}#result h2{font-size:21px}body[data-expanded=true] .game-shell{padding:10px 9px}}@media(min-width:650px)and (max-height:580px){body[data-expanded=true] .game-shell{max-width:980px;grid-template-columns:minmax(0,1fr) 235px;grid-template-rows:auto auto minmax(0,1fr) auto auto;grid-template-areas:"board header" "board stats" "board message" "board controls" "board keyboard";gap:5px 20px;padding:10px 20px}body[data-expanded=true] .board-wrap{grid-area:board;width:min(100%,calc((100dvh - 20px) * 480 / var(--board-height, 514)))}body[data-expanded=true] .game-header{grid-area:header;flex-wrap:wrap;gap:7px}body[data-expanded=true] .kicker,body[data-expanded=true] .level-picker>span{display:none}body[data-expanded=true] h1{font-size:24px;margin:0}body[data-expanded=true] .level-picker{width:100%;max-width:none}body[data-expanded=true] .game-stats{grid-area:stats;margin:3px 0}body[data-expanded=true] #message{grid-area:message;min-height:26px;font-size:9px;margin:0}body[data-expanded=true] .controls{grid-area:controls;grid-template-columns:repeat(2,1fr)}body[data-expanded=true] .keyboard-controls{grid-area:keyboard;margin:0}body[data-expanded=true] .controls button{min-height:36px;padding:6px 3px}body[data-expanded=true] .keyboard-controls summary{min-height:26px;padding:4px}body[data-expanded=true] .keyboard-controls[open]{position:absolute;z-index:2;right:20px;bottom:10px;width:235px;max-height:calc(100dvh - 20px);padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--paper)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;animation:none!important}}
