/* Siege shares the light/dark host foundation while retaining its map. */
/* Light is the default, including when browser storage is unavailable. */
html body.mode-siege #board {
 --board-paper:#f3eddf; --board-card:#fffaf0; --board-ink:#292334;
 --board-muted:#766f69; --board-line:#d4c9b7; --board-accent:#79551d;
 --board-hover:#eae0cb; --board-active:#eadfc8;
 color-scheme:light;
}
html body.mode-siege #board[data-board-theme="dark"] {
 --board-paper:#202329; --board-card:#2c3037; --board-ink:#f4eee3;
 --board-muted:#aaa8a3; --board-line:#4a4f57; --board-accent:#e0c48f;
 --board-hover:#3a4048; --board-active:#34383e;
 color-scheme:dark;
}
/* Arefha's host board: category artwork between two question columns.
   Presentation only. Keep each tile in its existing DOM order (and preserve
   its original question index/click handler). Siege keeps its spatial map. */
html body.mode-siege #board > .stage-bg {
  
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100svh;
  height: 100dvh;
  min-height: 560px;
  padding: max(14px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)) !important;
  background: var(--board-paper) !important;
  box-shadow: none !important;
}
html body.mode-siege #board .stage-header {
  flex: 0 0 auto;
  width: 100%;
  max-width: none;
  min-height: 48px;
  margin: 0 !important;
  padding: 0 4px 10px;
  border-bottom: 1px solid var(--board-line);
}
html body.mode-siege #board .stage-header h2 {
  font: 700 clamp(20px, 2vw, 30px)/1.35 var(--font-body), sans-serif;
  margin: 0;
  color: var(--board-ink) !important;
  text-shadow: none !important;
}
html body.mode-siege #board #currentTeamName { color: var(--board-accent); }
html body.mode-siege #board .stage-header .btn { min-height: 44px; min-width: 48px; }
html body.mode-siege #board .diff-legend { display: none; }
html body.mode-siege #board .alarm-meter { flex-shrink: 0; margin: 0; }

html body.mode-siege #board .board-grid:not(.siege-mode) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  grid-auto-rows: minmax(180px, 1fr);
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  max-width: none !important;
  gap: 16px 24px;
  margin: 0 !important;
  padding: 2px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--board-line) var(--board-paper);
}
html body.mode-siege #board .board-grid:not(.siege-mode):has(> .cat-col:nth-child(7)) {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
html body.mode-siege #board .board-grid:not(.siege-mode) .cat-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.42fr) minmax(0, 1fr);
  grid-template-rows: repeat(3, minmax(44px, 1fr));
  gap: 7px;
  height: auto;
  min-width: 0;
  min-height: 0;
}
html body.mode-siege #board .board-grid:not(.siege-mode) .cat-col__head {
  grid-column: 2;
  grid-row: 1 / 4;
  display: flex !important;
  flex-direction: column;
  min-height: 0 !important;
  min-width: 0;
  align-items: stretch;
  border: 1px solid #a88b55 !important;
  border-radius: 12px !important;
  background: #f6f0e2 !important;
  box-shadow: none !important;
}
html body.mode-siege #board .board-grid:not(.siege-mode) .cat-col__cover {
  flex: 1 1 0 !important;
  min-height: 0 !important;
  height: auto !important;
  aspect-ratio: auto !important;
  width: 100%;
  align-self: stretch;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
html body.mode-siege #board .board-grid:not(.siege-mode) .cat-col__cover img {
  width: 100%; height: 100%; object-fit: cover; flex: 0 0 100%;
}
html body.mode-siege #board .board-grid:not(.siege-mode) .cat-col__name {
  display: flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 48px !important;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 6px !important;
  font: 700 clamp(14px, 1.15vw, 19px)/1.4 var(--font-body), sans-serif !important;
  color: #241e19 !important;
  background: #f6f0e2 !important;
  white-space: normal !important;
  overflow: visible !important;
  overflow-wrap: anywhere;
  text-overflow: clip !important;
  -webkit-line-clamp: unset;
}
html body.mode-siege #board .board-grid:not(.siege-mode) .tile-pairs { display: contents; }
html body.mode-siege #board .board-grid:not(.siege-mode) .tile {
  grid-column: 1;
  min-width: 0;
  min-height: 44px !important;
  width: 100%; height: auto !important; aspect-ratio: auto !important;
  padding: 8px 4px;
  border: 1px solid var(--board-line) !important;
  border-radius: 14px !important;
  background: var(--board-card) !important;
  color: var(--board-ink) !important;
  font: 700 clamp(25px, 2.5vw, 42px)/1.1 var(--font-body), sans-serif !important;
  font-variant-numeric: tabular-nums;
  text-shadow: none !important;
  box-shadow: none !important;
}
html body.mode-siege #board .board-grid:not(.siege-mode) .tile:nth-child(even) { grid-column: 3; }
html body.mode-siege #board .board-grid:not(.siege-mode) .tile:nth-child(-n+2) { grid-row: 1; }
html body.mode-siege #board .board-grid:not(.siege-mode) .tile:nth-child(n+3):nth-child(-n+4) { grid-row: 2; }
html body.mode-siege #board .board-grid:not(.siege-mode) .tile:nth-child(n+5) { grid-row: 3; }
html body.mode-siege #board .board-grid:not(.siege-mode) .tile:not(.used):hover {
  background: var(--board-hover) !important; border-color: var(--board-accent) !important;
}
html body.mode-siege #board .board-grid:not(.siege-mode) .tile:focus-visible {
  outline: 3px solid var(--board-accent); outline-offset: -4px;
}
html body.mode-siege #board .board-grid:not(.siege-mode) .tile.used {
  opacity: 1 !important; background: var(--board-paper) !important; color: var(--board-muted) !important;
  border-color: var(--board-line) !important; cursor: default;
}

/* Names anchor matching score and assist rows, without extra turn captions. */
html body.mode-siege #board .kt-team-label { display:none !important; }
html body.mode-siege #board #scoreboard {
 flex:0 0 auto; width:100%; max-width:none !important; margin:0 !important;
 gap:24px !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important;
}
html body.mode-siege #board .team-panel {
 display:grid !important; grid-template-columns:minmax(160px,1fr) minmax(0,1fr);
 grid-template-rows:auto 1fr; align-items:center; gap:8px 24px !important;
 padding:14px 20px !important; min-height:142px; border-radius:12px !important;
 background:var(--board-card) !important; border:1px solid var(--board-line) !important;
 box-shadow:none !important;
}
html body.mode-siege #board .team-panel.active {
 border-color:var(--board-accent) !important;
 box-shadow:inset 0 3px 0 var(--board-accent) !important;
}
html body.mode-siege #board .team-panel > div:first-child { display:contents !important; }
html body.mode-siege #board .team-name-tag {
 grid-column:1; grid-row:1; font-size:20px !important; overflow-wrap:anywhere;
 color:var(--board-ink) !important; text-align:center;
}
html body.mode-siege #board .team-score,
html body.mode-siege #board .heist-score-grid { grid-column:1; grid-row:2; min-width:0; }
html body.mode-siege #board .team-score {
 display:flex !important; align-items:center; justify-content:space-between; gap:8px !important;
}
html body.mode-siege #board .score-value {
 font-size:clamp(32px,3vw,46px) !important; min-width:0; color:var(--board-ink) !important;
}
html body.mode-siege #board .team-perks {
 grid-column:2; grid-row:1 / 3; display:grid !important;
 grid-template-columns:repeat(2,minmax(0,1fr)); align-content:center;
 justify-self:stretch; margin:0 !important; gap:8px !important;
}
html body.mode-siege #board .team-b .team-name-tag,
html body.mode-siege #board .team-b .team-score,
html body.mode-siege #board .team-b .heist-score-grid { grid-column:2; }
html body.mode-siege #board .team-b .team-perks { grid-column:1; }
html body.mode-siege #board .perk-pip {
 justify-content:center; min-width:0 !important; padding:10px 8px !important;
 font-size:clamp(18px,1.2vw,22px) !important; font-weight:700 !important;
 line-height:1.35 !important; height:auto !important; min-height:64px !important;
 gap:8px !important;
}
html body.mode-siege #board .kt-perk-name { white-space:normal; }
html body.mode-siege #board .perk-pip .kti { width:20px !important; height:20px !important; flex-shrink:0; }
html body.mode-siege #board .perk-pip,
html body.mode-siege #board .score-btn,
html body.mode-siege #board .stage-header .btn,
html body.mode-siege #board .bank-btn,
html body.mode-siege #board .scout-btn {
 background:var(--board-card) !important; color:var(--board-ink) !important;
 border:1px solid var(--board-line) !important; box-shadow:none !important;
}
html body.mode-siege #board .perk-pip.active { background:var(--board-active) !important; border-color:var(--board-accent) !important; }
html body.mode-siege #board button:not(:disabled):hover { background:var(--board-hover) !important; }
html body.mode-siege #board button:focus-visible { outline:2px solid var(--board-accent); outline-offset:3px; }
html body.mode-siege #board .team-roster { grid-column:1 / -1; grid-row:4; color:var(--board-muted) !important; }
html body.mode-siege #board .scout-btn { grid-column:1 / -1; grid-row:3; min-height:44px; }
html body.mode-siege #board .heist-stash-line { color:var(--board-muted) !important; flex-wrap:wrap; }
html body.mode-siege #board .kt-kebab-wrap { display:flex; gap:8px; }
html body.mode-siege #board .board-theme-toggle { font-size:14px; letter-spacing:0; padding:8px 12px; }

html body.mode-siege #board .kt-kebab-menu { background:var(--board-card); border-color:var(--board-line); }
html body.mode-siege #board .alarm-meter { background:var(--board-card); border-color:var(--board-line); color:var(--board-ink); }
@media(max-width:1050px) {
 html body.mode-siege #board .perk-pip { font-size:16px !important; padding:8px 6px !important; gap:5px !important; }
 html body.mode-siege #board .board-grid:not(.siege-mode),
 html body.mode-siege #board .board-grid:not(.siege-mode):has(> .cat-col:nth-child(7)) { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
 html body.mode-siege #board .team-panel { gap:8px 12px !important; padding:12px !important; grid-template-columns:minmax(110px,.8fr) minmax(0,1.2fr); }
 html body.mode-siege #board .team-score { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; justify-items:center; }
 html body.mode-siege #board .team-score .score-value { grid-column:1 / -1; grid-row:1; }
 html body.mode-siege #board .team-score button { grid-row:2; }
 html body.mode-siege #board .team-perks .kt-perk-name { white-space:normal; }
}
@media(max-width:650px),(max-height:600px) {
 html body.mode-siege #board > .stage-bg { height:auto; min-height:100svh; padding:12px max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)) !important; }
 html body.mode-siege #board .board-grid:not(.siege-mode) { flex:none; grid-auto-rows:minmax(190px,auto); overflow:visible; gap:14px; }
 html body.mode-siege #board #scoreboard { gap:12px !important; }
}
@media(max-width:650px) {
 html body.mode-siege #board .board-grid:not(.siege-mode),
 html body.mode-siege #board .board-grid:not(.siege-mode):has(> .cat-col:nth-child(7)) { grid-template-columns:minmax(0,1fr) !important; }
 html body.mode-siege #board #scoreboard { grid-template-columns:minmax(0,1fr) !important; }
 html body.mode-siege #board .team-panel .team-name-tag,
 html body.mode-siege #board .team-panel .team-score,
 html body.mode-siege #board .team-panel .heist-score-grid { grid-column:1; }
 html body.mode-siege #board .team-panel .team-perks { grid-column:2; }
 html body.mode-siege #board .team-name-tag { font-size:17px !important; }
 html body.mode-siege #board .stage-header { flex-wrap:wrap; gap:8px; }
 html body.mode-siege #board .stage-header h2 { font-size:20px; }
}
/* Mode identity lives in a compact masthead and functional board details. */
html body #board .stage-header { align-items:center; gap:16px; }
html body #board .board-mode-mark { display:flex; align-items:center; gap:12px; color:var(--board-accent); }
html body #board .board-mode-name { font:700 22px/1.2 var(--font-body); white-space:nowrap; }
html body #board .board-mode-note { font:500 14px/1.4 var(--font-body); color:var(--board-muted); }
html body #board .board-mode-symbol { width:32px; height:32px; flex:none; }
html body #board .stage-header h2 { font-size:22px; }
html body.mode-heist #board { --board-accent:#81591e; --board-active:#ecdfc4; }
html body.mode-vegas #board { --board-accent:#176c61; --board-active:#d9e9df; }
html body.mode-carnival #board { --board-accent:#76458e; --board-active:#e9ddec; }
html body.mode-siege #board { --board-accent:#a04332; --board-active:#eedbd1; }
html body.mode-heist #board[data-board-theme="dark"] { --board-accent:#dfbd7b; --board-active:#40392b; }
html body.mode-vegas #board[data-board-theme="dark"] { --board-accent:#81c8b2; --board-active:#283d39; }
html body.mode-carnival #board[data-board-theme="dark"] { --board-accent:#d4a6e7; --board-active:#3e3047; }
html body.mode-siege #board[data-board-theme="dark"] { --board-accent:#edac91; --board-active:#44322e; }
html body #board .board-grid:not(.siege-mode) .cat-col__head { border-color:var(--board-accent) !important; }
html body.mode-heist #board .cat-col__name { border-top:3px double var(--board-accent); }
html body.mode-heist #board .alarm-meter {
 width:100%; max-width:none; border:1px solid var(--board-line); border-inline-start:4px solid var(--board-accent);
 border-radius:8px; padding:8px 12px; font-size:15px;
}
html body.mode-heist #board .alarm-meter__label,html body.mode-heist #board #alarmPct { color:var(--board-ink); }
html body.mode-heist #board .alarm-meter__bar { background:var(--board-line); }
html body.mode-heist #board .heist-stash-line { border-block:1px dashed var(--board-line); }
html body.mode-heist #board .stash-num,html body.mode-heist #board .vault-num { color:var(--board-accent); }
html body.mode-vegas #board .board-grid:not(.siege-mode) { border:1px solid var(--board-line) !important; border-radius:18px !important; padding:12px !important; }
html body.mode-vegas #board .tile:not(.used)::before {
 content:''; position:absolute; inset:8px; border:1px dashed var(--board-accent); border-radius:10px; opacity:.5; pointer-events:none;
}
html body.mode-carnival #board .cat-col__name { border-top:2px dashed var(--board-accent); }
html body.mode-carnival #board .tile-badge { font-size:20px; background:var(--board-card); border:1px solid var(--board-accent); border-radius:50%; }
html body.mode-carnival #board .tile.gp-tile { border:2px solid var(--board-accent) !important; box-shadow:inset 0 0 0 3px var(--board-card) !important; }
html body.mode-carnival #board .scout-btn { border-style:dashed !important; }

/* The territory map retains its stagger and legal/owned/fortified states. */
html body #board .board-grid.siege-mode {
 flex:1 1 0; min-height:0; width:100%; max-width:none !important; margin:0 !important;
 padding:12px !important; overflow:auto; border:1px solid var(--board-line); border-radius:14px;
 background:var(--board-card) !important; box-shadow:none !important;
 scrollbar-width:thin; scrollbar-color:var(--board-accent) var(--board-paper);
}
html body #board .siege-board { width:max-content; min-width:100%; box-sizing:border-box; padding:8px calc(var(--siegew)/2 + 8px) 12px 8px; }
html body #board .siege-legend { color:var(--board-ink); font-size:15px; gap:10px 20px; }
html body #board .siege-hint { color:var(--board-muted); opacity:1; font-size:14px; }
html body #board .siege-cell { background:var(--board-line); }
html body #board .siege-cell::before { background:var(--board-paper); }
html body #board .siege-own0::before { background:#ae3545; box-shadow:none; }
html body #board .siege-own1::before { background:#2765a9; box-shadow:none; }
html body #board .siege-burn::before { background:#635b52; }
html body #board .siege-neutral .siege-glyph { color:var(--board-ink); }
html body #board .siege-name { font-size:clamp(12px,calc(var(--siegew)*.118),16px); line-height:1.25; }
html body #board .siege-face--card .siege-pts { font-size:clamp(16px,calc(var(--siegew)*.16),24px); }
html body #board .siege-fort::before { box-shadow:inset 0 0 0 4px #ffe096; }
/* Paired subgrids share name, score, assist, action and status row dimensions. */
html body #board #scoreboard { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; grid-template-rows:repeat(5,auto); align-items:stretch !important; gap:6px 20px !important; }
html body #board #scoreboard .team-panel { grid-row:1/span 5; display:grid !important; grid-template-rows:subgrid; grid-template-columns:minmax(120px,.7fr) minmax(0,1.3fr) !important; gap:6px 18px !important; align-items:center; min-width:0; min-height:0; height:auto !important; padding:12px 16px !important; border:1px solid var(--board-line) !important; }
html body #board #scoreboard .team-panel.active { border:1px solid var(--board-accent) !important; box-shadow:inset 0 3px 0 var(--board-accent) !important; }
html body #board #scoreboard .team-panel.lockout { border-style:dashed !important; }
html body #board #scoreboard .team-panel.lockout::after { content:'دور محجوز'; font:600 13px var(--font-body); }
html body #board #scoreboard .team-b { grid-template-columns:minmax(0,1.3fr) minmax(120px,.7fr) !important; }
html body #board #scoreboard .team-panel > div:first-child { display:contents !important; }
html body #board #scoreboard .team-name-tag { grid-column:1/-1 !important; grid-row:1; display:flex; justify-content:center; align-items:center; min-height:1.5em; width:100%; margin:0; padding:0; font:700 20px/1.35 var(--font-body) !important; white-space:normal !important; overflow:visible; overflow-wrap:anywhere; text-align:center; }
html body #board #scoreboard .team-score { grid-column:1 !important; grid-row:2 !important; display:grid !important; grid-template-columns:44px minmax(0,1fr) 44px !important; align-items:center; align-self:center; justify-self:stretch; min-width:0; width:100%; gap:8px !important; }
html body #board #scoreboard .team-b .team-score { grid-column:2 !important; }
html body #board #scoreboard .team-score .score-value { grid-column:2 !important; grid-row:1 !important; }
html body #board #scoreboard .score-value { font:700 clamp(32px,3vw,46px)/1.15 var(--font-body) !important; min-width:0 !important; text-align:center; direction:ltr; color:var(--board-ink) !important; }
html body #board #scoreboard .score-btn { width:44px !important; height:44px !important; min-width:44px !important; min-height:44px !important; padding:0 !important; grid-row:1 !important; }
html body #board #scoreboard .team-perks { grid-column:2 !important; grid-row:2 !important; display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); grid-auto-rows:minmax(64px,1fr); align-self:stretch; align-items:stretch; align-content:stretch; margin:0 !important; gap:8px !important; min-height:136px; min-width:0; width:100%; }
html body #board #scoreboard .team-b .team-perks { grid-column:1 !important; }
html body #board #scoreboard .team-perks:has(> :nth-child(5)) { grid-template-columns:repeat(3,minmax(0,1fr)); }
html body #board #scoreboard .perk-pip { display:flex !important; flex-direction:row; align-items:center !important; justify-content:center; width:auto !important; height:auto !important; min-height:64px !important; min-width:0 !important; padding:8px !important; gap:8px !important; font:700 clamp(18px,1.2vw,22px)/1.35 var(--font-body) !important; }
html body #board #scoreboard .kt-perk-name { display:inline !important; font:inherit !important; white-space:normal; text-align:center; }
html body #board #scoreboard .perk-pip .kti { width:24px !important; height:24px !important; flex-shrink:0; }
html body #board #scoreboard .perk-pip.spent { opacity:.6 !important; }
html body #board #scoreboard .perk-pip[data-tip]::before,html body #board #scoreboard .perk-pip[data-tip]::after { display:none !important; }
html body #board #scoreboard button:disabled { opacity:.55; cursor:default; }
html body #board #scoreboard .heist-score-grid { display:contents !important; }
html body #board #scoreboard .heist-score-grid > .score-value { grid-column:1; grid-row:2; }
html body #board #scoreboard .team-b .heist-score-grid > .score-value { grid-column:2; }
html body #board #scoreboard .heist-stash-line { grid-column:1; grid-row:3; display:flex; align-items:center; flex-wrap:wrap; justify-content:center; gap:6px 14px; min-height:48px; font:600 16px/1.5 var(--font-body) !important; }
html body #board #scoreboard .team-b .heist-stash-line { grid-column:2; }
html body #board #scoreboard .bank-btn { grid-column:2; grid-row:3; width:100%; min-height:48px; margin:0; font-size:18px; letter-spacing:0; }
html body #board #scoreboard .team-b .bank-btn { grid-column:1; }
html body #board #scoreboard .scout-btn,html body #board #scoreboard .siege-stats { grid-column:1/-1; grid-row:3; width:100%; min-height:44px; margin:0; font:700 18px/1.4 var(--font-body); color:var(--board-ink); align-content:center; }
html body #board #scoreboard .siege-stats { display:flex; align-items:center; }
html body #board #scoreboard .team-effects { grid-column:1/-1; grid-row:4; display:flex; flex-wrap:wrap; gap:8px; min-width:0; }
html body #board #scoreboard .team-effects .team-effect { flex:1; min-height:36px !important; font-size:14px !important; }
html body #board #scoreboard .team-roster { grid-column:1/-1; grid-row:5; text-align:center; }
html body #board .board-grid.siege-mode { min-height:0 !important; }
html body.mode-siege #board .board-theme-toggle { display:inline-flex !important; }
@media(max-width:1400px) {
 html body #board #scoreboard .team-score { grid-template-columns:repeat(2,minmax(0,1fr)) !important; justify-items:center; }
 html body #board #scoreboard .team-score .score-value { grid-column:1/-1 !important; grid-row:1 !important; }
 html body #board #scoreboard .team-score .score-btn { grid-row:2 !important; }
 html body #board #scoreboard .team-score .score-btn:last-child { grid-column:2; }
}
/* Preserve the requested compact, icon-only mobile control treatment. */
@media(max-width:1100px) {
 html body #board .board-mode-note { display:none; }
 html body #board #scoreboard .team-panel { padding:8px !important; gap:4px 8px !important; }
 html body #board #scoreboard .team-name-tag { font-size:16px !important; }
 html body #board #scoreboard .team-perks { grid-auto-rows:minmax(38px,1fr); min-height:82px; gap:6px !important; }
 html body #board #scoreboard .perk-pip { min-height:38px !important; padding:7px !important; gap:0 !important; }
 html body #board #scoreboard .kt-perk-name { display:none !important; }
 html body #board #scoreboard .perk-pip .kti { width:22px !important; height:22px !important; }
 html body #board #scoreboard .score-value { font-size:30px !important; }
 html body #board #scoreboard .score-btn { min-width:30px !important; min-height:30px !important; width:30px !important; height:30px !important; }
 html body #board #scoreboard .heist-stash-line { font-size:13px !important; gap:4px 8px; }
 html body #board #scoreboard .bank-btn,html body #board #scoreboard .scout-btn,html body #board #scoreboard .siege-stats { min-height:34px; font-size:14px; }
 html body #board #scoreboard .team-effects .team-effect { font-size:12px !important; gap:6px !important; }
}
@media(orientation:portrait) and (max-width:1050px) {
 html body #board #scoreboard { grid-template-rows:repeat(6,auto); }
 html body #board #scoreboard .team-panel { grid-row:1/span 6; grid-template-columns:minmax(0,1fr) !important; }
 html body #board #scoreboard .team-panel .team-name-tag { grid-column:1 !important; grid-row:1 !important; }
 html body #board #scoreboard .team-panel .team-score,html body #board #scoreboard .team-panel .heist-score-grid > .score-value { grid-column:1 !important; grid-row:2 !important; }
 html body #board #scoreboard .team-panel .team-perks { grid-column:1 !important; grid-row:3 !important; }
 html body #board #scoreboard .team-panel .heist-stash-line { grid-column:1 !important; grid-row:4 !important; }
 html body #board #scoreboard .team-panel .bank-btn { grid-column:1 !important; grid-row:5 !important; }
 html body #board #scoreboard .scout-btn,html body #board #scoreboard .siege-stats { grid-row:4; }
 html body #board #scoreboard .team-effects { grid-row:5; }
 html body.mode-heist #board #scoreboard .team-effects { grid-row:6; }
 html body #board #scoreboard .team-roster { grid-row:6; }
 html body #board .stage-header { flex-wrap:wrap; gap:8px; }
 html body #board .board-mode-name { font-size:18px; }
 html body #board .board-mode-symbol { width:24px; height:24px; }
}
@media(max-height:600px),(max-width:650px) {
 html body.mode-siege #board > .stage-bg { height:auto; min-height:100svh; }
 html body #board .board-grid.siege-mode { flex:none; height:530px; }
}
html body #board #scoreboard.scoreboard.scoreboard { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
html body #board #scoreboard .heist-score-grid > .score-value { justify-self:stretch; }
html body #board .board-grid.siege-mode { display:flex !important; flex-direction:column; overflow:hidden; }
html body #board .siege-map-scroll { flex:1 1 0; min-height:0; overflow:auto; scrollbar-width:thin; scrollbar-color:var(--board-accent) var(--board-paper); }
html body #board .siege-legend { flex:0 0 auto; padding:8px 4px 0; margin:0; border-top:1px solid var(--board-line); }
html body #board .siege-map-scroll:focus-visible { outline:2px solid var(--board-accent); outline-offset:-2px; }
/* Slim board host strip: readable scores and round, icon-only assists. */
/* Compact paired scoreboards; empty state rows take no space. */
html body #board #scoreboard.scoreboard.scoreboard { grid-template-rows:repeat(5,auto); gap:0 18px !important; }
html body #board #scoreboard.scoreboard.scoreboard .team-panel { --score-col:1; --perk-col:2; grid-row:1/span 5; grid-template-columns:minmax(150px,.65fr) minmax(0,1.35fr) !important; gap:0 14px !important; padding:8px 12px !important; border-radius:10px !important; overflow:visible; }
html body #board #scoreboard.scoreboard.scoreboard .team-b { --score-col:2; --perk-col:1; grid-template-columns:minmax(0,1.35fr) minmax(150px,.65fr) !important; }
html body #board #scoreboard.scoreboard.scoreboard .team-panel.active { box-shadow:inset 0 2px 0 var(--board-accent) !important; }
html body #board #scoreboard.scoreboard.scoreboard .team-name-tag { grid-column:var(--score-col) !important; grid-row:1 !important; font-size:16px !important; line-height:1.35 !important; min-height:0; padding:0 0 3px; }
html body #board #scoreboard.scoreboard.scoreboard .team-score { grid-column:var(--score-col) !important; grid-row:2 !important; grid-template-columns:32px minmax(0,1fr) 32px !important; gap:5px !important; }
html body #board #scoreboard.scoreboard.scoreboard .team-score .score-value { grid-column:2 !important; grid-row:1 !important; }
html body #board #scoreboard.scoreboard.scoreboard .score-value { font-size:32px !important; }
html body #board #scoreboard.scoreboard.scoreboard .team-score .score-btn { grid-row:1 !important; width:32px !important; height:32px !important; min-width:32px !important; min-height:32px !important; border-radius:50% !important; }
html body #board #scoreboard.scoreboard.scoreboard .team-score .score-btn:first-child { grid-column:1 !important; }
html body #board #scoreboard.scoreboard.scoreboard .team-score .score-btn:last-child { grid-column:3 !important; }
html body #board #scoreboard.scoreboard.scoreboard .team-perks { grid-column:var(--perk-col) !important; grid-row:1/span 2 !important; display:flex !important; flex-wrap:wrap !important; justify-content:center; align-items:center; align-content:center; align-self:center; min-height:0; gap:8px !important; }
html body #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip { flex:0 0 52px !important; width:52px !important; height:52px !important; min-height:52px !important; padding:10px !important; border-radius:50% !important; gap:0 !important; position:relative; }
html body #board #scoreboard.scoreboard.scoreboard .kt-perk-name { display:none !important; }
html body #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip .kti { width:29px !important; height:29px !important; }
html body #board #scoreboard.scoreboard.scoreboard .perk-pip:focus-visible { outline:2px solid var(--board-accent); outline-offset:3px; }
html body #board #scoreboard.scoreboard.scoreboard .perk-pip.spent { opacity:.4 !important; }
html body #board #scoreboard.scoreboard.scoreboard .heist-score-grid > .score-value { grid-column:var(--score-col) !important; grid-row:2 !important; }
html body #board #scoreboard.scoreboard.scoreboard .heist-stash-line { grid-column:var(--score-col) !important; grid-row:3 !important; min-height:0; padding:4px 0 0; gap:3px 8px; font-size:12px !important; border:0; }
html body #board #scoreboard.scoreboard.scoreboard .bank-btn { grid-column:var(--perk-col) !important; grid-row:3 !important; width:auto; justify-self:center; min-height:28px; padding:3px 18px; font-size:13px; }
html body #board #scoreboard.scoreboard.scoreboard :is(.scout-btn,.siege-stats) { grid-column:var(--perk-col) !important; grid-row:3 !important; width:auto; justify-self:center; min-height:26px; padding:3px 12px; font-size:13px; }
html body #board #scoreboard.scoreboard.scoreboard .team-effects { grid-column:1/-1 !important; grid-row:4 !important; gap:4px; justify-content:center; }
html body #board #scoreboard.scoreboard.scoreboard .team-effects:empty { display:none; }
html body #board #scoreboard.scoreboard.scoreboard .team-effects .team-effect { flex:0 1 auto; min-height:24px !important; padding:2px 7px !important; font-size:12px !important; gap:5px !important; border-radius:6px !important; margin-top:4px; }
html body #board #scoreboard.scoreboard.scoreboard .team-effects .kti { width:15px !important; height:15px !important; }
html body #board #scoreboard.scoreboard.scoreboard .team-panel.lockout::after { grid-column:var(--score-col); grid-row:4; font-size:11px; text-align:center; }
html body #board #scoreboard.scoreboard.scoreboard .team-roster { grid-row:5 !important; }
.board-perk-tooltip { position:fixed; z-index:10090; max-width:min(260px,calc(100vw - 24px)); background:#211d29; color:#fff; border:1px solid #746b7d; border-radius:8px; padding:8px 12px; font:600 14px/1.5 var(--font-body); pointer-events:none; text-align:center; box-shadow:0 5px 18px #0004; }
.board-perk-tooltip[hidden] { display:none; }
@media(max-width:1400px) {
 html body #board #scoreboard.scoreboard.scoreboard .team-panel { grid-template-columns:minmax(130px,.65fr) minmax(0,1.35fr) !important; gap:0 8px !important; }
 html body #board #scoreboard.scoreboard.scoreboard .team-b { grid-template-columns:minmax(0,1.35fr) minmax(130px,.65fr) !important; }
 html body #board #scoreboard.scoreboard.scoreboard .team-perks { gap:5px !important; }
 html body #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip { flex-basis:44px !important; width:44px !important; height:44px !important; min-height:44px !important; padding:8px !important; }
 html body #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip .kti { width:27px !important; height:27px !important; }
}
@media(max-width:750px) {
 html body #board #scoreboard.scoreboard.scoreboard { grid-template-rows:repeat(6,auto); gap:0 8px !important; }
 html body #board #scoreboard.scoreboard.scoreboard .team-panel { --score-col:1; --perk-col:1; grid-row:1/span 6; grid-template-columns:minmax(0,1fr) !important; padding:7px !important; }
 html body #board #scoreboard.scoreboard.scoreboard .team-name-tag { font-size:14px !important; }
 html body #board #scoreboard.scoreboard.scoreboard .score-value { font-size:28px !important; }
 html body #board #scoreboard.scoreboard.scoreboard .team-perks { grid-row:3 !important; padding-top:5px; gap:5px !important; }
 html body #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip { flex-basis:34px !important; width:34px !important; height:34px !important; min-height:34px !important; padding:5px !important; }
 html body #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip .kti { width:23px !important; height:23px !important; }
 html body #board #scoreboard.scoreboard.scoreboard :is(.heist-stash-line,.scout-btn,.siege-stats) { grid-row:4 !important; }
 html body #board #scoreboard.scoreboard.scoreboard .bank-btn { grid-row:5 !important; margin-top:3px; }
 html body #board #scoreboard.scoreboard.scoreboard .team-effects { grid-row:6 !important; }
 html body #board #scoreboard.scoreboard.scoreboard .team-panel.lockout::after { grid-row:6; }
}
