/* Most Likely To — styles
 * Palette: coral, purple, electric blue (gold accent borrowed from the logo banner). */
:root {
  --coral: #ff5a5f;
  --coral-dark: #e84850;
  --purple: #6c2bd9;
  --purple-dark: #571fb0;
  --blue: #2f80ed;
  --gold: #ffb400;
  --ink: #1f1235;
  --muted: #6b6480;
  --bg: #f6f4ff;
  --card-bg: #ffffff;
  --radius: 22px;
  --shadow: 0 18px 40px rgba(108, 43, 217, 0.18);
  --shadow-sm: 0 6px 16px rgba(31, 18, 53, 0.12);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(47,128,237,0.16), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(255,90,95,0.16), transparent 55%),
    var(--bg);
  line-height: 1.55;
}

a { color: var(--purple); }

.container {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ---------- Header ---------- */
.site-header {
  padding: 10px 0;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo-link { display: inline-flex; }
.logo-link img {
  height: 120px;
  width: auto;
  display: block;
}
@media (max-width: 520px) {
  .logo-link img { height: 84px; }
}
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 2px solid rgba(108,43,217,0.16);
  color: var(--purple);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, box-shadow .12s ease;
}
.header-cta:hover { transform: translateY(-1px); }
.share-status {
  font-size: 0.82rem;
  color: var(--purple);
  font-weight: 700;
  min-height: 1em;
}

/* ---------- Hero / H1 ---------- */
.hero {
  text-align: center;
  padding: 6px 0 4px;
}
.hero h1 {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  line-height: 1.15;
  margin: 6px 0 8px;
  letter-spacing: -0.5px;
}
.hero h1 .accent { color: var(--coral); }
.hero p.tagline {
  margin: 0 auto 6px;
  max-width: 620px;
  color: var(--muted);
  font-size: .92rem;
}

/* ---------- Controls ---------- */
.controls { margin: 8px 0 6px; }

.cat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.cat-btn {
  border: 2px solid transparent;
  background: #fff;
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .1s ease, background .15s ease, color .15s ease;
}
.cat-btn .emoji { margin-right: 5px; }
.cat-btn:hover { transform: translateY(-1px); }
.cat-btn.active {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
}

.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
}
.switch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #d8d2ea;
  position: relative;
  transition: background .18s ease;
  flex: none;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform .18s ease;
}
.switch input:checked + .track { background: var(--coral); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid rgba(47,128,237,0.5); outline-offset: 2px; }

/* ---------- Card ---------- */
.card-wrap { perspective: 1200px; margin: 10px 0 6px; }
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px;
  min-height: 185px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-top: 8px solid var(--gold);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,90,95,0.06), rgba(47,128,237,0.06));
  pointer-events: none;
}
.card.flip { animation: flipIn .42s ease; }
@keyframes flipIn {
  0%   { transform: rotateX(85deg) scale(.96); opacity: 0; }
  60%  { transform: rotateX(-8deg) scale(1.01); opacity: 1; }
  100% { transform: rotateX(0deg) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .card.flip { animation: none; }
}

.card .eyebrow {
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 800;
  margin-bottom: 10px;
}
.card-name {
  font-size: clamp(1.6rem, 6vw, 2.6rem);
  font-weight: 900;
  color: var(--coral);
  line-height: 1.05;
  margin-bottom: 2px;
}
.card-prompt {
  font-size: clamp(1.4rem, 5.2vw, 2.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 4px 0 10px;
  color: var(--ink);
  max-width: 620px;
}
.card-hint {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

/* ---------- Action row ---------- */
.action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 6px 0 2px;
}
.next-btn {
  background: linear-gradient(135deg, var(--coral), var(--coral-dark));
  color: #fff;
  border: none;
  padding: 12px 34px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(255,90,95,0.4);
  transition: transform .12s ease, box-shadow .12s ease;
}
.next-btn:hover { transform: translateY(-2px); }
.next-btn:active { transform: translateY(0); }
.progress {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 2px 0 0;
  min-height: 1em;
}

/* ---------- Players panel ---------- */
.players-panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin: 16px 0 8px;
  border: 2px dashed rgba(108,43,217,0.25);
}
.players-panel h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--purple);
}
.players-panel .sub { margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; }
.player-add {
  display: flex;
  gap: 8px;
}
.player-add input {
  flex: 1;
  padding: 12px 14px;
  border: 2px solid #e4dff5;
  border-radius: 12px;
  font-size: 1rem;
}
.player-add input:focus { outline: none; border-color: var(--blue); }
.player-add button {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  border: none;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  font-size: 1rem;
}
.player-count {
  margin: 12px 0 8px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 700;
}
.player-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.player-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(108,43,217,0.1), rgba(47,128,237,0.1));
  color: var(--ink);
  padding: 6px 8px 6px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
}
.player-remove {
  border: none;
  background: rgba(31,18,53,0.12);
  color: var(--ink);
  width: 20px; height: 20px;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.player-remove:hover { background: var(--coral); color: #fff; }

/* ---------- Supporting content ---------- */
.support {
  margin: 40px 0 10px;
}
.support h2 {
  font-size: clamp(1.3rem, 4vw, 1.7rem);
  color: var(--purple);
  margin: 28px 0 10px;
}
.support h3 { margin: 18px 0 6px; font-size: 1.1rem; }
.support p, .support li { color: #2e2640; }
.support ul { padding-left: 20px; }

.faq details {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  padding: 4px 16px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 12px 0;
  font-size: 1.02rem;
  color: var(--ink);
}
.faq summary::-webkit-details-marker { color: var(--coral); }
.faq details[open] summary { color: var(--purple); }
.faq p { margin: 0 0 14px; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 44px;
  padding: 26px 0 34px;
  border-top: 1px solid rgba(108,43,217,0.14);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer nav {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.site-footer a { color: var(--purple); text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Content level control ---------- */
.level-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.level-label { font-weight: 700; color: var(--muted); font-size: 0.92rem; }
.level-seg {
  display: inline-flex;
  background: #fff;
  border-radius: 999px;
  padding: 4px;
  box-shadow: var(--shadow-sm);
}
.level-btn {
  border: none;
  background: transparent;
  color: var(--ink);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.level-btn.active {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
}

/* Empty custom category */
.cat-btn.is-empty { opacity: 0.55; }

/* ---------- Vote button + hint ---------- */
.vote-btn {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  border: none;
  padding: 15px 26px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(108,43,217,0.35);
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.vote-btn:hover { transform: translateY(-2px); }
.vote-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.vote-hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 4px 0 0;
  min-height: 1em;
}

/* ---------- Scoreboard ---------- */
.scoreboard {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  margin: 14px 0 8px;
  border: 2px solid rgba(255,180,0,0.35);
}
.scoreboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.scoreboard-head h2 { margin: 0; font-size: 1.05rem; color: var(--purple); }
.ghost-btn {
  background: #fff;
  border: 2px solid rgba(108,43,217,0.2);
  color: var(--purple);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.ghost-btn:hover { background: var(--bg); }
.score-list { list-style: none; margin: 0; padding: 0; }
.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 4px;
  border-bottom: 1px solid rgba(108,43,217,0.1);
}
.score-row:last-child { border-bottom: none; }
.score-name { font-weight: 700; }
.score-points {
  font-weight: 800;
  color: var(--coral);
  background: rgba(255,90,95,0.1);
  padding: 2px 12px;
  border-radius: 999px;
}

/* ---------- Voting overlay ---------- */
body.no-scroll { overflow: hidden; }
/* The hidden attribute must always win, even over display:flex/block rules below */
[hidden] { display: none !important; }
.vote-overlay {
  position: fixed;
  inset: 0;
  background: rgba(31,18,53,0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 1000;
}
.vote-modal {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 24px;
  position: relative;
  text-align: center;
  border-top: 8px solid var(--gold);
}
.vote-close {
  position: absolute;
  top: 10px; right: 12px;
  border: none;
  background: rgba(31,18,53,0.1);
  color: var(--ink);
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.vote-close:hover { background: var(--coral); color: #fff; }
.vote-step {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--muted);
  margin: 6px 0 4px;
}
.vote-bigname {
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  font-weight: 900;
  color: var(--coral);
  margin: 6px 0 18px;
}
.vote-note { color: var(--muted); font-size: 0.85rem; font-weight: 600; margin: 12px 0 4px; }
.vote-prompt {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  margin: 6px 0 16px;
}
.vote-choices { display: flex; flex-direction: column; gap: 10px; }
.vote-choice {
  border: 2px solid rgba(108,43,217,0.2);
  background: #fff;
  color: var(--ink);
  padding: 13px 16px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform .1s ease, background .15s ease, color .15s ease;
}
.vote-choice:hover {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
  transform: translateY(-1px);
}
.vote-winner {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--purple);
  margin: 6px 0 14px;
  line-height: 1.2;
}
.vote-tally { list-style: none; margin: 0 0 6px; padding: 0; }
.tally-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 4px;
  border-bottom: 1px solid rgba(108,43,217,0.1);
  font-weight: 700;
}
.tally-count { color: var(--coral); font-weight: 800; }
.vote-who {
  list-style: none;
  margin: 4px 0 16px;
  padding: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.vote-who li { padding: 2px 0; }

/* ---------- Custom questions editor ---------- */
.custom-panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin: 20px 0 8px;
  border: 2px dashed rgba(47,128,237,0.28);
}
.custom-panel h2 { margin: 0 0 4px; font-size: 1.05rem; color: var(--purple); }
.custom-panel .sub { margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; }
.custom-panel textarea {
  width: 100%;
  border: 2px solid #e4dff5;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  line-height: 1.5;
}
.custom-panel textarea:focus { outline: none; border-color: var(--blue); }
.custom-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.next-btn.small { padding: 10px 24px; font-size: 1rem; }
.custom-status { color: var(--purple); font-weight: 700; font-size: 0.85rem; }

/* ---------- Back button ---------- */
.back-btn {
  background: #fff;
  border: 2px solid rgba(108,43,217,0.2);
  color: var(--purple);
  padding: 13px 22px;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, opacity .12s ease;
}
.back-btn:hover:not(:disabled) { transform: translateY(-2px); }
.back-btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ---------- Share-this-question button (inside the card) ---------- */
.card-share {
  position: absolute;
  bottom: 10px;
  right: 12px;
  border: none;
  background: rgba(31,18,53,0.06);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 1rem;
  cursor: pointer;
  z-index: 1;
  transition: background .15s ease;
}
.card-share:hover { background: rgba(31,18,53,0.14); }

/* ---------- Tools row (print / big screen) ---------- */
.tools-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 4px;
}

/* ---------- Printable cards options panel ---------- */
.print-panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  margin: 14px 0 8px;
  border: 2px dashed rgba(255,180,0,0.5);
}
.print-panel h2 { margin: 0 0 4px; font-size: 1.05rem; color: var(--purple); }
.print-panel .sub { margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; }
.print-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.print-label { font-weight: 700; color: var(--muted); font-size: 0.9rem; }
.print-opt {
  border: 2px solid rgba(108,43,217,0.2);
  background: #fff;
  color: var(--ink);
  padding: 7px 15px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.print-opt.active {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  border-color: transparent;
  color: #fff;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 1200;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Big screen (TV) mode ---------- */
.big-exit {
  display: none;
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1100;
  background: #fff;
  border: 2px solid rgba(108,43,217,0.2);
  color: var(--purple);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
body.bigscreen .big-exit { display: inline-flex; }
body.bigscreen .site-header,
body.bigscreen .hero,
body.bigscreen .controls,
body.bigscreen .players-panel,
body.bigscreen .tools-row,
body.bigscreen .print-panel,
body.bigscreen .scoreboard,
body.bigscreen .custom-panel,
body.bigscreen .support,
body.bigscreen .site-footer,
body.bigscreen .progress,
body.bigscreen .vote-hint,
body.bigscreen .vote-btn,
body.bigscreen .back-btn,
body.bigscreen .card-share { display: none !important; }
body.bigscreen main.container { max-width: 100%; padding: 2vh 3vw 0; }
body.bigscreen .card-wrap { margin: 0 0 2vh; }
body.bigscreen .card { min-height: 74vh; }
body.bigscreen .card .eyebrow { font-size: clamp(1rem, 2.2vw, 1.6rem); }
body.bigscreen .card-name { font-size: clamp(2.6rem, 8vw, 6.5rem); }
body.bigscreen .card-prompt { font-size: clamp(2.2rem, 6.5vw, 5.6rem); max-width: 92%; line-height: 1.15; }
body.bigscreen .card-hint { font-size: clamp(1rem, 2vw, 1.4rem); }
body.bigscreen .action-row { margin: 0 0 2vh; }
body.bigscreen .next-btn { font-size: clamp(1.1rem, 2.4vw, 1.7rem); padding: 17px 52px; }

/* ---------- Print (printable cards + checklist) ---------- */
#print-area { display: none; }
@media print {
  body > :not(#print-area) { display: none !important; }
  #print-area { display: block; }
  body { background: #fff; margin: 0; }

  .print-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .print-card {
    border: 1.5px dashed #999;
    padding: 14px 12px 8px;
    min-height: 2.3in;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    break-inside: avoid;
    page-break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .pc-head {
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 800;
    color: #6c2bd9;
    margin-bottom: 6px;
  }
  .pc-text {
    flex: 1;
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
  }
  .pc-brand {
    font-size: 8px;
    color: #bbb;
    margin-top: 6px;
  }

  .print-list h1 {
    font-size: 20px;
    text-align: center;
    margin: 0 0 4px;
    color: #111;
  }
  .print-list .pl-sub {
    text-align: center;
    font-size: 11px;
    color: #666;
    margin: 0 0 14px;
  }
  .print-list ol { margin: 0; padding-left: 26px; }
  .print-list li {
    font-size: 13px;
    padding: 5px 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .pl-blank {
    display: inline-block;
    min-width: 1.6in;
    border-bottom: 1px solid #333;
    vertical-align: bottom;
  }
  .pl-brand {
    text-align: center;
    font-size: 8px;
    color: #bbb;
    margin-top: 16px;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 520px) {
  .header-cta span.label { display: none; }
  .card { padding: 20px 16px; min-height: 175px; }
  .next-btn { padding: 11px 26px; }
  .action-row { flex-wrap: wrap; }
}
