:root{--bg: #eef3f9;--ink: #1d2b3a;--muted: #4a5c70;--accent: #1c5b8f;--go: #2c9c4a;color-scheme:light}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;overscroll-behavior:none;-webkit-user-select:none;user-select:none}button{font:inherit;border:none;border-radius:10px;min-height:44px;padding:.45rem 1rem;background:#dbe4ef;color:var(--ink);cursor:pointer;touch-action:manipulation}button:disabled{opacity:.55;cursor:default}button.run{background:var(--go);color:#fff;font-weight:700}button.secondary{background:#dbe4ef}.app{display:flex;flex-direction:column;height:100dvh;overflow:hidden}.app-bar{display:flex;align-items:center;gap:.75rem;padding:.4rem .75rem;background:var(--accent);color:#fff}.app-bar h1{margin:0;font-size:1.05rem;white-space:nowrap}.level-picker{display:flex;gap:.3rem;overflow-x:auto;padding:.15rem 0;scrollbar-width:thin}.chip{flex:0 0 auto;min-width:2.2rem;min-height:2.2rem;padding:0;border-radius:999px;border:2px solid rgba(255,255,255,.55);background:transparent;color:#fff;font-weight:700}.chip.solved{background:var(--go);border-color:var(--go)}.chip.current{outline:3px solid #ffd23f;outline-offset:1px}.brief{padding:.4rem .75rem 0}.brief h2{margin:0;font-size:1rem}.brief p{margin:.1rem 0 0;font-size:.9rem;color:var(--muted)}.puzzle{flex:1;min-height:0;display:flex;gap:.6rem;padding:.6rem}.stage{flex:1 1 42%;min-width:0;min-height:0;display:flex;flex-direction:column;gap:.4rem}.stage-inner{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;container-type:size}.maze{position:relative;width:min(100cqw,100cqh * var(--ratio));aspect-ratio:var(--ratio)}.board{display:block;width:100%;height:100%;overflow:visible}.board-over{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.face-top{fill:currentColor;stroke:#14284629;stroke-width:1}.face-side{fill:currentColor}.face-left{filter:brightness(.82)}.face-right{filter:brightness(.62)}.cell-path{color:#ece3cd}.cell-dug{color:#ded2b6}.cell-wall{color:#3f6b4a}.cell-stone{color:#6f6a63}.cell-bedrock{color:#2f3a44}.cell-placed{color:#a2662f}.board-side .cell-path{color:#dfe9f4}.board-side .cell-dug{color:#c6d2e0}.board-side .cell-wall,.board-side .cell-stone{color:#8a6440}.board-side .cell-bedrock{color:#38414b}.board-side .cell-placed{color:#a2662f}.board-side .cell-water{color:#2f7fc4}.board-side .cell-lava{color:#d2461b}.board-side .cell-sand{color:#d9be7a}.board-side .cell-tree{color:#2f6b39}.tree-trunk{fill:#6b4a2c}.tree-crown{fill:#3f8c47}.tree-crown-lit{fill:#55a659}.face-crest{fill:currentColor;filter:brightness(1.22)}.hole{fill:#a2662f2e;stroke:#a2662f;stroke-width:2.5;stroke-dasharray:6 5;stroke-linejoin:round}.walker{position:absolute;display:flex;align-items:center;justify-content:center;transition:left .18s ease,top .18s ease,transform .18s ease}.walker svg{width:86%;height:86%;display:block;filter:drop-shadow(0 1px 2px rgba(0,0,0,.35))}.walker-bump svg{animation:bump .3s ease}@keyframes bump{0%,to{transform:translateY(0)}40%{transform:translateY(-14%)}}.status{margin:0;min-height:1.4em;text-align:center;font-weight:600;font-size:.95rem}.status-lose{color:#c0392b}.status-win{color:var(--go)}.status-running{color:var(--accent)}.status-idle{color:var(--muted)}.editor{flex:1 1 58%;min-width:0;min-height:0;display:flex;flex-direction:column;background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 2px 10px #1428462e}.controls{display:flex;align-items:center;gap:.45rem;padding:.45rem;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}.blocks-left{font-size:.9rem;font-weight:600;color:var(--muted)}.speed{margin-left:auto;display:flex;gap:.2rem}.speed-option{min-width:44px;padding:.35rem .5rem;background:transparent}.speed-option.chosen{background:#dbe4ef}.block-editor{flex:1;min-height:0;position:relative}.win{position:fixed;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;background:#0f1e2d8c;padding:1rem;z-index:1000}.win-card{background:#fff;border-radius:14px;padding:1.25rem 1.5rem;text-align:center;max-width:22rem;box-shadow:0 10px 30px #0000004d}.win-card h2{margin:0 0 .35rem;color:var(--go)}.win-card p{margin:0 0 1rem;color:var(--muted)}.win-buttons{display:flex;gap:.5rem;justify-content:center;flex-wrap:wrap}@media (max-width: 860px),(orientation: portrait){.puzzle{flex-direction:column}.stage{flex:0 0 36%}.editor{flex:1 1 auto}}
