/* Guessing with Friends — consolidated UX presentation layer (2026-10-14).
   This file deliberately follows game.css and mobile.css; it replaces conflicting
   late overrides without altering mechanics or authoritative state. */
:root {
  --ux-ink: #f9f3ff;
  --ux-secondary: #d9c9e8;
  --ux-subtle: #c1acd5;
  --ux-panel: #21132f;
  --ux-border: #765d9266;
  --ux-focus: #ffe16a;
  --ux-gold: #ffbf2a;
  --ux-success: #73e56c;
  --ux-pink: #ff579b;
  --ux-time-fast: 140ms;
  --ux-time-normal: 240ms;
  --ux-time-impact: 650ms;
  --ux-ease: cubic-bezier(.2,.75,.28,1);
  --ux-ease-impact: cubic-bezier(.18,.9,.25,1);
  font-family: Outfit, ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* Persistent shell: the score strip always remains on screen. The center stage
   is independently scrollable instead of pushing the scores below the viewport. */
html,body,#root {height:100%;min-height:0;}
.game-shell {
  display:flex!important;flex-direction:column!important;
  height:100dvh!important;min-height:0!important;max-height:100dvh!important;
  overflow:hidden!important;
}
.game-shell>.topbar,.game-shell>.connection-note {flex:0 0 auto;}
.game-shell>.main-stage {
  flex:1 1 auto!important;min-height:0!important;
  overflow-y:auto!important;overflow-x:hidden!important;
  overscroll-behavior:contain;
}
.game-shell>.player-strip {
  flex:0 0 auto!important;position:relative!important;bottom:auto!important;
  max-height:30dvh;overflow-y:auto!important;
}
.player-name{font-size:clamp(12px,1vw,15px)!important;}
.player-meta{font-size:clamp(11px,.9vw,13px)!important;}
body { color:var(--ux-ink); }
button,input,select,textarea { font:inherit; }
button:not(:disabled) { cursor:pointer; }
button, input, select, textarea { touch-action: manipulation; }
:where(button, input, select, textarea, [tabindex]):focus-visible {
  outline:3px solid var(--ux-focus)!important;
  outline-offset:3px!important;
}
:where(.stage-title,.question-heading h1,.land-header h1) {
  max-width:100%; min-width:0; overflow-wrap:break-word;
  text-wrap:balance; color:var(--ux-ink);
  letter-spacing:-.035em!important;
  line-height:1.1!important;
}
.stage-title { font-size:clamp(28px,3.7vw,54px)!important; }
.question-heading h1 { font-size:clamp(25px,3.4vw,50px)!important; }
:where(.subtitle,.rule-note,.selection-hint) {
  color:var(--ux-secondary)!important; line-height:1.38!important;
}
.eyebrow { color:#d9b6ff!important; font-size:clamp(12px,1vw,15px)!important; font-weight:800!important; letter-spacing:.09em!important; }
:where(.land-player-label,.land-panel-kicker,.player-meta,.land-panel-countdown>span) {
  color:var(--ux-secondary)!important;
  letter-spacing:.045em!important;
}
.land-info-panel .land-player-label,.land-player-label,.land-panel-kicker {
  font-size:clamp(12px,1vw,14px)!important; line-height:1.25!important;
}
.land-info-panel .land-panel-description,.land-panel-description {
  font-size:clamp(15px,1.3vw,18px)!important;line-height:1.35!important;
  color:var(--ux-ink)!important;text-wrap:pretty;
}
.land-info-panel .land-player-name,.land-player-name {
  font-size:clamp(16px,1.45vw,21px)!important;line-height:1.22!important;
  white-space:normal!important;overflow-wrap:anywhere;
  text-overflow:initial!important;
}
.land-info-panel .land-player-identity,.land-info-panel .land-panel-notice {
  padding:6px 0!important; background:none!important;border:none!important;
  box-shadow:none!important;outline:0!important;
}
.land-sidecar.land-info-panel {
  min-width:0!important; max-width:100%!important;
  padding:clamp(8px,1.3vw,16px)!important;
  display:flex!important;flex-direction:column!important;
  align-items:stretch!important;gap:clamp(9px,1vw,16px)!important;
}
.land-info-panel .land-player-avatar {flex:0 0 auto!important;}
.land-info-panel .land-player-copy { min-width:0!important; }
.land-info-panel .land-player-identity.is-you {border-left:3px solid var(--player,var(--ux-focus))!important;padding-left:9px!important;}
.land-info-panel .auto-timer,.land-info-panel .land-panel-countdown {gap:12px!important;align-items:center!important;}
.land-info-panel .land-panel-countdown>span {font-size:14px!important;font-weight:800!important;}
.land-info-panel .queue-list {overflow-y:auto!important;scrollbar-width:thin;max-height:min(38dvh,270px)!important;}
.land-panel-notice p {margin:0!important;}

/* Navigation, affordances, and the MCQ palette: colour is not the sole feedback. */
:where(.primary,.secondary,.quiet-button,.icon-button) {
  transition:transform var(--ux-time-fast) var(--ux-ease),
    background-color var(--ux-time-fast) ease,box-shadow var(--ux-time-normal) ease!important;
  font-weight:800!important;
}
:where(.primary,.secondary,.quiet-button):not(:disabled):active {transform:translateY(2px) scale(.985);}
:where(.primary,.secondary):disabled {opacity:.6;cursor:not-allowed;}
:where(.question-feedback-buttons button,.identity-choice,.order-arrows button,.map-tools button) {
  min-width:44px!important;min-height:44px!important;
}
.question-feedback-buttons button {
  background:#ffffff0b!important;border:1px solid #ffffff3b!important;
  color:var(--ux-ink)!important;border-radius:12px!important;
}
.question-feedback-buttons button.active {
  border-color:var(--ux-success)!important;
  background:#73e56c22!important;
}
.answer-option {
  min-height:64px!important; padding:clamp(12px,1.6vw,22px)!important;
  font-size:clamp(17px,2vw,27px)!important;
  line-height:1.26!important;overflow-wrap:anywhere;
  border-radius:16px!important;
  transition:transform var(--ux-time-fast) var(--ux-ease),filter var(--ux-time-fast) ease!important;
}
.answer-option:where(:hover,:focus-visible):not(:disabled) {filter:brightness(1.065);}
.answer-option:active:not(:disabled) {transform:translateY(3px) scale(.99)!important;}
.answer-option.chosen {outline:3px solid var(--ux-ink);outline-offset:-3px;}
.option-key {flex:0 0 auto;}
.number-form input,.word-cell.input {font-size:max(16px,1rem)!important;}
.order-arrows {flex:0 0 auto;}
.order-item strong {line-height:1.3!important;}

/* Timers/answers: tabular digits prevent jitter. Never rely on colour alone. */
.timer,.timer span,.score-total-stack,.player-score,.live-answer-time,.numeric-result-detail {
  font-variant-numeric:tabular-nums;
}
.timer {flex-shrink:0;}
.timer.urgent {color:#fff6c4!important;}
.live-answer-results {background:linear-gradient(145deg,#251633,#190e29)!important;border-color:var(--ux-border)!important;}
.live-results-heading {font-size:clamp(17px,1.5vw,20px)!important;}
.live-answer-row {min-height:50px!important;gap:12px!important;border-radius:11px!important;}
.live-answer-row.is-done {border-left:3px solid var(--player)!important;}
.live-answer-name,.live-answer-time {font-size:clamp(14px,1.2vw,17px)!important;}
.reveal-person b,.revealed-avatar small,.score-award-name {min-width:0;overflow-wrap:anywhere;}
.reveal-time-row,.live-answer-row,.final-row {color:var(--ux-ink);}
.question-heading {margin-block:clamp(12px,2vw,26px)!important;}

/* More legible scoreboard while retaining every player's score on screen. */
.player-strip {border-top:1px solid var(--ux-border)!important;}
.player-card {min-width:0!important;}
.player-card-copy {min-width:0!important;}
.player-name {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.player-name:disabled {color:var(--ux-ink)!important;}
.player-meta {color:var(--ux-secondary)!important;}
.player-card.needs-action:not(.score-jumping) .avatar,
.land-player-identity.needs-action .avatar {
  animation:ux-attention 3.3s var(--ux-ease) infinite!important;
}
@keyframes ux-attention {
  0%,82%,100%{transform:translateY(0)}
  88%{transform:translateY(-4px)}
  94%{transform:translateY(0)}
}

/* Attack animations stay within their panel: directional and finite. */
.land-battle-pair.is-result .land-player-identity {min-width:0;}
.land-battle-pair.is-result .land-player-copy {max-width:100%;}
.land-battle-pair.is-result .land-player-avatar {transform-origin:50% 65%;}
.land-battle-pair.is-result .land-player-identity:first-child.battle-winner .land-player-avatar,
.battle-reveal-pair .land-player-identity:first-child.battle-winner .land-player-avatar {
  animation:ux-punch-right .86s .16s var(--ux-ease-impact) both!important;
}
.land-battle-pair.is-result .land-player-identity:last-child.battle-winner .land-player-avatar,
.battle-reveal-pair .land-player-identity:last-child.battle-winner .land-player-avatar {
  animation:ux-punch-left .86s .16s var(--ux-ease-impact) both!important;
}
.land-battle-pair.is-result .land-player-identity:first-child.battle-loser .land-player-avatar,
.battle-reveal-pair .land-player-identity:first-child.battle-loser .land-player-avatar {
  animation:ux-fall-left 1.05s .5s var(--ux-ease-impact) both!important;
}
.land-battle-pair.is-result .land-player-identity:last-child.battle-loser .land-player-avatar,
.battle-reveal-pair .land-player-identity:last-child.battle-loser .land-player-avatar {
  animation:ux-fall-right 1.05s .5s var(--ux-ease-impact) both!important;
}
@keyframes ux-punch-right {
  0%,100%{transform:translate3d(0,0,0) rotate(0)}
  27%{transform:translate3d(-13px,-3px,0) rotate(-10deg)}
  55%{transform:translate3d(22px,-2px,0) rotate(12deg)}
  71%{transform:translate3d(5px,0,0) rotate(1deg)}
}
@keyframes ux-punch-left {
  0%,100%{transform:translate3d(0,0,0) rotate(0)}
  27%{transform:translate3d(13px,-3px,0) rotate(10deg)}
  55%{transform:translate3d(-22px,-2px,0) rotate(-12deg)}
  71%{transform:translate3d(-5px,0,0) rotate(-1deg)}
}
@keyframes ux-fall-left {
  0%,28%{transform:translate3d(0,0,0) rotate(0)}
  54%{transform:translate3d(-13px,-7px,0) rotate(-26deg)}
  80%,100%{transform:translate3d(-15px,12px,0) rotate(-78deg)}
}
@keyframes ux-fall-right {
  0%,28%{transform:translate3d(0,0,0) rotate(0)}
  54%{transform:translate3d(13px,-7px,0) rotate(26deg)}
  80%,100%{transform:translate3d(15px,12px,0) rotate(78deg)}
}

/* Particle budget: one brief celebratory shower, never a persistent effect. */
.confetti {isolation:isolate;pointer-events:none;}
.confetti i {width:6px;height:11px;border-radius:2px;animation-duration:2.15s!important;}
.confetti i:nth-child(3n) {border-radius:999px;width:7px;height:7px;}
.confetti i:nth-child(4n) {height:13px;width:4px;}

/* Secondary HUD labels must remain legible, even in compact modes. */
:where(.numeric-distance,.numeric-result-detail small,.numeric-sort-note,
       .order-end-label,.map-credit,.word-hint-status,.word-space-hint,
       .bot-difficulty-summary,.bot-seat-config>strong,.duration-grid small,
       .reroll-note) {font-size:12px!important;line-height:1.25!important;}
:where(.numeric-result-detail,.geo-result-row,.reveal-times) {min-width:0;}
.lobby-player strong {font-size:clamp(12px,1vw,15px)!important;overflow-wrap:anywhere;}
.lobby .lobby-player-admin .quiet-button {font-size:12px!important;min-height:36px!important;}
/* Consistent icon sizing regardless of character/emoji glyph metrics. */
:where(.question-feedback-buttons button,.top-actions .icon-button,
       .map-tools button) svg {width:22px;height:22px;flex:0 0 auto;}
/* Lobby: clear controls matter more than squeezing every choice into a tiny row. */
.lobby-player>span:not(.reroll-note) {font-size:12px!important;}
.lobby-player strong {overflow-wrap:anywhere;}
.lobby-identity-controls>small,.question-kind-picker legend,.question-duration-controls legend {font-size:12px!important;}
.lobby-advanced>summary,.bot-settings-disclosure>summary {font-size:14px!important;min-height:44px!important;}
.question-kind-option {font-size:13px!important;min-height:44px!important;}
.identity-choice {min-height:42px!important;min-width:42px!important;flex-basis:42px!important;border-radius:11px!important;}
.identity-choice .avatar {max-width:30px;max-height:30px;}
.identity-choice-row {scroll-snap-type:x proximity;}
.identity-choice {scroll-snap-align:start;}
.bot-difficulty label,.duration-grid label {font-size:12px!important;}

@media (max-width: 932px) {
  .land-sidecar.land-info-panel .land-player-name,
  .land-sidecar.land-info-panel .land-battle-pair .land-player-name {
    font-size:clamp(15px,3.5vw,19px)!important;line-height:1.2!important;
  }
  .land-sidecar.land-info-panel .land-player-label,
  .land-sidecar.land-info-panel .land-battle-pair .land-player-label,
  .land-sidecar.land-info-panel .land-panel-kicker {
    font-size:12px!important;
  }
  .land-sidecar.land-info-panel .land-panel-description,
  .land-sidecar.land-info-panel .land-panel-countdown>span {font-size:14px!important;line-height:1.3!important;}
  .land-sidecar.land-info-panel .land-player-identity {padding:5px 0!important;min-height:44px!important;}
  .land-sidecar.land-info-panel .land-player-avatar,
  .land-sidecar.land-info-panel .land-battle-pair:not(.is-result) .land-player-avatar,
  .land-sidecar.land-info-panel .queue-row .avatar {width:40px!important;height:40px!important;flex:0 0 40px!important;}
  .land-sidecar.land-info-panel .land-battle-pair.is-result .land-player-avatar {width:clamp(78px,13vw,112px)!important;height:clamp(78px,13vw,112px)!important;}
  .land-sidecar.land-info-panel .queue-list {max-height:min(32dvh,260px)!important;}
  /* Allow stage scrolling when the keyboard, question, or small height needs it. */
  .main-stage {min-width:0!important;overflow-y:auto!important;overscroll-behavior-y:contain;scrollbar-width:thin;}
  .land-layout,.map-and-panel,.queue-layout,.reward-stage,.outcome-layout,.final-layout {min-width:0!important;}
  .stage-title {font-size:clamp(24px,4.5vw,41px)!important;}
}
@media (max-width: 600px) {
  .topbar {min-height:46px!important;}
  .stage-title {font-size:clamp(24px,6vw,33px)!important;}
  .question-heading h1 {font-size:clamp(22px,5.7vw,31px)!important;}
  .subtitle {font-size:15px!important;}
  .eyebrow {font-size:12px!important;}
  .answer-option {font-size:17px!important;min-height:60px!important;padding:12px 13px!important;}
  .word-entry-actions .primary,.number-form .primary,.geo-question-copy .primary {min-height:44px!important;}
  .live-answer-results {padding:10px 11px!important;gap:7px!important;}
  .live-answer-row {min-height:44px!important;grid-template-columns:30px minmax(0,1fr) auto!important;gap:7px!important;}
  .live-answer-name,.live-answer-time {font-size:13px!important;}
  .live-answer-time {min-width:70px!important;}
  /* Twelve-point control text is a hard floor, not a space-saving suggestion. */
  .lobby-identity-controls>small,.lobby-advanced>summary,.bot-settings-disclosure>summary,
  .question-kind-picker legend,.question-duration-controls legend,.question-kind-option,
  .lobby-options>label,.lobby-player>span:not(.reroll-note) {font-size:12px!important;}
  .lobby .lobby-heading .stage-title {font-size:24px!important;}
  .lobby-advanced>summary,.bot-settings-disclosure>summary {min-height:42px!important;}
  .question-kind-option {min-height:42px!important;padding:8px!important;}
  .identity-choice {width:42px!important;height:42px!important;min-width:42px!important;flex-basis:42px!important;}
  .shape-choice .avatar {width:27px!important;height:27px!important;}
  .colour-choice span {width:25px!important;height:25px!important;}
  .lobby-self-config {padding:10px!important;gap:8px!important;}
  .lobby-config-grid {gap:12px!important;}
  .lobby-map-preview-board {min-height:128px!important;}
  .lobby-advanced-content {gap:12px!important;padding:10px!important;}
  .duration-grid input,.bot-difficulty input,.bot-difficulty select {min-height:40px!important;}
  .land-sidecar.land-info-panel {padding:10px!important;gap:10px!important;}
  .land-sidecar.land-info-panel .land-player-name {font-size:16px!important;}
  .land-sidecar.land-info-panel .land-panel-description {font-size:14px!important;}
  .land-sidecar.land-info-panel .land-panel-countdown>span {font-size:14px!important;}
  .battle-question-matchup .land-player-name {font-size:14px!important;}
  .battle-question-matchup .land-player-avatar {width:clamp(58px,16vw,82px)!important;height:clamp(58px,16vw,82px)!important;}
  .player-strip {row-gap:3px!important;padding:5px 5px calc(5px + env(safe-area-inset-bottom,0px))!important;}
  .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;
  }
  .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 {
    height:61px!important;min-height:61px!important;
    padding:3px!important;display:flex!important;flex-direction:column!important;
    align-items:center!important;justify-content:center!important;gap:2px!important;
    border-left:none!important;
  }
  .player-strip.player-count-7 .player-score-anchor,.player-strip.player-count-8 .player-score-anchor,
  .player-strip.player-count-9 .player-score-anchor,.player-strip.player-count-10 .player-score-anchor {
    min-width:0!important;flex:0 0 auto!important;display:flex!important;align-items:center!important;gap:2px!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 {
    height:auto!important;min-height:0!important;display:block!important;width:100%!important;text-align:center!important;
  }
  .player-strip.player-count-7 .player-meta,.player-strip.player-count-8 .player-meta,
  .player-strip.player-count-9 .player-meta,.player-strip.player-count-10 .player-meta {display:none!important;}
  .player-strip.player-count-7 .player-name,.player-strip.player-count-8 .player-name,
  .player-strip.player-count-9 .player-name,.player-strip.player-count-10 .player-name {
    display:block;width:100%;font-size:12px!important;line-height:1.2!important;text-align:center;
  }
  .player-strip.player-count-7 .player-card .avatar,.player-strip.player-count-8 .player-card .avatar,
  .player-strip.player-count-9 .player-card .avatar,.player-strip.player-count-10 .player-card .avatar {
    width:24px!important;height:24px!important;flex:0 0 24px!important;
  }
  .player-strip.player-count-7 .player-score,.player-strip.player-count-8 .player-score,
  .player-strip.player-count-9 .player-score,.player-strip.player-count-10 .player-score {
    font-size:15px!important;white-space:nowrap;
  }
}
@media (max-width: 370px) {
  .lobby-player {min-width:0!important;padding:5px!important;}
  .lobby-player strong {font-size:12px!important;}
  .player-strip.player-count-7 .player-name,.player-strip.player-count-8 .player-name,
  .player-strip.player-count-9 .player-name,.player-strip.player-count-10 .player-name {font-size:12px!important;}
}
@media (max-height: 680px) {
  .main-stage {overflow-y:auto!important;overscroll-behavior:contain;}
  .intro-screen {padding-block:6px!important;}
  .question-heading {margin-block:10px!important;}
  .answer-options {gap:9px!important;}
  .stage-title {font-size:clamp(22px,4vw,35px)!important;}
}
@media (hover:none) and (pointer:coarse) and (max-width:932px) and (orientation:landscape) {
  .land-sidecar.land-info-panel .land-panel-description {font-size:13px!important;}
  .land-sidecar.land-info-panel .land-player-name {font-size:14px!important;}
  .main-stage {overflow-y:auto!important;}
}
/* The winning animation's final pose and the score are still readable with motion off. */
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {transition-duration:.01ms!important;animation-duration:.01ms!important;animation-delay:0ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;}
  .confetti {display:none!important;}
  .player-emote-pop {display:none!important;}
  .screen-enter,.reveal-time-row.revealed,.live-answer-row,.land-player-identity,
  .reveal-hit,.numeric-correct-answer.visible {opacity:1!important;filter:none!important;}
  .land-battle-pair .land-player-avatar,.battle-reveal-pair .land-player-avatar,
  .player-card.needs-action .avatar,.land-player-identity.needs-action .avatar {transform:none!important;}
}

@media (hover:none) and (pointer:coarse) {
  :where(.top-actions button,.lobby-name-editor button,.lobby-player-admin button,
         .number-form button,.word-entry-actions button,.order-arrows button) {
    min-height:44px!important;
  }
}

/* Personal player mute: a quiet, consistent icon beside each other player's name.
   Does not dim or hide their score, ownership or other gameplay information. */
.player-name-row {
  display:flex!important;
  align-items:center!important;
  gap:4px!important;
  min-width:0!important;
  width:100%!important;
}
.player-name-row .player-name {
  display:flex!important;
  align-items:center!important;
  flex:1 1 auto!important;
  width:auto!important;
  min-width:0!important;
  text-align:left!important;
  gap:2px!important;
}
.player-name-row .player-name-text {
  display:block;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.player-mute-button {
  appearance:none;
  display:grid;
  place-items:center;
  flex:0 0 28px;
  width:28px;
  height:28px;
  padding:5px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:#bbaccb;
  cursor:pointer;
  transition:color .15s ease, background .15s ease, border-color .15s ease;
}
.player-mute-glyph {display:block;width:17px;height:17px;flex-shrink:0;}
.player-mute-button:hover {color:#fff;background:#ffffff15;border-color:#ffffff25;}
.player-mute-button.is-muted {color:#ffe3a2;background:#ffbf2a16;border-color:#ffbf2a55;}
.player-mute-button:focus-visible {outline:2px solid #00cbe6;outline-offset:2px;}
.player-card .player-mute-button {flex-basis:26px;width:26px;height:26px;padding:4px;}
.player-card .player-mute-glyph {width:15px;height:15px;}
/* The same action is available while waiting in the lobby, before gameplay begins. */
.lobby-player {position:relative;}
.lobby-player > .player-mute-button {
  position:absolute;
  top:5px;
  right:5px;
  z-index:2;
  width:32px;
  height:32px;
  background:#1a1025db;
  border-color:#ffffff22;
}
.lobby-player > .player-mute-button.is-muted {background:#362514e8;border-color:#ffbf2a66;}
@media (max-width:600px) {
  .player-name-row {gap:2px!important;}
  .player-card .player-mute-button {width:25px;height:25px;flex-basis:25px;padding:4px;}
  .player-card .player-mute-glyph {width:15px;height:15px;}
  .lobby-player > .player-mute-button {width:32px;height:32px;top:3px;right:3px;}
}
@media (max-width:420px) {
  .player-strip.player-count-7 .player-name-row,.player-strip.player-count-8 .player-name-row,
  .player-strip.player-count-9 .player-name-row,.player-strip.player-count-10 .player-name-row {justify-content:center;}
  .player-strip.player-count-7 .player-mute-button,.player-strip.player-count-8 .player-mute-button,
  .player-strip.player-count-9 .player-mute-button,.player-strip.player-count-10 .player-mute-button {flex:0 0 23px;width:23px;height:23px;}
}
@media (prefers-reduced-motion:reduce) {
  .player-mute-button {transition:none!important;}
}
