:root {
  color-scheme: dark;
  --ink: #e8edff;
  --dim: #8ea0c8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #090b14;
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  overscroll-behavior: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* The only thing on screen while playing. */
#score {
  position: fixed;
  top: max(0.7rem, env(safe-area-inset-top));
  left: max(0.9rem, env(safe-area-inset-left));
  font: 600 1.05rem/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.06em;
  color: rgba(232, 237, 255, 0.62);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

#hint {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(142, 160, 200, 0.75);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
  pointer-events: none;
}

#overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(1.2rem, env(safe-area-inset-top)) 1.2rem max(1.2rem, env(safe-area-inset-bottom));
  background: radial-gradient(120% 90% at 50% 35%, rgba(18, 24, 46, 0.86), rgba(5, 6, 13, 0.96));
  backdrop-filter: blur(3px);
  z-index: 2;
}

#overlay[hidden] { display: none; }

.panel {
  width: min(24rem, 100%);
  text-align: center;
}

h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, #7cd3ff, #a855f7 55%, #f97316);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

#lede { margin: 0 0 1.4rem; color: var(--dim); }
#lede strong { color: var(--ink); font-size: 1.35em; }

ul {
  margin: 0 0 1.6rem;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: 0.92rem;
  color: var(--dim);
}

li { padding: 0.42rem 0; border-top: 1px solid rgba(140, 165, 220, 0.14); }
li:first-child { border-top: 0; }
li b { color: var(--ink); font-weight: 600; }

button {
  display: block;
  width: 100%;
  margin: 0 0 0.6rem;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 0.7rem;
  font: inherit;
  font-weight: 600;
  color: #071018;
  background: linear-gradient(100deg, #7cd3ff, #63b8ff);
  cursor: pointer;
}

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

#install {
  color: var(--ink);
  background: rgba(140, 165, 220, 0.14);
  box-shadow: inset 0 0 0 1px rgba(140, 165, 220, 0.28);
}

#status {
  margin: 0.4rem 0 0;
  min-height: 1.2em;
  font-size: 0.78rem;
  color: rgba(142, 160, 200, 0.72);
}
