:root {
  color-scheme: light;
  --ink: #1d2a2f;
  --muted: #5b6b71;
  --paper: #f8faf8;
  --field: #dcefe0;
  --line: #73a580;
  --accent: #e2553f;
  --gold: #e6b450;
  --sky: #bde2e0;
  --button: #204f4a;
  --button-text: #ffffff;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.game-shell {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.stage-band {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto;
  gap: 18px;
  padding: clamp(16px, 4vw, 44px);
  background:
    linear-gradient(180deg, var(--sky) 0%, var(--field) 58%, #f7fbf1 100%);
}

.topbar,
.controls {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2.8rem, 3.6rem);
  line-height: 1.05;
}

.scoreboard {
  display: flex;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.scoreboard span {
  min-width: 86px;
}

.scoreboard strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

canvas {
  width: min(1180px, 100%);
  height: min(58vh, 430px);
  min-height: 260px;
  align-self: stretch;
  justify-self: center;
  display: block;
  border: 3px solid var(--line);
  border-radius: 8px;
  background: #ecf9f6;
  touch-action: manipulation;
}

.controls {
  min-height: 52px;
  color: var(--muted);
  font-weight: 650;
}

button {
  min-width: 118px;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--button);
  color: var(--button-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: #2d6c65;
}

button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.controls p {
  margin: 0;
  text-align: right;
}

@media (max-width: 680px) {
  .stage-band {
    gap: 14px;
    padding: 16px;
  }

  .topbar,
  .controls {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 1.9rem;
  }

  .scoreboard {
    width: 100%;
    justify-content: space-between;
  }

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