:root {
  color-scheme: light;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: #fff7e6;
  color: #181818;
  touch-action: none;
  user-select: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  min-height: 100svh;
}

button {
  border: 0;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.game-shell {
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 12%, rgba(255, 212, 59, 0.55), transparent 26rem),
    linear-gradient(145deg, #fffdf7 0%, #ffe16d 46%, #25c7a5 100%);
}

#game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hud {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
  pointer-events: none;
}

.meter {
  min-width: 78px;
  height: 50px;
  padding: 7px 10px;
  border: 2px solid #181818;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 4px 4px 0 #181818;
}

.label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  color: #f05a28;
}

.meter strong {
  display: block;
  margin-top: 2px;
  font-size: 24px;
  line-height: 1;
}

.icon-button {
  width: 50px;
  height: 50px;
  margin-left: auto;
  border: 2px solid #181818;
  border-radius: 50%;
  background: #fff;
  box-shadow: 4px 4px 0 #181818;
  color: #181818;
  font-size: 23px;
  font-weight: 900;
  pointer-events: auto;
}

.title-panel,
.result-panel {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: min(86vw, 390px);
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 26px 20px;
  border: 3px solid #181818;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 7px 7px 0 #181818;
  text-align: center;
}

.title-panel h1 {
  margin: 0;
  font-size: clamp(42px, 14vw, 68px);
  line-height: 0.92;
  letter-spacing: 0;
}

.help-text {
  margin: -4px 0 0;
  font-size: 15px;
  font-weight: 850;
  color: #181818;
}

.result-panel h2 {
  margin: -8px 0 0;
  font-size: clamp(54px, 18vw, 86px);
  line-height: 1;
}

.result-kicker {
  margin: 0;
  font-size: 14px;
  font-weight: 900;
  color: #f05a28;
}

.primary-button {
  min-width: 148px;
  min-height: 52px;
  padding: 0 22px;
  border: 3px solid #181818;
  border-radius: 8px;
  background: #ffd43b;
  box-shadow: 5px 5px 0 #181818;
  color: #181818;
  font-size: 22px;
  font-weight: 950;
}

.primary-button:active,
.icon-button:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 #181818;
}

.hidden {
  display: none;
}

@media (max-height: 620px) {
  .title-panel,
  .result-panel {
    top: 54%;
    gap: 12px;
    padding: 18px 16px;
  }

  .title-panel h1 {
    font-size: clamp(34px, 12vw, 50px);
  }
}
