html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden; background: #0b1a2b;
  touch-action: none; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #fff;
}
canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }

#hud {
  position: fixed; top: 8px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  pointer-events: none; padding: 0 12px;
}
.pill {
  background: rgba(8, 24, 44, .62); border: 1px solid rgba(170, 220, 255, .4);
  border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 15px;
  letter-spacing: .02em; white-space: nowrap; text-shadow: 0 1px 2px #000;
}
.pill.score { color: #bfe8ff; min-width: 56px; text-align: center; }

#banner {
  position: fixed; left: 0; right: 0; top: 36%; transform: translateY(-50%);
  text-align: center; pointer-events: none; padding: 0 16px;
  font-weight: 900; font-size: clamp(30px, 9vmin, 78px); letter-spacing: .03em;
  color: #ffffff; text-shadow: 0 0 18px rgba(120,200,255,.9), 0 3px 0 #1b4a78, 0 6px 14px #000;
  opacity: 0; transition: opacity .15s;
}
#banner.show { opacity: 1; }

.overlay {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(10,30,55,.25), rgba(5,14,28,.72));
  cursor: pointer; padding: 16px; box-sizing: border-box;
}
#loading { background: #0b1a2b; cursor: default; }
.loadtxt { font-size: 20px; font-weight: 700; color: #a9dcff; letter-spacing: .1em; }
.card { text-align: center; max-width: 560px; }
h1 {
  margin: 0 0 8px; font-weight: 900; line-height: .95;
  font-size: clamp(34px, 10.5vmin, 96px); letter-spacing: .03em;
  background: linear-gradient(#ffffff, #d8f0ff 45%, #6cc4ff 85%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 0 #17406b) drop-shadow(0 0 22px rgba(120,200,255,.55));
}
h2 { margin: 0 0 6px; font-size: clamp(30px, 8vmin, 60px); font-weight: 900; color: #e3f4ff; text-shadow: 0 3px 0 #17406b; }
.sub { font-size: clamp(16px, 3.6vmin, 22px); margin: 6px 0 4px; color: #e6f5ff; font-weight: 600; text-shadow: 0 2px 4px #000; }
.best { font-size: 18px; color: #bfe8ff; font-weight: 700; margin: 8px 0; text-shadow: 0 2px 4px #000; }
.cta {
  display: inline-block; margin: 18px 0 6px; padding: 12px 26px; border-radius: 999px;
  background: linear-gradient(#5cc2ff, #2a7fd6); color: #fff; font-weight: 800;
  font-size: clamp(16px, 3.8vmin, 22px); box-shadow: 0 4px 0 #154a85, 0 8px 22px rgba(0,0,0,.5);
  animation: pulse 1.4s ease-in-out infinite;
}
.hint { font-size: 14px; color: #d6ecff; opacity: .9; margin-top: 14px; line-height: 1.5; text-shadow: 0 1px 3px #000; }
.bigscore { font-size: clamp(48px, 14vmin, 96px); font-weight: 900; color: #bfe8ff; text-shadow: 0 4px 0 #17406b, 0 0 24px rgba(120,200,255,.6); }
.newbest { display: inline-block; margin: 4px 0 8px; padding: 4px 14px; border-radius: 8px; background: #ffd23a; color: #3a1800; font-weight: 900; font-size: 18px; }
.stats { font-size: 17px; color: #e6f5ff; line-height: 1.7; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .cta { animation: none; } }
