:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0b1020;
  color: #f7fbff;
}

* {
  box-sizing: border-box;
}

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

button {
  font: inherit;
}

.game-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #0b1020;
}

#game {
  width: 100vw;
  height: 100vh;
  display: block;
  touch-action: none;
}

.hud {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.hud-item {
  min-width: 92px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(7, 12, 28, 0.62);
  backdrop-filter: blur(12px);
}

.hud-item span {
  display: block;
  color: #a9b6c9;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hud-item strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.05;
}

.icon-button {
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #fff;
  background: rgba(7, 12, 28, 0.66);
  pointer-events: auto;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 10, 21, 0.28);
  pointer-events: auto;
}

.overlay.hidden {
  display: none;
}

.title-block {
  width: min(480px, 92vw);
  text-align: center;
}

.title-block h1 {
  margin: 0 0 10px;
  font-size: clamp(42px, 8vh, 86px);
  line-height: 0.95;
  letter-spacing: 0;
}

.title-block p {
  margin: 0 auto 20px;
  max-width: 34ch;
  color: #d7e2f4;
  font-size: 17px;
  line-height: 1.5;
}

.title-block button {
  min-width: 132px;
  height: 48px;
  border: 0;
  border-radius: 8px;
  color: #09111d;
  background: #ffd166;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(255, 209, 102, 0.22);
}

.touch-controls {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: none;
  justify-content: space-between;
  pointer-events: none;
}

.touch-controls button {
  width: 64px;
  height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #fff;
  background: rgba(7, 12, 28, 0.62);
  font-size: 28px;
  font-weight: 800;
  pointer-events: auto;
  touch-action: none;
}

@media (hover: none), (pointer: coarse) {
  .touch-controls {
    display: flex;
  }

  .hud {
    gap: 8px;
  }

  .hud-item {
    min-width: 78px;
  }
}
