@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Oswald:wght@400;500;600;700&display=swap');
:root {
  --bg: #0d161c;
  --paper: #f5ebd4;
  --ink: #16252b;
  --mint: #d6e3d9;
  --muted: #a7b0b0;
  --gold: #eabf6d;
  --rust: #e47a4e;
  --green: #7eaf93;
  --red: #dc6d67;
  --border: #415053;
  --panel: #17272e;
  --inset: #21343a;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  color: var(--paper);
  font-family:
    'DM Sans',
    system-ui,
    -apple-system,
    sans-serif;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  padding: 24px 16px 28px;
  overflow-x: hidden;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
button:disabled {
  opacity: 0.47;
  cursor: not-allowed;
}
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 15% 8%, #30413b 0, transparent 42%),
    radial-gradient(ellipse at 92% 82%, #263944 0, transparent 40%), var(--bg);
  overflow: hidden;
}
.disc {
  position: absolute;
  width: 750px;
  height: 750px;
  top: -330px;
  right: -280px;
  opacity: 0.1;
  border-radius: 50%;
  border: 3px solid #d0b17f;
  background: repeating-radial-gradient(
    circle,
    #d0b17f 0px,
    #d0b17f 1px,
    transparent 2px,
    transparent 7px
  );
}
.app {
  max-width: 760px;
  margin: 0 auto;
  min-height: 88vh;
}
.masthead {
  text-align: center;
  padding-top: 17px;
  margin-bottom: 24px;
}
.kicker {
  font-family: Oswald, Impact, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.31em;
  color: var(--gold);
  text-transform: uppercase;
}
.brand {
  font:
    700 clamp(44px, 10.5vw, 86px) / 0.98 Oswald,
    Impact,
    sans-serif;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  margin: 10px 0 0;
  color: var(--paper);
  text-shadow: 3px 4px 0 #3b4d4d;
}
.brand span {
  color: var(--rust);
}
.sub {
  font-size: 13px;
  color: #b1bfb7;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 13px;
}
.stars {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 1em;
  margin-top: 18px;
  padding-left: 1em;
}
.panel {
  background: linear-gradient(148deg, #1c3036, #16252c 84%);
  border: 1px solid #4a5955;
  border-radius: 20px;
  padding: clamp(20px, 5.5vw, 38px);
  box-shadow:
    0 18px 65px #030d11ad,
    inset 0 0 0 1px #ffffff09;
}
.panel + .panel {
  margin-top: 16px;
}
.section-title {
  font:
    700 31px/1.1 Oswald,
    Impact,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  margin: 0 0 12px;
}
.section-sub {
  font-size: 14px;
  line-height: 1.55;
  color: #bbcbc3;
  margin: 0 0 22px;
}
.eyebrow {
  font:
    600 12px/1.4 Oswald,
    sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 9px;
}
.actions {
  display: grid;
  gap: 12px;
}
.action {
  display: flex;
  align-items: center;
  text-align: left;
  justify-content: space-between;
  width: 100%;
  border: 1px solid #53665e;
  border-radius: 12px;
  padding: 20px;
  color: var(--paper);
  background: #254039;
  transition:
    transform 0.15s,
    background 0.15s;
}
.action:hover {
  transform: translateY(-2px);
  background: #315146;
}
.action:nth-child(2) {
  background: #3e342d;
  border-color: #6b5340;
}
.action:nth-child(2):hover {
  background: #4b3c31;
}
.action:nth-child(3) {
  background: #26343b;
  border-color: #50646b;
}
.action:nth-child(3):hover {
  background: #354650;
}
/* "Back to room" on the menu: sits above the regular actions while a room is still open. */
.action.resume {
  margin-bottom: 12px;
  background: #4a3f22;
  border-color: var(--gold);
}
.action.resume:hover {
  background: #5a4c28;
}
/* Host-only, under Start Game in the lobby. Turns red while waiting for the second tap. */
.cancel-room {
  display: block;
  margin: 14px auto 0;
  border: 0;
  background: transparent;
  color: #a7b6b0;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
}
.cancel-room:hover {
  color: var(--paper);
}
.cancel-room.confirming {
  color: var(--red);
}
.action b {
  display: block;
  font:
    700 22px Oswald,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.action small {
  display: block;
  font-size: 12px;
  color: #c8d0c3;
  margin-top: 4px;
}
.action .arrow {
  font: 700 28px Oswald;
  color: var(--gold);
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 50px;
  padding: 12px 20px;
  border: 1px solid #eec98b;
  border-radius: 10px;
  background: var(--gold);
  color: var(--ink);
  font:
    700 16px Oswald,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.button:hover {
  filter: brightness(1.08);
}
.button.secondary {
  color: var(--paper);
  border-color: #61706b;
  background: #2a3a3e;
}
.button.ghost {
  color: var(--gold);
  background: transparent;
  border-color: #7d765a;
}
.button.small {
  min-height: 38px;
  padding: 7px 14px;
  font-size: 13px;
}
.button.block {
  width: 100%;
}
.back {
  /* Several screens lay out as a flex column; keep the link at the card's left edge on all of them. */
  align-self: flex-start;
  border: 0;
  background: transparent;
  color: #b8c5bc;
  padding: 10px 0 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.back:hover {
  color: var(--gold);
}
.field {
  display: block;
  margin-bottom: 16px;
}
.field span {
  display: block;
  font:
    500 12px Oswald,
    sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #bfcbbf;
  margin-bottom: 7px;
}
.textinput,
.select {
  width: 100%;
  min-height: 54px;
  background: #0e1f25;
  color: var(--paper);
  border: 1px solid #53665f;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 16px;
}
.textinput::placeholder {
  color: #84948c;
}
.select {
  appearance: none;
}
.muted {
  font-size: 13px;
  line-height: 1.5;
  color: #a7b6b0;
}
.formrow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.linklike {
  background: none;
  border: none;
  color: var(--gold);
  font:
    700 14px Oswald,
    sans-serif;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
}
.count {
  font:
    600 12px Oswald,
    sans-serif;
  letter-spacing: 0.15em;
  color: #c2cdc0;
  text-transform: uppercase;
}
.tag {
  display: inline-block;
  border: 1px solid #9d8862;
  color: var(--gold);
  background: #59482c35;
  border-radius: 5px;
  padding: 6px 9px;
  font:
    600 11px Oswald,
    sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.timer {
  font:
    600 22px Oswald,
    sans-serif;
  color: var(--paper);
  font-variant-numeric: tabular-nums;
}
.timer.warn {
  color: var(--rust);
}
.track {
  height: 5px;
  background: #45504b;
  border-radius: 20px;
  overflow: hidden;
  margin: 10px 0 27px;
}
.track div {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
  border-radius: 20px;
  transition: width 0.2s linear;
}
.question {
  font:
    600 clamp(27px, 5.8vw, 43px) / 1.19 Oswald,
    Impact,
    sans-serif;
  letter-spacing: 0.01em;
  margin: 13px 0 26px;
  min-height: 93px;
}
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}
.option {
  min-height: 86px;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  color: var(--paper);
  background: #25383d;
  border: 1px solid #566664;
  border-radius: 10px;
  padding: 15px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.32;
  transition:
    background 0.12s,
    border 0.12s;
}
.option .letter {
  flex: none;
  color: var(--gold);
  font:
    700 16px Oswald,
    sans-serif;
}
/* Touchscreens keep :hover on whatever was last tapped, which would make the button in the same
   spot on the next question look pre-selected. Only real pointers get the hover style. */
@media (hover: hover) {
  .option:hover:not(:disabled) {
    background: #344e4d;
    border-color: var(--gold);
  }
}
.option:disabled {
  opacity: 0.85;
}
.option.selected {
  border-color: var(--gold);
  background: #544e39;
}
.option.good {
  border-color: #87c498;
  background: #2d5344;
}
.option.bad {
  border-color: #dd7871;
  background: #5a3435;
}
.answer-note {
  background: #14272b;
  border: 1px solid #3b5b51;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 17px 0;
  color: #d7e0d2;
  font-size: 14px;
  line-height: 1.55;
}
.answer-note strong {
  display: block;
  color: var(--gold);
  font:
    600 19px Oswald,
    sans-serif;
  margin-bottom: 7px;
  text-transform: uppercase;
}
.answer-note .gain {
  color: var(--green);
}
.wait {
  text-align: center;
  padding: 15px;
  color: #c1cbbf;
  font-weight: 600;
  font-size: 14px;
}
.scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.score {
  background: #122329;
  border: 1px solid #43554f;
  border-radius: 9px;
  padding: 11px;
}
.score.you {
  border-color: #a8925e;
}
.score .name {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: #d0d6cb;
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.score b {
  display: block;
  font:
    600 26px Oswald,
    sans-serif;
  color: var(--gold);
  margin-top: 1px;
}
.score small {
  color: #92a297;
  font-size: 11px;
}
.score.right {
  border-color: #87c498;
  background: #2d5344;
}
.score.wrong {
  border-color: #dd7871;
  background: #5a3435;
}
.score .pick {
  display: block;
  margin-top: 3px;
  font:
    600 11px Oswald,
    sans-serif;
  letter-spacing: 0.04em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.score.right .pick {
  color: #a9dcb6;
}
.score.wrong .pick {
  color: #f0a29c;
}
.answered-summary.right {
  border-color: #87c498;
  background: #2d5344;
}
.answered-summary.wrong {
  border-color: #dd7871;
  background: #5a3435;
}
.answered-summary.right > span:last-child,
.answer-note.right .answer-result {
  color: #a9dcb6;
}
.answered-summary.wrong > span:last-child,
.answer-note.wrong .answer-result {
  color: #f0a29c;
}
.answer-note.wrong {
  border-color: #8a4a48;
}
.roomcode {
  font:
    700 56px Oswald,
    sans-serif;
  letter-spacing: 0.13em;
  color: var(--gold);
  text-align: center;
  padding: 10px 0 16px;
}
.roomline {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.joinlabel {
  font:
    600 12px Oswald,
    sans-serif;
  color: #aeb9b0;
  text-align: center;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.invite {
  background: #0f2025;
  border: 1px dashed #798475;
  border-radius: 13px;
  padding: 18px 12px;
  margin: 17px 0;
  text-align: center;
}
.players {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 16px 0 22px;
}
.chip {
  border: 1px solid #62766c;
  border-radius: 999px;
  background: #2c443d;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
}
.chip.new {
  border-color: var(--gold);
  background: #59472d;
  animation: chip-pop 0.5s ease-out;
}
.chip.new:after {
  content: ' joined!';
  color: var(--gold);
}
@keyframes chip-pop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  70% {
    transform: scale(1.12);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
.chip.host:before {
  content: '★ ';
  color: var(--gold);
}
.results {
  text-align: center;
}
.trophy {
  color: var(--gold);
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  line-height: 1;
}
.trophy svg {
  display: block;
  width: 64px;
  height: 64px;
}
.podium {
  display: grid;
  gap: 9px;
  text-align: left;
  margin: 20px 0;
}
.results .button + .button {
  margin-top: 10px;
}
.tip-link {
  display: inline-block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.tip-link:hover {
  text-decoration: underline;
}
.podiumrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: 10px;
  background: #1f3438;
  border: 1px solid #4c6259;
}
.podiumrow:first-child {
  background: #59472d4d;
  border-color: #a08a5a;
}
.podiumrow span {
  font-weight: 700;
}
.podiumrow b {
  font:
    700 22px Oswald,
    sans-serif;
  color: var(--gold);
}
.notice {
  color: #e6aa91;
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.4;
  min-height: 16px;
}
.footnote {
  text-align: center;
  margin-top: 32px;
  color: #718580;
  font:
    500 10px Oswald,
    sans-serif;
  letter-spacing: 0.18em;
}
.labelbreak {
  border-top: 1px solid #4a5b55;
  margin: 19px 0;
}
.spinner {
  width: 14px;
  height: 14px;
  display: inline-block;
  border: 2px solid #87a19b;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  vertical-align: middle;
  margin-right: 7px;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 520px) {
  body {
    padding: 15px 12px 24px;
  }
  .app {
    min-height: 80vh;
  }
  .masthead {
    padding-top: 12px;
    margin-bottom: 20px;
  }
  .brand {
    font-size: clamp(43px, 11.5vw, 65px);
  }
  .panel {
    border-radius: 16px;
    padding: 19px;
  }
  .action {
    padding: 17px;
  }
  .action b {
    font-size: 21px;
  }
  .question {
    font-size: 29px;
    min-height: auto;
  }
  .option {
    font-size: 14px;
    min-height: 79px;
    padding: 12px;
    gap: 7px;
  }
  .roomcode {
    font-size: 48px;
  }
  .formrow {
    grid-template-columns: 1fr;
  }
  .footnote {
    line-height: 1.8;
  }
}
@media (max-width: 350px) {
  .options {
    grid-template-columns: 1fr;
  }
  .option {
    min-height: 57px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
  }
}

/* Keep answer feedback musical: the lyric replaces the old prose explanation. */
.answer-note .answer-result {
  font:
    700 12px Oswald,
    sans-serif;
  letter-spacing: 0.15em;
  color: var(--mint);
  margin-bottom: 4px;
}
.answer-note .lyric-label {
  font:
    600 11px Oswald,
    sans-serif;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin: 15px 0 5px;
}
.answer-note .lyric-quote {
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 14px;
  margin: 0;
  font:
    italic 500 clamp(18px, 4vw, 23px) / 1.35 Georgia,
    serif;
  color: var(--paper);
}
.answer-note .lyric-credit {
  margin: 9px 0 12px 17px;
  font-size: 12px;
  color: #b4c2b7;
}
.answer-note .gain {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #3b5b51;
  padding-top: 10px;
  font-weight: 700;
}
.report-link {
  background: none;
  border: 0;
  padding: 2px 0;
  color: #a7b6b0;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.report-link:hover {
  color: var(--gold);
}
.report-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(6, 12, 14, 0.72);
}
.report-dialog {
  width: min(460px, 100%);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  background: #16262b;
  border: 1px solid #43554f;
  border-radius: 14px;
  padding: 18px 20px;
  color: var(--paper);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.report-dialog h3 {
  font:
    700 22px/1.15 Oswald,
    sans-serif;
  margin: 4px 0 4px;
}
.report-song {
  margin: 0 0 12px;
  color: #c8d5c9;
  font-size: 13px;
}
.report-reasons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 12px;
}
.report-reason {
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid #43554f;
  background: #1d3035;
  color: var(--paper);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}
.report-reason[aria-pressed='true'] {
  border-color: var(--gold);
  background: #544e39;
}
.report-dialog .field {
  margin-bottom: 6px;
}
.report-note {
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
  min-height: 64px;
}
.report-status {
  min-height: 18px;
  margin: 4px 0 10px;
  font-size: 12px;
  color: #a7b6b0;
}
.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.shelf-link {
  text-align: center;
  margin: 18px 0;
}
.shelf-link a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 700;
  font-size: 13px;
}

/* 2026-10: question + reveal share a compact single-screen layout.
   On short/zoomed screens only the panel scrolls, not the whole page. */
body.in-round {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 12px 9px;
  overflow: hidden;
}
body.in-round .app {
  width: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  max-height: 100%;
}
body.in-round .masthead {
  padding-top: 1px;
  margin-bottom: 5px;
  flex: none;
}
body.in-round .brand {
  font-size: clamp(25px, 4.6vh, 43px);
  line-height: 0.92;
  margin: 2px 0 0;
  text-shadow: 2px 2px 0 #3b4d4d;
}
body.in-round .kicker {
  font-size: 9px;
  letter-spacing: 0.16em;
}
body.in-round .sub {
  font-size: 10px;
  letter-spacing: 0.08em;
  margin-top: 5px;
}
body.in-round .stars {
  font-size: 10px;
  letter-spacing: 0.45em;
  padding: 0;
  margin-top: 4px;
  display: flex;
  justify-content: center;
}
body.in-round .back {
  flex: none;
  align-self: flex-start;
  padding: 4px 0 7px;
  font-size: 12px;
}
body.in-round .round-panel {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding: clamp(12px, 2.2vh, 20px);
}
body.in-round .topline {
  margin: 0 0 4px;
}
body.in-round .track {
  margin: 5px 0 11px;
}
body.in-round .tag {
  font-size: 10px;
  padding: 4px 7px;
}
body.in-round .question {
  font-size: clamp(22px, 3.3vh, 32px);
  line-height: 1.12;
  margin: 7px 0 13px;
  min-height: 0;
}
body.in-round .option {
  min-height: clamp(52px, 8.5vh, 69px);
  font-size: clamp(12px, 1.8vh, 15px);
  padding: 9px 11px;
}
body.in-round .options {
  gap: 8px;
}
body.in-round .answer-note {
  padding: 11px 13px;
  margin: 9px 0 6px;
  font-size: 12px;
  line-height: 1.35;
}
body.in-round .answer-note strong {
  font-size: 17px;
  margin-bottom: 3px;
}
body.in-round .answer-note .lyric-label {
  font-size: 9px;
  margin: 8px 0 3px;
}
body.in-round .answer-note .lyric-quote {
  font-size: clamp(15px, 2.3vh, 20px);
  padding: 2px 0 2px 11px;
}
body.in-round .answer-note .lyric-credit {
  font-size: 11px;
  margin: 6px 0 7px 14px;
}
body.in-round .answer-note .gain {
  padding-top: 5px;
}
body.in-round .scoreboard {
  margin: 7px 0 0;
  gap: 7px;
}
body.in-round .score {
  padding: 6px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: space-between;
}
body.in-round .score .name {
  flex: 1;
  min-width: 0;
}
body.in-round .score b {
  font-size: 20px;
  margin: 0;
}
body.in-round .score small {
  font-size: 10px;
}
body.in-round .wait {
  padding: 6px;
  font-size: 12px;
}
body.in-round .button {
  min-height: 38px;
  padding: 7px 12px;
  font-size: 14px;
}
body.in-round .notice {
  min-height: 0;
  margin: 2px 0;
}
body.in-round .footnote {
  display: none;
}
.answered-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid #596f64;
  background: #21363a;
  border-radius: 8px;
  color: #c8d5c9;
  font:
    600 11px Oswald,
    sans-serif;
  letter-spacing: 0.04em;
}
.answered-summary b {
  font-weight: 700;
  color: var(--paper);
  letter-spacing: 0;
}
.answered-summary > span:last-child {
  white-space: nowrap;
  color: var(--gold);
}
.full-lyrics {
  display: inline-block;
  margin-left: 12px;
  color: var(--gold);
  font-size: 11px;
  text-underline-offset: 3px;
}
@media (max-width: 520px) {
  body.in-round {
    padding: 4px 9px 5px;
  }
  body.in-round .brand {
    font-size: clamp(23px, 4.5vh, 37px);
  }
  body.in-round .sub {
    font-size: 9px;
  }
  body.in-round .kicker {
    font-size: 8px;
  }
  body.in-round .question {
    font-size: clamp(21px, 3.2vh, 28px);
  }
  body.in-round .round-panel {
    padding: 12px;
  }
  body.in-round .option {
    min-height: 52px;
    padding: 7px 9px;
    font-size: 12px;
  }
  body.in-round .score .name {
    font-size: 11px;
  }
  body.in-round .score small {
    display: none;
  }
}
@media (max-height: 650px) {
  body.in-round .masthead {
    display: none;
  }
  body.in-round .question {
    font-size: 21px;
    margin: 6px 0 8px;
  }
  body.in-round .round-panel {
    padding: 11px;
  }
  body.in-round .option {
    min-height: 44px;
  }
}

/* Desktop-first viewport fitting. Neither the main page nor its question card should scroll
   at normal browser zoom on typical laptop/desktop viewports. Mobile may scroll when needed. */
@media (min-width: 760px) and (min-height: 590px) {
  body.in-round,
  body.in-results {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: clamp(5px, 0.9vh, 10px) 14px 8px;
  }
  body.in-round .app,
  body.in-results .app {
    max-width: 800px;
    width: 100%;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    /* Size the card to its content instead of stretching it to fill the window. Anchored near the
       top (not centered) so it doesn't jump when the taller answer reveal appears. */
    justify-content: flex-start;
    padding-top: clamp(0px, 6vh, 64px);
  }
  body.in-round .masthead,
  body.in-results .masthead {
    flex: none;
    margin: 0 0 clamp(3px, 0.55vh, 9px);
    padding: 0;
  }
  body.in-round .brand,
  body.in-results .brand {
    font-size: clamp(26px, 5.1vh, 49px);
    line-height: 0.91;
    margin: 3px 0 0;
  }
  body.in-round .sub,
  body.in-results .sub {
    margin-top: 4px;
    font-size: 10px;
  }
  body.in-round .kicker,
  body.in-results .kicker {
    font-size: 9px;
  }
  body.in-round .stars,
  body.in-results .stars {
    font-size: 10px;
    margin-top: 3px;
    padding: 0;
    letter-spacing: 0.45em;
    display: flex;
    justify-content: center;
  }
  body.in-round .back,
  body.in-results .back {
    flex: none;
    /* Sit at the card's left edge like every other screen, not stretched and centered. */
    align-self: flex-start;
    padding: 4px 0 7px;
    font-size: 12px;
  }
  body.in-round .round-panel {
    flex: 0 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: clamp(12px, 2vh, 22px) clamp(15px, 2vw, 25px);
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.2vh, 13px);
  }
  body.in-round .topline {
    margin: 0;
  }
  body.in-round .track {
    margin: 0 0 3px;
    height: 4px;
  }
  body.in-round .question {
    font-size: clamp(21px, 3.3vh, 36px);
    line-height: 1.1;
    margin: 2px 0;
    min-height: 0;
  }
  body.in-round .tag {
    align-self: flex-start;
    padding: 3px 7px;
  }
  body.in-round .options {
    gap: clamp(4px, 0.9vh, 9px);
  }
  body.in-round .option {
    min-height: clamp(41px, 7.3vh, 72px);
    padding: 6px 10px;
  }
  body.in-round .answer-note {
    margin: 2px 0;
    padding: clamp(7px, 0.9vh, 12px) 12px;
    line-height: 1.24;
  }
  body.in-round .answer-note .lyric-label {
    margin: 4px 0 2px;
  }
  body.in-round .answer-note .lyric-credit {
    margin: 3px 0 5px 14px;
  }
  body.in-round .answer-note .gain {
    padding-top: 3px;
  }
  body.in-round .scoreboard {
    margin: 1px 0 0;
    gap: 5px;
  }
  body.in-round .score {
    padding: 4px 10px;
  }
  body.in-round .score b {
    font-size: 19px;
  }
  body.in-round .answered-summary {
    padding: 5px 9px;
  }
  body.in-round .wait {
    padding: 4px;
  }
  body.in-round .button {
    min-height: 36px;
    padding: 5px 12px;
  }
  body.in-round .notice {
    display: none;
  }
  body.in-results {
    display: flex;
    flex-direction: column;
  }
  body.in-results .results {
    flex: 0 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: clamp(11px, 2vh, 23px) clamp(15px, 3vw, 30px);
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.2vh, 13px);
  }
  body.in-results .results .eyebrow {
    margin: 0;
  }
  body.in-results .results .trophy {
    width: clamp(28px, 5vh, 50px);
    height: clamp(28px, 5vh, 50px);
  }
  body.in-results .results .trophy svg {
    width: 100%;
    height: 100%;
  }
  body.in-results .section-title {
    font-size: clamp(24px, 4vh, 32px);
    margin: 0;
  }
  body.in-results .section-sub {
    margin: 0 !important;
  }
  body.in-results .podium {
    margin: 0;
    gap: 6px;
  }
  body.in-results .podiumrow {
    padding: clamp(5px, 0.8vh, 10px) 13px;
  }
  body.in-results .button {
    min-height: 37px;
    padding: 7px 14px;
  }
  body.in-results .results .button + .button {
    margin-top: 0;
  }
  body.in-results .results > .muted {
    margin: 0;
  }
  body.in-results .results > .notice:empty {
    display: none;
  }
  body.in-results .footnote {
    display: none;
  }
}
/* Tight laptops: preserve fully-visible controls instead of hiding them below a scroll region. */
@media (min-width: 760px) and (max-height: 700px) {
  body.in-round .masthead,
  body.in-results .masthead {
    margin-bottom: 2px;
  }
  body.in-round .brand,
  body.in-results .brand {
    font-size: clamp(25px, 4vh, 35px);
  }
  body.in-round .sub,
  body.in-results .sub {
    display: none;
  }
  body.in-round .stars,
  body.in-results .stars {
    margin-top: 1px;
  }
  body.in-round .question {
    font-size: clamp(19px, 3vh, 28px);
  }
  body.in-round .answer-note .lyric-quote {
    font-size: 17px;
  }
  body.in-round .option {
    min-height: 39px;
  }
}
/* Mobile: prioritize legible answer targets; allow normal scrolling on cramped screens. */
@media (max-width: 759px) {
  body.in-round {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    display: block;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 7px 11px 14px;
  }
  body.in-round .app {
    max-height: none;
    min-height: 0;
    display: block;
  }
  body.in-round .round-panel {
    overflow: visible;
    max-height: none;
    padding: clamp(13px, 3vw, 20px);
  }
  body.in-round .masthead {
    margin-bottom: 10px;
  }
  body.in-round .brand {
    font-size: clamp(30px, 8vw, 45px);
  }
  body.in-round .question {
    font-size: clamp(24px, 5.6vw, 33px);
    line-height: 1.16;
    margin: 12px 0 16px;
  }
  body.in-round .option {
    min-height: 65px;
    font-size: 14px;
  }
  body.in-round .answer-note .lyric-quote {
    font-size: clamp(18px, 4.5vw, 24px);
  }
  body.in-round .answer-note {
    padding: 14px;
  }
}
@media (max-width: 425px) {
  body.in-round .options {
    grid-template-columns: 1fr;
  }
  body.in-round .option {
    min-height: 51px;
  }
}
/* Hall of Fame */
.leaderboard-panel .section-title {
  /* One line on any phone: shrink with the screen instead of wrapping. */
  font-size: clamp(18px, calc((100vw - 72px) / 11.6), 31px);
  white-space: nowrap;
}
.board-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.board-tabs {
  display: flex;
  flex: 3 1 260px;
  border: 1px solid #566861;
  border-radius: 9px;
  overflow: hidden;
}
.board-tabs + .board-tabs {
  flex: 2 1 180px;
}
.board-tabs button {
  flex: 1;
  border: 0;
  border-right: 1px solid #566861;
  padding: 7px 6px;
  background: #17282e;
  color: var(--paper);
  font:
    600 13px Oswald,
    sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.board-tabs button:last-child {
  border-right: 0;
}
.board-tabs button.active {
  background: var(--gold);
  color: var(--ink);
}
.board-stats {
  display: flex;
  gap: 20px;
  margin: 14px 0 17px;
  color: #b9c9bf;
  font-size: 13px;
}
.board-stats b {
  color: var(--gold);
  font:
    700 24px Oswald,
    sans-serif;
  margin-right: 4px;
}
.leader-rows {
  display: grid;
  gap: 7px;
}
.leader-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #405950;
  background: #1e3338;
  border-radius: 10px;
}
.leader-row:first-child {
  background: #59472d55;
  border-color: #b69553;
}
.leader-rank {
  font:
    700 20px Oswald,
    sans-serif;
  color: var(--gold);
  width: 24px;
}
.leader-person {
  flex: 1;
  min-width: 0;
}
.leader-person b {
  display: block;
  overflow-wrap: anywhere;
}
.leader-person small {
  display: block;
  color: #a9b9af;
  font-size: 11px;
}
.leader-row > strong {
  font:
    700 25px Oswald,
    sans-serif;
  color: var(--gold);
}
@media (min-width: 760px) and (min-height: 590px) {
  body.in-menu,
  body.in-setup,
  body.in-lobby {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    padding: clamp(8px, 1.3vh, 16px) 14px;
  }
  body.in-menu .app,
  body.in-setup .app,
  body.in-lobby .app {
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 760px;
    justify-content: space-around;
  }
  body.in-menu .masthead,
  body.in-setup .masthead,
  body.in-lobby .masthead {
    margin: 0 0 8px;
    padding: 0;
  }
  body.in-menu .brand,
  body.in-setup .brand,
  body.in-lobby .brand {
    font-size: clamp(34px, 5.4vh, 86px);
    margin: 4px 0 0;
    line-height: 0.94;
  }
  body.in-menu .sub,
  body.in-setup .sub,
  body.in-lobby .sub {
    margin-top: 5px;
    font-size: 10px;
  }
  body.in-menu .stars,
  body.in-setup .stars,
  body.in-lobby .stars {
    margin-top: 4px;
    letter-spacing: 0.55em;
  }
  body.in-menu .panel,
  body.in-setup .panel,
  body.in-lobby .panel {
    padding: clamp(14px, 2.4vh, 27px);
  }
  body.in-menu .section-sub,
  body.in-setup .section-sub,
  body.in-lobby .section-sub {
    margin-bottom: 10px;
  }
  body.in-menu .action {
    padding: clamp(10px, 1.3vh, 16px);
  }
  body.in-menu .action b {
    font-size: clamp(18px, 3vh, 23px);
  }
  body.in-menu .action small {
    font-size: 12px;
  }
  body.in-menu .shelf-link {
    margin: 5px 0;
  }
  body.in-setup .back,
  body.in-lobby .back {
    padding: 4px 0 5px;
  }
  body.in-setup .field {
    margin-bottom: 9px;
  }
  body.in-setup .textinput,
  body.in-setup .select {
    min-height: 41px;
    padding: 9px;
  }
  body.in-lobby .invite {
    margin: 7px 0;
    padding: 9px;
  }
  body.in-lobby .roomcode {
    font-size: 46px;
    padding: 0;
  }
  body.in-menu .footnote,
  body.in-setup .footnote,
  body.in-lobby .footnote {
    display: none;
  }
}
/* Party mode: one phone passed around the table. */
.party-names {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}
.party-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.party-row .textinput {
  flex: 1;
  min-width: 0;
}
.party-remove {
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--inset);
  color: var(--muted);
  font-size: 15px;
}
.seg {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.seg button {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--border);
  background: var(--inset);
  color: var(--paper);
  font:
    600 14px Oswald,
    sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.seg button:last-child {
  border-right: 0;
}
.seg button[aria-pressed='true'] {
  background: var(--gold);
  color: var(--ink);
}
.seg-help {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.pass-panel {
  text-align: center;
}
.pass-label {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pass-name {
  margin: 4px 0 6px;
  color: var(--gold);
  font:
    700 clamp(40px, 11vw, 64px) / 1.05 Oswald,
    sans-serif;
  overflow-wrap: anywhere;
}
.pass-panel .button {
  margin: 18px 0 4px;
}
.reader-line {
  margin: 10px 0 2px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.party-answer {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 14px 0 10px;
  padding: 12px 14px;
  border: 1px dashed #a08a5a;
  border-radius: 10px;
  background: #59472d33;
}
.party-answer span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.party-answer b {
  color: var(--gold);
  font-size: 18px;
}
.party-choices {
  display: grid;
  gap: 7px;
  margin: 14px 0 10px;
  padding: 0;
  list-style: none;
}
.party-choices li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--inset);
  font-weight: 600;
}
.party-choices li.good {
  border-color: var(--green);
  background: #2c443d;
}
.party-choices li.good::after {
  content: '✓ answer';
  margin-left: auto;
  color: var(--green);
  font-size: 12px;
}
.party-choices .letter {
  color: var(--gold);
  font:
    700 15px Oswald,
    sans-serif;
}
.award-label {
  margin: 16px 0 8px;
  color: var(--paper);
  font:
    600 15px Oswald,
    sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.award-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.award-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.button.award-yes {
  background: var(--green);
  border-color: var(--green);
}
.button.award-no {
  color: var(--paper);
  background: transparent;
  border-color: #7d5a52;
}
.party-panel .answer-note {
  margin-top: 0;
}
.party-panel > .button {
  margin-top: 12px;
}
