:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #8ed2ef;
  color: #161616;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  touch-action: none;
}

body {
  display: grid;
  place-items: center;
  background: #8ed2ef;
}

.game-shell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: #8ed2ef;
}

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

.hud {
  position: absolute;
  inset: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) auto max(14px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 10px;
  pointer-events: none;
}

.hud div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hud strong,
.hud p,
.hud button {
  border: 2px solid rgba(40, 50, 38, 0.22);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 24px rgba(24, 52, 35, 0.12);
  backdrop-filter: blur(6px);
}

.hud strong {
  min-width: 92px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: clamp(14px, 2.2vmin, 22px);
  line-height: 1;
}

.hud p {
  grid-column: 1 / -1;
  width: fit-content;
  max-width: min(680px, calc(100vw - 28px));
  margin: 0;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: clamp(13px, 2vmin, 20px);
  line-height: 1.25;
}

.hud button {
  pointer-events: auto;
  justify-self: end;
  width: auto;
  min-width: 80px;
  min-height: 42px;
  border-radius: 999px;
  color: #151515;
  font-weight: 800;
  font-size: clamp(14px, 2vmin, 18px);
  cursor: pointer;
}

.hud button:active {
  transform: translateY(1px);
}

@media (max-width: 680px) {
  .hud {
    grid-template-columns: 1fr auto;
    gap: 7px;
  }

  .hud strong {
    min-width: 74px;
    padding: 7px 9px;
  }

  .hud p {
    padding: 7px 9px;
  }
}
