:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#19251e;background:#fff;font-synthesis:none;--ink:#19251e;--lime:#c7f174;--muted:#788078;--line:#e8ece5}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;min-height:100dvh}
button,a{-webkit-tap-highlight-color:transparent}
button{font:inherit;cursor:pointer;color:inherit;touch-action:manipulation;transition:background .15s,transform .15s,border-color .15s}
button:disabled{cursor:default}
button:focus-visible,a:focus-visible,.board:focus-visible{outline:3px solid #8bb947;outline-offset:5px}
button:not(:disabled):active{transform:translateY(1px)}
[hidden]{display:none!important}
.topbar{max-width:1120px;margin:auto;padding:25px 32px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;gap:11px;font-size:18px;font-weight:750;letter-spacing:-.5px;color:var(--ink);text-decoration:none}
.brand-icon{width:34px;height:34px;flex-shrink:0}
.brand-light{font-weight:450;color:#788078}
.sound-button{display:flex;align-items:center;gap:8px;background:transparent;border:0;padding:10px 0 10px 12px;font-size:14px;color:#6c766d}
.sound-button svg{width:19px;height:19px}
.sound-on-icon{display:none}
.sound-button[aria-pressed=true] .sound-on-icon{display:initial}
.sound-button[aria-pressed=true] .sound-off-icon{display:none}
.game-shell{max-width:952px;margin:0 auto;padding:29px 32px 20px}
.heading-row{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:24px}
.eyebrow{font-size:12px;letter-spacing:2px;font-weight:700;margin:0 0 6px;color:#737e70}
h1{font-size:clamp(48px,6vw,68px);line-height:1.02;letter-spacing:-4px;margin:0;font-weight:780}
h1 span{color:#8bb947}
.tagline{color:#7b837c;font-size:16px;line-height:1.55;margin:0 0 3px;text-align:right}
.game-layout{display:grid;grid-template-columns:minmax(0,560px) minmax(210px,1fr);gap:35px;align-items:start}
.play-area{min-width:0}
.board{width:100%;aspect-ratio:1;position:relative;border-radius:19px;background:#16271d;overflow:hidden;touch-action:none;box-shadow:0 10px 32px #17311b0c,0 1px 2px #172b2110}
canvas{display:block;width:100%;height:100%;touch-action:none}
.board-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#112319c9;backdrop-filter:blur(3px);text-align:center;color:#fff}
.overlay-content{padding:22px;width:100%;max-width:400px;animation:arrive .25s ease-out}
.overlay-symbol{height:65px;width:65px;margin:0 auto 19px;color:var(--lime)}
.overlay-symbol svg{width:100%;height:100%}
.overlay-eyebrow{margin:0 0 11px;font-size:12px;letter-spacing:2px;color:#c0d0bd;font-weight:650}
.overlay-content h2{font-size:44px;line-height:1.1;letter-spacing:-1.6px;margin:0 0 14px;font-weight:750}
#overlay-message{font-size:16px;line-height:1.6;color:#c0ccbf;margin:0 auto 24px;max-width:300px}
.play-button{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-width:188px;padding:15px 23px;border-radius:9px;background:var(--lime);border:1px solid var(--lime);font-weight:700;font-size:16px;color:#203020}
.play-button:hover{background:#d5fa95}
.play-button svg{width:18px;height:18px}
.overlay-hint{color:#9fac9c;font-size:14px;margin:17px 0 0}
.overlay-hint kbd{border:1px solid #597052;border-radius:4px;background:#ffffff09;padding:3px 6px;font-family:inherit;font-size:12px;color:#c5d3bf;margin-left:4px}
.board-caption{display:flex;justify-content:space-between;align-items:center;margin-top:13px;color:#7e897b;font-size:14px}
#game-status{display:flex;align-items:center;gap:7px}
#game-status i{width:6px;height:6px;border-radius:50%;background:#a4b09e}
#game-status[data-state=running] i{background:#85b246}
#game-status[data-state=over] i{background:#eb7863}
.game-panel{padding-top:9px}
.scoreboard{display:grid;grid-template-columns:1fr 1fr;gap:20px;border-bottom:1px solid var(--line);padding:0 0 24px;margin-bottom:24px}
.stat-label{font-size:14px;letter-spacing:1.4px;font-weight:650;color:#7f887c;margin:0 0 9px;display:flex;align-items:center;gap:6px;min-height:18px}
.stat-label svg{width:16px;height:16px}
.score-value,.best-value{font-variant-numeric:tabular-nums;font-size:48px;line-height:1;font-weight:650;letter-spacing:-2px;margin:0}
.best-value{color:#98a18f}
.speed-control{margin:0 0 22px;padding:0;border:0;min-width:0}
.speed-control legend{padding:0;font-size:14px;font-weight:650;letter-spacing:1.4px;color:#7f887c;margin-bottom:11px}
.speed-options{display:flex;background:#f2f5ee;border-radius:8px;padding:4px;gap:3px}
.speed-options button{flex:1;border:1px solid transparent;border-radius:5px;background:transparent;padding:9px 7px;font-size:14px;font-weight:550;color:#75806e;min-width:0}
.speed-options button[aria-pressed=true]{background:#fff;border-color:#e1e8d8;color:var(--ink);box-shadow:0 1px 3px #273f2310}
.speed-options button:disabled{opacity:.65}
.controls{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding-bottom:26px;border-bottom:1px solid var(--line)}
.action-button{display:flex;align-items:center;justify-content:center;gap:7px;padding:12px 7px;border:1px solid #dfe5d9;background:#fff;border-radius:7px;font-size:14px;font-weight:550}
.action-button svg{width:17px;height:17px;flex-shrink:0}
.action-button:disabled{color:#a6aea0;background:#fcfdfb}
.action-button:not(:disabled):hover{background:#f4f7ef;border-color:#b8c4ad}
.instructions{margin-top:26px}
.instructions h2{font-size:12px;letter-spacing:1.4px;color:#788473;font-weight:650;margin:0 0 13px}
.instructions p{font-size:16px;line-height:1.65;color:#788473;margin:0 0 14px}
.instructions .apple-note{font-size:14px;margin-top:16px;color:#8b9385}
.apple-note span{color:#f27862;font-size:14px;margin-right:7px}
.keyboard-help{margin-top:25px}
.key-row{display:flex;align-items:center;gap:4px;font-size:14px;color:#8c9686}
.key-row kbd{display:flex;align-items:center;justify-content:center;min-width:24px;height:25px;border:1px solid #dfe5d8;border-bottom-width:2px;border-radius:4px;font-size:14px;font-family:inherit;color:#747f6d}
.key-row>span{margin:0 4px}
.key-row .wasd{font-size:14px;white-space:nowrap;margin:0;letter-spacing:1px}
.keyboard-help p{font-size:14px;color:#8c9686;margin-top:10px}
.keyboard-help p span{margin:0 4px}
.keyboard-help p kbd{font:inherit;color:#66755d}
.touch-controls,.touch-help{display:none}
footer{display:flex;justify-content:space-between;margin-top:27px;padding-top:18px;border-top:1px solid var(--line);color:#98a08f;font-size:12px;gap:16px}
@keyframes arrive{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
.board.crashed{animation:bump .25s linear}
@keyframes bump{25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
@media(min-width:761px) and (max-height:800px){.topbar{padding-top:17px;padding-bottom:17px}.game-shell{max-width:842px;padding-top:21px}.heading-row{margin-bottom:19px}h1{font-size:58px}.game-layout{grid-template-columns:minmax(0,480px) minmax(210px,1fr);gap:29px}footer{margin-top:20px;padding-top:15px}}
@media(max-width:760px){.topbar{padding:14px 23px}.brand{font-size:16px}.brand-icon{width:30px;height:30px}.game-shell{padding:18px 23px 18px;max-width:560px}.heading-row{margin-bottom:16px}.eyebrow{display:none}h1{font-size:48px;letter-spacing:-3px}.tagline{font-size:14px}.game-layout{display:flex;flex-direction:column;gap:0}.play-area{width:100%;order:2}.board{border-radius:15px;max-width:min(100%,max(260px,calc(100dvh - 440px)));margin-inline:auto}.game-panel{display:contents}.scoreboard{order:0;width:100%;margin:0 0 14px;padding:0 0 14px;display:flex;justify-content:space-between;gap:22px;align-items:center}.scoreboard>div{display:flex;align-items:center;gap:12px}.stat-label{font-size:14px;margin:0}.score-value,.best-value{font-size:29px;letter-spacing:-1px}.speed-control{order:1;width:100%;margin:0 0 14px}.speed-control legend{display:none}.speed-options{padding:3px}.speed-options button{padding:7px 13px}.controls{order:3;display:grid;grid-template-columns:minmax(55px,1fr) 170px minmax(55px,1fr);width:100%;gap:8px;align-items:center;margin-top:14px;padding:0;border:0}.action-button{flex-direction:column;gap:6px;padding:12px 4px;font-size:14px;max-width:85px;width:100%;justify-self:center}.instructions{order:4;margin-top:14px;width:100%;text-align:center}.instructions h2,.instructions>p,.keyboard-help{display:none}.instructions .touch-help{display:block;font-size:14px;margin:0}.board-caption{margin-top:10px}footer{font-size:12px;margin-top:20px;padding-top:14px}.overlay-content{padding:14px}.overlay-content h2{font-size:34px;margin-bottom:10px}.overlay-symbol{width:44px;height:44px;margin-bottom:10px}#overlay-message{font-size:14px;line-height:1.45;margin-bottom:17px;max-width:230px}.overlay-eyebrow{font-size:11px;margin-bottom:9px}.play-button{padding:12px 19px;min-width:175px}.overlay-hint{display:none}.touch-controls{display:grid;grid-template-columns:repeat(3,54px);grid-template-rows:repeat(3,44px);gap:4px;touch-action:none;user-select:none}.touch-controls button{background:#f1f5eb;border:1px solid #e0e8d7;border-radius:7px;font-size:14px;font-weight:600;color:#55644a}.touch-controls button:active{background:#dceebf}.direction-up{grid-column:2;grid-row:1}.direction-left{grid-column:1;grid-row:2}.direction-right{grid-column:3;grid-row:2}.direction-down{grid-column:2;grid-row:3}.direction-center{grid-column:2;grid-row:2;display:grid;place-items:center}.direction-center>span{width:10px;height:10px;border:2px solid #aabb9b;border-radius:50%}}
@media(max-width:400px){.topbar{padding:12px 18px}.game-shell{padding:16px 18px}.heading-row{margin-bottom:14px}.brand{font-size:15px}.sound-button{font-size:14px}.tagline{font-size:14px}h1{font-size:44px}.scoreboard{padding-bottom:12px;margin-bottom:12px}.score-value,.best-value{font-size:26px}.board{max-width:min(100%,max(250px,calc(100dvh - 425px)))}.overlay-content h2{font-size:31px}.overlay-symbol{width:38px;height:38px}.controls{margin-top:12px}.instructions{margin-top:10px}footer{margin-top:16px}footer>span:first-child{display:none}footer{justify-content:center}}
@media(pointer:coarse) and (min-width:761px){.touch-controls{display:grid;grid-column:1/-1;grid-template-columns:repeat(3,60px);grid-template-rows:repeat(3,40px);gap:5px;justify-content:center;order:3;margin-top:10px}.touch-controls button{background:#f1f5eb;border:1px solid #e0e8d7;border-radius:7px;font-size:14px}.direction-up{grid-column:2;grid-row:1}.direction-left{grid-column:1;grid-row:2}.direction-right{grid-column:3;grid-row:2}.direction-down{grid-column:2;grid-row:3}.direction-center{grid-column:2;grid-row:2}.keyboard-help{display:none}.instructions .touch-help{display:block}.overlay-hint{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
