:root {
  color-scheme: dark;
  --bg: #111513;
  --panel: #1b2420;
  --ink: #f5f2e8;
  --muted: #b6b0a2;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #43d9ad;
}

* {
  box-sizing: border-box;
}

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

body {
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button {
  min-height: 42px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, var(--line));
  border-radius: 6px;
  background: var(--accent);
  color: #10110f;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.shell {
  width: min(1120px, calc(100% - 28px));
  display: grid;
  gap: 14px;
  padding: 24px 0;
}

.hud,
.controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow,
.controls p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1;
}

h1 {
  margin-top: 6px;
  font-size: 2.3rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.stats span {
  min-width: 96px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.stats strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 1.25rem;
}

.stage-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  touch-action: none;
}

.overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 22px;
  background: rgba(8, 9, 8, 0.74);
  text-align: center;
}

.overlay[hidden] {
  display: none;
}

.overlay h2 {
  max-width: 760px;
  font-size: 1.65rem;
}

.overlay p {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.controls {
  align-items: center;
}

.controls button {
  min-width: 98px;
}

.controls p {
  max-width: 720px;
  line-height: 1.45;
  text-align: right;
}

@media (max-width: 720px) {
  .hud,
  .controls {
    display: grid;
  }

  .stats {
    justify-content: stretch;
  }

  .stats span {
    min-width: 0;
    flex: 1 1 86px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .controls p {
    text-align: left;
  }
}
