@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

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

/* ===== Shared palette tokens ===== */
:root {
  color-scheme: light;
  --radius:     4px;
  --radius-lg:  8px;
  --font-mono:  'Space Mono', 'Courier New', monospace;
  --family:  #f4a261;
  --friends: #52b788;
  --date:    #e46fa0;
  --spicy:   #ff4d4d;
  --spiral:  #28FF85;
  --teal:    #158080;
}

/* ===== Dark theme (default) ===== */
:root {
  --bg:           #000000;
  --surface:      #111111;
  --surface2:     #1e1e1e;
  --text:         #e05252;
  --muted:        #888888;
  --accent:       #ECAA27;   /* gold — primary buttons / highlights */
  --accent-hover: #ffc84d;
  --heading:      #680707;   /* deep red — page titles */
  --box-border:   #ECAA27;   /* gold — card / question borders */
  --banner-bg:    #000000;
  --banner-border:#ECAA27;   /* gold outline under banner */
  --banner-text:  #680707;   /* deep red — "7 Questions" title */
  --logo-bg:      #680707;   /* red chip for the "7" logo */
  --logo-text:    #ECAA27;   /* gold "7" */
  --btn-text:     #000000;
  --modal-bg:     #111111;
}

/* ===== Dark theme (explicit) ===== */
[data-theme="dark"] {
  --bg:           #000000;
  --surface:      #111111;
  --surface2:     #1e1e1e;
  --text:         #e05252;
  --muted:        #888888;
  --accent:       #ECAA27;
  --accent-hover: #ffc84d;
  --heading:      #680707;
  --box-border:   #ECAA27;
  --banner-bg:    #000000;
  --banner-border:#ECAA27;
  --banner-text:  #680707;
  --logo-bg:      #680707;
  --logo-text:    #ECAA27;
  --btn-text:     #000000;
  --modal-bg:     #111111;
}

[data-theme="light"] {
  --bg:           #680707;
  --surface:      rgba(255,255,255,0.13);
  --surface2:     rgba(255,255,255,0.25);
  --text:         #000000;
  --muted:        rgba(0,0,0,0.55);
  --accent:       #158080;
  --accent-hover: #1aadad;
  --heading:      #000000;
  --box-border:   #ECAA27;
  --banner-bg:    #ECAA27;
  --banner-border:#ECAA27;
  --banner-text:  #680707;
  --logo-bg:      #000000;   /* black chip for the "7" logo */
  --logo-text:    #ECAA27;   /* gold "7" */
  --btn-text:     #ffffff;
  --modal-bg:     #680707;
}

/* ── Body ────────────────────── */
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background 0.3s, color 0.3s;
}

/* ── Site Banner ────────────────────── */
.site-banner {
  width: 100%;
  background: var(--banner-bg);
  border-bottom: 2px solid var(--banner-border);
  padding: 0.9rem 2rem;
  display: flex;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  position: relative;
  box-shadow: 0 2px 16px rgba(0,0,0,0.25);
  transition: background 0.3s, border-color 0.3s;
}
.banner-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.banner-logo {
  width: 38px;
  height: 38px;
  background: var(--logo-bg);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--logo-text);
  line-height: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.banner-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--banner-text);
  letter-spacing: 1px;
}

/* P5 left-border accent on banner */
.site-banner {
  border-left: 4px solid var(--banner-border);
}

/* Theme toggle button */
.theme-toggle {
  position: absolute;
  right: 1.5rem;
  background: none;
  border: 1px solid var(--banner-text);
  border-radius: 8px;
  color: var(--banner-text);
  padding: 0.25rem 0.55rem;
  font-size: 1rem;
  line-height: 1.4;
  cursor: pointer;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.theme-toggle:hover { opacity: 1; }

/* ── Screens ────────────────────── */
.screen {
  display: none;
  width: 100%;
  max-width: 620px;
  padding: 2rem 1.5rem;
  animation: fadeIn 0.3s ease;
  flex: 1;
  justify-content: center;
}
.screen.active { display: flex; flex-direction: column; align-items: center; }

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

/* ── Header ────────────────────── */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
  width: 100%;
}
.header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 0.4rem;
}
.header h2 { font-size: 1.5rem; font-weight: 600; color: var(--text); }
.subtitle   { color: var(--text); font-size: 1.15rem; font-weight: 600; }
.step-label { font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.18em; margin-bottom: 0.5rem; }

/* ── Card Grid ────────────────────── */
.card-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  justify-content: center;
}
.card-grid.vertical { flex-direction: column; flex-wrap: nowrap; }

/* ── Relation Cards ────────────────────── */
.relation-card {
  flex: 1;
  background: var(--surface);
  border: 2px solid var(--box-border);
  border-radius: 4px;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease-out, transform 0.15s ease-out, border-left-width 0.15s ease-out;
  color: var(--text);
}
.relation-card:hover {
  background: var(--surface2);
  transform: translateY(-3px);
  border-left: 4px solid var(--box-border);
}

/* Relation wrapper — positions the spicy btn relative to the card grid */
.relation-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 3rem;
}

/* ── Spicy corner button ────────────────────── */
.spicy-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  background: #2a0808;
  border: 2px solid #6b1212;
  border-radius: 10px;
  color: #e87070;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  letter-spacing: 0.4px;
  transition: all 0.2s ease;
}
.spicy-btn:hover {
  background: #4a0e0e;
  border-color: #b52020;
  color: #ffaaaa;
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 6px 20px rgba(180,20,20,0.45);
}

@keyframes spicy-select {
  0%   { transform: scale(1)    translateY(0);    box-shadow: none; }
  35%  { transform: scale(1.18) translateY(-5px); box-shadow: 0 8px 28px rgba(200,30,30,0.65); }
  65%  { transform: scale(1.1)  translateY(-3px); box-shadow: 0 6px 20px rgba(200,30,30,0.45); }
  100% { transform: scale(1)    translateY(0);    box-shadow: none; }
}
.spicy-btn.tapped {
  animation: spicy-select 0.4s ease forwards;
  background: #5a1010;
  border-color: #cc2222;
  color: #ffcccc;
}

.card-icon  { font-size: 2.5rem; }
.card-label { font-size: 1rem; font-weight: 600; letter-spacing: 0.5px; }

/* ── Tier Cards ────────────────────── */
.tier-card {
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--box-border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text);
  text-align: left;
}
.tier-card:hover {
  background: var(--surface2);
  transform: translateX(4px);
}
.tier-badge {
  background: var(--surface2);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.tier-info { display: flex; flex-direction: column; gap: 0.2rem; }
.tier-name { font-size: 1.05rem; font-weight: 600; }
.tier-desc { font-size: 0.85rem; color: var(--muted); }

/* ── Back button ────────────────────── */
.back-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.3rem 0;
  transition: color 0.15s;
}
.back-btn:hover { color: var(--text); }

/* ── Question Screen ────────────────────── */
.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 2rem;
}
.question-meta { display: flex; gap: 0.5rem; }

.badge {
  padding: 0.3rem 0.8rem;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.badge.family  { background: rgba(244,162,97,0.15);  color: var(--family); }
.badge.friends { background: rgba(82,183,136,0.15);  color: var(--friends); }
.badge.date    { background: rgba(228,111,160,0.15); color: var(--date); }
.badge.spicy   { background: rgba(255,77,77,0.15);   color: var(--spicy); }
.badge.tier1   { background: rgba(236,170,39,0.15);  color: #ECAA27; }
.badge.tier2   { background: rgba(255,160,80,0.12);  color: #ffb347; }
.badge.tier3   { background: rgba(228,111,160,0.12); color: var(--date); }

/* ── Question Card ────────────────────── */
.question-container {
  width: 100%;
  margin-bottom: 2rem;
}
.question-card {
  background: var(--surface);
  border-radius: 4px;
  padding: 2.5rem 2rem;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--box-border);
  border-left: 4px solid var(--box-border);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
#question-text {
  font-size: 1.25rem;
  line-height: 1.7;
  text-align: center;
  color: var(--text);
}

/* ── Navigation ────────────────────── */
.question-nav {
  display: flex;
  gap: 1rem;
  width: 100%;
  margin-bottom: 1rem;
}
.nav-btn {
  flex: 1;
  padding: 0.85rem;
  border-radius: 4px;
  border: 2px solid var(--surface2);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease-out, color 0.15s ease-out, transform 0.15s ease-out;
}
.nav-btn:hover { border-color: var(--box-border); color: var(--text); transform: translateY(-1px); }
.nav-btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--btn-text);
}
.nav-btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.nav-btn:disabled:hover { border-color: var(--surface2); color: var(--muted); transform: none; }

/* ── Skip button ────────────────────── */
.nav-btn.skip-btn {
  flex: 0 0 auto;
  padding: 0.85rem 1.2rem;
  background: none;
  border-color: transparent;
  color: var(--muted);
  font-size: 0.85rem;
}
.nav-btn.skip-btn:hover {
  border-color: var(--surface2);
  background: var(--surface);
  color: var(--text);
}

/* ── Shuffle ────────────────────── */
.shuffle-row { width: 100%; text-align: center; }
.shuffle-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  transition: all 0.15s;
}
.shuffle-btn:hover { color: var(--text); background: var(--surface2); }

/* ── Modals ────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1.5rem;
}
.modal-box {
  background: var(--modal-bg);
  border: 2px solid var(--box-border);
  border-top: 4px solid var(--box-border);
  border-radius: 4px;
  padding: 2.5rem 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.35);
}
.modal-icon  { font-size: 3rem; margin-bottom: 1rem; }
.modal-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 0.75rem; }
.modal-desc  { font-size: 0.95rem; color: var(--muted); line-height: 1.6; margin-bottom: 2rem; }
.modal-actions { display: flex; gap: 0.75rem; }
.modal-btn {
  flex: 1;
  padding: 0.85rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease-out;
  border: 2px solid transparent;
}
.modal-btn.secondary {
  background: var(--surface2);
  border-color: var(--surface2);
  color: var(--muted);
}
.modal-btn.secondary:hover { color: var(--text); border-color: var(--muted); }
.modal-btn.primary {
  background: var(--spicy);
  border-color: var(--spicy);
  color: #fff;
}
.modal-btn.primary:hover { background: #ff6666; border-color: #ff6666; }

/* Depth prompt modal */
.depth-box {
  border-color: var(--box-border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.modal-btn.depth-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--btn-text);
}
.modal-btn.depth-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* ── Done / Email screen ────────────────────── */
.done-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 1rem 0;
  width: 100%;
}
.done-icon  { font-size: 3.5rem; }
.done-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--heading);
}
.done-desc {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 320px;
}
.email-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
  margin-top: 0.5rem;
}
.email-input {
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--surface2);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.15s ease-out;
  outline: none;
}
.email-input:focus { border-color: var(--box-border); }
.email-input::placeholder { color: var(--muted); }
.email-submit-btn {
  width: 100%;
  padding: 0.85rem;
  border-radius: 4px;
  border: none;
  background: var(--accent);
  color: var(--btn-text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s ease-out, transform 0.15s ease-out;
}
.email-submit-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.skip-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.3rem;
  transition: color 0.15s;
}
.skip-link:hover { color: var(--text); }
.email-thanks {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}
.restart-btn {
  margin-top: 1.5rem;
  background: none;
  border: 2px solid var(--box-border);
  border-radius: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: border-color 0.15s ease-out, color 0.15s ease-out, transform 0.15s ease-out;
}
.restart-btn:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }

/* ── Ko-fi donate button ── */
.kofi-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 102;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 2px;
  padding: 9px 18px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 14px rgba(236,170,39,0.4);
  transition: background 0.15s ease-out, transform 0.15s ease-out, box-shadow 0.15s ease-out;
  /* Samsung Internet GPU fix */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}
.kofi-btn:hover {
  background: var(--accent-hover);
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(236,170,39,0.55);
}
.kofi-btn-cup { font-size: 1rem; line-height: 1; }

/* ── Ko-fi donate CTA inside feedback modal ── */
.kofi-modal-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: rgba(236,170,39,0.06);
  border: 1px solid rgba(236,170,39,0.3);
  border-radius: 4px;
  text-align: center;
  margin-top: 4px;
}
.kofi-modal-cta-title {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 700;
}
.kofi-modal-cta-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}
.kofi-modal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #000;
  border-radius: 2px;
  padding: 8px 20px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s ease-out, transform 0.15s ease-out;
}
.kofi-modal-link:hover { background: var(--accent-hover); transform: translateY(-1px); }

/* ── Feedback Tab ────────────────────── */
.feedback-tab {
  position: fixed;
  bottom: 5rem;
  right: 1.5rem;
  background: var(--surface2);
  border: 1px solid var(--box-border);
  border-radius: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  cursor: pointer;
  z-index: 50;
  transition: background 0.15s ease-out, border-color 0.15s ease-out, color 0.15s ease-out, transform 0.15s ease-out;
  /* Force GPU layer — Samsung Internet / iOS Safari fixed-position fix */
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}
.feedback-tab:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  -webkit-transform: translate3d(0, -2px, 0);
  transform: translate3d(0, -2px, 0);
}

/* Feedback Modal */
.feedback-box {
  border-color: var(--box-border);
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}
.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
}
.feedback-textarea {
  width: 100%;
  background: var(--surface2);
  border: 2px solid var(--surface2);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}
.feedback-textarea:focus { border-color: var(--box-border); }
.feedback-textarea::placeholder { color: var(--muted); }
.feedback-rating-row {
  display: flex;
  gap: 6px;
  margin-bottom: 2px;
}
.fb-rating-btn {
  flex: 1;
  background: var(--surface2);
  border: 1.5px solid var(--box-border);
  border-radius: 8px;
  padding: 9px 6px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.fb-rating-btn:hover { border-color: var(--accent); color: var(--accent); }
.fb-rating-btn.active { background: var(--accent); border-color: var(--accent); color: #000; }

/* ── Spiral green accent (light mode highlights) ────────────────────── */
[data-theme="light"] .badge.tier1 { background: rgba(40,255,133,0.2); color: var(--spiral); }
[data-theme="light"] .nav-btn.skip-btn:hover { border-color: var(--spiral); color: var(--spiral); }
[data-theme="light"] .shuffle-btn:hover { background: rgba(40,255,133,0.15); color: var(--spiral); }


/* ── Secret tap zone (reveals spicy button after 10 taps) ────────────────────── */
#spicy-tap-zone {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 64px;
  z-index: 49; /* below feedback tab (z-index: 50) */
  /* completely invisible — no background, no border */
  pointer-events: auto;
}

/* Spicy button reveal animation */
.spicy-btn {
  animation: none;
}
.spicy-btn[style*="flex"] {
  animation: spicy-fade-in 0.5s ease;
}
@keyframes spicy-fade-in {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

/* ═════════════════════════════════════
   GROUP MODE STYLES
   ═════════════════════════════════════ */

/* Tracker pill (top-left banner) */
.group-tracker-pill {
  position: absolute;
  left: 1.5rem;
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--box-border);
  border-radius: 20px;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}
.group-tracker-pill:hover { background: var(--surface); }

/* Rules screen */
.group-rules-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.rules-intro {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
}
.rules-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.rules-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}
.rules-num {
  background: var(--accent);
  color: #000;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.timer-section { width: 100%; }
.timer-label { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.6rem; font-weight: 500; }
.timer-options {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}
.timer-opt {
  flex: 1;
  padding: 0.65rem;
  border-radius: 8px;
  border: 2px solid var(--surface2);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.timer-opt:hover { border-color: var(--box-border); color: var(--text); }
.timer-opt.selected { border-color: var(--accent); background: var(--surface2); color: var(--accent); }

/* Shared group buttons */
.g-primary-btn {
  width: 100%;
  max-width: 380px;
  padding: 0.9rem;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: var(--btn-text);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  margin-top: 0.5rem;
}
.g-primary-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.g-primary-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.g-back-link {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-top: 0.25rem;
  transition: color 0.15s;
}
.g-back-link:hover { color: var(--text); }

/* Lobby / Pairs list */
.pairs-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.pair-card {
  background: var(--surface);
  border: 2px solid var(--surface2);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: border-color 0.2s;
}
.pair-card:focus-within { border-color: var(--box-border); }
.pair-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.1rem;
}
.pair-num {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
}
.pair-remove-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.pair-remove-btn:hover { color: var(--spicy); background: rgba(255,77,77,0.1); }
.pair-players { display: flex; gap: 0.5rem; }
.pair-input {
  width: 100%;
  background: var(--surface2);
  border: 1.5px solid transparent;
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.pair-input:focus { border-color: var(--box-border); }
.pair-input::placeholder { color: var(--muted); }
.add-pair-btn {
  background: none;
  border: 2px dashed var(--surface2);
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.7rem;
  width: 100%;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 0.75rem;
}
.add-pair-btn:hover { border-color: var(--box-border); color: var(--text); }

/* Pair intro screen */
.pair-intro-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem 0;
}
.pair-intro-icon { font-size: 3.5rem; }
.pair-intro-eyebrow { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); font-weight: 600; }
.pair-intro-name { font-size: 2rem; font-weight: 700; color: var(--accent); }
.pair-intro-players { display: flex; align-items: center; gap: 0.6rem; }
.player-chip {
  background: var(--surface2);
  border: 1px solid var(--box-border);
  border-radius: 20px;
  padding: 0.3rem 0.9rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}
.player-chip-divider { color: var(--muted); font-size: 0.85rem; }
.pair-intro-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.6; max-width: 300px; }
.pair-intro-timer-label { font-size: 0.85rem; color: var(--accent); font-weight: 600; }

/* Group question screen timer */
.group-timer {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  min-width: 48px;
  text-align: right;
}
.group-timer.warning { color: var(--spicy); animation: pulse-warn 1s ease-in-out infinite; }
@keyframes pulse-warn { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

.badge.group-badge {
  background: rgba(236,170,39,0.15);
  color: var(--accent);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Voting intro */
.vote-teams-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin: 0.5rem 0 1.5rem;
}
.vote-team-pill {
  background: var(--surface2);
  border: 1px solid var(--box-border);
  border-radius: 20px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

/* Vote question screen */
.vote-q-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
}
.vote-stage-area {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.vote-stage-label {
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  max-width: 320px;
}
.vote-voter-label {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.vote-voter-sub {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  margin-top: -0.25rem;
}
.vote-team-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 340px;
}
.vote-team-btn {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 2px solid var(--box-border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.vote-team-btn:hover { background: var(--surface2); transform: translateY(-1px); }
.vote-voter-count { font-size: 0.78rem; color: var(--muted); }
.vote-submitted {
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
  text-align: center;
  padding: 1rem;
}
.vote-submitted-name { display: block; font-size: 0.85rem; color: var(--muted); font-weight: 400; margin-top: 0.25rem; }

/* Vote tally */
.vote-tally { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 0.6rem; }
.vote-tally-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 600; text-align: center; margin-bottom: 0.25rem; }
.vote-tally-row { display: flex; align-items: center; gap: 0.6rem; }
.vote-tally-name { font-size: 0.85rem; font-weight: 600; color: var(--text); min-width: 80px; }
.vote-tally-bar-wrap { flex: 1; background: var(--surface2); border-radius: 4px; height: 8px; overflow: hidden; }
.vote-tally-bar { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.5s ease; min-width: 4px; }
.vote-tally-count { font-size: 0.85rem; font-weight: 700; color: var(--accent); min-width: 20px; text-align: right; }

/* Results leaderboard */
.results-leaderboard {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0 1.5rem;
}
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface);
  border: 2px solid var(--surface2);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s;
}
.leaderboard-row.leader { border-color: var(--accent); background: var(--surface2); }
.lb-rank { font-size: 1.2rem; min-width: 28px; }
.lb-team { flex: 1; display: flex; flex-direction: column; gap: 0.1rem; }
.lb-name { font-size: 0.95rem; font-weight: 700; color: var(--text); }
.lb-players { font-size: 0.75rem; color: var(--muted); }
.lb-votes { font-size: 1.1rem; font-weight: 700; color: var(--accent); white-space: nowrap; }
.lb-votes small { font-size: 0.7rem; font-weight: 400; color: var(--muted); }

/* Tracker modal */
.tracker-list { display: flex; flex-direction: column; gap: 0.5rem; width: 100%; }
.tracker-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--surface2);
}
.tracker-row:last-child { border-bottom: none; }
.tracker-rank { font-size: 1rem; min-width: 28px; }
.tracker-name { font-weight: 600; color: var(--text); flex: 1; font-size: 0.95rem; }
.tracker-stats { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }
.tracker-empty { color: var(--muted); font-size: 0.9rem; text-align: center; padding: 1rem 0; }

/* ══════════════════════════════════════════════════════
   LOBBY MODE STYLES
   ══════════════════════════════════════════════════════ */

/* Entry cards */
.lobby-entry-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 360px;
  margin: 1.5rem auto 0;
  padding: 0 1rem;
}
.lobby-entry-card {
  background: var(--surface);
  border: 2px solid var(--box-border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: transform 0.15s;
  width: 100%;
}
.lobby-entry-card:active { transform: scale(0.97); }
.lobby-entry-card .card-label { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.lobby-entry-card .card-sub   { font-size: 0.85rem; color: var(--muted); }

/* Form */
.lobby-form {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 1rem;
}
.lobby-input-group { display: flex; flex-direction: column; gap: 0.35rem; }
.lobby-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.lobby-input {
  background: var(--surface);
  border: 2px solid var(--box-border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  padding: 0.7rem 1rem;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}
.lobby-input:focus { border-color: var(--accent); }
.lobby-code-input {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  text-align: center;
  text-transform: uppercase;
}
.lobby-timer-group { display: flex; flex-direction: column; gap: 0.5rem; }
.lobby-hint {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}
.lobby-error {
  color: #ff5555;
  font-size: 0.9rem;
  text-align: center;
  padding: 0.4rem 1rem;
}

/* Room code */
.room-code-block { text-align: center; margin: 1rem 1rem 0.5rem; }
.room-code {
  font-size: 3.5rem;
  font-weight: 900;
  letter-spacing: 0.3em;
  color: var(--accent);
  background: var(--surface);
  border: 3px solid var(--box-border);
  border-radius: var(--radius);
  padding: 0.6rem 1.5rem;
  display: inline-block;
  line-height: 1.1;
}
.room-code-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.6rem;
  line-height: 1.5;
}

/* QR */
.qr-wrap { display: flex; justify-content: center; margin: 0.5rem 0; }
.qr-img  { border-radius: 12px; border: 3px solid var(--box-border); display: block; }

/* Waiting team list */
.waiting-teams {
  width: 100%;
  max-width: 380px;
  margin: 0.5rem auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0 1rem;
}
.waiting-team-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--surface);
  border: 1.5px solid var(--box-border);
  border-radius: 10px;
  padding: 0.65rem 1rem;
}
.waiting-team-num {
  width: 1.5rem; height: 1.5rem;
  background: var(--accent); color: var(--btn-text);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; flex-shrink: 0;
}
.waiting-team-name { flex: 1; font-weight: 600; font-size: 0.95rem; }
.host-chip {
  font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; background: var(--accent); color: var(--btn-text);
  padding: 0.18rem 0.5rem; border-radius: 20px;
}

/* Game screen */
.game-team-badge {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; background: var(--accent); color: var(--btn-text);
  padding: 0.2rem 0.65rem; border-radius: 20px; white-space: nowrap;
}

/* Pace warning banner */
.pace-warning {
  background: rgba(255,165,0,0.13);
  border: 1.5px solid orange;
  border-radius: 10px;
  color: orange;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  margin: 0.4rem 1rem;
  text-align: center;
  line-height: 1.45;
}

/* Team-done progress */
.done-progress-list {
  width: 100%;
  max-width: 360px;
  margin: 0.75rem auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1rem;
}
.progress-row {
  display: grid;
  grid-template-columns: 1fr 1fr 44px;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.progress-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-bar-wrap { background: var(--surface2); border-radius: 20px; height: 8px; overflow: hidden; }
.progress-bar     { height: 100%; background: var(--accent); border-radius: 20px; transition: width 0.5s ease; display: block; }
.progress-count   { text-align: right; color: var(--muted); font-size: 0.8rem; }

/* Vote countdown */
.vote-countdown {
  font-size: 3rem; font-weight: 900; color: var(--accent);
  text-align: center; margin: 0.4rem 0; line-height: 1;
}
.vote-muted { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 0.25rem; }

/* Vote reveal */
.reveal-bars {
  width: 100%; max-width: 380px;
  margin: 1rem auto 0;
  display: flex; flex-direction: column; gap: 0.9rem;
  padding: 0 0.5rem;
}
.reveal-row { display: flex; align-items: center; gap: 0.75rem; }
.reveal-rank { font-size: 1.2rem; flex-shrink: 0; width: 2rem; text-align: center; }
.reveal-team-info { flex: 1; display: flex; flex-direction: column; gap: 0.3rem; }
.reveal-name { font-weight: 700; font-size: 0.9rem; }
.reveal-bar-wrap { background: var(--surface2); border-radius: 20px; height: 10px; overflow: hidden; }
.reveal-bar  { height: 100%; background: var(--accent); border-radius: 20px; transition: width 0.8s ease; }
.reveal-stats {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 0.1rem; flex-shrink: 0; min-width: 58px;
}
.reveal-votes { font-size: 0.78rem; color: var(--muted); }
.reveal-score { font-size: 0.88rem; font-weight: 700; color: var(--accent); }

/* ── Group mode blocks (Lobby primary / Classic secondary) ── */
.group-mode-block {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
}
.primary-mode-block {
  background: var(--surface);
  border: 2px solid var(--accent);
}
.classic-mode-block {
  background: transparent;
  border: 1.5px solid var(--surface2);
  opacity: 0.85;
}
.mode-block-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.mode-block-icon { font-size: 1.6rem; flex-shrink: 0; }
.mode-block-title { font-size: 1rem; font-weight: 700; color: var(--accent); margin: 0; }
.mode-block-sub   { font-size: 0.78rem; color: var(--muted); margin: 0; }
.mode-block-desc  { font-size: 0.85rem; color: var(--muted); line-height: 1.55; margin: 0; }

.mode-divider {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0.5rem 0;
}

.classic-mode-btn {
  width: 100%;
  background: transparent;
  border: 1.5px solid var(--box-border);
  border-radius: 10px;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
}
.classic-mode-btn:hover { background: var(--surface2); }

/* ── Responsive ────────────────────── */
@media (max-width: 480px) {
  .card-grid { flex-direction: column; }
  .header h1 { font-size: 1.7rem; }
  #question-text { font-size: 1.1rem; }
  .question-card { padding: 1.8rem 1.2rem; }
  .theme-toggle { right: 1rem; }

  /* Move feedback to bottom-left on mobile so it never overlaps the ko-fi button (bottom-right) */
  .feedback-tab {
    right: auto;
    left: 1rem;
    bottom: 1rem;
  }
  .kofi-btn {
    bottom: 1rem;
    right: 1rem;
  }
}
