/* Platinum Daylight theme (loaded LAST, after style.css and ui-redesign.css).
   Source of truth: docs/design/reskin-previews/08-platinum-daylight.html (DESIGN TOKENS block).
   Tokens, fonts, base components, then one section per screen / overlay. style.css and ui-redesign.css keep only
   structure, hit areas, the footer, ads, spinners and the debug product preview. */

@font-face { font-family: 'Red Hat Display'; font-style: normal; font-weight: 500 900; font-display: swap; src: url(fonts/RedHatDisplay-500-900.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(fonts/Figtree-400-800.woff2) format('woff2'); }

:root {
  color-scheme: light;
  --bg-1: #F8F9FB; --bg-2: #ECEFF3; --glow: #FFF3E6;
  --surface-a: #FFFFFF; --surface-b: #F4F6F9;
  --plat-a: #E9EDF2; --plat-b: #D9DFE6; --plat-c: #EEF1F5;
  --edge-a: #FFFFFF; --edge-b: #CDD5DE;
  --ink: #132029; --ink-muted: #4A5867;
  --accent-a: #17A3A0; --accent-b: #0C6B6A; --accent-btn: #0D7F7E; /* --accent-btn: lightest teal that still gives white text 4.5:1 */
  --accent-2: #F08A24; --accent-2-ink: #9A4D0C;
  /* Shared avatar kit and picker (src/vendor/*): picker colours mapped onto TPIR tokens; the page is light. */
  --avk-ring: rgba(10, 16, 40, .22);
  --avp-surface: var(--surface-a); --avp-raised: var(--surface-b); --avp-text: var(--ink); --avp-dim: var(--ink-muted);
  --avp-line: rgba(19, 32, 41, .16); --avp-accent: var(--accent-a); --avp-accent-tint: rgba(23, 163, 160, .14);
  --avp-focus: var(--focus); --avp-ink: #0A1028;

  --success: #17724A; --danger: #B33A25; --focus: #0C6B6A;
  --p0: #0D7F7E; --p1: #B85A0E; --p2: #6B5BD6; --p3: #C64B5C; --p4: #2A74B3; --p5: #4F7A27; /* white initials >= 4.5:1 */
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(19,32,41,.06), 0 12px 32px rgba(19,32,41,.10);
  --sh-2: 0 1px 2px rgba(19,32,41,.06), 0 6px 16px rgba(19,32,41,.07);
  --sh-btn: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 2px rgba(12,107,106,.30), 0 8px 20px rgba(23,163,160,.30);
  --glow-teal: 0 0 0 4px rgba(23,163,160,.12), 0 0 24px rgba(23,163,160,.35);
  --glow-tang: 0 0 0 4px rgba(240,138,36,.14), 0 0 26px rgba(240,138,36,.42);
  --ease: cubic-bezier(.22,.61,.36,1); --ease-move: cubic-bezier(.65,0,.35,1);
  --dur-enter: 520ms; --dur-exit: 360ms; --dur-snap: 120ms; --stagger: 90ms;
  --display: 'Red Hat Display', 'Figtree', system-ui, sans-serif;
  --ui: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Site footer */
  --footer-bg: #E3E8EE;
  --footer-text: var(--ink-muted);
  --footer-accent: var(--accent-b);
}

/* ---------- base ---------- */
html { background: var(--bg-2); -webkit-text-size-adjust: 100%; }
body {
  color: var(--ink);
  font: 500 16px/1.5 var(--ui);
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(900px 520px at 50% -8%, var(--glow) 0%, rgba(255,243,230,0) 62%) no-repeat,
              linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%) fixed;
}
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; letter-spacing: -.01em; color: var(--ink); }
h1 { letter-spacing: -.015em; }
button, input, select, textarea { font-family: var(--ui); color: inherit; }
label { font-weight: 700; font-size: .9rem; color: var(--ink); }
a { color: var(--accent-b); }
.num { font-variant-numeric: tabular-nums; }
.label, .eyebrow { font: 700 12px/1.25 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.muted, .phase-subtitle { color: var(--ink-muted); }

button:focus-visible, a:focus-visible, select:focus-visible, summary:focus-visible, [tabindex]:focus-visible,
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
input:focus-visible, textarea:focus-visible { outline: none; }

/* ---------- app shell and cards ---------- */
#app {
  max-width: 1180px; margin: 12px auto; padding: 0;
  background: transparent; border: 0; border-radius: 0;
}
.game-phase > h2 { color: var(--ink); }

.ui-panel, .showdown-results-table {
  position: relative; border: 1px solid transparent; border-radius: var(--r-lg); color: var(--ink);
  background: linear-gradient(180deg, var(--surface-a), var(--surface-b)) padding-box,
              linear-gradient(180deg, var(--edge-a), var(--edge-b)) border-box;
  box-shadow: var(--sh-1);
}
.phase-hint { background: #F2F5F8; border: 1px solid var(--edge-b); color: var(--ink); }
.phase-hint-dismiss, .amazon-verify-link { color: var(--accent-b); }
.amazon-verify-link { border-color: #C5CED8; }
.reveal-tip, .showcase-subtitle { color: var(--ink-muted); }
.player-host-badge, .player-you-badge { background: #E2F3F2; color: var(--accent-b); border: 1px solid #9ED8D5; }
.conn-status-label { color: var(--danger); }
.inline-feedback { color: var(--success); }
li { border-color: #E1E6EC; }

/* ---------- header (Session 2) ---------- */
.game-header {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 12px;
  grid-template-areas: "brand brand" "room actions";
  padding: 14px 12px 4px; background: none; border: 0; border-radius: 0; box-shadow: none; color: var(--ink);
}
.game-header-left { grid-area: brand; min-width: 0; display: flex; align-items: center; }
.game-header-right { grid-area: actions; justify-self: end; display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.wordmark-sm {
  display: flex; align-items: center; min-width: 0; white-space: nowrap;
  font: 900 1.2rem/1 var(--display); letter-spacing: -.01em; color: var(--accent-b);
}
.wordmark-dot { flex: none; width: 6px; height: 6px; margin: 0 0 2px 4px; align-self: flex-end; border-radius: 50%; background: var(--accent-2); }
.room-name-display {
  grid-area: room; justify-self: start; min-width: 0; max-width: 100%; display: inline-flex; align-items: center; gap: 8px;
  min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); white-space: nowrap; overflow: hidden;
  font: 800 14px/1 var(--display); letter-spacing: .16em; color: var(--ink);
  background: linear-gradient(180deg, #FFFFFF, #EEF1F5); border: 1px solid #C5CED8; box-shadow: var(--sh-1);
}
.room-label { flex: none; font: 700 12px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.room-code { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .room-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); } }

/* Line-icon buttons: help, host crown, settings, sound, room menu (44 px). */
.btn-how-to-play, .btn-host-crown, .btn-settings-gear, .btn-sound-toggle, .room-menu > summary {
  appearance: none; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; gap: 0;
  display: inline-grid; place-items: center; cursor: pointer; list-style: none; font-size: 0;
  border-radius: 12px; border: 1px solid #C5CED8; color: var(--accent-b);
  background: linear-gradient(180deg, #FFFFFF, #EEF1F5); box-shadow: 0 1px 2px rgba(19,32,41,.06), inset 0 1px 0 #fff;
  transition: transform var(--dur-snap) var(--ease), box-shadow var(--dur-snap) var(--ease), border-color 200ms var(--ease);
}
.btn-how-to-play span { display: none; }
.room-menu > summary::-webkit-details-marker { display: none; }
.btn-how-to-play:active, .btn-host-crown:active, .btn-settings-gear:active, .btn-sound-toggle:active, .room-menu > summary:active {
  transform: translateY(1px); box-shadow: 0 0 0 rgba(0,0,0,0), inset 0 1px 0 #fff;
}
.btn-sound-toggle[aria-pressed="true"], .room-menu[open] > summary { border-color: #7CCAC6; box-shadow: 0 0 0 3px rgba(23,163,160,.14), 0 0 16px rgba(23,163,160,.25); }
.btn-sound-toggle[aria-pressed="false"] { color: var(--ink-muted); }
.btn-sound-toggle .icon-sound-off, .btn-sound-toggle[aria-pressed="false"] .icon-sound-on { display: none; }
.btn-sound-toggle[aria-pressed="false"] .icon-sound-off { display: block; }
.room-menu { position: relative; }
.room-menu-panel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 80; width: 260px; max-width: calc(100vw - 24px); display: grid; gap: 12px; padding: 14px;
  border: 1px solid transparent; border-radius: var(--r-lg); box-shadow: var(--sh-1);
  background: linear-gradient(180deg, var(--surface-a), var(--surface-b)) padding-box, linear-gradient(180deg, var(--edge-a), var(--edge-b)) border-box;
}
.btn-new-game {
  min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid #E8A69A; color: var(--danger); font: 700 .95rem/1.2 var(--ui);
  background: linear-gradient(180deg, #FFF8F6, #F9E1DB); white-space: normal;
}

/* ---------- game progress (round indicator) ---------- */
.round-indicator { margin: 0 0 10px; padding: 0 2px; text-align: left; text-transform: none; letter-spacing: 0; }
.phase-path { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 4px; font: 700 14px/1.2 var(--ui); color: var(--ink-muted); }
.phase-path span { padding: 4px 10px; border: 1px solid transparent; border-radius: var(--r-pill); }
.phase-path .current { color: var(--accent-b); background: linear-gradient(180deg, #F5FCFC, #E2F3F2); border-color: #9ED8D5; }

/* ---------- scoreboard (Session 2) ---------- */
.competition-panel { padding: 0; margin: 0 0 16px; background: none; border: 0; border-radius: 0; box-shadow: none; }
/* The label and context line stay in the DOM for assistive tech; the chips carry the visible state. */
.competition-panel > .section-heading { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.scoreboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; }
.score-card-wrap { position: relative; min-width: 0; --pc: var(--p0); }
.score-card-wrap[data-pc="1"] { --pc: var(--p1); }
.score-card-wrap[data-pc="2"] { --pc: var(--p2); }
.score-card-wrap[data-pc="3"] { --pc: var(--p3); }
.score-card-wrap[data-pc="4"] { --pc: var(--p4); }
.score-card-wrap[data-pc="5"] { --pc: var(--p5); }
.score-item, .score-item.other, .score-item.leader {
  position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 10px;
  border: 1px solid transparent; border-radius: 14px; color: var(--ink); text-align: left; font: inherit; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #FFFFFF, #F4F6F9) padding-box, linear-gradient(180deg, #FFFFFF, #CDD5DE) border-box;
  box-shadow: var(--sh-2); transform: none; animation: none; transition: box-shadow 300ms var(--ease), opacity 300ms var(--ease);
}
.score-item.active-turn, .score-item.active-turn.disconnected {
  background: linear-gradient(180deg, #FFFFFF, #F5FBFB) padding-box, linear-gradient(180deg, #7AD6D2, var(--accent-b)) border-box;
  box-shadow: var(--sh-1), var(--glow-teal);
}
.score-item.disconnected { opacity: .85; }
.score-av { --avk-size: 32px; }
.score-item.disconnected .np-av { filter: grayscale(.8); opacity: .7; }
.score-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; width: 100%; }
.score-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.score-name { min-width: 0; font: 700 14px/1.2 var(--ui); color: var(--ink); overflow-wrap: anywhere; }
.score-you { flex: none; padding: 3px 7px; border-radius: var(--r-pill); font: 800 12px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-b); background: #E2F3F2; border: 1px solid #9ED8D5; }
.score-value { font: 800 17px/1.1 var(--display); font-variant-numeric: tabular-nums; color: var(--ink); }
.score-flags { display: flex; flex-wrap: wrap; gap: 4px; }
.score-flag {
  display: inline-flex; align-items: center; gap: 4px; min-height: 22px; padding: 2px 7px; border-radius: var(--r-pill); max-width: 100%;
  font: 700 12px/1.2 var(--ui); text-align: left; color: var(--ink-muted); border: 1px solid #CDD5DE; background: linear-gradient(180deg, #FFFFFF, #EEF1F5);
}
.score-flag-ico { flex: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.flag-leader { color: var(--accent-2-ink); border-color: #F3BE84; background: linear-gradient(180deg, #FFF9F2, #FCE6CC); }
.flag-turn { color: #fff; border-color: transparent; background: linear-gradient(180deg, var(--accent-btn), var(--accent-b)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.flag-locked { color: var(--accent-b); border-color: #9ED8D5; background: linear-gradient(180deg, #F5FCFC, #E2F3F2); }
.flag-disc { border-style: dashed; background: transparent; }
@media (min-width: 720px) {
  .scoreboard { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
  .score-item, .score-item.other, .score-item.leader { flex-direction: row; align-items: center; }
  .score-av { --avk-size: 40px; }
  .score-body { width: auto; flex: 1 1 auto; }
}
.score-tooltip {
  display: none; position: absolute; bottom: calc(100% + 12px); left: 50%; z-index: 85; width: 220px; max-width: calc(100vw - 24px); padding: 11px 13px;
  transform: translateX(calc(-50% + var(--tooltip-offset, 0px))); visibility: hidden; opacity: 0; pointer-events: none;
  border: 1px solid var(--edge-b); border-radius: 12px; background: #fff; color: var(--ink); box-shadow: var(--sh-1); font-size: .85rem;
}
.score-card-wrap:focus-within .score-tooltip, .score-card-wrap.tooltip-open .score-tooltip { display: block; visibility: visible; opacity: 1; }
.score-card-wrap.tooltip-measuring .score-tooltip { display: block; visibility: hidden; }
.score-card-wrap.tooltip-dismissed .score-tooltip { visibility: hidden; opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .score-card-wrap:hover .score-tooltip { display: block; visibility: visible; opacity: 1; }
  .score-card-wrap.tooltip-dismissed:hover .score-tooltip { visibility: hidden; opacity: 0; }
}

/* Header and game-area gutters follow the .screen padding in ui-redesign.css. */
@media (min-width: 641px) { .game-header { padding: 14px 24px 4px; grid-template-areas: "brand actions" "room room"; } .game-header-right { justify-self: end; } .wordmark-sm { font-size: 1.35rem; } }
@media (min-width: 901px) { .game-header { padding: 14px 32px 4px; } }
#screen-game { padding-top: 12px; }

/* ---------- buttons ---------- */
.btn {
  appearance: none; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 12px; font: 800 1.05rem/1.1 var(--ui); color: #fff; text-align: center;
  background: linear-gradient(180deg, var(--accent-btn) 0%, var(--accent-b) 100%); box-shadow: var(--sh-btn);
  transform: none; transition: transform var(--dur-snap) var(--ease), box-shadow var(--dur-snap) var(--ease), background 300ms var(--ease), filter 200ms var(--ease);
}
.btn-large { min-height: 56px; padding: 0 28px; font-size: 1.15rem; }
.btn:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 1px 2px rgba(12,107,106,.30); }
.btn-secondary {
  color: var(--accent-b); background: linear-gradient(180deg, #FFFFFF 0%, #E9EDF2 60%, #DCE2E9 100%); border: 1px solid #C5CED8;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(19,32,41,.08), 0 6px 14px rgba(19,32,41,.06);
}
.btn-secondary:active { box-shadow: inset 0 1px 0 #fff, 0 1px 1px rgba(19,32,41,.08); }
.btn-restart { color: var(--ink); background: linear-gradient(180deg, #F9A44F 0%, var(--accent-2) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 8px 20px rgba(240,138,36,.30); }
.btn-danger { background: linear-gradient(180deg, #C4472F 0%, var(--danger) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 6px 16px rgba(179,58,37,.28); }
.btn-small { min-height: 44px; font-size: .95rem; padding: 0 14px; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: linear-gradient(180deg, #E6EBF0, #D7DEE6); color: #55626F; box-shadow: none; border: 0; opacity: 1; cursor: not-allowed; transform: none;
}
.btn-remove { border: 1px solid #E8A69A; background: linear-gradient(180deg, #FFF8F6, #F9E1DB); color: var(--danger); }
.btn-host-skip:not([hidden]) { color: var(--accent-b); background: linear-gradient(180deg, #fff, #E9EDF2); border: 1px solid #C5CED8; box-shadow: var(--sh-2); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { filter: brightness(1.04); transform: none; }
  .btn-secondary:hover { background: linear-gradient(180deg, #FFFFFF 0%, #E9EDF2 60%, #DCE2E9 100%); border-color: #B2BEC9; }
  .btn-restart:hover { background: linear-gradient(180deg, #F9A44F 0%, var(--accent-2) 100%); }
  .btn-how-to-play:hover, .btn-host-crown:hover, .btn-settings-gear:hover, .btn-sound-toggle:hover, .room-menu > summary:hover { border-color: #9FB0BF; }
  .btn-new-game:hover, .btn-remove:hover { background: #F9E1DB; color: var(--danger); }
  .amazon-verify-link:hover { background: #E2F3F2; }
}

/* ---------- inputs ---------- */
input, select, textarea, .br-input {
  color: var(--ink); background: #fff; border: 1px solid #C5CED8; border-radius: 12px; box-shadow: inset 0 1px 2px rgba(19,32,41,.06);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
input[type="text"], input[type="password"], input[type="email"], input[type="number"], select, textarea, .br-input { min-height: 48px; padding: 10px 14px; font-weight: 600; }
input::placeholder, textarea::placeholder { color: #66727E; font-weight: 600; }
input:focus, select:focus, textarea:focus, .br-input:focus {
  border-color: var(--accent-b); box-shadow: 0 0 0 4px rgba(23,163,160,.18), 0 0 18px rgba(23,163,160,.22); outline: none;
}
input[type="checkbox"], input[type="radio"], input[type="range"] { min-height: 0; padding: 0; box-shadow: none; accent-color: var(--accent-a); }
input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(179,58,37,.12); }

/* ---------- footer ---------- */
.site-footer { color: var(--ink-muted); }
.site-footer__link:focus-visible, .site-footer__home-link:focus-visible { outline-color: var(--focus); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

/* ---------- legacy hint / verify-link finishing ---------- */
.phase-hint p, .phase-hint { color: var(--ink); }
.phase-hint-dismiss { color: var(--accent-b); }
.player-host-badge { background: linear-gradient(180deg, var(--accent-btn), var(--accent-b)); color: #fff; border-color: transparent; }
.amazon-verify-link { color: var(--accent-2-ink); }
.phase-hint-dismiss, .onboarding-actions .btn-secondary { border: 1px solid #C5CED8; border-radius: 10px; background: linear-gradient(180deg, #fff, #EEF1F5); min-height: 44px; padding: 0 14px; font-weight: 700; }

/* ---------- welcome, join and lobby (Session 3) ---------- */
/* Entrances are CSS keyframes; reduced motion switches every animation off (ui-redesign.css). */
@keyframes enter-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.enter-rise { animation: enter-rise 520ms var(--ease) both; animation-delay: var(--d, 0ms); }

/* Platinum card for these screens: gradient edge, long soft shadow. Teal variant marks the focus of a screen. */
.surface-card {
  position: relative; min-width: 0; padding: 18px; border-radius: var(--r-lg); color: var(--ink); border: 1px solid transparent;
  background: linear-gradient(180deg, var(--surface-a), var(--surface-b)) padding-box, linear-gradient(180deg, var(--edge-a), var(--edge-b)) border-box;
  box-shadow: var(--sh-1);
}
.surface-card.teal {
  background: linear-gradient(180deg, var(--surface-a), #FAFDFD) padding-box, linear-gradient(180deg, #7AD6D2, var(--accent-b)) border-box;
  box-shadow: var(--sh-1), var(--glow-teal);
}
.surface-card .card-h { margin: 0 0 10px; font: 800 19px/1.2 var(--display); color: var(--ink); }

/* Tools that the global header already provides (crown, settings, invite) stay hidden on these screens. */
.screen-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; min-width: 0; }
.screen-tools .btn-host-crown, .screen-tools .btn-settings-gear, .screen-tools .btn-qr-invite { display: none !important; }

/* ----- welcome ----- */
.welcome-screen { display: flex; flex-direction: column; gap: 16px; min-height: 60vh; justify-content: center; align-items: center; text-align: center; }
.welcome-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 440px; }
.welcome-wordmark { margin: 0; font: 900 clamp(2.3rem, 9vw, 4.4rem)/.95 var(--display); letter-spacing: -.015em; color: var(--accent-b); text-align: center; }
.welcome-wordmark .wordmark-dot {
  display: inline-block; width: .15em; height: .15em; margin: 0 0 0 .08em; vertical-align: .52em; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 0 .07em rgba(240,138,36,.18);
}
.welcome-rule { position: relative; width: min(340px, 70%); height: 1px; margin: 6px auto; background: linear-gradient(90deg, transparent, #B3BECA 20%, #B3BECA 80%, transparent); }
.welcome-rule::after { content: ''; position: absolute; left: 50%; top: -3px; width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: var(--accent-2); }
.welcome-tagline { margin: 0; max-width: 34ch; font: 500 17px/1.45 var(--ui); color: var(--ink-muted); }
.welcome-actions { width: 100%; display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.welcome-actions .btn-large { width: 100%; }
.join-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
#room-name-input { min-height: 54px; padding: 0 16px; border-radius: 12px; font: 700 1.1rem/1.2 var(--ui); }
#btn-go-to-room { min-height: 54px; min-width: 112px; }
#resume-room { margin: 0; }
.return-pill {
  min-height: 44px; display: inline-flex; align-items: center; gap: 10px; padding: 0 18px; border-radius: var(--r-pill);
  border: 1px solid #CDD5DE; background: #FFFFFF; color: var(--accent-b); font: 700 16px/1.2 var(--ui); text-decoration: none; box-shadow: var(--sh-2);
}
.return-pill .pd { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-a); box-shadow: 0 0 0 3px rgba(23,163,160,.18); }
.welcome-fine { margin: 0; letter-spacing: .1em; }

/* ----- join ----- */
.join-screen { display: flex; flex-direction: column; gap: 16px; }
.join-intro { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.join-title { margin: 0; font: 800 clamp(1.8rem, 6vw, 2.4rem)/1.1 var(--display); letter-spacing: -.01em; }
.join-intro .muted { margin: 0; }
.code-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0; }
.code-tile {
  width: clamp(40px, 12vw, 58px); height: clamp(54px, 16vw, 72px); display: grid; place-items: center; border-radius: 12px;
  border: 1px solid #C5CED8; box-shadow: var(--sh-1); font: 900 clamp(1.8rem, 7vw, 2.6rem)/1 var(--display); color: var(--accent-b);
  background: linear-gradient(180deg, #FFFFFF, #F1F4F7 49%, #DCE2E9 51%, #FFFFFF);
}
.join-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; width: 100%; }
@media (min-width: 900px) {
  .join-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .join-rejoin { grid-column: 1 / -1; }
}
.join-people .card-h, .join-name .card-h { margin-bottom: 12px; }
.join-people-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.join-people-list li {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; min-height: 48px; padding: 4px 16px 4px 4px; border-radius: var(--r-pill);
  border: 1px solid #CDD5DE; background: linear-gradient(180deg, #FFFFFF, #EEF1F5); box-shadow: var(--sh-2); font: 700 16px/1.2 var(--ui); color: var(--ink);
}
.join-people-list .np-av { --avk-size: 40px; }
.join-people-list .player-name { min-width: 0; overflow-wrap: anywhere; }
.join-people-list li.no-players-yet { display: block; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; font: 600 16px/1.4 var(--ui); color: var(--ink-muted); }
.join-lock-msg { margin: 0 0 12px; font: 600 16px/1.4 var(--ui); color: var(--accent-2-ink); }
.join-room-password-row { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; text-align: left; }
.join-room-password-row input, .join-form input { width: 100%; min-height: 56px; font: 700 1.2rem/1.2 var(--display); }
.join-form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
/* Avatar button beside the name box. The kit CSS supplies the disc, the pencil badge (::after) and the
   gated hover; only size and layout are set here. */
.join-name-row { display: flex; align-items: center; gap: 12px; }
.join-name-row input { flex: 1 1 auto; min-width: 0; }
.join-avatar { --avk-size: 48px; flex: none; }
@media (max-width: 640px) { .join-avatar { --avk-size: 40px; } }
.join-form .btn { width: 100%; }
.join-error { margin: 12px 0 0; font: 700 16px/1.4 var(--ui); color: var(--danger); text-align: center; }
.join-rejoin { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.join-rejoin-status { margin: 0; font: 600 16px/1.4 var(--ui); color: var(--ink-muted); }
.join-rejoin-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* Avatar disc: the shared kit badge (.avk, vendor/avatar-kit). The kit's own ring is white, so darken it on
   these light surfaces. Per-spot sizes below set --avk-size on .np-av. */
.avk { --avk-ring: rgba(10, 16, 40, .22); }

/* Host and player badges, shared by the join list and the lobby roster. */
.join-people-list .player-host-badge, .roster .player-host-badge {
  display: inline-flex; align-items: center; min-height: 24px; margin: 0; padding: 2px 9px; border-radius: var(--r-pill);
  border: 1px solid #F3BE84; background: linear-gradient(180deg, #FFF9F2, #FCE6CC); color: var(--accent-2-ink);
  font: 800 12px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase;
}

/* ----- lobby ----- */
.lobby-screen { display: flex; flex-direction: column; gap: 16px; }
.lobby-container { display: flex; flex-direction: column; gap: 16px; width: 100%; min-width: 0; margin: 0; padding: 0; text-align: left; }
.lobby-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px 16px; }
.lobby-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lobby-title h1 { margin: 0; font: 800 clamp(1.8rem, 6vw, 2.4rem)/1.1 var(--display); letter-spacing: -.01em; }
.lobby-title .muted { margin: 0; }
.lobby-tools { flex: none; }
.lobby-tools #btn-lobby-new-game { min-height: 44px; }

#lobby-onboarding {
  margin: 0; max-width: none; padding: 16px 18px; text-align: left; border: 1px solid transparent; border-radius: var(--r-lg);
  background: linear-gradient(180deg, #FFFFFF, #F4F6F9) padding-box, linear-gradient(180deg, #FFFFFF, #CDD5DE) border-box; box-shadow: var(--sh-2);
}
.onboarding-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.onboarding-steps > div { min-width: 0; padding: 12px 14px; border-radius: 14px; background: #F2F5F8; border: 1px solid #DDE3EA; }
.onboarding-steps strong { display: block; font: 800 17px/1.25 var(--display); color: var(--ink); }
.onboarding-steps p { margin: 6px 0 0; font: 600 16px/1.4 var(--ui); color: var(--ink-muted); }
.onboarding-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 14px; }
.onboarding-actions .btn { min-height: 44px; }

.lobby-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 900px) { .lobby-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.lobby-sidebar { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.roster-card { display: flex; flex-direction: column; gap: 4px; }
.roster-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.roster-head .card-h { margin: 0; }
.count-chip {
  display: inline-flex; align-items: center; min-height: 32px; padding: 4px 12px; border-radius: var(--r-pill); border: 1px solid #9ED8D5;
  background: linear-gradient(180deg, #F5FCFC, #E2F3F2); color: var(--accent-b); font: 800 15px/1.1 var(--display); font-variant-numeric: tabular-nums;
}
.roster { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.roster li { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 0; border-bottom: 1px solid #E1E6EC; }
.roster li:last-child { border-bottom: 0; }
.roster .np-av { --avk-size: 46px; }
.roster .who { display: flex; flex: 1 1 auto; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.roster .player-name { font: 700 17px/1.2 var(--ui); color: var(--ink); overflow-wrap: anywhere; }
.roster-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.roster .player-you-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; font: 800 12px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; }
.roster .conn-status-label {
  display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: var(--r-pill);
  border: 1px dashed #B3BECA; background: transparent; color: var(--ink-muted); font: 700 12px/1.2 var(--ui);
}
.roster li.player-disconnected .np-av { filter: grayscale(.8); opacity: .7; }
.roster .btn-remove {
  flex: none; min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid #C5CED8; background: transparent;
  color: var(--accent-b); font: 700 .95rem/1 var(--ui);
}
@media (hover: hover) and (pointer: fine) {
  .roster .btn-remove:hover { background: #E9EDF2; border-color: #B2BEC9; color: var(--accent-b); }
}

.invite-panel { display: flex; flex-direction: column; gap: 10px; padding: 18px; }
.invite-panel h2 { margin: 0; font: 800 clamp(1.25rem, 4vw, 1.5rem)/1.2 var(--display); }
.invite-panel .eyebrow { margin: 0; }
.invite-note { margin: 0; font: 600 16px/1.4 var(--ui); color: var(--ink-muted); }
.invite-body { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.qr-frame {
  flex: none; display: grid; place-items: center; width: 168px; height: 168px; padding: 12px; border-radius: 14px;
  border: 1px solid #CDD5DE; background: #FFFFFF; box-shadow: var(--sh-2);
}
.qr-frame canvas, .qr-frame img { display: block; width: 100% !important; height: 100% !important; }
.invite-side { display: flex; flex: 1 1 180px; flex-direction: column; gap: 10px; min-width: 0; }
.invite-link { margin: 0; font: 700 15px/1.3 var(--ui); color: var(--accent-b); overflow-wrap: anywhere; }
.invite-side .btn { width: 100%; }
.invite-panel .inline-feedback { margin: 0; font: 600 16px/1.4 var(--ui); }

.lobby-tonight { display: flex; flex-direction: column; gap: 12px; }
.lobby-tonight .card-h { margin: 0; }
.lobby-setup-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.lobby-setup-summary > div { min-width: 0; padding: 12px; border-radius: 14px; border: 1px solid #DDE3EA; background: linear-gradient(180deg, #FFFFFF, #F4F6F9); }
.lobby-setup-summary dt { font: 700 14px/1.3 var(--ui); color: var(--ink-muted); }
.lobby-setup-summary dd { margin: 4px 0 0; font: 800 18px/1.25 var(--display); color: var(--ink); }
.lobby-tonight .btn { width: 100%; }

.lobby-start { display: flex; flex-direction: column; gap: 12px; }
.lobby-start .btn-large { width: 100%; }
#lobby-start-hint, #lobby-waiting, .lobby-start .product-fetch-status { margin: 0; font: 600 16px/1.4 var(--ui); color: var(--ink-muted); }

.lobby-host-checklist { padding: 0; }
.lobby-host-checklist > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 18px;
  list-style: none; cursor: pointer; font: 800 17px/1.2 var(--display); color: var(--ink);
}
.lobby-host-checklist > summary::-webkit-details-marker { display: none; }
.lobby-host-checklist > summary::after { content: '+'; font: 800 22px/1 var(--display); color: var(--accent-b); }
.lobby-host-checklist[open] > summary::after { content: '\2212'; }
.lobby-host-checklist > ul { display: grid; gap: 10px; margin: 0; padding: 0 18px 16px; list-style: none; }
.checklist-item { position: relative; padding-left: 30px; font: 600 16px/1.4 var(--ui); color: var(--ink-muted); }
.checklist-item::before {
  content: ''; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; box-sizing: border-box; border-radius: 7px;
  border: 2px solid #AEB9C5; background: #FFFFFF;
}
.checklist-item.done { color: var(--ink); text-decoration: line-through; text-decoration-color: rgba(19,32,41,.35); }
.checklist-item.done::before {
  display: grid; place-items: center; content: '\2713'; border-color: var(--accent-a); background: linear-gradient(180deg, var(--accent-a), var(--accent-b));
  color: #FFFFFF; font: 800 14px/1 var(--ui);
}

@media (max-width: 640px) {
  .onboarding-steps { grid-template-columns: minmax(0, 1fr); }
  .lobby-setup-summary > div { padding: 10px; }
}

/* ---------- countdown timers (Session 4) ---------- */
/* FX.capsule() drives .capsule (bid, showcase and showdown-choice timers) and .mini (the "Next in Ns" chips):
   it sets data-state (calm / warning / final) and scales the fill from its right edge. The numbers are
   plain text written by app.js, so a screen reader still hears the seconds. */
@keyframes cap-breathe { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }
.capsule { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-width: 0; }
.capsule[hidden] { display: none; }
.capsule::before {
  content: ''; position: absolute; inset: -10px -8px; border-radius: 999px; pointer-events: none; opacity: 0;
  background: radial-gradient(closest-side, rgba(179,58,37,.26), rgba(179,58,37,0));
}
.cap-track {
  position: relative; flex: 1; min-width: 0; height: 22px; border-radius: 999px; overflow: hidden;
  background: linear-gradient(180deg, #D3DAE2, #E9EDF2); box-shadow: inset 0 1px 3px rgba(19,32,41,.18), inset 0 0 0 1px rgba(19,32,41,.06);
}
.cap-track::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(19,32,41,.20) calc(10% - 1px) 10%);
}
.cap-fill {
  position: absolute; inset: 0; border-radius: 999px; transform-origin: 100% 50%; transform: scaleX(1);
  background: linear-gradient(90deg, #63CDC9 0%, var(--accent-a) 45%, var(--accent-b) 100%);
  box-shadow: 0 0 14px rgba(23,163,160,.35), inset 0 1px 0 rgba(255,255,255,.35);
}
.cap-read { display: flex; align-items: baseline; justify-content: flex-end; gap: 5px; flex: none; min-width: 86px; }
.cap-num { font: 900 clamp(2rem, 6vw, 2.6rem)/1 var(--display); font-variant-numeric: tabular-nums; color: var(--ink); }
.cap-unit { font: 700 12px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.capsule[data-state=warning] .cap-fill { background: linear-gradient(90deg, #FBBB7A 0%, var(--accent-2) 50%, #E07A1F 100%); box-shadow: 0 0 14px rgba(240,138,36,.40); }
.capsule[data-state=warning] .cap-num { color: var(--accent-2-ink); }
.capsule[data-state=final] .cap-fill { background: linear-gradient(90deg, #E4745C 0%, var(--danger) 100%); box-shadow: 0 0 16px rgba(179,58,37,.40); }
.capsule[data-state=final] .cap-num { color: var(--danger); }
.capsule[data-state=final]::before { animation: cap-breathe 1s ease-in-out infinite; }
/* Reduced motion switches the breathing off (ui-redesign.css); keep the final state visible without it. */
@media (prefers-reduced-motion: reduce) { .capsule[data-state=final]::before { opacity: .6; } }
html[data-reduced-motion=true] .capsule[data-state=final]::before { opacity: .6; }

/* Timer row inside the bid panels: title, then the capsule on its own row; phones put them side by side. */
.bid-panel .section-heading { flex-wrap: wrap; row-gap: 12px; }
.bid-panel .section-heading .capsule { flex: 1 1 100%; }

/* "Next in Ns" chip */
.phase-countdown { margin-top: 24px; text-align: center; font: 600 16px/1.4 var(--ui); color: var(--ink-muted); }
.phase-countdown.mini {
  display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; min-height: 38px; margin: 24px auto 0; padding: 6px 14px;
  border-radius: 999px; border: 1px solid #CDD5DE; background: linear-gradient(180deg, #FFFFFF, #EEF1F5); box-shadow: var(--sh-2);
  font: 700 14px/1.2 var(--ui); color: var(--ink); font-variant-numeric: tabular-nums;
}
.mini .mt { position: relative; flex: none; width: 86px; height: 8px; border-radius: 999px; overflow: hidden; background: #D3DAE2; }
.mini .mf { position: absolute; inset: 0; transform-origin: 100% 50%; background: linear-gradient(90deg, #63CDC9, var(--accent-b)); }
.mini .countdown-seconds { font-weight: 800; color: var(--ink); }
.mini[data-state=warning] .mf { background: var(--accent-2); }
.mini[data-state=warning] .countdown-seconds { color: var(--accent-2-ink); }
.mini[data-state=final] .mf { background: var(--danger); }
.mini[data-state=final] .countdown-seconds { color: var(--danger); }

/* Showdown choice timer sits under the status line */
#showdown-choice-timer { margin: 12px 0 4px; }

@media (max-width: 640px) {
  .bid-panel .section-heading { flex-wrap: nowrap; row-gap: 0; }
  .bid-panel .section-heading .capsule { flex: 1 1 0; gap: 10px; }
  .bid-panel .cap-track { height: 18px; }
  .bid-panel .cap-read { min-width: 64px; }
  .bid-panel .cap-num { font-size: 1.7rem; }
}

/* ---------- bidding and Final Showcase bid screens (Session 5) ---------- */
@keyframes bid-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.product-card-enter, .showcase-card-enter { animation: bid-rise var(--dur-enter) var(--ease) both; }
html[data-reduced-motion=true] .product-card-enter, html[data-reduced-motion=true] .showcase-card-enter { animation: none; }
@media (prefers-reduced-motion: reduce) { .product-card-enter, .showcase-card-enter { animation: none; } }

.phase-subtitle { margin-bottom: 20px; }
.timed-play-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(290px, 1fr); gap: 24px; align-items: start; }
.timed-play-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Product card: white cyclorama stage with a floor shadow, then name, category chip and details. */
.product-card {
  position: relative; width: 100%; max-width: none; margin: 0; padding: 18px; text-align: left; border: 1px solid transparent; border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-a), var(--surface-b)) padding-box, linear-gradient(180deg, var(--edge-a), var(--edge-b)) border-box;
  box-shadow: var(--sh-1);
}
.product-image-container {
  position: relative; width: 100%; height: 260px; margin: 0 0 16px; padding: 18px; overflow: hidden; display: grid; place-items: center; grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  border-radius: var(--r-lg); border: 1px solid #D3DAE2; box-shadow: inset 0 1px 0 #fff, var(--sh-2);
  background: radial-gradient(ellipse at 50% 30%, #FFFFFF 0%, #F7F9FB 45%, #E6EBF0 100%);
}
.product-image-container::after {
  content: ''; position: absolute; left: 22%; right: 22%; bottom: 7%; height: 18px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(19,32,41,.20), rgba(19,32,41,0) 70%);
}
.product-image-container .product-image-zoom { position: relative; z-index: 1; width: 100%; height: 100%; min-height: 0; overflow: hidden; }
.product-image-container img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(19,32,41,.12)); }
.product-emoji { position: relative; z-index: 1; width: 100%; height: 100%; background: none; font-size: 5rem; }
.product-info { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.product-info h3 { margin: 0; font-size: clamp(1.4rem, 5vw, 1.7rem); line-height: 1.15; overflow-wrap: anywhere; color: var(--ink); }
.product-info p { margin: 0; color: var(--ink-muted); font-size: 1rem; }
.product-hint { order: -1; display: inline-flex; align-items: center; padding: 5px 12px; border-radius: var(--r-pill); font: 700 13px/1.2 var(--ui); background: #E2F3F2; color: var(--accent-b); border: 1px solid #9ED8D5; }
.product-hint:empty { display: none; }
.product-detail-disclosure { align-self: stretch; margin-top: 8px; padding-top: 10px; border-top: 1px solid #E1E6EC; }
.product-detail-disclosure h4, .product-detail-disclosure h5 { margin: 0 0 8px; font: 700 12px/1.25 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.product-specs { gap: 4px; margin: 0; font-size: 1rem; color: var(--ink); }
.product-details { font-style: normal; color: var(--ink); }
.product-price-context, .product-specs-missing { color: var(--ink-muted); }

/* Bid panel: sticky beside the product on desktop, a pinned sheet on phones. */
.bid-panel {
  position: sticky; top: 20px; display: flex; flex-direction: column; gap: 14px; padding: 18px; text-align: left; border: 1px solid transparent; border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-a), var(--surface-b)) padding-box, linear-gradient(180deg, #7AD6D2, var(--accent-b)) border-box;
  box-shadow: var(--sh-1), var(--glow-teal); color: var(--ink);
}
.bid-panel .section-heading { margin: 0; }
.bid-panel .section-heading h3 { margin: 0; font: 700 12px/1.25 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.bid-form { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin: 0; }
.bid-form > label { font: 700 12px/1.25 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.bid-input-group {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 54px; padding: 0 16px; border-radius: var(--r-md); background: #fff; border: 1px solid #C5CED8;
  box-shadow: inset 0 1px 2px rgba(19,32,41,.06); transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.bid-input-group:focus-within { border-color: var(--accent-b); box-shadow: 0 0 0 4px rgba(23,163,160,.18), 0 0 18px rgba(23,163,160,.22); }
.bid-input-group .dollar-sign { font: 800 1.5rem/1 var(--display); color: var(--ink-muted); }
.bid-input-group input {
  flex: 1; width: 100%; min-width: 0; min-height: 0; padding: 12px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none;
  font: 800 1.9rem/1.2 var(--display); text-align: left; color: var(--ink); font-variant-numeric: tabular-nums;
}
.bid-input-group input:focus { box-shadow: none; border: 0; }
.bid-input-group input::placeholder { font-family: var(--ui); font-size: 1rem; font-weight: 600; }
.field-help { margin: 0; color: var(--ink-muted); font-size: .8125rem; line-height: 1.4; }
.field-error { margin: 0; color: var(--danger); font-size: .875rem; font-weight: 600; }
.bid-form .btn-large { width: 100%; }

/* Locked state */
.bid-submitted { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0; text-align: center; }
.bid-submitted [role=status] { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bid-submitted [role=status]::before {
  content: ''; width: 52px; height: 52px; margin-bottom: 6px; border-radius: 50%; border: 1px solid #9ED8D5; box-shadow: 0 0 0 6px rgba(23,163,160,.08);
  background: #E2F3F2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230C6B6A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.3 4.3L19 7.5'/%3E%3C/svg%3E") center / 26px no-repeat;
}
.bid-submitted h3 { margin: 0; font: 800 clamp(1.1rem, 4vw, 1.3rem)/1.25 var(--display); color: var(--ink); }
.locked-amount { display: block; margin: 0; font: 900 clamp(1.9rem, 7vw, 2.4rem)/1.1 var(--display); color: var(--accent-b); font-variant-numeric: tabular-nums; }
.bid-submitted p { margin: 0; color: var(--ink-muted); font-size: .9375rem; }
.bid-progress { width: 100%; margin: 0; color: var(--ink-muted); font-size: .875rem; font-weight: 600; }
.bid-bar { width: 100%; height: 8px; margin: 8px 0 0; border-radius: var(--r-pill); background: #D3DAE2; overflow: hidden; }
.bid-bar-fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, #63CDC9, var(--accent-b)); transition: width 300ms var(--ease); }

/* Who's locked in: avatars and names only, never amounts. */
.lockers-card {
  padding: 16px 18px; border: 1px solid transparent; border-radius: var(--r-lg); box-shadow: var(--sh-2);
  background: linear-gradient(180deg, var(--surface-a), var(--surface-b)) padding-box, linear-gradient(180deg, var(--edge-a), var(--edge-b)) border-box;
}
.lockers-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.lockers-head h3 { margin: 0; font: 800 1.1rem/1.2 var(--display); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px; border-radius: var(--r-pill); font: 700 13px/1 var(--ui); font-variant-numeric: tabular-nums; color: var(--ink); background: linear-gradient(180deg, #FFFFFF, #EEF1F5); border: 1px solid #CDD5DE; }
.lockers { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 12px 10px; margin: 0; padding: 0; list-style: none; }
.locker { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 78px; padding: 0; border: 0; text-align: center; font: 700 12px/1.2 var(--ui); color: var(--ink-muted); }
.locker .np-av { --avk-size: 44px; }
.locker-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.locker-st { white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.locker-st .ico { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.locker.is-in .np-av { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent-a), 0 0 14px rgba(23,163,160,.35); }
.locker.is-in .locker-st { color: var(--accent-b); }
.locker.is-out .np-av { opacity: .82; filter: saturate(.5); box-shadow: 0 0 0 2px #fff, 0 0 0 3px #AEB9C5; }

/* Final Showcase: compact item rows on phones, three cards across on wide screens. */
.showcase-subtitle { margin: 0 0 16px; }
.showcase-products { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.showcase-product-card {
  display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; align-items: start; width: 100%; max-width: none; margin: 0; padding: 14px; min-width: 0; text-align: left;
  border: 1px solid #CDD5DE; border-radius: var(--r-lg); color: var(--ink);
  background: linear-gradient(180deg, var(--surface-a), var(--surface-b)); box-shadow: var(--sh-2);
}
.showcase-product-card.image-unavailable { grid-template-columns: minmax(0, 1fr); }
.showcase-product-card .product-image-zoom { width: 76px; height: 76px; border-radius: var(--r-md); border: 1px solid #D3DAE2; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, #FFFFFF 0%, #F4F6F9 55%, #E3E8EE 100%); }
.showcase-product-card img { display: block; width: 100%; height: 100%; margin: 0; padding: 6px; object-fit: contain; background: none; border-radius: 0; filter: drop-shadow(0 6px 8px rgba(19,32,41,.12)); }
.showcase-product-copy { min-width: 0; }
.showcase-product-card h4 { margin: 0 0 4px; font: 800 1.0625rem/1.2 var(--display); color: var(--ink); overflow-wrap: anywhere; }
.showcase-product-card p { margin: 0 0 4px; color: var(--ink-muted); font-size: .9375rem; }
.showcase-product-card .product-detail-disclosure { margin-top: 8px; }
.showcase-product-card .product-specs { font-size: .9375rem; }

@media (min-width: 1000px) {
  #phase-showcase-bid .showcase-products { flex-direction: row; align-items: stretch; }
  #phase-showcase-bid .showcase-product-card { grid-template-columns: minmax(0, 1fr); flex: 1 1 0; }
  #phase-showcase-bid .showcase-product-card .product-image-zoom { width: 100%; height: 132px; }
}
@media (max-width: 900px) { .timed-play-layout { gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(270px, 1fr); } }
@media (max-width: 640px) {
  .timed-play-layout { grid-template-columns: minmax(0, 1fr); }
  .product-card { padding: 14px; }
  .product-image-container { height: 210px; padding: 14px; }
  .bid-panel {
    position: fixed; z-index: 90; top: auto; left: 12px; right: 12px; max-width: 616px; margin: auto; padding: 14px 16px; gap: 10px;
    bottom: max(10px, calc(var(--keyboard-inset, 0px) + 8px), env(safe-area-inset-bottom));
    max-height: calc(var(--visual-viewport-height, 100svh) - 24px); overflow-y: auto; box-shadow: 0 -8px 28px rgba(19,32,41,.16), var(--glow-teal);
  }
  .bid-form { gap: 8px; }
  .bid-input-group { min-height: 48px; }
  .bid-input-group input { font-size: 1.5rem; padding: 8px 0; }
  .locked-amount { font-size: 1.7rem; }
  .bid-submitted { gap: 6px; }
  .bid-submitted [role=status]::before { width: 40px; height: 40px; margin-bottom: 2px; background-size: 20px; }
  .locker { width: 76px; }
  .locker .np-av { --avk-size: 40px; }
}
@media (hover: none), (pointer: coarse) { .bid-form .btn-large { min-height: 52px; } }


/* ===== Reveal screens (Session 6): price board, bid rows, showcase item prices, total =====
   The renderers paint the FINAL state. While RevealFX runs, #phase-reveal / #phase-showcase-reveal carry
   data-choreo="running" plus data-stage tokens (result, total, done) and the staged parts below are held back;
   removing those attributes (skip, hidden tab, phase change) is the whole of "jump to the end". */
.reveal-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 900px) { .reveal-cols { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.reveal-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.reveal-card {
  position: relative; min-width: 0; padding: 18px; border: 1px solid transparent; border-radius: var(--r-lg); color: var(--ink);
  background: linear-gradient(180deg, var(--surface-a), var(--surface-b)) padding-box, linear-gradient(180deg, var(--edge-a), var(--edge-b)) border-box;
  box-shadow: var(--sh-1);
}
.reveal-board-card, .reveal-result-card, .showcase-total { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.reveal-prod { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.reveal-prod-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.reveal-product-name { margin: 0; font: 800 1.0625rem/1.25 var(--display); color: var(--ink); overflow-wrap: anywhere; }
.rv-thumb {
  flex: none; width: 76px; height: 76px; display: grid; place-items: center; overflow: hidden; border-radius: var(--r-md);
  border: 1px solid #D3DAE2; background: radial-gradient(ellipse at 50% 30%, #FFFFFF 0%, #F4F6F9 55%, #E3E8EE 100%);
}
.rv-thumb img { display: block; width: 100%; height: 100%; margin: 0; padding: 6px; object-fit: contain; background: none; border-radius: 0; filter: drop-shadow(0 6px 8px rgba(19,32,41,.12)); }
.reveal-headline { margin: 0; font: 800 clamp(1.45rem, 5vw, 1.9rem)/1.15 var(--display); color: var(--ink); text-align: center; }
.reveal-headline .hl-pre { display: none; }
.reveal-sub { min-height: 1.5em; margin: 0; font: 600 1.0625rem/1.4 var(--ui); color: var(--ink-muted); text-align: center; }
.round-winner { color: var(--accent-2-ink); font-weight: 700; }
.board-wrap { display: flex; justify-content: center; max-width: 100%; }
.round-recap {
  width: 100%; margin: 0; padding: 12px 14px; border: 1px solid var(--edge-b); border-radius: var(--r-md); background: #F2F5F8;
  color: var(--ink); font: 500 1rem/1.45 var(--ui); text-align: left;
}
.round-recap:empty { display: none; }
.reveal-col > .label { text-align: left; }
.reveal-card .phase-countdown { margin-top: 0; }
.reveal-card .phase-countdown.mini { margin: 2px auto 0; }
.reveal-phase .phase-countdown.mini { margin-top: 12px; }

/* Brushed-platinum price board with split-digit tiles. */
.board {
  position: relative; display: inline-flex; align-items: center; gap: .03em; max-width: 100%; padding: 18px 22px; border-radius: 18px; border: 1px solid #BCC6D1;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.32) 0 1px, rgba(19,32,41,.025) 1px 2px), linear-gradient(135deg, var(--plat-a) 0%, var(--plat-b) 52%, var(--plat-c) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 1px 2px rgba(19,32,41,.06), 0 12px 32px rgba(19,32,41,.10);
  font: 900 clamp(2.4rem, 12vw, 4.6rem)/1 var(--display); color: var(--ink); overflow: hidden; transition: box-shadow 600ms var(--ease);
}
.board .sym { padding: 0 .02em; color: var(--ink-muted); line-height: 1.1; }
.board.sm { font-size: clamp(1.05rem, 4.4vw, 1.45rem); padding: 8px 10px; border-radius: 14px; }
.tile {
  position: relative; display: inline-block; width: .66em; height: 1.1em; overflow: hidden; border-radius: 8px; margin: 0 .02em;
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F4F7 49%, #DCE2E9 51%, #FFFFFF 100%); box-shadow: inset 0 0 0 1px rgba(19,32,41,.07), 0 1px 2px rgba(19,32,41,.12);
}
.tile::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(19,32,41,.14); }
.tdig { display: block; height: 1.1em; line-height: 1.1em; text-align: center; font-variant-numeric: tabular-nums; }
.tdig[hidden] { display: none; }
.strip { display: flex; flex-direction: column; will-change: transform; }
.strip span { display: block; height: 1.1em; line-height: 1.1em; text-align: center; font-variant-numeric: tabular-nums; }
.board[data-state=hidden] .tile { opacity: .45; }
.board[data-state=hidden] .tdig { visibility: hidden; }
.board[data-state=hidden] .tile::before { content: '0'; position: absolute; inset: 0; line-height: 1.1em; text-align: center; font-variant-numeric: tabular-nums; }
#phase-reveal[data-tier=huge]:not([data-choreo=running]) .board,
#phase-reveal[data-tier=huge][data-stage~=result] .board { box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 0 0 1px rgba(240,138,36,.55), 0 0 40px rgba(240,138,36,.42); }

/* Result chips (icon + words, never colour alone). */
.chip.teal { color: var(--accent-b); border-color: #9ED8D5; background: linear-gradient(180deg, #F5FCFC, #E2F3F2); }
.chip.tang { color: #8F4609; border-color: #F3BE84; background: linear-gradient(180deg, #FFF9F2, #FCE6CC); }
.chip.red { color: #A8321F; border-color: #E8A69A; background: linear-gradient(180deg, #FFF8F6, #F9E1DB); }
.chip.ok { color: #176A41; border-color: #9CD3B6; background: linear-gradient(180deg, #F6FCF8, #E0F3E9); }
.chip.dash { color: var(--ink-muted); border-style: dashed; background: transparent; }
.chip .ico { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chip .bid-points { font-family: var(--display); font-weight: 800; }

/* Bid rows. */
.bids-reveal { display: flex; flex-direction: column; gap: 8px; max-width: none; margin: 0; }
.bid-reveal-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0; padding: 10px 14px 10px 10px;
  border: 1px solid transparent; border-radius: 14px; color: var(--ink); opacity: 1; transform: none;
  background: linear-gradient(180deg, #FFFFFF, #F4F6F9) padding-box, linear-gradient(180deg, #FFFFFF, #D3DAE2) border-box; box-shadow: var(--sh-2);
}
.bid-reveal-item .np-av { --avk-size: 40px; }
.bid-who { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.bid-player { font: 700 1rem/1.25 var(--ui); overflow-wrap: anywhere; }
.bid-amount { font: 800 1.1875rem/1 var(--display); text-align: right; white-space: nowrap; }
.bid-amount.over { color: var(--ink-muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.bid-reveal-item.winner {
  background: linear-gradient(180deg, #FFFFFF, #FFFCF8) padding-box, linear-gradient(180deg, #FFC98F, var(--accent-2)) border-box; box-shadow: var(--sh-1), var(--glow-tang);
}

/* Showcase reveal: compact item rows with a small price board each, then the combined total. */
#showcase-reveal-products { display: flex; flex-direction: column; gap: 10px; }
#showcase-reveal-products .showcase-product-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px;
  border: 1px solid transparent; border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-a), var(--surface-b)) padding-box, linear-gradient(180deg, var(--edge-a), var(--edge-b)) border-box; box-shadow: var(--sh-2);
}
#showcase-reveal-products .showcase-product-card.image-unavailable { grid-template-columns: minmax(0, 1fr) auto; }
#showcase-reveal-products .image-unavailable .rv-thumb { display: none; }
#showcase-reveal-products .rv-thumb { width: 64px; height: 60px; }
#showcase-reveal-products .showcase-product-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
#showcase-reveal-products .showcase-product-card h4 { margin: 0; font: 800 1rem/1.2 var(--display); }
#showcase-reveal-products .showcase-price { justify-self: end; }
.rv-wait, .rv-now { display: none; }
.showcase-product-card[data-rv=wait] .rv-done, .showcase-product-card[data-rv=now] .rv-done { display: none; }
.showcase-product-card[data-rv=wait] .rv-wait, .showcase-product-card[data-rv=now] .rv-now { display: inline; }
#showcase-reveal-products .showcase-product-card[data-rv=now] {
  background: linear-gradient(180deg, #FFFFFF, #F5FBFB) padding-box, linear-gradient(180deg, #7AD6D2, var(--accent-b)) border-box; box-shadow: var(--sh-1), var(--glow-teal);
}
.tot-amt { font: 900 clamp(2.4rem, 11vw, 3.8rem)/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
#phase-showcase-reveal[data-tier=huge]:not([data-choreo=running]) .tot-amt,
#phase-showcase-reveal[data-tier=huge][data-stage~=result] .tot-amt { color: var(--accent-2-ink); }
#phase-showcase-reveal[data-choreo=running] .showcase-total { transition: box-shadow 500ms var(--ease); }
#phase-showcase-reveal[data-stage~=total] .showcase-total { box-shadow: var(--sh-1), var(--glow-teal); }
#phase-showcase-reveal[data-choreo=running]:not([data-stage~=total]) .tot-amt { opacity: .45; }

/* Staging while the choreography runs. visibility (not opacity) keeps held-back text out of the accessibility tree. */
[data-choreo=running]:not([data-stage~=result]) .hl-final { display: none; }
[data-choreo=running]:not([data-stage~=result]) .hl-pre { display: inline; }
[data-choreo=running]:not([data-stage~=result]) .reveal-sub { visibility: hidden; }
[data-choreo=running]:not([data-stage~=done]) .round-recap { visibility: hidden; }
[data-choreo=running] .bid-reveal-item:not(.rv-in) { visibility: hidden; }
.rv-skip { align-self: center; }
.rv-skip[hidden] { display: none; }
.pts-float {
  position: fixed; z-index: 450; pointer-events: none; padding: 6px 12px; border: 1px solid #F3BE84; border-radius: 999px; background: #FFFFFF; white-space: nowrap;
  font: 900 26px/1 var(--display); color: var(--accent-2-ink); font-variant-numeric: tabular-nums; box-shadow: var(--sh-2), var(--glow-tang);
}

/* ---------- Big wheel and Showdown results (Session 7) ---------- */
#phase-showdown > h2, #phase-results > h2 { font: 900 clamp(1.8rem, 6vw, 2.4rem)/1.1 var(--display); letter-spacing: -.01em; color: var(--ink); text-align: left; margin: 0 0 6px; }
.showdown-subtitle { margin: 0 0 16px; text-align: left; color: var(--ink-muted); font: 500 1rem/1.5 var(--ui); }
.turns-card { padding: 16px 18px; margin-bottom: 16px; }
.turns-card .label { margin: 0 0 10px; }
.turns { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.turn {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 5px 12px 5px 5px; border-radius: var(--r-pill); min-width: 0;
  background: linear-gradient(180deg, #FFFFFF, #EEF1F5); border: 1px solid #CDD5DE; box-shadow: var(--sh-2); font: 700 15px/1.2 var(--ui); color: var(--ink);
}
.turn .np-av { --avk-size: 32px; }
.turn-name { min-width: 0; overflow-wrap: anywhere; }
.turn-you { margin-left: 4px; font: 700 12px/1 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--accent-b); }
.turn.is-now {
  background: linear-gradient(180deg, #FFFFFF, #F5FBFB) padding-box, linear-gradient(180deg, #7AD6D2, var(--accent-b)) border-box;
  border: 1px solid transparent; box-shadow: var(--sh-1), var(--glow-teal); font-weight: 800;
}
.chip.solid { color: #fff; border-color: transparent; background: linear-gradient(180deg, var(--accent-btn), var(--accent-b)); }

.showdown-spinner-name { margin: 10px 0 14px; text-align: center; font: 800 clamp(1.3rem, 4.6vw, 1.7rem)/1.2 var(--display); color: var(--ink); }
.wheel-decision-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
@media (min-width: 900px) { .wheel-decision-layout { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.wheel-container { position: relative; display: flex; justify-content: center; width: 100%; margin: 0; padding: 0; }
.wheel-wrap { position: relative; width: min(90vw, 400px); aspect-ratio: 1; margin: 0 auto; }
@keyframes wheel-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.wheel-container-enter { animation: wheel-rise 520ms var(--ease) both; }
#wheel-canvas {
  display: block; width: 100%; height: 100%; border-radius: 50%;
  box-shadow: 0 18px 24px rgba(19, 32, 41, .16); transition: opacity 500ms var(--ease), filter 500ms var(--ease), box-shadow 500ms var(--ease);
}
.wheel-container.is-bust #wheel-canvas { opacity: .55; filter: saturate(.55); box-shadow: 0 10px 16px rgba(19, 32, 41, .10); }
.wheel-container.is-dollar #wheel-canvas { box-shadow: 0 18px 24px rgba(19, 32, 41, .16), var(--glow-tang); }

/* "Your turn" stinger: a card over the wheel. Purely cosmetic, so it never takes a tap or focus. */
.stinger-scrim { position: absolute; inset: -6px; border-radius: 50%; background: rgba(236, 239, 243, .55); pointer-events: none; }
.stinger {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(82%, 330px); padding: 22px 18px; text-align: center; border-radius: 20px; pointer-events: none;
  background: linear-gradient(180deg, #FFFFFF, #F7FBFB) padding-box, linear-gradient(180deg, #7AD6D2, var(--accent-b)) border-box; border: 1px solid transparent; box-shadow: var(--sh-1), var(--glow-teal);
}
.stinger[hidden], .stinger-scrim[hidden] { display: none; }
.stinger .label { margin: 0 0 6px; }
.stinger .big { margin: 0; font: 900 clamp(1.9rem, 8vw, 2.6rem)/1.05 var(--display); color: var(--accent-b); letter-spacing: -.01em; overflow-wrap: anywhere; }

.wheel-decision-panel { display: flex; flex-direction: column; align-items: stretch; gap: 12px; padding: 20px; text-align: center; }
.wheel-decision-panel .eyebrow { align-self: center; }
.showdown-spin-info { min-height: 0; margin: 0; text-align: center; font: 800 clamp(1.2rem, 4.2vw, 1.5rem)/1.2 var(--display); color: var(--ink); }
.showdown-spin-info:empty { display: none; }
.showdown-status { margin: 0; min-height: 1.4em; text-align: center; font: 600 1rem/1.4 var(--ui); color: var(--ink-muted); overflow-wrap: anywhere; }
.wheel-decision-panel .btn-host-skip { margin: 0 auto; }
.choice { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; padding: 0; text-align: center; }
.choice .label { margin: 0; }
.choice-total { margin: 0; font: 600 1rem/1.3 var(--ui); color: var(--ink-muted); }
#showdown-my-total { display: block; margin-top: 2px; font: 900 clamp(2.6rem, 10vw, 3.8rem)/1 var(--display); letter-spacing: -.01em; color: var(--ink); }
.choice-btns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; width: 100%; }
.choice-btns .btn { padding: 0 12px; }
.amount { font: 900 clamp(2.6rem, 10vw, 3.8rem)/1 var(--display); font-variant-numeric: tabular-nums; color: var(--ink); letter-spacing: -.01em; }

/* What the spin meant: bust is red text (never colour alone: the chip says "Bust"), a perfect dollar glows tangerine. */
.sd-outcome { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px; border-radius: var(--r-lg); border: 1px solid #D3DAE2; background: linear-gradient(180deg, #FFFFFF, var(--surface-b)); }
.sd-outcome[hidden] { display: none; }
.sd-outcome h3 { margin: 0; font: 800 1.4rem/1.2 var(--display); }
.sd-outcome p { margin: 0; font: 600 .95rem/1.4 var(--ui); }
.sd-outcome[data-tier=dollar] { border-color: #F3BE84; box-shadow: var(--sh-2), var(--glow-tang); }
.sd-outcome[data-tier=bust] { border-color: #E8A69A; }
.sd-outcome[data-tier=bust] .amount { color: var(--danger); }
.sd-outcome .amount { font-size: clamp(2.2rem, 8vw, 3rem); }

/* Results lists: live during the showdown, final on the results phase. */
.showdown-results-table { max-width: none; margin: 18px 0 0; padding: 16px 18px; text-align: left; color: var(--ink); }
.showdown-results-table:empty, .showdown-results-table[hidden] { display: none; }
.showdown-results-table > .label { margin: 0 0 10px; }
.showdown-result-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px 14px; margin: 0 0 8px; padding: 10px 14px 10px 10px; border-radius: 14px;
  border: 1px solid #D3DAE2; background: linear-gradient(180deg, #FFFFFF, var(--surface-b)); box-shadow: var(--sh-2); color: var(--ink); font: 700 16px/1.25 var(--ui);
}
.showdown-result-row:last-child { margin-bottom: 0; }
.sdr-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sdr-who .np-av { --avk-size: 36px; }
.sdr-name { min-width: 0; overflow-wrap: anywhere; }
.sdr-spins { font: 600 .9rem/1.2 var(--ui); color: var(--ink-muted); text-align: right; white-space: nowrap; }
.sdr-end { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sdr-total { font: 900 1.25rem/1 var(--display); }
.showdown-ended-tag { font: 600 .8rem/1.2 var(--ui); color: var(--ink-muted); }
.showdown-result-row.busted { background: linear-gradient(180deg, #FFFFFF, #FBF3F1); }
.showdown-result-row.busted .sdr-name { opacity: .8; }
.showdown-result-row.showdown-winner {
  background: linear-gradient(180deg, #FFFFFF, #FFFCF8) padding-box, linear-gradient(180deg, #F8C894, var(--accent-2)) border-box; border-color: transparent; box-shadow: var(--sh-2), var(--glow-tang);
}
@media (max-width: 520px) {
  .showdown-result-row { grid-template-columns: minmax(0, 1fr) auto; }
  .sdr-spins { grid-column: 1; grid-row: 2; text-align: left; padding-left: 46px; font-size: .85rem; }
  .sdr-end { grid-column: 2; grid-row: 1 / span 2; }
}

/* Showdown results phase card */
#phase-results { max-width: 760px; margin: 0 auto; text-align: center; }
#phase-results > h2 { text-align: center; }
#results-detail { margin: 0 0 16px; color: var(--ink-muted); font: 600 1rem/1.5 var(--ui); }
.res-card { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 18px; text-align: center; }
.res-card[hidden] { display: none; }
.res-card h3 { margin: 0; font: 800 1.6rem/1.15 var(--display); overflow-wrap: anywhere; }
.res-card[data-tier=win] { box-shadow: var(--sh-1), var(--glow-teal); }
.res-card[data-tier=dollar] { box-shadow: var(--sh-1), var(--glow-tang); }
.winner-avs { display: flex; justify-content: center; gap: 10px; }
.winner-avs .np-av { --avk-size: 64px; }
.winner-chip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; }
.pts-pop { font: 900 clamp(1.8rem, 7vw, 2.4rem)/1 var(--display); color: var(--accent-2-ink); font-variant-numeric: tabular-nums; }
#phase-results .showdown-results-table { text-align: left; }

@media (prefers-reduced-motion: reduce) {
  .wheel-container-enter { animation: none; }
  #wheel-canvas { transition: none; }
}
html[data-reduced-motion=true] .wheel-container-enter { animation: none; }
html[data-reduced-motion=true] #wheel-canvas { transition: none; }

/* ---------- game over: podium and awards (Session 9) ---------- */
/* The final DOM is complete; .go-hold only hides pieces while the staged entrance has not reached them. */
#phase-game-over { max-width: 1040px; margin: 0 auto; text-align: left; }
.go-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 18px; text-align: center; }
.champ-h { margin: 0; font: 900 clamp(2.1rem, 9vw, 3.4rem)/1.02 var(--display); letter-spacing: -.02em; color: var(--ink); overflow-wrap: anywhere; }
.champ-h .n { color: var(--accent-b); }
#game-over-summary { margin: 0; color: var(--ink-muted); font: 600 1rem/1.5 var(--ui); text-align: center; }
.go-cols, .go-main, .go-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 900px) { .go-cols { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 24px; } }

.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; padding-top: 6px; }
.podium:has(.pod:only-child) { grid-template-columns: minmax(0, 1fr); max-width: 220px; margin: 0 auto; width: 100%; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.pod .np-av { --avk-size: 56px; }
.pod .pname { font: 700 15px/1.2 var(--ui); text-align: center; overflow-wrap: anywhere; color: var(--ink); }
.pod .pname .player-you-badge { display: inline-flex; margin-left: 4px; padding: 1px 7px; font: 800 12px/1.4 var(--ui); letter-spacing: .06em; text-transform: uppercase; border-radius: var(--r-pill); }
.pod .pscore { font: 800 17px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.pod-block {
  position: relative; width: 100%; border-radius: 16px 16px 10px 10px; overflow: hidden; display: flex; flex-direction: column; align-items: center; padding-top: 14px;
  border: 1px solid #BCC6D1;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.32) 0 1px, rgba(19,32,41,.025) 1px 2px), linear-gradient(135deg, #E9EDF2 0%, #D9DFE6 52%, #EEF1F5 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), var(--sh-1);
}
.pod-block::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: linear-gradient(90deg, #63CDC9, var(--accent-b)); }
.pod-block .rank { font: 900 clamp(2.3rem, 9vw, 3.4rem)/1 var(--display); color: var(--ink); }
.pod-1 .pod-block { height: 214px; } .pod-2 .pod-block { height: 166px; } .pod-3 .pod-block { height: 128px; }
.pod.first .pod-block::before { background: linear-gradient(90deg, #FFC98F, var(--accent-2)); }
.pod.first .pod-block { box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 0 0 1px rgba(240,138,36,.45), 0 0 46px rgba(240,138,36,.38); }
.pod.first .rank { color: var(--accent-2-ink); }
.pod.first .np-av { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 4px var(--accent-2), 0 0 24px rgba(240,138,36,.45); }
.go-hold { opacity: 0; }

#go-rest > .label { margin: 0 0 6px; }
.final-scores { display: flex; flex-direction: column; margin: 0; }
.final-score-item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 0; border-bottom: 1px solid #E1E6EC; color: var(--ink); }
.final-score-item:last-child { border-bottom: 0; }
.final-score-item .np-av { --avk-size: 36px; }
.final-score-item .fs-rank { width: 34px; flex: none; text-align: center; font: 900 20px/1 var(--display); color: var(--ink-muted); }
.final-score-item .fs-name { flex: 1; min-width: 0; font: 700 16px/1.25 var(--ui); overflow-wrap: anywhere; }
.final-score-item .fs-score { flex: none; font: 800 17px/1 var(--display); font-variant-numeric: tabular-nums; }
.final-score-item.you .fs-name { color: var(--accent-b); }

.awards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.award { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding: 14px; border-radius: var(--r-lg); border: 1px solid #D3DAE2; background: linear-gradient(180deg, #FFFFFF, #F4F6F9); box-shadow: var(--sh-2); }
.award .ai { width: 46px; height: 46px; margin-bottom: 4px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-b); border: 1px solid #9ED8D5; background: linear-gradient(180deg, #F5FCFC, #E2F3F2); }
.award .ai .ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.award .label { margin: 0; }
.award .at { margin: 0; font: 800 17px/1.2 var(--display); overflow-wrap: anywhere; color: var(--ink); }
.award .as { margin: 0; font: 600 14px/1.4 var(--ui); color: var(--ink-muted); }
#go-awards-card .card-h { margin-bottom: 12px; }
#go-rest[hidden], #go-awards-card[hidden] { display: none; }

.game-over-actions { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.game-over-actions .btn { width: 100%; white-space: pre-line; text-align: center; line-height: 1.25; }
.game-over-actions .muted { margin: 0; color: var(--ink-muted); font: 600 14px/1.4 var(--ui); text-align: center; }
.game-over-actions #game-over-waiting { font-size: 16px; }


/* ==========================================================================
   Menus, modals, toasts and screen transitions (Session 10)
   Sheet = white to #F7F9FB face, 1px platinum edge, long soft shadow, on a pale scrim.
   ========================================================================== */
@keyframes ov-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.modal-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto;
  background: rgba(236,239,243,.78); animation: ov-in 200ms var(--ease) both;
}
.modal-box {
  position: relative; display: flex; flex-direction: column; gap: 14px; width: min(100%, 580px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow: auto; padding: 18px; border-radius: 20px; color: var(--ink); border: 1px solid transparent;
  background: linear-gradient(180deg, #FFFFFF, #F7F9FB) padding-box, linear-gradient(180deg, #FFFFFF, #CDD5DE) border-box;
  box-shadow: 0 1px 2px rgba(19,32,41,.06), 0 24px 60px rgba(19,32,41,.18); animation: sheet-in 260ms var(--ease) both;
}
.modal-box > * { margin: 0; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-header h2, .modal-box > h2 { flex: 1; min-width: 0; margin: 0; font: 800 24px/1.2 var(--display); text-align: left; color: var(--ink); overflow-wrap: anywhere; }
.modal-close {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; padding: 0; cursor: pointer;
  font: 500 28px/1 var(--ui); color: var(--ink-muted); border-radius: 12px; border: 1px solid #C5CED8;
  background: linear-gradient(180deg, #FFFFFF, #EEF1F5); box-shadow: 0 1px 2px rgba(19,32,41,.06), inset 0 1px 0 #fff;
  transition: transform var(--dur-snap) var(--ease), border-color 200ms var(--ease);
}
.modal-close:active { transform: translateY(1px); }
.modal-lede, .modal-box p { font: 500 16px/1.5 var(--ui); color: var(--ink-muted); }
.modal-actions, .confirm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.confirm-actions .btn { flex: 1 1 140px; }
.confirm-modal-box { width: min(100%, 420px); }
.confirm-modal-box h2 { font: 800 24px/1.2 var(--display); }
.btn-block { width: 100%; }

/* How to play */
.modal-body h3 { margin: 20px 0 6px; font: 800 18px/1.3 var(--display); color: var(--accent-b); }
.modal-body h3:first-child { margin-top: 0; }
.modal-body p, .modal-body li { margin: 4px 0; font: 500 16px/1.55 var(--ui); color: var(--ink); }
.modal-body strong { font-weight: 700; }
.modal-body ul { list-style: none; margin: 4px 0; padding: 0; }
.modal-body li { position: relative; padding-left: 20px; }
.modal-body li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-a); }

/* Tabs */
.settings-tab-bar, .host-panel-tabs { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: #E3E8EE; border: 1px solid var(--edge-b); }
.tab-btn {
  flex: 1; min-height: 44px; padding: 0 8px; cursor: pointer; border: 0; border-radius: 10px; background: transparent;
  font: 700 15px/1.2 var(--ui); color: var(--ink-muted); transition: background 200ms var(--ease), color 200ms var(--ease);
}
.tab-btn.active, .tab-btn[aria-selected="true"] {
  background: linear-gradient(180deg, #FFFFFF, #F4F6F9); color: var(--accent-b); box-shadow: 0 1px 2px rgba(19,32,41,.12), inset 0 1px 0 #fff;
}
.tab-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tab-btn[hidden] { display: none; }
.settings-tab-content, .host-tab-content { display: flex; flex-direction: column; gap: 14px; }
.settings-body { display: flex; flex-direction: column; gap: 0; }

/* Settings rows and controls */
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; padding: 10px 0; border-bottom: 1px solid #E1E6EC; }
.settings-row:last-child { border-bottom: 0; }
.settings-label { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; }
.settings-label-text { font: 700 16px/1.3 var(--ui); color: var(--ink); }
.settings-label-desc { font: 500 14px/1.4 var(--ui); color: var(--ink-muted); }
.settings-host-badge {
  margin-left: 6px; padding: 2px 7px; vertical-align: middle; border-radius: var(--r-pill); font: 800 12px/1.3 var(--ui); letter-spacing: .08em;
  color: var(--accent-b); background: #E2F3F2; border: 1px solid #9ED8D5;
}
.settings-host-status { font: 600 14px/1.4 var(--ui); color: var(--accent-2-ink); }
.settings-row--locked { opacity: .6; pointer-events: none; }
.settings-row--locked .settings-select, .settings-row--locked .toggle-switch { cursor: not-allowed; }
.settings-lock-notice {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 6px; padding: 12px 14px; border-radius: 14px; background: #F2F5F8; border: 1px dashed #C5CED8;
  font: 600 14px/1.4 var(--ui); color: var(--ink-muted);
}
.settings-lock-notice[hidden] { display: none; }
.settings-footer { display: flex; justify-content: flex-end; }
.settings-footer .btn { min-width: 160px; }
.settings-volume-control { display: flex; align-items: center; gap: 10px; flex: 0 1 220px; min-width: 0; }
#settings-volume { flex: 1; min-width: 80px; accent-color: var(--accent-a); }
.settings-volume-value { min-width: 3.2em; text-align: right; font: 800 16px/1 var(--display); font-variant-numeric: tabular-nums; color: var(--ink); }
.settings-select { flex: none; min-height: 44px; padding: 0 12px; cursor: pointer; font: 700 15px var(--ui); color: var(--ink); background: #fff; border-color: #C5CED8; }
.advanced-game-settings { margin-top: 10px; border-top: 1px solid #E1E6EC; }
.advanced-game-settings > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font: 700 15px/1.3 var(--ui); color: var(--accent-b); }

/* Toggle switch (54 x 32, as in the preview) */
.toggle-switch { position: relative; display: inline-block; flex: none; width: 54px; height: 32px; cursor: pointer; }
.toggle-switch input { position: absolute; width: 0; height: 0; opacity: 0; }
.toggle-slider {
  position: absolute; inset: 0; border-radius: 999px; border: 1px solid #BCC6D1;
  background: linear-gradient(180deg, #E3E8EE, #D5DCE4); transition: background 260ms var(--ease), border-color 260ms var(--ease);
}
.toggle-slider::before {
  content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(180deg, #FFFFFF, #E9EDF2); box-shadow: 0 2px 4px rgba(19,32,41,.2); transition: transform 260ms var(--ease);
}
.toggle-switch input:checked + .toggle-slider { background: linear-gradient(180deg, var(--accent-a), var(--accent-b)); border-color: var(--accent-b); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }
.toggle-switch:focus-within .toggle-slider { outline: 3px solid var(--focus); outline-offset: 3px; }

/* Host controls */
.field-label { display: block; margin: 0 0 6px; font: 700 14px/1.3 var(--ui); color: var(--ink); }
.host-panel-note { margin: 0; font: 600 14px/1.45 var(--ui); color: var(--ink-muted); }
.host-panel-note strong { color: var(--ink); }
.lockbox {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #F2F5F8; border: 1px dashed #C5CED8;
  font: 600 14px/1.45 var(--ui); color: var(--ink-muted);
}
.lockbox.warn { background: #FFF6EB; border-color: #F3BE84; color: var(--accent-2-ink); }
.host-tab-content > .br-input, .host-tab-content > .btn { margin: 0; }
.host-room-password-block { display: flex; flex-direction: column; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid #E1E6EC; }
.host-room-password-block input[type="password"] { width: 100%; }
.host-panel-section-title { margin: 0; font: 700 12px/1.25 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.host-room-password-hint { margin: 0; font: 500 14px/1.45 var(--ui); color: var(--ink-muted); }
.host-room-password-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.host-room-password-status { margin: 0; font: 700 14px/1.4 var(--ui); }
.host-room-password-status.success { color: var(--success); }
.host-room-password-status.error { color: var(--danger); }
.host-panel-player-list { display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; list-style: none; }
.host-panel-player-item { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 0; border-bottom: 1px solid #E1E6EC; font: 700 16px/1.3 var(--ui); }
.host-panel-player-item .player-name { flex: 1; min-width: 0; }
.host-panel-player-item .btn-remove { margin-left: auto; }
.host-panel-player-item .conn-dot { order: -1; }
.host-panel-rejoin-box {
  display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding: 14px; list-style: none; border-radius: var(--r-lg);
  background: linear-gradient(180deg, #FFFFFF, #FFF8EF) padding-box, linear-gradient(180deg, #F8D2A6, #F3BE84) border-box; border: 1px solid transparent; box-shadow: var(--sh-2);
}
.host-panel-rejoin-box > p { margin: 0; font: 500 14px/1.4 var(--ui); color: var(--ink-muted); }
.host-panel-rejoin-box > .host-panel-section-title { color: var(--accent-2-ink); }
.host-panel-rejoin-row { display: flex; align-items: center; gap: 8px; min-height: 48px; font: 700 16px/1.3 var(--ui); }
.host-panel-rejoin-row span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.host-panel-rejoin-row .btn { flex: none; }

/* QR invite */
.qr-modal-box { width: min(100%, 360px); text-align: center; align-items: stretch; }
.qr-modal-box .modal-header h2 { text-align: left; }
#qr-room-label { text-align: center; }
#qr-room-label strong { color: var(--ink); }
.qr-image-wrapper { display: flex; justify-content: center; }
#qr-code-container {
  display: grid; place-items: center; width: 236px; height: 236px; padding: 14px; border-radius: 16px;
  background: #fff; border: 1px solid #CDD5DE; box-shadow: var(--sh-1);
}
#qr-code-container canvas, #qr-code-container img { display: block; width: 100% !important; height: 100% !important; }
.invite-url-input { width: 100%; min-height: 48px; padding: 10px 14px; font-size: 14px; }
.modal-box .player-host-badge, .modal-box .player-you-badge { font: 800 12px/1.3 var(--ui); letter-spacing: .06em; }
.qr-url-text { display: none; }
.invite-actions { display: flex; gap: 10px; }
.invite-actions .btn { flex: 1; }
.inline-feedback { margin: 0; min-height: 1.4em; font: 700 14px/1.4 var(--ui); color: var(--success); }

/* Product image zoom: same capsule timer and same clock as the bid panel */
.product-image-modal { width: min(100%, 1000px); height: min(900px, calc(var(--visual-viewport-height, 100dvh) - 32px)); max-height: none; overflow: hidden; }
.product-image-modal .modal-header h2 { font-size: 20px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-image-countdown {
  flex: none; display: flex; align-items: center; gap: 20px; padding: 12px 16px; border-radius: 14px; background: #F2F5F8; border: 1px solid #D3DAE2; color: var(--ink);
}
.product-image-countdown .pic-timer { flex: 1.4 1 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.product-image-countdown p { flex: 1 1 0; margin: 0; font: 600 15px/1.4 var(--ui); color: var(--ink-muted); }
.product-image-countdown.urgent { background: #FFF8F6; border-color: #E8A69A; }
.product-image-countdown .cap-num { font-size: 2rem; }
#product-image-large { flex: 1; width: 100%; min-height: 0; padding: 12px; object-fit: contain; border-radius: 14px; background: #fff; border: 1px solid #E1E6EC; }
.product-image-modal > .btn { flex: none; }
@media (max-width: 560px) {
  .product-image-countdown { flex-direction: column; align-items: stretch; gap: 8px; }
}
@media (max-height: 500px) and (min-width: 600px) {
  .product-image-modal { display: grid; grid-template-columns: minmax(0, 1fr) 260px; grid-template-rows: auto minmax(0, 1fr) auto; padding: 14px; gap: 10px; }
  .product-image-modal .modal-header { grid-column: 1 / -1; }
  #product-image-large { grid-column: 1; grid-row: 2 / 4; height: 100%; }
  .product-image-countdown { grid-column: 2; grid-row: 2; flex-direction: column; align-items: stretch; gap: 8px; }
  .product-image-modal > .btn { grid-column: 2; grid-row: 3; }
}

/* Idle "Game paused" and removed-from-room */
#idle-overlay { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; cursor: pointer; background: rgba(236,239,243,.86); animation: ov-in 300ms var(--ease) both; }
.pause-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(100%, 420px); padding: 28px 22px; border-radius: 20px; text-align: center; user-select: none; pointer-events: none;
  background: linear-gradient(180deg, #FFFFFF, #F4F6F9) padding-box, linear-gradient(180deg, #7AD6D2, var(--accent-b)) border-box; border: 1px solid transparent; box-shadow: var(--sh-1), var(--glow-teal);
}
.pause-card .idle-pause-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; color: var(--accent-b); background: #E2F3F2; border: 1px solid #9ED8D5; }
.pause-card .idle-pause-icon .ui-icon { width: 28px; height: 28px; stroke-width: 2.4; }
.pause-card h2 { margin: 0; font: 800 clamp(1.5rem, 5vw, 1.9rem)/1.2 var(--display); }
.pause-card p { margin: 0; font: 500 16px/1.45 var(--ui); color: var(--ink-muted); }
.removed-modal-box { width: min(100%, 420px); align-items: center; gap: 12px; padding: 28px 22px; text-align: center; }
.removed-modal-box h2 { flex: none; font: 800 24px/1.2 var(--display); text-align: center; }
.removed-modal-box .btn { min-width: 140px; }
.lk-ico {
  display: grid; place-items: center; flex: none; width: 58px; height: 58px; border-radius: 50%; color: var(--accent-b);
  background: #E2F3F2; border: 1px solid #9ED8D5; box-shadow: 0 0 0 6px rgba(23,163,160,.08);
}
.lk-ico.warn { color: var(--accent-2-ink); background: #FDEBD6; border-color: #F3BE84; box-shadow: 0 0 0 6px rgba(240,138,36,.08); }
.lk-ico .ui-icon { width: 26px; height: 26px; stroke-width: 2.2; }

/* Bug report and suggestion */
.form-modal-box { width: min(100%, 640px); }
.field-row { display: flex; flex-direction: column; margin: 0; }
.form-modal-box form { display: flex; flex-direction: column; gap: 14px; }
.field-label .opt { font-weight: 600; color: var(--ink-muted); }
.br-input { display: block; width: 100%; }
textarea.br-input { min-height: 120px; resize: vertical; line-height: 1.5; }
#br-message, #sg-message { resize: none; overflow-y: hidden; }
.sysinfo { padding: 4px 14px; border-radius: 12px; background: #F2F5F8; border: 1px solid #D3DAE2; }
.sysinfo > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font: 700 15px/1.3 var(--ui); color: var(--accent-b); }
#br-sysinfo { max-height: 120px; margin: 0 0 10px; overflow-y: auto; white-space: pre-wrap; word-break: break-all; font: 500 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink-muted); }
.form-status { margin: 0; padding: 10px 14px; border-radius: 12px; font: 700 15px/1.4 var(--ui); }
.form-status.error { color: var(--danger); background: #FFF8F6; border: 1px solid #E8A69A; }
.form-status.ok { color: var(--success); background: #F0FAF5; border: 1px solid #A6D9BD; }

/* Debug and AWS stats (light touch: the same sheet, with monospace data) */
.debug-fab {
  position: fixed; bottom: 16px; right: calc(50% + 5px); z-index: 900; min-height: 44px; padding: 0 18px; cursor: pointer; opacity: .92;
  border-radius: var(--r-pill); border: 1px solid #C5CED8; background: linear-gradient(180deg, #FFFFFF, #EEF1F5); color: var(--accent-b); box-shadow: var(--sh-2); font: 800 14px var(--ui);
}
.debug-fab.aws { right: auto; left: calc(50% + 5px); color: var(--accent-2-ink); }
.debug-modal-box { width: min(100%, 860px); height: min(95vh, 100%); }
.debug-textarea { flex: 1; width: 100%; min-height: 0; padding: 10px 12px; resize: vertical; white-space: pre; overflow-wrap: normal; overflow-x: auto; font: 500 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.aws-modal-box { width: min(100%, 640px); }
.aws-stats-content { flex: 1; min-height: 0; overflow-y: auto; }
.aws-meta { margin: 0 0 8px; font: 500 14px/1.5 var(--ui); color: var(--ink-muted); }
.aws-meta b { color: var(--ink); }
.aws-table { width: 100%; margin-bottom: 10px; border-collapse: collapse; font: 600 14px/1.4 var(--ui); color: var(--ink); }
.aws-table th { padding: 8px; text-align: left; font: 700 12px/1.25 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); border-bottom: 1px solid #CDD5DE; }
.aws-table td { padding: 5px 8px; border-bottom: 1px solid #E9EDF2; }
.aws-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.aws-table .sect td { padding-top: 10px; font-weight: 800; color: var(--accent-b); background: #F2F5F8; }
.aws-table .sect .tot { font-weight: 600; color: var(--ink-muted); }
.aws-table .none { font-style: italic; color: var(--ink-muted); }
.aws-table .total td { font-weight: 800; border-top: 2px solid #CDD5DE; }
.aws-note { margin: 0; font: 500 13px/1.4 var(--ui); color: var(--ink-muted); }

/* Toasts: top-centre stack (preview .toasts). Class names stay score-toast for tests and callers. */
#score-notifications {
  position: fixed; top: 12px; left: 50%; z-index: 9999; display: flex; flex-direction: column; align-items: stretch; gap: 10px;
  width: min(440px, calc(100% - 32px)); transform: translateX(-50%); pointer-events: none;
}
.score-toast {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border-radius: 14px; border: 1px solid transparent; color: var(--ink);
  background: linear-gradient(180deg, #FFFFFF, #F4F6F9) padding-box, linear-gradient(180deg, #FFFFFF, #CDD5DE) border-box; box-shadow: var(--sh-1);
  font: 700 16px/1.3 var(--ui); animation: toast-in 360ms var(--ease) both;
}
.score-toast .ti, .banner-toast .ti {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; color: var(--accent-b); background: #E2F3F2; border: 1px solid #9ED8D5;
}
.score-toast .ti .ui-icon, .banner-toast .ti .ui-icon { width: 18px; height: 18px; stroke-width: 2; }
.score-toast .toast-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.score-toast.score-toast-loss .ti, .score-toast.score-toast-error .ti { color: var(--danger); background: #FDEDEA; border-color: #E8A69A; }
.score-toast.score-toast-error { pointer-events: auto; background: linear-gradient(180deg, #FFFFFF, #FFF8F6) padding-box, linear-gradient(180deg, #F3C6BC, #E8A69A) border-box; }
.toast-close-btn {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin: -6px -8px -6px 0; padding: 0; cursor: pointer;
  font: 700 16px/1 var(--ui); color: var(--ink-muted); background: transparent; border: 0; border-radius: 12px;
}
.score-toast.fade-out { animation: toast-out 600ms var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-8px); } }

/* Banners: reconnecting, stale session, waiting for host. Same toast card, pinned top-centre. */
@keyframes banner-toast-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translateX(-50%); } }
.banner-toast {
  position: fixed; top: 12px; left: 50%; z-index: 9998; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  width: min(440px, calc(100% - 32px)); min-height: 56px; padding: 10px 14px; transform: translateX(-50%); border-radius: 14px; border: 1px solid transparent; color: var(--ink);
  background: linear-gradient(180deg, #FFFFFF, #F4F6F9) padding-box, linear-gradient(180deg, #FFFFFF, #CDD5DE) border-box; box-shadow: var(--sh-1);
  font: 700 16px/1.3 var(--ui); animation: banner-toast-in 360ms var(--ease) both;
}
.banner-toast .banner-text { flex: 1 1 160px; min-width: 0; }
.banner-toast.warn .ti { color: var(--accent-2-ink); background: #FDEBD6; border-color: #F3BE84; }
.banner-toast .btn { flex: none; margin-left: auto; }
.banner-toast .reconnect-spinner { width: 18px; height: 18px; margin: 0; }
#stale-session-banner { top: 76px; }
#host-waiting-banner { top: 76px; }

/* Light-wipe screen transition: classes added by playLightWipe() in app.js. Opacity only (no transform) so
   position:fixed children such as the pinned bid sheet are never re-parented while it runs. */
@keyframes wipe-enter { from { opacity: 0; } to { opacity: 1; } }
@keyframes wipe-sheen { 0% { opacity: 0; transform: translateX(-30%); } 40% { opacity: 1; transform: translateX(0); } 100% { opacity: 0; transform: translateX(30%); } }
.screen.wipe-enter, .game-phase.wipe-enter { animation: wipe-enter 480ms var(--ease) both; }
#screen-wipe {
  position: fixed; inset: -10% -60%; z-index: 50; pointer-events: none; opacity: 0;
  background: linear-gradient(105deg, rgba(255,255,255,0) 40%, rgba(255,255,255,.62) 50%, rgba(255,255,255,0) 60%);
}
#screen-wipe.run { animation: wipe-sheen 360ms var(--ease-move) both; }
@media (prefers-reduced-motion: reduce) { #screen-wipe { display: none; } }
html[data-reduced-motion=true] #screen-wipe { display: none; }

@media (max-width: 640px) {
  .modal-box { padding: 16px; }
  .settings-row { gap: 12px; }
  .settings-volume-control { flex-basis: 150px; }
  .settings-row .settings-select { max-width: 120px; }
  .tab-btn { font-size: 14px; }
  .modal-header h2, .modal-box > h2 { font-size: 22px; }
}
@media (hover: hover) and (pointer: fine) {
  .modal-close:hover { border-color: #9FB0BF; background: #fff; }
  .tab-btn:hover { color: var(--accent-b); }
  .toast-close-btn:hover { color: var(--ink); background: #F2F5F8; }
  .debug-fab:hover { border-color: #9FB0BF; }
}

/* ---------- logo placements ---------- */
.header-logo { display: block; width: auto; height: 38px; max-width: 100%; }
@media (min-width: 641px) { .header-logo { height: 46px; } }
.welcome-wordmark .welcome-logo { display: block; width: min(300px, 78vw); height: auto; margin: 0 auto; }
.join-logo { display: block; width: min(220px, 60vw); height: auto; margin: 0 auto; }
