:root {
  --sky-top: #0b1033;
  --sky-bottom: #2a1a4f;
  --star: #ffd95e;
  --ink: #f4f1ff;
  --accent: #ff8fb1;
  --panel: rgba(12, 14, 40, 0.82);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: linear-gradient(var(--sky-top), var(--sky-bottom));
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: none;
}
canvas { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
#hud {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between;
  padding: 12px 18px; font-size: clamp(16px, 4vw, 24px);
  pointer-events: none; text-shadow: 0 2px 4px #000a;
}
#hud b { color: var(--star); margin-left: 6px; }
.panel {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(88vw, 360px); padding: 28px 24px; text-align: center;
  background: var(--panel); border: 2px solid #ffffff22; border-radius: 20px;
  box-shadow: 0 10px 40px #0008;
}
.panel h1 { margin: 0 0 10px; color: var(--star); font-size: clamp(28px, 8vw, 40px); letter-spacing: 1px; }
.panel p { margin: 0 0 18px; line-height: 1.5; opacity: 0.9; }
#final { font-size: 64px; font-weight: bold; color: var(--star); margin-bottom: 18px; }
button {
  font: inherit; font-size: 20px; font-weight: bold; color: #1b1240;
  background: var(--star); border: 0; border-radius: 999px;
  padding: 12px 36px; cursor: pointer; box-shadow: 0 4px 0 #b8902a;
}
button:active { transform: translateY(3px); box-shadow: 0 1px 0 #b8902a; }
button:hover { filter: brightness(1.08); }
.hidden { display: none !important; }
