:root {
  --bg-cream: #F7F5EE;
  --surface: #FFFFFF;
  --navy: #18152E;
  --navy-soft: #262244;
  --gold: #B68B40;
  --gold-light: #F3EAD8;
  --text: #18152E;
  --muted: #5C596E;
  --border: #DFDCD2;
  --success: #2A6F5B;
  --danger: #A63A3A;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-cream);
  color: var(--text);
  line-height: 1.5;
}

.hidden { display: none !important; }

/* Header */
.brand-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 2px solid var(--navy);
  background: var(--bg-cream);
}
.admin-bar {
  background: var(--navy);
  color: var(--bg-cream);
  border-bottom: 3px solid var(--gold);
}
.brand-logo { display: flex; align-items: center; gap: 10px; }
.brand-name { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; }
.brand-tagline { display: block; font-size: 0.75rem; color: var(--muted); margin-top: -4px; }

.room-badge, .pill {
  background: var(--navy);
  color: var(--bg-cream);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 600;
}
.pill.live { background: var(--gold); color: #fff; }

/* Layout */
.container { max-width: 680px; margin: 24px auto; padding: 0 16px; }
.container.wide { max-width: 1120px; }
.screen-container { max-width: 1280px; margin: 28px auto; padding: 0 32px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(24, 21, 46, 0.04);
}
.center-card { max-width: 420px; margin: 60px auto; text-align: center; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

/* Typography & Forms */
h1, h2, h3 { margin-top: 0; color: var(--navy); letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.error-text { color: var(--danger); font-weight: 600; }

input[type="text"], input[type="password"], input[type="number"], textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--navy);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
}
.code-input {
  text-align: center;
  font-size: 1.5rem !important;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 6px;
  border: 1.5px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.btn-primary { background: var(--navy); color: var(--bg-cream); }
.btn-primary:hover { background: var(--navy-soft); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { filter: brightness(0.95); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--gold-light); }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-active { background: var(--gold) !important; color: #fff !important; border-color: var(--gold) !important; }

/* Holding Screen */
.holding-box {
  background: var(--navy);
  color: var(--bg-cream);
  border-radius: 12px;
  padding: 64px 32px;
  text-align: center;
}
.holding-box h1 { color: var(--bg-cream); font-size: 2.4rem; margin-bottom: 12px; }
.holding-box p { color: #C9C6D8; font-size: 1.2rem; }

/* Presentation Slide */
.slide-display {
  background: var(--surface);
  border-left: 8px solid var(--gold);
  padding: 48px 56px;
  border-radius: 8px;
}
.slide-display h1 { font-size: 2.5rem; margin-bottom: 24px; }
.slide-body { font-size: 1.35rem; line-height: 1.65; }
.slide-body ul { padding-left: 24px; }
.slide-body li { margin-bottom: 12px; }

/* Scale Buttons (1-5) */
.scale-group { display: flex; gap: 6px; margin-top: 6px; }
.scale-btn {
  flex: 1;
  padding: 10px 0;
  border: 1.5px solid var(--border);
  background: var(--bg-cream);
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}
.scale-btn.selected {
  background: var(--navy);
  color: var(--bg-cream);
  border-color: var(--navy);
}

/* 2x2 Matrix & 1D Spectrum */
.matrix-wrap {
  position: relative;
  width: 100%;
  max-width: 680px;
  aspect-ratio: 1 / 1;
  margin: 24px auto;
  background: #fff;
  border: 2px solid var(--navy);
}
.matrix-quadrant-lines::before {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 2px;
  background: var(--gold);
  opacity: 0.7;
}
.matrix-quadrant-lines::after {
  content: "";
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
  opacity: 0.7;
}
.q-label {
  position: absolute;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  padding: 10px 14px;
}
.q-tl { top: 0; left: 0; }
.q-tr { top: 0; right: 0; text-align: right; }
.q-bl { bottom: 0; left: 0; }
.q-br { bottom: 0; right: 0; text-align: right; }

.matrix-dot {
  position: absolute;
  transform: translate(-50%, 50%);
  background: var(--navy);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  border: 2px solid var(--gold);
  transition: all 0.4s ease;
}
.axis-y-title {
  position: absolute;
  left: -46px; top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  font-weight: 700;
  color: var(--navy);
}
.axis-x-title {
  text-align: center;
  font-weight: 700;
  color: var(--navy);
  margin-top: 8px;
}

/* 1D Spectrum Bar */
.spectrum-row { margin-bottom: 20px; }
.spectrum-track {
  position: relative;
  height: 14px;
  background: var(--bg-cream);
  border: 1px solid var(--border);
  border-radius: 99px;
  margin-top: 10px;
}
.spectrum-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--gold);
  color: #fff;
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 700;
}

/* Mystery Match Cards */
.fact-card {
  background: var(--bg-cream);
  border-left: 4px solid var(--gold);
  padding: 16px 20px;
  border-radius: 6px;
  margin-bottom: 14px;
}
.reveal-badge {
  display: inline-block;
  background: var(--navy);
  color: var(--gold);
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 700;
  margin-top: 8px;
}

/* Wave 2: Brainstorm & Dot-Vote */
.vote-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.vote-card.voted {
  border-color: var(--gold);
  background: var(--gold-light);
}
.vote-count-pill {
  background: var(--navy);
  color: var(--gold);
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 1rem;
  white-space: nowrap;
}

/* Wave 2: Category Board & Tally */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.board-col {
  background: var(--bg-cream);
  border: 1.5px solid var(--border);
  border-top: 4px solid var(--navy);
  border-radius: 8px;
  padding: 16px;
}
.board-col h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
}
.sticky-note {
  background: #fff;
  border-left: 3px solid var(--gold);
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 0.95rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.metric-big-box {
  background: var(--navy);
  color: var(--bg-cream);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}
.metric-big-num {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.1;
}

/* Wave 2: Blind Poker */
.poker-stage {
  background: var(--bg-cream);
  border: 2px solid var(--navy);
  border-radius: 10px;
  padding: 32px;
  text-align: center;
}
.poker-compare {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.poker-score-box {
  background: #fff;
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 18px 28px;
  min-width: 180px;
}