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

* { box-sizing: border-box; }

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

button { font: inherit; }

.loading,
.welcome {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 30%, rgba(25, 191, 214, .2), transparent 35%),
    linear-gradient(145deg, #04101e, #0a2942);
}

.welcome[hidden], .loading[hidden], .screen-controls[hidden] { display: none !important; }

.welcome-card {
  width: min(92vw, 520px);
  padding: clamp(28px, 5vw, 50px);
  border: 1px solid rgba(112, 231, 255, .38);
  border-radius: 28px;
  text-align: center;
  background: rgba(4, 18, 32, .78);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 18px;
  border: 2px solid #76ecff;
  border-radius: 22px 7px 22px 7px;
  color: #76ecff;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: -.08em;
  transform: rotate(-3deg);
}

.loading p, .welcome p { color: #b9d6e5; }
.eyebrow { margin: 0 0 8px; color: #76ecff !important; font-weight: 800; letter-spacing: .18em; }
.welcome h1 { margin: 0; font-size: clamp(42px, 10vw, 72px); line-height: .95; letter-spacing: -.06em; }

#startButton {
  width: 100%;
  margin: 25px 0 14px;
  padding: 16px 22px;
  border: 0;
  border-radius: 15px;
  color: #02101c;
  background: linear-gradient(135deg, #7af0ff, #35c5d7);
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(55, 206, 226, .25);
}

.welcome small { display: block; color: #7997a8; line-height: 1.4; }

.screen-controls {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 18px;
  background: rgba(3, 15, 27, .8);
  backdrop-filter: blur(12px);
}

.screen-controls button {
  min-width: 48px;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #155977;
  font-weight: 800;
  cursor: pointer;
}

.screen-controls button:nth-child(2) { background: #0c8992; }

.notice {
  position: fixed;
  z-index: 30;
  top: 18px;
  left: 50%;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(3, 17, 29, .88);
  opacity: 0;
  transform: translate(-50%, -12px);
  transition: .25s ease;
  pointer-events: none;
}

.notice.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 520px) {
  .screen-controls { width: calc(100% - 24px); justify-content: center; }
  .screen-controls button { flex: 1; padding-inline: 8px; }
}
