:root {
  color-scheme: dark;
  --bg: #11161c;
  --panel: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .12);
  --text: #eef4f8;
  --muted: #9aa6b4;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #10161c;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
}

.shell {
  min-height: 100dvh;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: max(.75rem, env(safe-area-inset-top)) .75rem max(.75rem, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: .7rem;
}

.hud {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3rem;
  gap: .55rem;
  align-items: center;
}

.score-card,
.icon-button {
  min-height: 2.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .24);
}

.score-card {
  display: grid;
  place-items: center;
  padding: .38rem .75rem;
}

.score-card span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .09em;
  line-height: 1;
  text-transform: uppercase;
}

.score-card strong {
  font-size: clamp(1.25rem, 5vw, 2rem);
  line-height: 1;
}

.icon-button {
  color: var(--text);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.stage-wrap {
  position: relative;
  min-height: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  background: #86d2ef;
  touch-action: none;
}

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

.banner {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: .45rem;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

.banner.hidden {
  display: none;
}

.banner strong {
  font-size: clamp(2.3rem, 10vw, 4.8rem);
  line-height: .95;
}

.banner span {
  color: var(--muted);
  font-size: clamp(1rem, 4vw, 1.35rem);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 430px) {
  .shell {
    padding-left: .55rem;
    padding-right: .55rem;
  }

  .hud {
    grid-template-columns: minmax(0, 1fr) 2.7rem;
  }

  .score-card,
  .icon-button {
    min-height: 2.5rem;
  }
}
