:root {
  color-scheme: dark;
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  background: #090b16;
  color: #f7f8ff;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 50% 12%, rgba(91, 83, 255, .2), transparent 35rem),
    linear-gradient(160deg, #12162c 0%, #090b16 62%);
}

.shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(14px, 2.4vw, 30px);
  display: grid;
  grid-template-rows: auto minmax(300px, 1fr) auto;
  gap: 16px;
}

.masthead, footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 2px;
  color: #9ea8ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(27px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -.04em;
}

button {
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: 11px 18px;
  background: linear-gradient(135deg, #7568ff, #a656eb);
  box-shadow: 0 8px 28px rgba(91, 78, 255, .3);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover { filter: brightness(1.12); }
button:focus-visible { outline: 3px solid #ffec8a; outline-offset: 3px; }

.stage {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  border: 1px solid rgba(180, 188, 255, .18);
  border-radius: 24px;
  background: rgba(0, 0, 0, .22);
  box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 24px 70px rgba(0, 0, 0, .34);
}

#game-root { position: absolute; inset: 0; overflow: hidden; }

footer {
  align-items: flex-start;
  color: #b8bdd8;
  font-size: 13px;
  line-height: 1.45;
}

footer p { margin: 0; max-width: 52ch; }
footer strong { color: #fff; }
kbd { border: 1px solid #555d80; border-radius: 5px; padding: 1px 5px; background: #202642; color: #fff; }

@media (max-width: 650px) {
  .shell { padding: 12px; gap: 10px; }
  .stage { border-radius: 18px; }
  footer { display: block; }
  footer p + p { margin-top: 5px; }
  button { padding: 9px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
