:root {
  color-scheme: light;
  --ink: #19323c;
  --muted: #5f7480;
  --panel: #fffaf0;
  --line: #c9e1d9;
  --accent: #ff6b35;
  --accent-dark: #b23a1f;
  --mint: #5fc8a6;
}

* {
  box-sizing: border-box;
}

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

body {
  font-family: Avenir, "Avenir Next", "Trebuchet MS", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 205, 114, 0.35), transparent 28rem),
    radial-gradient(circle at 88% 18%, rgba(95, 200, 166, 0.28), transparent 24rem),
    linear-gradient(135deg, #eef8f6 0%, #fff4dc 52%, #fbe5d5 100%);
}

.shell {
  width: min(1100px, calc(100vw - 24px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 22px 0;
}

.game-card {
  width: 100%;
  padding: clamp(14px, 2vw, 22px);
  border: 1px solid rgba(25, 50, 60, 0.12);
  border-radius: 8px;
  background: rgba(255, 250, 240, 0.82);
  box-shadow: 0 28px 70px rgba(75, 54, 32, 0.16);
  backdrop-filter: blur(14px);
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

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

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: 0;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  color: #fffaf0;
  background: #19323c;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: #254957;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 8 / 3;
  border: 2px solid rgba(25, 50, 60, 0.16);
  border-radius: 8px;
  overflow: hidden;
  background: #c7f1ff;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: auto;
  touch-action: manipulation;
}

.restart-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: none;
  background: var(--accent);
  color: #2b170d;
}

.restart-button.is-visible {
  display: block;
}

.control-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.control-strip span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(25, 50, 60, 0.11);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  font-size: 0.88rem;
  font-weight: 700;
}

@media (max-width: 680px) {
  .topbar {
    align-items: start;
  }

  .canvas-wrap {
    aspect-ratio: 16 / 9;
  }

  button {
    padding: 0 10px;
  }
}
