/* ============================================================
   SHELF SHOCK V4 — Three-Act Game Show
   Dark theme, Affinity brand, GPU-safe animations only.
   ============================================================ */

:root {
  --bg: #012BAC;
  --cyan: #7AE8FF;
  --blue: #2482F4;
  --navy: #012BAC;
  --green: #00B364;
  --green-bright: #00d464;
  --red: #ff4444;
  --orange: #F25700;
  --purple: #7D07DA;
  --text: #f0f0f0;
  --text-dim: rgba(255,255,255,0.5);
  --glass: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.12);
  --font: 'Red Hat Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --bounce: cubic-bezier(0.8, -0.5, 0.2, 1.8);
  --exit: cubic-bezier(0.4, 0, 1, 1);
  --dramatic: cubic-bezier(0.22, 1, 0.36, 1);
  --snap: cubic-bezier(0, 0.85, 0.15, 1);

  /* Depth system */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.1);
  --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);

  /* Act accent colors (set by JS per act) */
  --act-accent: var(--cyan);
  --act-tint: rgba(122, 232, 255, 0.1);

  /* Persona color (set by JS on reveal) */
  --persona-color: var(--cyan);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow: hidden;
  height: 100dvh;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  height: 100dvh;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* === BACKGROUND === */
.bg-base {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.bg-gradient {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 15% 30%, rgba(36, 130, 244, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 20%, rgba(122, 232, 255, 0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 50% 80%, rgba(125, 7, 218, 0.08) 0%, transparent 45%),
    linear-gradient(180deg, #001040 0%, var(--bg) 40%, #000820 100%);
  animation: bg-shift 20s ease-in-out infinite alternate;
}
@keyframes bg-shift {
  0% { opacity: 0.85; }
  50% { opacity: 1; }
  100% { opacity: 0.9; }
}
.bg-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.6;
}

/* === SCREENS === */
#app {
  position: relative; z-index: 1;
  height: 100dvh; width: 100%;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
}
@media (min-width: 768px) {
  #app {
    max-width: 480px;
    border-left: 1px solid rgba(122, 232, 255, 0.08);
    border-right: 1px solid rgba(122, 232, 255, 0.08);
    box-shadow: 0 0 80px rgba(1, 43, 172, 0.3);
  }
}

.screen {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding-bottom: 64px; /* space for host panel */
  opacity: 0; pointer-events: none;
  transition: opacity 250ms var(--smooth);
}
@media (max-width: 480px) {
  .screen { padding-bottom: 64px; }
}
.screen.active { opacity: 1; pointer-events: auto; }

/* === SCREEN TRANSITIONS === */
@keyframes screen-scale-enter {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes screen-scale-exit {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(1.04); }
}
@keyframes screen-slide-left-enter {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes screen-slide-left-exit {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-40px); }
}
@keyframes screen-slide-up-enter {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes screen-slide-up-exit {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-20px); }
}
@keyframes screen-crossfade-enter {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes screen-crossfade-exit {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.screen.screen-exit-scale      { animation: screen-scale-exit      300ms var(--exit)     forwards; pointer-events: none; }
.screen.screen-exit-slide-left { animation: screen-slide-left-exit 300ms var(--exit)     forwards; pointer-events: none; }
.screen.screen-exit-slide-up   { animation: screen-slide-up-exit   280ms var(--exit)     forwards; pointer-events: none; }
.screen.screen-exit-crossfade  { animation: screen-crossfade-exit  250ms var(--smooth)   forwards; pointer-events: none; }

.screen.active.screen-enter-scale      { animation: screen-scale-enter      380ms var(--dramatic) both; }
.screen.active.screen-enter-slide-left { animation: screen-slide-left-enter 340ms var(--dramatic) both; }
.screen.active.screen-enter-slide-up   { animation: screen-slide-up-enter   340ms var(--dramatic) both; }
.screen.active.screen-enter-crossfade  { animation: screen-crossfade-enter  250ms var(--smooth)   both; }

/* === ACT THEME TINTING === */
.act-theme-1 .bg-gradient {
  background:
    radial-gradient(ellipse at 20% 40%, rgba(1,43,172,0.55) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 25%, rgba(36,130,244,0.25) 0%, transparent 45%),
    var(--bg);
}
.act-theme-2 .bg-gradient {
  background:
    radial-gradient(ellipse at 20% 40%, rgba(87,5,152,0.5) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 25%, rgba(125,7,218,0.2) 0%, transparent 45%),
    var(--bg);
}
.act-theme-3 .bg-gradient {
  background:
    radial-gradient(ellipse at 20% 40%, rgba(130,40,0,0.5) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 25%, rgba(242,87,0,0.2) 0%, transparent 45%),
    var(--bg);
}
.act-theme-1 .bg-gradient,
.act-theme-2 .bg-gradient,
.act-theme-3 .bg-gradient {
  transition: background 600ms var(--smooth);
}

/* === SPLASH === */
.splash {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 0 24px;
}
.splash .btn-play { margin-top: 16px; }
.splash-icon {
  width: 80px; height: 80px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}
.splash-title {
  font-size: 56px;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 30%, var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.splash-hook {
  font-size: 18px; color: var(--text-dim); max-width: 280px; line-height: 1.4;
}
.splash-hook em {
  color: var(--cyan); font-style: normal; font-weight: 700;
}
.splash-dare {
  font-size: 15px; color: var(--orange); font-weight: 600;
  padding: 8px 20px;
  border: 1px solid rgba(242,87,0,0.3);
  border-radius: 100px;
}
/* Splash brand header */
.splash-brand-header {
  width: 100%;
  display: flex; justify-content: center; align-items: center;
  padding-bottom: 4px;
}
.splash-wordmark {
  display: none;
}
.splash-logo {
  width: 180px;
  display: block;
  margin: 0 auto;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}
/* Gradient accent bar below wordmark */
.splash-accent-bar {
  width: 60px; height: 3px; border-radius: 2px;
  background: linear-gradient(90deg, var(--navy), var(--cyan));
  margin-bottom: 4px;
}
/* Subtitle under game title */
.splash-subtitle {
  font-size: 15px; font-weight: 400; letter-spacing: 0.04em;
  color: var(--text-dim); margin-top: -8px;
}

.splash-footer {
  margin-top: 16px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.brand-mark {
  font-size: 12px; font-weight: 700; letter-spacing: 0.18em; color: var(--text-dim);
}
.brand-sub {
  font-size: 12px; letter-spacing: 0.08em; color: rgba(255,255,255,0.25);
}

/* Results screen wordmark */
.results-wordmark {
  display: none;
}
.results-logo {
  width: 120px;
  opacity: 0.7;
  margin: 8px auto 0;
  display: block;
  filter: brightness(0) invert(1);
}

/* === BUTTONS (shared) === */
.btn-play, .btn-go, .btn-next, .btn-submit, .btn-meeting, .btn-replay {
  font-family: var(--font); font-weight: 700; border: none; cursor: pointer;
  border-radius: var(--radius-md); transition: transform 80ms ease-out, box-shadow 150ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-play:active, .btn-go:active, .btn-next:active,
.btn-submit:active, .btn-meeting:active, .btn-replay:active {
  transform: scale(0.95);
}

.btn-play {
  font-size: 20px; padding: 18px 48px;
  background: var(--cyan);
  color: var(--bg); border-radius: var(--radius-md);
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(122, 232, 255, 0.3);
}
.btn-play:hover { box-shadow: 0 6px 24px rgba(122, 232, 255, 0.4); }
.btn-go {
  font-size: 18px; padding: 16px 40px; width: 100%; max-width: 300px;
  background: var(--cyan);
  color: var(--bg); font-weight: 800;
  box-shadow: 0 4px 16px rgba(122, 232, 255, 0.3);
}
.btn-go:disabled { opacity: 0.3; cursor: not-allowed; transform: none; }

.btn-next {
  font-size: 17px; padding: 16px 40px;
  background: var(--glass); color: var(--text);
  border: 1px solid var(--glass-border);
  width: 100%; max-width: 300px;
}
.btn-submit {
  font-size: 15px; padding: 12px 28px;
  background: var(--glass); color: var(--text);
  border: 1px solid var(--glass-border);
}
.btn-meeting {
  font-size: 16px; padding: 14px 24px; width: 100%; max-width: 320px;
  background: var(--cyan); color: var(--bg); font-weight: 800;
  text-decoration: none; text-align: center; display: block;
  box-shadow: 0 4px 16px rgba(122, 232, 255, 0.3);
}
.btn-replay {
  font-size: 15px; padding: 12px 20px; width: 100%; max-width: 320px;
  background: transparent; color: var(--cyan);
  border: 2px solid var(--cyan); font-weight: 700;
}

/* === NAME SCREEN === */
.name-screen {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: 0 24px;
}
.name-label { font-size: 24px; font-weight: 700; }
.name-input {
  font-family: var(--font); font-size: 28px; font-weight: 700;
  text-align: center; width: 100%; max-width: 300px;
  background: var(--glass); border: 2px solid var(--glass-border);
  border-radius: 14px; color: var(--text); padding: 16px;
  outline: none; backdrop-filter: blur(12px);
}
.name-input:focus { border-color: var(--cyan); }
.name-input::placeholder { color: rgba(255,255,255,0.2); font-weight: 400; }
.company-input {
  font-size: 20px; font-weight: 500;
  margin-top: 8px;
}

/* === TUTORIAL === */
.tutorial {
  display: flex; flex-direction: column; align-items: center; gap: 28px;
  padding: 0 24px; text-align: center;
}
.tutorial .btn-play { margin-top: 16px; }
.tut-title { font-size: 28px; font-weight: 900; }
.tut-steps { display: flex; flex-direction: column; gap: 20px; }
.tut-step {
  display: flex; align-items: center; gap: 16px;
  text-align: left;
}
.tut-num {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #ffffff; font-weight: 900; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tut-num.act-1-bg,
.tut-num.act-2-bg,
.tut-num.act-3-bg { background: linear-gradient(135deg, var(--navy), var(--blue)); }

.tut-text { font-size: 16px; font-weight: 600; line-height: 1.4; }
.tut-warning {
  font-size: 14px; color: var(--orange); font-weight: 600;
  margin-top: 8px;
}

/* === ACT TRANSITION === */
.transition {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  text-align: center; padding: 0 24px;
}
.transition::before {
  content: ''; position: absolute;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, var(--act-accent) 0%, transparent 70%);
  opacity: 0.08; filter: blur(40px);
  animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 0.06; }
  50% { transform: scale(1.3); opacity: 0.12; }
}
.transition-icon {
  width: 80px; height: 80px; margin-bottom: 8px;
  animation: pop-in 500ms var(--spring);
}
.transition-icon svg { width: 100%; height: 100%; }
.transition-act {
  font-size: 14px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--act-accent);
  animation: slide-up 400ms var(--spring) 100ms both;
}
.transition-name {
  font-size: 28px; font-weight: 900; line-height: 1.15;
  text-wrap: balance;
  animation: slide-up 400ms var(--spring) 200ms both;
}
.transition-sub {
  font-size: 17px; color: var(--text-dim); font-weight: 600;
  animation: slide-up 400ms var(--spring) 300ms both;
}
.transition-scoring {
  font-size: 13px; color: rgba(255,255,255,0.35); font-weight: 500;
  margin-top: 12px; letter-spacing: 0.02em;
}
.transition-tap {
  font-size: 14px; color: rgba(255,255,255,0); font-weight: 600;
  letter-spacing: 0.08em; margin-top: 24px;
  transition: color 400ms ease;
}
.transition-tap.visible {
  color: rgba(255,255,255,0.5);
  animation: pulse-tap 1.5s ease-in-out infinite;
}
@keyframes pulse-tap {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Full-screen invisible button: captures every tap on the transition screen.
   Real <button> fires click reliably on iOS Safari where a <div> often doesn't. */
.transition-tap-btn {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background: transparent; border: 0; padding: 0; margin: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none; appearance: none;
  touch-action: manipulation;
  z-index: 2;
}
.transition-tap-btn:focus { outline: none; }

/* Keep content above the invisible button, but let taps pass through to the button */
#screen-transition .transition {
  position: relative;
  z-index: 1;
}
#screen-transition .transition,
#screen-transition .transition * {
  pointer-events: none;
}

/* === ROUND SCREEN === */
#screen-round {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  padding-bottom: 72px;
  overflow: hidden;
}
@media (max-width: 480px) {
  #screen-round { padding-bottom: 56px; }
}
@media (min-width: 769px) {
  #screen-round { padding-bottom: 88px; }
}

.round-bar {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; padding-right: 60px;
  z-index: 10;
  padding-top: max(12px, env(safe-area-inset-top, 12px));
}
.round-num {
  font-size: 14px; font-weight: 700; color: var(--text-dim);
  background: var(--glass); padding: 4px 12px; border-radius: 100px;
}
.act-badge {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  color: var(--act-accent);
  background: var(--act-tint); padding: 4px 14px; border-radius: 100px;
  text-transform: uppercase;
}
.round-pts {
  font-size: 14px; font-weight: 700; color: var(--cyan);
  background: var(--glass); padding: 4px 12px; border-radius: 100px;
}

/* Question area */
.question-area {
  position: relative;
  text-align: center; padding: 16px 24px;
  z-index: 5; pointer-events: none;
  margin-top: 0;
  flex-shrink: 0;
  border-radius: 20px;
  background: rgba(13,13,26,0.45);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
}
@supports (backdrop-filter: blur(1px)) {
  .question-area {
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    background: rgba(13,13,26,0.3);
  }
}
@supports not (backdrop-filter: blur(1px)) {
  .question-area {
    background: rgba(13,13,26,0.82);
  }
}
.q-category {
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--act-accent);
  display: block; margin-bottom: 8px;
}
.q-text {
  font-size: 20px; font-weight: 700; line-height: 1.3;
  max-width: 340px; margin: 0 auto;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

/* === OPTIONS AREA (adaptive layout) === */
.options-area {
  display: flex; flex-direction: column;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px 24px;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  overflow: visible;
}

/* Stacked text buttons (personality A-E, prediction A-D) */
.option-btn {
  font-family: var(--font);
  font-size: 15px; font-weight: 600;
  text-align: left;
  padding: 14px 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  color: var(--text);
  cursor: pointer;
  transition: transform 80ms ease-out, border-color 150ms ease;
  -webkit-tap-highlight-color: transparent;
  display: flex; align-items: center; gap: 12px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  width: 100%;
  min-height: 56px;
}
.option-btn:active:not(.locked) { transform: scale(0.97); }

.option-letter {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 900; color: var(--text-dim);
  flex-shrink: 0;
}

.option-btn.selected {
  border-color: var(--act-accent);
  background: var(--act-tint);
}
.option-btn.selected .option-letter {
  background: var(--act-accent);
  color: var(--bg);
}
.option-btn.correct-answer {
  border-color: var(--green-bright);
  background: rgba(0, 212, 100, 0.15);
}
.option-btn.correct-answer .option-letter {
  background: var(--green-bright);
  color: var(--bg);
}
.option-btn.wrong-answer {
  border-color: var(--red);
  background: rgba(255, 68, 68, 0.12);
}
.option-btn.wrong-answer .option-letter {
  background: var(--red);
  color: white;
}
.option-btn.dimmed {
  opacity: 0.35;
}
.option-btn.locked {
  cursor: default;
  pointer-events: none;
}

/* Speed round TRUE/FALSE cards */
.speed-zone {
  display: flex; gap: 16px;
  width: 100%;
}
.speed-btn {
  flex: 1;
  font-family: var(--font);
  font-size: 22px; font-weight: 900;
  letter-spacing: 0.05em;
  padding: 28px 16px;
  border-radius: 16px;
  border: 2px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  cursor: pointer;
  transition: transform 80ms ease-out, border-color 150ms ease, background 150ms ease;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.speed-btn:active:not(.locked) { transform: scale(0.95); }

.speed-btn.true-btn:hover { border-color: var(--green-bright); }
.speed-btn.false-btn:hover { border-color: var(--red); }

.speed-btn.selected-correct {
  border-color: var(--green-bright);
  background: rgba(0, 212, 100, 0.2);
  color: var(--green-bright);
}
.speed-btn.selected-wrong {
  border-color: var(--red);
  background: rgba(255, 68, 68, 0.15);
  color: var(--red);
}
.speed-btn.was-correct {
  border-color: var(--green-bright);
  background: rgba(0, 212, 100, 0.15);
}
.speed-btn.locked { cursor: default; pointer-events: none; }
.speed-btn.dimmed { opacity: 0.35; }

/* === ANSWER FEEDBACK GLOW === */
.option-btn.glow-correct {
  box-shadow: 0 0 20px rgba(0, 179, 100, 0.6), 0 0 40px rgba(0, 179, 100, 0.3), inset 0 0 12px rgba(0, 179, 100, 0.15);
  border-color: rgba(0, 179, 100, 0.6);
  transition: box-shadow 0.15s ease-out, border-color 0.15s ease-out;
}
.option-btn.glow-wrong {
  box-shadow: 0 0 20px rgba(242, 87, 0, 0.6), 0 0 40px rgba(242, 87, 0, 0.3), inset 0 0 12px rgba(242, 87, 0, 0.15);
  border-color: rgba(242, 87, 0, 0.6);
  transition: box-shadow 0.15s ease-out, border-color 0.15s ease-out;
}
.option-btn.glow-personality {
  box-shadow: 0 0 16px rgba(36, 130, 244, 0.5), 0 0 32px rgba(36, 130, 244, 0.2);
  border-color: rgba(36, 130, 244, 0.4);
  transition: box-shadow 0.15s ease-out, border-color 0.15s ease-out;
}
.speed-btn.glow-correct {
  box-shadow: 0 0 20px rgba(0, 179, 100, 0.6), 0 0 40px rgba(0, 179, 100, 0.3);
  border-color: rgba(0, 179, 100, 0.6);
  transition: box-shadow 0.15s ease-out, border-color 0.15s ease-out;
}
.speed-btn.glow-wrong {
  box-shadow: 0 0 20px rgba(242, 87, 0, 0.6), 0 0 40px rgba(242, 87, 0, 0.3);
  border-color: rgba(242, 87, 0, 0.6);
  transition: box-shadow 0.15s ease-out, border-color 0.15s ease-out;
}

/* Speed round claim text (above the buttons) */
.speed-claim {
  font-size: 18px; font-weight: 700; line-height: 1.4;
  text-align: center; padding: 0 8px;
  flex-shrink: 0;
}

/* === TIMER BAR (bottom) === */
.timer-bar-container {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 48px;
  display: flex; align-items: center;
  padding: 0 20px;
  z-index: 10;
  padding-bottom: max(8px, env(safe-area-inset-bottom, 8px));
}
.timer-bar {
  flex: 1; height: 6px;
  background: var(--green-bright);
  border-radius: 3px;
  transform-origin: left;
  transition: background-color 300ms ease;
}
.timer-bar.warning { background: var(--orange); }
.timer-bar.danger { background: var(--red); }
.timer-bar.timer-urgent {
  box-shadow: 0 0 12px rgba(242, 87, 0, 0.5), 0 0 24px rgba(242, 87, 0, 0.2);
}
.timer-bar.timer-critical {
  box-shadow: 0 0 16px rgba(255, 68, 68, 0.6), 0 0 32px rgba(255, 68, 68, 0.3);
  animation: timer-pulse 0.5s ease-in-out infinite;
}
@keyframes timer-pulse {
  0%, 100% { box-shadow: 0 0 16px rgba(255, 68, 68, 0.6), 0 0 32px rgba(255, 68, 68, 0.3); }
  50% { box-shadow: 0 0 24px rgba(255, 68, 68, 0.8), 0 0 48px rgba(255, 68, 68, 0.4); }
}

.timer-seconds {
  font-size: 16px; font-weight: 900; color: var(--text-dim);
  margin-left: 12px; min-width: 20px; text-align: right;
}

/* === REVEAL === */
.reveal {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  padding: 0 24px; text-align: center; width: 100%; max-width: 400px;
}
.reveal-verdict {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.verdict-icon {
  width: 64px; height: 64px;
  animation: pop-in 400ms var(--spring);
}
.verdict-icon svg { width: 100%; height: 100%; }
.verdict-text {
  font-size: 28px; font-weight: 900;
}
.verdict-text.correct { color: var(--green-bright); text-shadow: 0 0 30px rgba(0,212,100,0.4); }
.verdict-text.wrong { color: var(--red); text-shadow: 0 0 20px rgba(255,68,68,0.3); }
.verdict-text.timeout { color: var(--orange); }

.reveal-insight {
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 16px; padding: 20px; width: 100%;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: slide-up 300ms var(--spring);
}
.insight-text { font-size: 16px; line-height: 1.5; margin-bottom: 10px; }
.insight-source { font-size: 12px; color: var(--text-dim); font-style: italic; }

/* Correct answer card on reveal screen (no Lock avatar — Lock is in bottom panel only) */
.reveal-host {
  display: flex; align-items: center; justify-content: center;
  width: 100%; padding: 12px 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  animation: slide-up 400ms var(--spring);
}
.reveal-host-text {
  font-size: 15px; line-height: 1.5; color: var(--text);
  font-weight: 600; text-align: center;
}

/* === HOST PANEL (persistent game show host) === */
.host-panel {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex; align-items: center; gap: 10px;
  width: 100%; max-width: 100%;
  padding: 8px 14px;
  background: linear-gradient(180deg, rgba(0, 10, 40, 0.94) 0%, rgba(0, 0, 0, 0.97) 100%);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(122, 232, 255, 0.1);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.4);
}
.host-avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  transition: transform 200ms var(--spring);
  position: relative;
  margin-top: 0;
}
@media (min-width: 768px) {
  .host-panel { max-width: 520px; padding: 10px 20px; gap: 16px; }
  .host-avatar { width: 56px; height: 56px; margin-top: -16px; }
}
.host-avatar.bounce { transform: scale(1.15); }
.host-avatar svg {
  width: 100%; height: 100%;
  filter: drop-shadow(0 0 12px rgba(122, 232, 255, 0.4))
          drop-shadow(0 0 24px rgba(122, 232, 255, 0.15));
}
.host-speech {
  display: flex; flex-direction: column; gap: 3px;
  min-width: 0; flex: 1;
}
.host-name {
  font-size: 12px; font-weight: 800;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cyan); opacity: 0.9;
}
.host-dialogue {
  font-size: 16px; font-weight: 500;
  color: var(--text); line-height: 1.4;
  transition: opacity 150ms ease;
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
}
/* Host mobile styles now handled in base (mobile-first) */

/* === REACTION LAYER === */
.reaction-layer {
  position: fixed; inset: 0; z-index: 70;
  pointer-events: none; overflow: hidden;
}
.reaction-emoji {
  position: absolute;
  font-size: 80px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  animation: reaction-pop 800ms var(--spring) forwards;
}
@keyframes reaction-pop {
  0% { transform: translate(-50%, -50%) scale(0) rotate(-15deg); }
  40% { transform: translate(-50%, -50%) scale(1.3) rotate(5deg); }
  70% { transform: translate(-50%, -50%) scale(0.95) rotate(-2deg); }
  100% { transform: translate(-50%, -50%) scale(1) rotate(0); opacity: 0; }
}

/* === PERSONA REVEAL === */
#screen-persona {
  background: radial-gradient(ellipse at 50% 40%, var(--persona-color, var(--cyan)) 0%, transparent 35%);
  background-color: var(--bg);
  /* Dim the persona glow so text stays readable */
}
#screen-persona::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(13, 13, 26, 0.55);
  pointer-events: none;
  z-index: 0;
}
#screen-persona > * {
  position: relative;
  z-index: 1;
}
.persona-reveal {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 24px; text-align: center; width: 100%; max-width: 400px;
  position: relative; height: 100%; justify-content: center;
}

/* Progress dots */
.persona-dots {
  display: flex; gap: 8px; justify-content: center; margin-bottom: 8px;
}
.pdot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transition: background 300ms, transform 300ms var(--spring);
}
.pdot.active {
  background: var(--cyan);
  transform: scale(1.3);
}

/* Step containers */
.persona-step {
  display: none; flex-direction: column; align-items: center;
  justify-content: center; gap: 20px;
  width: 100%; flex: 1;
}
.persona-step.active { display: flex; }
.persona-step-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-dim);
}

/* Tap button — stays in flow, flex-shrink keeps it visible */
.persona-tap-btn {
  flex-shrink: 0; margin-top: 24px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-dim); font-size: 12px; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 10px 40px; border-radius: 100px; cursor: pointer;
  animation: pulse-tap 2s ease-in-out infinite;
}
@keyframes pulse-tap {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

/* Solo card (centered, larger) */
.persona-card-solo {
  max-width: 340px; width: 100%;
}

.persona-reveal-label {
  font-size: 14px; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--text-dim);
}
.persona-reveal-art {
  width: 180px; height: 180px;
}
.persona-reveal-art svg { width: 100%; height: 100%; }
.persona-reveal-name {
  font-size: 36px; font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 0 12px rgba(255,255,255,0.15);
}
.persona-reveal-tagline {
  font-size: 16px; font-weight: 600; color: var(--text-dim);
}

/* Pro/Con cards */
.persona-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 28px 24px; border-radius: var(--radius-md);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  text-align: center;
  width: 100%; max-width: 340px;
  flex-shrink: 0; flex-grow: 0;
}
.persona-card-pro { border-color: rgba(255,255,255,0.2); }
.persona-card-con { border-color: rgba(255, 255, 255, 0.2); }
.persona-card-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase;
}
.persona-card-pro .persona-card-label { color: var(--cyan); }
.persona-card-con .persona-card-label { color: var(--text-dim); }
.persona-card-icon {
  font-size: 36px; font-weight: 400; line-height: 1;
  text-shadow: 0 0 20px currentColor;
  font-family: system-ui, -apple-system, sans-serif;
}
.persona-card-pro .persona-card-icon { color: var(--cyan); }
.persona-card-con .persona-card-icon { color: var(--text-dim); }
.persona-card-name {
  font-size: 18px; font-weight: 800; color: var(--text);
}
.persona-card-text {
  font-size: 14px; line-height: 1.5; color: var(--text-dim);
  text-wrap: balance;
}
.persona-description-card {
  padding: 20px 16px 24px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  max-height: 50vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.persona-description-text {
  font-size: 14px; line-height: 1.6;
  color: var(--text);
  font-weight: 400;
  text-wrap: pretty;
}
.persona-step-context {
  font-size: 13px; color: var(--text-dim);
  font-style: italic; margin-bottom: 12px;
  text-wrap: balance;
  max-width: 280px;
}

/* Score preview */
.persona-score-preview {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 32px 24px; width: 100%; max-width: 300px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  animation: slide-up 400ms var(--spring) 400ms both;
}
.persona-score-amount {
  font-size: 72px; font-weight: 900; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  line-height: 1;
}
.persona-score-label {
  font-size: 13px; font-weight: 700; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-dim);
}
.persona-score-hint {
  font-size: 14px; color: var(--text-dim); margin: 8px 0 0;
}

/* === RESULTS === */
.results {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: 24px; padding-bottom: 0; width: 100%; max-width: 400px;
  overflow-y: auto; max-height: calc(100dvh - 64px);
  -webkit-overflow-scrolling: touch;
}
.results-hero {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center;
}
.results-score-big {
  font-size: 96px; font-weight: 900; line-height: 1;
  color: #fff;
  text-shadow:
    0 0 40px rgba(122, 232, 255, 0.6),
    0 0 80px rgba(122, 232, 255, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.4);
  background: linear-gradient(180deg, #fff 30%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.results-of { font-size: 18px; color: var(--text-dim); }

/* Persona mini card on results */
.results-persona-mini {
  display: flex; align-items: center; gap: 12px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 14px; padding: 12px 16px; width: 100%;
}
.persona-mini-art {
  width: 40px; height: 40px; flex-shrink: 0;
}
.persona-mini-art svg { width: 100%; height: 100%; }
.persona-mini-info {
  display: flex; flex-direction: column; gap: 2px;
}
.persona-mini-name {
  font-size: 15px; font-weight: 700; color: var(--persona-color);
}
.persona-mini-tag {
  font-size: 12px; color: var(--text-dim);
}

/* Leaderboard */
.lb-section {
  width: 100%; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.lb-heading {
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim);
}
.lb-list {
  width: 100%; display: flex; flex-direction: column; gap: 4px;
}
.lb-row {
  display: flex; align-items: center; padding: 10px 14px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); gap: 10px;
}
.lb-row:nth-child(1) { border-color: rgba(255, 221, 123, 0.3); }
.lb-row:nth-child(2) { border-color: rgba(200, 200, 200, 0.2); }
.lb-row:nth-child(3) { border-color: rgba(205, 127, 50, 0.2); }
.lb-row.is-you {
  border: 1px solid rgba(122,232,255,0.25);
  background: rgba(122,232,255,0.06);
}
.lb-rank { font-size: 13px; font-weight: 700; color: var(--text-dim); min-width: 20px; }
.lb-name { font-size: 14px; font-weight: 600; flex: 1; }
.lb-persona-tag { font-size: 12px; color: var(--text-dim); }
.lb-score-val { font-size: 14px; font-weight: 700; color: var(--cyan); }

.lb-capture {
  width: 100%; display: flex; flex-direction: column; gap: 6px; align-items: center;
}
.lb-email {
  font-family: var(--font); font-size: 14px;
  background: var(--glass); border: 1px solid var(--glass-border);
  border-radius: 10px; color: var(--text); padding: 10px 14px;
  width: 100%; outline: none;
}
.lb-email:focus { border-color: var(--cyan); }
.lb-email::placeholder { color: rgba(255,255,255,0.2); }
.lb-note { font-size: 12px; color: rgba(255,255,255,0.25); }
.lb-status { font-size: 12px; color: var(--text-dim); text-align: center; }
.lb-status-offline { color: var(--orange); }

.results-actions {
  width: 100%; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.email-share {
  width: 100%; display: flex; flex-direction: column; gap: 8px; align-items: center;
  padding: 12px 0;
}
.email-share-label {
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-dim);
}
.email-share-input {
  font-family: var(--font); font-size: 14px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius-sm); color: var(--text);
  padding: 10px 14px; width: 100%; outline: none;
}
.email-share-input:focus { border-color: var(--cyan); }
.email-share-input::placeholder { color: rgba(255,255,255,0.2); }
.btn-share-email {
  font-family: var(--font); font-size: 14px; font-weight: 700;
  background: var(--card-bg); color: var(--cyan);
  border: 1px solid var(--cyan); border-radius: var(--radius-sm);
  padding: 10px 24px; cursor: pointer;
}
.results-footer { margin-top: 16px; }

/* === CONFETTI === */
.confetti-container {
  position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden;
}
.confetti-piece {
  position: absolute; top: -10px;
  animation: confetti-fall 2.5s linear forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0); opacity: 1; }
  80% { opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* === SOUND TOGGLE === */
.sound-toggle {
  position: fixed; top: 12px; right: 12px; z-index: 50;
  width: 40px; height: 40px;
  border: 1px solid var(--glass-border); border-radius: 50%;
  background: var(--glass); backdrop-filter: blur(12px);
  color: var(--text-dim); font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0; line-height: 1;
  transition: transform 80ms ease-out;
}
.sound-toggle:active { transform: scale(0.9); }

/* === TYPEWRITER CURSOR === */
.typing::after {
  content: '\2588';
  animation: blink-cursor 600ms step-end infinite;
  color: var(--act-accent);
  font-weight: 400;
  margin-left: 1px;
}
@keyframes blink-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* === OPTIONS ENTRANCE === */
.options-area.hidden-options {
  opacity: 0;
  pointer-events: none;
}
.options-area.show-options {
  opacity: 1;
  pointer-events: auto;
  transition: opacity 300ms var(--smooth);
}
.option-btn.stagger-in, .speed-zone.stagger-in, .speed-claim.stagger-in {
  animation: slide-up 300ms var(--spring) both;
}

/* === TIMER HIDDEN (when no timer) === */
.timer-bar-container.hidden-timer {
  opacity: 0;
  pointer-events: none;
}

/* === SHARED ANIMATIONS === */
@keyframes pop-in {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   V4: EFFECTS & JUICE
   ============================================================ */

/* Shake container wraps #app content */
#shake-container { position: relative; width: 100%; height: 100%; }

/* Particle canvas overlay */
canvas#particles {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 5;
}

/* Combo streak display */
.combo-display {
  position: fixed; top: 15%; left: 50%; transform: translateX(-50%);
  font-size: 2rem; font-weight: 900; color: var(--cyan);
  text-shadow: 0 0 20px rgba(122, 232, 255, 0.6);
  z-index: 900; pointer-events: none; opacity: 0;
}

/* Answer flash overlay */
.answer-flash {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 800; opacity: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; font-weight: 900; letter-spacing: 0.04em;
  text-shadow: 0 0 40px currentColor;
  transition: opacity 0.15s ease;
}
.answer-flash.flash-active {
  opacity: 1;
  animation: flash-pop 900ms var(--spring) forwards;
}
@keyframes flash-pop {
  0% { opacity: 0; transform: scale(0.7); }
  20% { opacity: 1; transform: scale(1.1); }
  60% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.9); }
}

/* Timer vignette (intensifies in last 3 seconds) */
.timer-vignette {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 700; opacity: 0;
  box-shadow: inset 0 0 80px 30px rgba(242, 87, 0, 0.4);
  transition: opacity 0.3s ease;
}
.timer-vignette.urgent { opacity: 1; }
.timer-vignette.critical {
  box-shadow: inset 0 0 100px 50px rgba(242, 87, 0, 0.6);
  opacity: 1;
}

/* Score display — hidden by default, shown during gameplay via JS */
.score-display {
  position: fixed; top: 12px; left: 16px;
  font-size: 1.5rem; font-weight: 900; color: var(--cyan);
  z-index: 600; pointer-events: none;
  display: none;
}
.score-display.visible { display: block; }

/* Streak indicator */
.streak-display {
  position: fixed; top: 12px; right: 64px;
  font-size: 0.85rem; font-weight: 700; color: var(--orange);
  z-index: 600; pointer-events: none; opacity: 0;
  transition: opacity 0.3s ease;
}
.streak-display.active { opacity: 1; }

/* Score breakdown overlay */
.score-breakdown {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 92%;
  max-width: 420px;
  background: rgba(13, 13, 26, 0.88);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px 20px 0 0;
  padding: 1.25rem 1.5rem 1rem;
  z-index: 500;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.05);
}
.score-breakdown.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.breakdown-result {
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.breakdown-result.correct { color: #00B364; }
.breakdown-result.wrong { color: #F25700; }
.breakdown-result.timeout { color: #FFDD7B; }
.breakdown-lines {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.breakdown-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(240, 240, 240, 0.7);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.breakdown-line.show { opacity: 1; transform: translateY(0); }
.breakdown-line .bl-label { flex: 1; }
.breakdown-line .bl-value { font-weight: 700; color: #f0f0f0; min-width: 60px; text-align: right; }
.breakdown-line .bl-value.positive { color: #00B364; }
.breakdown-line .bl-value.negative { color: #F25700; }
.breakdown-line .bl-value.power { color: var(--persona-color, #7AE8FF); }
.breakdown-total {
  font-size: 1.6rem;
  font-weight: 900;
  text-align: center;
  color: #7AE8FF;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-variant-numeric: tabular-nums lining-nums;
}

/* Tabular nums for all score/timer displays */
.score-display, .timer-seconds, .results-score-big, .persona-score-amount,
.wager-score, .round-pts, .breakdown-total {
  font-variant-numeric: tabular-nums lining-nums;
}

@supports not (backdrop-filter: blur(1px)) {
  .score-breakdown { background: rgba(13, 13, 26, 0.95); }
}
@media (max-width: 480px) {
  .score-breakdown { bottom: 56px; }
}

/* ============================================================
   V4: WAGER SYSTEM
   ============================================================ */
.wager-card {
  position: relative;
  background: rgba(13, 13, 26, 0.55);
  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);
  border: 1px solid rgba(122, 232, 255, 0.2);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 2rem 1.5rem;
  text-align: center;
  max-width: 380px;
  margin: 0 auto;
  transform: translateY(40px);
  opacity: 0;
  box-shadow: 0 8px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
}
@supports not (backdrop-filter: blur(1px)) {
  .wager-card { background: rgba(13,13,26,0.95); }
}
.wager-score-label {
  font-size: 0.75rem; letter-spacing: 0.15em; color: rgba(240,240,240,0.5);
  margin: 0 0 0.25rem;
}
.wager-score {
  font-size: 3rem; font-weight: 900; color: var(--cyan);
  margin: 0 0 0.5rem;
}
.wager-prompt {
  font-size: 1rem; color: rgba(240,240,240,0.7); margin: 0 0 1.5rem;
}
.wager-buttons {
  display: flex; gap: 0.75rem; justify-content: center; margin-bottom: 1.5rem;
}
.wager-btn {
  flex: 1; padding: 1rem 0.5rem; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px; background: rgba(255,255,255,0.05);
  color: #f0f0f0; cursor: pointer; transition: all 0.2s ease;
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  -webkit-tap-highlight-color: transparent;
}
.wager-btn:active { transform: scale(0.95); }
.wager-btn-label { font-size: 0.7rem; letter-spacing: 0.1em; font-weight: 700; }
.wager-btn-pts { font-size: 1.1rem; font-weight: 900; }
.wager-safe { border-color: rgba(0, 179, 100, 0.3); }
.wager-safe:hover, .wager-safe.selected { background: rgba(0, 179, 100, 0.15); border-color: var(--green); }
.wager-bold { border-color: rgba(122, 232, 255, 0.3); }
.wager-bold:hover, .wager-bold.selected { background: rgba(122, 232, 255, 0.15); border-color: var(--cyan); }
.wager-allin {
  border-color: rgba(242, 87, 0, 0.3);
  box-shadow: 0 0 15px rgba(242, 87, 0, 0.1);
}
.wager-allin:hover, .wager-allin.selected {
  background: rgba(242, 87, 0, 0.15); border-color: var(--orange);
  box-shadow: 0 0 25px rgba(242, 87, 0, 0.25);
}
.wager-timer-bar {
  height: 3px; background: var(--cyan); border-radius: 2px;
  width: 100%; transition: width 0.1s linear;
  margin-bottom: 0.5rem;
}
/* Forced All In (Act 3) */
.wager-card.forced .wager-buttons { opacity: 0.3; pointer-events: none; }
.wager-card.forced .wager-allin { opacity: 1; pointer-events: auto; }
.wager-card.forced .wager-prompt { color: var(--orange); font-weight: 700; }

/* ============================================================
   V4: ENHANCED GAME UI
   ============================================================ */

/* Updated results for point-based scoring */
.results-percentile {
  font-size: 1.1rem; color: var(--orange); font-weight: 700;
  margin: 0.5rem 0;
  opacity: 0;
  transition: opacity 500ms var(--smooth);
}
.results-percentile.visible { opacity: 1; }
.results-profile {
  font-size: 0.9rem; color: rgba(240,240,240,0.7);
  line-height: 1.5; max-width: 320px; margin: 1rem auto;
  opacity: 0;
  transition: opacity 500ms var(--smooth);
}
.results-profile.visible { opacity: 1; }

/* Leaderboard row stagger-in */
.lb-row {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 300ms var(--smooth), transform 300ms var(--dramatic);
}
.lb-row.stagger-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Tutorial wager hint */
.tut-wager-hint {
  background: rgba(242, 87, 0, 0.1);
  border: 1px solid rgba(242, 87, 0, 0.2);
  border-radius: 12px; padding: 1rem;
  margin: 1rem 0; text-align: center;
}
.tut-wager-hint strong { color: var(--orange); }

/* Screen-wager layout — centers the wager card */
#screen-wager {
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}

/* Results disabled state during 15s hold */
#btn-replay:disabled {
  opacity: 0.4; cursor: default;
}
.btn-meeting[style*="pointer-events: none"] {
  opacity: 0.4;
}

/* ============================================================
   SHARE CARD BUTTON
   ============================================================ */
.btn-share {
  display: block; width: 100%; padding: 0.9rem 1.5rem;
  background: rgba(122, 232, 255, 0.08);
  border: 1px solid rgba(122, 232, 255, 0.25);
  border-radius: 14px; color: #7AE8FF;
  font-family: inherit; font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.04em; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  margin-bottom: 0.75rem;
}
.btn-share:hover {
  background: rgba(122, 232, 255, 0.15);
  border-color: rgba(122, 232, 255, 0.5);
}
.btn-share:active { transform: scale(0.97); }
.btn-share:disabled {
  opacity: 0.5; cursor: default; transform: none;
}
.btn-linkedin {
  width: 100%; padding: 14px 24px; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 16px; font-weight: 700;
  background: linear-gradient(135deg, #0077B5, #0A66C2);
  color: #fff; border: none; cursor: pointer;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-linkedin:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 119, 181, 0.4);
}
.btn-linkedin:active { transform: scale(0.98); }
.btn-linkedin:disabled { opacity: 0.5; cursor: default; transform: none; }
.btn-download {
  display: block; width: 100%; padding: 0.9rem 1.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px; color: rgba(240,240,240,0.7);
  font-family: inherit; font-size: 0.9rem; font-weight: 700;
  letter-spacing: 0.04em; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  margin-bottom: 0.75rem;
}
.btn-download:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.3);
}
.btn-download:active { transform: scale(0.97); }
.btn-download:disabled {
  opacity: 0.5; cursor: default; transform: none;
}

/* ============================================================
   DISPLAY MODE — 60-second attract loop (TV / booth monitor)
   ============================================================ */

/* Root container */
#display-mode {
  position: fixed; inset: 0;
  background: #0d0d1a;
  font-family: 'Red Hat Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
  z-index: 9999;
}

/* Ambient background */
.attract-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 40%, rgba(1,43,172,0.45) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 25%, rgba(122,232,255,0.25) 0%, transparent 45%),
    radial-gradient(ellipse at 60% 80%, rgba(242,87,0,0.15) 0%, transparent 40%);
  animation: attract-bg-breathe 10s ease-in-out infinite;
}
@keyframes attract-bg-breathe {
  0%,100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Floating particles */
.attract-particle {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #7AE8FF;
  opacity: 0.4;
  pointer-events: none;
  animation: attract-float 3.5s ease-in-out infinite alternate;
}
.attract-particle-slow {
  animation-duration: 6s;
  background: #F25700;
  opacity: 0.25;
}
@keyframes attract-float {
  from { transform: translateY(0) scale(1); opacity: 0.4; }
  to   { transform: translateY(-24px) scale(1.4); opacity: 0.1; }
}

/* NOW PLAYING strip */
.attract-now-playing {
  position: absolute; top: 2.2rem; right: 3rem;
  font-size: 1.4rem; font-weight: 700;
  color: #F25700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 10;
}

/* Stage: phase content fills this */
.attract-stage {
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
}

/* Footer */
.attract-footer {
  position: absolute; bottom: 2rem; left: 0; right: 0;
  text-align: center;
  font-size: 1rem; font-weight: 600;
  letter-spacing: 0.18em;
  color: rgba(240,240,240,0.25);
  text-transform: uppercase;
  z-index: 10;
}

/* Phase wrapper: all phases use this base */
.attract-phase {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  width: 100%; height: 100%;
  padding: 4rem 6rem;
  box-sizing: border-box;
  position: relative;
}

/* ---- Phase 0: Title ---- */
.attract-title-logo {
  font-size: clamp(5rem, 10vw, 9rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-shadow:
    0 0 80px rgba(122,232,255,0.5),
    0 0 160px rgba(122,232,255,0.2);
  line-height: 1;
  margin-bottom: 1.5rem;
}
.attract-title-tagline {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: #7AE8FF;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.attract-title-sub {
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  font-weight: 400;
  color: rgba(240,240,240,0.45);
  letter-spacing: 0.1em;
}

/* ---- Phase 1: Leaderboard ---- */
.attract-lb-phase {
  align-items: flex-start;
  padding: 4rem 8rem;
}
.attract-lb-heading {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(240,240,240,0.4);
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  align-self: center;
}
.attract-lb-list {
  display: flex; flex-direction: column; gap: 0.7rem;
  width: 100%; max-width: 900px;
  align-self: center;
}
.attract-lb-row {
  display: flex; align-items: center; gap: 2rem;
  padding: 1rem 1.8rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}
.attract-lb-top {
  background: rgba(122,232,255,0.07);
  border-color: rgba(122,232,255,0.22);
}
.attract-lb-rank {
  font-size: 1.4rem; font-weight: 900;
  color: rgba(240,240,240,0.3);
  min-width: 2rem;
}
.attract-lb-top .attract-lb-rank {
  color: #7AE8FF;
}
.attract-lb-name {
  font-size: 1.6rem; font-weight: 700;
  flex: 1;
}
.attract-lb-score {
  font-size: 1.8rem; font-weight: 900;
  color: #7AE8FF;
  letter-spacing: 0.04em;
}
.attract-lb-top .attract-lb-score {
  font-size: 2.2rem;
  text-shadow: 0 0 30px rgba(122,232,255,0.5);
}
.attract-lb-empty {
  font-size: 1.6rem; font-weight: 600;
  color: rgba(240,240,240,0.35);
  text-align: center; margin-top: 2rem;
}

/* QR hint corner */
.attract-qr-hint {
  position: absolute; bottom: 5rem; right: 5rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.attract-qr-icon {
  font-size: 3rem; line-height: 1;
  color: rgba(240,240,240,0.2);
  letter-spacing: -0.05em;
}
.attract-qr-label {
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(240,240,240,0.3);
}

/* ---- Phase 2: Sample Question ---- */
.attract-q-phase {
  padding: 4rem 8rem;
  gap: 1.5rem;
}
.attract-q-label {
  font-size: 1rem; font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(240,240,240,0.35);
  text-transform: uppercase;
}
.attract-q-category {
  font-size: 1.1rem; font-weight: 700;
  color: #F25700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.attract-q-text {
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 700;
  color: #ffffff;
  max-width: 900px;
  line-height: 1.35;
}
.attract-q-options {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; width: 100%; max-width: 900px; margin-top: 0.5rem;
}
.attract-q-option {
  padding: 1rem 1.5rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,255,255,0.1);
  font-size: 1.3rem; font-weight: 600;
  color: rgba(240,240,240,0.7);
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}
.attract-q-correct {
  background: rgba(0,179,100,0.15);
  border-color: #00B364;
  color: #00d464;
  text-shadow: 0 0 20px rgba(0,179,100,0.4);
}
.attract-q-reveal {
  font-size: 1.1rem; font-weight: 500;
  color: rgba(240,240,240,0.55);
  max-width: 800px;
  line-height: 1.5;
  margin-top: 0.5rem;
  transform: translateY(10px);
}

/* ---- Phase 3: CTA ---- */
.attract-cta-phase {
  gap: 2rem;
}
.attract-cta-headline {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-shadow: 0 0 60px rgba(242,87,0,0.3);
}
.attract-cta-score-hint {
  font-size: 1.4rem; font-weight: 600;
  color: rgba(240,240,240,0.4);
  letter-spacing: 0.08em;
}
.attract-cta-btn {
  padding: 1.5rem 4rem;
  border-radius: 60px;
  background: #F25700;
  color: #ffffff;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 0 60px rgba(242,87,0,0.45), 0 8px 32px rgba(0,0,0,0.4);
  transform-origin: center;
}
.attract-cta-sub {
  font-size: 1.2rem; font-weight: 500;
  color: rgba(240,240,240,0.35);
  letter-spacing: 0.1em;
}

/* ---- Phase 4: Stats ---- */
.attract-stats-phase {
  gap: 2.5rem;
}
.attract-stats-heading {
  font-size: 1.2rem; font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(240,240,240,0.35);
  text-transform: uppercase;
}
.attract-stats-list {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2rem; width: 100%; max-width: 900px;
}
.attract-stat-card {
  padding: 2rem 2.5rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; flex-direction: column; gap: 0.5rem;
  text-align: left;
}
.attract-stat-value {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 900;
  color: #7AE8FF;
  text-shadow: 0 0 30px rgba(122,232,255,0.35);
  letter-spacing: 0.04em;
}
.attract-stat-label {
  font-size: 1rem; font-weight: 600;
  color: rgba(240,240,240,0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---- Phase 5: Return ---- */
.attract-return-phase {
  gap: 1.5rem;
}
.attract-return-logo {
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-shadow: 0 0 80px rgba(122,232,255,0.35);
  animation: attract-return-glow 4s ease-in-out infinite alternate;
}
@keyframes attract-return-glow {
  from { text-shadow: 0 0 60px rgba(122,232,255,0.3); }
  to   { text-shadow: 0 0 120px rgba(122,232,255,0.6); }
}
.attract-return-tagline {
  font-size: clamp(1rem, 2vw, 1.6rem);
  font-weight: 600;
  color: rgba(240,240,240,0.45);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.attract-return-footer {
  font-size: 1rem; font-weight: 700;
  color: rgba(240,240,240,0.2);
  letter-spacing: 0.18em;
  margin-top: 2rem;
}

/* ============================================================
   V5 NARRATIVE THREAD
   ============================================================ */

/* Tutorial intro — above tut-steps */
.tut-intro {
  font-size: 15px;
  color: rgba(240, 240, 240, 0.7);
  text-align: center;
  margin-bottom: 16px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

/* (persona-reveal-bridge removed — element no longer exists) */

/* Results narrative CTA above meeting button */
.results-narrative {
  font-size: 14px;
  color: rgba(240, 240, 240, 0.6);
  text-align: center;
  margin-bottom: 16px;
  max-width: 340px;
  line-height: 1.5;
}

/* Pizza icon in splash footer */
.splash-pizza {
  display: inline-block;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 6px;
}


.btn-primary {
  display: block; width: 100%;
  padding: 1rem 1.5rem;
  background: var(--persona-color, var(--cyan));
  border: none; border-radius: 14px;
  color: #0d0d1a; font-family: inherit;
  font-size: 1rem; font-weight: 900;
  letter-spacing: 0.06em; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s ease, transform 0.1s ease;
  animation: slide-up 400ms var(--spring) 450ms both;
}
.btn-primary:active { transform: scale(0.97); opacity: 0.85; }

/* ============================================================
   ACT 3 INTRO SCREEN
   ============================================================ */
.act3-intro-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 20px; padding: 40px 28px;
  text-align: center; width: 100%; max-width: 400px;
}

.act3-intro-title {
  font-size: 1.6rem; font-weight: 900;
  color: var(--orange);
  text-shadow: 0 0 40px rgba(242, 87, 0, 0.5), 0 0 80px rgba(242, 87, 0, 0.2);
  letter-spacing: 0.02em;
  line-height: 1.2;
  max-width: 320px;
  animation: slide-up 400ms var(--spring) both;
}

.act3-intro-score {
  font-size: 1.2rem; font-weight: 600;
  color: rgba(240,240,240,0.6);
  animation: slide-up 400ms var(--spring) 100ms both;
}

.act3-intro-score span {
  font-size: 2rem; font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 20px rgba(122, 232, 255, 0.4);
}

.act3-intro-rules {
  font-size: 0.95rem; font-weight: 500; line-height: 1.5;
  color: rgba(240,240,240,0.9);
  max-width: 320px;
  animation: slide-up 400ms var(--spring) 200ms both;
}

.act3-intro-card .btn-primary {
  background: var(--orange);
  animation-delay: 350ms;
  margin-top: 8px;
}

/* ============================================================
   V6: POWER ACTIVATION OVERLAYS
   ============================================================ */

/* Power activation flash */
.power-activation {
  position: fixed;
  top: 18%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 950;
  pointer-events: none;
  text-align: center;
  opacity: 0;
}
.power-activation.active {
  animation: power-pop 600ms var(--spring) forwards;
}
@keyframes power-pop {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  25% { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(0.95); opacity: 1; }
  75% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  100% { transform: translate(-50%, -50%) scale(0.9); opacity: 0; }
}
.power-activation-name {
  font-size: 1.8rem; font-weight: 900;
  color: var(--persona-color, var(--cyan));
  text-shadow: 0 0 30px currentColor, 0 0 60px currentColor;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.power-activation-desc {
  font-size: 0.9rem; font-weight: 600;
  color: rgba(240, 240, 240, 0.7);
  margin-top: 4px;
}

/* Edge glow on power activation */
.power-edge-glow {
  position: fixed; inset: 0; z-index: 940;
  pointer-events: none; opacity: 0;
  box-shadow: inset 0 0 60px 20px var(--persona-color, rgba(122, 232, 255, 0.4));
  transition: opacity 0.3s ease;
}
.power-edge-glow.active { opacity: 1; }

/* Weakness activation — muted version */
.weakness-activation {
  position: fixed;
  top: 18%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 950;
  pointer-events: none;
  text-align: center;
  opacity: 0;
}
.weakness-activation.active {
  animation: weakness-pop 600ms var(--smooth) forwards;
}
@keyframes weakness-pop {
  0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
  30% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.9; }
  70% { transform: translate(-50%, -50%) scale(1); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(0.95); opacity: 0; }
}
.weakness-activation-name {
  font-size: 1.3rem; font-weight: 700;
  color: var(--orange);
  text-shadow: 0 0 20px rgba(242, 87, 0, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================
   V6: WILD CARD — 2x Stakes Toggle
   ============================================================ */
.wild-card-toggle {
  position: absolute;
  top: max(60px, calc(env(safe-area-inset-top) + 60px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  background: rgba(0, 179, 100, 0.1);
  border: 2px solid rgba(0, 179, 100, 0.3);
  border-radius: 100px;
  padding: 6px 18px;
  font-family: var(--font);
  font-size: 0.8rem; font-weight: 800;
  color: var(--green);
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  letter-spacing: 0.05em;
}
.wild-card-toggle:active { transform: translateX(-50%) scale(0.95); }
.wild-card-toggle.active {
  background: rgba(0, 179, 100, 0.25);
  border-color: var(--green);
  box-shadow: 0 0 20px rgba(0, 179, 100, 0.3);
  color: #fff;
}
.wild-card-toggle.active::after {
  content: ' ON';
  font-weight: 900;
}

/* ============================================================
   V6: SPEED DEMON — Speed Tier Indicator
   ============================================================ */
.speed-tier-indicator {
  position: absolute;
  top: max(60px, calc(env(safe-area-inset-top) + 60px));
  right: 20px;
  z-index: 20;
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 8px;
  transition: all 0.3s ease;
}
.tier-label {
  font-size: 0.65rem; font-weight: 700;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
}
.tier-value {
  font-size: 1.4rem; font-weight: 900;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
.tier-value.tier-3x {
  color: var(--green-bright, #00d464);
  text-shadow: 0 0 12px rgba(0, 212, 100, 0.5);
}
.tier-value.tier-2x {
  color: var(--orange, #F25700);
  text-shadow: 0 0 12px rgba(242, 87, 0, 0.4);
}
.tier-value.tier-1x {
  color: var(--red, #ff4444);
  text-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
}

/* ============================================================
   V6: ATTRACT MODE
   ============================================================ */
.attract-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px; text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.attract-logo {
  width: 200px; opacity: 0.9;
  animation: attract-float 3s ease-in-out infinite;
}
@keyframes attract-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.attract-title {
  font-size: 3.5rem; font-weight: 900;
  background: linear-gradient(135deg, #fff 30%, var(--cyan));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 0.95;
}
.attract-cta {
  font-size: 1.2rem; font-weight: 700;
  color: var(--cyan);
  animation: attract-pulse 2s ease-in-out infinite;
}
@keyframes attract-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.attract-stats {
  font-size: 0.9rem; color: rgba(240, 240, 240, 0.4);
  font-weight: 600;
}

/* In-place attract animations on splash screen */
.attract-active .splash-title {
  animation: float 3s ease-in-out infinite, attract-title-pulse 2.5s ease-in-out infinite;
}
@keyframes attract-title-pulse {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.8; filter: brightness(1.4); }
}
.attract-active .bg-gradient {
  animation: bg-breathe 4s ease-in-out infinite;
}
.attract-score-display {
  font-size: 3rem; font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 40px rgba(122,232,255,0.5);
  min-height: 3.5rem;
  transition: opacity 0.4s ease;
}
.attract-active .btn-play {
  animation: attract-pulse 2s ease-in-out infinite;
}

/* Inactivity timeout overlay */
.inactivity-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(13,13,26,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 20px; text-align: center;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.inactivity-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.inactivity-title {
  font-size: 1.6rem; font-weight: 900;
  color: var(--text);
}
.inactivity-countdown {
  font-size: 5rem; font-weight: 900;
  color: var(--orange);
  text-shadow: 0 0 30px rgba(242,87,0,0.5);
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1;
}
.inactivity-hint {
  font-size: 1rem; color: var(--text-dim); font-weight: 600;
}

/* Touch target minimums */
.option-btn { min-height: 56px; }
.speed-btn { min-height: 80px; min-width: 120px; }
.wager-btn { min-height: 80px; }
.btn-play { min-height: 56px; }
.btn-go { min-height: 56px; }
.btn-next { min-height: 52px; }

/* Round screen layout — question + options centered */
#screen-round {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.options-area {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Safe-area inset padding for notched iPads */
body {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* Landscape compact layout for iPad on its side */
@media (orientation: landscape) and (max-height: 500px) {
  .splash { gap: 8px; padding: 0 16px; }
  .splash-title { font-size: 36px; }
  .splash-logo { width: 120px; margin-bottom: 8px; }
  .splash-icon { width: 48px; height: 48px; }
  .splash-dare { display: none; }
  .q-text { font-size: 16px; }
  .option-btn { min-height: 44px; padding: 10px 14px; font-size: 14px; }
  .speed-btn { min-height: 60px; padding: 16px 12px; }
  .wager-btn { min-height: 60px; }
  .results { gap: 12px; padding: 16px; }
  .results-score-big { font-size: 56px; }
  .question-area { margin-top: 40px; }
}

/* ============================================================
   PHONE VIEWPORT FIXES (375–390px wide, 667–844px tall)
   Targets: iPhone SE (375x667), iPhone 14 (390x844),
            Android mid-range (360x800)
   Do NOT touch: iPad layout (max-width:768px+), GSAP inline styles
   ============================================================ */

/* --- Narrow phones: compress horizontal chrome --- */
@media (max-width: 430px) {
  /* Splash: tighten title for narrow screens */
  .splash-title { font-size: 44px; }
  .splash-hook { font-size: 16px; }
  .splash { gap: 12px; }
  .splash-logo { width: 150px; margin-bottom: 10px; }

  /* Question text: bump up from 20px for readability on small screens */
  .q-text { font-size: 18px; max-width: 100%; }

  /* Options: tighter gap to fit more on screen */
  .options-area { gap: 8px; padding: 8px 16px; }
  .option-btn { font-size: 14px; padding: 12px 14px; }
  .option-letter { width: 24px; height: 24px; font-size: 12px; }

  /* Round bar: smaller labels */
  .round-num, .round-pts { font-size: 12px; }
  .act-badge { font-size: 12px; }

  /* Speed buttons: still tappable but less vertical padding */
  .speed-btn { padding: 20px 12px; font-size: 20px; }

  /* Wager card: tighter on narrow screens */
  .wager-card { padding: 1.5rem 1rem; max-width: 100%; }
  .wager-score { font-size: 2.4rem; }
  .wager-btn { padding: 0.75rem 0.4rem; }
  .wager-btn-pts { font-size: 0.95rem; }

  /* Results: compress score display */
  .results-score-big { font-size: 64px; }
  .results { gap: 14px; padding: 16px; }

  /* Persona reveal: tighten vertical rhythm */
  .persona-reveal { gap: 10px; padding: 16px; }
  .persona-reveal-name { font-size: 26px; }
  .persona-reveal-art { width: 96px; height: 96px; }
  .persona-score-amount { font-size: 40px; }

  /* Name screen: smaller input */
  .name-input { font-size: 22px; }

  /* Tutorial: tighter */
  .tutorial { gap: 16px; }
  .tut-title { font-size: 22px; }
}

/* --- Short phones: compress vertical rhythm (iPhone SE 667px, minus host panel) --- */
@media (max-height: 750px) {
  /* Options area: reduce bottom padding so buttons aren't pushed off-screen */
  .options-area { padding-bottom: 44px; }

  /* Question area: tighter padding on short phones */
  .question-area {
    padding: 12px 16px;
  }

  /* Round bar: tighten top padding */
  .round-bar { padding-top: max(8px, env(safe-area-inset-top, 8px)); }

  /* Splash: remove gap to fit everything above fold */
  .splash { gap: 8px; }
  .splash-logo { width: 130px; margin-bottom: 8px; }
  .splash-footer { margin-top: 8px; }
  .splash-dare { display: none; }

  /* Results: score display smaller so content fits without scroll */
  .results-score-big { font-size: 56px; }
  .results { gap: 12px; padding: 12px 16px; }
  .lb-section { gap: 6px; }
  .lb-row { padding: 6px 10px; }

  /* Persona reveal: tighter spacing so continue button is reachable */
  .persona-reveal { gap: 8px; padding: 12px 16px; }
  .persona-reveal-art { width: 80px; height: 80px; }
  .persona-score-amount { font-size: 36px; }
  .persona-card { padding: 10px 8px; }

  /* Wager: compress on short screens */
  .wager-card { padding: 1.25rem 1rem; }
  .wager-score { font-size: 2.2rem; }

  /* Act3 intro: tighter */
  .act3-intro-card { padding: 24px 20px; gap: 12px; }
  .act3-intro-title { font-size: 1.4rem; }
  .act3-intro-rules { font-size: 0.9rem; max-width: 300px; }

  /* Transition screen: tighter */
  .transition { gap: 8px; }
  .transition-name { font-size: 28px; }
  .transition-icon { width: 60px; height: 60px; margin-bottom: 4px; }

  /* Tutorial: compact */
  .tutorial { gap: 12px; }
  .tut-steps { gap: 10px; }
  .tut-title { font-size: 22px; }

  /* Timer bar: reduce height so it's less intrusive */
  .timer-bar-container { height: 40px; }
}

/* (persona-reveal-desc removed — wall of text replaced with tappable steps) */

/* ============================================================
   V6: PROGRESSIVE ACT COLOR TINTING
   ============================================================ */
.bg-gradient.act-1-tint {
  background:
    radial-gradient(ellipse at 20% 40%, rgba(1, 43, 172, 0.5) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 25%, rgba(36, 130, 244, 0.2) 0%, transparent 45%),
    var(--bg);
}
.bg-gradient.act-2-tint {
  background:
    radial-gradient(ellipse at 20% 40%, rgba(125, 7, 218, 0.4) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 25%, rgba(122, 232, 255, 0.15) 0%, transparent 45%),
    var(--bg);
}
.bg-gradient.act-3-tint {
  background:
    radial-gradient(ellipse at 20% 40%, rgba(242, 87, 0, 0.35) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 25%, rgba(255, 68, 68, 0.2) 0%, transparent 45%),
    var(--bg);
}

/* ============================================================
   V6: ENHANCED GLASSMORPHISM
   ============================================================ */
@supports (backdrop-filter: blur(1px)) {
  .question-area {
    background: rgba(13, 13, 26, 0.5);
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.03);
    margin-left: 12px; margin-right: 12px;
    padding: 20px 24px;
  }
}

/* Wager timer bar enhanced with glow */
.wager-timer-bar {
  height: 3px; background: var(--cyan); border-radius: 2px;
  width: 100%;
  margin-bottom: 0.5rem;
  box-shadow: 0 0 8px rgba(122, 232, 255, 0.4);
}

/* ============================================================
   LOCK MASCOT ANIMATIONS
   ============================================================ */

/* Idle breathing — Lock is alive even when not speaking */
@keyframes lock-breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-4px) scale(1.05); }
  60% { transform: translateY(-3px) scale(1.04); }
}

/* Bounce on mood change — override idle briefly */
.host-avatar.bounce svg {
  animation: lock-bounce 600ms var(--spring) forwards !important;
}
@keyframes lock-bounce {
  0% { transform: scale(1) rotate(0); filter: drop-shadow(0 0 12px rgba(122, 232, 255, 0.4)); }
  20% { transform: scale(1.35) rotate(-10deg); filter: drop-shadow(0 0 24px rgba(122, 232, 255, 0.8)); }
  45% { transform: scale(0.85) rotate(6deg); }
  65% { transform: scale(1.12) rotate(-3deg); }
  85% { transform: scale(0.97) rotate(1deg); }
  100% { transform: scale(1) rotate(0); filter: drop-shadow(0 0 12px rgba(122, 232, 255, 0.4)); }
}

/* Combined idle: breathing + glow pulse */
@keyframes lock-glow {
  0%, 100% {
    filter: drop-shadow(0 0 12px rgba(122, 232, 255, 0.4))
            drop-shadow(0 0 24px rgba(122, 232, 255, 0.15));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(122, 232, 255, 0.7))
            drop-shadow(0 0 40px rgba(122, 232, 255, 0.3));
  }
}
.host-avatar svg {
  animation: lock-breathe 3s ease-in-out infinite, lock-glow 4s ease-in-out infinite;
}

/* Dialogue text entrance */
@keyframes dialogue-slide {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}
.host-dialogue {
  animation: dialogue-slide 300ms var(--smooth) both;
}

/* ============================================================
   DESKTOP RESPONSIVE (min-width: 769px)
   Scale up from phone-first to fill desktop screens properly.
   ============================================================ */
@media (min-width: 769px) {

  /* Widen the game container */
  #app {
    max-width: 480px;
  }

  /* Screens: remove bottom padding, use centered layout */
  .screen {
    padding-bottom: 88px; /* more room for wider host panel */
  }

  /* --- Splash --- */
  .splash { gap: 20px; }
  .splash-title { font-size: 72px; }
  .splash-subtitle { font-size: 18px; }
  .splash-hook { font-size: 20px; max-width: 380px; }
  .splash-dare { font-size: 17px; padding: 10px 28px; }
  .splash-icon { width: 100px; height: 100px; }
  .splash-logo { width: 220px; }
  .btn-play { font-size: 22px; padding: 20px 56px; }

  /* --- Name Entry --- */
  .name-label { font-size: 28px; }
  .name-input { font-size: 32px; max-width: 400px; padding: 18px; }
  .company-input { font-size: 22px; }
  .btn-go { font-size: 20px; padding: 18px 48px; max-width: 400px; }

  /* --- Tutorial --- */
  .tutorial { gap: 28px; }
  .tut-title { font-size: 36px; }
  .tut-text { font-size: 18px; }
  .tut-intro { font-size: 17px; max-width: 440px; }
  .tut-num { width: 48px; height: 48px; font-size: 20px; }

  /* --- Act Transitions --- */
  .transition { gap: 16px; }
  .transition-icon { width: 100px; height: 100px; }
  .transition-act { font-size: 15px; }
  .transition-name { font-size: 48px; }
  .transition-sub { font-size: 20px; }

  /* --- Round Screen --- */
  .question-area {
    padding: 24px 32px;
    margin-left: 24px;
    margin-right: 24px;
  }
  .q-category { font-size: 14px; }
  .q-text { font-size: 24px; max-width: 520px; }
  .round-bar { padding: 16px 28px; }
  .round-num, .round-pts { font-size: 16px; padding: 6px 16px; }
  .act-badge { font-size: 13px; padding: 6px 18px; }

  /* --- Options --- */
  .options-area {
    max-width: 560px;
    gap: 12px;
    padding: 16px 32px;
    padding-bottom: 72px;
  }
  .option-btn {
    font-size: 16px; padding: 16px 22px;
    border-radius: 16px; min-height: 60px;
  }
  .option-letter { width: 32px; height: 32px; font-size: 14px; border-radius: 10px; }

  /* --- Speed Round --- */
  .speed-claim { font-size: 22px; }
  .speed-zone { gap: 20px; max-width: 480px; margin: 0 auto; }
  .speed-btn { font-size: 26px; padding: 36px 20px; border-radius: 20px; min-height: 100px; }

  /* --- Wager --- */
  .wager-card { max-width: 460px; padding: 2.5rem 2rem; border-radius: 28px; }
  .wager-score { font-size: 3.5rem; }
  .wager-prompt { font-size: 1.1rem; }
  .wager-btn { border-radius: 18px; min-height: 90px; }
  .wager-btn-label { font-size: 0.8rem; }
  .wager-btn-pts { font-size: 1.3rem; }

  /* --- Reveal --- */
  .reveal { max-width: 520px; gap: 28px; }
  .verdict-icon { width: 80px; height: 80px; }
  .verdict-text { font-size: 36px; }
  .reveal-host-avatar { width: 64px; height: 64px; }
  .reveal-host-text { font-size: 17px; }
  .insight-text { font-size: 18px; }
  .btn-next { font-size: 18px; padding: 18px 48px; max-width: 400px; }

  /* --- Persona Reveal --- */
  .persona-reveal { max-width: 600px; gap: 24px; padding: 40px; }
  .persona-reveal-art { width: 180px; height: 180px; }
  .persona-reveal-name { font-size: 48px; }
  .persona-reveal-tagline { font-size: 20px; max-width: 400px; }
  .persona-card-solo { max-width: 420px; padding: 32px 28px; }
  .persona-card { padding: 24px 20px; border-radius: 8px; }
  .persona-card-icon { font-size: 40px; }
  .persona-card-name { font-size: 18px; }
  .persona-card-text { font-size: 14px; line-height: 1.5; }
  .persona-score-amount { font-size: 64px; }
  .persona-tap-btn { margin-top: 32px; font-size: 14px; padding: 14px 56px; }

  /* --- Act 3 Intro --- */
  .act3-intro-card { max-width: 640px; padding: 48px 36px; gap: 24px; }
  .act3-intro-title { font-size: 2.2rem; max-width: 560px; }
  .act3-intro-score { font-size: 1.4rem; }
  .act3-intro-score span { font-size: 2.4rem; }
  .act3-intro-rules { font-size: 1.05rem; max-width: 520px; }

  /* --- Results --- */
  .results { max-width: 520px; gap: 24px; padding: 32px; max-height: calc(100dvh - 88px); }
  .results-score-big { font-size: 96px; }
  .results-of { font-size: 20px; }
  .results-percentile { font-size: 1.2rem; }
  .results-profile { font-size: 1rem; max-width: 400px; }
  .results-narrative { font-size: 16px; max-width: 420px; }
  .btn-meeting { font-size: 18px; padding: 18px 36px; max-width: 400px; }
  .btn-replay { font-size: 16px; padding: 16px 32px; max-width: 400px; }
  .btn-share { padding: 1rem 1.5rem; font-size: 1rem; }
  .btn-download { padding: 1rem 1.5rem; font-size: 1rem; }
  .lb-heading { font-size: 14px; }
  .lb-name { font-size: 16px; }
  .lb-score-val { font-size: 16px; }
  .lb-row { padding: 10px 16px; }
  .lb-email { font-size: 16px; padding: 12px 16px; }

  /* --- Host Panel --- */
  .host-panel {
    max-width: 960px;
    padding: 12px 28px 14px;
    gap: 20px;
    border-radius: 20px 20px 0 0;
    border-left: 1px solid rgba(122, 232, 255, 0.1);
    border-right: 1px solid rgba(122, 232, 255, 0.1);
  }
  .host-avatar { width: 88px; height: 88px; margin-top: -32px; }
  .host-name { font-size: 12px; letter-spacing: 0.2em; }
  .host-dialogue { font-size: 17px; }

  /* --- Score/Streak overlays --- */
  .score-display { font-size: 1.8rem; top: 16px; left: 24px; }
  .streak-display { font-size: 1rem; top: 16px; right: 80px; }
  .combo-display { font-size: 2.5rem; }
  .answer-flash { font-size: 4.5rem; }

  /* --- Power overlays --- */
  .power-activation-name { font-size: 2.2rem; }
  .power-activation-desc { font-size: 1rem; }

  /* --- Timer bar --- */
  .timer-bar-container { height: 52px; padding: 0 28px; }
  .timer-seconds { font-size: 18px; }

  /* --- Sound toggle --- */
  .sound-toggle { width: 44px; height: 44px; font-size: 20px; top: 16px; right: 16px; }

  /* --- Score breakdown --- */
  .score-breakdown { max-width: 480px; padding: 1.5rem 2rem 1.25rem; bottom: 88px; }
  .breakdown-result { font-size: 1.6rem; }
  .breakdown-total { font-size: 1.8rem; }
  .breakdown-line { font-size: 1rem; }
}

/* ============================================================
   LARGE DESKTOP (min-width: 1200px)
   Extra breathing room for big screens.
   ============================================================ */
@media (min-width: 1200px) {
  #app { max-width: 480px; }
  .host-panel { max-width: 1080px; padding: 14px 36px 16px; }
  .screen { padding-bottom: 96px; }
  .host-avatar { width: 96px; height: 96px; margin-top: -36px; }
  .host-dialogue { font-size: 18px; }
  .host-name { font-size: 13px; letter-spacing: 0.22em; }
  .results { max-height: calc(100dvh - 96px); }
  .persona-reveal { max-height: calc(100dvh - 96px); }
}
