.recruit-screen { max-width: 1300px; }

.recruit-body {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 10px 16px;
  width: 100%;
  margin-bottom: 16px;
}
/* Readiness sits in the shop column only, so it shares that pane's width and the map beside it
   spans both rows. */
.recruit-body > .readiness-bar     { grid-column: 2; grid-row: 1; min-width: 0; }
.recruit-body > .recruit-map-pane  { grid-column: 1; grid-row: 1 / 3; }
.recruit-body > .recruit-shop-pane { grid-column: 2; grid-row: 2; }
@media (max-width: 900px) {
  .recruit-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .recruit-body > .readiness-bar     { grid-column: 1; grid-row: 1; }
  .recruit-body > .recruit-map-pane  { grid-column: 1; grid-row: 2; }
  .recruit-body > .recruit-shop-pane { grid-column: 1; grid-row: 3; }
}

/* Mobile-only: pins the remaining-points figure top-right while scrolling the unit table. */
.mobile-points-sticky { display: none; }
@media (max-width: 640px) {
  .mobile-points-sticky {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: fixed;
    top: 8px;
    right: 8px;
    z-index: 200;
    padding: 5px 12px;
    background: var(--bg-card);
    border: 1px solid var(--accent-gold);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-primary);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  }
  .mobile-points-sticky strong {
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 1rem;
  }
}
.recruit-map-pane,
.recruit-shop-pane {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  padding: 14px;
  min-width: 0;
}
.recruit-map-pane {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.recruit-map-eyebrow {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.recruit-map-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}
.recruit-map-pane .recruit-map-grid {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 1;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}
.recruit-map-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.35;
}
.recruit-shop-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.recruit-quick {
  display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; justify-content: flex-start;
}
/* The dropdowns share the row; the two icon buttons stay intrinsic at every width. */
.recruit-quick .preset-select,
.recruit-quick .spec-select {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
}
.recruit-quick .btn:not(.preset-select) { flex: 0 0 auto; }

/* Mirrors .recruit-screen so recruit + deploy share geometry. */
.deploy-screen { max-width: 1600px; }

/* 2-row grid; tray spans both rows (grid-row: 1/3) so its top aligns with deploy-board-header. Col 2 auto = board's natural width. */
.deploy-body {
  display: grid;
  grid-template-columns: minmax(240px, 320px) auto;
  grid-template-rows: auto 1fr;
  gap: 8px 24px;
  width: 100%;
  margin-bottom: 16px;
  justify-content: center;
}
.deploy-body > .deploy-board-header { grid-column: 2; grid-row: 1; }
.deploy-body > .board-wrap          { grid-column: 2; grid-row: 2; }
/* The column dissolves so the toggle takes the header row and the tray card starts level with
   .board-wrap; nested, the toggle pushed the card a row-height below it. */
.deploy-body > .deploy-tray-col { display: contents; }
.deploy-body > .deploy-tray-col > .deploy-tray-toggle { grid-column: 1; grid-row: 1; justify-self: end; align-self: center; }
.deploy-body > .deploy-tray-col > .deploy-tray        { grid-column: 1; grid-row: 2; }
@media (max-width: 900px) {
  .deploy-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    justify-content: stretch;
  }
  .deploy-body > .deploy-board-header { grid-column: 1; grid-row: 1; }
  .deploy-body > .board-wrap          { grid-column: 1; grid-row: 2; }
  .deploy-body > .deploy-tray-col { display: flex; grid-column: 1; grid-row: 3; }
}

/* readiness + AI + rotate strip above the board; all 36px so it reads as one row. */
.deploy-board-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
/* 40px + zeroed vertical padding so the ~32px readiness-tag pill fits without clipping. */
.deploy-board-header > .readiness-bar {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
}
.deploy-board-header .ai-mode-panel,
.deploy-board-header .ai-mode-panel-mount { flex: 0 0 auto; }
.deploy-board-header .ai-mode-panel {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}
.deploy-board-header .ai-mode-select {
  height: 40px;
  padding: 0 14px;
  font-size: 0.88rem;
  box-sizing: border-box;
}
.deploy-board-header .rotate-board-control { flex: 0 0 auto; margin: 0; }
.deploy-board-header .btn-rotate-board { width: 40px; height: 40px; }
@media (max-width: 640px) {
  /* Mobile: row1 readiness|rotate, row2 AI panel full-width (flex-basis:100% forces its own row). */
  .deploy-board-header { padding-left: 0; row-gap: 6px; }
  .deploy-board-header > .readiness-bar { order: 1; flex: 1 1 auto; min-width: 0; }
  .deploy-board-header .rotate-board-control { order: 2; }
  .deploy-board-header .ai-mode-panel,
  .deploy-board-header .ai-mode-panel-mount { order: 3; flex-basis: 100%; }
  .deploy-board-header .ai-mode-select { width: 100%; }
}

.deploy-tray {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  transition: width 0.18s ease, max-height 0.18s ease, padding 0.18s ease, background 0.18s ease;
}
.deploy-tray-content { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* align-items:stretch keeps the action buttons the dropdown's height so the row reads as one. */
.deploy-tray-header {
  display: flex;
  align-items: stretch;
  gap: 6px;
}
.deploy-tray-header > .preset-select {
  flex: 1 1 0;
  min-width: 0;
}
/* The two action buttons sit beside the dropdown. They carry .nl-act-compact because this
   column is 240-320px at EVERY width — a viewport media query cannot see that, and @container
   is above the support floor. */
.deploy-tray-header > .btn:not(.preset-select) { flex: 0 0 auto; }

/* The toggle sits ABOVE the tray card, not inside it, so collapsing hides the whole card and
   the control stays put. Column takes the tray's grid cell. */
.deploy-tray-col {
  display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
/* Same square as .play-panel-toggle on the play screen. */
.deploy-tray-toggle {
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  align-self: flex-end;
  flex: 0 0 auto;
}
/* Collapsing the tray buys board room only where the tray sits beside the board. Below that the
   toggle is gone, so a collapse persisted from desktop must be ignored or the tray is a dead box
   with no way to reopen it. */
@media (max-width: 1024px) { .deploy-tray-toggle { display: none; } }
.deploy-tray-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}
.deploy-tray.is-collapsed > .deploy-tray-header { display: none; }

/* Keep 14px padding when collapsed so the chevron doesn't shift; transparent bg/radius hides the card. */
.deploy-tray.is-collapsed {
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  gap: 0;
}
.deploy-tray.is-collapsed > .deploy-tray-content { display: none; }
/* Below 1024 the toggle is gone, so a collapse persisted from desktop would leave a dead box
   with no way to reopen it. Placed after the rules it overrides — a media query adds no
   specificity, so source order is what decides. */
@media (max-width: 1024px) {
  .deploy-tray.is-collapsed {
    background: var(--bg-1);
    border-color: var(--border);
    border-radius: var(--radius-l);
    gap: 8px;
  }
  .deploy-tray.is-collapsed > .deploy-tray-header  { display: flex; }
  .deploy-tray.is-collapsed > .deploy-tray-content { display: flex; }
}
.deploy-units-header {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.deploy-units-list { display: flex; flex-direction: column; gap: 6px; }
.deploy-all-placed { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

.deploy-legend {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--border-color) 60%, transparent);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.deploy-legend p { margin: 0 0 4px; }
.deploy-legend-row { display: flex; align-items: center; gap: 8px; }
/* Mini deploy-zone swatch: striped bg + coloured outline, shared across the three variants. */
.legend-swatch {
  width: 16px; height: 16px;
  border-radius: 2px;
  flex: 0 0 auto;
  box-sizing: border-box;
  background-color: rgba(120, 95, 60, 0.45);
  background-image: repeating-linear-gradient(45deg, rgba(0,0,0,0.3) 0, rgba(0,0,0,0.3) 2px, transparent 2px, transparent 5px);
  border: 2px solid transparent;
}
.legend-swatch.legend-green { border-color: rgba(129, 182, 76, 0.9); }
.legend-swatch.legend-gold  {
  border-color: rgba(255, 184, 50, 0.95);
  background-image: repeating-linear-gradient(45deg, rgba(255, 184, 50, 0.45) 0, rgba(255, 184, 50, 0.45) 2px, transparent 2px, transparent 5px);
}
.legend-swatch.legend-enemy-border { border-color: rgba(220, 60, 60, 0.85); }

.deploy-unit {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; background: var(--bg-panel);
  border: 2px solid transparent; border-radius: var(--border-radius);
  cursor: grab; font-size: 0.85rem; transition: border-color 0.15s;
}
.deploy-unit-name { flex: 1; }
/* Fixed min-width so every pill renders the same width regardless of digit count. */
.deploy-qty {
  display: inline-block;
  min-width: 3.5em;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold);
  background: color-mix(in srgb, var(--accent-gold) 12%, transparent);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  white-space: nowrap;
  box-sizing: border-box;
}
.deploy-unit:hover { border-color: var(--bronze); }
.deploy-unit.selected { border-color: var(--accent-gold); background: var(--bg-hover); }
.deploy-unit-placed {
  opacity: 0.4; text-decoration: line-through; pointer-events: none;
  border-color: transparent;
}



.reveal-screen { gap: 16px; }
.coin-result { font-size: 2rem; color: var(--accent-green); font-weight: 700; }

/* Matches where .nl-act-lbl hides (list-screen.css): the army buttons go icon-only and the row
   becomes [preset | random] over [specialty | reset]. The >50% basis on each dropdown is what
   forces the wrap — at basis 0 all four still fit one line. */
@media (max-width: 640px) {
  .recruit-screen .recruit-quick { gap: 6px; }
  .recruit-quick .preset-select  { order: 1; flex: 1 1 60%; }
  .recruit-quick .btn-random-army { order: 2; }
  .recruit-quick .spec-select    { order: 3; flex: 1 1 60%; }
  .recruit-quick .btn-reset-army { order: 4; }
}

@media (max-width: 640px) {
  .readiness-bar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.82rem;
  }
  .readiness-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
  }

  .deploy-screen .online-recruit-footer { margin-top: 12px; }

  /* Bigger tap targets; the tap-unit-then-tap-cell flow needs an unmissable selected state. */
  .deploy-tray .deploy-unit {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 0.95rem;
    border-radius: 8px;
    margin-bottom: 6px;
  }
  .deploy-tray .deploy-unit.selected {
    box-shadow: 0 0 0 2px var(--accent-gold);
  }
  .deploy-tray .deploy-unit-name { flex: 1 1 auto; }
  .deploy-tray .deploy-qty { flex: 0 0 auto; }
  /* All-placed: fade AND non-tappable so stale taps don't clear the current selection. */
  .deploy-tray .deploy-unit-placed {
    opacity: 0.45;
    pointer-events: none;
  }
}

.coin-flip-screen  { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px; }
.coin-flip-center  { display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }
.coin-flip-coin    {
  position: relative; width: 140px; height: 140px;
  transform-style: preserve-3d;
  perspective: 600px;
}
.coin-face         {
  position: absolute; inset: 0;
  width: 140px; height: 140px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.2rem; font-weight: 700;
  backface-visibility: hidden;
  box-shadow: 0 6px 28px rgba(0,0,0,0.45), inset 0 0 0 3px rgba(0,0,0,0.1);
}
.coin-face-head    { background: var(--bronze-gradient); color: var(--on-bronze); border: 3px solid var(--bronze-deep); }
.coin-face-tail    { background: var(--marble-veined); color: #2c2519; border: 3px solid #b5a986; transform: rotateY(180deg); }
.coin-result-win   { animation: coin-flip-win 1.2s ease-out forwards; }
.coin-result-lose  { animation: coin-flip-lose 1.2s ease-out forwards; }
@keyframes coin-flip-win {
  0%   { transform: rotateY(0)       scale(0.4); }
  60%  { transform: rotateY(1440deg) scale(1.15); }
  100% { transform: rotateY(1440deg) scale(1); }
}
@keyframes coin-flip-lose {
  0%   { transform: rotateY(0)       scale(0.4); }
  60%  { transform: rotateY(1620deg) scale(1.15); }
  100% { transform: rotateY(1620deg) scale(1); }
}
.coin-flip-title   { margin: 0; font-size: 1.5rem; }
.coin-flip-sub     { margin: 0; color: var(--text-muted); font-size: 0.95rem; max-width: 420px; }
@media (prefers-reduced-motion: reduce) {
  .coin-flip-coin, .coin-result-win, .coin-result-lose { animation: none !important; transform: none !important; }
}

.map-select-waiting { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

.battlefield-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 24px 16px;
  width: 100%;
}
.online-recruit .battlefield-center,
.online-deploy .battlefield-center {
  min-height: 0;
  align-items: flex-start;
  padding: 16px 16px 24px;
}
.battlefield-waiting-card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 32px 40px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}
.battlefield-waiting-card h2 {
  margin: 4px 0 0;
  color: var(--text-primary);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.battlefield-waiting-sub {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}
.battlefield-waiting-small {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-style: italic;
  letter-spacing: 0.02em;
}
.battlefield-waiting-note {
  margin: 8px 0 0;
  padding: 6px 14px;
  display: inline-block;
  background: color-mix(in srgb, var(--accent-gold) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent-gold) 35%, transparent);
  border-radius: 999px;
  color: var(--accent-gold);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.battlefield-waiting-actions {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.battlefield-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--bg-hover);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: battlefield-spin 0.9s linear infinite;
  flex-shrink: 0;
}
@keyframes battlefield-spin {
  to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .battlefield-spinner { animation: none; }
}

@media (max-width: 640px) {
  .battlefield-waiting-card { padding: 24px 22px; }
  .battlefield-waiting-card h2 { font-size: 1.15rem; }
  .battlefield-center { min-height: 60vh; padding: 16px 10px; }
}

.setup-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  list-style: none;
  margin: 0 auto 18px;
  padding: 8px 12px;
  max-width: 520px;
}
.setup-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.setup-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-2);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.setup-step.is-current {
  color: var(--accent-gold);
  font-weight: 700;
}
.setup-step.is-current .setup-step-num {
  border-color: var(--accent-gold);
  background: color-mix(in srgb, var(--accent-gold) 18%, transparent);
  color: var(--accent-gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-gold) 12%, transparent);
}
.setup-step.is-done {
  color: var(--text-secondary);
}
.setup-step.is-done .setup-step-num {
  border-color: var(--laurel);
  background: color-mix(in srgb, var(--laurel) 18%, transparent);
  color: var(--laurel-2);
}
.setup-step-connector {
  flex: 0 0 36px;
  height: 1.5px;
  background: var(--border-color);
  border-radius: 1px;
}
.setup-step-connector.is-done { background: var(--laurel); opacity: 0.65; }
@media (max-width: 640px) {
  .setup-stepper { gap: 4px; padding: 6px 8px; max-width: 100%; }
  .setup-step-label { display: none; }
  .setup-step-connector { flex-basis: 18px; }
}

.online-recruit          { display: flex; flex-direction: column; gap: 0; }

.readiness-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.88rem;
}
.readiness-bar.is-submitted {
  max-width: 480px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.readiness-opp-indicator {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: auto;
  min-width: 0;
}
.readiness-opp-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.readiness-opp-dot.is-ready {
  background: var(--laurel-2);
  box-shadow: 0 0 8px color-mix(in srgb, var(--laurel-2) 60%, transparent);
}
.readiness-opp-dot.is-waiting {
  background: var(--accent-gold);
  animation: readiness-opp-pulse 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .readiness-opp-dot.is-waiting { animation: none; }
}
@keyframes readiness-opp-pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
.readiness-opp-name {
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 12em;
}
.readiness-opp-status {
  color: var(--text-muted);
  font-size: 0.78rem;
}
@media (max-width: 480px) {
  .readiness-opp-status { display: none; }
}
.readiness-tag           {
  display: inline-block;
  padding: 3px 10px; border-radius: 10px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
}
.readiness-tag.progress  {
  background: var(--bg-card);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.85rem;
}
.readiness-tag.waiting { background: color-mix(in srgb, var(--bronze) 18%, transparent); color: var(--bronze-2); }
.readiness-tag.ready   { background: color-mix(in srgb, var(--laurel) 20%, transparent); color: var(--laurel-2); }

.readiness-tag.progress .readiness-points,
.readiness-tag.progress .readiness-points.is-full {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 1rem;
  margin-right: 2px;
}

/* Legacy wrapper kept for older snapshot paths that still emit it. */
.readiness-phase-timer {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}
.phase-countdown-row {
  display: flex;
  justify-content: center;
  margin: 0;
}
.phase-countdown-row .ready-phase-timer { margin-left: 0; }
.setup-header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 8px;
}
.setup-header-row > .setup-stepper { margin: 0; }
/* Body class toggled by screen-helpers.js so the floating sticky badge hides when the in-bar progress pill is visible. */
@media (max-width: 640px) {
  body.progress-pill-visible .mobile-points-sticky { display: none; }
}
.ready-phase-label {
  color: var(--text-muted); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase;
}
.ready-phase-timer {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--accent-gold);
  border: 1px solid color-mix(in srgb, var(--accent-gold) 55%, var(--border-color));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-gold) 18%, transparent),
              0 2px 8px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.03em;
  min-width: 3.6em; text-align: center; line-height: 1.2;
  display: inline-block;
  cursor: help;
}
.ready-phase-timer.tb-timer-warning  {
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-gold) 35%, transparent);
}
.ready-phase-timer.tb-timer-critical {
  color: #fff;
  background: var(--accent-red);
  border-color: var(--accent-red);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-red) 35%, transparent);
  animation: tb-critical-pulse 0.9s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .ready-phase-timer.tb-timer-critical { animation: none; } }

.online-recruit-hint-row {
  display: flex; align-items: center; justify-content: center;
  padding: 10px 20px;
  background: var(--bg-card); border-top: 1px solid var(--bg-hover);
  border-radius: 6px 6px 0 0;
  margin-top: 12px;
  margin-bottom: 1.2em;
}
.online-recruit-footer {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 12px 20px;
  margin-top: 8px;
  background: transparent;
}
.online-recruit-footer > .btn { min-width: 9em; }
.online-recruit-hint     { color: var(--text-muted); font-size: 0.85rem; text-align: center; }


.online-abandon-btn   {
  background: var(--porphyry);
  color: #ffffff;
  border: 1px solid color-mix(in srgb, var(--porphyry) 60%, black);
  font-weight: 700;
}
/* Both classes: the base `.btn:hover:not(:disabled, [aria-disabled])` is (0,3,0) and a bare
   `.online-abandon-btn:hover` (0,2,0) loses to it, repainting the button neutral grey.
   Darken rather than reach for --porphyry-2, which is LIGHTER in the dark theme and drops
   the white label below the contrast floor — the same reason .btn-danger:hover darkens. */
.btn.online-abandon-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--porphyry) 85%, #000);
  border-color: color-mix(in srgb, var(--porphyry) 85%, #000);
  color: #ffffff;
}
.btn.online-abandon-btn:active:not(:disabled) {
  background: color-mix(in srgb, var(--porphyry) 72%, black);
  border-color: color-mix(in srgb, var(--porphyry) 72%, black);
}

.online-deploy { display: flex; flex-direction: column; }

.online-reveal-screen    { display: flex; flex-direction: column; align-items: center; padding: 20px; gap: 14px; min-height: 100vh; }
.online-reveal-header    { text-align: center; max-width: 720px; }
.online-reveal-header h2 { margin: 0 0 6px; }
.online-reveal-header p  { margin: 0; color: var(--text-muted); font-size: 0.92rem; }
.online-reveal-board     { display: flex; justify-content: center; }
.online-reveal-footer    { display: flex; gap: 10px; justify-content: center; margin-top: 10px; }
