* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: #050a16;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

#stage {
  position: fixed;
  inset: 0;
  display: block;
}

.ui {
  position: fixed;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 28px 16px calc(24px + env(safe-area-inset-bottom));
}

#counter {
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 24px rgba(140, 180, 255, 0.55);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  user-select: none;
}

.socials {
  pointer-events: none;
  display: flex;
  gap: 14px;
}

.socials a {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #e8eefc;
  transition: transform 0.15s ease, background 0.15s ease;
}

.socials a:hover, .socials a:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
}

.socials svg { width: 20px; height: 20px; fill: currentColor; }

.ca-pill {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #e8eefc;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.ca-pill:hover, .ca-pill:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
}

.ca-pill svg { width: 15px; height: 15px; fill: currentColor; opacity: 0.7; }

.music {
  position: fixed;
  right: 20px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.music button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #e8eefc;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.music button:hover, .music button:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
}

.music button svg { width: 20px; height: 20px; fill: currentColor; grid-area: 1 / 1; }
.music button svg[hidden] { display: none; }

#music-state {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(232, 238, 252, 0.75);
  text-shadow: 0 0 10px rgba(140, 180, 255, 0.4);
  user-select: none;
}

/* vertical volume slider: a rotated horizontal range inside a fixed box */
.music input[type="range"] {
  width: 96px;
  height: 24px;
  transform: rotate(-90deg);
  margin: 36px 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.music input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.music input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: -5px;
  background: #e8eefc;
  box-shadow: 0 0 8px rgba(140, 180, 255, 0.7);
}

.music input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.25);
}

.music input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #e8eefc;
  box-shadow: 0 0 8px rgba(140, 180, 255, 0.7);
}

.sr-spin {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

.sr-spin:focus-visible {
  width: auto;
  height: auto;
  clip-path: none;
  left: 50%;
  top: 50%;
  transform: translateX(-50%);
  pointer-events: auto;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
