:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#172033;background:#f3f6fb;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-width:320px;min-height:100vh}
button,input,select{font:inherit}.shell{max-width:980px;margin:auto;padding:28px 16px 60px}
.card{background:#fff;border-radius:24px;padding:26px;box-shadow:0 20px 60px rgba(23,32,51,.09)}
.brand{font-size:.78rem;font-weight:900;letter-spacing:.18em;text-transform:uppercase;color:#586174}
h1{font-size:clamp(2rem,7vw,4rem);line-height:1;margin:.35rem 0 1rem;font-weight:950}
h2{margin:.2rem 0 1rem}.muted{color:#667085}.grid{display:grid;gap:18px}.teams{grid-template-columns:repeat(auto-fit,minmax(250px,1fr));margin-top:22px}
.field{width:100%;border:1px solid #d6dce7;border-radius:13px;padding:13px 14px;background:white;outline:none}
.field:focus{border-color:#6574e8;box-shadow:0 0 0 3px rgba(101,116,232,.12)}
.stack{display:grid;gap:13px}.btn{border:0;border-radius:13px;padding:13px 17px;font-weight:850;cursor:pointer}
.btn-primary{background:#172033;color:white}.btn-secondary{background:#eef1f6;color:#172033}.btn-accent{background:#5b63e8;color:white}
.btn:disabled{opacity:.5;cursor:not-allowed}.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.between{justify-content:space-between}
.pill{border-radius:999px;padding:7px 11px;background:#eef1f6;font-weight:800}.team{border:1px solid #e1e6ee;border-radius:18px;padding:18px}
.player{background:#f7f9fc;border-radius:13px;padding:12px;margin-top:9px}.code{font-size:clamp(2.4rem,10vw,5.2rem);letter-spacing:.16em;font-weight:950}
.error{background:#fff1f0;color:#a61b15;border-radius:12px;padding:12px}.success{background:#ecfdf3;color:#08783f;border-radius:12px;padding:12px}
.nav{display:flex;gap:9px;margin-bottom:16px}.nav button{flex:1}.question{font-size:clamp(1.45rem,4vw,2.4rem);font-weight:900;line-height:1.15}
.options{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px;margin-top:18px}
.option{padding:18px;text-align:left;background:#f4f6fa;border:2px solid transparent;border-radius:15px;font-weight:800}
.option:hover{border-color:#8088ee}.option.selected{border-color:#172033;background:#e8ebff}
.score{font-size:2rem;font-weight:950}.tiny{font-size:.82rem}
@media(max-width:560px){.card{padding:20px}.shell{padding-top:16px}.row.mobile-stack{display:grid}}


/* Question stage hierarchy */
.question-stage {
  margin-top: 24px;
  border-radius: 24px;
  overflow: hidden;
  border: 2px solid #dbe3ef;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
}

.round-banner {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 24px 28px;
  color: #ffffff;
}

.round-open .round-banner {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.round-team .round-banner {
  background: linear-gradient(135deg, #7c3aed, #5b21b6);
}

.round-spotlight .round-banner {
  background: linear-gradient(135deg, #ea580c, #c2410c);
}

.round-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 18px;
  background: rgba(255,255,255,0.18);
  font-size: 28px;
  font-weight: 900;
}

.round-eyebrow {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.round-title {
  margin: 0;
  color: inherit;
  font-size: clamp(25px, 4vw, 40px);
  line-height: 1.05;
}

.round-subtitle {
  margin: 8px 0 0;
  font-size: 17px;
  color: rgba(255,255,255,0.88);
}

.spotlight-player-card {
  margin: 22px 28px 0;
  padding: 24px;
  border: 3px solid #fb923c;
  border-radius: 20px;
  text-align: center;
  background: #fff7ed;
}

.spotlight-label {
  margin: 0;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #9a3412;
}

.spotlight-name {
  margin-top: 6px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1;
  font-weight: 1000;
  color: #9a3412;
}

.spotlight-team {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 800;
  color: #c2410c;
}

.question-card-main {
  padding: 28px;
}

.question-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.question-number-label {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: #64748b;
}

.category-chip {
  padding: 9px 14px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 900;
}

.question-text {
  margin: 0 0 28px;
  padding: 24px;
  border-radius: 20px;
  background: #f8fafc;
  border-left: 8px solid #0f172a;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 950;
}

.answering-as-panel {
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 16px;
  background: #f1f5f9;
}

.answering-as-panel label {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 900;
}

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

.answer-option {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  text-align: left;
  border: 2px solid #dbe3ef;
  border-radius: 18px;
  background: #ffffff;
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
}

.answer-option:not(:disabled):hover {
  border-color: #6366f1;
  transform: translateY(-1px);
}

.answer-option.selected {
  border-color: #4f46e5;
  background: #eef2ff;
  box-shadow: 0 0 0 4px rgba(79,70,229,0.12);
}

.answer-option:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.answer-letter {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background: #0f172a;
  color: #ffffff;
  font-weight: 950;
}

.answer-help {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}

.lock-answer-button {
  width: 100%;
  margin-top: 18px;
  min-height: 58px;
  font-size: 18px;
}

.answer-reveal {
  margin-top: 22px;
  padding: 22px;
  border-radius: 18px;
  background: #ecfdf5;
  border: 2px solid #34d399;
  color: #065f46;
}

.answer-reveal h3 {
  margin: 4px 0 8px;
  font-size: 26px;
}

.host-question-controls {
  display: flex;
  gap: 12px;
  padding: 0 28px 28px;
}

.host-question-controls .btn {
  flex: 1;
  min-height: 54px;
}

@media (max-width: 700px) {
  .round-banner {
    align-items: flex-start;
    padding: 20px;
  }

  .round-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .spotlight-player-card {
    margin: 16px 18px 0;
  }

  .question-card-main {
    padding: 18px;
  }

  .question-options {
    grid-template-columns: 1fr;
  }

  .question-text {
    padding: 18px;
    font-size: 28px;
  }

  .host-question-controls {
    flex-direction: column;
    padding: 0 18px 18px;
  }
}


/* Existing-player claim flow */
.join-choice-nav {
  margin-bottom: 22px;
  flex-wrap: wrap;
}

#join-mode {
  margin-top: 8px;
}

#join-mode .stack {
  animation: qfFadeIn 160ms ease-out;
}

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


/* Shareable game URL */
.game-link {
  margin-top: 8px;
  overflow-wrap: anywhere;
  user-select: all;
}
