:root {
  color-scheme: light;
  --ink: #15171f;
  --muted: #606a78;
  --line: #dcd3c1;
  --accent: #e3562f;
  --shadow: 0 24px 70px rgb(21 23 31 / 14%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 18%, rgb(83 177 239 / 26%), transparent 23rem),
    radial-gradient(circle at 86% 16%, rgb(210 166 59 / 22%), transparent 26rem),
    linear-gradient(135deg, #f8f6f0 0%, #eef6f0 52%, #fbf5e8 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.page {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 34px;
}

.topbar,
.brand,
.nav,
.hero,
.instructions,
.game-footer {
  display: flex;
  align-items: center;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 38px;
}

.brand {
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--ink);
  border-radius: 7px;
}

.nav {
  gap: 6px;
}

.nav a {
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
  border-radius: 7px;
}

.nav a:hover {
  color: var(--ink);
  background: rgb(255 255 255 / 70%);
}

.hero {
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: #b7351c;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 0;
  font-size: clamp(2.55rem, 6vw, 5.1rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.instructions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 360px;
}

.instructions span {
  padding: 9px 11px;
  color: var(--muted);
  background: rgb(255 255 255 / 74%);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 800;
}

.cabinet {
  overflow: hidden;
  padding: 12px;
  background: #15171f;
  border: 1px solid rgb(255 255 255 / 80%);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f1726;
  image-rendering: pixelated;
  border-radius: 4px;
}

.game-footer {
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 18px;
  background: rgb(255 255 255 / 78%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.game-footer p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.45;
}

button {
  min-height: 44px;
  padding: 0 16px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: #b7351c;
}

@media (max-width: 760px) {
  .topbar,
  .hero,
  .game-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    margin-bottom: 26px;
  }

  .instructions {
    justify-content: flex-start;
    max-width: none;
  }

  .game-footer button {
    width: 100%;
  }
}
