/* The phone controller, always Night: one column, thumbs first, nothing below 14px. */
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: max(12px, env(safe-area-inset-top)) var(--space-4) 12px;
  border-bottom: 2px solid var(--surface-raised);
}

/* The wordmark on its own: the full lockup would fall below its 240px minimum on a phone. */
.lockup {
  height: 33px;
  width: auto;
}

.bar-status {
  font: 800 13px/1.2 var(--font-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

main {
  flex: 1;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) max(var(--space-5), env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

h1 {
  font-size: 40px;
}

h2 {
  font-size: 28px;
  font-weight: 700;
}

.lead {
  font-size: 17px;
  color: var(--ink-muted);
  margin: 0;
}

.lead a {
  color: var(--ink);
  text-decoration-color: var(--qm-orange);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.label {
  font: 800 13px/1.2 var(--font-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

main .qm-btn {
  width: 100%;
}

/* ---------- Forms ---------- */

form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

label.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-weight: 700;
}

input[type="text"] {
  width: 100%;
  min-height: var(--tap-min);
  padding: 12px 16px;
  border: 3px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  font-size: 20px;
}

input[type="text"]:focus-visible {
  outline: none;
  border-color: var(--focus-ring);
}

input.code {
  font: 800 44px/1 var(--font-display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  padding: 16px;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

legend {
  font-weight: 700;
  margin-bottom: var(--space-2);
  padding: 0;
}

.climbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.climbers label {
  position: relative;
}

.climbers input {
  position: absolute;
  opacity: 0;
  inset: 0;
}

.climbers span {
  display: grid;
  place-items: center;
  min-height: var(--tap-min);
  padding: 8px 6px;
  text-align: center;
  font: 700 15px/1.2 var(--font-text);
  border-radius: var(--radius-control);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 2px var(--line);
}

/* Orange means chosen; the gold ring only ever means focus. */
.climbers input:checked ~ span {
  background: var(--answer-selected);
  color: var(--on-answer-selected);
  box-shadow: none;
}

.climbers input:focus-visible ~ span {
  box-shadow: var(--shadow-focus);
}

/* ---------- Me: badge, name, where, strikes ---------- */

.me {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.me .who {
  flex: 1;
  min-width: 0;
}

.me-name {
  font: 700 17px/1.2 var(--font-text);
}

.me-where {
  font: 500 14px/1.3 var(--font-text);
  color: var(--ink-muted);
}

/* A big room (31+ climbers): your place, as the TV shows only the top 10. */
.me-place {
  font: 700 14px/1.3 var(--font-text);
  color: var(--qm-gold);
}

/* ---------- Question ---------- */

.q-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.secs {
  font: 800 22px/1 var(--font-display);
  color: var(--qm-gold);
  min-width: 3ch;
  padding: 5px 10px 2px;
  border-radius: var(--radius-pill);
  text-align: center;
}

.secs.is-low {
  background: var(--qm-orange);
  color: var(--qm-indigo);
}

.question-text {
  font: 700 24px/1.3 var(--font-text);
  margin: 0;
}

/* A picture question (milestone 54): the picture is on the big screen only. */
.picture-note {
  margin: 0;
  padding: 8px 14px;
  border-radius: 16px;
  background: var(--qm-gold);
  color: var(--qm-indigo);
  font: 700 18px/1.3 var(--font-text);
  justify-self: start;
}

.answers-wrap {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.qm-answers[aria-disabled="true"] .qm-answer {
  cursor: default;
}

.locked-note {
  text-align: center;
}

/* ---------- Guess the number and Put in order (milestone 45) ---------- */

.guess {
  display: grid;
  gap: var(--space-3);
}

.guess-field {
  display: grid;
  gap: 8px;
}

.guess-label {
  font: 800 14px/1 var(--font-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qm-gold);
}

.guess-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--answer-phone-height);
  padding: 0 var(--space-4);
  border-radius: var(--radius-control);
  background: var(--answer-face);
  color: var(--on-answer-face);
  box-shadow: inset 0 0 0 2px var(--answer-edge);
}

.guess-box:focus-within {
  box-shadow: var(--shadow-focus);
}

.guess-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: 800 40px/1 var(--font-display);
  padding: 12px 0 6px;
  outline: none;
}

.guess-unit {
  flex: none;
  font: 700 22px/1.2 var(--font-text);
}

.guess-note {
  margin: 0;
  text-align: center;
  color: var(--ink-muted);
  font: 400 16px/1.35 var(--font-text);
}

.guess-locked {
  display: grid;
  gap: 8px;
  padding: 14px 18px 18px;
  border-radius: var(--radius-card);
  background: var(--answer-selected);
  color: var(--on-answer-selected);
}

.guess-locked .guess-label {
  color: inherit;
}

.guess-value {
  font: 800 40px/1.1 var(--font-display);
  overflow-wrap: anywhere;
}
.guess-value.is-words {
  font: 700 30px/1.2 var(--font-text);
  overflow-wrap: anywhere;
}

.order-end {
  margin: 0;
  font: 800 14px/1 var(--font-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qm-gold);
}

.order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.order-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 72px;
  padding: 8px 8px 8px var(--space-3);
  border-radius: var(--radius-control);
  background: var(--answer-face);
  color: var(--on-answer-face);
  box-shadow: inset 0 0 0 2px var(--answer-edge);
  font: 700 20px/1.2 var(--font-text);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.order-card.is-dragging {
  position: relative;
  z-index: 2;
  background: var(--answer-selected);
  color: var(--on-answer-selected);
  box-shadow: none;
  cursor: grabbing;
}

.order-card.is-locked {
  background: var(--answer-selected);
  color: var(--on-answer-selected);
  box-shadow: none;
  cursor: default;
}

.order-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
}

.order-moves {
  flex: none;
  display: flex;
  gap: 6px;
}

.order-move {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--qm-indigo);
  color: var(--qm-cream);
  cursor: pointer;
}

.order-move:disabled {
  opacity: 0.3;
  cursor: default;
}

.order-move:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
}

@media (prefers-reduced-motion: no-preference) {
  .order-card:not(.is-dragging) {
    transition: background 120ms;
  }
}

/* ---------- Result: the whole screen takes the state colour ---------- */

/*
 * The result fills the page in the normal flow, not as a fixed overlay: on some phones (Safari
 * especially) a scrolling fixed layer could stay painted over the next question until the screen
 * was touched, so the answers couldn't be seen. The top bar steps aside while it's up. The
 * connection banner stays: in the game it only shows when something is wrong (the big screen has
 * disconnected, or this phone's connection has), and players wait on the result screen longest
 * (live test, 20 Nov 2026: it was hidden there for the whole minute before "The host has left").
 */
body.has-flash .bar {
  display: none;
}

body.has-flash main {
  max-width: none;
  padding: 0;
}

.flash {
  flex: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
  padding: max(48px, env(safe-area-inset-top)) 28px max(28px, env(safe-area-inset-bottom));
  animation: flash-in var(--motion-reveal) ease-out;
}

@keyframes flash-in {
  from {
    opacity: 0;
  }
}

.flash-body {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.flash-body > .flash-icon {
  width: 128px;
  height: 128px;
}

.flash .word {
  font: 800 56px/1 var(--font-display);
}

.flash .line {
  font: 700 24px/1.3 var(--font-text);
  margin: 0;
  max-width: 22em;
}

.flash .extra {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--qm-indigo);
  color: var(--qm-cream);
  padding: 8px 18px 8px 8px;
  border-radius: var(--radius-pill);
  font: 700 17px/1.25 var(--font-text);
  text-align: left;
}

.flash .extra .qm-icon {
  width: 44px;
  height: 44px;
}

.flash .extra.is-quickfoot .qm-icon {
  box-shadow: 0 0 0 3px var(--state-quickfoot);
}

/* The Guide calls "Pole pole!" as a climber reaches the Arctic Summit. */
.flash .extra .guide {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 50%;
  background: var(--qm-cream);
  box-shadow: 0 0 0 3px var(--qm-ice);
}

.flash .foot {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font: 500 17px/1.4 var(--font-text);
}

.flash .foot p {
  margin: 0;
}

.flash--right {
  background: var(--state-right);
  color: var(--on-state-right);
}

.flash--strike {
  background: var(--state-strike);
  color: var(--on-state-strike);
}

.flash--slide {
  background: var(--state-slide);
  color: var(--on-state-slide);
}

/* A poll or word cloud: no right answer, so no state colour (milestone 57). */
.flash--neutral {
  background: var(--qm-indigo);
  color: var(--qm-cream);
}

.poll-split {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  width: 100%;
  display: grid;
  gap: 10px;
  text-align: left;
}

.poll-split li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "chip text pct" "track track track";
  align-items: center;
  gap: 6px 10px;
  font: 600 17px/1.3 var(--font-text);
}

.poll-split li > .qm-answer__num {
  grid-area: chip;
}

.poll-split__text {
  grid-area: text;
}

.poll-split__pct {
  grid-area: pct;
  font: 800 18px/1 var(--font-display);
}

.poll-split__track {
  grid-area: track;
  height: 12px;
  border-radius: 6px;
  background: rgb(255 248 236 / 0.18);
  overflow: hidden;
}

.poll-split__track span {
  display: block;
  height: 100%;
  background: var(--qm-cream);
}

.poll-split li.is-mine .poll-split__track span {
  background: var(--qm-orange);
}

/* ---------- Waiting and final ---------- */

.waiting {
  margin: auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
}

.waiting .qm-badge.is-big {
  width: 96px;
  height: 96px;
  box-shadow: 0 0 0 4px var(--qm-cream);
  margin-bottom: var(--space-2);
}

.badge-line {
  margin: 0;
  font: 700 17px/1.3 var(--font-text);
}

.place {
  font: 800 56px/1 var(--font-display);
  color: var(--qm-gold);
  margin: 0;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  z-index: 3;
  left: 16px;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: 488px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: var(--radius-control);
  background: var(--qm-cream);
  color: var(--qm-indigo);
  font-weight: 700;
}

/* ---------- Gameplay V2 ---------- */

/* Before answering: the Lower Trail (gold dashed: an optional route, not "right") or a tiebreak. */
.banner {
  margin: 0;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  font: 700 17px/1.3 var(--font-text);
}

.banner.is-shortcut {
  border: 3px dashed var(--qm-gold);
  color: var(--qm-gold);
}

.banner.is-shortcut strong {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.banner.is-tiebreak {
  background: var(--qm-gold);
  color: var(--qm-indigo);
}

.flash .extra.is-breakdown,
.flash .extra.is-shortcut,
.flash .extra.is-milestone {
  padding-left: 18px;
}

.flash .extra.is-shortcut {
  box-shadow: inset 0 0 0 3px var(--qm-gold);
}

.flash .fact {
  max-width: 26em;
  margin: 6px auto;
  padding: 10px 14px;
  border-radius: var(--radius-control);
  background: var(--qm-indigo);
  color: var(--qm-cream);
  text-align: left;
}

.flash .fact p {
  margin: 0 0 6px;
}

/* Watching the mountain from somewhere else (/screen/CODE on another device). */
.watch {
  width: 100%;
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: center;
}

.watch h2 {
  margin: 0;
  font: 800 22px/1.1 var(--font-display);
}

.watch p {
  margin: 0;
  font: 400 16px/1.4 var(--font-text);
}

.watch .watch-url {
  font-weight: 700;
  font-size: 18px;
  overflow-wrap: anywhere;
  user-select: all;
}

.how-to {
  text-align: left;
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.how-to h2 {
  margin: 0 0 var(--space-2);
  font: 800 22px/1.1 var(--font-display);
}

.how-to p {
  margin: 0 0 var(--space-2);
  font: 400 16px/1.4 var(--font-text);
}

/* ---------- Animals (Production Assets V2) ---------- */

/* The picker: each animal's portrait above its name. */
.climbers .portrait {
  display: block;
  width: 52px;
  height: 52px;
  margin: 0 auto 2px;
}

/* Each choice is one card: the animal above its name (UX review, 21 Nov 2026). */
.climbers span {
  align-content: center;
  gap: 2px;
  padding: 10px 6px 8px;
}

/* Your own animal in your kit colour, with your badge tucked at its feet. */
.me-animal {
  position: relative;
  width: 160px;
  height: 160px;
}

.me-animal .animal-big {
  width: 160px;
  height: 160px;
}

.me-animal .qm-badge.is-big {
  position: absolute;
  right: -6px;
  bottom: 0;
  width: 56px;
  height: 56px;
  margin: 0;
}

/* Result: your animal reacting, beside the state icon (colour, icon and word still carry the meaning). */
.flash-figure {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}

.flash-figure .flash-animal {
  width: 140px;
  height: 140px;
}

.flash-figure .flash-icon {
  width: 88px;
  height: 88px;
}

/* An animal image waits invisibly until its recoloured sprite has loaded. */
img[data-animal]:not([src]) {
  visibility: hidden;
}

/* ---------- Connected, in the top bar: a dot and a word ---------- */

.bar-status.conn {
  flex: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-raised);
  color: var(--ink);
}

.conn-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
  background: var(--qm-stone);
}

.conn--open .conn-dot {
  background: var(--qm-sage);
  box-shadow: 0 0 0 3px rgb(163 185 140 / 0.35);
}

.conn--reconnecting,
.conn--connecting {
  color: var(--qm-gold);
}

.conn--reconnecting .conn-dot,
.conn--connecting .conn-dot {
  background: var(--qm-orange);
  animation: conn-pulse 1s ease-in-out infinite alternate;
}

.conn--closed .conn-dot {
  background: var(--qm-earth);
}

@keyframes conn-pulse {
  to {
    opacity: 0.35;
  }
}

/* ---------- The right answer, large, on every result ---------- */

.answer-card {
  display: grid;
  gap: 8px;
  width: min(100%, 24em);
  padding: 14px 18px 18px;
  border-radius: var(--radius-card);
  background: var(--answer-face);
  color: var(--on-answer-face);
  text-align: left;
}

.answer-card__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 800 14px/1 var(--font-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.answer-card__label img {
  width: 26px;
  height: 26px;
}

.answer-card__body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.answer-card__text {
  font: 700 32px/1.15 var(--font-text);
  overflow-wrap: anywhere;
}

.answer-card__note {
  font: 400 17px/1.35 var(--font-text);
}

.answer-order {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.answer-order li {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 700 20px/1.2 var(--font-text);
}

.answer-order li > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.answer-order__mark {
  flex: none;
  font: 800 13px/1 var(--font-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- The count before question 1 ---------- */

.countdown .count-label {
  margin: 0;
  font: 800 16px/1 var(--font-text);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--qm-gold);
}

.countdown .count-num {
  font: 800 160px/1 var(--font-display);
  color: var(--qm-cream);
  min-height: 1em;
}

.countdown .count-num.pop {
  animation: count-pop 420ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

@keyframes count-pop {
  from {
    transform: scale(1.45);
    opacity: 0;
  }
}

.awake-note {
  margin: 0;
  color: var(--ink-muted);
  font-size: 15px;
}

@media (prefers-reduced-motion: reduce) {
  .countdown .count-num.pop,
  .conn-dot {
    animation: none !important;
  }
}

/* ---------- The connection banner, under the top bar ---------- */

.conn-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px var(--space-4);
  font: 400 16px/1.35 var(--font-text);
  color: var(--qm-indigo);
  background: var(--qm-gold);
}

.conn-banner[hidden] {
  display: none;
}

.conn-banner strong {
  display: block;
  font: 800 18px/1.25 var(--font-text);
}

.conn-banner > span:not(.conn-dot):not(.conn-tick) {
  flex: 1;
  min-width: 0;
}

.conn-banner.conn--open {
  background: var(--qm-sage);
}

.conn-banner.conn--closed {
  background: var(--qm-earth);
  color: var(--qm-cream);
}

.conn-banner .conn-dot {
  width: 16px;
  height: 16px;
  background: var(--qm-indigo);
  box-shadow: none;
}

.conn-banner.conn--closed .conn-dot {
  background: var(--qm-cream);
  animation: none;
}

.conn-tick {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--qm-cream);
  color: var(--qm-forest);
}

.conn-tick svg {
  width: 24px;
  height: 24px;
}

.conn-banner .conn-retry {
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  font-size: 16px;
}

/* Narrow phones: the wordmark and the connection pill share the top bar without running off it. */
@media (max-width: 420px) {
  .bar .lockup {
    height: 26px;
  }

  .bar-status.conn {
    letter-spacing: 0.04em;
    padding: 6px 10px 6px 8px;
  }
}

/* Under Start climbing: what's kept, with the privacy notice a tap away. */
.privacy-note {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 1rem;
}

.privacy-note a {
  color: inherit;
  text-underline-offset: 3px;
}

/* ---------- The end of the climb ---------- */

/* The result fills the middle; what's next sits in a card at the foot, clear of the home bar. */
.final {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.final-result {
  margin: auto 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.final-result h1 {
  font-size: clamp(32px, 9vw, 40px);
  line-height: 1.1;
  text-wrap: balance;
}

.final-result .lead {
  max-width: 34ch;
}

.final-summary {
  margin: 0;
  font: 700 18px/1.3 var(--font-text);
  color: var(--ink);
}

/* The podium rosette, tucked at the animal's feet where the badge sits on other screens. */
.final-rosette {
  position: absolute;
  right: -10px;
  bottom: -4px;
  width: 56px;
  height: auto;
}

.final-next {
  position: sticky;
  bottom: max(var(--space-4), env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  text-align: center;
}

.final-next-title {
  margin: 0;
  font: 800 22px/1.2 var(--font-display);
  color: var(--ink);
}

.final-next-text {
  margin: 0;
  font-size: 17px;
  color: var(--ink-muted);
}

.final-join {
  display: block;
  width: 100%;
  margin-top: var(--space-2);
  min-height: 64px;
  font-size: 26px;
  letter-spacing: 0.02em;
}

/* Leaving is quiet: a plain link, still a full-size target. */
.final-leave {
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  font: 700 17px/1 var(--font-text);
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Short phones (iPhone SE): a smaller animal and tighter card, so the result and the card both fit. */
@media (max-height: 700px) {
  .final {
    gap: var(--space-3);
  }

  .final .me-animal,
  .final .me-animal .animal-big {
    width: 104px;
    height: 104px;
  }

  .final-rosette {
    width: 40px;
  }

  .final .place {
    font-size: 44px;
  }

  .final-result h1 {
    font-size: 28px;
  }

  .final-next {
    padding: var(--space-3) var(--space-4);
    gap: 4px;
  }

  .final-join {
    min-height: 56px;
    font-size: 24px;
  }
}

/* The narrowest phones: room for "Climb complete" beside the wordmark. */
@media (max-width: 360px) {
  .bar .lockup {
    height: 22px;
  }

  .bar-status.conn {
    font-size: 12px;
    letter-spacing: 0.02em;
  }
}

/* "Leave this game" at base camp and on the name-or-animal form: quiet, under the main buttons. */
/* Why the game turned this phone away (full or locked): stays until the player tries again. */
.join-refused {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--qm-gold);
  color: var(--qm-indigo);
  font-weight: 700;
}

.leave-link {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: var(--space-2) auto 0;
  padding: 0 var(--space-4);
  border: 0;
  background: none;
  font: 700 17px/1 var(--font-text);
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

/* ---------- Team mode (milestone 46) ---------- */

.banner.is-team {
  background: var(--surface-raised);
  color: var(--ink);
}

.talk-line {
  display: block;
  margin-top: 4px;
  color: var(--qm-gold);
  font-weight: 800;
}

/* Team talk: the answers wait until it's over. */
body.is-talking .qm-answer,
body.is-talking .guess-box,
body.is-talking #guess-send,
body.is-talking #order-send {
  opacity: 0.5;
}

.team-line {
  font-weight: 800;
  color: var(--qm-gold);
}

/* A quiet hint beside a field's label. */
.field .hint {
  font-weight: 400;
  color: var(--qm-stone);
}

/* Drop a pin (milestone 56): the picture, this phone's pin in orange, the right place in gold. */
.pin-wrap {
  display: grid;
  gap: 12px;
}
.pin-help {
  margin: 0;
  font: 700 18px/1.3 var(--font-text);
}
.pin-board {
  position: relative;
  justify-self: center;
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--qm-cream);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  line-height: 0;
  cursor: crosshair;
}
.pin-board img {
  display: block;
  max-width: 100%;
  max-height: 52vh;
}
.pin-board.is-small {
  cursor: default;
}
.pin-board.is-small img {
  max-height: 34vh;
}
.pin-mark {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: var(--qm-orange);
  border: 4px solid var(--qm-cream);
  pointer-events: none;
}
.pin-board .pin-area {
  position: absolute;
  border: 4px solid var(--qm-gold);
  border-radius: 8px;
  pointer-events: none;
}
