/* ── Vuxa Live landing (/vuxa-live) ──────────────────────────
   Appended after welcome.css. Live identity = fuchsia (modeIdentity.tsx
   "live"); the primary action stays the amber key. The hero stage mock
   mirrors the real projector stage (screens/live/LiveRoomStage.tsx +
   LiveParts.tsx: dark warm ground, white tiles, amber letter keys). */

.page-live {
  --live-title: #a21caf;
  --live-emblem: #c026d3;
  --live-chip: #86198f;
  --live-border: #f0cdf5;
  --live-chip-border: #efc6f5;
  --live-tint: #fbe0ff;
  --live-fade: #fdf1ff;
  --live-surface: radial-gradient(circle at 88% 14%, var(--live-tint) 0%, transparent 62%), linear-gradient(180deg, #fff 0%, var(--live-fade) 100%);
  --stage-ground: radial-gradient(circle at 80% -10%, #3a2a12 0%, transparent 45%), linear-gradient(180deg, #1d1810 0%, #120e09 100%);
  --stage-gold: #ffe08a;
  --up: #1f6b43;
  --up-bg: #e6f4ec;
  --down: #be123c;
  --down-bg: #ffe0e5;
}

/* ── Hero copy ─────────────────────────────────────────────── */

.page-live .hero-copy .eyebrow { color: var(--live-chip); border-color: var(--live-chip-border); }
.page-live .eyebrow-dot { background: var(--live-emblem); animation: live-pulse 1.8s ease-out infinite; }
.page-live .welcome-headline { color: var(--live-title); }

/* Host on computers, join on phones: one amber key per viewport. */
.page-live .live-phone-only { display: none; }

@media (max-width: 759px), (hover: none) and (pointer: coarse) and (max-width: 1023px) {
  .page-live .live-desktop-only { display: none; }
  .page-live .btn.live-phone-only { display: inline-flex; }
  .page-live .live-mobile-note.live-phone-only { display: flex; }
}

.page-live .live-mobile-note {
  align-items: flex-start; gap: 8px; max-width: 30rem; color: var(--muted); font-size: 0.9rem;
  font-weight: 700; line-height: 1.4;
}

.page-live .live-mobile-note svg {
  width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; color: var(--live-chip);
}

@media (min-width: 980px) {
  .page-live .hero-grid { grid-template-columns: 0.92fr 1.08fr; gap: 40px; }
}

/* ── Hero visual: laptop stage + phone ─────────────────────── */

.page-live .live-hero-visual {
  position: relative; width: 100%; max-width: 600px; margin: 0 auto;
}

.page-live .live-hero-visual::before {
  content: "";
  position: absolute;
  inset: 6% 0 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--live-tint) 0%, rgba(251, 224, 255, 0.5) 55%, transparent 100%);
}
.page-live .live-scene { position: relative; aspect-ratio: 100 / 92; }

.page-live .live-laptop {
  position: absolute; top: 2%; left: 3%; width: 86%;
}

/* All stage sizes are em of one container-relative font size, so the mock
   scales as one piece from 343px to 600px. */
.page-live .live-screen {
  container-type: inline-size; aspect-ratio: 16 / 10.4; padding: 2.2%;
  border-radius: 14px 14px 4px 4px; background: #17130f;
  box-shadow: 0 26px 50px rgba(24, 20, 14, 0.24), inset 0 0 0 1px #3d352c;
}

.page-live .live-stage {
  position: relative; display: flex; flex-direction: column; gap: 0.75em; height: 100%;
  padding: 0.9em 1.3em 1em; overflow: hidden; border-radius: 6px;
  background: var(--stage-ground); color: #fff; font-size: 8px;
  font-size: clamp(6px, 2.3cqi, 13px); line-height: 1.2;
}

.page-live .live-stage-top {
  display: flex; align-items: center; justify-content: space-between; gap: 1em;
}

.page-live .live-stage-brand {
  color: var(--amber); font-size: 1.15em; font-weight: 900; font-style: italic;
  white-space: nowrap;
}

.page-live .live-join-chip {
  display: inline-flex; align-items: center; gap: 0.6em; min-width: 0;
  padding: 0.35em 0.8em 0.35em 0.35em; border-radius: 0.9em;
  background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.22);
  font-weight: 800;
}

.page-live .live-join-label {
  min-width: 0; overflow: hidden; color: rgba(255, 255, 255, 0.82); text-overflow: ellipsis;
  white-space: nowrap;
}

.page-live .live-code {
  color: #fff; font-weight: 900; letter-spacing: 0.1em; white-space: nowrap;
}
.page-live .live-stage-q { display: flex; align-items: center; gap: 1.2em; }

.page-live .live-stage-question {
  flex: 1; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden; font-size: 1.75em; font-weight: 900; line-height: 1.12;
  letter-spacing: -0.01em;
}

.page-live .live-ring {
  position: relative; display: grid; place-items: center; width: 4.4em; height: 4.4em;
  flex-shrink: 0;
}

.page-live .live-ring svg {
  position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg);
}
.page-live .live-ring circle { fill: none; stroke-width: 3.4; }
.page-live .live-ring-track { stroke: rgba(255, 255, 255, 0.16); }

.page-live .live-ring-fill {
  stroke: var(--amber); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 38;
  animation: live-drain 6s linear infinite;
}
.page-live .live-ring b { font-size: 1.55em; font-weight: 900; font-variant-numeric: tabular-nums; }
.page-live .live-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8em; }

.page-live .live-tile {
  display: flex; align-items: center; gap: 0.7em; min-width: 0; min-height: 4.2em;
  padding: 0.55em 0.7em; border: 0.2em solid #fff; border-radius: 0.9em; background: #fff;
  color: var(--ink); box-shadow: 0 0.35em 0 rgba(0, 0, 0, 0.35);
}

.page-live .live-tile b {
  display: grid; place-items: center; width: 2.5em; height: 2.5em; flex-shrink: 0;
  border: 0.16em solid var(--amber-strong); border-radius: 0.6em; background: var(--amber);
  color: var(--on-action); font-size: 1.05em; font-weight: 900; font-style: italic;
}

.page-live .live-tile span {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  font-size: 1.1em; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere;
}

.page-live .live-stage-foot {
  display: flex; align-items: center; gap: 0.9em; margin-top: auto; font-weight: 900;
}

.page-live .live-meter {
  width: 9em; height: 0.7em; flex-shrink: 0; overflow: hidden; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.page-live .live-meter i {
  display: block; width: 75%; height: 100%; border-radius: inherit; background: #fff;
  transform-origin: left; animation: live-fill 2.4s ease-out 0.3s both;
}

.page-live .live-answered {
  min-width: 0; overflow: hidden; font-size: 1.15em; text-overflow: ellipsis;
  white-space: nowrap;
}

.page-live .live-viz-react span {
  position: absolute; display: grid; place-items: center; width: 1.8em; height: 1.8em;
  border-radius: 50%; background: rgba(255, 255, 255, 0.14); font-size: 1.3em; line-height: 1;
  animation: live-rise 4.2s ease-out infinite;
}

.page-live .live-laptop-base {
  position: relative; height: 0; margin: 0 -3%; padding-top: 3.4%;
  border-radius: 2px 2px 14px 14px;
  background: linear-gradient(180deg, #ece7df 0%, #cfc7ba 100%);
  box-shadow: 0 10px 18px rgba(24, 20, 14, 0.14);
}

.page-live .live-laptop-base::before {
  content: ""; position: absolute; top: 0; left: 42%; width: 16%; height: 40%;
  border-radius: 0 0 8px 8px; background: #bdb4a6;
}

/* Phone: the player's side, light like the app. */
.page-live .live-phone {
  position: absolute; right: 3%; bottom: 0; width: 28%; min-width: 104px; max-width: 172px;
  container-type: inline-size; padding: 3.5%; border-radius: 18%/9%; background: #17130f;
  box-shadow: 0 22px 40px rgba(24, 20, 14, 0.3), inset 0 0 0 1px #3d352c;
  transform: rotate(4deg); animation: live-float 5s ease-in-out infinite;
}

.page-live .live-phone-screen {
  display: flex; flex-direction: column; gap: 0.9em; aspect-ratio: 9 / 17.5;
  padding: 1.6em 0.9em 1em; overflow: hidden; border-radius: 1.6em; background: var(--canvas);
  color: var(--ink); font-size: 9px; font-size: clamp(6.5px, 7.6cqi, 12px); line-height: 1.15;
}
.page-live .live-phone-top { display: flex; align-items: center; gap: 0.6em; }

.page-live .live-phone-count {
  padding: 0.25em 0.6em; border-radius: 0.6em; background: var(--ink); color: var(--amber);
  font-weight: 900; font-style: italic;
}

.page-live .live-phone-timer {
  flex: 1; height: 0.6em; overflow: hidden; border-radius: 999px; background: var(--line);
}

.page-live .live-phone-timer i {
  display: block; width: 62%; height: 100%; background: var(--amber-strong);
}
.page-live .live-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6em; }

.page-live .live-key {
  position: relative; display: grid; place-items: center; aspect-ratio: 1 / 0.86;
  border: 0.18em solid var(--line-strong); border-radius: 0.9em; background: #fff;
  box-shadow: 0 0.3em 0 var(--line-strong);
}
.page-live .live-key b { font-size: 2em; font-weight: 900; font-style: italic; }

/* Picked: ink border + check badge, not the fill alone. */
.page-live .live-key.is-picked { border-color: var(--ink); background: var(--amber-soft); box-shadow: 0 0.3em 0 var(--ink); }

.page-live .live-key svg {
  position: absolute; top: -0.5em; right: -0.5em; width: 1.7em; height: 1.7em; padding: 0.3em;
  border-radius: 50%; background: var(--ink); color: #fff;
}
.page-live .live-wager { display: grid; gap: 0.5em; margin-top: auto; }

.page-live .live-wager-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.35em; min-width: 0;
  min-height: 2.7em; padding: 0.3em 0.6em; border: 0.16em solid var(--line-strong);
  border-radius: 0.9em; background: #fff; font-weight: 900; text-align: center;
}

.page-live .live-wager-btn span {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Sure (selected): amber + ink border + bolt + pressed offset. */
.page-live .live-wager-btn.is-on {
  border-color: var(--ink); background: var(--amber); color: var(--on-action);
  box-shadow: 0 0.3em 0 var(--amber-strong);
}
.page-live .live-wager-btn svg { width: 1.2em; height: 1.2em; flex-shrink: 0; }

/* ── Use cases and organisers ─────────────────────────────── */

.page-live .live-uses,
.page-live .live-orgs {
  display: grid; gap: 12px; padding: 0; margin: 0; list-style: none;
}

@media (min-width: 560px) {
  .page-live .live-uses,
  .page-live .live-orgs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .page-live .live-uses { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .page-live .live-orgs { gap: 16px; }
}

.page-live .live-use,
.page-live .live-org {
  display: flex; align-items: flex-start; gap: 14px; min-width: 0; padding: 18px;
}
.page-live .live-use { background: var(--live-surface); border-color: var(--live-border); box-shadow: var(--shadow-soft); }
.page-live .live-org { padding: 22px 20px; }

.page-live .live-use h3,
.page-live .live-org h3,
.page-live .live-moment h3 {
  margin-bottom: 4px; font-size: 1.1rem; font-weight: 900; line-height: 1.2;
  overflow-wrap: anywhere;
}

.page-live .live-use p,
.page-live .live-org p,
.page-live .live-moment p { color: var(--muted); font-size: 0.95rem; }

.page-live .live-icon {
  display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 14px; background: #fff; border: 1.5px solid var(--live-chip-border);
  color: var(--live-title);
}
.page-live .live-icon svg { width: 22px; height: 22px; }
.page-live .live-icon-ink { background: var(--ink); border-color: var(--ink); color: var(--amber); }

/* ── Steps ─────────────────────────────────────────────────── */

.page-live .live-steps .step { position: relative; }

.page-live .live-step-icon {
  position: absolute; top: 22px; right: 20px; width: 30px; height: 30px;
  color: var(--live-emblem);
}

/* ── Moments ───────────────────────────────────────────────── */

.page-live .live-moments { display: grid; gap: 12px; }

@media (min-width: 640px) {
  .page-live .live-moments { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 980px) {
  .page-live .live-moments { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}

.page-live .live-moment {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 14px 20px;
}
.page-live .live-moment h3 { margin-top: 12px; padding: 0 6px; }
.page-live .live-moment p { padding: 0 6px; }

.page-live .live-viz {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 128px; padding: 14px; overflow: hidden; border: 1px solid var(--live-border);
  border-radius: 18px; background: var(--live-surface); font-size: 15px;
}

/* Sure or Hunch: reuses the phone's wager buttons at card scale. */
.page-live .live-viz-sure .live-wager-btn { flex: 1 1 0; max-width: 10rem; min-height: 3.4em; }
.page-live .live-viz-sure .live-wager-btn span { white-space: normal; overflow-wrap: anywhere; }

.page-live .live-viz-sure em {
  padding: 0.1em 0.4em; border-radius: 0.5em; background: var(--ink); color: var(--amber);
  font-style: normal; font-size: 0.85em; font-weight: 900;
}

/* Leaderboard: rank moves carry an arrow glyph, not just a colour. */
.page-live .live-viz-board ol {
  display: grid; gap: 6px; width: 100%; max-width: 17rem; padding: 0; margin: 0;
  list-style: none;
}

.page-live .live-viz-board li {
  display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 6px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 0.8rem;
  font-weight: 900;
}

.page-live .live-viz-board li.is-climber {
  position: relative; z-index: 1; border-color: var(--ink); box-shadow: 0 3px 0 var(--ink);
  animation: live-climb 6s ease-in-out infinite;
}
.page-live .live-viz-board li:not(.is-climber) { animation: live-slip 6s ease-in-out infinite; }
.page-live .live-viz-board b { width: 14px; text-align: center; }
.page-live .live-av { font-size: 1rem; }

.page-live .live-viz-board i,
.page-live .live-viz-poll i {
  flex: 1; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--amber) var(--w), var(--sunken) var(--w));
}
.page-live .live-viz-board li:nth-child(1) i { --w: 92%; }
.page-live .live-viz-board li:nth-child(2) i { --w: 80%; }
.page-live .live-viz-board li:nth-child(3) i { --w: 71%; }

.page-live .live-move {
  min-width: 34px; padding: 2px 6px; border-radius: 999px; font-style: normal;
  font-size: 0.72rem; text-align: center;
}
.page-live .live-move.up { background: var(--up-bg); color: var(--up); }
.page-live .live-move.down { background: var(--down-bg); color: var(--down); }

/* Reactions: a slice of the dark stage. */
.page-live .live-viz-react { border-color: #2b241b; background: var(--stage-ground); }
.page-live .live-viz-react span { font-size: 1.25rem; }
.page-live .live-viz-react span:nth-child(1) { left: 12%; bottom: 10%; animation-delay: 0s; }
.page-live .live-viz-react span:nth-child(2) { left: 30%; bottom: 46%; animation-delay: 0.8s; }
.page-live .live-viz-react span:nth-child(3) { left: 46%; bottom: 14%; animation-delay: 1.6s; }
.page-live .live-viz-react span:nth-child(4) { left: 62%; bottom: 50%; animation-delay: 2.4s; }
.page-live .live-viz-react span:nth-child(5) { left: 76%; bottom: 8%; animation-delay: 3.2s; }
.page-live .live-viz-react span:nth-child(6) { left: 86%; bottom: 52%; animation-delay: 1.2s; }

/* Poll: no correct state, just how the room voted. */
.page-live .live-viz-poll { flex-direction: column; align-items: stretch; gap: 8px; }

.page-live .live-viz-poll div {
  display: flex; align-items: center; gap: 10px; font-weight: 900;
}

.page-live .live-viz-poll b {
  display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0;
  border: 1.5px solid var(--amber-strong); border-radius: 8px; background: var(--amber);
  color: var(--on-action); font-size: 0.8rem; font-style: italic;
}

.page-live .live-viz-poll i {
  height: 14px; background: linear-gradient(90deg, var(--stage-gold) var(--w), #fff var(--w));
  border: 1px solid var(--line-strong); transform-origin: left;
  animation: live-fill 2.4s ease-out 0.2s both;
}
.page-live .live-viz-poll div:nth-child(1) i { --w: 58%; }
.page-live .live-viz-poll div:nth-child(2) i { --w: 29%; }
.page-live .live-viz-poll div:nth-child(3) i { --w: 13%; }

.page-live .live-viz-poll em {
  width: 3ch; font-style: normal; font-size: 0.85rem; font-variant-numeric: tabular-nums;
  text-align: right;
}

/* Pictures + music: a mini picture card and a bobbing note. */
.page-live .live-pic {
  position: relative; width: 132px; height: 92px; overflow: hidden; border: 3px solid #fff;
  border-radius: 14px; background: linear-gradient(180deg, #ffe7a0 0%, #fbe0ff 100%);
  box-shadow: var(--shadow-card); transform: rotate(-4deg);
}

.page-live .live-gif {
  position: absolute; z-index: 1; top: 6px; left: 6px; padding: 1px 6px; border-radius: 6px;
  background: var(--ink); color: #fff; font-size: 0.68rem; font-weight: 900;
  letter-spacing: 0.06em;
}

.page-live .live-sun {
  position: absolute; top: 14px; right: 18px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--amber);
}

.page-live .live-hill {
  position: absolute; bottom: -2px; left: -10px; width: 90px; height: 52px;
  background: var(--live-emblem); clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.page-live .live-hill-2 {
  left: 50px; width: 100px; height: 40px; background: var(--live-chip);
}

.page-live .live-note {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--ink); color: var(--amber); animation: live-bob 2.6s ease-in-out infinite;
}
.page-live .live-note svg { width: 24px; height: 24px; }

/* Podium: the finale gets the most polish of the six. */
.page-live .live-viz-podium { align-items: flex-end; gap: 6px; padding-bottom: 0; }

.page-live .live-viz-podium div {
  display: flex; flex-direction: column; align-items: center; width: 64px;
}
.page-live .live-viz-podium span { font-size: 1.5rem; line-height: 1.2; }

.page-live .live-viz-podium b {
  display: grid; place-items: start center; width: 100%; padding-top: 4px;
  border: 1.5px solid var(--line-strong); border-bottom: 0; border-radius: 10px 10px 0 0;
  background: #fff; font-size: 1.3rem; font-weight: 900; font-style: italic;
}
.page-live .live-step-1 b { height: 64px; border-color: var(--amber-strong); background: linear-gradient(180deg, var(--amber-top), var(--amber)); }
.page-live .live-step-1 span { animation: live-bob 2.4s ease-in-out infinite; }
.page-live .live-step-2 b { height: 44px; }
.page-live .live-step-3 b { height: 30px; }

.page-live .live-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle, var(--live-emblem) 2.5px, transparent 3px) 18% 22% / 10px 10px no-repeat, radial-gradient(circle, var(--amber) 2.5px, transparent 3px) 80% 18% / 10px 10px no-repeat, radial-gradient(circle, var(--cobalt) 2px, transparent 2.5px) 30% 52% / 10px 10px no-repeat, radial-gradient(circle, var(--amber-strong) 2px, transparent 2.5px) 70% 46% / 10px 10px no-repeat, radial-gradient(circle, var(--live-chip) 2px, transparent 2.5px) 90% 60% / 10px 10px no-repeat, radial-gradient(circle, var(--cobalt) 2.5px, transparent 3px) 8% 58% / 10px 10px no-repeat;
  animation: live-twinkle 2.2s ease-in-out infinite alternate;
}

/* ── Bottom CTA: Live's fuchsia surface, amber key ─────────── */

.page-live .live-bottom {
  border-color: var(--live-border);
  background: radial-gradient(circle at 90% 10%, var(--live-tint) 0%, transparent 55%), radial-gradient(circle at 6% 100%, #fff4cf 0%, transparent 45%), linear-gradient(160deg, #fff 0%, var(--live-fade) 100%);
}
.page-live .live-bottom h2 { color: var(--live-title); }
.page-live .live-bottom p { color: var(--muted); }
.page-live .live-bottom .live-mobile-note { justify-content: center; margin: 14px auto 0; }

/* ── Motion (decorative, loops are slow and small) ─────────── */

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(192, 38, 211, 0.55); }
  100% { box-shadow: 0 0 0 8px rgba(192, 38, 211, 0); }
}

@keyframes live-rise {
  0% { opacity: 0; transform: translateY(60%) scale(0.6); }
  15% { opacity: 1; transform: translateY(0) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-120%) scale(1.05); }
}

@keyframes live-drain {
  from { stroke-dashoffset: 10; }
  to { stroke-dashoffset: 70; }
}

@keyframes live-fill {
  from { transform: scaleX(0.2); }
  to { transform: scaleX(1); }
}

@keyframes live-float {
  0%, 100% { transform: rotate(4deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-6px); }
}

@keyframes live-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Climber swaps from 3rd to 1st; the other two step down one row. */
@keyframes live-climb {
  0%, 10%, 100% { transform: translateY(72px); }
  30%, 88% { transform: translateY(0); }
}

@keyframes live-slip {
  0%, 10%, 100% { transform: translateY(-36px); }
  30%, 88% { transform: translateY(0); }
}

@keyframes live-twinkle {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

/* Static frame = the resting state of every element above (ring at 62%,
   meter at 75%, reactions spread up the edge, climber already on top). */
@media (prefers-reduced-motion: reduce) {
  .page-live *,
  .page-live *::before,
  .page-live *::after { animation: none !important; }
}
