/* Tasting Party — Tasting Room Aesthetic */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #1A1118;
  --bg-warm: #211821;
  --card: #2A2030;
  --card-hover: #342840;
  --card-border: #3D2F48;
  --gold: #D4A853;
  --gold-dim: #B8923F;
  --gold-glow: rgba(212,168,83,0.15);
  --cream: #F5EDE0;
  --cream-dim: #C9BBAA;
  --wine: #8B2252;
  --wine-light: #A83267;
  --wine-dark: #6B1A40;
  --success: #5DAA68;
  --danger: #D4534B;
  --bourbon: #C97E2E;
  --beer: #D4A032;
  --sparkling: #CDA4B8;
  --cocktail: #4A9BAD;
  --text: #F5EDE0;
  --text-dim: #9B8EA3;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --radius: 12px;
  --radius-sm: 8px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(139,34,82,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 100%, rgba(212,168,83,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── Header / Branding ──────────────────────────────────── */
.header {
  background: linear-gradient(135deg, #1E1228 0%, #2A1832 50%, #1E1228 100%);
  border-bottom: 1px solid var(--card-border);
  padding: 14px 20px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.brand-icon {
  width: 32px;
  height: 32px;
  color: var(--gold);
  flex-shrink: 0;
}

.brand h1 {
  font-family: var(--font-display);
  font-size: 1.5em;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: 0.02em;
}

.header .subtitle {
  font-size: 0.8em;
  color: var(--text-dim);
  margin-top: 2px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.phase-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--bg);
  padding: 3px 14px;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: 700;
  margin-top: 6px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.room-badge {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: 700;
  margin-top: 4px;
  margin-left: 8px;
  font-family: var(--font-body);
  letter-spacing: 0.15em;
}

.header-link-btn {
  display: inline-block;
  background: transparent;
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  padding: 3px 14px;
  border-radius: 20px;
  font-size: 0.75em;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 6px;
  margin-left: 6px;
  cursor: pointer;
  transition: all 0.15s;
}
.header-link-btn:hover {
  color: var(--cream);
  border-color: var(--gold-dim);
}

/* ── Containers ─────────────────────────────────────────── */
.container { max-width: 640px; margin: 0 auto; padding: 16px; position: relative; z-index: 1; }
.container.wide { max-width: 1060px; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-glow), transparent);
}
.card h2 {
  font-family: var(--font-display);
  font-size: 1.2em;
  margin-bottom: 12px;
  color: var(--gold);
}
.card h3 {
  font-size: 1em;
  margin-bottom: 8px;
  color: var(--cream);
}

/* ── Landing Page ───────────────────────────────────────── */
.landing { text-align: center; padding-top: 24px; }
.landing-title {
  font-family: var(--font-display);
  font-size: 2.2em;
  color: var(--cream);
  margin-bottom: 4px;
}
.landing-sub {
  color: var(--text-dim);
  margin-bottom: 32px;
  font-size: 0.95em;
}
.landing-icon {
  width: 80px;
  height: 80px;
  color: var(--gold);
  margin-bottom: 12px;
  filter: drop-shadow(0 0 20px rgba(212,168,83,0.3));
}
.landing-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--text-dim);
  font-size: 0.85em;
}
.landing-divider::before, .landing-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

/* Room code input */
.code-input-group {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}
.code-char {
  width: 56px;
  height: 64px;
  text-align: center;
  font-size: 1.8em;
  font-weight: 700;
  font-family: var(--font-body);
  letter-spacing: 0;
  background: var(--card);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-sm);
  color: var(--gold);
  text-transform: uppercase;
  transition: border-color 0.2s;
}
.code-char:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

/* ── Beverage Letter Badge ──────────────────────────────── */
.bev-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-dark) 100%);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.3em;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(139,34,82,0.4);
}
.bev-letter.sm { width: 32px; height: 32px; font-size: 0.95em; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1.2;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  color: var(--bg);
}
.btn-primary:hover { filter: brightness(1.1); box-shadow: 0 4px 16px rgba(212,168,83,0.3); }
.btn-primary:disabled { background: #555; color: #888; cursor: not-allowed; filter: none; box-shadow: none; }

.btn-wine {
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-dark) 100%);
  color: var(--cream);
}
.btn-wine:hover { filter: brightness(1.15); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold-dim);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold-glow); }

.btn-ghost {
  background: transparent;
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--cream); background: rgba(255,255,255,0.05); }

.btn-danger { background: var(--danger); color: white; }
.btn-block { display: flex; width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85em; }
.btn-lg { padding: 16px 32px; font-size: 1.1em; }

/* ── Forms ───────────────────────────────────────────────── */
input[type="text"], input[type="number"], input[type="tel"], input[type="url"], input[type="email"], input[type="password"], select, textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-warm);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1em;
  color: var(--cream);
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
textarea { resize: vertical; min-height: 60px; }
select { cursor: pointer; }
select option { background: var(--card); color: var(--cream); }

label {
  display: block;
  font-weight: 600;
  font-size: 0.85em;
  margin-bottom: 5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-group { margin-bottom: 16px; }

/* ── Chips (aromas/flavors) ──────────────────────────────── */
.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 14px;
  border: 1.5px solid var(--card-border);
  border-radius: 20px;
  font-size: 0.85em;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  color: var(--cream-dim);
}
.chip:hover { border-color: var(--gold-dim); color: var(--cream); }
.chip.selected {
  background: var(--wine);
  color: var(--cream);
  border-color: var(--wine-light);
  box-shadow: 0 0 8px rgba(139,34,82,0.3);
}

/* ── Rating Row ──────────────────────────────────────────── */
.rating-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 400px) { .rating-row { grid-template-columns: repeat(2, 1fr); } }

.rating-box {
  background: var(--bg-warm);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
  transition: border-color 0.2s;
}
.rating-box:focus-within { border-color: var(--gold-dim); }
.rating-box .rating-label {
  font-size: 0.7em;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.rating-box .rating-sub { font-size: 0.6em; color: #665B70; margin-top: 2px; }
.rating-box select {
  width: 100%;
  padding: 6px;
  font-size: 1.15em;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--gold);
  font-weight: 700;
}

/* ── Buy Vote Row ────────────────────────────────────────── */
.buy-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.buy-row label { margin-bottom: 0; text-transform: none; }
.buy-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9em;
  color: var(--cream-dim);
}
.buy-option input[type="radio"] { accent-color: var(--gold); }

/* ── Star Toggle ─────────────────────────────────────────── */
.star-toggle {
  font-size: 1.6em;
  cursor: pointer;
  color: #4A4050;
  transition: all 0.25s;
  user-select: none;
}
.star-toggle.active { color: var(--gold); filter: drop-shadow(0 0 6px rgba(212,168,83,0.5)); }

/* ── Sip Timer ───────────────────────────────────────────── */
.sip-timer {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-warm);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
}
.sip-timer.running { border-color: var(--wine-light); background: rgba(139,34,82,0.1); }
.sip-timer .timer-display {
  font-size: 1.4em;
  font-weight: 700;
  font-family: var(--font-body);
  color: var(--cream);
  min-width: 60px;
  font-variant-numeric: tabular-nums;
}
.sip-timer .timer-btn {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.sip-timer .timer-btn.start { background: var(--wine); color: var(--cream); }
.sip-timer .timer-btn.stop { background: var(--gold); color: var(--bg); }

/* ── Wine/Beverage Tabs ──────────────────────────────────── */
.bev-tabs { display: flex; gap: 6px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; }
.bev-tab {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9em;
  cursor: pointer;
  border: 1.5px solid var(--card-border);
  background: var(--bg-warm);
  color: var(--cream-dim);
  transition: all 0.15s;
}
.bev-tab.active {
  background: var(--wine);
  color: var(--cream);
  border-color: var(--wine-light);
}
.bev-tab.completed { border-color: var(--success); color: var(--success); }

/* ── Guest List ──────────────────────────────────────────── */
.guest-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.guest-list li {
  background: var(--bg-warm);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9em;
  border: 1px solid var(--card-border);
  color: var(--cream-dim);
}
.guest-list li .check { color: var(--success); margin-left: 4px; }

/* ── Host View Tabs (Manage / My Tasting) ────────────────── */
.host-view-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--bg-warm);
  border-radius: var(--radius);
  padding: 4px;
  border: 1px solid var(--card-border);
}
.host-view-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-size: 0.9em;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}
.host-view-tab.active {
  background: var(--wine);
  color: var(--cream);
}
.host-view-tab:hover:not(.active) {
  background: rgba(139,34,82,0.3);
  color: var(--cream-dim);
}

/* ── Guest Progress (host tasting view) ──────────────────── */
.guest-progress-row {
  display: flex !important;
  flex-direction: column;
  gap: 4px;
  padding: 10px 14px !important;
  border-radius: var(--radius-sm) !important;
  width: 100%;
  box-sizing: border-box;
}
.guest-progress-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.guest-progress-name {
  font-weight: 600;
  color: var(--cream);
  font-size: 0.95em;
}
.guest-sip-timer {
  font-size: 0.75em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
  min-width: 36px;
  text-align: right;
  transition: color 0.3s;
}
.guest-sip-timer.active {
  color: var(--wine-light);
}
.sip-indicator {
  font-size: 1.1em;
  opacity: 0.2;
  transition: opacity 0.3s, transform 0.3s;
}
.sip-indicator.sipping {
  opacity: 1;
  animation: sip-pulse 1.5s ease-in-out infinite;
}
@keyframes sip-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25) rotate(-10deg); }
}
.guest-progress-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.guest-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
}
.guest-progress-fill {
  height: 100%;
  background: var(--gold-dim);
  border-radius: 3px;
  transition: width 0.4s ease;
}
.guest-progress-fill.complete {
  background: var(--success);
}
.guest-progress-pct {
  font-size: 0.75em;
  color: var(--text-dim);
  min-width: 32px;
  text-align: right;
}

/* ── Leaderboard ─────────────────────────────────────────── */
.leaderboard { width: 100%; border-collapse: collapse; }
.leaderboard th {
  text-align: left;
  padding: 10px 12px;
  background: var(--wine-dark);
  color: var(--cream);
  font-size: 0.8em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.leaderboard th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.leaderboard th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.leaderboard td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--card-border);
  font-size: 0.95em;
  color: var(--cream-dim);
}
.leaderboard tr:nth-child(even) { background: rgba(255,255,255,0.02); }
.leaderboard .rank { font-weight: 700; color: var(--gold); }
.leaderboard .winner td {
  background: rgba(212,168,83,0.08);
  color: var(--cream);
  font-weight: 600;
}

/* ── Beverage Stats Grid ─────────────────────────────────── */
.bev-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.bev-stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px;
  border-left: 4px solid var(--wine);
}
.bev-stat-card .stat-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.bev-stat-card .stat-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.9em;
}
.bev-stat-card .stat-label { color: var(--text-dim); }

/* ── Rating Column Chart ────────────────────────────────── */
.col-chart {
  margin: 20px 0;
  padding: 16px;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}
.col-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.col-chart-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95em;
  color: var(--cream);
}
.col-chart-avg {
  font-size: 0.8em;
  color: var(--text-dim);
}
.col-chart-avg strong {
  color: var(--gold);
  font-size: 1.3em;
}
.col-chart-area {
  display: flex;
  align-items: flex-end;
  gap: 4px;
}
.col-chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.col-chart-bar-wrap {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.col-chart-bar {
  width: 100%;
  max-width: 32px;
  border-radius: 4px 4px 0 0;
  background: var(--wine);
  opacity: 0.6;
  transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.col-chart-col.peak .col-chart-bar {
  background: linear-gradient(180deg, var(--gold) 0%, var(--wine) 100%);
  opacity: 1;
}
.col-chart-count {
  font-size: 0.7em;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 4px;
  min-height: 1em;
}
.col-chart-col.peak .col-chart-count {
  color: var(--gold);
}
.col-chart-label {
  font-size: 0.7em;
  color: var(--text-dim);
  margin-top: 6px;
  font-weight: 600;
}
.col-chart-col.peak .col-chart-label {
  color: var(--gold);
}

/* ── Word Cloud ──────────────────────────────────────────── */
.word-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 20px 10px;
  min-height: 100px;
}
.word-cloud-word {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--cream);
  transition: transform 0.2s;
  cursor: default;
}
.word-cloud-word:hover { transform: scale(1.1); color: var(--gold); }

/* ── Awards ──────────────────────────────────────────────── */
.awards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.award-card {
  background: var(--bg-warm);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  transition: transform 0.2s;
}
.award-card:hover { transform: translateY(-2px); }
.award-emoji { font-size: 2em; margin-bottom: 6px; display: block; }
.award-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
  font-size: 1em;
  margin-bottom: 2px;
}
.award-subtitle { font-size: 0.8em; color: var(--text-dim); margin-bottom: 6px; }
.award-winner {
  font-weight: 700;
  color: var(--cream);
  font-size: 0.95em;
}

/* ── One-Word Tags ───────────────────────────────────────── */
.one-words { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.one-word-tag {
  background: var(--bg-warm);
  border: 1px solid var(--card-border);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.8em;
  color: var(--cream-dim);
  font-style: italic;
}

/* ── Match Grid (Reveal) ─────────────────────────────────── */
.match-grid { display: flex; flex-direction: column; gap: 10px; }
.match-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-warm);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}
.match-row .bev-info { flex: 1; font-size: 0.9em; }
.match-row .bev-info strong { display: block; color: var(--cream); }
.match-row .bev-info small { color: var(--text-dim); }
.match-row select { width: 70px; font-size: 1.1em; text-align: center; font-weight: 700; }

/* ── Price Ranking ───────────────────────────────────────── */
.price-ranking { display: flex; flex-direction: column; gap: 8px; }
.price-rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}
.price-rank-row .rank-label { font-weight: 600; font-size: 0.85em; width: 85px; flex-shrink: 0; color: var(--text-dim); }
.price-rank-row select { width: 70px; font-size: 1.1em; font-weight: 700; }

/* ── Reveal Answer ───────────────────────────────────────── */
.reveal-answer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  margin-bottom: 8px;
}
.reveal-answer .price { font-weight: 700; color: var(--success); margin-left: auto; font-family: var(--font-body); }

/* ── Score Breakdown ─────────────────────────────────────── */
.score-breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.score-block {
  background: var(--bg-warm);
  border: 1px solid var(--card-border);
  padding: 12px;
  border-radius: var(--radius-sm);
}
.score-block .score-num { font-size: 1.8em; font-weight: 700; color: var(--gold); }
.score-block .score-label { font-size: 0.7em; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }

/* ── Info Bar ────────────────────────────────────────────── */
.info-bar {
  background: var(--card);
  border: 1px solid var(--card-border);
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.9em;
}
.info-bar code {
  background: var(--bg-warm);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 1.1em;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.1em;
}

/* ── Conversation Starter ────────────────────────────────── */
.conversation-box {
  background: var(--bg-warm);
  border-left: 3px solid var(--gold);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  font-family: var(--font-display);
  margin: 10px 0;
  color: var(--cream-dim);
}

/* ── Screens ─────────────────────────────────────────────── */
.screen { display: none; }
.screen.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Waiting / Spinner ───────────────────────────────────── */
.waiting { text-align: center; padding: 40px 20px; color: var(--text-dim); }
.spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--card-border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Beverage Setup Cards ────────────────────────────────── */
.bev-setup-card {
  background: var(--bg-warm);
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.bev-setup-card:hover { border-color: var(--gold-dim); }
.bev-setup-card.expanded { border-color: var(--gold); cursor: default; padding: 18px; }
.bev-setup-summary { display: flex; align-items: center; gap: 12px; }
.bev-setup-info { flex: 1; min-width: 0; }
.bev-setup-info strong { display: block; font-size: 0.95em; color: var(--cream); }
.bev-setup-info span { display: block; font-size: 0.8em; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bev-setup-price { font-weight: 700; color: var(--success); font-size: 0.95em; white-space: nowrap; }
.bev-setup-edit { color: var(--text-dim); font-size: 1.1em; }
.bev-setup-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.bev-setup-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 500px) {
  .bev-setup-fields { grid-template-columns: 1fr; }
  .bev-setup-fields .full { grid-column: auto !important; }
}
.bev-setup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
}

/* ── Auto-save Status ──────────────────────────────────── */
.save-status {
  font-size: 0.75em;
  color: var(--text-dim);
  transition: opacity 0.3s;
  min-width: 50px;
}
.save-status.saved { color: var(--success); }
.save-status.error { color: var(--danger); }

/* ── Beverage Library Picker ────────────────────────────── */
.library-picker {
  margin-top: 12px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  max-height: 240px;
  overflow-y: auto;
}
.library-list { display: flex; flex-direction: column; }
.library-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--card-border);
}
.library-item:last-child { border-bottom: none; }
.library-item:hover { background: var(--card-hover); }
.library-item-info { flex: 1; min-width: 0; }
.library-item-info strong { display: block; font-size: 0.9em; color: var(--cream); }
.library-item-info span { display: block; font-size: 0.75em; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.library-item-price { font-weight: 700; color: var(--success); font-size: 0.85em; white-space: nowrap; }

/* ── Autocomplete Dropdown ──────────────────────────────── */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: var(--shadow);
}
.ac-item {
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--card-border);
  transition: background 0.15s;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover { background: var(--card-hover); }
.ac-item strong { display: block; font-size: 0.9em; color: var(--cream); }
.ac-item span { font-size: 0.75em; color: var(--text-dim); }
.ac-badge {
  display: inline-block;
  background: var(--gold-dim);
  color: var(--bg);
  font-size: 0.65em;
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 2px;
}

/* ── Scan Status ───────────────────────────────────────── */
.scan-status {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--card);
  border-radius: var(--radius-sm);
  font-size: 0.85em;
  line-height: 1.4;
}
.scan-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--text-dim);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.scan-suggestions { margin-top: 4px; }
.scan-suggestion {
  padding: 6px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  margin-top: 4px;
  background: var(--card-hover);
  font-size: 0.85em;
  transition: background 0.15s;
}
.scan-suggestion:hover { background: var(--gold-glow); color: var(--gold); }

/* ── Game Mode Selector ──────────────────────────────────── */
.mode-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.mode-card {
  background: var(--bg-warm);
  border: 2px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.mode-card:hover { border-color: var(--gold-dim); }
.mode-card.selected { border-color: var(--gold); background: var(--gold-glow); }
.mode-card .mode-icon { font-size: 2em; margin-bottom: 6px; display: block; }
.mode-card .mode-name { font-family: var(--font-display); font-weight: 700; font-size: 1.05em; color: var(--cream); }
.mode-card .mode-desc { font-size: 0.8em; color: var(--text-dim); margin-top: 4px; }

/* ── Category Selector ───────────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
@media (max-width: 500px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
.cat-card {
  background: var(--bg-warm);
  border: 2px solid var(--card-border);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.cat-card:hover { border-color: var(--gold-dim); }
.cat-card.selected { border-color: var(--gold); background: var(--gold-glow); }
.cat-card .cat-icon { font-size: 1.8em; margin-bottom: 4px; display: block; }
.cat-card .cat-name { font-size: 0.85em; font-weight: 600; color: var(--cream); }

/* ── Save/Share Bar ──────────────────────────────────────── */
.share-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* ── Host Layout ─────────────────────────────────────────── */
@media (min-width: 768px) {
  .host-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .host-grid .full-width { grid-column: 1 / -1; }
}

/* ── Utilities ───────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-dim); }
.text-sm { font-size: 0.85em; }
.text-gold { color: var(--gold); }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.hidden { display: none !important; }
.print-header { display: none; }

/* ── Pulse animation for timer ───────────────────────────── */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }
.pulse { animation: pulse 1.5s ease infinite; }

/* ── Result celebration ──────────────────────────────────── */
@keyframes confetti-fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
.confetti {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  z-index: 200;
  pointer-events: none;
  animation: confetti-fall 3s ease forwards;
}

/* ═══════════════════════════════════════════════════════════
   BEVERAGE THEMES — Override CSS vars per category
   ═══════════════════════════════════════════════════════════ */

/* ── White Wine ─ warm straw / gold ───────────────────────── */
body.theme-white_wine {
  --bg: #18160F;
  --bg-warm: #211E14;
  --card: #2A2618;
  --card-hover: #342F20;
  --card-border: #48412A;
  --wine: #B8923F;
  --wine-light: #D4A853;
  --wine-dark: #8A6D2F;
  --gold: #E8C96A;
  --gold-dim: #C9AA4E;
  --gold-glow: rgba(232,201,106,0.15);
  --text-dim: #A39570;
}
body.theme-white_wine::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(184,146,63,0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 100%, rgba(232,201,106,0.06) 0%, transparent 50%);
}
body.theme-white_wine .header {
  background: linear-gradient(135deg, #1E1B10 0%, #2A2518 50%, #1E1B10 100%);
}

/* ── Sparkling ─ champagne / rose gold ────────────────────── */
body.theme-sparkling {
  --bg: #17131A;
  --bg-warm: #1F1A23;
  --card: #2A2433;
  --card-hover: #362E40;
  --card-border: #4A3D58;
  --wine: #C9889F;
  --wine-light: #DDA3B8;
  --wine-dark: #A66B82;
  --gold: #F2D4A8;
  --gold-dim: #D9B88A;
  --gold-glow: rgba(242,212,168,0.12);
  --text-dim: #A08E9B;
}
body.theme-sparkling::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(201,136,159,0.14) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 100%, rgba(242,212,168,0.06) 0%, transparent 50%);
}
body.theme-sparkling .header {
  background: linear-gradient(135deg, #1C1520 0%, #2A2035 50%, #1C1520 100%);
}

/* ── Bourbon ─ deep amber / leather ───────────────────────── */
body.theme-bourbon {
  --bg: #161008;
  --bg-warm: #1E1610;
  --card: #2A2018;
  --card-hover: #382A1E;
  --card-border: #4A3828;
  --wine: #C97E2E;
  --wine-light: #E09838;
  --wine-dark: #9A5F20;
  --gold: #E8B44C;
  --gold-dim: #C99838;
  --gold-glow: rgba(232,180,76,0.15);
  --cream: #F5E8D0;
  --cream-dim: #C9B090;
  --text-dim: #A09078;
}
body.theme-bourbon::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(201,126,46,0.14) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 100%, rgba(232,180,76,0.06) 0%, transparent 50%);
}
body.theme-bourbon .header {
  background: linear-gradient(135deg, #1A1208 0%, #2A1E12 50%, #1A1208 100%);
}

/* ── Beer ─ golden amber / copper ─────────────────────────── */
body.theme-beer {
  --bg: #14120A;
  --bg-warm: #1C1810;
  --card: #282218;
  --card-hover: #342C1E;
  --card-border: #463C28;
  --wine: #C9922E;
  --wine-light: #E0A838;
  --wine-dark: #9A7020;
  --gold: #E8C44C;
  --gold-dim: #C9A838;
  --gold-glow: rgba(232,196,76,0.15);
  --cream: #F5ECD0;
  --cream-dim: #C9B890;
  --text-dim: #A09870;
}
body.theme-beer::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(201,146,46,0.14) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 100%, rgba(232,196,76,0.06) 0%, transparent 50%);
}
body.theme-beer .header {
  background: linear-gradient(135deg, #181408 0%, #2A2212 50%, #181408 100%);
}

/* ── Cocktail ─ dark teal / neon speakeasy ────────────────── */
body.theme-cocktail {
  --bg: #0E1418;
  --bg-warm: #141C22;
  --card: #1A2630;
  --card-hover: #22303C;
  --card-border: #2E4250;
  --wine: #3A8E9E;
  --wine-light: #4AAFBF;
  --wine-dark: #2A6E7E;
  --gold: #4DD9C0;
  --gold-dim: #38B8A2;
  --gold-glow: rgba(77,217,192,0.12);
  --cream: #E0F0EC;
  --cream-dim: #A0C0B8;
  --text-dim: #7A9A98;
  --success: #5DAA68;
}
body.theme-cocktail::before {
  background: radial-gradient(ellipse at 30% 0%, rgba(58,142,158,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 100%, rgba(77,217,192,0.06) 0%, transparent 50%);
}
body.theme-cocktail .header {
  background: linear-gradient(135deg, #0E161C 0%, #142228 50%, #0E161C 100%);
}

/* ═══════════════════════════════════════════════════════════
   BUBBLE EFFECTS — for sparkling & beer
   ═══════════════════════════════════════════════════════════ */
.bubbles-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.bubble {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  animation: bubble-rise linear infinite;
}
@keyframes bubble-rise {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-110vh) translateX(var(--drift, 20px)) scale(0.6);
    opacity: 0;
  }
}
/* Sparkling gets smaller, more elegant champagne bubbles */
body.theme-sparkling .bubble {
  background: radial-gradient(circle at 30% 30%, rgba(242,212,168,0.2), rgba(201,136,159,0.04));
  border: 1px solid rgba(242,212,168,0.1);
}
/* Beer gets larger, lazier bubbles */
body.theme-beer .bubble {
  background: radial-gradient(circle at 30% 30%, rgba(232,196,76,0.12), rgba(201,146,46,0.03));
  border: 1px solid rgba(232,196,76,0.06);
}

/* ═══════════════════════════════════════════════════════════
   FEEDBACK FAB
   ═══════════════════════════════════════════════════════════ */
.fab-feedback {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wine) 0%, var(--wine-dark) 100%);
  color: var(--cream);
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  z-index: 150;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab-feedback:hover { filter: brightness(1.15); transform: scale(1.05); }
.fab-feedback:active { transform: scale(0.95); }

.fab-panel {
  position: fixed;
  bottom: 74px;
  right: 20px;
  width: 300px;
  max-width: calc(100vw - 40px);
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 18px;
  z-index: 150;
  box-shadow: var(--shadow);
  animation: fadeIn 0.2s ease;
}
.fab-panel h3 {
  font-family: var(--font-display);
  font-size: 1.05em;
  color: var(--gold);
  margin-bottom: 10px;
}
.fab-panel textarea {
  width: 100%;
  min-height: 70px;
  margin-bottom: 10px;
}
.fab-stars {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.fab-star {
  font-size: 1.5em;
  cursor: pointer;
  color: #4A4050;
  transition: color 0.15s;
  user-select: none;
}
.fab-star.active { color: var(--gold); }
.fab-star:hover { color: var(--gold-dim); }

.feedback-prompt {
  background: var(--bg-warm);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 18px;
  margin-top: 16px;
}
.feedback-prompt h3 {
  font-family: var(--font-display);
  font-size: 1em;
  color: var(--gold);
  margin-bottom: 8px;
}
.feedback-prompt textarea {
  width: 100%;
  min-height: 60px;
  margin-bottom: 8px;
}
.feedback-sent {
  color: var(--success);
  font-weight: 600;
  font-size: 0.9em;
}

/* ═══════════════════════════════════════════════════════════
   HOST GUIDANCE & FUN FACTS
   ═══════════════════════════════════════════════════════════ */
.host-guidance {
  background: var(--bg-warm);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 0.9em;
  color: var(--cream-dim);
  position: relative;
}
.host-guidance ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.host-guidance li {
  padding: 4px 0;
  padding-left: 20px;
  position: relative;
}
.host-guidance li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--gold-dim);
  font-size: 0.75em;
}
.host-guidance .dismiss-guidance {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.9em;
  padding: 2px 6px;
}
.host-guidance .dismiss-guidance:hover { color: var(--cream); }

.fun-fact {
  background: var(--bg-warm);
  border-left: 3px solid var(--wine);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 16px;
  margin: 10px 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.9em;
  color: var(--cream-dim);
}
.fun-fact .fact-label {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.75em;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

/* ═══════════════════════════════════════════════════════════
   GUEST EXPANDABLE TIPS — sticky bar below header
   ═══════════════════════════════════════════════════════════ */
.tips-bar {
  position: sticky;
  top: var(--header-height, 68px); /* sits right below the sticky header */
  z-index: 99;
  background: linear-gradient(135deg, #1E1228 0%, #2A1832 50%, #1E1228 100%);
  border-bottom: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
}
/* Theme-aware tips bar backgrounds */
body.theme-white_wine .tips-bar  { background: linear-gradient(135deg, #1E1B10 0%, #2A2518 50%, #1E1B10 100%); }
body.theme-sparkling .tips-bar   { background: linear-gradient(135deg, #1C1520 0%, #2A2035 50%, #1C1520 100%); }
body.theme-bourbon .tips-bar     { background: linear-gradient(135deg, #1A1208 0%, #2A1E12 50%, #1A1208 100%); }
body.theme-beer .tips-bar        { background: linear-gradient(135deg, #181408 0%, #2A2212 50%, #181408 100%); }
body.theme-cocktail .tips-bar    { background: linear-gradient(135deg, #0E161C 0%, #142228 50%, #0E161C 100%); }

.tips-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 8px 16px;
  font-size: 0.78em;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  user-select: none;
  transition: color 0.15s;
}
.tips-toggle:hover { color: var(--cream); }
.tips-toggle .chevron {
  transition: transform 0.2s;
  font-size: 0.7em;
}
.tips-toggle.expanded .chevron { transform: rotate(90deg); }

.tips-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.tips-content.expanded {
  max-height: 300px;
}
.tips-content ul {
  list-style: none;
  margin: 0;
  padding: 6px 20px 10px;
}
.tips-content li {
  padding: 3px 0;
  font-size: 0.85em;
  color: var(--cream-dim);
  padding-left: 22px;
  position: relative;
}
.tips-content li::before {
  content: '💡';
  position: absolute;
  left: 0;
  font-size: 0.8em;
}

/* ═══════════════════════════════════════════════════════════
   SOCIAL EMOJI REACTIONS
   ═══════════════════════════════════════════════════════════ */
.emoji-trigger {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--card) 0%, var(--card-hover) 100%);
  border: 1.5px solid var(--card-border);
  color: var(--cream);
  font-size: 1.3em;
  cursor: pointer;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.emoji-trigger:hover { border-color: var(--gold-dim); transform: scale(1.05); }
.emoji-trigger:active { transform: scale(0.95); }

.emoji-bar {
  position: fixed;
  bottom: 74px;
  left: 20px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 8px;
  z-index: 140;
  box-shadow: var(--shadow);
  animation: fadeIn 0.2s ease;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  max-width: 260px;
}
.emoji-bar-btn {
  font-size: 1.4em;
  padding: 6px;
  cursor: pointer;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  text-align: center;
  line-height: 1;
}
.emoji-bar-btn:hover { background: var(--card-hover); transform: scale(1.15); }
.emoji-bar-btn:active { transform: scale(0.9); }

@keyframes emoji-float-up {
  0% {
    transform: translateY(0) scale(0.5);
    opacity: 0;
  }
  10% {
    transform: translateY(-10vh) scale(1);
    opacity: 1;
  }
  80% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100vh) scale(1.4);
    opacity: 0;
  }
}

.emoji-float {
  position: fixed;
  bottom: 60px;
  z-index: 160;
  font-size: 2.2em;
  pointer-events: none;
  animation: emoji-float-up var(--duration, 3s) ease-out forwards;
}
