:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #0d1713;
  color: #eef8f1;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: radial-gradient(ellipse at 50% 0, #274334, transparent 58%), #0d1713; }
.game-shell { width: min(100% - 28px, 620px); margin: 0 auto; padding: 24px 0 36px; }
.heading { text-align: center; }
.home-link { color: #b5d2bd; font-size: .88rem; text-decoration: none; }
.home-link:hover { color: #fff; }
.eyebrow { margin: 22px 0 5px; color: #f3c97a; font-size: .72rem; font-weight: 800; letter-spacing: .19em; }
h1 { margin: 0; font-size: clamp(2.8rem, 12vw, 4.5rem); line-height: 1; letter-spacing: -.07em; }
h1 span { color: #f3c97a; }
.tagline { margin: 10px 0 22px; color: #b5d2bd; }
.game-card { overflow: hidden; border: 1px solid #ffffff20; border-radius: 22px; background: #17251d; box-shadow: 0 22px 70px #0005; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 6px; }
.toolbar label { display: flex; align-items: center; gap: 8px; color: #d5e6d9; font-size: .9rem; }
select, button { border: 1px solid #ffffff24; border-radius: 10px; padding: 9px 12px; background: #283c30; color: #fff; font: inherit; }
button { border: 0; background: #f3c97a; color: #261d0d; font-weight: 800; cursor: pointer; }
button:hover { background: #ffdda0; }
button:disabled { cursor: not-allowed; opacity: .45; }
button[hidden] { display: none; }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.actions { display: flex; gap: 8px; }
.actions button { padding-inline: 10px; font-size: .86rem; }
.status { min-height: 1.5em; margin: 12px 16px; color: #d5e6d9; text-align: center; }
.board { display: grid; gap: 4px; width: min(100% - 32px, 480px); margin: 0 auto 16px; padding: 8px; border: 1px solid #ffffff14; border-radius: 14px; background: #101a14; }
.cell { display: grid; min-width: 0; aspect-ratio: 1; place-items: center; border-radius: 7px; font-size: clamp(.6rem, 4vw, 1.5rem); }
.wall { background: linear-gradient(145deg, #53665a, #2d4034); box-shadow: inset 0 2px #ffffff19, inset 0 -3px #0004; }
.floor { background: #1b2a20; }
.goal { background: radial-gradient(circle, #fff2ba 0 13%, #e9ad4f 15% 25%, #233225 28%); }
.box { color: #fff1ca; background: #ad7040; box-shadow: inset 0 2px #ffffff30, inset 0 -4px #633d28; }
.box.goal { color: #fff; background: radial-gradient(circle, #f7ebaf 0 14%, #8bc484 16% 28%, #ad7040 30%); }
.player { color: #12291d; background: #83dda1; box-shadow: inset 0 2px #ffffff75, inset 0 -4px #36744c; }
.player.goal { background: radial-gradient(circle, #83dda1 0 42%, #f3c97a 45% 58%, #253628 60%); }
.mobile-controls { display: none; justify-content: center; gap: 8px; padding: 0 12px 16px; }
.mobile-controls button { width: 48px; height: 44px; padding: 0; font-size: 1.2rem; }
.hint { color: #91aa98; font-size: .83rem; line-height: 1.6; text-align: center; }
@media (max-width: 520px) {
  .toolbar { align-items: stretch; flex-direction: column; }
  .toolbar label { justify-content: space-between; }
  .toolbar select { flex: 1; }
  .actions button { flex: 1; }
  .mobile-controls { display: flex; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
