﻿/* Container board game â€“ styles */

:root {
  --bg:         #eef2f7;
  --surface:    #ffffff;
  --surface2:   #dde6f0;
  --border:     #b8cfe0;
  --text:       #152233;
  --text-muted: #4a6a86;
  --accent:     #1253a4;
  --accent-lt:  #1565c0;
  --green:      #1b6e2d;
  --red:        #b71c1c;
  --gold:       #c8860a;
  --radius:     14px;
  --shadow:     0 2px 10px rgba(0,0,0,0.10);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#container-automa-root {
  color: var(--text);
  font-family: var(--font);
  font-size: 18px;
  -webkit-tap-highlight-color: transparent;
}

/* â”€â”€ Layout â”€â”€ */
#container-automa-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg);
  padding-bottom: 200px; /* clear fixed action bar */
}

/* â”€â”€ Header â”€â”€ */
.header {
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 3px 8px rgba(0,0,0,0.22);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.reset-btn {
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: 8px;
  padding: 5px 11px;
  font-size: 0.82em;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.reset-btn:active { background: rgba(255,255,255,0.28); }
.header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 1.05em;
  font-weight: 700;
}
.header-phase {
  font-size: 0.82em;
  color: rgba(255,255,255,0.82);
  margin-top: 3px;
  font-weight: 500;
}
.turn-badge {
  background: rgba(255,255,255,0.22);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.88em;
  font-weight: 700;
}

/* â”€â”€ Tabs â”€â”€ */
.tab-bar {
  display: flex;
  background: var(--surface);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 54px;
  z-index: 9;
  box-shadow: var(--shadow);
}
.tab-btn {
  flex: 1;
  padding: 14px 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.88em;
  font-weight: 700;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  font-family: var(--font);
  min-height: 48px;
}
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab-btn:hover:not(.active) { color: var(--text); background: var(--surface2); }
.tab-content { flex: 1; overflow-y: auto; padding-bottom: 150px; }
.tab { display: none; }
.tab.active { display: block; }

/* â”€â”€ Board sections â”€â”€ */
.board-section {
  background: var(--surface);
  margin: 12px;
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.section-title {
  font-weight: 800;
  font-size: 1.05em;
  margin-bottom: 12px;
  color: var(--accent);
  letter-spacing: 0.2px;
}

/* â”€â”€ Container pill â”€â”€ */
.container-pill {
  display: inline-block;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 2px solid rgba(0,0,0,0.18);
  margin: 2px;
  vertical-align: middle;
  cursor: default;
  box-shadow: inset 0 2px 3px rgba(255,255,255,0.45), 0 1px 3px rgba(0,0,0,0.12);
}
.container-pill.repriceable { cursor: pointer; }
.container-pill.repriceable:hover { border-color: #000; transform: scale(1.15); }

.empty { color: var(--text-muted); font-size: 0.88em; font-style: italic; }

/* â”€â”€ Money â”€â”€ */
.money, .big-money {
  color: var(--gold);
  font-weight: 800;
}
.big-money { font-size: 1.8em; }

/* â”€â”€ Bank â”€â”€ */
.bank-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.bank-lot {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  padding: 10px 14px;
  min-width: 100px;
  flex: 1;
}
.bank-lot.has-auction { border-color: var(--gold); border-width: 2px; }
.lot-label {
  font-size: 0.75em;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.lot-contents { font-size: 1em; }
.auction-badge {
  font-size: 0.78em;
  color: var(--gold);
  font-weight: 700;
  margin-top: 5px;
}
.bank-tokens { font-size: 0.82em; color: var(--text-muted); margin-top: 8px; }
.holding-area { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
.holding-row { font-size: 0.92em; margin: 4px 0; }

/* â”€â”€ Island â”€â”€ */
.island-areas { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.island-area {
  background: var(--surface2);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 100px;
  border: 1px solid var(--border);
  font-size: 0.9em;
}
.supply-row { display: flex; gap: 12px; flex-wrap: wrap; font-size: 0.95em; align-items: center; }
.supply-item { display: flex; align-items: center; gap: 5px; }
.supply-count { color: var(--text); font-weight: 700; font-size: 1em; }

/* â”€â”€ Opponents â”€â”€ */
.opponent-row {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  margin: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.opp-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  font-size: 1.05em;
}
.opp-cash { color: var(--gold); font-weight: 800; font-size: 1.1em; margin-left: auto; }
.opp-detail { font-size: 0.95em; display: flex; flex-direction: column; gap: 10px; }
.opp-small { color: var(--text-muted); margin-left: 6px; font-size: 0.9em; }
.opp-section { display: flex; flex-direction: column; gap: 4px; }
.opp-section-label { font-size: 0.88em; color: var(--text-muted); font-weight: 600; }
.opp-factories { display: flex; gap: 4px; flex-wrap: wrap; }
.ai-tag {
  background: #ddeeff;
  color: var(--accent);
  font-size: 0.78em;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #aaccee;
  letter-spacing: 0.3px;
}

/* â”€â”€ My board â”€â”€ */
#my-board {
  background: var(--surface);
  margin: 12px;
  border-radius: var(--radius);
  padding: 16px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
}
.my-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.district-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}
.district {
  background: var(--surface2);
  border-radius: 11px;
  padding: 12px;
  border: 1px solid var(--border);
}
.district-label {
  font-size: 0.82em;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.factories-row {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.wh-row { margin-bottom: 10px; font-size: 1.1em; }
.factory-dot {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 2px solid rgba(0,0,0,0.18);
  margin: 1px;
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.5), 0 1px 2px rgba(0,0,0,0.1);
}
.lot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 4px 0; }
.lot-price {
  font-size: 0.85em;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 26px;
}
.lot-containers { display: flex; flex-wrap: wrap; gap: 3px; }
.container-pill-wrap {
  display: inline-block;
  position: relative;
  vertical-align: middle;
  width: 30px;
  height: 30px;
}
.pill-price {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: rgba(0,0,0,0.75);
  pointer-events: none;
  text-shadow: 0 0 4px rgba(255,255,255,1), 0 0 4px rgba(255,255,255,1);
}
.empty-lot-price { font-size: 0.78em; color: var(--text-muted); font-style: italic; }
.build-hint { font-size: 0.8em; color: var(--gold); font-weight: 700; }
.container-pill-wrap--svg {
  width: auto;
  height: 36px;
}
.container-svg-img {
  height: 36px;
  width: auto;
  display: block;
}
.player-ship-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 6px auto 0;
  display: block;
}
.player-ship-svg {
  width: 100%;
  height: auto;
  display: block;
  min-height: 20px;
}
.player-ship-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.ship-area {
  margin-top: 12px;
  font-size: 1em;
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--surface2);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
}
.scoring-card-hint {
  margin-top: 12px;
  font-size: 0.84em;
  color: var(--text-muted);
  background: var(--surface2);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  line-height: 1.6;
}

/* â”€â”€ Log â”€â”€ */
.game-log { padding: 14px; display: flex; flex-direction: column; gap: 7px; }
.log-line {
  font-size: 0.92em;
  color: var(--text-muted);
  padding: 8px 12px;
  background: var(--surface);
  border-radius: 8px;
  border-left: 4px solid var(--border);
  box-shadow: var(--shadow);
  line-height: 1.4;
}
.log-line:first-child {
  color: var(--text);
  font-weight: 700;
  border-left-color: var(--accent);
}

/* â”€â”€ Action area (fixed bottom) â”€â”€ */
.action-area {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 680px;
  background: var(--surface);
  border-top: 2.5px solid var(--accent);
  padding: 12px 14px max(18px, calc(env(safe-area-inset-bottom) + 8px));
  z-index: 20;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.13);
}
.action-label {
  font-size: 0.85em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 9px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.action-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 11px;
  padding: 12px 16px;
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.15s, transform 0.1s;
  box-shadow: 0 2px 6px rgba(18,83,164,0.28);
  min-height: 48px;
  touch-action: manipulation;
}
.action-btn:hover:not(:disabled) { background: var(--accent-lt); }
.action-btn:active:not(:disabled) { transform: scale(0.97); }
.action-btn:disabled {
  background: #c8d8e8;
  color: #7a9ab8;
  cursor: not-allowed;
  box-shadow: none;
}
.action-btn.secondary {
  background: var(--surface2);
  color: var(--text);
  border: 1.5px solid var(--border);
  box-shadow: none;
}
.waiting {
  color: var(--text-muted);
  font-size: 1em;
  text-align: center;
  padding: 12px;
  font-weight: 600;
}

/* â”€â”€ Modal â”€â”€ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
}
.modal-overlay:not(:empty) {
  background: rgba(0,0,0,0.42);
  pointer-events: all;
}
.modal-content {
  background: var(--surface);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  padding: 24px 20px 28px;
  width: 100%;
  max-width: 680px;
  max-height: 84vh;
  overflow-y: auto;
  border-top: 3px solid var(--accent);
  position: relative;
  box-shadow: 0 -6px 24px rgba(0,0,0,0.16);
}
.modal-content h3 {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 1.25em;
  font-weight: 800;
}
.modal-content p { margin-bottom: 12px; font-size: 1em; line-height: 1.5; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 1.1em;
  cursor: pointer;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  touch-action: manipulation;
}

/* â”€â”€ Auction UI â”€â”€ */
.auction-panel { padding: 4px; }
.auction-panel h3 { color: var(--gold); margin-bottom: 12px; font-size: 1.3em; }
.bid-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0;
}
.bid-row button {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 22px;
  font-size: 1.3em;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font);
  min-width: 52px;
  min-height: 48px;
  touch-action: manipulation;
}
.bid-row button:hover { background: var(--border); }
.bid-display {
  font-size: 2.8em;
  font-weight: 900;
  color: var(--gold);
  min-width: 70px;
  text-align: center;
}
.bid-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.bid-reveal-row {
  margin: 8px 0;
  font-size: 1.05em;
  padding: 10px 14px;
  background: var(--surface2);
  border-radius: 9px;
  font-weight: 600;
}
.bid-reveal-row.bid-winner {
  background: rgba(39,174,96,0.15);
  border: 1.5px solid var(--green);
}
.bid-reveal-row.bid-tied {
  background: rgba(255,193,7,0.12);
  border: 1.5px solid #f0a500;
}
.bid-tie-notice {
  margin-top: 20px;
  padding: 8px 12px;
  background: rgba(255,193,7,0.12);
  border: 1.5px solid #f0a500;
  border-radius: 8px;
  font-weight: 600;
}
.bid-winner-summary {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 1em;
  padding: 8px 12px;
  background: var(--surface2);
  border-radius: 8px;
}
.bid-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

/* â”€â”€ Price assign / produce / buy rows â”€â”€ */
.price-assign-row, .produce-row, .buy-item, .bank-bid-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  flex-wrap: wrap;
  font-size: 1em;
}
.price-btn {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  color: var(--text);
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 0.95em;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  min-height: 44px;
  touch-action: manipulation;
}
.price-btn:hover { background: var(--border); }
.price-btn strong { color: var(--accent); }
.price-btn.selected strong { color: #fff; }
.reprice-lot { display: flex; align-items: center; gap: 10px; margin: 8px 0; }

/* â”€â”€ Badges â”€â”€ */
.loan-badge {
  background: #fde8e8;
  color: var(--red);
  font-size: 0.85em;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #f5c0c0;
}
.scoring-hint { font-size: 0.88em; color: var(--text-muted); }
.player-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.8em;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* â”€â”€ Setup screen â”€â”€ */
.setup-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  gap: 22px;
  min-height: 100vh;
  background: var(--bg);
}
.setup-logo {
  font-size: 5em;
  filter: drop-shadow(0 4px 14px rgba(18,83,164,0.28));
}
.setup-screen h2 {
  color: var(--accent);
  font-size: 1.4em;
  font-weight: 800;
  text-align: center;
}
.setup-section {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow);
}
.setup-section label {
  font-size: 0.82em;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: block;
  margin-bottom: 12px;
}
#container-automa-root .toggle-group { display: flex; gap: 10px; flex-wrap: wrap; }
#container-automa-root .toggle-btn {
  flex: 1;
  padding: 13px 10px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.05em;
  font-weight: 700;
  font-family: var(--font);
  transition: all 0.15s;
  min-width: 54px;
  min-height: 50px;
  touch-action: manipulation;
}
#container-automa-root .toggle-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(18,83,164,0.3);
}
#container-automa-root .toggle-btn:hover:not(.active) { background: var(--border); color: var(--text); }
.count-msg { font-size: 0.88em; font-weight: 700; color: var(--green); margin-top: 10px; }
.start-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 18px 56px;
  font-size: 1.2em;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font);
  letter-spacing: 0.5px;
  box-shadow: 0 4px 18px rgba(18,83,164,0.35);
  transition: background 0.15s, transform 0.1s;
  min-height: 56px;
  touch-action: manipulation;
}
.start-btn:hover { background: var(--accent-lt); transform: translateY(-1px); }
.start-btn:active { transform: scale(0.98); }
/* â”€â”€ Sitting order â”€â”€ */
.seat-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.seat-order-hint { font-size: 0.82em; color: var(--text-muted); }
.seat-order-list { display: flex; flex-direction: column; gap: 6px; }
.seat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border-radius: 10px;
  padding: 8px 10px;
}
.seat-num {
  font-size: 0.85em;
  font-weight: 700;
  color: var(--text-muted);
  width: 18px;
  text-align: center;
}
.seat-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.seat-name { font-weight: 600; flex: 1; }
.seat-color-name { font-size: 0.82em; font-weight: 400; }
.seat-type-badge {
  font-size: 0.75em;
  color: var(--text-muted);
  background: var(--border);
  border-radius: 6px;
  padding: 2px 7px;
}
.seat-btns { display: flex; gap: 4px; }
.seat-move-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.85em;
  cursor: pointer;
  color: var(--text);
}
.seat-move-btn:active { background: var(--border); }
.seat-move-ph { display: inline-block; width: 34px; }

.setup-credit {
  margin-top: 18px;
  font-size: 0.85em;
  color: var(--text-muted);
  text-align: center;
}
.setup-credit a { color: var(--accent); text-decoration: underline; }
.setup-rules-hint {
  max-width: 420px;
  font-size: 0.9em;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.65;
  background: var(--surface);
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* â”€â”€ End screen â”€â”€ */
.end-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  gap: 20px;
}
.end-screen h2 { color: var(--gold); font-size: 1.9em; font-weight: 900; }
.scores-list { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 14px; }
.score-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.score-cash-line {
  font-size: 0.9em;
  color: var(--text-muted);
  margin: 4px 0 8px;
}
.score-step {
  margin: 8px 0 4px;
  font-size: 0.88em;
  line-height: 1.6;
}
.score-step-label {
  display: inline-block;
  font-weight: 700;
  color: var(--accent);
  margin-right: 6px;
}
.score-island-row { margin-left: 12px; }
.score-step-subtotal {
  margin-left: 12px;
  color: var(--text-muted);
  font-size: 0.93em;
}
.score-row {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  font-size: 1.05em;
}
.score-row.winner { border-color: var(--gold); border-width: 2.5px; background: #fff8f2; }
.score-breakdown { font-size: 0.88em; color: var(--text-muted); margin: 6px 0; line-height: 1.5; }
.score-total { font-size: 1.3em; font-weight: 900; color: var(--gold); margin-top: 4px; }
.winner-crown { font-size: 1.4em; margin-top: 6px; }

/* â”€â”€ Color buttons â”€â”€ */
.color-btn {
  border: 2.5px solid rgba(0,0,0,0.15);
  color: #111;
  border-radius: 10px;
  padding: 9px 16px;
  cursor: pointer;
  font-weight: 800;
  margin: 4px;
  font-size: 1em;
  font-family: var(--font);
  box-shadow: 0 1px 5px rgba(0,0,0,0.12);
  min-height: 46px;
  touch-action: manipulation;
}
.color-btn:hover { border-color: #000; }

/* â”€â”€ Automa instruction modal â”€â”€ */
.automa-modal { padding-bottom: 16px; }
.automa-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 2.5px solid var(--accent);
}
.automa-name {
  font-size: 1.25em;
  font-weight: 800;
  color: var(--accent);
}
.automa-note {
  font-size: 0.82em;
  color: var(--text-muted);
  font-style: italic;
}
.automa-step {
  margin-bottom: 14px;
  padding: 14px 16px;
  background: var(--surface2);
  border-radius: 12px;
  border-left: 4px solid var(--accent);
}
.automa-step-title {
  font-size: 1.05em;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}
.automa-instructions {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.automa-instr {
  font-size: 0.96em;
  line-height: 1.55;
  color: var(--text);
  padding: 6px 10px;
  background: rgba(255,255,255,0.65);
  border-radius: 7px;
}
.automa-done-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  font-size: 1.1em;
  padding: 18px;
  background: #1b6e2d;
  box-shadow: 0 3px 12px rgba(27,110,45,0.3);
}
.automa-done-btn:hover { background: #166126; }

/* â”€â”€ Price button selected state â”€â”€ */
.price-btn.selected { background: var(--accent); color: #fff; border-color: var(--accent); }

/* â”€â”€ Anchor note in harbor buy modal â”€â”€ */
.anchor-note {
  background: #eaf4ff;
  border-left: 3px solid #2980b9;
  padding: 6px 10px;
  font-size: 0.9em;
  color: #1a5276;
  border-radius: 0 4px 4px 0;
  margin-bottom: 8px;
}

/* â”€â”€ New container badge in price modals â”€â”€ */
.new-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
  letter-spacing: 0.5px;
}

/* â”€â”€ Classic Variant toggle â”€â”€ */
.variant-toggle-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.variant-btn { min-width: 160px; }
.variant-hint { font-size: 0.82em; color: var(--text-muted); flex: 1; }
.classic-badge {
  font-size: 0.72em; font-weight: 600; letter-spacing: 0.04em;
  background: var(--accent); color: #fff;
  border-radius: 6px; padding: 2px 7px; margin-left: 8px; vertical-align: middle;
}
.classic-bank-note { font-size: 0.85em; color: var(--text-muted); padding: 6px 0 2px; }

/* â”€â”€ Expansion module toggles on setup screen â”€â”€ */
.setup-optional { font-weight: 400; color: var(--text-muted); font-size: 0.9em; }
.module-toggles { display: flex; gap: 10px; flex-wrap: wrap; }
.mod-btn { flex: 1; min-width: 120px; }
.module-hints { margin-top: 10px; }
.module-hint-item {
  font-size: 0.82em;
  color: var(--text-muted);
  border-left: 3px solid var(--accent);
  padding: 4px 8px;
  margin-bottom: 4px;
  background: var(--surface2);
  border-radius: 0 4px 4px 0;
}

/* â”€â”€ Free action row (Acquire Luxury) â”€â”€ */
.free-action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding: 8px 12px;
  background: #fffbea;
  border: 1.5px solid #e8c84a;
  border-radius: 10px;
  font-size: 0.88em;
}
.free-action-label { font-weight: 700; color: #7a5900; }
.free-action-btn { background: #e8c84a; color: #3a2900; border-color: #c8a800; }
.free-action-btn:hover { background: #d4b430; }

/* â”€â”€ Truck Company status row in bank â”€â”€ */
.truck-cos-row {
  margin-top: 8px;
  font-size: 0.85em;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.truck-co-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface2);
  padding: 2px 7px;
  border-radius: 6px;
}

/* â”€â”€ Gold supply row â”€â”€ */
.gold-supply-row {
  margin-top: 6px;
  font-size: 0.85em;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* â”€â”€ Player loan rows in repay modal â”€â”€ */
.loan-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92em;
}

/* â”€â”€ Buy-item toggle buttons â”€â”€ */
.buy-toggle { min-width: 90px; padding: 8px 14px; font-size: 0.92em; }
.selected-buy { background: #27ae60; border-color: #1e8449; color: #fff; }
.selected-buy:hover { background: #1e8449; }

/* â”€â”€ Score breakdown detail â”€â”€ */
.score-island-detail { font-size: 0.82em; color: var(--text-muted); margin: 2px 0 4px; }
.score-card-reveal { font-size: 0.84em; color: var(--text-muted); margin: 4px 0 2px; }

/* â”€â”€ Trucking fund indicator â”€â”€ */
.truck-fund { font-size: 0.82em; font-weight: 700; color: #27ae60; background: #f0fce8; border: 1px solid #b7e4c7; border-radius: 4px; padding: 1px 5px; }

/* â”€â”€ Winner row in bid/offer reveals â”€â”€ */
.winner-row { background: #f0fce8; border-radius: 6px; padding: 4px 8px; }

/* â”€â”€ Color picker (setup screen) â”€â”€ */
.color-pick-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.color-pick-label { font-weight: 600; min-width: 76px; font-size: 0.95em; }
.color-swatches { display: flex; gap: 6px; }
.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: transform 0.1s, border-color 0.1s;
}
.color-swatch:hover:not(:disabled) { transform: scale(1.18); }
.color-swatch.chosen { border-color: #fff; box-shadow: 0 0 0 2px #152233; transform: scale(1.15); }
.color-swatch.taken { opacity: 0.28; cursor: default; }
.color-pick-chosen { font-weight: 700; font-size: 0.95em; }
.color-pick-footer { display: flex; align-items: center; margin-top: 4px; flex-basis: 100%; padding-left: 76px; }
.muted { color: var(--text-muted); font-weight: 400; }
.link-btn { background: none; border: none; color: var(--accent); font-size: 0.85em; cursor: pointer; padding: 0 4px; text-decoration: underline; }

/* â”€â”€ Setup walkthrough modal â”€â”€ */
.walk-modal {
  max-height: 85vh;
  overflow-y: auto;
  padding: 20px;
}
.walk-section {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.walk-section:last-of-type { border-bottom: none; }
.walk-section-title {
  font-weight: 700;
  font-size: 0.95em;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.walk-player-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 0.95em;
}
.player-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.walk-note {
  font-size: 0.88em;
  color: var(--text-muted);
  margin-top: 6px;
}
.walk-note-inline { font-size: 0.85em; color: var(--text-muted); }
.walk-card-vals { color: var(--text-muted); }
.walk-supply-row { font-size: 0.93em; margin-bottom: 5px; }
.walk-list { padding-left: 18px; font-size: 0.93em; }
.walk-list li { margin-bottom: 5px; }

/* â”€â”€ Win sections in start-of-turn modal â”€â”€ */
.win-section {
  background: #f0fce8;
  border-left: 4px solid #27ae60;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.win-section-title { font-weight: 700; font-size: 1em; margin-bottom: 6px; }
.win-instruction { font-size: 0.92em; color: var(--text); margin-top: 6px; }

/* â”€â”€ Scrollbar â”€â”€ */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* â”€â”€ Responsive â”€â”€ */
@media (max-width: 400px) {
  #container-automa-root { font-size: 16px; }
  .district-grid { grid-template-columns: 1fr; }
  .bank-row { flex-direction: column; }
  .action-btn { padding: 11px 12px; }
}
