:root {
  color-scheme: dark;
  --ink: #f6f0df;
  --muted: #aeb4aa;
  --panel: rgba(11, 14, 13, 0.78);
  --accent: #d9ff4a;
  --danger: #ff4b34;
  --blue: #3f86ff;
  --road: #4e5250;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 25% 10%, rgba(217, 255, 74, 0.16), transparent 28rem),
    linear-gradient(140deg, #111512 0%, #1b201d 42%, #090b0a 100%);
  color: var(--ink);
  font-family: "Trebuchet MS", "Malgun Gothic", sans-serif;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
}

.shell {
  width: min(100%, 920px);
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(210px, 1fr);
  align-items: stretch;
  gap: 18px;
}

.stage {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 21 / 38;
  max-height: calc(100vh - 36px);
  margin-inline: auto;
  border: 1px solid rgba(246, 240, 223, 0.18);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.46), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  background: #242827;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.hud {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  pointer-events: none;
}

.hud > div,
.panel,
.overlay {
  background: var(--panel);
  backdrop-filter: blur(14px);
}

.hud > div {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(246, 240, 223, 0.13);
  border-radius: 6px;
}

.label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
}

.hud strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overlay {
  position: absolute;
  inset: auto 18px 22px;
  padding: 20px;
  border: 1px solid rgba(246, 240, 223, 0.15);
  border-radius: 8px;
}

.overlay.hidden {
  display: none;
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.14em;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 7vw, 58px);
  line-height: 0.9;
  letter-spacing: 0;
}

.subcopy {
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #121410;
  font: 700 16px/1 "Trebuchet MS", "Malgun Gothic", sans-serif;
  cursor: pointer;
}

.panel {
  align-self: end;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(246, 240, 223, 0.13);
  border-radius: 8px;
}

.panel-block p {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 740px) {
  body {
    padding: 0;
    overflow: auto;
  }

  .shell {
    min-height: 100vh;
    display: block;
  }

  .stage {
    width: 100vw;
    max-height: none;
    height: 100vh;
    border: 0;
    border-radius: 0;
  }

  .panel {
    display: none;
  }
}
