:root,
html[data-theme="blue"]{
  --theme-primary:#00cfee;
  --theme-secondary:#2ee6a6;
  --theme-accent:#6f7cff;
  --theme-background:#050b14;
  --theme-surface:#0a1322;
  --theme-surface-alt:#101c2f;
  --theme-border:rgba(0,207,238,.34);
  --theme-text:#f2f6ff;
  --theme-muted:#aab8d5;
  --theme-glow:rgba(0,207,238,.22);
  --theme-danger:#ff5e78;
  --theme-food:#ff667e;
  --theme-grid:rgba(0,207,238,.085);
  --theme-head:#2ee6a6;
}
html[data-theme="purple"]{
  --theme-primary:#b16cff;
  --theme-secondary:#f06cff;
  --theme-accent:#7568ff;
  --theme-background:#090614;
  --theme-surface:#160d25;
  --theme-surface-alt:#211334;
  --theme-border:rgba(177,108,255,.38);
  --theme-text:#faf4ff;
  --theme-muted:#c5add8;
  --theme-glow:rgba(177,108,255,.22);
  --theme-danger:#ff628d;
  --theme-food:#ffb957;
  --theme-grid:rgba(177,108,255,.09);
  --theme-head:#f06cff;
}
html[data-theme="red"]{
  --theme-primary:#ff4e5f;
  --theme-secondary:#ff9b52;
  --theme-accent:#e9427a;
  --theme-background:#120607;
  --theme-surface:#220d11;
  --theme-surface-alt:#311218;
  --theme-border:rgba(255,78,95,.36);
  --theme-text:#fff6f4;
  --theme-muted:#d6b0b1;
  --theme-glow:rgba(255,78,95,.2);
  --theme-danger:#ffcf5a;
  --theme-food:#56e7c0;
  --theme-grid:rgba(255,78,95,.085);
  --theme-head:#ff9b52;
}
html[data-theme="green"]{
  --theme-primary:#24dc83;
  --theme-secondary:#7de35a;
  --theme-accent:#16bfa8;
  --theme-background:#041009;
  --theme-surface:#091c12;
  --theme-surface-alt:#102a1b;
  --theme-border:rgba(36,220,131,.36);
  --theme-text:#f1fff7;
  --theme-muted:#a8cbb7;
  --theme-glow:rgba(36,220,131,.2);
  --theme-danger:#ff6c74;
  --theme-food:#ffd052;
  --theme-grid:rgba(36,220,131,.085);
  --theme-head:#b7f05f;
}

*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{color-scheme:dark;background:var(--theme-background)}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--theme-background);font-family:Inter,Manrope,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--theme-text);touch-action:none;user-select:none}
button,input,a{font:inherit}
button,a{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--theme-primary);outline-offset:3px}

.app{width:100vw;height:100vh;height:100dvh;position:relative;overflow:hidden;background:linear-gradient(180deg,var(--theme-background),var(--theme-surface) 56%,var(--theme-background));transition:background .25s ease}
.app::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 12% 2%,var(--theme-glow),transparent 30%),radial-gradient(circle at 88% 91%,color-mix(in srgb,var(--theme-accent) 13%,transparent),transparent 35%);pointer-events:none}
.screen{position:absolute;inset:0;display:none;flex-direction:column;align-items:center;justify-content:flex-start;padding:0 env(safe-area-inset-right) calc(8px + env(safe-area-inset-bottom)) env(safe-area-inset-left)}
.screen.active{display:flex}

.splash{justify-content:center;background:var(--theme-background);overflow:hidden}
.splash::before,.splash::after{content:"";position:absolute;width:62vw;max-width:380px;height:1px;background:linear-gradient(90deg,transparent,var(--theme-primary),transparent);opacity:.55;animation:splash-line 1.05s ease both}
.splash::before{top:24%}.splash::after{bottom:24%;animation-delay:.12s}
.splash-content{display:flex;flex-direction:column;align-items:center;text-align:center;position:relative;z-index:2;animation:splash-in .8s cubic-bezier(.2,.75,.25,1) both}
.splash-mark{width:82px;height:82px;border-radius:24px;box-shadow:0 12px 34px var(--theme-glow);margin-bottom:20px}
.studio-name{font-weight:950;font-size:clamp(1.55rem,7.5vw,2.5rem);letter-spacing:.13em;color:var(--theme-text);text-shadow:0 0 18px var(--theme-glow)}
.developer-name{margin-top:8px;color:var(--theme-muted);font-size:.78rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase}
.splash-title{margin-top:28px;font-weight:950;font-size:clamp(2.1rem,10vw,3.5rem);letter-spacing:-.07em}.splash-title span{color:var(--theme-primary)}
.loading-line{width:128px;height:4px;margin-top:20px;border-radius:999px;background:color-mix(in srgb,var(--theme-text) 10%,transparent);overflow:hidden}.loading-line i{display:block;width:46%;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--theme-primary),var(--theme-secondary));animation:loading 1s ease-in-out both}
@keyframes splash-in{0%{opacity:0;transform:translateY(12px) scale(.98)}100%{opacity:1;transform:none}}
@keyframes splash-line{0%{opacity:0;transform:scaleX(.1)}100%{opacity:.55;transform:scaleX(1)}}
@keyframes loading{0%{transform:translateX(-110%)}100%{transform:translateX(120%)}}

.app-header{height:50px;min-height:50px;width:100%;display:flex;align-items:flex-end;justify-content:center;padding:env(safe-area-inset-top) 12px 10px;border-bottom:1px solid color-mix(in srgb,var(--theme-primary) 18%,transparent);background:color-mix(in srgb,var(--theme-background) 91%,transparent);position:relative;z-index:5}
.game-header{height:46px;min-height:46px;padding-bottom:8px}
.wordmark{font-weight:950;font-size:clamp(1.4rem,5.4vw,1.9rem);letter-spacing:-.065em;color:var(--theme-text);line-height:1;text-shadow:0 2px 0 rgba(0,0,0,.4)}.wordmark span{color:var(--theme-primary)}

.menu-shell{width:min(450px,100%);height:calc(100dvh - 50px);display:flex;flex-direction:column;justify-content:center;padding:clamp(10px,2vh,18px) 14px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.menu-card{width:100%;border:1px solid var(--theme-border);background:linear-gradient(150deg,color-mix(in srgb,var(--theme-surface) 96%,transparent),color-mix(in srgb,var(--theme-surface-alt) 84%,transparent));box-shadow:0 20px 54px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.045);border-radius:26px;padding:clamp(16px,2.3vh,22px);text-align:center}
.game-icon{display:block;width:58px;height:58px;object-fit:cover;margin:0 auto;border-radius:18px;border:1px solid var(--theme-border);box-shadow:0 10px 24px var(--theme-glow)}
.menu-card h1,.over-card h2{margin:12px 0 7px;font-size:clamp(2rem,9vw,3rem);letter-spacing:-.07em;line-height:1}.menu-card>p,.section-heading p{margin:0 auto 15px;max-width:340px;color:var(--theme-muted);line-height:1.45;font-size:.9rem}
.record-row{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:12px 16px;border-radius:18px;background:color-mix(in srgb,var(--theme-text) 5%,transparent);border:1px solid color-mix(in srgb,var(--theme-text) 9%,transparent);margin:0 0 11px;text-align:center}
.record-row span,.result-grid span,.hud-row span,.menu-stat span,.setting-head label{font-size:.66rem;letter-spacing:.13em;text-transform:uppercase;color:color-mix(in srgb,var(--theme-primary) 40%,var(--theme-text));font-weight:900}.record-row strong{font-size:1.55rem;color:var(--theme-text);line-height:1}
.mode-toggle{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:11px}.mode-btn,.control-choice button{min-height:56px;border:1px solid color-mix(in srgb,var(--theme-text) 11%,transparent);border-radius:16px;background:color-mix(in srgb,var(--theme-text) 5%,transparent);color:var(--theme-text);padding:10px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;text-align:center;cursor:pointer}.mode-btn b,.control-choice b{font-size:.91rem}.mode-btn small,.control-choice small{font-weight:750;color:var(--theme-muted);font-size:.67rem}.mode-btn.active,.control-choice button.active{background:linear-gradient(135deg,color-mix(in srgb,var(--theme-primary) 22%,transparent),color-mix(in srgb,var(--theme-accent) 18%,transparent));border-color:color-mix(in srgb,var(--theme-primary) 60%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--theme-primary) 12%,transparent)}
.menu-stats{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:11px}.menu-stat{display:grid;grid-template-columns:auto auto;align-items:center;justify-content:center;justify-items:center;gap:3px 4px;padding:9px 10px;border-radius:15px;background:color-mix(in srgb,var(--theme-text) 4%,transparent);border:1px solid color-mix(in srgb,var(--theme-text) 8%,transparent);text-align:center}.menu-stat span{grid-column:1/-1}.menu-stat strong{font-size:1.15rem;line-height:1}.menu-stat small{color:var(--theme-muted);font-weight:850}
.primary-btn,.ghost-btn,.mini-btn,.danger-btn{border-radius:16px;font-weight:900;cursor:pointer;display:flex;align-items:center;justify-content:center;text-align:center;text-decoration:none;line-height:1.15}
.primary-btn{width:100%;min-height:50px;border:0;color:#03120f;background:linear-gradient(135deg,var(--theme-primary),var(--theme-secondary));box-shadow:0 12px 28px var(--theme-glow);font-size:.98rem;padding:12px 18px}.primary-btn:active{transform:translateY(1px)}
.ghost-btn{width:100%;min-height:46px;margin-top:9px;border:1px solid color-mix(in srgb,var(--theme-text) 18%,transparent);background:color-mix(in srgb,var(--theme-text) 6%,transparent);color:var(--theme-text);padding:11px 16px}.settings-open-btn{min-height:44px}

.settings-shell{justify-content:flex-start;padding-top:14px;padding-bottom:24px}
.settings-card{padding:18px;text-align:left}
.section-heading{display:flex;align-items:center;gap:12px;margin-bottom:14px}.section-heading h1{font-size:1.7rem;margin:0 0 3px;letter-spacing:-.04em}.section-heading p{margin:0;font-size:.8rem}.section-icon{width:44px;height:44px;flex:0 0 44px;border-radius:14px;display:grid;place-items:center;color:var(--theme-primary);font-size:1.35rem;background:color-mix(in srgb,var(--theme-primary) 10%,transparent);border:1px solid var(--theme-border)}
.settings-section{border:1px solid color-mix(in srgb,var(--theme-text) 9%,transparent);background:color-mix(in srgb,var(--theme-text) 3.5%,transparent);border-radius:18px;padding:13px;margin:0 0 12px}.settings-section h2{margin:0 0 10px;font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:var(--theme-muted)}
.theme-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px}.theme-card{min-height:64px;border-radius:14px;border:1px solid color-mix(in srgb,var(--theme-text) 10%,transparent);background:color-mix(in srgb,var(--theme-text) 4%,transparent);color:var(--theme-text);display:flex;align-items:center;justify-content:center;gap:8px;padding:10px;text-align:center;cursor:pointer}.theme-card b{font-size:.76rem}.theme-card.active{border-color:var(--theme-primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--theme-primary) 18%,transparent)}.theme-preview{width:24px;height:24px;flex:0 0 24px;border-radius:8px;border:2px solid rgba(255,255,255,.35)}.blue-preview{background:linear-gradient(135deg,#00cfee 50%,#2ee6a6 50%)}.purple-preview{background:linear-gradient(135deg,#b16cff 50%,#f06cff 50%)}.red-preview{background:linear-gradient(135deg,#ff4e5f 50%,#ff9b52 50%)}.green-preview{background:linear-gradient(135deg,#24dc83 50%,#b7f05f 50%)}
.slider-section{padding-bottom:10px}.setting-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}.setting-head strong{font-size:1.08rem}.range-control{width:100%;height:30px;accent-color:var(--theme-primary);cursor:pointer}.range-control::-webkit-slider-runnable-track{height:7px;border-radius:999px;background:linear-gradient(90deg,var(--theme-surface-alt),var(--theme-primary),var(--theme-secondary))}.range-control::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:26px;height:26px;border-radius:50%;background:var(--theme-text);border:5px solid var(--theme-primary);margin-top:-9px;box-shadow:0 0 14px var(--theme-glow)}.range-scale{display:flex;justify-content:space-between;margin-top:2px;color:var(--theme-muted);font-size:.62rem;font-weight:800}
.option-list{padding:3px 13px}.toggle-row{min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:14px;border-bottom:1px solid color-mix(in srgb,var(--theme-text) 8%,transparent);cursor:pointer}.toggle-row:last-child{border-bottom:0}.toggle-row>span{display:flex;flex-direction:column;gap:3px}.toggle-row b{font-size:.83rem}.toggle-row small{color:var(--theme-muted);font-size:.66rem;line-height:1.25}.toggle-row input{position:absolute;opacity:0;pointer-events:none}.toggle-row i{position:relative;width:46px;height:26px;flex:0 0 46px;border-radius:999px;background:color-mix(in srgb,var(--theme-text) 12%,transparent);border:1px solid color-mix(in srgb,var(--theme-text) 16%,transparent);transition:.2s}.toggle-row i::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:var(--theme-muted);transition:.2s}.toggle-row input:checked+i{background:color-mix(in srgb,var(--theme-primary) 40%,transparent);border-color:var(--theme-primary)}.toggle-row input:checked+i::after{transform:translateX(20px);background:var(--theme-text)}
.control-choice{display:grid;grid-template-columns:1fr 1fr;gap:9px}.control-choice button{min-height:54px}
.settings-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:2px 0 12px}.danger-btn{min-height:42px;padding:9px 11px;border:1px solid color-mix(in srgb,var(--theme-danger) 45%,transparent);background:color-mix(in srgb,var(--theme-danger) 9%,transparent);color:var(--theme-danger);font-size:.75rem}

.game{justify-content:flex-start}.game-shell{width:100%;height:calc(100dvh - 46px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:7px 10px}.game-desc{margin:0;max-width:440px;text-align:center;color:var(--theme-muted);font-size:.78rem;line-height:1.35}.play-row{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:0}.board-wrap{position:relative;width:min(92vw,calc(100dvh - 225px),440px);aspect-ratio:1/1;border:1px solid var(--theme-border);border-radius:18px;overflow:hidden;background:var(--theme-background);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--theme-primary) 8%,transparent),0 12px 28px rgba(0,0,0,.25)}#gameCanvas{width:100%;height:100%;display:block;background:var(--theme-background)}.pause-overlay{position:absolute;inset:0;display:grid;place-items:center;background:color-mix(in srgb,var(--theme-background) 72%,transparent);font-weight:950;font-size:1.05rem;letter-spacing:.16em;color:var(--theme-text)}.pause-overlay.hidden{display:none}.side-panel{display:flex;flex-direction:column;gap:8px;width:160px;flex:0 0 auto}.hud-row,.game-actions{display:grid;gap:7px}.hud-row div{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border-radius:14px;background:color-mix(in srgb,var(--theme-text) 5%,transparent);border:1px solid color-mix(in srgb,var(--theme-text) 11%,transparent);padding:7px 10px;min-height:42px;text-align:center}.hud-row strong{font-size:.9rem;color:var(--theme-text);line-height:1}.mini-btn{min-height:36px;background:color-mix(in srgb,var(--theme-text) 6%,transparent);color:var(--theme-text);font-size:.76rem;border:1px solid color-mix(in srgb,var(--theme-text) 14%,transparent);padding:7px}.touch-hint{height:18px;color:var(--theme-muted);font-size:.69rem;transition:opacity .2s}.touch-hint.hide{opacity:0}
.dpad{display:none;grid-template-columns:repeat(3,62px);grid-template-rows:repeat(2,56px);gap:8px}.app.controls-buttons .dpad{display:grid}.dpad button{border:1px solid color-mix(in srgb,var(--theme-primary) 48%,var(--theme-border));border-radius:16px;background:linear-gradient(145deg,color-mix(in srgb,var(--theme-primary) 15%,var(--theme-surface)),color-mix(in srgb,var(--theme-text) 5%,var(--theme-surface)));color:var(--theme-text);font-size:1.3rem;font-weight:950;display:grid;place-items:center;box-shadow:0 8px 20px color-mix(in srgb,var(--theme-glow) 72%,transparent),inset 0 1px 0 color-mix(in srgb,var(--theme-text) 13%,transparent)}.dpad button:active{transform:translateY(1px);background:color-mix(in srgb,var(--theme-primary) 24%,var(--theme-surface))}.dpad button[data-direction="up"]{grid-column:2}.dpad button[data-direction="left"]{grid-column:1;grid-row:2}.dpad button[data-direction="down"]{grid-column:2;grid-row:2}.dpad button[data-direction="right"]{grid-column:3;grid-row:2}

.web-footer{display:none}.web-footer-brand{display:flex;flex-direction:column;gap:3px;min-width:max-content}.web-footer-brand strong{font-size:.77rem;letter-spacing:.16em;color:var(--theme-primary)}.web-footer-brand span{font-size:.69rem;color:var(--theme-muted);font-weight:750}.web-footer-links{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.web-footer-links a{min-height:42px;display:grid;grid-template-columns:30px auto;grid-template-rows:auto auto;align-items:center;column-gap:8px;padding:6px 11px 6px 7px;border:1px solid color-mix(in srgb,var(--theme-text) 11%,transparent);border-radius:13px;background:color-mix(in srgb,var(--theme-text) 4.5%,transparent);color:var(--theme-text);text-decoration:none;transition:border-color .18s ease,background .18s ease,transform .18s ease}.web-footer-links a>span{grid-row:1/3;width:30px;height:30px;border-radius:9px;display:grid;place-items:center;background:linear-gradient(135deg,var(--theme-primary),var(--theme-secondary));color:#03120f;font-size:.68rem;font-weight:950}.web-footer-links a>b{font-size:.72rem;line-height:1}.web-footer-links a>small{font-size:.58rem;color:var(--theme-muted);line-height:1.1}.web-footer-links a:hover{transform:translateY(-1px);border-color:color-mix(in srgb,var(--theme-primary) 58%,transparent);background:color-mix(in srgb,var(--theme-primary) 9%,transparent)}

.over-kicker{display:block;color:var(--theme-primary);font-size:.7rem;font-weight:950;letter-spacing:.16em}.result-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;margin:14px 0}.result-grid div{border-radius:16px;background:color-mix(in srgb,var(--theme-text) 5%,transparent);border:1px solid color-mix(in srgb,var(--theme-text) 10%,transparent);padding:12px;text-align:center}.result-grid strong{display:block;margin-top:5px;font-size:1.35rem;text-align:center}

.confirm-dialog{position:absolute;inset:0;z-index:50;display:grid;place-items:center;padding:20px;background:rgba(0,0,0,.68)}.confirm-dialog.hidden{display:none}.confirm-card{width:min(360px,100%);border:1px solid var(--theme-border);border-radius:22px;background:var(--theme-surface);padding:20px;text-align:center;box-shadow:0 22px 60px rgba(0,0,0,.48)}.confirm-card h2{margin:0 0 8px;font-size:1.35rem}.confirm-card p{margin:0 0 16px;color:var(--theme-muted);font-size:.86rem;line-height:1.45}.confirm-card>div{display:grid;grid-template-columns:1fr 1fr;gap:9px}.confirm-card .ghost-btn{margin:0}.confirm-card .danger-btn{font-size:.85rem}

@media (orientation:portrait){
  .play-row{flex-direction:column;gap:7px}.board-wrap{width:min(93vw,calc(100dvh - 262px),430px)}.side-panel{width:min(93vw,430px);display:grid;grid-template-columns:1fr;gap:7px}.hud-row{grid-template-columns:repeat(4,1fr)}.hud-row div{justify-items:center;gap:3px;padding:7px 4px}.hud-row span{font-size:.52rem}.hud-row strong{font-size:.78rem}.game-actions{grid-template-columns:repeat(3,1fr)}.mini-btn{min-height:40px}.app.controls-buttons .board-wrap{width:min(91vw,calc(100dvh - 350px),390px)}
}
@media (orientation:landscape){
  .game-shell{padding:5px 9px;gap:5px}.game-desc{font-size:.72rem}.board-wrap{width:min(calc(100dvh - 78px),55vw,452px)}.side-panel{width:168px}.hud-row div{min-height:32px;padding:6px 9px}.mini-btn{min-height:33px}.touch-hint{display:none}.app.controls-buttons .dpad{position:absolute;right:16px;bottom:12px;grid-template-columns:repeat(3,54px);grid-template-rows:repeat(2,49px);gap:6px;opacity:.94}
}
@media (min-width:761px) and (min-height:681px){
  html[data-platform="web"][data-screen="menu"] .app{height:calc(100dvh - 82px)}html[data-platform="web"][data-screen="menu"] .menu-shell{height:calc(100dvh - 132px)}html[data-platform="web"][data-screen="menu"] .web-footer{position:fixed;left:50%;bottom:10px;z-index:40;transform:translateX(-50%);width:min(980px,calc(100vw - 28px));min-height:62px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:9px 12px 9px 16px;border:1px solid var(--theme-border);border-radius:18px;background:color-mix(in srgb,var(--theme-surface) 90%,transparent);box-shadow:0 16px 38px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.05);backdrop-filter:blur(18px)}
}
@media (max-width:370px){
  .menu-card{padding:15px}.menu-card h1,.over-card h2{font-size:2rem}.theme-grid{gap:7px}.theme-card{padding:8px 6px}.theme-card b{font-size:.7rem}.settings-card{padding:14px}.settings-section{padding:11px}.toggle-row small{max-width:210px}.board-wrap{width:min(94vw,calc(100dvh - 248px),350px)}.mini-btn{font-size:.68rem}.hud-row span{font-size:.47rem}.hud-row strong{font-size:.7rem}
}
@media (max-height:680px) and (orientation:portrait){
  .app-header{height:42px;min-height:42px;padding-bottom:7px}.game-header{height:40px;min-height:40px}.menu-shell{height:calc(100dvh - 42px);justify-content:flex-start}.menu-card{padding:14px}.game-icon{width:48px;height:48px;border-radius:15px}.menu-card h1{font-size:1.85rem;margin:8px 0 5px}.menu-card>p{font-size:.78rem;margin-bottom:10px}.record-row,.mode-toggle,.menu-stats{margin-bottom:8px}.primary-btn{min-height:44px}.ghost-btn{min-height:40px;margin-top:7px}.game-shell{height:calc(100dvh - 40px);gap:4px}.game-desc{display:none}.board-wrap{width:min(83vw,calc(100dvh - 188px),340px)}.side-panel{width:min(83vw,340px)}.mini-btn{min-height:34px}.app.controls-buttons .board-wrap{width:min(76vw,calc(100dvh - 286px),300px)}.dpad{grid-template-columns:repeat(3,54px);grid-template-rows:repeat(2,48px);gap:6px}.dpad button{border-radius:14px;font-size:1.08rem}
}
@media (max-height:430px) and (orientation:landscape){
  .app-header,.game-header{height:34px;min-height:34px;padding-bottom:6px}.wordmark{font-size:1.25rem}.game-shell{height:calc(100dvh - 34px)}.game-desc{display:none}.board-wrap{width:min(calc(100dvh - 44px),53vw,390px)}.side-panel{width:158px;gap:5px}.hud-row,.game-actions{gap:5px}.hud-row div{min-height:30px}.mini-btn{min-height:30px;font-size:.69rem}
}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
