:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;--dx-color-bg-canvas:#faf8ef;--dx-color-bg-surface:#fff;--dx-color-bg-subtle:#eee4da;--dx-color-bg-accent:#8f7a66;--dx-color-text-primary:#776e65;--dx-color-text-secondary:#776e65;--dx-color-text-on-accent:#fff;--dx-color-border-default:#bbada0;--dx-color-focus:#3b82f6;--dx-font-family:system-ui,"Roboto",sans-serif;--dx-font-scale:1;--dx-safe-area-top:0px;--dx-safe-area-right:0px;--dx-safe-area-bottom:0px;--dx-safe-area-left:0px}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}:root[data-theme=dark]{--dx-color-bg-canvas:#101014;--dx-color-bg-surface:#1b1b20;--dx-color-bg-subtle:#303038;--dx-color-bg-accent:#a58b73;--dx-color-text-primary:#f5f2ed;--dx-color-text-secondary:#c9c3bd;--dx-color-border-default:#5a514a}*{box-sizing:border-box}html,body,#app{min-height:100%;margin:0}body{background:var(--dx-color-bg-canvas);color:var(--dx-color-text-primary);font-family:var(--dx-font-family);font-size:calc(16px * var(--dx-font-scale))}button{font:inherit}button:focus-visible{outline:3px solid var(--dx-color-focus);outline-offset:3px}.page{width:min(100%,520px);padding:max(16px,var(--dx-safe-area-top)) max(16px,var(--dx-safe-area-right)) max(16px,var(--dx-safe-area-bottom)) max(16px,var(--dx-safe-area-left));margin:auto}.game-header{justify-content:space-between;align-items:center;gap:12px;display:flex}h1{margin:0;font-size:clamp(3rem,18vw,5rem);line-height:1}.scores{gap:8px;display:flex}.score{background:var(--dx-color-bg-accent);min-width:76px;color:var(--dx-color-text-on-accent);text-align:center;border-radius:10px;padding:7px 10px}.score span{text-transform:uppercase;font-size:.7rem;display:block}.score strong{font-size:1.25rem}.button{cursor:pointer;border:0;border-radius:12px;min-width:48px;min-height:48px;padding:10px 18px;font-weight:700}.primary{background:var(--dx-color-bg-accent);color:var(--dx-color-text-on-accent)}.secondary{color:var(--dx-color-text-primary);background:var(--dx-color-bg-subtle)}.new-game{margin:20px 0 12px auto;display:block}.board{aspect-ratio:1;background:var(--dx-color-border-default);touch-action:none;-webkit-user-select:none;user-select:none;border-radius:16px;grid-template-columns:repeat(4,1fr);gap:clamp(6px,2vw,12px);padding:clamp(6px,2vw,12px);display:grid}.tile{background:var(--dx-color-bg-subtle);color:#776e65;border-radius:10px;place-items:center;min-width:0;font-size:clamp(1.4rem,9vw,2.8rem);font-weight:800;display:grid}.tile-2{background:#eee4da}.tile-4{background:#ede0c8}.tile-8{color:#fff;background:#f2b179}.tile-16{color:#fff;background:#f59563}.tile-32{color:#fff;background:#f67c5f}.tile-64{color:#fff;background:#f65e3b}.tile-128{color:#fff;background:#edcf72;font-size:clamp(1.2rem,7vw,2.3rem)}.tile-256{color:#fff;background:#edcc61;font-size:clamp(1.2rem,7vw,2.3rem)}.tile-512{color:#fff;background:#edc850;font-size:clamp(1.2rem,7vw,2.3rem)}.tile-1024,.tile-2048{color:#fff;background:#edc53f;font-size:clamp(1rem,5.8vw,1.9rem)}.hint{text-align:center;color:var(--dx-color-text-secondary)}.center-state{text-align:center;place-content:center;justify-items:center;gap:20px;min-height:100vh;padding:24px;display:grid}.spinner{border:4px solid var(--dx-color-bg-subtle);border-top-color:var(--dx-color-bg-accent);border-radius:50%;width:40px;height:40px;animation:.8s linear infinite spin}.dialog-backdrop{z-index:10;background:#0008;place-items:center;padding:20px;display:grid;position:fixed;inset:0}.dialog{background:var(--dx-color-bg-surface);border-radius:16px;width:min(100%,400px);padding:24px}.dialog h2{margin-top:0}.dialog-actions{flex-wrap:wrap;justify-content:flex-end;gap:10px;display:flex}.dev-badge{color:#fff;background:#a00;padding:3px 6px;font-size:10px;position:fixed;top:4px;right:4px}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}@keyframes spin{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){*,:before,:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}
