:root {
  --bg: #0f1220;
  --bg-raised: #171b2e;
  --text: #f3f4fb;
  --text-dim: #a6acc8;
  --accent-default: #7ce0ff;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font-display: "Space Grotesk", "Avenir Next", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100%;
  /* Kills the double-tap-to-zoom gesture (which fires constantly on all
     the tap-happy controls here) while leaving pinch-zoom and panning
     alone — those stay available for accessibility. */
  touch-action: manipulation;
}

body {
  background-image: radial-gradient(circle at 15% 10%, #1c2140 0%, transparent 45%),
    radial-gradient(circle at 85% 0%, #241a3a 0%, transparent 40%);
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

/* -------- top bar -------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 18, 32, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.audio-controls {
  display: flex;
  gap: 0.6rem;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.3rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-start {
  background: linear-gradient(135deg, #7ce0ff, #7c9bff);
  color: #0f1220;
  box-shadow: 0 0 18px rgba(124, 224, 255, 0.35);
}

.btn-stop {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* -------- main layout -------- */

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.floor-intro {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 1rem 0 2rem;
  color: var(--text-dim);
}

/* -------- start overlay -------- */

.start-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 35%, #232a4d 0%, var(--bg) 65%);
  opacity: 1;
  transition: opacity 0.3s ease;
}

.start-overlay.dismissed {
  opacity: 0;
  pointer-events: none;
}

.start-overlay-inner {
  text-align: center;
  max-width: 26rem;
  padding: 2rem;
}

.start-overlay-kicker {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent-default);
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}

.start-overlay-inner h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 0 0 0.75rem;
}

.start-overlay-sub {
  color: var(--text-dim);
  margin: 0 0 2rem;
  line-height: 1.5;
}

.btn-overlay {
  font-size: 1.15rem;
  padding: 1rem 2rem;
  animation: overlay-pulse 2.4s ease-in-out infinite;
}

.start-overlay-note {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin: 1.5rem 0 0;
  line-height: 1.5;
}

@keyframes overlay-pulse {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(124, 224, 255, 0.35);
  }
  50% {
    box-shadow: 0 0 30px rgba(124, 224, 255, 0.65);
  }
}

/* -------- reduced motion -------- */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
