/* ==========================================================================
   QPCC 3D Emergency Preparedness Command Suite — Stylesheet
   Quest Plus Purple (#6B126E / #9333EA) + Gold (#EAB308) + Safety Command UI
   ========================================================================== */

:root {
  --bg-deep: #090e1a;
  --glass-bg: rgba(13, 20, 36, 0.82);
  --glass-bg-strong: rgba(11, 17, 32, 0.93);
  --glass-border: rgba(255, 255, 255, 0.14);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --qp-purple: #7c2280;
  --qp-purple-bright: #a855f7;
  --qp-gold: #eab308;
  --qp-gold-bright: #facc15;
  --safe-green: #10b981;
  --warn-amber: #f59e0b;
  --danger-red: #ef4444;
  --cyan-tech: #06b6d4;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.55);
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

#canvas-container {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 50% 30%, #1b2847 0%, #090e1a 100%);
}

#canvas-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* ---------- TOP COMMAND BAR ---------- */
#top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(180deg, rgba(9, 14, 26, 0.94) 0%, rgba(9, 14, 26, 0.72) 100%);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: 5px 10px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.brand-logo {
  height: 24px;
  width: auto;
  object-fit: contain;
  display: block;
}

.mimosa-logo {
  height: 26px;
}

.logo-divider {
  width: 1px;
  height: 20px;
  background: rgba(15, 23, 42, 0.2);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-kicker {
  font-size: 9px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--qp-gold-bright);
  text-transform: uppercase;
}

.brand-heading {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: #fff;
  line-height: 1.15;
}

/* Mode Nav Dock */
#mode-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}
#mode-nav::-webkit-scrollbar { display: none; }

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.nav-btn.active {
  background: linear-gradient(135deg, var(--qp-purple), #9333ea);
  border-color: var(--qp-gold-bright);
  color: #fff;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.45);
}

.nav-btn-gold {
  border-color: rgba(250, 204, 21, 0.45);
  background: rgba(234, 179, 8, 0.14);
  color: #fef08a;
}

.nav-btn-gold.active {
  background: linear-gradient(135deg, #ca8a04, #eab308);
  color: #090e1a;
  border-color: #fff;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.5);
}

.utility-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.icon-btn.active {
  background: rgba(234, 179, 8, 0.25);
  border-color: var(--qp-gold-bright);
  color: #fef08a;
}

/* ---------- TEAM SCOREBOARD BAR ---------- */
.team-bar {
  position: fixed;
  top: 60px;
  right: 16px;
  z-index: 25;
  width: 320px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  box-shadow: var(--shadow-xl);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.team-bar.collapsed {
  transform: translateX(360px);
  opacity: 0;
  pointer-events: none;
}

.team-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.team-bar-title {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--qp-gold-bright);
}

.team-bar-title small {
  display: block;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
  font-size: 10px;
}

.team-bar-actions {
  display: flex;
  gap: 4px;
}

.mini-btn {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(250, 204, 21, 0.4);
  background: rgba(234, 179, 8, 0.2);
  color: #fef08a;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.mini-btn:hover { background: rgba(234, 179, 8, 0.35); }
.mini-btn-ghost {
  border-color: rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--text-muted);
}
.mini-btn-ghost:hover { color: #fff; background: rgba(255,255,255,0.1); }

.team-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.team-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
}

.team-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.team-card.active {
  background: rgba(168, 85, 247, 0.22);
  border-color: var(--qp-gold-bright);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.25);
}

.team-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.team-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.team-name {
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-score {
  font-size: 14px;
  font-weight: 900;
  color: var(--qp-gold-bright);
  font-variant-numeric: tabular-nums;
}

/* ---------- HUD OVERLAY LAYER ---------- */
#hud-layer {
  position: fixed;
  inset: 58px 0 0 0;
  z-index: 10;
  pointer-events: none;
}

.hud-interactive {
  pointer-events: auto;
}

/* Glass Cards */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  pointer-events: auto;
}

/* Presentation Hub Layout */
.hub-left-panel {
  position: absolute;
  left: 18px;
  top: 16px;
  bottom: 84px;
  width: 410px;
  max-width: calc(100vw - 36px);
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  overflow-y: auto;
}

.chapter-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(168, 85, 247, 0.24);
  border: 1px solid rgba(168, 85, 247, 0.55);
  color: #e9d5ff;
}

.pill-badge.gold {
  background: rgba(234, 179, 8, 0.2);
  border-color: rgba(250, 204, 21, 0.6);
  color: #fef08a;
}

.pill-badge.red {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.65);
  color: #fecaca;
}

.pill-badge.green {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.65);
  color: #a7f3d0;
}

.pill-badge.cyan {
  background: rgba(6, 182, 212, 0.22);
  border-color: rgba(6, 182, 212, 0.65);
  color: #a5f3fc;
}

.slide-ref {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.chapter-title {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.18;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #ffffff 0%, #fde68a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.chapter-subtitle {
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.45;
  margin-bottom: 14px;
}

.key-points-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.key-points-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--qp-gold);
  font-size: 13px;
  line-height: 1.38;
  color: #f1f5f9;
}

.key-points-list li strong {
  color: #fde047;
}

.audience-prompt-box {
  padding: 11px 13px;
  border-radius: 11px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  margin-bottom: 14px;
}

.audience-prompt-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  color: #67e8f9;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.audience-prompt-text {
  font-size: 13px;
  font-style: italic;
  color: #ecfeff;
  line-height: 1.4;
}

.chapter-cta-row {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Primary Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 11px;
  border: none;
  background: linear-gradient(135deg, var(--qp-gold) 0%, #f59e0b 100%);
  color: #090e1a;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(234, 179, 8, 0.35);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(234, 179, 8, 0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 15px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.09);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  border: none;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border: none;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

/* Bottom Chapter Stepper Bar */
.hub-bottom-bar {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}

.chapter-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.chapter-dot-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.chapter-dot-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.chapter-dot-btn.active {
  background: rgba(168, 85, 247, 0.32);
  border-color: var(--qp-gold-bright);
  color: #fff;
}

.hub-orbit-hint {
  position: absolute;
  bottom: 84px;
  right: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(9, 14, 26, 0.72);
  border: 1px solid var(--glass-border);
  font-size: 12px;
  color: #cbd5e1;
  pointer-events: none;
}

/* ---------- SHARED GAME HUD ELEMENTS ---------- */
.game-top-hud {
  position: absolute;
  top: 14px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  max-width: calc(100vw - 360px);
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  font-size: 13px;
  font-weight: 700;
  pointer-events: auto;
}

.stat-chip .stat-val {
  font-size: 17px;
  font-weight: 900;
  color: var(--qp-gold-bright);
  font-variant-numeric: tabular-nums;
}

.stat-chip.danger { border-color: rgba(239, 68, 68, 0.65); background: rgba(127, 29, 29, 0.72); }
.stat-chip.safe { border-color: rgba(16, 185, 129, 0.65); background: rgba(6, 78, 59, 0.72); }

.game-side-panel {
  position: absolute;
  left: 18px;
  top: 72px;
  width: 340px;
  max-height: calc(100% - 92px);
  overflow-y: auto;
  padding: 16px;
}

.game-bottom-panel {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(860px, calc(100vw - 36px));
  padding: 14px 18px;
}

/* Progress & Gauge Bars */
.meter-wrap {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.meter-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.14s linear, background 0.2s ease;
}

/* Choice Grids */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.choice-btn {
  text-align: left;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  line-height: 1.3;
}

.choice-btn:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.25);
  border-color: var(--qp-gold-bright);
  transform: translateY(-1px);
}

.choice-btn.correct {
  background: rgba(16, 185, 129, 0.3) !important;
  border-color: #34d399 !important;
  color: #ecfdf5;
}

.choice-btn.wrong {
  background: rgba(239, 68, 68, 0.3) !important;
  border-color: #f87171 !important;
  color: #fef2f2;
}

/* Extinguisher Cards */
.ext-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.ext-card {
  padding: 10px;
  border-radius: 11px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
  text-align: center;
  transition: all 0.18s ease;
}

.ext-card:hover {
  transform: translateY(-2px);
  border-color: var(--qp-gold-bright);
  background: rgba(255, 255, 255, 0.12);
}

.ext-card.selected {
  border-color: var(--qp-gold-bright);
  background: rgba(234, 179, 8, 0.2);
  box-shadow: 0 0 18px rgba(234, 179, 8, 0.35);
}

.ext-swatch {
  width: 26px;
  height: 44px;
  margin: 0 auto 6px;
  border-radius: 6px 6px 4px 4px;
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.45);
}

.ext-card-title { font-size: 12.5px; font-weight: 800; }
.ext-card-sub { font-size: 10.5px; color: #cbd5e1; margin-top: 2px; }

/* TPASS Steps */
.tpass-steps {
  display: flex;
  gap: 6px;
  margin: 10px 0;
}

.tpass-step {
  flex: 1;
  text-align: center;
  padding: 8px 6px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
}

.tpass-step.active {
  background: rgba(234, 179, 8, 0.25);
  border-color: var(--qp-gold-bright);
  color: #fef08a;
  box-shadow: 0 0 14px rgba(234, 179, 8, 0.3);
}

.tpass-step.done {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34d399;
  color: #a7f3d0;
}

/* Aim Reticle for Extinguisher Game */
.aim-reticle {
  position: fixed;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2.5px solid var(--qp-gold-bright);
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.55);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
}
.aim-reticle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}
.aim-reticle.on-target {
  border-color: #34d399;
  box-shadow: 0 0 22px rgba(52, 211, 153, 0.8);
}
.aim-reticle.on-target::after {
  background: #34d399;
}

/* Code Console Buttons */
.code-btn-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.code-btn {
  padding: 12px 10px;
  border-radius: 11px;
  border: 2px solid transparent;
  font-weight: 900;
  font-size: 13.5px;
  cursor: pointer;
  color: #fff;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.code-btn:hover { transform: translateY(-2px); }
.code-btn small { display: block; font-size: 10.5px; font-weight: 600; opacity: 0.9; margin-top: 2px; }
.code-btn-1 { background: linear-gradient(135deg, #d97706, #f59e0b); color: #090e1a; border-color: #fde68a; }
.code-btn-2 { background: linear-gradient(135deg, #dc2626, #ef4444); border-color: #fca5a5; }
.code-btn-3 { background: linear-gradient(135deg, #7f1d1d, #b91c1c); border-color: #fecaca; animation: pulseBorder 1.4s infinite; }
.code-btn-w { background: linear-gradient(135deg, #e2e8f0, #ffffff); color: #0f172a; border-color: #34d399; }

@keyframes pulseBorder {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
}

/* Checklist Items */
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  color: #cbd5e1;
}

.checklist li.done {
  background: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  text-decoration: line-through;
}

/* Evacuation Controls Pad */
.evac-controls-bar {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
}

.crawl-btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: 2px solid #38bdf8;
  background: rgba(14, 165, 233, 0.2);
  color: #e0f2fe;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.crawl-btn.crawling {
  background: #0284c7;
  color: #fff;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
}

/* Speaker Notes Drawer */
.notes-drawer {
  position: fixed;
  top: 60px;
  left: 16px;
  bottom: 16px;
  width: 440px;
  max-width: calc(100vw - 32px);
  z-index: 40;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notes-drawer.hidden { display: none; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(124, 34, 128, 0.35);
}

.drawer-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--qp-gold-bright);
}

.drawer-header h3 { font-size: 16px; font-weight: 800; }

.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.drawer-body {
  padding: 16px 18px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.55;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-block {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid var(--qp-purple-bright);
}

.note-block h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--qp-gold-bright);
  margin-bottom: 6px;
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 124px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.94);
  border: 1.5px solid var(--qp-gold-bright);
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.25s ease;
  text-align: center;
  max-width: 600px;
}

.toast.success { border-color: #34d399; background: rgba(6, 78, 59, 0.95); }
.toast.danger { border-color: #f87171; background: rgba(127, 29, 29, 0.95); }
.toast.warn { border-color: #fbbf24; background: rgba(120, 53, 15, 0.95); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(4, 8, 18, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.hidden { display: none; }

.modal-card {
  width: min(560px, 95vw);
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(160deg, #131c33 0%, #0b1120 100%);
  border: 1.5px solid rgba(250, 204, 21, 0.45);
  border-radius: 20px;
  padding: 26px 28px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7);
  text-align: center;
}

.modal-icon { font-size: 46px; margin-bottom: 8px; }
.modal-title { font-size: 26px; font-weight: 900; margin-bottom: 8px; color: #fff; }
.modal-subtitle { font-size: 14.5px; color: #cbd5e1; line-height: 1.5; margin-bottom: 18px; }
.modal-score-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 14px;
  background: rgba(234, 179, 8, 0.16);
  border: 1px solid rgba(250, 204, 21, 0.5);
  font-size: 22px;
  font-weight: 900;
  color: var(--qp-gold-bright);
  margin-bottom: 18px;
}
.modal-takeaways {
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.5;
  color: #e2e8f0;
}
.modal-takeaways h4 {
  color: var(--qp-gold-bright);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Quiz Arena Overlay */
.quiz-question-card {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(920px, calc(100vw - 36px));
  padding: 18px 22px;
}

.quiz-q-text {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
  margin: 8px 0 12px;
  color: #fff;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quiz-opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}

.quiz-opt-btn:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.28);
  border-color: var(--qp-gold-bright);
  transform: translateY(-2px);
}

.quiz-opt-letter {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(234, 179, 8, 0.22);
  color: var(--qp-gold-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  flex-shrink: 0;
}

.quiz-opt-btn.correct { background: rgba(16, 185, 129, 0.35); border-color: #34d399; }
.quiz-opt-btn.wrong { background: rgba(239, 68, 68, 0.32); border-color: #f87171; }

/* Earthquake Hold Gauge */
.hold-ring-btn {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: 2px solid var(--qp-gold-bright);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.28), rgba(245, 158, 11, 0.18));
  color: #fef08a;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 0.04em;
  margin-top: 10px;
}

.hold-ring-btn.holding {
  background: linear-gradient(135deg, #059669, #10b981);
  border-color: #a7f3d0;
  color: #fff;
  transform: scale(0.98);
}

/* Responsive adjustments */
@media (max-width: 1560px) {
  .brand-titles { display: none; }
}
@media (max-width: 1180px) {
  .nav-btn { padding: 6px 8px; font-size: 11.5px; }
  .hub-left-panel { width: 350px; }
}

/* ---------- LIVE SIMULTANEOUS MULTIPLAYER STYLES ---------- */
.live-join-btn {
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
}
.live-join-btn.live-online {
  background: linear-gradient(135deg, #059669, #10b981);
  border-color: #a7f3d0;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
}

.live-pulse-panel {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.live-vote-bars {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}

.vote-chip {
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}
.vote-chip.right {
  background: rgba(16, 185, 129, 0.28);
  border: 1px solid #34d399;
  color: #ecfdf5;
}

.live-top3 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  color: #e2e8f0;
  margin-top: 4px;
}
.live-top3 span {
  background: rgba(234, 179, 8, 0.14);
  border: 1px solid rgba(250, 204, 21, 0.35);
  padding: 2px 7px;
  border-radius: 6px;
}

/* Join Lobby Modal */
.join-lobby-wrap { text-align: left; }
.modal-card:has(.join-lobby-wrap) { width: min(740px, 96vw); }

.join-lobby-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}

.qr-box {
  background: #ffffff;
  padding: 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.qr-box svg { width: 100%; height: auto; display: block; }

.join-info-col { display: flex; flex-direction: column; gap: 10px; }

.join-step-card {
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.join-step-card small {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 3px;
}
.join-url-big {
  font-size: 19px;
  font-weight: 900;
  color: #67e8f9;
  word-break: break-all;
}
.pin-card {
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(250, 204, 21, 0.5);
}
.join-pin-big {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 0.25em;
  color: #facc15;
  line-height: 1.1;
}

.roster-section {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px;
}
.roster-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fef08a;
  margin-bottom: 8px;
}
.roster-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-height: 145px;
  overflow-y: auto;
}
.roster-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid #a855f7;
  font-size: 12.5px;
  font-weight: 700;
}
.roster-pill .r-dot { width: 8px; height: 8px; border-radius: 50%; }

.floating-reaction {
  position: fixed;
  bottom: 90px;
  z-index: 55;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid #facc15;
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  pointer-events: none;
  animation: floatUp 3.2s ease-out forwards;
}
@keyframes floatUp {
  0% { opacity: 0; transform: translateY(15px) scale(0.9); }
  12% { opacity: 1; transform: translateY(0) scale(1); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-210px) scale(1.04); }
}
