:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #183c34;
  background: #f5f3ec;
  font-synthesis: none;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:disabled {
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #bb7923;
  outline-offset: 4px;
}
header {
  max-width: 1200px;
  margin: auto;
  padding: 28px 36px;
  display: flex;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid #dcded3;
}
.brand {
  font-family: Georgia, serif;
  font-weight: bold;
  font-size: 32px;
  letter-spacing: -1px;
  color: #173e33;
  text-decoration: none;
  display: flex;
  align-items: center;
}
.brand-icon {
  display: inline-grid;
  place-items: center;
  background: #173e33;
  color: #f4eacb;
  width: 34px;
  height: 38px;
  border-radius: 18px 18px 7px 7px;
  font-size: 24px;
  margin-right: 11px;
}
.brand-dot {
  color: #bc7b30;
}
.header-note {
  font-size: 12px;
  color: #6d7a70;
  margin-left: auto;
}
.room-tag {
  font-size: 11px;
  letter-spacing: 1.4px;
  margin-left: auto;
}
.room-tag b {
  font-size: 17px;
  letter-spacing: 3px;
  padding-left: 8px;
}
main {
  max-width: 1128px;
  margin: auto;
  padding: 48px 0 64px;
  min-height: 75vh;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2px;
  color: #77846b;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px;
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: -1.7px;
}
h1 em {
  color: #77815c;
  font-weight: 400;
}
h2 {
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.5px;
}
.intro {
  margin: 2px 0 38px;
}
.intro h1 {
  margin: 16px 0;
}
.intro p {
  font-size: 15px;
  line-height: 1.7;
  color: #67756b;
}
.intro-tags {
  display: flex;
  gap: 22px;
  margin-top: 20px;
  font-size: 11px;
  color: #7e8876;
}
.intro-tags span:before {
  content: "✦";
  font-size: 10px;
  padding-right: 7px;
  color: #ac803e;
}
.home-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: start;
}
.panel {
  background: #fffef9;
  border: 1px solid #e0e2d7;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 4px 16px #243c2c03;
}
.section-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 26px;
}
.section-heading .pill {
  margin-left: auto;
}
.step {
  font-size: 10px;
  color: #9da18c;
  border: 1px solid #dfdfcd;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
}
.pill {
  font-size: 10px;
  line-height: 1.5;
  background: #edf0e6;
  border-radius: 5px;
  padding: 5px 9px;
  color: #657458;
  white-space: nowrap;
}
label {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 11px;
  font-weight: 650;
  color: #526454;
  margin-bottom: 20px;
}
input,
select {
  min-height: 46px;
  background: #fffefb;
  border: 1px solid #d8ddd1;
  border-radius: 6px;
  padding: 12px;
  color: #183c34;
  width: 100%;
  font-weight: 400;
  font-size: 14px;
}
input::placeholder {
  color: #9ba498;
}
fieldset {
  padding: 0;
  border: 0;
  margin: 22px 0;
}
legend {
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 12px;
  width: 100%;
  color: #526454;
  display: flex;
  justify-content: space-between;
}
.text-button {
  border: 0;
  background: none;
  padding: 0;
  color: #62744f;
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.text-button:disabled {
  opacity: 0.5;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.chip {
  font-size: 11px;
  border-radius: 5px;
  padding: 9px 10px;
  background: #fafbf6;
  border: 1px solid #e0e3d6;
  color: #7b8675;
}
.chip.selected {
  background: #eaf0e3;
  border-color: #c6d1bb;
  color: #3e5a35;
}
.chip.selected:before {
  content: "✓ ";
  font-size: 10px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  gap: 12px;
  margin-top: 25px;
}
.settings-grid label:nth-child(4) {
  grid-column: 1/-1;
}
select {
  font-size: 12px;
}
.primary,
.secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  min-height: 47px;
  padding: 13px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
}
.primary {
  background: #194c3d;
  border: 1px solid #194c3d;
  color: #fffdf3;
}
.primary:hover:enabled {
  background: #24624f;
}
.primary:disabled,
.secondary:disabled {
  opacity: 0.45;
}
.primary span {
  font-size: 20px;
}
.wide {
  width: 100%;
  justify-content: space-between;
}
.secondary {
  background: #f2f1e7;
  color: #2d503e;
  border: 1px solid #d5dac9;
}
.secondary.wide {
  justify-content: center;
}
.join-panel {
  background: #eeefe3;
}
.join-panel > p {
  font-size: 13px;
  color: #7b8575;
  margin: -10px 0 25px;
}
.code-input {
  letter-spacing: 7px;
  font-size: 23px;
  font-weight: 600;
  text-transform: uppercase;
}
.how {
  border-top: 1px solid #d7dccb;
  margin-top: 28px;
  padding-top: 23px;
}
.how > span {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #889177;
}
.how p {
  font-size: 12px;
  line-height: 1.8;
  color: #788371;
  margin-top: 13px;
}
footer {
  max-width: 1128px;
  margin: 0 auto;
  padding: 24px 0 28px;
  border-top: 1px solid #dbdfd3;
  display: flex;
  gap: 20px;
  align-items: center;
  color: #85907e;
}
footer > span {
  font:
    22px Georgia,
    serif;
  color: #50634a;
}
footer p {
  font-size: 11px;
}
footer small {
  font-size: 10px;
  margin-left: auto;
}
.alert {
  border: 1px solid #cf8d7d;
  background: #fff2ec;
  padding: 15px;
  border-radius: 7px;
  color: #87392e;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
}
.toast-region {
  position: fixed;
  top: 8px;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: block;
  width: 100%;
  max-width: 460px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  text-align: left;
  background: #183c34;
  color: #f5f3ec;
  box-shadow: 0 6px 20px rgba(24, 60, 52, 0.3);
  font-size: 14px;
  line-height: 1.4;
  animation: toast-in 0.25s ease-out;
}
.toast-label {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e0b861;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}
.alert button {
  border: 0;
  background: none;
  color: inherit;
  font-size: 20px;
}
.game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 35px;
}
.connection {
  font-size: 11px;
  color: #a56c36;
}
.connection.online {
  color: #638665;
}
.lobby-title h1 {
  font-size: 48px;
}
.lobby-title p {
  margin: 14px 0 30px;
  color: #788371;
  font-size: 14px;
}
.lobby-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 25px;
}
.invitation {
  text-align: center;
  background: #eeefe3;
  padding: 40px 30px;
}
.big-code {
  font-family: Georgia, serif;
  font-size: 70px;
  letter-spacing: 12px;
  margin: 18px 0 25px;
}
.share-label {
  font-size: 10px;
  margin: 22px 0;
  text-align: left;
  font-weight: 400;
  color: #788371;
}
.share-label input {
  font-size: 12px;
}
.game-summary {
  border-top: 1px solid #d7dccb;
  padding-top: 22px;
  font-size: 12px;
  line-height: 1.8;
}
.game-summary p {
  font-size: 11px;
  color: #7f8978;
}
.players {
  margin-bottom: 30px;
}
.player {
  display: flex;
  gap: 13px;
  align-items: center;
  border-bottom: 1px solid #e6e8df;
  padding: 13px 0;
  font-size: 13px;
}
.player .pill,
.player-index,
.player .remove {
  margin-left: auto;
}
.avatar {
  height: 36px;
  width: 36px;
  border-radius: 50%;
  background: #e8edde;
  color: #65744c;
  display: grid;
  place-items: center;
  font:
    19px Georgia,
    serif;
}
.player-index {
  font-size: 10px;
  color: #a4aa99;
}
.waiting {
  font-size: 12px;
  color: #7f8877;
  padding: 15px 0;
  line-height: 1.7;
}
.question-card {
  background: #fffef9;
  border: 1px solid #dfe2d5;
  border-radius: 12px;
  padding: 32px;
}
.question-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.difficulty {
  font-size: 10px;
  color: #8c967f;
}
.timer {
  margin-left: auto;
  font:
    34px Georgia,
    serif;
  display: flex;
  align-items: baseline;
  gap: 3px;
}
.timer small {
  font: 12px system-ui;
}
.timer.urgent {
  color: #ac433a;
}
.question-card h1 {
  font-size: 37px;
  line-height: 1.25;
  letter-spacing: -0.7px;
  max-width: 900px;
  margin: 10px 0 28px;
}
.time-bar {
  display: block;
  width: 100%;
  height: 4px;
  border: 0;
  appearance: none;
  background: #e8ecdf;
  margin-bottom: 30px;
}
.time-bar::-webkit-progress-bar {
  background: #e8ecdf;
}
.time-bar::-webkit-progress-value {
  background: #97a371;
}
.time-bar::-moz-progress-bar {
  background: #97a371;
}
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.answer {
  min-height: 100px;
  border: 2px solid transparent;
  border-radius: 8px;
  text-align: left;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 17px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  position: relative;
  flex-wrap: wrap;
  align-content: center;
}
.answer-0 {
  background: #ad483e;
}
.answer-1 {
  background: #316b8c;
}
.answer-2 {
  background: #dab152;
  color: #3c351b;
}
.answer-3 {
  background: #387358;
}
.answer:disabled {
  opacity: 1;
}
.answer:hover:enabled {
  filter: brightness(1.1);
}
.answer .shape {
  font-size: 22px;
  opacity: 0.8;
  min-width: 25px;
}
.answer > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.answer.chosen {
  border-color: #1b3028;
  box-shadow: 0 0 0 2px #fffef9 inset;
}
.choice-label {
  position: absolute;
  right: 10px;
  bottom: 4px;
  font-size: 9px;
  opacity: 0.85;
  font-weight: 400;
}
.answer.correct {
  border-color: #173e33;
  box-shadow: 0 0 0 2px #fffef9 inset;
}
.answer.incorrect {
  opacity: 0.55;
}
.answer-count {
  font-size: 10px;
  font-weight: 400;
  white-space: nowrap;
}
.answer-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  color: #7f8977;
  padding-top: 20px;
  line-height: 1.6;
}
.answer-status strong {
  font-weight: 600;
  color: #58724f;
}
.scoreboard {
  margin-top: 24px;
  padding: 25px 32px;
}
.scoreboard .section-heading {
  margin-bottom: 12px;
}
.rank-row {
  display: flex;
  gap: 15px;
  align-items: center;
  min-height: 51px;
  padding: 10px;
  border-bottom: 1px solid #e8ebdf;
  font-size: 13px;
}
.rank-row:last-child {
  border-bottom: 0;
}
.rank-number {
  color: #94a080;
  font-size: 12px;
  min-width: 18px;
}
.rank-row strong {
  margin-left: auto;
  font-size: 14px;
}
.rank-row small {
  font-size: 10px;
  color: #8b9680;
  font-weight: 400;
}
.rank-row.you {
  background: #eff2e7;
  border-radius: 5px;
}
.rank-row.you small {
  color: #6d805a;
}
.host-controls {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.host-controls details {
  margin-left: auto;
  min-width: 170px;
  font-size: 12px;
}
.host-controls .player {
  justify-content: space-between;
}
.host-controls summary {
  cursor: pointer;
  color: #7b8871;
}
.reveal-label {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #7c8f61;
}
.explanation {
  margin-top: 25px;
  padding: 22px;
  border-radius: 7px;
  background: #eff2e7;
}
.explanation p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: #526b48;
}
.final-title {
  text-align: center;
  margin: 35px 0 40px;
}
.final-title h1 {
  margin: 17px 0;
  font-size: 48px;
}
.final-title p {
  color: #7f8978;
  font-size: 13px;
}
.podium {
  display: flex;
  gap: 18px;
  align-items: end;
  max-width: 900px;
  margin: 0 auto 30px;
}
.podium-card {
  text-align: center;
  flex: 1;
  border: 1px solid #dce1cf;
  border-radius: 12px;
  padding: 30px 14px;
  background: #edeedf;
  min-width: 0;
}
.podium-card.position-0 {
  background: #234d3d;
  color: #fff9dd;
  order: 2;
  padding: 38px 14px;
}
.podium-card.position-1 {
  order: 1;
}
.podium-card.position-2 {
  order: 3;
}
.medal {
  display: block;
  font:
    38px Georgia,
    serif;
  color: #b18b46;
  margin-bottom: 17px;
}
.position-0 .medal {
  color: #e2c47f;
  font-size: 47px;
}
.podium-card h2 {
  margin: 17px 0 13px;
  overflow-wrap: anywhere;
}
.podium-card strong {
  font-size: 24px;
}
.podium-card small {
  font-size: 11px;
  font-weight: 400;
}
.position-0 .eyebrow {
  color: #c7d0b3;
}
.final-ranking {
  max-width: 900px;
  margin: auto;
}
.final-ranking > .primary {
  margin-top: 25px;
}
@media (max-width: 1190px) {
  main {
    padding: 38px 28px 55px;
  }
  footer {
    margin: 0 28px;
  }
  header {
    padding: 23px 28px;
  }
}
@media (max-width: 700px) {
  header {
    padding: 18px 20px;
  }
  .brand {
    font-size: 27px;
  }
  .brand-icon {
    width: 29px;
    height: 32px;
    font-size: 20px;
  }
  .header-note {
    display: none;
  }
  main {
    padding: 32px 18px 45px;
  }
  .intro {
    margin: 0 0 28px;
  }
  .intro h1 {
    font-size: 44px;
    margin: 17px 0;
  }
  .intro p {
    font-size: 13px;
  }
  .intro-tags {
    gap: 13px;
    flex-wrap: wrap;
    font-size: 9px;
  }
  .intro-tags span:before {
    padding-right: 4px;
  }
  .home-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .panel {
    padding: 23px 20px;
  }
  .section-heading {
    gap: 9px;
    margin-bottom: 22px;
  }
  h2 {
    font-size: 22px;
  }
  .section-heading .pill {
    font-size: 9px;
    padding: 4px 6px;
  }
  .chip {
    font-size: 10px;
    padding: 9px;
  }
  .settings-grid {
    gap: 8px;
    grid-template-columns: 1fr 1fr;
  }
  .settings-grid label:nth-child(3) {
    grid-column: 1/-1;
  }
  .settings-grid label:nth-child(3) select {
    max-width: none;
  }
  .game-top {
    margin-bottom: 26px;
  }
  .connection {
    font-size: 10px;
  }
  .lobby-title h1 {
    font-size: 38px;
  }
  .lobby-title p {
    font-size: 13px;
    line-height: 1.7;
  }
  .lobby-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .invitation {
    padding: 30px 24px;
  }
  .big-code {
    font-size: 60px;
  }
  .question-card {
    padding: 21px 16px;
  }
  .question-card h1 {
    font-size: 28px;
    line-height: 1.22;
    margin: 16px 0 25px;
  }
  .question-meta {
    gap: 8px;
    margin-bottom: 18px;
  }
  .question-meta .pill {
    font-size: 9px;
  }
  .timer {
    font-size: 31px;
  }
  .answers {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .answer {
    min-height: 77px;
    padding: 17px 13px;
    gap: 12px;
    font-size: 14px;
  }
  .answer .shape {
    font-size: 19px;
    min-width: 22px;
  }
  .answer-count {
    font-size: 9px;
  }
  .answer-status {
    font-size: 10px;
    gap: 8px;
  }
  .scoreboard {
    padding: 23px 17px;
  }
  .scoreboard h2 {
    font-size: 21px;
  }
  .rank-row {
    font-size: 12px;
    padding: 10px 7px;
    gap: 10px;
  }
  .host-controls {
    gap: 20px;
  }
  .host-controls > .primary {
    flex: 1;
  }
  .host-controls details {
    width: 100%;
    margin: 0;
  }
  .explanation {
    padding: 17px;
  }
  .explanation p {
    font-size: 13px;
  }
  .reveal-label {
    font-size: 8px;
  }
  .final-title {
    margin: 22px 0 30px;
  }
  .final-title h1 {
    font-size: 38px;
  }
  .final-title p {
    font-size: 12px;
    line-height: 1.7;
  }
  .podium {
    gap: 7px;
  }
  .podium-card {
    padding: 24px 7px;
  }
  .podium-card.position-0 {
    padding: 32px 7px;
  }
  .podium-card h2 {
    font-size: 16px;
  }
  .podium-card strong {
    font-size: 18px;
  }
  .podium-card .eyebrow {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .podium-card small {
    font-size: 9px;
  }
  .medal {
    font-size: 28px;
  }
  .position-0 .medal {
    font-size: 35px;
  }
  .final-ranking {
    padding: 23px 16px;
  }
  footer {
    margin: 0 20px;
    gap: 14px;
  }
  footer p {
    font-size: 10px;
  }
  footer small {
    font-size: 9px;
  }
  .desktop {
    display: none;
  }
}

/* Geometric answer marks stay visible without special symbol fonts. */
.answer .shape {
  display: block;
  flex: 0 0 20px;
  min-width: 20px;
  width: 20px;
  height: 20px;
  background: currentColor;
  opacity: 0.85;
}
.answer .shape-0 {
  flex: 0 0 20px;
  min-width: 0;
  width: 0;
  height: 0;
  background: none;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 20px solid currentColor;
}
.answer .shape-1 {
  width: 16px;
  height: 16px;
  min-width: 16px;
  flex-basis: 16px;
  transform: rotate(45deg);
  margin: 0 2px;
}
.answer .shape-2 {
  border-radius: 50%;
}
.chip.selected:before {
  content: "";
  width: 5px;
  height: 5px;
  background: #79916a;
  display: inline-block;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.intro-tags span:before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ac803e;
  margin-right: 7px;
  padding: 0;
  vertical-align: middle;
}
.connection:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  vertical-align: middle;
}

.round-winner {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #cad8ba;
  border-radius: 9px;
  background: #edf2e3;
  padding: 24px;
  margin-bottom: 25px;
  text-align: center;
  overflow-wrap: anywhere;
}
.round-winner .eyebrow {
  color: #53733f;
}
.round-winner h2 {
  font-size: 28px;
  margin: 12px 0 8px;
}
.round-winner p {
  font-size: 12px;
  color: #5e754f;
}
.round-winner.no-winners {
  background: #f2f1e8;
  border-color: #e0e2d3;
}
.round-winner.no-winners h2 {
  font-size: 22px;
  margin: 0;
  color: #7b856d;
}
.celebrate .winner-names {
  animation: winner-pop 1.5s ease-out both;
}
.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
.confetti i {
  position: absolute;
  left: 50%;
  top: 65%;
  width: 7px;
  height: 13px;
  background: #ad483e;
  opacity: 0;
  animation: confetti-burst 1.5s ease-out both;
}
.confetti i:nth-child(4n + 2) {
  background: #316b8c;
}
.confetti i:nth-child(4n + 3) {
  background: #dab152;
}
.confetti i:nth-child(4n) {
  background: #387358;
}
.confetti i:nth-child(1) {
  --x: -140px;
  --y: -85px;
  --r: -180deg;
}
.confetti i:nth-child(2) {
  --x: -110px;
  --y: -45px;
  --r: 140deg;
}
.confetti i:nth-child(3) {
  --x: -75px;
  --y: -110px;
  --r: -140deg;
}
.confetti i:nth-child(4) {
  --x: -40px;
  --y: -70px;
  --r: 230deg;
}
.confetti i:nth-child(5) {
  --x: -160px;
  --y: -10px;
  --r: 200deg;
}
.confetti i:nth-child(6) {
  --x: -20px;
  --y: -100px;
  --r: -210deg;
}
.confetti i:nth-child(7) {
  --x: 140px;
  --y: -85px;
  --r: 180deg;
}
.confetti i:nth-child(8) {
  --x: 110px;
  --y: -45px;
  --r: -140deg;
}
.confetti i:nth-child(9) {
  --x: 75px;
  --y: -110px;
  --r: 140deg;
}
.confetti i:nth-child(10) {
  --x: 40px;
  --y: -70px;
  --r: -230deg;
}
.confetti i:nth-child(11) {
  --x: 160px;
  --y: -10px;
  --r: -200deg;
}
.confetti i:nth-child(12) {
  --x: 20px;
  --y: -100px;
  --r: 210deg;
}
@keyframes winner-pop {
  0% {
    transform: scale(0.88);
  }
  22% {
    transform: scale(1.06);
  }
  45%,
  100% {
    transform: scale(1);
  }
}
@keyframes confetti-burst {
  0% {
    transform: translate(0, 0) rotate(0);
    opacity: 0;
  }
  12% {
    opacity: 0.95;
  }
  75% {
    opacity: 0.8;
  }
  100% {
    transform: translate(var(--x), var(--y)) rotate(var(--r));
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .celebrate .winner-names,
  .confetti i {
    animation: none;
  }
  .confetti {
    display: none;
  }
}
.invite-page {
  max-width: 480px;
  margin: 20px auto;
  padding: 36px;
  text-align: center;
}
.invite-page h1 {
  font-size: 44px;
  margin: 16px 0;
}
.invite-caption {
  font-size: 13px;
  color: #788371;
  line-height: 1.7;
}
.invite-code-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: #788371;
  margin-top: 30px;
}
.invite-page .big-code {
  margin: 10px 0 25px;
  overflow-wrap: anywhere;
}
.invite-page label {
  text-align: left;
}
.invite-home {
  display: block;
  font-size: 11px;
  color: #6c7d5c;
  margin-top: 26px;
  line-height: 1.6;
}
.invite-unavailable {
  color: #87392e;
  font-size: 14px;
  line-height: 1.7;
}
@media (max-width: 700px) {
  .round-winner {
    padding: 22px 17px;
  }
  .round-winner h2 {
    font-size: 25px;
  }
  .invite-page {
    padding: 30px 22px;
    margin: 0 auto;
  }
  .invite-page h1 {
    font-size: 38px;
  }
}

.header-home {
  color: #48653d;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-underline-offset: 4px;
}
.back-to-game {
  display: inline-block;
  margin-bottom: 26px;
  color: #48653d;
  font-size: 13px;
  text-underline-offset: 4px;
}
@media (max-width: 700px) {
  header {
    gap: 14px;
  }
  .header-home {
    font-size: 11px;
    margin-left: auto;
  }
  .room-tag {
    margin-left: auto;
  }
}

.question-kinds .type-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.type-choices label {
  flex-direction: row;
  align-items: center;
  font-size: 13px;
  gap: 8px;
  margin: 0;
  cursor: pointer;
}
.type-choices input {
  width: 18px;
  min-height: 18px;
  height: 18px;
  accent-color: #194c3d;
}
.round-label {
  margin-bottom: 20px;
  color: #8b6b35;
}
.question-picture {
  margin: 0 0 22px;
  border-radius: 9px;
  border: 1px solid #e0e5d6;
  background: #fafbf6;
}
.question-picture img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 340px;
  object-fit: contain;
}
.music-player {
  padding: 24px;
  background: #edf2e3;
  border: 1px solid #d8e1cc;
  border-radius: 9px;
  margin-bottom: 22px;
}
.music-player button {
  min-width: 170px;
  font-size: 17px;
  min-height: 58px;
  background: #fffef9;
}
.music-player p {
  font-size: 12px;
  margin-top: 13px;
  color: #617550;
  line-height: 1.7;
}
.credits-link {
  font-size: 11px;
  color: #647458;
}
.media-credits {
  padding: 0;
  list-style: none;
}
.media-credits li {
  padding: 18px 0;
  border-bottom: 1px solid #d8dece;
  overflow-wrap: anywhere;
}
.media-credits p {
  margin: 10px 0;
  font-size: 13px;
  line-height: 1.7;
}
.media-credits a {
  color: #315b4d;
  font-size: 12px;
}
@media (max-width: 700px) {
  .question-picture img {
    max-height: 260px;
  }
  .music-player {
    padding: 20px 16px;
  }
  footer {
    flex-wrap: wrap;
  }
}

.bowl-help { padding: 14px 16px; background: #eef3ed; border-radius: 12px; margin: 16px 0; color: #26463b; font-size: .9rem; }
.bowl-help h3 { font-size: 1rem; margin: 0 0 8px; }
.bowl-help p { margin: 7px 0; line-height: 1.45; }
.tossup-text { font-size: clamp(1.2rem, 2.2vw, 1.65rem); line-height: 1.65; min-height: 140px; overflow-wrap: anywhere; }
.bowl-credit { font-size: .8rem; color: #566b60; overflow-wrap: anywhere; }
.bowl-status { display: grid; gap: 8px; margin: 20px 0; }
.buzz-button { font-size: 1.8rem; min-height: 90px; display: grid; gap: 8px; place-items: center; }
.buzz-button small { font-size: .75rem; font-weight: normal; }
.bowl-answer input { font-size: 1.25rem; }
.bowl-rules { margin-left: auto; }
.bowl-rules summary { cursor: pointer; border: 1px solid #849d8d; border-radius: 50%; padding: 2px 10px; list-style: none; }
.bowl-rules[open] { flex-basis: 100%; }
.bowl-attempts { overflow-wrap: anywhere; }
.reading-cursor { color: #8b9c54; }

/* A server-timed, three-step podium reveal. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.podium-suspense { min-height: 2em; text-align: center; color: #46634a; font-family: Georgia, serif; font-size: 1.3rem; margin: 0 0 25px; }
.dramatic-podium { align-items: stretch; }
.dramatic-podium .podium-card { position: relative; overflow: hidden; transition: opacity .45s, box-shadow .6s, background .6s; }
.podium-waiting { opacity: .42; }
.podium-cue { opacity: .8; box-shadow: 0 0 25px #bfa15b40; }
.podium-empty { min-height: 105px; display: grid; place-items: center; font: 3rem Georgia, serif; opacity: .35; }
.podium-entrance { animation: podium-rise .65s cubic-bezier(.2,.8,.2,1) both; }
.podium-shown.position-0 { box-shadow: 0 0 45px #c5a45360, inset 0 1px 20px #fff5c518; }
.podium-person + .podium-person { border-top: 1px solid #a4ad9955; margin-top: 15px; padding-top: 6px; }
.podium-replay { text-align: center; margin-top: 20px; }
.podium-confetti { position: absolute; inset: 0; pointer-events: none; }
.podium-confetti i { position: absolute; width: 6px; height: 12px; background: #e0bd69; left: 50%; top: 20%; animation: podium-fall 1.2s ease-out both; }
.podium-confetti i:nth-child(3n) { background: #9eb695; }
.podium-confetti i:nth-child(3n+1) { background: #fbf2ce; }
.podium-confetti i:nth-child(5n) { left: 15%; }
.podium-confetti i:nth-child(5n+1) { left: 32%; animation-delay: .1s; }
.podium-confetti i:nth-child(5n+2) { left: 68%; animation-delay: .2s; }
.podium-confetti i:nth-child(5n+3) { left: 85%; animation-delay: .05s; }
.podium-confetti i:nth-child(even) { animation-duration: .95s; }
@keyframes podium-rise { from { opacity: 0; transform: translateY(55px) rotateX(25deg); } to { opacity: 1; transform: translateY(0) rotateX(0); } }
@keyframes podium-fall { from { opacity: 1; transform: translateY(-30px) rotate(0); } to { opacity: 0; transform: translateY(210px) rotate(240deg); } }
@media (prefers-reduced-motion: reduce) {
  .dramatic-podium .podium-card { transition: none; }
  .podium-entrance { animation: none; }
  .podium-confetti { display: none; }
}

.podium-finished .podium-entrance { animation: none; }

/* Quiz night: warm paper, bright game pieces, and a little button bounce. */
:root { background: #f8f5ed; color: #173e36; }
body { background: radial-gradient(ellipse at 90% 0, #f4deb650, transparent 540px); }
button, input, select { touch-action: manipulation; }
input, select { font-size: 16px; border-radius: 10px; }
select { font-size: 14px; }
input::placeholder { color: #6b796e; }
.eyebrow, .difficulty, .share-label, .game-summary p, .answer-status, .waiting,
.player-index, .rank-row small, .intro-tags, .how p, .how > span, footer { color: #5d705f; }
.panel, .question-card { border-radius: 20px; border-color: #dce2d4; box-shadow: 0 5px 0 #e8e6d9; }
.primary, .secondary { min-height: 50px; border-radius: 12px; box-shadow: 0 4px 0 #0b3229; }
.primary:active:enabled, .secondary:active:enabled { transform: translateY(3px); box-shadow: 0 1px 0 #0b3229; }
.secondary { background: #fff9e9; border-color: #b7c5aa; box-shadow: 0 4px 0 #d6d9c5; }
.primary:disabled, .secondary:disabled { opacity: 1; background: #e2e6dd; color: #586b5e; border-color: #d3dbce; box-shadow: none; }
.step { flex-shrink: 0; background: #f5d47b; color: #553d17; border: 0; font-size: 19px; font-weight: 600; }
.pill { color: #476246; border-radius: 20px; background: #edf2e5; }
.intro { position: relative; padding: 10px 0 8px; isolation: isolate; }
.intro h1 { font-size: clamp(42px, 5vw, 65px); }
.intro h1 em { color: #ad4d35; }
.intro p { color: #536b5c; }
.intro-tags { gap: 12px; }
.intro-tags span { border: 1px solid #dce0d0; border-radius: 20px; padding: 6px 10px; background: #fffdf5; }
.home-shortcuts { display: flex; gap: 12px; margin: 24px 0 10px; flex-wrap: wrap; }
.home-shortcuts .primary { gap: 20px; }
.quiz-art { position: absolute; width: 310px; height: 280px; right: 30px; top: 18px; z-index: -1; }
.art-orbit { position: absolute; inset: 12px; border: 1px dashed #c3cab3; border-radius: 50%; transform: rotate(-20deg); }
.art-card { position: absolute; width: 112px; height: 104px; border: 4px solid #fffaf0; border-radius: 23px; box-shadow: 0 7px 0 #173e361a; display: grid; place-items: center; }
.art-card i { width: 28px; height: 28px; background: #fffaf0; }
.art-coral { background: #bb493d; top: 14px; left: 30px; transform: rotate(-14deg); }
.art-coral i { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.art-blue { background: #2a678a; top: 50px; right: 10px; transform: rotate(13deg); }
.art-blue i { transform: rotate(45deg); }
.art-gold { background: #eac365; bottom: 27px; left: 13px; transform: rotate(8deg); }
.art-gold i { background: #654b1b; border-radius: 50%; }
.art-green { background: #2e7056; right: 36px; bottom: 0; transform: rotate(-9deg); }
.art-spark { position: absolute; right: 13px; top: -15px; color: #b35435; font: 48px Georgia, serif; }
.host-panel, .join-panel { scroll-margin-top: 24px; }
.host-panel { border-top: 5px solid #2e7056; }
.join-panel { border-top: 5px solid #d1a348; background: #f5efd9; }
.join-panel > p { color: #5c6f5d; }
.quiz-customize { border-top: 1px solid #e0e5d8; border-bottom: 1px solid #e0e5d8; margin: 6px 0 20px; }
.quiz-customize > summary { padding: 16px 4px; cursor: pointer; font-size: 14px; font-weight: 700; }
.quiz-customize > summary span { display: block; margin: 7px 0 0 19px; font-size: 12px; font-weight: 400; color: #5d705f; }
.quiz-customize > p { font-size: 13px; line-height: 1.6; margin-bottom: 16px; }
.setup-note { font-size: 12px; line-height: 1.6; color: #5d705f; margin: 0 0 14px; }
.chip { min-height: 36px; border-radius: 9px; color: #52664b; }
.chip.selected { background: #e7efdb; border-color: #9aaf81; }
.chip.selected:before { background: #4e753b; }
.type-choices label { min-height: 38px; }
.lobby-title { margin-bottom: 20px; }
.lobby-title p { color: #586e5f; }
.lobby-launch { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; padding: 16px 20px; background: #eaf0df; border: 1px solid #c8d6b7; border-radius: 16px; }
.lobby-launch .primary { width: auto; min-width: 180px; }
.lobby-live { font-size: 14px; line-height: 1.5; font-weight: 600; }
.lobby-live:before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3f7b48; margin-right: 10px; }
.lobby-launch .waiting { padding: 0; }
.invitation { background: #f7efd5; padding: 28px; }
.big-code { font-variant-numeric: tabular-nums; font-weight: 700; letter-spacing: 10px; font-size: 64px; }
.game-summary { padding-top: 16px; color: #405a49; }
.players { margin: 0; }
.player { animation: player-arrives .35s ease-out both; min-width: 0; }
.player strong { min-width: 0; overflow-wrap: anywhere; }
.player-you { font-size: 10px; font-weight: 400; color: #526b51; }
.avatar { flex-shrink: 0; background: #e9eddb; font-family: system-ui, sans-serif; font-weight: 750; font-size: 14px; border-radius: 13px; color: #3b5838; }
.player:nth-child(4n+2) .avatar { background: #f9ddce; color: #8c3a28; transform: rotate(-5deg); }
.player:nth-child(4n+3) .avatar { background: #dceaf3; color: #265b7a; transform: rotate(5deg); }
.player:nth-child(4n) .avatar { background: #f4e3ae; color: #735519; }
.player .remove { min-height: 40px; padding-left: 8px; }
.quiz-progress { display: flex; gap: 5px; margin: -10px 0 20px; }
.quiz-progress i { height: 5px; flex: 1; border-radius: 4px; background: #dfe3d5; }
.quiz-progress .done { background: #789969; }
.quiz-progress .current { background: #b55437; }
.question-meta { min-height: 44px; }
.timer { font-family: ui-sans-serif, system-ui, sans-serif; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.timer.urgent { background: #fbe5dc; color: #a33127; border-radius: 12px; padding: 8px 10px; }
.last-seconds .timer.urgent { animation: clock-beat 1s ease-in-out infinite; }
.time-bar { height: 6px; margin-bottom: 12px; border-radius: 6px; overflow: hidden; }
.time-bar::-webkit-progress-value { background: #4f8056; }
.last-seconds .time-bar::-webkit-progress-value { background: #b94c3c; }
.last-seconds .time-bar::-moz-progress-bar { background: #b94c3c; }
.question-card h1 { font-size: 35px; line-height: 1.25; letter-spacing: -.6px; }
.answer-status { align-items: center; padding: 10px 12px; background: #f1f3e9; border: 1px solid #e2e7d8; border-radius: 10px; min-height: 58px; margin-bottom: 17px; font-size: 12px; }
.answer-status > span { flex-shrink: 0; }
.answer-status strong { text-align: right; max-width: 62%; }
.is-locked .answer-status { background: #e3edda; border-color: #adc39a; }
.lock-confirm { animation: lock-settle .35s ease-out; color: #2c592e; }
.answer { min-height: 104px; border-radius: 14px; border: 2px solid #183e3620; box-shadow: 0 5px 0 #183e3630; padding: 22px 20px; flex-wrap: nowrap; }
.answer-0 { background: #b5473c; }
.answer-1 { background: #28688f; }
.answer-2 { background: #edc35f; color: #49380f; }
.answer-3 { background: #2e7356; }
.answer:active:enabled { transform: translateY(4px); box-shadow: 0 1px 0 #183e3650; }
.answer.chosen { border-color: #173e36; box-shadow: 0 5px 0 #183e3630, 0 0 0 3px #fffdf1 inset; }
.choice-label { background: #fffdf1; color: #193e32; border-radius: 6px; padding: 3px 6px; font-weight: 700; font-size: 10px; opacity: 1; right: 9px; bottom: 5px; }
.is-locked .choice-label:before { content: ""; display: inline-block; width: 6px; height: 9px; border-right: 2px solid; border-bottom: 2px solid; transform: rotate(40deg); margin: 0 7px 1px 2px; }
.answer-count { font-size: 11px; white-space: normal; text-align: right; max-width: 85px; }
.answer.incorrect { opacity: 1; background: #edf0e8; color: #546451; border-color: #dce1d5; box-shadow: 0 3px 0 #dce1d5; }
.answer.correct { border-color: #173e36; box-shadow: 0 5px 0 #183e3630, 0 0 0 3px #fffdf1 inset; }
.rank-number { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border-radius: 8px; background: #f0f0e5; color: #526b45; font-weight: 700; }
.rank-row > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
.rank-row strong { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.rank-row.you { background: #eaf0de; border-left: 3px solid #759951; border-radius: 9px; }
.rank-row.you .rank-number { background: #d8e6c5; }
.round-winner.has-winners { background: #f8edc7; border-color: #dfc577; border-radius: 16px; box-shadow: inset 0 0 0 4px #fff8e5; }
.round-winner .eyebrow, .round-winner p { color: #6f541f; }
.round-winner.no-winners { border-radius: 14px; }
.round-winner h2 { font-size: 32px; }
.bowl-card .question-meta { flex-wrap: wrap; }
.bowl-rules { margin-left: auto; }
.bowl-rules summary { min-width: 40px; min-height: 40px; display: grid; place-items: center; border-color: #a2b494; background: #f2f5eb; }
.bowl-rules[open] { width: 100%; }
.bowl-timer { margin-left: auto; }
.bowl-timer + .bowl-rules { margin-left: 0; }
.tossup-text { line-height: 1.6; min-height: 170px; padding: 4px 0 14px; }
.bowl-credit { font-size: 11px; margin-top: 8px; color: #5b6d60; }
.bowl-credit a { color: #356f79; text-underline-offset: 3px; }
.bowl-status { padding: 14px 16px; border-left: 4px solid #80a264; background: #f0f4e8; border-radius: 0 12px 12px 0; font-size: 14px; min-height: 70px; align-content: center; }
.bowl-status-mine { background: #fcf0cc; border-color: #be8a2b; }
.bowl-clock-copy { font-size: 13px; color: #496350; }
.buzz-button { display: flex; flex-direction: column; justify-content: center; gap: 7px; min-height: 116px; border-radius: 24px; background: #b34635; border-color: #96392b; box-shadow: 0 7px 0 #793124, inset 0 2px 0 #ffffff30; font-size: 32px; letter-spacing: 2px; }
.buzz-button:hover:enabled { background: #c5503e; }
.buzz-button:active:enabled { transform: translateY(6px); box-shadow: 0 1px 0 #793124; }
.buzz-button:disabled { font-size: 18px; letter-spacing: 0; min-height: 116px; }
.buzz-button small { font-size: 12px; letter-spacing: 0; line-height: 1.5; text-align: center; }
.bowl-answer label { font-size: 13px; }
.bowl-answer input { min-height: 54px; }
.prompt-hint { font-size: 14px; line-height: 1.5; min-height: 48px; margin: 0 0 10px; padding: 10px 12px; color: #526e50; border-radius: 10px; background: #f2f5eb; }
.prompt-active { background: #f9e9bb; color: #6c4d16; font-weight: 650; }
.bowl-attempts p { margin: 14px 0; padding: 12px; background: #f0f3e9; border-radius: 10px; font-size: 14px; line-height: 1.6; }
.bowl-help { font-size: 13px; }
.podium-card { border-radius: 20px; background: #f4ecd4; border-color: #e0d2ab; }
.podium-card.position-0 { background: radial-gradient(ellipse at 50% 0, #3f7556, #194b3c); border-color: #194b3c; }
.medal { width: 64px; height: 64px; margin: 0 auto 17px; display: grid; place-items: center; background: #e2c779; color: #614817; border: 4px double #faf0ca; border-radius: 50%; }
.position-0 .medal { color: #614817; font-size: 39px; }
.position-2 .medal { background: #dec3a1; }
.position-1 .medal { background: #e7e6dc; }
.invite-page { border-top: 5px solid #d1a348; }
@keyframes player-arrives { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes lock-settle { from { opacity: .4; } to { opacity: 1; } }
@keyframes clock-beat { 50% { box-shadow: 0 0 0 4px #b94c3c18; } }
@media (max-width: 1000px) { .quiz-art { right: 0; transform: scale(.8); transform-origin: right center; } }
@media (max-width: 850px) { .quiz-art { display: none; } }
@media (max-width: 700px) {
  main { padding: 26px 16px 42px; }
  header { padding: 17px 18px; }
  .intro { margin-bottom: 25px; padding-top: 0; }
  .intro h1 { font-size: 42px; }
  .intro p { font-size: 14px; }
  .intro-tags { gap: 6px; font-size: 9px; }
  .intro-tags span { padding: 5px 7px; }
  .intro-tags span:before { margin-right: 4px; }
  .home-shortcuts { gap: 9px; margin-top: 20px; }
  .home-shortcuts button { flex: 1; font-size: 12px; padding: 12px 9px; gap: 8px; }
  .panel { padding: 22px 20px; }
  .home-grid { gap: 22px; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .settings-grid label:nth-child(3), .settings-grid label:nth-child(4) { grid-column: auto; }
  .chip { font-size: 11px; }
  .game-top { margin-bottom: 22px; }
  .lobby-title h1 { font-size: 36px; }
  .lobby-launch { display: grid; gap: 12px; padding: 15px 17px; }
  .lobby-launch .primary { width: 100%; }
  .lobby-live { font-size: 13px; }
  .invitation { padding: 24px 22px; }
  .big-code { font-size: 54px; margin: 12px 0 18px; }
  .share-label { margin: 20px 0 16px; }
  .question-card { padding: 18px 15px; border-radius: 18px; }
  .question-card h1 { font-size: 25px; line-height: 1.25; letter-spacing: -.4px; margin: 14px 0 20px; }
  .question-meta { margin-bottom: 12px; }
  .timer { font-size: 29px; min-width: 55px; justify-content: flex-end; }
  .answer-status { font-size: 11px; gap: 8px; min-height: 58px; margin-bottom: 16px; }
  .answers { gap: 13px; }
  .answer { min-height: 72px; padding: 17px 13px 22px; font-size: 15px; gap: 13px; }
  .answer-count { font-size: 10px; max-width: 68px; }
  .choice-label { font-size: 9px; padding: 2px 5px; bottom: 3px; }
  .round-winner h2 { font-size: 28px; }
  .scoreboard { padding: 22px 17px; }
  .scoreboard .section-heading { gap: 8px; }
  .scoreboard h2 { font-size: 22px; }
  .rank-row { gap: 8px; }
  .tossup-text { font-size: 19px; min-height: 165px; }
  .bowl-status { margin: 16px 0; }
  .buzz-button { min-height: 110px; }
  .bowl-help { text-align: left; }
  .medal { width: 48px; height: 48px; font-size: 27px; }
  .position-0 .medal { font-size: 31px; }
  .final-title h1 { font-size: 36px; }
  .podium-suspense { font-size: 18px; }
  .podium-card .eyebrow { letter-spacing: .7px; font-size: 8px; }
  .podium-card { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .primary:active:enabled, .secondary:active:enabled, .answer:active:enabled { transform: none; }
}
/* Reserve the clock's urgent padding before the final seconds. */
.question-meta { min-height: 50px; }
.timer { padding: 8px 10px; }
.score-value { display: inline-block; animation: score-arrives .45s ease-out; }
@keyframes score-arrives { from { opacity: .4; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
/* Native controls stay at iPhone's comfortable text size. */
@media (max-width: 700px) {
  input, select { font-size: 16px; }
}
