/* Phone-only viewport composition.
   Desktop is intentionally untouched: every rule is gated behind a coarse, no-hover phone query. */
@media (hover: none) and (pointer: coarse) and (max-width: 932px) {
  :root {
    --phone-inline: max(10px, env(safe-area-inset-left));
    --phone-inline-end: max(10px, env(safe-area-inset-right));
    --phone-topbar: 52px;
    --phone-stage-gap: 8px;
  }

  html,
  body,
  #root {
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  body {
    position: fixed;
    inset: 0;
    /* pan only: no page pinch-zoom, which left the game zoomed off-screen. Maps zoom themselves (touch-action: none). */
    touch-action: pan-x pan-y;
  }

  .game-shell {
    width: 100%;
    max-width: none !important;
    height: 100dvh;
    min-height: 100dvh !important;
    padding:
      env(safe-area-inset-top)
      var(--phone-inline-end)
      env(safe-area-inset-bottom)
      var(--phone-inline) !important;
    overflow: hidden !important;
  }

  .topbar {
    flex: 0 0 var(--phone-topbar);
    min-height: var(--phone-topbar) !important;
    height: var(--phone-topbar);
    gap: 8px !important;
    padding: 0 2px !important;
  }

  .brand {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(16px, 4.8vw, 20px) !important;
  }

  .top-actions { gap: 5px !important; }
  .topbar .icon-button {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    flex: 0 0 38px !important;
  }

  .connection-note {
    flex: 0 0 auto;
    margin: 4px 0 !important;
    padding: 6px 9px !important;
    font-size: 11px !important;
  }

  /* The stage is a game viewport, not a document. It gets exactly the space left by chrome + HUD. */
  .main-stage {
    flex: 1 1 0 !important;
    min-width: 0;
    min-height: 0 !important;
    height: auto !important;
    padding: var(--phone-stage-gap) 0 !important;
    overflow: hidden !important;
    justify-content: center !important;
  }

  .main-stage > * {
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
  }

  /* ---------- Persistent player HUD ---------- */
  .player-strip {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 auto;
    width: 100%;
    margin: 0 !important;
    padding: 4px 0 5px !important;
    row-gap: 2px !important;
    overflow: visible !important;
    backdrop-filter: none !important;
  }

  .player-strip.player-count-1 { grid-template-columns: 1fr !important; }
  .player-strip.player-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .player-strip.player-count-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .player-strip.player-count-4,
  .player-strip.player-count-5,
  .player-strip.player-count-6 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }

  .player-card,
  .player-card:first-child {
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 4px !important;
    column-gap: 4px !important;
    border-left: 0 !important;
  }

  .player-card + .player-card { border-left: 1px solid #57377b35 !important; }
  .player-card:nth-child(3n + 1) { border-left: 0 !important; }
  .player-card .avatar,
  .player-score-anchor .avatar {
    width: 21px !important;
    height: 21px !important;
    flex: 0 0 21px !important;
  }

  .player-score-anchor { gap: 3px !important; min-width: 0 !important; }
  .player-score-anchor .player-score {
    font-size: 17px !important;
    letter-spacing: -.35px !important;
  }
  .player-score-anchor .player-score small { display: none !important; }
  .player-card-copy { gap: 1px !important; min-width: 0 !important; }
  .player-name {
    font-size: 10px !important;
    line-height: 1 !important;
  }
  .player-name small { font-size: 7px !important; }
  .player-meta {
    font-size: 7px !important;
    line-height: 1 !important;
  }
  .player-card.active::after {
    left: 4px !important;
    bottom: -2px !important;
    width: 21px !important;
  }

  .player-card .player-score-delta b { font-size: 20px !important; }
  .player-card .player-score-delta small {
    max-width: 86px !important;
    font-size: 8px !important;
  }
  .score-total-stack > .player-score-delta-slot {
    bottom: calc(100% + 5px) !important;
  }

  /* While the virtual keyboard is open, keep every score but collapse secondary HUD copy. */
  .game-shell:has(input:focus:not([inputmode="none"]), textarea:focus:not([inputmode="none"]), .onscreen-keys) .player-strip.player-count-4,
  .game-shell:has(input:focus:not([inputmode="none"]), textarea:focus:not([inputmode="none"]), .onscreen-keys) .player-strip.player-count-5,
  .game-shell:has(input:focus:not([inputmode="none"]), textarea:focus:not([inputmode="none"]), .onscreen-keys) .player-strip.player-count-6 {
    grid-template-columns: repeat(var(--player-count), minmax(0, 1fr)) !important;
  }
  .game-shell:has(input:focus:not([inputmode="none"]), textarea:focus:not([inputmode="none"]), .onscreen-keys) .player-card {
    height: 32px !important;
    min-height: 32px !important;
    padding-inline: 2px !important;
    justify-content: center !important;
  }
  .game-shell:has(input:focus:not([inputmode="none"]), textarea:focus:not([inputmode="none"]), .onscreen-keys) .player-card-copy { display: none !important; }
  .game-shell:has(input:focus:not([inputmode="none"]), textarea:focus:not([inputmode="none"]), .onscreen-keys) .player-score-anchor { gap: 2px !important; }
  .game-shell:has(input:focus:not([inputmode="none"]), textarea:focus:not([inputmode="none"]), .onscreen-keys) .player-score-anchor .player-score { font-size: 14px !important; }
  /* The piece only: the emote that pops above it keeps its full size. */
  .game-shell:has(input:focus:not([inputmode="none"]), textarea:focus:not([inputmode="none"]), .onscreen-keys) .player-card .player-emote-anchor > .avatar {
    width: 17px !important;
    height: 17px !important;
    flex-basis: 17px !important;
  }

  /* ---------- Home ---------- */
  .home-grid {
    width: 100%;
    height: 100%;
    min-height: 0;
    align-content: center;
    gap: 7px !important;
  }
  .home-art {
    width: min(72vw, 310px) !important;
    max-width: 310px !important;
    max-height: 39dvh;
    margin: 0 auto !important;
  }
  .home-art .candy-board { max-height: 36dvh !important; }
  .home-title {
    margin-bottom: 10px !important;
    font-size: clamp(42px, 13vw, 58px) !important;
    letter-spacing: -2.5px !important;
  }
  .home-copy .subtitle { font-size: 13px !important; line-height: 1.35 !important; }
  .home-copy .button-row { gap: 7px !important; margin-top: 9px !important; }
  .home-copy .primary,
  .home-copy .secondary,
  .home-copy .quiet-button { min-height: 44px !important; padding: 9px 12px !important; }

  /* ---------- Question screens ---------- */
  .question-screen,
  .cinematic-reveal,
  .intro-screen,
  .geo-question,
  .geo-result {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
  }

  .question-screen {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
  }

  .question-top {
    flex: 0 0 auto;
    gap: 5px !important;
  }
  .question-top .timer,
  .sequence-timer .timer {
    width: 52px !important;
    height: 52px !important;
    flex-basis: 52px !important;
  }
  .question-top .timer span,
  .sequence-timer .timer span { font-size: 22px !important; }
  .sequence-timer { gap: 6px !important; font-size: 9px !important; }

  .question-heading {
    flex: 0 0 auto;
    margin: 7px 0 10px !important;
  }
  .question-heading h1 {
    max-width: 100%;
    font-size: clamp(22px, 6.5vw, 30px) !important;
    line-height: 1.08 !important;
    letter-spacing: -.7px !important;
  }
  .question-report-button {
    margin-top: 4px !important;
    padding: 3px 7px !important;
    font-size: 9px !important;
  }

  .answer-options {
    width: 100%;
    max-width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px !important;
    align-content: center;
  }
  .answer-option {
    min-width: 0;
    min-height: 60px !important;
    padding: 10px 10px !important;
    gap: 8px !important;
    border-radius: 12px !important;
    font-size: clamp(15px, 4.6vw, 19px) !important;
    line-height: 1.12 !important;
    box-shadow: 0 3px 0 color-mix(in srgb, var(--option), #140b28 45%) !important;
  }
  .answer-option .option-key {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 30px !important;
    font-size: 15px !important;
  }
  .answer-option > span:not(.option-key) {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .number-entry { width: min(100%, 520px) !important; gap: 7px !important; }
  .number-form { gap: 8px !important; }
  .number-form input {
    height: 62px !important;
    padding: 8px 12px !important;
    font-size: 35px !important;
  }
  .number-form .primary { min-height: 44px !important; }

  .order-area { width: min(100%, 600px); }
  .order-list { gap: 6px !important; margin-bottom: 9px !important; }
  .order-item { gap: 8px !important; }
  .order-tile {
    min-height: 46px !important;
    padding: 6px 8px !important;
    gap: 8px !important;
    font-size: 13px !important;
  }
  .order-arrows button { width: 34px !important; height: 34px !important; min-height: 34px !important; }
  .order-area > .primary { min-height: 44px !important; padding-block: 9px !important; }

  .word-entry-area { gap: 11px !important; margin-top: 2px !important; }
  .word-cells { gap: 4px !important; max-width: 100% !important; }
  .word-cell {
    width: clamp(30px, 9vw, 38px) !important;
    height: clamp(38px, 10.5vw, 46px) !important;
    border-radius: 7px !important;
    font-size: clamp(18px, 5.7vw, 23px) !important;
  }
  .word-entry-actions .primary { min-height: 44px !important; padding: 9px 12px !important; }
  .word-hint-status { top: calc(100% + 4px) !important; font-size: 10px !important; }
  .locked-message { margin-top: 9px !important; gap: 3px !important; font-size: 12px !important; }

  /* Geography uses the remaining stage as the map and reserves only the copy it needs. */
  .geo-layout {
    width: 100% !important;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: stretch !important;
    gap: 7px !important;
  }
  .geo-map {
    width: 100%;
    height: 100%;
    min-height: 160px !important;
    border-radius: 13px !important;
  }
  .geo-map > svg {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    aspect-ratio: auto !important;
  }
  .geo-question-copy,
  .geo-result-copy {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    text-align: center;
  }
  .geo-question-copy .stage-title,
  .geo-result-copy .stage-title {
    margin: 2px 0 5px !important;
    font-size: clamp(22px, 6vw, 28px) !important;
    line-height: 1.06 !important;
    letter-spacing: -.7px !important;
  }
  .geo-question-copy .question-report-button { margin: 0 0 5px !important; }
  .geo-question-copy .primary { min-height: 44px !important; padding: 9px 13px !important; }
  .geo-reveal-order { gap: 3px !important; margin: 3px 0 5px !important; }
  .geo-result-row {
    min-height: 31px !important;
    padding: 4px 6px !important;
    gap: 5px !important;
    font-size: 11px !important;
  }
  .geo-result-row .avatar { width: 24px !important; height: 24px !important; }
  .auto-result { gap: 7px !important; font-size: 11px !important; }
  .auto-result .timer { width: 46px !important; height: 46px !important; flex-basis: 46px !important; }

  /* ---------- Reveals ---------- */
  .cinematic-reveal {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
  }
  .cinematic-reveal > .eyebrow { margin-bottom: 5px !important; }
  .reveal-times {
    flex: 0 0 auto;
    margin-bottom: 5px !important;
  }
  .reveal-time-row { height: 42px !important; }
  .reveal-hit { min-height: 38px !important; padding: 4px 5px !important; gap: 5px !important; }
  .reveal-person { width: 82px !important; gap: 4px !important; }
  .reveal-person .avatar { width: 24px !important; height: 24px !important; }
  .reveal-person b { font-size: 10px !important; }
  .reveal-track { height: 10px !important; }
  .reveal-correctness { width: 77px !important; gap: 3px !important; }
  .reveal-correctness > b { font-size: 16px !important; }
  .reveal-correctness > small { font-size: 8px !important; }
  .revisited-question .question-heading { margin: 3px 0 5px !important; }
  .revisited-question .question-heading h1 { font-size: clamp(18px, 5vw, 23px) !important; }
  .reveal-options {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }
  .reveal-option {
    min-height: 48px !important;
    padding: 6px 7px !important;
    gap: 4px !important;
    border-radius: 9px !important;
  }
  .reveal-answer { font-size: 12px !important; line-height: 1.1 !important; }
  .reveal-guesses { min-height: 25px !important; gap: 2px !important; }
  .revealed-avatar .avatar { width: 23px !important; height: 23px !important; }
  .revealed-avatar small { display: none !important; }
  .reveal-finish {
    min-height: 44px !important;
    margin-top: 5px !important;
    gap: 7px !important;
    font-size: 11px !important;
  }
  .reveal-finish .timer { width: 44px !important; height: 44px !important; flex-basis: 44px !important; }

  .rapid-sequence-reveal { gap: 5px !important; padding-bottom: 0 !important; }
  .rapid-reveal-question { min-height: 94px !important; gap: 4px !important; }
  .rapid-reveal-question h1 { font-size: clamp(18px, 5.8vw, 25px) !important; }
  .rapid-reveal-options { gap: 5px !important; }
  .rapid-reveal-option { padding: 5px 6px !important; border-radius: 9px !important; }
  .rapid-option-players { min-height: 25px !important; margin-top: 3px !important; gap: 2px !important; }
  .rapid-choice-avatar .avatar { width: 24px !important; height: 24px !important; }
  .rapid-live-table { margin-top: 0 !important; }
  .rapid-live-row {
    height: 46px !important;
    grid-template-columns: minmax(82px, 1fr) minmax(55px, .75fr) 76px !important;
    gap: 5px !important;
    padding: 4px 6px !important;
    border-radius: 9px !important;
  }
  .rapid-live-player { gap: 4px !important; }
  .rapid-live-player .avatar { width: 24px !important; height: 24px !important; }
  .rapid-live-player b { font-size: 10px !important; }
  .rapid-answer-result { gap: 3px !important; }
  .rapid-answer-result b { font-size: 15px !important; }
  .rapid-answer-result small { font-size: 8px !important; }
  .rapid-live-stats strong { font-size: 13px !important; }
  .rapid-live-stats small { font-size: 8px !important; }

  /* ---------- Intros ---------- */
  .intro-screen {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px !important;
  }
  .intro-screen .format-icon {
    width: 62px !important;
    height: 62px !important;
    margin: 2px 0 0 !important;
    border-radius: 16px !important;
  }
  .intro-screen .stage-title {
    font-size: clamp(28px, 8vw, 38px) !important;
    letter-spacing: -1.2px !important;
  }
  .intro-screen .subtitle { font-size: 12px !important; line-height: 1.3 !important; }
  .intro-count { gap: 8px !important; margin-top: 2px !important; font-size: 11px !important; }
  .intro-count .timer { width: 54px !important; height: 54px !important; flex-basis: 54px !important; }

  /* ---------- Land / map / attack screens ---------- */
  :root {
    --land-map-width: 100%;
    --land-map-height: 100%;
    --land-sidecar-width: 100%;
    --game-tile-map-width: 100%;
    --game-tile-map-height: 100%;
  }

  .land-screen {
    width: 100% !important;
    height: 100%;
    max-height: 100%;
    min-height: 0;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }
  .land-header {
    min-height: 0 !important;
    margin: 0 0 5px !important;
    align-content: center !important;
  }
  .land-header .eyebrow { margin-bottom: 1px !important; }
  .land-header .stage-title {
    font-size: clamp(22px, 6.6vw, 29px) !important;
    line-height: 1.06 !important;
    letter-spacing: -.8px !important;
  }
  .land-layout,
  .map-and-panel,
  .queue-layout,
  .reward-stage,
  .outcome-layout,
  .final-layout {
    width: 100% !important;
    height: 100%;
    min-height: 0;
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    align-items: stretch !important;
    gap: 6px !important;
    overflow: hidden;
  }
  .land-map-slot,
  .map-wrap,
  .queue-map,
  .battle-intro-map,
  .intermission-board,
  .final-map,
  .reward-stage > .candy-board,
  .outcome-layout > .candy-board {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    margin: 0 auto !important;
  }
  .land-map-slot .candy-board,
  .map-wrap .candy-board,
  .queue-map .candy-board,
  .battle-intro-map .candy-board,
  .intermission-board .candy-board,
  .final-map .candy-board,
  .reward-stage > .candy-board,
  .outcome-layout > .candy-board {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }
  .land-sidecar,
  .selection-panel,
  .reward-copy,
  .outcome-scores,
  .queue-list {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    align-self: end !important;
  }
  .land-sidecar { font-size: 12px; }
  .land-sidecar .subtitle,
  .score-hud-note,
  .selection-hint { margin: 2px 0 !important; font-size: 11px !important; line-height: 1.3 !important; }
  .land-sidecar .auto-timer,
  .land-sidecar .auto-result { gap: 7px !important; font-size: 10px !important; }
  .land-sidecar .auto-timer .timer,
  .land-sidecar .auto-result .timer {
    width: 46px !important;
    height: 46px !important;
    flex-basis: 46px !important;
  }
  .attack-matchup { gap: 5px !important; }
  .attack-matchup > div { gap: 5px !important; }
  .attack-matchup .avatar { width: 34px !important; height: 34px !important; }
  .attack-matchup strong { font-size: 12px !important; }
  .attack-matchup small { font-size: 8px !important; }
  .selected-attack-card,
  .attack-status-card { padding: 7px 9px !important; margin-bottom: 5px !important; gap: 5px !important; }

  .queue-row { min-height: 38px !important; padding: 6px 8px !important; }
  .queue-list { max-height: 132px; overflow: hidden; }
  .auto-timer { gap: 7px !important; font-size: 10px !important; }
  .auto-timer .timer { width: 46px !important; height: 46px !important; flex-basis: 46px !important; }

  .final-screen { grid-template-rows: auto minmax(0, 1fr) auto !important; }
  .final-ranking { gap: 4px !important; }
  .final-row {
    min-height: 38px;
    gap: 6px !important;
    padding: 5px 7px !important;
    border-radius: 9px !important;
    font-size: 10px !important;
  }
  .final-row .avatar { width: 27px !important; height: 27px !important; }
  .final-row strong { font-size: 14px !important; }
  .final-breakdown { min-height: 38px !important; padding: 7px 9px !important; }
  .final-screen > .button-row { margin-top: 5px !important; gap: 6px !important; }
  .final-screen > .button-row .primary,
  .final-screen > .button-row .secondary { min-height: 42px !important; padding: 8px 10px !important; }

  /* Vertical battle rail becomes a compact horizontal turn strip on phones. */
  .battle-round-track {
    position: fixed !important;
    z-index: 45;
    top: calc(env(safe-area-inset-top) + var(--phone-topbar) + 3px) !important;
    right: var(--phone-inline-end) !important;
    bottom: auto !important;
    left: var(--phone-inline) !important;
    width: auto !important;
    height: 34px;
    padding: 3px 5px !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 5px !important;
    border-radius: 10px !important;
    background: #12091ef0 !important;
  }
  .game-shell:has(.battle-round-track) .main-stage { padding-top: 41px !important; }
  .battle-track-heading {
    display: grid !important;
    justify-items: start !important;
    gap: 0 !important;
    padding: 0 5px 0 1px !important;
    border: 0 !important;
    white-space: nowrap;
  }
  .battle-track-heading strong { font-size: 8px !important; }
  .battle-track-heading span { font-size: 8px !important; }
  .battle-track-list {
    display: flex !important;
    align-items: center;
    gap: 1px !important;
    min-width: 0;
    overflow: hidden !important;
  }
  .battle-track-round {
    flex: 1 1 0;
    min-width: 0;
    min-height: 26px !important;
    height: 26px;
    display: grid !important;
    grid-template-columns: 18px 18px !important;
    justify-content: center;
    gap: 1px !important;
    padding: 2px 0 !important;
  }
  .battle-track-round.active { transform: none !important; }
  .battle-track-node {
    width: 17px !important;
    height: 17px !important;
    font-size: 7px !important;
  }
  .battle-track-round .avatar { width: 18px !important; height: 18px !important; }
  .battle-track-line,
  .battle-track-name { display: none !important; }

  /* ---------- Lobby ---------- */
  .lobby {
    width: 100% !important;
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto auto auto auto;
    align-content: center;
    gap: 6px;
    overflow: hidden;
  }
  .lobby-heading {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center !important;
    gap: 7px !important;
    margin: 0 !important;
  }
  .lobby-heading .stage-title {
    font-size: clamp(21px, 6.2vw, 28px) !important;
    line-height: 1.02 !important;
    letter-spacing: -.8px !important;
  }
  .room-code {
    min-width: 92px;
    padding: 6px 8px !important;
    gap: 1px !important;
    border-radius: 10px !important;
  }
  .room-code small { font-size: 7px !important; }
  .room-code b { font-size: 18px !important; letter-spacing: .08em !important; }
  .room-code span { font-size: 8px !important; }

  .lobby-players {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }
  .lobby-player {
    min-width: 0;
    min-height: 47px;
    flex-direction: row !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    padding: 5px 6px !important;
    border-radius: 9px !important;
  }
  .lobby-player .avatar { width: 27px !important; height: 27px !important; flex: 0 0 27px; }
  .lobby-player strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px !important;
  }
  .lobby-player > span:not(.empty-avatar) { display: none !important; }
  .empty-avatar { width: 27px !important; height: 27px !important; flex: 0 0 27px; }

  .lobby-config-grid {
    grid-template-columns: 1fr !important;
    gap: 5px !important;
  }
  .lobby-options {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px !important;
    align-items: end !important;
  }
  .lobby-options label { min-width: 0 !important; gap: 2px !important; font-size: 9px !important; }
  .lobby-options button,
  .lobby-options [role="combobox"] { min-height: 36px !important; height: 36px !important; padding: 6px 8px !important; font-size: 10px !important; }
  .map-loading { grid-column: 1 / -1; font-size: 9px !important; }

  .lobby-map-preview {
    gap: 2px !important;
    padding: 5px 7px !important;
    border-radius: 10px !important;
  }
  .lobby-map-preview > small { font-size: 8px !important; }
  .lobby-map-preview-board {
    min-height: 64px !important;
    max-height: 74px !important;
  }
  .lobby-map-preview-board .candy-board {
    height: 70px !important;
    max-height: 70px !important;
  }

  .question-kind-picker { margin: 0 !important; }
  .question-kind-picker legend { font-size: 8px !important; }
  .question-kind-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    margin-top: 3px !important;
  }
  .question-kind-option {
    min-height: 35px !important;
    gap: 4px !important;
    padding: 5px 6px !important;
    border-radius: 8px !important;
    font-size: 9px !important;
  }
  .question-kind-option input { width: 14px !important; height: 14px !important; flex: 0 0 14px; }

  .lobby-bottom {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end !important;
    gap: 6px !important;
    margin-top: 0 !important;
    padding-top: 5px !important;
  }
  .lobby-secondary-actions { gap: 4px !important; }
  .lobby-secondary-actions .lobby-leave-button,
  .start-game .primary {
    min-height: 40px !important;
    padding: 7px 10px !important;
    font-size: 11px !important;
  }
  .start-game { text-align: right !important; }
  .start-game p { margin: 2px 0 0 !important; font-size: 8px !important; line-height: 1.2 !important; }

  /* ---------- Dialogs ---------- */
  .game-dialog,
  .question-report-dialog {
    max-width: calc(100vw - var(--phone-inline) - var(--phone-inline-end)) !important;
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 16px) !important;
  }
  .game-dialog { padding: 16px !important; gap: 10px !important; }
  .game-dialog .entry-form { gap: 9px !important; }
  .game-dialog input,
  .game-dialog button { min-height: 44px; }
  .help-content { gap: 8px !important; }
  .help-content > div { gap: 7px !important; }
  .help-content p { font-size: 11px !important; line-height: 1.3 !important; }
  .question-report-backdrop { padding: max(8px, env(safe-area-inset-top)) 10px max(8px, env(safe-area-inset-bottom)) !important; }
  .question-report-dialog { gap: 9px !important; padding: 14px !important; }
  .question-report-dialog h2 { font-size: 20px !important; }
  .question-report-dialog textarea { min-height: 72px !important; max-height: 20dvh; resize: none !important; }
}

/* Short phone viewports (landscape and older compact phones): use density before scrolling. */
@media (hover: none) and (pointer: coarse) and (max-width: 932px) and (max-height: 700px) {
  :root { --phone-topbar: 46px; --phone-stage-gap: 4px; }

  .topbar .icon-button {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    flex-basis: 34px !important;
  }

  .player-card { height: 35px !important; min-height: 35px !important; }
  .player-card .avatar,
  .player-score-anchor .avatar { width: 18px !important; height: 18px !important; flex-basis: 18px !important; }
  .player-score-anchor .player-score { font-size: 15px !important; }
  .player-name { font-size: 9px !important; }
  .player-meta { display: none !important; }

  .question-heading { margin: 4px 0 6px !important; }
  .question-heading h1 { font-size: clamp(19px, 5.5vw, 25px) !important; }
  .answer-option { min-height: 52px !important; padding: 7px 8px !important; font-size: clamp(13px, 4vw, 17px) !important; }
  .question-top .timer,
  .sequence-timer .timer { width: 45px !important; height: 45px !important; flex-basis: 45px !important; }
  .question-top .timer span,
  .sequence-timer .timer span { font-size: 19px !important; }

  .land-header { margin-bottom: 2px !important; }
  .land-header .eyebrow { display: none !important; }
  .land-header .stage-title { font-size: clamp(19px, 5.4vw, 24px) !important; }
  .land-layout,
  .map-and-panel,
  .queue-layout,
  .reward-stage,
  .outcome-layout,
  .final-layout { gap: 3px !important; }
  .land-sidecar .subtitle,
  .score-hud-note,
  .selection-hint { font-size: 9px !important; }

  .lobby { gap: 3px; }
  .lobby-heading .stage-title { font-size: clamp(18px, 5.2vw, 23px) !important; }
  .lobby-player { min-height: 40px; padding: 3px 4px !important; }
  .lobby-player .avatar,
  .empty-avatar { width: 23px !important; height: 23px !important; flex-basis: 23px !important; }
  .lobby-map-preview-board { min-height: 48px !important; max-height: 54px !important; }
  .lobby-map-preview-board .candy-board { height: 50px !important; max-height: 50px !important; }
  .question-kind-option { min-height: 31px !important; padding-block: 3px !important; }
  .lobby-secondary-actions .lobby-leave-button,
  .start-game .primary { min-height: 36px !important; padding-block: 5px !important; }

  .reveal-time-row { height: 36px !important; }
  .reveal-hit { min-height: 33px !important; }
  .reveal-option { min-height: 42px !important; }
  .reveal-finish { min-height: 38px !important; }
  .rapid-reveal-question { min-height: 76px !important; }
  .rapid-live-row { height: 40px !important; }
}

/* Phone landscape: restore horizontal compositions because vertical stacking wastes scarce height. */
@media (hover: none) and (pointer: coarse) and (max-width: 932px) and (orientation: landscape) and (max-height: 500px) {
  :root { --phone-topbar: 40px; --phone-stage-gap: 3px; }

  .brand { font-size: 15px !important; }
  .topbar .icon-button {
    width: 31px !important;
    height: 31px !important;
    min-width: 31px !important;
    min-height: 31px !important;
    flex-basis: 31px !important;
  }

  .player-strip.player-count-1,
  .player-strip.player-count-2,
  .player-strip.player-count-3,
  .player-strip.player-count-4,
  .player-strip.player-count-5,
  .player-strip.player-count-6 {
    grid-template-columns: repeat(var(--player-count), minmax(0, 1fr)) !important;
  }
  .player-strip { padding: 2px 0 3px !important; row-gap: 0 !important; }
  .player-card { height: 31px !important; min-height: 31px !important; justify-content: center !important; }
  .player-card-copy { display: none !important; }
  .player-card .avatar,
  .player-score-anchor .avatar { width: 16px !important; height: 16px !important; flex-basis: 16px !important; }
  .player-score-anchor .player-score { font-size: 13px !important; }

  .home-grid {
    display: grid !important;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) !important;
    align-items: center;
    gap: 12px !important;
  }
  .home-art { grid-column: 2; grid-row: 1; width: min(38vw, 280px) !important; max-height: 68dvh; }
  .home-copy { grid-column: 1; grid-row: 1; }
  .home-title { font-size: clamp(34px, 7vw, 48px) !important; margin-bottom: 5px !important; }
  .home-copy .subtitle { font-size: 10px !important; }
  .home-copy .button-row { margin-top: 5px !important; }
  .home-copy .primary,
  .home-copy .secondary,
  .home-copy .quiet-button { min-height: 36px !important; padding-block: 6px !important; font-size: 10px !important; }

  .question-screen { justify-content: center; }
  .question-top { position: absolute; top: 2px; right: 2px; }
  .question-heading { margin: 2px 58px 5px 0 !important; }
  .question-heading h1 { font-size: clamp(17px, 3.2vw, 23px) !important; }
  .answer-option { min-height: 45px !important; padding: 5px 7px !important; font-size: clamp(12px, 2.4vw, 16px) !important; }
  .answer-option .option-key { width: 25px !important; height: 25px !important; flex-basis: 25px !important; font-size: 12px !important; }
  .order-tile { min-height: 40px !important; }
  .number-form input { height: 48px !important; font-size: 29px !important; }
  .word-cell { width: clamp(28px, 5vw, 34px) !important; height: 36px !important; font-size: 18px !important; }

  .geo-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(220px, .72fr) !important;
    grid-template-rows: 1fr !important;
    gap: 7px !important;
  }
  .geo-map { min-height: 0 !important; }
  .geo-question-copy,
  .geo-result-copy { align-self: center; }
  .geo-result-row { min-height: 27px !important; padding-block: 2px !important; }

  .land-screen { grid-template-rows: auto minmax(0, 1fr) auto; }
  .land-layout,
  .map-and-panel,
  .queue-layout,
  .reward-stage,
  .outcome-layout,
  .final-layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(210px, .72fr) !important;
    grid-template-rows: 1fr !important;
    gap: 7px !important;
  }
  .land-map-slot,
  .map-wrap,
  .queue-map,
  .battle-intro-map,
  .intermission-board,
  .final-map,
  .reward-stage > .candy-board,
  .outcome-layout > .candy-board {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }
  .land-sidecar,
  .selection-panel,
  .reward-copy,
  .outcome-scores,
  .queue-list {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: center !important;
  }
  .final-row { min-height: 31px; padding: 3px 5px !important; }
  .final-row .avatar { width: 22px !important; height: 22px !important; }

  .battle-round-track {
    top: calc(env(safe-area-inset-top) + var(--phone-topbar) + 1px) !important;
    height: 29px;
  }
  .game-shell:has(.battle-round-track) .main-stage { padding-top: 32px !important; }
  .battle-track-heading strong,
  .battle-track-heading span { font-size: 7px !important; }
  .battle-track-round { min-height: 22px !important; height: 22px; grid-template-columns: 15px 15px !important; }
  .battle-track-node { width: 14px !important; height: 14px !important; }
  .battle-track-round .avatar { width: 15px !important; height: 15px !important; }

  /* Complex setup/reveal screens get a final density fallback rather than creating a document scrollbar. */
  .lobby,
  .cinematic-reveal.rapid-sequence-reveal { zoom: .86; }
}

/* ---------- iPhone / all-phone hardening audit ----------
   These rules intentionally remain phone-only so desktop rendering is untouched. */
@media (hover: none) and (pointer: coarse) and (max-width: 932px) {
  /* Safari's visual viewport, not 100vh/100dvh alone, is the source of truth while
     the address bar or software keyboard is changing the visible canvas. */
  #root {
    height: var(--phone-vv-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: var(--phone-vv-height, 100dvh) !important;
  }

  .game-shell {
    height: var(--phone-vv-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: var(--phone-vv-height, 100dvh) !important;
  }

  /* Keep the always-present controls at a proper phone touch size. */
  .topbar .icon-button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    flex-basis: 44px !important;
  }

  .order-arrows button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
  }

  /* Geography controls are horizontal on phones: 44px targets without stealing
     most of a short map's vertical space. */
  .map-tools {
    display: flex !important;
    flex-direction: row !important;
    gap: 3px !important;
    padding: 4px !important;
  }
  .map-tools button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    flex: 0 0 44px !important;
  }

  .question-report-button { min-height: 36px !important; }
  .lobby-options button,
  .lobby-options [role="combobox"],
  .question-kind-option,
  .lobby-secondary-actions .lobby-leave-button,
  .start-game .primary,
  .final-breakdown { min-height: 44px !important; }

  /* The battle-question intro had an unresolved component and, once rendered,
     needs an explicit phone width budget. */
  .intro-battle-matchup {
    width: min(100%, 430px) !important;
    margin-inline: auto;
  }

  /* All six pick-order entries remain visible: two columns cost the same vertical
     budget as three desktop-like rows instead of clipping entries 4–6. */
  .simplified-queue {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .simplified-queue .queue-row {
    min-width: 0 !important;
    min-height: 36px !important;
    padding: 4px 6px !important;
  }
  .simplified-queue .queue-row .avatar {
    width: 25px !important;
    height: 25px !important;
    flex: 0 0 25px !important;
  }
  .simplified-queue .queue-row > b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px !important;
  }

  /* Dialogs track the *visible* viewport as the iOS keyboard opens. They can still
     be touch-scrolled as an emergency fallback, but their scrollbars never appear. */
  [data-slot="dialog-overlay"] {
    height: var(--phone-vv-height, 100dvh) !important;
    bottom: auto !important;
  }
  .game-dialog,
  .question-report-dialog {
    max-height: calc(var(--phone-vv-height, 100dvh) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 12px) !important;
    scrollbar-width: none;
  }
  .game-dialog {
    top: calc(var(--phone-vv-height, 100dvh) / 2) !important;
  }
  .game-dialog::-webkit-scrollbar,
  .question-report-dialog::-webkit-scrollbar { display: none; }

  /* 16px is deliberate: iOS Safari otherwise zooms the page on input focus. */
  .game-dialog input,
  .game-dialog textarea,
  .game-dialog select,
  .question-report-dialog input,
  .question-report-dialog textarea,
  .question-report-dialog select {
    font-size: 16px !important;
  }

  .breakdown-list { gap: 7px !important; }
  .breakdown-list > div { padding-bottom: 7px !important; }
  .breakdown-list strong { gap: 6px !important; font-size: 12px !important; }
  .breakdown-list strong .avatar { width: 22px !important; height: 22px !important; }
  .breakdown-list p {
    margin-top: 3px !important;
    font-size: 9px !important;
    line-height: 1.35 !important;
  }

  /* The JS viewport bridge adds this class only while the iOS/Android software
     keyboard materially reduces the visual viewport. Preserve the timer, but spend
     less space on chrome and copy. */
  .phone-keyboard-open { --phone-topbar: 44px; --phone-stage-gap: 2px; }
  .phone-keyboard-open .brand { font-size: 14px !important; }
  .phone-keyboard-open .question-heading { margin: 2px 0 4px !important; }
  .phone-keyboard-open .question-heading h1 { font-size: clamp(18px, 5.2vw, 22px) !important; }
  .phone-keyboard-open .question-top .timer,
  .phone-keyboard-open .sequence-timer .timer {
    width: 42px !important;
    height: 42px !important;
    flex-basis: 42px !important;
  }
  .phone-keyboard-open .number-form input { height: 52px !important; font-size: 30px !important; }
  .phone-keyboard-open .word-entry-area { gap: 5px !important; }
  .phone-keyboard-open .word-cell { height: 34px !important; }
  .phone-keyboard-open .question-report-dialog { gap: 6px !important; padding: 10px !important; }
  .phone-keyboard-open .question-report-dialog h2 { font-size: 17px !important; }
  .phone-keyboard-open .question-report-dialog label { gap: 3px !important; font-size: 10px !important; }
  .phone-keyboard-open .question-report-dialog textarea { min-height: 48px !important; max-height: 72px !important; }
  .phone-keyboard-open .question-report-actions .primary,
  .phone-keyboard-open .question-report-actions .quiet-button { min-height: 40px !important; }
}

/* Short portrait phones need a different information layout, not a document scroll. */
@media (hover: none) and (pointer: coarse) and (max-width: 430px) and (max-height: 700px) and (orientation: portrait) {
  .geo-map { min-height: 110px !important; }
  .geo-reveal-order {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 3px !important;
  }
  .geo-result-row {
    min-width: 0;
    min-height: 27px !important;
    padding: 2px 4px !important;
    grid-template-columns: 20px minmax(0, 1fr) auto 14px !important;
    font-size: 9px !important;
  }
  .geo-result-row .avatar { width: 20px !important; height: 20px !important; }
  .geo-result-row > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .reveal-option { min-height: 38px !important; padding-block: 4px !important; }
  .reveal-answer { font-size: 11px !important; }
  .reveal-finish { min-height: 34px !important; margin-top: 3px !important; }
  .reveal-finish .timer { width: 34px !important; height: 34px !important; flex-basis: 34px !important; }
}

/* Landscape is genuinely a different game canvas. Recompose dense screens side by
   side instead of zooming a portrait stack or allowing it to overflow. */
@media (hover: none) and (pointer: coarse) and (max-width: 932px) and (orientation: landscape) and (max-height: 500px) {
  :root { --phone-topbar: 44px; }

  .topbar .icon-button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    flex-basis: 44px !important;
  }

  .question-report-button { min-height: 30px !important; }

  /* Standard answer replay: times left, original question/answers right. */
  .cinematic-reveal:not(.rapid-sequence-reveal) {
    display: grid !important;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr) !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    column-gap: 8px !important;
    row-gap: 3px !important;
    align-items: center !important;
    justify-content: stretch !important;
    zoom: 1 !important;
  }
  .cinematic-reveal:not(.rapid-sequence-reveal) > .eyebrow {
    grid-column: 1 / -1;
    grid-row: 1;
    margin: 0 !important;
    font-size: 8px !important;
  }
  .cinematic-reveal:not(.rapid-sequence-reveal) > .reveal-times {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    margin: 0 !important;
    align-self: center;
  }
  .cinematic-reveal:not(.rapid-sequence-reveal) > .revisited-question {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    min-height: 0;
    align-self: center;
  }
  .cinematic-reveal:not(.rapid-sequence-reveal) > .reveal-finish {
    grid-column: 1 / -1;
    grid-row: 3;
    min-height: 31px !important;
    margin: 0 !important;
  }
  .cinematic-reveal:not(.rapid-sequence-reveal) .reveal-time-row { height: 27px !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .reveal-hit { min-height: 25px !important; padding: 2px 4px !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .reveal-person { width: 70px !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .reveal-person .avatar { width: 19px !important; height: 19px !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .reveal-person b { font-size: 8px !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .reveal-correctness { width: 64px !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .reveal-correctness > b { font-size: 13px !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .reveal-correctness > small { font-size: 7px !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .revisited-question .question-heading { margin: 0 0 3px !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .revisited-question .question-heading h1 { font-size: clamp(14px, 2.7vw, 19px) !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .reveal-option { min-height: 35px !important; padding: 3px 5px !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .reveal-answer { font-size: 10px !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .reveal-guesses { min-height: 18px !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .revealed-avatar .avatar { width: 18px !important; height: 18px !important; }
  .cinematic-reveal:not(.rapid-sequence-reveal) .reveal-finish .timer { width: 31px !important; height: 31px !important; flex-basis: 31px !important; }

  /* Quick 5 replay uses the same idea: current question left, standings right. */
  .cinematic-reveal.rapid-sequence-reveal {
    display: grid !important;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr) !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    column-gap: 8px !important;
    row-gap: 3px !important;
    align-items: center !important;
    zoom: 1 !important;
  }
  .rapid-sequence-reveal > .eyebrow { grid-column: 1 / -1; grid-row: 1; margin: 0 !important; font-size: 8px !important; }
  .rapid-sequence-reveal > .rapid-reveal-question { grid-column: 1; grid-row: 2; min-height: 0 !important; align-self: stretch; }
  .rapid-sequence-reveal > .rapid-live-table { grid-column: 2; grid-row: 2; width: 100%; margin: 0 !important; align-self: center; }
  .rapid-sequence-reveal > .reveal-finish { grid-column: 1 / -1; grid-row: 3; min-height: 31px !important; margin: 0 !important; }
  .rapid-reveal-question h1 { font-size: clamp(14px, 2.7vw, 19px) !important; }
  .rapid-reveal-option { padding: 2px 4px !important; }
  .rapid-live-row {
    height: 30px !important;
    grid-template-columns: minmax(62px, 1fr) minmax(38px, .6fr) 62px !important;
    padding: 2px 4px !important;
  }
  .rapid-live-player .avatar { width: 18px !important; height: 18px !important; }
  .rapid-live-player b { font-size: 8px !important; }
  .rapid-answer-result b { font-size: 12px !important; }
  .rapid-answer-result small,
  .rapid-live-stats small { font-size: 7px !important; }
  .rapid-live-stats strong { font-size: 10px !important; }
  .rapid-sequence-reveal .reveal-finish .timer { width: 31px !important; height: 31px !important; flex-basis: 31px !important; }

  .geo-result-row { min-height: 23px !important; padding-block: 1px !important; font-size: 8px !important; }
  .geo-result-row .avatar { width: 19px !important; height: 19px !important; }

  /* Keep all queue entries readable in the narrow sidecar. */
  .simplified-queue {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
  }
  .simplified-queue .queue-row { min-height: 27px !important; padding-block: 2px !important; }
  .simplified-queue .queue-row .avatar { width: 20px !important; height: 20px !important; flex-basis: 20px !important; }

  /* Lobby: seats on the left, setup on the right. This replaces the old zoom
     fallback and keeps controls crisp and predictable on iPhone landscape. */
  .lobby {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) !important;
    grid-template-rows: auto auto auto auto !important;
    align-content: stretch !important;
    column-gap: 10px !important;
    row-gap: 3px !important;
    zoom: 1 !important;
  }
  .lobby-heading { grid-column: 1 / -1; grid-row: 1; }
  .lobby-heading .stage-title { font-size: 19px !important; }
  .room-code { padding: 3px 7px !important; }
  .room-code b { font-size: 15px !important; }
  .room-code span { display: none !important; }

  .lobby-players {
    grid-column: 1;
    grid-row: 2 / 4;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-content: center;
    gap: 3px !important;
  }
  .lobby-player { min-height: 36px !important; padding: 3px 5px !important; }
  .lobby-player .avatar,
  .empty-avatar { width: 22px !important; height: 22px !important; flex-basis: 22px !important; }
  .lobby-player strong { font-size: 9px !important; }

  .lobby-config-grid {
    grid-column: 2;
    grid-row: 2;
    grid-template-columns: minmax(0, 1fr) minmax(95px, .58fr) !important;
    align-items: stretch !important;
    gap: 4px !important;
  }
  .lobby-options button,
  .lobby-options [role="combobox"] { min-height: 34px !important; height: 34px !important; }
  .lobby-map-preview { padding: 3px 4px !important; }
  .lobby-map-preview-board { min-height: 34px !important; max-height: 38px !important; }
  .lobby-map-preview-board .candy-board { height: 36px !important; max-height: 36px !important; }

  .question-kind-picker { grid-column: 2; grid-row: 3; min-width: 0; }
  .question-kind-grid { gap: 3px !important; }
  .question-kind-option { min-height: 30px !important; padding: 2px 4px !important; font-size: 8px !important; }

  .lobby-bottom {
    grid-column: 1 / -1;
    grid-row: 4;
    padding-top: 2px !important;
  }
  .lobby-secondary-actions .lobby-leave-button,
  .start-game .primary { min-height: 36px !important; }

  /* Remove the earlier generic zoom fallback now that dense screens recompose. */
  .cinematic-reveal.rapid-sequence-reveal { zoom: 1 !important; }
}

/* Final screen-matrix fixes discovered by the full phase audit. */
@media (hover: none) and (pointer: coarse) and (max-width: 932px) {
  /* Map-selection sidecars must never inherit the desktop 295px minimum/padding. */
  .selection-panel {
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    gap: 4px !important;
  }
  .selection-panel > .primary {
    min-height: 44px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
  }
  .selection-panel .quiet-button {
    min-height: 38px !important;
    margin-top: 3px !important;
    padding: 6px 10px !important;
    font-size: 10px !important;
  }
  .waiting-panel { gap: 7px !important; }
  .spectator-land-pick small { font-size: 9px !important; line-height: 1.25 !important; }

  .attack-status-card .avatar { width: 31px !important; height: 31px !important; }
  .selected-attack-card .avatar { width: 28px !important; height: 28px !important; }
  .attack-status-card strong,
  .selected-attack-card strong { font-size: 11px !important; }

  /* Keyboard-open dialogs should preserve the action, not decorative description. */
  .phone-keyboard-open .game-dialog {
    padding: 10px !important;
    gap: 7px !important;
  }
  .phone-keyboard-open .game-dialog [data-slot="dialog-title"] { font-size: 18px !important; }
  .phone-keyboard-open .game-dialog [data-slot="dialog-description"] { display: none !important; }
  .phone-keyboard-open .game-dialog .entry-form { gap: 6px !important; }
  .phone-keyboard-open .game-dialog input,
  .phone-keyboard-open .game-dialog [data-slot="select-trigger"] { height: 44px !important; min-height: 44px !important; }

  .question-report-backdrop {
    inset: 0 auto auto 0 !important;
    width: 100% !important;
    height: var(--phone-vv-height, 100dvh) !important;
    overflow: hidden !important;
  }
}

@media (hover: none) and (pointer: coarse) and (max-width: 932px) and (orientation: landscape) and (max-height: 500px) {
  /* Three order rows plus submit fit the battle viewport without making the page scroll. */
  .order-list { gap: 3px !important; margin-bottom: 4px !important; }
  .order-arrows button {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }
  .order-area > .primary { min-height: 38px !important; padding-block: 5px !important; }

  /* Selected-attack is the densest map sidecar state. */
  .selection-panel { gap: 2px !important; }
  .attack-status-card,
  .selected-attack-card { padding: 3px 5px !important; margin-bottom: 2px !important; gap: 2px !important; }
  .attack-status-card .avatar,
  .selected-attack-card .avatar { width: 22px !important; height: 22px !important; }
  .attack-status-card small,
  .selected-attack-card small { display: none !important; }
  .attack-status-card strong,
  .selected-attack-card strong { font-size: 9px !important; }
  .selection-panel > .primary { min-height: 36px !important; padding: 4px 8px !important; }
  .selection-panel .quiet-button { min-height: 30px !important; margin-top: 1px !important; padding: 3px 7px !important; }
  .selection-panel .auto-timer { gap: 3px !important; font-size: 8px !important; }
  .selection-panel .auto-timer .timer {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
  }
  .spectator-land-pick { gap: 4px !important; }
  .spectator-land-pick small { font-size: 7px !important; }

  .battle-ready-sidecar .intro-count { gap: 4px !important; font-size: 8px !important; }
  .battle-ready-sidecar .intro-count .timer {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
  }
  .battle-ready-sidecar .attack-matchup .avatar { width: 26px !important; height: 26px !important; }
  .battle-ready-sidecar .attack-matchup strong { font-size: 9px !important; }
  .battle-ready-sidecar .subtitle { margin: 0 !important; font-size: 8px !important; }

  .rapid-choice-avatar .avatar { width: 18px !important; height: 18px !important; }
  .rapid-option-players { min-height: 18px !important; gap: 1px !important; margin-top: 1px !important; }

  /* Score breakdown uses width in landscape so all six players still fit without
     producing a tall modal. */
  .breakdown-list {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px 10px !important;
  }
  .breakdown-list > div { min-width: 0; padding-bottom: 5px !important; }
  .breakdown-list p { font-size: 8px !important; line-height: 1.25 !important; }

  /* A software keyboard can leave little more than half the landscape canvas.
     Collapse game chrome first; the active answer controls remain fully visible. */
  .phone-keyboard-open .topbar { display: none !important; }
  .phone-keyboard-open .player-strip { padding: 1px 0 !important; }
  .phone-keyboard-open .player-card {
    height: 24px !important;
    min-height: 24px !important;
  }
  .phone-keyboard-open .player-card .avatar,
  .phone-keyboard-open .player-score-anchor .avatar {
    width: 14px !important;
    height: 14px !important;
    flex-basis: 14px !important;
  }
  .phone-keyboard-open .player-score-anchor .player-score { font-size: 11px !important; }
  .phone-keyboard-open .question-top { top: 0 !important; }
}

@media (hover: none) and (pointer: coarse) and (max-width: 932px) and (orientation: landscape) and (max-height: 500px) {
  /* Final ranking is the tallest non-battle sidecar; leave margin instead of fitting
     exactly against the available iPhone landscape height. */
  .final-ranking { gap: 2px !important; }
  .final-row { min-height: 28px !important; padding: 2px 4px !important; }
  .final-row .avatar { width: 20px !important; height: 20px !important; }
  .final-row strong { font-size: 11px !important; }
  .final-breakdown { min-height: 34px !important; padding: 4px 7px !important; }
  .final-screen > .button-row { margin-top: 2px !important; }
  .final-screen > .button-row .primary,
  .final-screen > .button-row .secondary { min-height: 36px !important; padding-block: 5px !important; }
}


/* 2026-09-15 final mobile consistency overrides. */
@media (hover: none) and (pointer: coarse) and (max-width:932px){
  :root{--countdown-size:44px;--countdown-number-size:19px}
  .timer,
  .question-top .timer,.sequence-timer .timer,.auto-timer .timer,.auto-result .timer,
  .waiting-panel>.timer,.reveal-finish .timer,.intro-count .timer,
  .selection-panel .auto-timer .timer,.battle-ready-sidecar .intro-count .timer,
  .geo-question-copy .timer{
    width:var(--countdown-size)!important;height:var(--countdown-size)!important;
    min-width:var(--countdown-size)!important;min-height:var(--countdown-size)!important;
    flex:0 0 var(--countdown-size)!important;
  }
  .timer>span,.question-top .timer span,.sequence-timer .timer span,
  .auto-timer .timer span,.auto-result .timer span,.waiting-panel>.timer span,
  .reveal-finish .timer span,.intro-count .timer span,.geo-question-copy .timer span{
    position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
    display:grid!important;place-items:center!important;margin:0!important;padding:0!important;
    font-size:var(--countdown-number-size)!important;line-height:1!important;letter-spacing:-.6px!important;
    text-align:center!important;transform:none!important;
  }

  /* Mobile reveal rows use roughly 24px avatars / 10px names; keep ATTACKS at that same scale. */
  .battle-round-track{height:46px!important;padding:4px 6px!important;grid-template-columns:auto minmax(0,1fr)!important}
  .game-shell:has(.battle-round-track) .main-stage{padding-top:53px!important}
  .battle-track-heading strong,.battle-track-heading span{font-size:9px!important}
  .battle-track-list{gap:3px!important}
  .battle-track-round{
    min-height:36px!important;height:36px!important;
    grid-template-columns:20px 24px minmax(0,1fr)!important;
    gap:3px!important;padding:2px 1px!important;
  }
  .battle-track-node{width:19px!important;height:19px!important;font-size:8px!important}
  .battle-track-round .avatar{width:24px!important;height:24px!important}
  .battle-track-name{display:block!important;min-width:0!important;font-size:10px!important;line-height:1!important}
  .battle-track-line{display:none!important}
}


/* Beat every legacy per-screen/mobile timer exception with one final invariant. */
@media (hover: none) and (pointer: coarse) and (max-width:932px){
  body .game-shell .main-stage div.timer[role="timer"]{
    width:var(--countdown-size)!important;height:var(--countdown-size)!important;
    min-width:var(--countdown-size)!important;min-height:var(--countdown-size)!important;
    flex:0 0 var(--countdown-size)!important;
  }
  body .game-shell .main-stage div.timer[role="timer"]>span{
    position:absolute!important;inset:0!important;width:100%!important;height:100%!important;
    display:grid!important;place-items:center!important;margin:0!important;padding:0!important;
    font-size:var(--countdown-number-size)!important;line-height:1!important;letter-spacing:-.6px!important;
    text-align:center!important;transform:none!important;
  }
}

/* 2026-09-18 phone precision fixes. */
@media (hover:none) and (pointer:coarse) and (max-width:932px){
  /* Center lobby add icons independent of browser SVG baseline differences. */
  .empty-avatar{display:grid!important;place-items:center!important;padding:0!important;line-height:1!important}
  .empty-avatar>svg{width:58%!important;height:58%!important;margin:0!important;transform:none!important}

  /* ATTACKS is a touch-draggable horizontal strip. Numeric badges are intentionally hidden. */
  .battle-round-track{pointer-events:auto!important}
  .battle-track-list{overflow-x:auto!important;overflow-y:hidden!important;touch-action:pan-x!important;-webkit-overflow-scrolling:touch!important;scrollbar-width:none!important;overscroll-behavior-x:contain}
  .battle-track-list::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}
  .battle-track-round{flex:0 0 auto!important;grid-template-columns:24px minmax(42px,auto)!important;min-width:max-content!important;padding-inline:3px!important}
  .battle-track-node{display:none!important}
  .battle-track-name{display:block!important;max-width:68px!important}

  /* Avoid WebKit/Chrome SVG drop-shadow raster artefacts around player silhouettes.
     Win-fx avatars are excluded: !important here would also beat the overlay's filter
     animations (takedown's black-and-white drain); win-fx.css resets their filter without it. */
  .avatar:not(.win-fx *),.map-owner-avatar,.attack-matchup-map-avatar,.revealed-avatar .avatar,.rapid-choice-avatar .avatar,.geo-result-row .avatar,.player-emote-bubble{
    filter:none!important;-webkit-filter:none!important;box-shadow:none!important
  }

  .lobby-player-admin{gap:3px!important;margin-left:auto!important}
  .lobby-player-admin .quiet-button{min-height:26px!important;height:26px!important;padding:3px 5px!important;font-size:8px!important}
  .emoji-menu{left:5px!important;bottom:calc(100% + 4px)!important;gap:2px!important;padding:4px!important}
  .emoji-menu button{width:29px!important;height:29px!important;font-size:17px!important}
  .player-emote-bubble{left:24px!important;bottom:27px!important;font-size:22px!important}
  .question-feedback-buttons{gap:4px!important;margin-top:4px!important}
  .question-feedback-buttons .quiet-button{min-height:29px!important;padding:4px 7px!important;font-size:9px!important}
  .word-hint-button{min-width:84px!important}
  .word-hint-status,.word-hint-nudge{font-size:9px!important;min-height:26px!important}
}

@media (hover:none) and (pointer:coarse) and (max-width:932px){
  .question-upvote-button,.question-report-button{margin-top:0!important;padding:3px 7px!important;font-size:9px!important}
  .word-space-hint{font-size:9px!important;min-height:26px!important}
}

/* 2026-09-21 phone identity/expression/map/reveal corrections. */
@media (hover:none) and (pointer:coarse) and (max-width:932px){
  .profile-gate{padding:14px!important}.profile-card{padding:20px 16px!important;gap:12px!important}.profile-card .stage-title{font-size:30px!important}
  .lobby-self-config{grid-template-columns:1fr!important;gap:5px!important;padding:5px 6px!important}.lobby-name-editor{grid-template-columns:minmax(0,1fr) auto!important}.lobby-name-editor input{height:30px!important;font-size:10px!important}.lobby-name-editor .quiet-button{height:30px!important;min-height:30px!important;padding:3px 6px!important;font-size:8px!important}
  .lobby-identity-controls{grid-template-columns:52px minmax(0,1fr)!important;gap:3px 5px!important}.lobby-identity-controls>small{font-size:7px!important}.identity-choice-row{gap:3px!important}.identity-choice{width:27px!important;height:27px!important;border-radius:7px!important}.colour-choice span{width:16px!important;height:16px!important}.shape-choice .avatar{width:20px!important;height:20px!important}
  .bot-difficulty-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:3px!important}.bot-seat-config{padding:3px 4px!important;gap:4px!important}.bot-seat-config>strong{font-size:7px!important}.bot-difficulty{gap:3px!important}.bot-difficulty label{font-size:6px!important;gap:2px!important}.bot-difficulty input{width:34px!important;height:24px!important;font-size:8px!important}.bot-difficulty select{height:24px!important;max-width:92px!important;font-size:7px!important;padding:1px 2px!important}.bot-difficulty-summary{font-size:6px!important}
  .question-duration-controls{padding:4px 5px!important}.question-duration-controls legend{font-size:7px!important}.duration-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important}.duration-grid label{grid-template-columns:minmax(0,1fr) 32px!important;font-size:7px!important}.duration-grid input{width:32px!important;height:24px!important;font-size:8px!important}.duration-grid small{display:none!important}
  .bot-fill-icon small{display:block!important;font-size:5px!important;right:-3px!important;bottom:-3px!important}
  .reroll-note{font-size:6px!important;top:-5px!important}

  /* WebKit can otherwise paint transparent/black glyphs in the crossword boxes. */
  .word-cell{color:#fff!important;-webkit-text-fill-color:#fff!important;caret-color:#d8ff36!important;opacity:1!important;text-shadow:none!important}

  /* Give the silhouette itself a thin vector outline without reintroducing raster shadows. */
  .avatar>g:first-of-type>*{stroke:#1a0d2b!important;stroke-width:.65!important;paint-order:stroke fill!important;vector-effect:non-scaling-stroke!important}
  .player-card.is-you .avatar>g:first-of-type>*{stroke:#f5f0fa!important;stroke-width:.85!important}

  .intro-screen .format-icon[data-kind="number"]{width:52px!important;height:52px!important;border-radius:14px!important}.intro-screen .format-icon[data-kind="number"] b{font-size:28px!important;line-height:1!important}.intro-question-title{max-width:94vw!important;font-size:14px!important;margin-top:-2px!important}

  /* Crossed swords: thinner vector outlines keep both blades/guards visible at small sizes. */
  .attack-sword-blade{stroke-width:.8!important}.attack-sword-guard,.attack-sword-grip{stroke-width:3.2!important}.attack-crossed-swords{filter:none!important;-webkit-filter:none!important}

  .expression-menu button{width:34px!important;height:34px!important;padding:2px!important}.expression-menu .avatar{width:30px!important;height:30px!important}.avatar.emote-expression{overflow:visible!important}
  .player-card.needs-action:not(.score-jumping) .avatar,.land-player-identity.needs-action .avatar{animation-duration:.78s!important}

  .numeric-correct-answer{min-height:46px!important}.numeric-correct-answer strong{font-size:28px!important}.numeric-result-row .reveal-hit{grid-template-columns:minmax(75px,1fr) 58px minmax(48px,.65fr) 91px!important;gap:4px!important}.numeric-submitted-answer{font-size:10px!important}.numeric-result-detail{gap:3px!important}.numeric-distance{font-size:8px!important}.numeric-result-detail small{font-size:7px!important}.numeric-sort-note{font-size:8px!important}
  .cinematic-reveal:not(.rapid-sequence-reveal) .reveal-track{min-width:22px!important;overflow:hidden!important}.cinematic-reveal:not(.rapid-sequence-reveal) .reveal-correctness{flex:0 0 88px!important;position:relative!important;z-index:2!important;background:#28163e!important}
  .order-end-label{padding-inline:18px!important;font-size:7px!important}

  .geo-map>svg{touch-action:none!important}.puffy-star{filter:none!important}.map-credit{font-size:7px!important;white-space:normal!important}
  .battle-highlight-pair{gap:4px!important}.battle-highlight-pair .land-player-identity{padding:4px!important}.battle-highlight-pair .land-player-name{font-size:10px!important}.battle-highlight-pair .land-player-label{font-size:6px!important}
}

@media (hover:none) and (pointer:coarse) and (max-width:932px) and (max-height:650px){
  .lobby{gap:3px!important}.lobby-heading{gap:4px!important}.lobby-heading .stage-title{font-size:21px!important}.room-code{padding:5px 8px!important}.room-code b{font-size:17px!important}.lobby-players{gap:3px!important}.lobby-player{min-height:31px!important;padding:2px 3px!important}.lobby-player .avatar,.empty-avatar{width:19px!important;height:19px!important;flex-basis:19px!important}.lobby-player strong{font-size:8px!important}.lobby-self-config{padding:3px 4px!important}.identity-choice{width:23px!important;height:23px!important}.question-duration-controls{padding:2px 4px!important}.duration-grid input{height:21px!important}.bot-difficulty-grid{gap:2px!important}.bot-seat-config{padding:2px 3px!important}.lobby-config-grid{gap:4px!important}.lobby-bottom{margin-top:1px!important;padding-top:1px!important}.question-kind-option{min-height:24px!important}
}

/* 2026-09-22: ten-player phone layouts stay within the viewport. */
@media (hover:none) and (pointer:coarse) and (max-width:932px){
  .player-strip.player-count-7,
  .player-strip.player-count-8,
  .player-strip.player-count-9,
  .player-strip.player-count-10{grid-template-columns:repeat(5,minmax(0,1fr))!important;row-gap:1px!important}
  .player-strip.player-count-7 .player-card-copy,
  .player-strip.player-count-8 .player-card-copy,
  .player-strip.player-count-9 .player-card-copy,
  .player-strip.player-count-10 .player-card-copy{display:none!important}
  .player-strip.player-count-7 .player-card,
  .player-strip.player-count-8 .player-card,
  .player-strip.player-count-9 .player-card,
  .player-strip.player-count-10 .player-card{justify-content:center!important;padding:0 2px!important;gap:2px!important}
  .lobby-players{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:3px!important}
  .lobby-player{min-width:0!important}
}
@media (hover:none) and (pointer:coarse) and (max-width:932px) and (orientation:landscape){
  .player-strip.player-count-7,
  .player-strip.player-count-8,
  .player-strip.player-count-9,
  .player-strip.player-count-10{grid-template-columns:repeat(var(--player-count),minmax(0,1fr))!important;row-gap:0!important}
}

/* Compact lobby hierarchy on phones. */
@media (max-width:600px) and (hover:none) and (pointer:coarse){
  .lobby{gap:5px!important}
  .lobby-heading{gap:6px!important}
  .lobby-heading .stage-title{font-size:20px!important}
  .room-code{min-height:34px!important;padding:4px 7px!important;gap:6px!important}
  .room-code small{display:none!important}
  .room-code b{font-size:15px!important;letter-spacing:.1em!important}
  .room-code>span{font-size:0!important}
  .room-code>span svg{width:14px!important;height:14px!important}
  .lobby-self-config{gap:4px!important;padding:4px 5px!important}
  .lobby-identity-controls{grid-template-columns:38px minmax(0,1fr)!important;gap:2px 4px!important}
  .lobby-identity-controls>small{font-size:7px!important}
  .identity-choice-row{gap:2px!important;overflow-x:auto!important;flex-wrap:nowrap!important}
  .identity-choice{width:24px!important;height:24px!important;flex-basis:24px!important;border-radius:6px!important}
  .colour-choice span{width:14px!important;height:14px!important}
  .shape-choice .avatar{width:18px!important;height:18px!important}
  .lobby-config-grid{gap:4px!important}
  .lobby-map-preview{padding:4px 5px!important}
  .lobby-map-preview-board{min-height:92px!important}
  .lobby-advanced>summary{min-height:32px!important;padding:5px 7px!important;font-size:9px!important}
  .lobby-advanced-content{gap:5px!important;padding:0 6px 6px!important}
  .lobby-advanced>summary::after,.bot-settings-disclosure>summary::after{width:18px;height:18px;font-size:14px}
  .question-kind-picker{margin-top:5px!important}
  .question-kind-picker legend,.question-duration-controls legend{font-size:7px!important}
  .question-kind-grid{gap:3px!important;margin-top:3px!important}
  .question-kind-option{min-height:26px!important;padding:3px 5px!important;font-size:8px!important}
  .question-duration-controls{padding:4px 5px!important}
  .bot-settings-disclosure>summary{min-height:28px!important;padding:4px 6px!important;font-size:8px!important}
  .bot-difficulty-grid{padding:0 4px 4px!important}
  .lobby-bottom{padding-top:4px!important}
}

/* Phone tile maps need proportionally lighter non-scaling borders. Desktop keeps the
   existing 3/4/5px hierarchy; these overrides apply only to coarse phone layouts. */
@media (hover: none) and (pointer: coarse) and (max-width: 932px) {
  .candy-board .tile { stroke-width: 1.2px !important; }
  .candy-board .tile.eligible,
  .candy-board .tile.eligible-view { stroke-width: 1.7px !important; }
  .candy-board .tile.selected-tile { stroke-width: 2.2px !important; }
}

/* Map sidecar is one consistent component on mobile as well. Override legacy
   compressed battle/queue rules (which previously shrank names to 9px). */
@media(max-width:932px){
  .land-sidecar.land-info-panel{
    width:100%!important;max-width:100%!important;min-width:0!important;
    padding:9px!important;gap:7px!important;border-radius:13px!important;
  }
  .land-sidecar.land-info-panel .land-player-identity{
    padding:5px 7px!important;gap:8px!important;border-radius:9px!important;min-height:37px!important;
  }
  .land-sidecar.land-info-panel .land-player-avatar,
  .land-sidecar.land-info-panel .land-battle-pair .land-player-avatar,
  .land-sidecar.land-info-panel .queue-row .avatar{
    width:32px!important;height:32px!important;flex:0 0 32px!important;
  }
  .land-sidecar.land-info-panel .land-player-name,
  .land-sidecar.land-info-panel .land-battle-pair .land-player-name{
    font-size:12px!important;line-height:1.16!important;white-space:normal!important;
    max-width:100%!important;word-break:normal!important;overflow-wrap:anywhere!important;
  }
  .land-sidecar.land-info-panel .land-player-label,
  .land-sidecar.land-info-panel .land-battle-pair .land-player-label{font-size:9px!important}
  .land-sidecar.land-info-panel .land-panel-notice{padding:6px 8px!important;gap:3px!important}
  .land-sidecar.land-info-panel .land-panel-kicker{font-size:9px!important}
  .land-sidecar.land-info-panel .land-panel-description{font-size:11px!important;line-height:1.3!important}
  .land-sidecar.land-info-panel .land-panel-countdown{padding-top:4px!important;gap:7px!important}
  .land-sidecar.land-info-panel .land-panel-countdown>span{font-size:11px!important}
  .land-sidecar.land-info-panel .queue-list{max-height:95px!important;overflow-y:auto!important}
  .land-sidecar.land-info-panel .land-battle-pair{gap:3px!important}
  .land-sidecar.land-info-panel .land-battle-divider{font-size:8px!important}
}
@media(prefers-reduced-motion:reduce){
  .land-sidecar.land-info-panel .land-player-identity .avatar{animation:none!important}
}
@media(max-width:932px){
  /* Older compact selection styles hid the role labels entirely. */
  .land-sidecar.land-info-panel .land-player-label{display:block!important}
  .land-sidecar.land-info-panel .selected-attack-card{padding:0!important;margin:0!important;gap:0!important}
}

.land-info-panel .land-player-name{font-size:16px!important}.land-info-panel .land-player-label{font-size:12px!important}.land-panel-description{font-size:14px!important}.question-feedback-buttons{flex-direction:row!important;gap:14px!important}.question-feedback-buttons button{width:50px!important;height:48px!important;font-size:26px!important}

/* Last-resort responsive visual overrides shared by all phases. */
.candy-board .tile.eligible:not(.selected-tile){stroke-dasharray:2 8!important;stroke-linecap:round!important}
.candy-board .tile.selected-tile{stroke-dasharray:none!important;stroke:#ffffff!important;stroke-linecap:round!important}
.battle-question-matchup{background:none!important;border:0!important;box-shadow:none!important;padding:2px 6px!important;max-width:100%!important}
.battle-question-matchup .land-player-identity{background:none!important;border:0!important;outline:0!important;box-shadow:none!important;padding:0!important}
.battle-question-matchup .land-player-avatar{width:clamp(65px,9vw,112px)!important;height:clamp(65px,9vw,112px)!important}
.battle-question-matchup .land-player-name{font-size:17px!important;overflow-wrap:anywhere!important}
.battle-reveal-pair .battle-winner .land-player-avatar{animation:battle-windup-punch 850ms 200ms cubic-bezier(.23,.78,.24,1) both!important}
.battle-reveal-pair .battle-loser .land-player-avatar{animation:battle-hit-fall 1100ms 610ms cubic-bezier(.22,.7,.3,1) both!important}
.live-results-countdown{display:flex;justify-content:center;align-items:center;gap:14px;font-size:15px;font-weight:750;color:#e6d7f1}
.live-results-countdown .timer{width:58px;height:58px}
@media(max-width:600px){.battle-question-matchup .land-player-avatar{width:66px!important;height:66px!important}.battle-question-matchup .land-player-name{font-size:14px!important}.battle-question-matchup .land-player-label{font-size:11px!important}.battle-question-stage{gap:2px!important}}
@media(prefers-reduced-motion:reduce){.battle-reveal-pair .land-player-avatar{animation:none!important}}

/* Side text is unboxed, like the player identities. */
.land-info-panel,.land-panel.land-sidecar{background:none!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;padding:8px!important}
.land-info-panel .land-player-identity,.land-info-panel .land-panel-notice{border:0!important;background:none!important;box-shadow:none!important;outline:0!important}

.land-info-panel .land-player-label,.land-panel-kicker,.land-player-label{font-size:14px!important}.land-info-panel .land-panel-description{font-size:16px!important}
