html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #7fb4e6;
  font-family: "Helvetica Neue", Arial, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

#scene {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  touch-action: manipulation;
}

/* ---------- title card ---------- */
#title-card {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 42%, rgba(6, 12, 24, 0.28) 0%, rgba(4, 8, 18, 0.62) 100%);
  z-index: 10;
  transition: opacity 900ms ease;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#title-card.hidden {
  opacity: 0;
  pointer-events: none;
}

.tc-inner {
  text-align: center;
  color: #f2f6ff;
  padding: 24px;
  max-width: min(92vw, 720px);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.tc-seat {
  font-size: clamp(11px, 1.6vw, 15px);
  letter-spacing: 0.42em;
  margin: 0 0 10px;
  color: #ffd9a8;
  font-weight: 600;
}

.tc-name {
  font-size: clamp(56px, 13vw, 128px);
  line-height: 0.95;
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-indent: 0.16em; /* balance tracking */
  color: #ffffff;
}

.tc-stats {
  font-size: clamp(13px, 2.4vw, 20px);
  letter-spacing: 0.22em;
  margin: 0 0 30px;
  color: #cfe2ff;
  font-weight: 600;
}

#ride-button {
  font: inherit;
  font-size: clamp(16px, 2.6vw, 22px);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #0b1626;
  background: #ffd25e;
  border: 0;
  border-radius: 10px;
  padding: 16px 34px;
  min-width: 260px;
  min-height: 56px;
  cursor: pointer;
  box-shadow: 0 6px 30px rgba(255, 190, 60, 0.45), inset 0 -3px 0 rgba(0, 0, 0, 0.15);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
#ride-button:hover, #ride-button:focus-visible {
  background: #ffe08a;
  transform: translateY(-2px) scale(1.02);
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 3px;
}
#ride-button:active {
  transform: translateY(1px) scale(0.99);
}

.tc-line {
  margin: 26px 0 0;
  font-size: clamp(11px, 1.7vw, 14px);
  letter-spacing: 0.18em;
  color: #b9cdea;
}

.tc-audio {
  margin: 10px 0 0;
  font-size: clamp(11px, 1.6vw, 13px);
  color: #93a9cc;
}

.tc-keys {
  margin: 8px 0 0;
  font-size: clamp(10px, 1.5vw, 12px);
  color: #7e93b8;
  letter-spacing: 0.06em;
}

#fatal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #10141c;
  color: #eee;
  z-index: 20;
  text-align: center;
  padding: 24px;
}
#fatal[hidden] { display: none; }

@media (max-width: 480px) {
  .tc-seat { letter-spacing: 0.3em; }
  #ride-button { width: min(86vw, 340px); }
}
