:root {
  --bg: #120d26;
  --bg-card: rgba(28, 21, 56, 0.88);
  --bg-card-soft: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.14);
  --text: #fff9f2;
  --text-muted: #c2b8df;

  --a-start: #ff4d8d;
  --a-end: #ff7aa8;
  --a-shadow: #9f1448;
  --a-ink: #ffffff;
  --a-soft: rgba(255, 77, 141, 0.22);
  --a-border: rgba(255, 77, 141, 0.55);

  --b-start: #2563eb;
  --b-end: #38bdf8;
  --b-shadow: #13317a;
  --b-ink: #ffffff;
  --b-soft: rgba(37, 99, 235, 0.24);
  --b-border: rgba(37, 99, 235, 0.55);

  --gold: #a855f7;
  --gold-shadow: #5b21b6;
  --accent-ink: #ffffff;
  --gold-soft: rgba(168, 85, 247, 0.18);
  --gold-border: rgba(168, 85, 247, 0.45);

  --mint: #38bdf8;
  --hi-a: #ff6b9d;
  --hi-b: #4cc9f0;
  --blob-1: #ff4d8d;
  --blob-2: #2563eb;
  --blob-3: #a855f7;
  --ink: #120d26;

  --font-display: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

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

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 90;
}

/* Subtle atmospheric party glow */
.bg-decor {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.25;
}

.blob-1 {
  width: 440px;
  height: 440px;
  background: var(--blob-1);
  top: -120px;
  left: -100px;
  animation: drift 16s ease-in-out infinite alternate;
}

.blob-2 {
  width: 480px;
  height: 480px;
  background: var(--blob-2);
  bottom: -160px;
  right: -120px;
  animation: drift 19s ease-in-out infinite alternate-reverse;
}

.blob-3 {
  width: 300px;
  height: 300px;
  background: var(--blob-3);
  top: 42%;
  left: 48%;
  opacity: 0.18;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, 30px) scale(1.1); }
}

.hidden {
  display: none !important;
}

/* ==================== TOPBAR ==================== */
.topbar {
  position: relative;
  z-index: 20;
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px 20px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px 0;
  transition: transform 0.15s ease;
}

.brand:hover {
  transform: translateY(-1px);
}

.brand-badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  background: var(--gold);
  color: var(--ink);
  padding: 5px 10px;
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--gold-shadow);
  transform: rotate(-4deg);
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.brand-bang {
  color: var(--gold);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==================== BUTTONS & PILLS ==================== */
button {
  font-family: inherit;
  color: inherit;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.15s ease, border-color 0.15s ease;
}

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

.pill-btn-accent {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  color: var(--text);
}

.mini-count {
  background: var(--gold);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.15s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.06);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 9px 14px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  border: none;
  border-radius: 18px;
  padding: 15px 24px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.15s ease;
}

.cta-btn:active {
  transform: translateY(4px);
}

.cta-a {
  background: linear-gradient(135deg, var(--a-start), var(--a-end));
  color: var(--a-ink);
  box-shadow: 0 6px 0 var(--a-shadow);
}
.cta-a:hover { filter: brightness(1.08); }
.cta-a:active { box-shadow: 0 2px 0 var(--a-shadow); }

.cta-b {
  background: linear-gradient(135deg, var(--b-start), var(--b-end));
  color: var(--b-ink);
  box-shadow: 0 6px 0 var(--b-shadow);
}
.cta-b:hover { filter: brightness(1.08); }
.cta-b:active { box-shadow: 0 2px 0 var(--b-shadow); }

.cta-gold {
  background: var(--gold);
  color: var(--accent-ink);
  box-shadow: 0 6px 0 var(--gold-shadow);
  width: auto;
  padding: 14px 28px;
}
.cta-gold:hover { filter: brightness(1.05); }
.cta-gold:active { box-shadow: 0 2px 0 var(--gold-shadow); }

.cta-lg {
  font-size: 1.25rem;
  padding: 17px 32px;
}

/* ==================== LAYOUT SHELL ==================== */
.app-shell {
  position: relative;
  z-index: 10;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px 56px;
}

.screen {
  display: none;
  animation: fadeSlideIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.screen.active {
  display: block;
}

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

/* ==================== HOME SCREEN ==================== */
.hero {
  text-align: center;
  max-width: 720px;
  margin: 18px auto 28px;
}

.hero-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--hi-a);
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 6vw, 3.8rem);
  line-height: 1.08;
  font-weight: 700;
  margin-bottom: 14px;
}

.highlight-a {
  color: var(--hi-a);
}

.highlight-b {
  color: var(--hi-b);
}

.hero-or {
  display: inline-block;
  font-size: 0.55em;
  vertical-align: middle;
  background: var(--gold);
  color: var(--accent-ink);
  padding: 4px 11px;
  border-radius: 12px;
  margin: 0 6px;
  transform: rotate(-6deg);
  box-shadow: 0 4px 0 var(--gold-shadow);
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.panel {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 22px 24px;
  backdrop-filter: blur(14px);
}

.category-panel {
  margin-bottom: 22px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-label {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.deck-counter {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--mint);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-row.compact {
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 9px 15px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.chip.active {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
  box-shadow: 0 4px 0 var(--gold-shadow);
}

.chip.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.mode-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mode-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.mode-card:hover {
  transform: translateY(-3px);
}

.mode-solo:hover {
  border-color: var(--a-border);
}

.mode-party:hover {
  border-color: var(--b-border);
}

.mode-online:hover {
  border-color: var(--gold-border);
}

.mode-pill-gold {
  background: var(--gold-soft);
  color: var(--text);
  border: 1px solid var(--gold-border);
}

.party-perks-gold span {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  color: var(--text);
}

.mode-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mode-emoji {
  font-size: 2.1rem;
}

.mode-pill {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.mode-card h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
}

.mode-card p {
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.round-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(0, 0, 0, 0.22);
  padding: 8px 12px;
  border-radius: 14px;
}

.round-selector-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.segmented {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
}

.seg-btn {
  background: transparent;
  border: none;
  padding: 6px 13px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.seg-btn.active {
  background: var(--gold);
  color: var(--accent-ink);
}

.party-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.party-perks span {
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--b-soft);
  border: 1px solid var(--b-border);
  color: var(--text);
  padding: 5px 10px;
  border-radius: 999px;
}

/* ==================== HUD & DUEL ARENA ==================== */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hud-left, .hud-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.09);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
  font-size: 0.88rem;
}

.stat-pill-soft {
  color: var(--text-muted);
}

.stat-streak {
  background: rgba(255, 122, 69, 0.16);
  border-color: rgba(255, 122, 69, 0.45);
  color: #ffb899;
}

.stat-rebel {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.45);
  color: #e2c5ff;
}

.stat-player-turn {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}

.prompt-banner {
  text-align: center;
  margin-bottom: 16px;
}

.prompt-kicker {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.duel-arena {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 20px;
}

.choice-card {
  position: relative;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-xl);
  padding: 28px 28px 30px;
  min-height: 310px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.15s ease, opacity 0.25s ease, filter 0.2s ease;
}

.card-a {
  background: linear-gradient(155deg, var(--a-start), var(--a-end));
  color: var(--a-ink);
  box-shadow: 0 11px 0 var(--a-shadow);
}

.card-b {
  background: linear-gradient(155deg, var(--b-start), var(--b-end));
  color: var(--b-ink);
  box-shadow: 0 11px 0 var(--b-shadow);
}

.choice-card:not(.locked):hover {
  transform: translateY(-4px);
  filter: brightness(1.06);
}

.choice-card:not(.locked):active {
  transform: translateY(5px);
}

.card-a:not(.locked):active { box-shadow: 0 5px 0 var(--a-shadow); }
.card-b:not(.locked):active { box-shadow: 0 5px 0 var(--b-shadow); }

.choice-card.locked {
  cursor: default;
}

.choice-card.is-picked {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 212, 59, 0.35), 0 10px 0 rgba(0, 0, 0, 0.35);
}

.choice-card.is-other {
  opacity: 0.78;
}

/* Rising liquid percentage fill inside card */
.choice-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0%;
  background: rgba(18, 13, 38, 0.28);
  border-top: 3px solid rgba(255, 255, 255, 0.45);
  transition: none;
  pointer-events: none;
  z-index: 1;
}

.choice-card.locked .choice-fill {
  transition: height 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.choice-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 18px;
}

.choice-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.choice-letter {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(18, 13, 38, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.35);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
}

.choice-picked-tag {
  background: var(--gold);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  padding: 5px 11px;
  border-radius: 999px;
  animation: popIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.key-hint {
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(18, 13, 38, 0.22);
  padding: 5px 10px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
}

.choice-text {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 600;
  line-height: 1.28;
  text-shadow: 0 2px 10px rgba(18, 13, 38, 0.25);
  flex: 1;
  display: flex;
  align-items: center;
}

.choice-result {
  padding-top: 14px;
  border-top: 1.5px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  animation: fadeSlideIn 0.3s ease;
}

.result-pct {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.result-votes {
  font-size: 0.92rem;
  font-weight: 700;
  opacity: 0.92;
}

/* Center floating OR badge */
.or-badge-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 12;
  pointer-events: none;
}

.or-badge {
  min-width: 66px;
  height: 66px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  border: 5px solid var(--bg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  transform: rotate(-8deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease;
}

.or-badge.pop {
  transform: rotate(4deg) scale(1.14);
}

.or-badge.is-rebel {
  background: #c084fc;
  color: var(--ink);
}

.or-badge.is-majority {
  background: var(--mint);
  color: var(--ink);
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

.verdict-box {
  background: rgba(28, 21, 56, 0.9);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  animation: fadeSlideIn 0.25s ease;
}

.verdict-badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 212, 59, 0.16);
  color: var(--gold);
}

.verdict-commentary {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.98rem;
  flex: 1;
}

.arena-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.arena-footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.center-footer {
  justify-content: center;
}

/* ==================== PARTY SETUP ==================== */
.party-setup-panel {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.setup-header h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  margin-bottom: 4px;
}

.setup-header p {
  color: var(--text-muted);
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 8px 10px;
}

.avatar-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
  font-size: 1.45rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.14s ease;
}

.avatar-btn:hover {
  transform: scale(1.1) rotate(-6deg);
}

.player-name-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 6px 4px;
  outline: none;
}

.player-name-input:focus {
  border-bottom: 2px solid var(--gold);
}

.remove-player-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: rgba(255, 62, 108, 0.16);
  color: #ff8ea8;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
}

.remove-player-btn:hover {
  background: rgba(255, 62, 108, 0.34);
}

.setup-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.muted-note {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.setup-settings-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.setting-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==================== PARTY HANDOFF ==================== */
.handoff-card {
  max-width: 560px;
  margin: 26px auto;
  text-align: center;
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.handoff-kicker {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.handoff-avatar {
  font-size: 4.8rem;
  line-height: 1;
  margin: 6px 0;
  animation: bounceFloat 1.8s ease-in-out infinite;
}

@keyframes bounceFloat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

.handoff-name {
  font-family: var(--font-display);
  font-size: 2.4rem;
}

.handoff-note {
  color: var(--text-muted);
  margin-bottom: 10px;
  max-width: 380px;
}

/* ==================== PARTY REVEAL ==================== */
.reveal-banner {
  text-align: center;
  background: linear-gradient(135deg, var(--a-soft), var(--b-soft));
  border: 2px solid var(--gold-border);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.reveal-headline {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--hi-a);
  margin-bottom: 4px;
}

.reveal-subline {
  color: var(--text);
  font-weight: 600;
}

.reveal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 18px;
}

.reveal-card {
  border-radius: var(--radius-xl);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 2px solid var(--border);
}

.reveal-a {
  background: var(--a-soft);
  border-color: var(--a-border);
}

.reveal-b {
  background: var(--b-soft);
  border-color: var(--b-border);
}

.reveal-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reveal-pct {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
}

.reveal-option-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.3;
}

.reveal-bar-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(18, 13, 38, 0.45);
  overflow: hidden;
}

.reveal-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: var(--gold);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.voter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}

.voter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(18, 13, 38, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 700;
  font-size: 0.9rem;
  animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.voter-empty {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.9rem;
}

.crowd-compare {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.hot-seat-card {
  background: var(--bg-card);
  border: 1.5px dashed var(--gold-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.host-joke-card {
  border-style: solid;
  border-color: var(--b-border);
  background: var(--b-soft);
}

.hot-seat-tag {
  background: rgba(255, 62, 108, 0.24);
  color: #ff99b2;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  padding: 5px 11px;
  border-radius: 999px;
}

.hot-seat-card p {
  font-weight: 600;
  font-size: 1rem;
}

/* ==================== SUMMARY & AWARDS ==================== */
.summary-panel {
  max-width: 820px;
  margin: 12px auto 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.summary-hero {
  text-align: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.summary-emoji {
  font-size: 4rem;
  margin-bottom: 8px;
}

.summary-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
}

.summary-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  margin: 6px 0 8px;
}

.summary-desc {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
}

.stat-box-val {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--gold);
}

.stat-box-lbl {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 4px;
}

.hot-take-box {
  background: rgba(255, 62, 108, 0.12);
  border: 1.5px solid rgba(255, 62, 108, 0.35);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.hot-take-box h4 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ff99b2;
  margin-bottom: 6px;
}

.hot-take-box p {
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.award-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 212, 59, 0.3);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.award-badge {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gold);
}

.award-winner {
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.award-detail {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.summary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding-top: 8px;
}

.summary-actions .cta-btn {
  width: auto;
}

/* ==================== MODAL ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8, 5, 18, 0.78);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.custom-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-field textarea,
.form-field input {
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.96rem;
  resize: vertical;
  outline: none;
}

.form-field textarea:focus,
.form-field input:focus {
  border-color: var(--gold);
}

.custom-list-section {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.custom-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 0.88rem;
}

.custom-item-text {
  line-height: 1.4;
}

.text-danger-btn {
  background: none;
  border: none;
  color: #ff8ea8;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

/* ==================== TOAST ==================== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  background: var(--gold);
  color: var(--ink);
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  animation: fadeSlideIn 0.2s ease;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 780px) {
  .mode-grid,
  .duel-arena,
  .reveal-grid,
  .players-grid,
  .awards-grid,
  .setup-settings-grid {
    grid-template-columns: 1fr;
  }

  .choice-card {
    min-height: 205px;
    padding: 22px;
  }

  .duel-arena {
    gap: 18px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .key-hint {
    display: none;
  }
}

@media (max-width: 520px) {
  .hide-xs {
    display: none;
  }
}

/* ==================== TEAM CLASH & ONLINE ROOMS ==================== */
.play-style-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
}

.setting-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.info-callout {
  background: rgba(255, 212, 59, 0.1);
  border: 1.5px solid rgba(255, 212, 59, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #fff1bd;
}

.team-tag-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  background: rgba(18, 13, 38, 0.65);
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: transform 0.12s ease, filter 0.15s ease;
}

.team-tag-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.15);
}

.team-pill-lg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 2px solid currentColor;
  padding: 5px 14px;
  font-weight: 800;
  font-size: 0.92rem;
}

.team-score-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.team-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(28, 21, 56, 0.92);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 10px 16px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.team-score-pts {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--gold);
}

.team-score-delta {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(46, 229, 157, 0.18);
  color: var(--mint);
}

.team-score-delta.zero {
  background: rgba(255, 62, 108, 0.18);
  color: #ff99b2;
}

/* Online Hub */
.profile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-bar-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.text-input {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  min-width: 210px;
  outline: none;
}

.text-input:focus {
  border-color: var(--gold);
}

.profile-hint {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 340px;
  line-height: 1.45;
}

.online-action-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.online-action-card h2 {
  font-family: var(--font-display);
  font-size: 1.65rem;
}

.join-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.code-input {
  background: rgba(18, 13, 38, 0.75);
  border: 2px solid rgba(56, 189, 248, 0.45);
  border-radius: 18px;
  padding: 16px;
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  outline: none;
}

.code-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(255, 212, 59, 0.2);
}

.error-note {
  color: #ff8ea8;
  font-weight: 700;
  font-size: 0.9rem;
}

.online-host-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 4px 0 auto;
}

/* Online Lobby */
.lobby-panel {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.room-code-hero {
  text-align: center;
  background: rgba(255, 212, 59, 0.08);
  border: 2px dashed rgba(255, 212, 59, 0.45);
  border-radius: var(--radius-xl);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.room-code-big {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--gold);
  text-shadow: 0 4px 0 rgba(181, 124, 0, 0.55);
  padding-left: 0.22em;
}

.room-code-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.lobby-team-switcher {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lobby-host-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lobby-players-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lobby-player-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 10px 14px;
}

.lobby-player-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  min-width: 0;
}

.lobby-player-avatar {
  font-size: 1.5rem;
}

.lobby-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 212, 59, 0.2);
  color: var(--gold);
}

.lobby-footer {
  display: flex;
  justify-content: center;
}

.lobby-wait-msg {
  text-align: center;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
}

.live-voters-bar {
  padding: 16px 20px;
}

.voter-chip.voted {
  border-color: var(--mint);
  background: rgba(46, 229, 157, 0.16);
}

.voter-chip.waiting {
  opacity: 0.6;
}

.team-standings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.team-standing-card {
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.team-standing-card.winner {
  border-color: var(--gold);
  background: rgba(255, 212, 59, 0.12);
}

@media (max-width: 960px) {
  .mode-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .lobby-players-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== FAVORITE COLORS STUDIO & LIGHT MODE ==================== */
.theme-dots {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.theme-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.modal-colors-card {
  max-width: 680px;
  gap: 14px;
  padding: 20px 22px;
}

.color-top-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card-soft);
  border: 1.5px solid var(--border);
  border-radius: 18px;
}

.mode-toggle-group {
  display: inline-flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.22);
  padding: 4px;
  border-radius: 14px;
}

:root.theme-light .mode-toggle-group {
  background: rgba(20, 16, 36, 0.08);
}

.mode-toggle-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-toggle-btn:hover {
  color: var(--text);
}

.mode-toggle-btn.active {
  background: var(--gold);
  color: var(--accent-ink);
  box-shadow: 0 3px 0 var(--gold-shadow);
}

.color-top-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.cta-compact {
  padding: 10px 18px;
  font-size: 0.98rem;
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--gold-shadow);
}

.cta-compact:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--gold-shadow);
}

.color-preview-strip {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: center;
}

.mini-card {
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.mini-card span {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.85;
}

.mini-card strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.mini-card-a {
  background: linear-gradient(145deg, var(--a-start), var(--a-end));
  color: var(--a-ink);
  box-shadow: 0 6px 0 var(--a-shadow);
}

.mini-card-b {
  background: linear-gradient(145deg, var(--b-start), var(--b-end));
  color: var(--b-ink);
  box-shadow: 0 6px 0 var(--b-shadow);
}

.mini-or {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--accent-ink);
  border: 4px solid var(--bg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.35);
}

.color-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.color-swatch-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.swatch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--bg-card-soft);
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 10px 6px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.swatch-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.1);
}

.swatch-btn.selected {
  border-color: var(--gold);
  background: var(--gold-soft);
  transform: translateY(-2px);
}

.swatch-btn.maxed {
  opacity: 0.42;
}

.swatch-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}

.swatch-name {
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
}

.color-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}

/* Theme-aware overrides for remaining elements */
.verdict-box,
.hot-seat-card,
.modal-card,
.team-score-pill {
  background: var(--bg-card);
}

.verdict-badge {
  background: var(--gold-soft);
  color: var(--hi-a);
}

.hot-seat-tag {
  background: var(--a-soft);
  color: var(--hi-a);
}

.stat-streak {
  background: var(--a-soft);
  border-color: var(--a-border);
  color: var(--text);
}

.stat-rebel {
  background: var(--b-soft);
  border-color: var(--b-border);
  color: var(--text);
}

.or-badge.is-majority {
  background: var(--a-start);
  color: var(--a-ink);
}

.or-badge.is-rebel {
  background: var(--b-start);
  color: var(--b-ink);
}

.hot-take-box {
  background: var(--a-soft);
  border-color: var(--a-border);
}

.hot-take-box h4 {
  color: var(--hi-a);
}

.info-callout {
  background: var(--gold-soft);
  border-color: var(--gold-border);
  color: var(--text);
}

.room-code-hero {
  background: var(--gold-soft);
  border-color: var(--gold-border);
}

.room-code-big,
.stat-box-val,
.summary-kicker,
.prompt-kicker,
.handoff-kicker,
.award-badge,
.brand-bang {
  color: var(--hi-a);
}

.chip.active,
.brand-badge,
.mini-count,
.choice-picked-tag,
.or-badge,
.stat-player-turn,
.toast {
  color: var(--accent-ink);
}

/* Crisp Light Mode adaptation (e.g. when user picks White / Beige / Yellow) */
:root.theme-light .blob {
  opacity: 0.32;
}

:root.theme-light .pill-btn,
:root.theme-light .icon-btn,
:root.theme-light .ghost-btn,
:root.theme-light .stat-pill,
:root.theme-light .chip:not(.active),
:root.theme-light .player-row,
:root.theme-light .lobby-player-card,
:root.theme-light .stat-box,
:root.theme-light .award-card,
:root.theme-light .team-standing-card {
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--border);
  color: var(--text);
}

:root.theme-light .round-selector,
:root.theme-light .segmented {
  background: rgba(20, 16, 36, 0.08);
}

:root.theme-light .seg-btn.active {
  background: #181426;
  color: #ffffff;
}

:root.theme-light .voter-chip {
  background: rgba(255, 255, 255, 0.85);
  border-color: var(--border);
  color: var(--text);
}

:root.theme-light .text-input,
:root.theme-light .form-field textarea,
:root.theme-light .form-field input,
:root.theme-light .code-input {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
}

:root.theme-light .choice-letter,
:root.theme-light .key-hint {
  background: rgba(20, 16, 36, 0.12);
  color: inherit;
  border-color: currentColor;
}

:root.theme-light .swatch-circle {
  border-color: rgba(20, 16, 36, 0.25);
}

:root.theme-light .choice-card {
  border-color: rgba(20, 16, 36, 0.14);
}

:root.theme-light .choice-text {
  text-shadow: none;
}

:root.theme-light .choice-fill {
  background: rgba(20, 16, 36, 0.14);
}

@media (max-width: 640px) {
  .color-swatch-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==================== BRAND APP ICON & UPVOTE BUTTON ==================== */
.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.like-btn {
  padding: 7px 13px;
  font-size: 0.86rem;
  flex-shrink: 0;
}

.like-btn.liked {
  background: var(--gold);
  color: var(--accent-ink);
  border-color: var(--gold);
}

/* ==================== TOPBAR LANGUAGES BUTTON & MODAL ==================== */
#btn-side-lang.translating .side-lang-globe {
  display: inline-block;
  animation: spinGlobe 1s linear infinite;
}

@keyframes spinGlobe {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.modal-lang-card {
  max-width: 560px;
  gap: 14px;
}

.lang-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-search-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  pointer-events: none;
}

.lang-search-input {
  width: 100%;
  background: var(--bg-card-soft);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px 12px 42px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  outline: none;
}

.lang-search-input:focus {
  border-color: var(--gold);
}

.lang-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 48vh;
  overflow-y: auto;
  padding-right: 4px;
}

.lang-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  background: var(--bg-card-soft);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.lang-option-btn:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  background: var(--gold-soft);
}

.lang-option-btn.active {
  background: var(--gold);
  color: var(--accent-ink);
  border-color: var(--gold);
}

.lang-option-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lang-option-main strong {
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-option-native {
  font-size: 0.8rem;
  opacity: 0.82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-option-code {
  font-size: 0.72rem;
  font-weight: 800;
  opacity: 0.78;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .lang-list {
    grid-template-columns: 1fr;
  }
}

/* ==================== SOUND & AMBIENT NOISE POPOVER ==================== */
.sound-menu-wrap {
  position: relative;
}

.sound-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 268px;
  z-index: 55;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: fadeSlideIn 0.18s ease;
}

.sound-popover-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}

.sound-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sound-opt-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 8px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-card-soft);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.sound-opt-btn:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
  background: var(--gold-soft);
}

.sound-opt-btn.active {
  background: var(--gold);
  color: var(--accent-ink);
  border-color: var(--gold);
}

.sound-vol-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.sound-vol-row input[type="range"] {
  flex: 1;
  accent-color: var(--gold);
  cursor: pointer;
}
