/* Adapted landscape geometry. The existing paper/dark tokens remain authoritative. */
html body.handoff #board > .stage-bg {
 height:100svh;min-height:0!important;gap:12px!important;
 padding:max(12px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left))!important;
}
html body.handoff #board .stage-header{display:flex!important;min-height:44px!important;gap:16px;padding:0!important;border:0!important;flex-wrap:nowrap!important;}
html body.handoff #board .board-mode-mark{display:none!important;}
html body.handoff #board .ar-match-status{display:flex;align-items:center;gap:20px;min-width:0;flex:1;}
html body.handoff #board .stage-header h2{font:600 16px/1.4 var(--font-body)!important;min-width:0;overflow-wrap:anywhere;}
html body.handoff #board .ar-match-meta{font:500 12px/1.5 var(--font-body);color:var(--board-muted);margin:0;white-space:nowrap;}
html body.handoff #board .stage-header__actions{display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:4px!important;width:auto!important;}
html body.handoff #board .stage-header__actions .btn,html body.handoff .ar-fullscreen{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;border-radius:7px!important;display:inline-grid;place-items:center;font:22px/1 var(--font-body)!important;}
html body.handoff .ar-fullscreen[hidden]{display:none!important;}
html body.handoff #board .kt-kebab-menu .btn{width:100%!important;height:auto!important;padding:10px 12px!important;display:flex;justify-content:flex-start;font-size:14px!important;}
html body.handoff #board .kt-kebab-wrap{display:flex!important;}
html body.handoff #board #kt-audio-dock{order:-2;}
html body.handoff :is(#board,#question,#answer) #kt-audio-dock{position:relative!important;inset:auto!important;display:flex!important;flex:0 0 44px!important;width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;border-radius:7px!important;}
html body.handoff :is(#board,#question,#answer) #kt-audio-dock .kt-dock-toggle{width:42px!important;height:42px!important;min-height:42px!important;display:grid!important;place-items:center;}
html body.handoff #board .board-grid:not(.siege-mode){grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important;grid-auto-rows:minmax(0,1fr)!important;gap:14px 20px!important;overflow:hidden;}
/* Older saved shows can contain more than six categories. Keep every tile reachable. */
html body.handoff #board .board-grid:not(.siege-mode):has(>.cat-col:nth-child(7)){grid-template-columns:repeat(4,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-rows:minmax(120px,1fr)!important;overflow:auto;}
html body.handoff #board .board-grid:not(.siege-mode) .cat-col{grid-template-columns:1fr 1.35fr 1fr!important;grid-template-rows:repeat(3,minmax(0,1fr))!important;gap:7px!important;}
html body.handoff #board .cat-col__head,html body.handoff #board .cat-col__cover{min-height:0!important;}
html body.handoff #board .cat-col__cover{flex:1 1 0!important;height:auto!important;}
html body.handoff #board .tile{min-height:0!important;padding:2px!important;border-radius:9px!important;font:500 clamp(24px,2.5vw,44px)/1.15 var(--font-body)!important;}
html body.handoff #board .tile:focus-visible,html body.handoff #board .siege-cell:focus-visible{outline:3px solid var(--board-accent);outline-offset:-3px;}
html body.handoff #board #scoreboard.scoreboard.scoreboard{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:auto!important;align-items:stretch;gap:20px!important;flex:none;}
html body.handoff #board #scoreboard.scoreboard.scoreboard .team-panel{grid-row:1!important;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr)!important;grid-template-rows:auto auto auto!important;padding:8px 14px!important;gap:2px 16px!important;border-radius:8px!important;}
html body.handoff #board #scoreboard.scoreboard.scoreboard .team-b{grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr)!important;}
html body.handoff #board #scoreboard.scoreboard.scoreboard .team-name-tag{font-size:17px!important;line-height:1.4!important;padding:0!important;white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;}
html body.handoff #board #scoreboard.scoreboard.scoreboard .team-roster{display:none!important;}
html body.handoff #board #scoreboard.scoreboard.scoreboard .team-perks{flex-wrap:nowrap!important;gap:6px!important;padding:0!important;}
html body.handoff #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip{flex:0 0 48px!important;width:48px!important;height:48px!important;min-height:48px!important;padding:10px!important;}
html body.handoff #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip .kti{width:25px!important;height:25px!important;}
.perk-pip.active{outline:2px solid currentColor;outline-offset:2px;}
.perk-count{position:absolute;inset-inline-end:-3px;top:-3px;min-width:17px;height:17px;border-radius:50%;display:grid;place-items:center;background:var(--board-accent,#79551d);color:var(--board-card,#fffaf0);font:700 11px/1 var(--font-body);}
.perk-nontarget{opacity:.3!important;}.perk-target{filter:drop-shadow(0 0 4px #e7ce92);}
html body.handoff #board .board-grid.siege-mode{flex:1;min-height:0!important;overflow:hidden;}
html body.handoff #board .siege-map-scroll{min-height:0;}
/* Six selected covers and Start stay visible while the catalogue recedes. */
body.handoff #categorySelect.ar-board-ready::after{content:'';position:fixed;inset:0;background:#000c;pointer-events:none;z-index:90;}
body.handoff #categorySelect.ar-board-ready .ar-category-dock{z-index:92!important;}
body.handoff #categorySelect.ar-board-ready .cat-card.selected{position:relative;z-index:91;}
body.handoff #categorySelect.ar-board-ready :focus-visible{position:relative;z-index:93;outline:3px solid #e3be68!important;outline-offset:3px;}
body.handoff .ar-roster-toggle{min-height:44px;}
/* Dock grid (chips | actions) is a wide-screen layout only. body.handoff is added unconditionally,
   so without the guard this leaked into portrait phones and clipped «ابدأ المباراة» (2026-09-21). */
@media(min-width:801px){
 html body.handoff #categorySelect .ar-dock-inner{display:grid!important;grid-template-columns:minmax(0,1fr) 180px;gap:12px 24px;max-width:1432px;}
}
@media(max-width:800px){
 html body.handoff #categorySelect .ar-dock-inner{display:block!important;max-width:none;}
 html body.handoff #categorySelect .ar-dock-inner > #catTray,html body.handoff #categorySelect .ar-dock-inner > .cat-tray{width:100%!important;min-width:0!important;}
 html body.handoff #categorySelect .ar-dock-actions{display:flex!important;align-items:center;gap:7px;width:100%;min-width:0;margin-top:9px;}
 html body.handoff #categorySelect .ar-dock-actions #buildBtn{flex:1 1 auto;min-width:0;}
}
html body.handoff #categorySelect #catTray{min-width:0;width:100%;}
html body.handoff #categorySelect #catTrayChips{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:8px!important;padding:2px 2px 7px!important;}
html body.handoff #categorySelect .cat-slot{height:60px!important;flex:0 0 110px!important;max-width:200px!important;width:auto!important;}
html body.handoff #categorySelect .cat-slot.filled{display:flex!important;padding:6px!important;gap:8px!important;}
html body.handoff #categorySelect .cat-slot img{width:36px!important;height:44px!important;object-fit:cover;flex:none;}
html body.handoff #categorySelect .cat-slot__nm{display:block!important;font:600 11px/1.4 var(--font-body)!important;overflow-wrap:anywhere;}
html body.handoff #categorySelect .cat-info{width:44px!important;height:44px!important;}
html body.handoff #categorySelect .ar-dock-actions{min-width:0;margin:0;}
html body.handoff #categorySelect #buildBtn{min-height:48px!important;}
html body.handoff #categorySelect .cat-actions{grid-template-columns:minmax(0,1fr) minmax(130px,.5fr) auto!important;}
html body.handoff #categorySelect .ar-search-field,html body.handoff #categorySelect .ar-group-field{grid-column:auto!important;}
html body.handoff.mode-vegas #board{--board-paper:#f3eae2;--board-card:#fff7ec;--board-accent:#873b50;--board-active:#eddbd7;--board-hover:#efdfd7;}
html body.handoff.mode-vegas #board[data-board-theme=dark]{--board-paper:#24151c;--board-card:#351e27;--board-accent:#dfbd76;--board-active:#45303b;--board-hover:#4b2d39;--board-line:#715360;}
body.handoff.mode-vegas :is(#question,#answer) .qa-card{border-color:#90784f!important;box-shadow:inset 0 0 100px #1e614b33,0 20px 60px #0003!important;}
/* Modal themes inherit the player's choice; never import the English fonts. */
body.handoff{--prompt-bg:#fffaf0;--prompt-ink:#292334;--prompt-muted:#62576b;--prompt-line:#bcae99;--prompt-accent:#79551d;--prompt-on-accent:#fffaf0;--prompt-radius:12px;}
body.handoff.mode-heist{--prompt-bg:#edf3f5;--prompt-accent:#466272;--prompt-radius:5px;}
body.handoff.mode-vegas{--prompt-bg:#f7ede7;--prompt-accent:#85414c;}
body.handoff.mode-carnival{--prompt-bg:#f1e9fa;--prompt-accent:#704395;--prompt-radius:14px;}
body.handoff.mode-siege{--prompt-bg:#edf0eb;--prompt-accent:#4d615d;--prompt-radius:7px;}
body.handoff[data-game-theme=dark]{--prompt-bg:#271d2b;--prompt-ink:#faf4f7;--prompt-muted:#d6c8d2;--prompt-line:#8c7588;--prompt-accent:#f0d28d;--prompt-on-accent:#211d25;}
body.handoff.mode-heist[data-game-theme=dark]{--prompt-bg:#24384b;--prompt-muted:#d0dfe9;--prompt-line:#8ca2b5;--prompt-accent:#ebce90;}
body.handoff.mode-vegas[data-game-theme=dark]{--prompt-bg:#32101e;--prompt-muted:#dbc9ce;--prompt-line:#957747;--prompt-accent:#e0bd72;}
body.handoff.mode-carnival[data-game-theme=dark]{--prompt-bg:#443155;--prompt-muted:#ebdcf4;--prompt-line:#b495ca;--prompt-accent:#c7ff72;}
body.handoff.mode-siege[data-game-theme=dark]{--prompt-bg:#222e35;--prompt-muted:#c0c9c7;--prompt-line:#697477;--prompt-accent:#d6bd87;}
body.handoff :is(.kt-perk-feedback,.vg-bet-modal){font-family:var(--font-body);text-align:start;direction:rtl;letter-spacing:normal;background:var(--prompt-bg);color:var(--prompt-ink);border-color:var(--prompt-line);}
body.handoff :is(.kt-perk-feedback,.vg-bet-modal) :is(button,h2,h3){font-family:var(--font-body);letter-spacing:normal;line-height:1.45;}
body.handoff .kt-perk-feedback__effect{border-left:0;border-inline-start:3px solid var(--prompt-accent);}
body.handoff .vg-bet-modal :is(p,small){color:var(--prompt-muted);}
body.handoff .vg-bet-modal :is(h3,strong,.vg-bet__risk){color:var(--prompt-ink);}
body.handoff .vg-bet-modal .vg-bet__option{background:transparent;color:var(--prompt-ink);border-color:var(--prompt-line);}
body.handoff .vg-bet-modal :is(.vg-bet__lock,.vg-bet__option[aria-pressed=true]){background:var(--prompt-accent);color:var(--prompt-on-accent);}
body.handoff .vg-bet__option[aria-pressed=true] :is(strong,small){color:var(--prompt-on-accent);}
body.handoff .vg-bet__cancel{color:var(--prompt-muted);}
body.handoff .vg-bet-modal :is(strong,.vg-bet__risk){unicode-bidi:plaintext;}
body.handoff :is(.vg-bet__option strong,.vg-bet__heading strong,.score-value,.stash-num,.vault-num){direction:ltr;unicode-bidi:isolate;}
@media(max-width:1100px){
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-panel{padding:7px 9px!important;gap:2px 8px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip{flex-basis:38px!important;width:38px!important;height:38px!important;min-height:38px!important;padding:7px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip .kti{width:23px!important;height:23px!important;}
}
@media(orientation:landscape) and (max-height:600px){
 html body.handoff #board > .stage-bg{gap:6px!important;padding:max(6px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(6px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;}
 html body.handoff #board .board-grid:not(.siege-mode){gap:6px 10px!important;}
 html body.handoff #board .board-grid:not(.siege-mode) .cat-col{gap:3px!important;}
 html body.handoff #board .tile{font-size:clamp(18px,2.6vw,26px)!important;border-radius:5px!important;}
 html body.handoff #board .cat-col__head{border-radius:6px!important;}
 html body.handoff #board .cat-col__name{height:28px!important;min-height:28px!important;flex:0 0 28px!important;font:600 11px/13px var(--font-body)!important;padding:1px 2px!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard{gap:8px!important;grid-template-rows:auto!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-panel{--score-col:1;--perk-col:2;grid-template-columns:minmax(0,1fr) auto!important;grid-template-rows:20px 26px auto!important;grid-row:1!important;padding:4px 6px!important;gap:2px 8px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-b{--score-col:2;--perk-col:1;grid-template-columns:auto minmax(0,1fr)!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-name-tag{font-size:12px!important;line-height:1.4!important;grid-row:1!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .score-value{font-size:23px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-score{grid-template-columns:24px minmax(0,1fr) 24px!important;grid-row:2!important;gap:2px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-score .score-btn{width:24px!important;min-width:24px!important;height:24px!important;min-height:24px!important;font-size:17px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-perks{grid-column:var(--perk-col)!important;grid-row:1/span 2!important;gap:4px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip{flex-basis:32px!important;width:32px!important;height:32px!important;min-height:32px!important;padding:5px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip .kti{width:21px!important;height:21px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .heist-stash-line{grid-column:var(--score-col)!important;grid-row:3!important;padding:0!important;font-size:10px!important;gap:2px 4px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .bank-btn{grid-column:var(--perk-col)!important;grid-row:3!important;font-size:11px!important;min-height:24px!important;padding:2px 8px!important;margin:0!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .siege-stats{grid-row:3!important;min-height:16px!important;font-size:11px!important;padding:0!important;}
 html body.handoff #board .siege-legend{display:none!important;}
 html body.handoff #board .board-grid.siege-mode{padding:4px!important;}
 html body.handoff #board .siege-board{padding-top:2px!important;padding-bottom:2px!important;}
 html body.handoff #board .siege-name{font-size:clamp(8px,1vw,12px)!important;}
 html body.handoff #board .siege-pts{font-size:clamp(10px,1.5vw,18px)!important;}
 html body.handoff #board .alarm-meter{min-height:20px;margin:0!important;padding:0!important;}
 html body.handoff #setup .ar-setup-layout{grid-template-columns:.65fr 1.35fr!important;gap:22px!important;max-width:1100px!important;}
 html body.handoff #setup .stage-bg{padding:8px 16px 12px!important;}
 html body.handoff #setup .ar-team-art{min-height:0!important;height:255px!important;}
 html body.handoff #setup .ar-art-heading{padding:10px!important;}
 html body.handoff #setup .ar-art-heading strong{font-size:24px!important;}
 html body.handoff #setup .ar-next{position:static!important;}
}
@media(max-width:700px){html body.handoff #board .ar-match-status{flex-direction:column;align-items:flex-start;gap:0;}html body.handoff #board .stage-header h2{font-size:13px!important;}html body.handoff #board .ar-match-meta{font-size:11px;}}
@media(orientation:landscape) and (max-height:600px) and (max-width:650px){
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-panel{grid-template-columns:minmax(0,1fr) auto!important;gap:2px 4px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-b{grid-template-columns:auto minmax(0,1fr)!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-perks{gap:2px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip{flex-basis:27px!important;width:27px!important;height:27px!important;min-height:27px!important;padding:4px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip .kti{width:19px!important;height:19px!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .score-value{font-size:21px!important;}
}
/* Keep a usable scrolling fallback for portrait web visitors. */
@media(orientation:portrait) and (max-width:1050px){
 html body.handoff #board > .stage-bg{height:auto;min-height:100svh!important;}
 html body.handoff #board .board-grid:not(.siege-mode){grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(3,minmax(180px,1fr))!important;flex:auto;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-panel{--score-col:1;--perk-col:1;grid-template-columns:minmax(0,1fr)!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard .team-perks{grid-row:3!important;}
 html body.handoff #board #scoreboard.scoreboard.scoreboard :is(.bank-btn,.siege-stats){grid-row:5!important;}
}
/* Preserve the Q&A flow while fitting the actual short landscape viewport.
   Only the content region scrolls; timer, reveal/award actions and scores stay reachable. */
@media(orientation:landscape) and (max-height:600px){
 html body.handoff :is(#question,#answer) > .stage-bg{height:100dvh;min-height:0!important;padding:max(6px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) calc(64px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;}
 html body.handoff :is(#question,#answer) .qa-stage{height:100%;min-height:0!important;max-width:none!important;padding:0!important;display:flex;flex-direction:column;gap:4px;}
 html body.handoff :is(#question,#answer) .qa-card{min-height:0!important;min-width:0;flex:1;display:flex;flex-direction:column;padding:6px 10px!important;border-radius:10px!important;}
 html body.handoff #question .qa-perks{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:0 0 4px!important;flex:none;}
 html body.handoff #question .qa-perk-panel{display:flex!important;align-items:center;justify-content:space-between;min-width:0;min-height:36px!important;padding:2px 5px!important;gap:5px!important;border-radius:6px!important;}
 html body.handoff #question .qa-perk-name{font-size:11px!important;line-height:1.4;min-width:0!important;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
 html body.handoff #question .qa-perk-row{display:flex!important;gap:4px!important;flex-wrap:nowrap!important;}
 html body.handoff #question .qa-perk-row .perk-pip{position:relative;width:30px!important;height:30px!important;min-height:30px!important;flex:0 0 30px!important;padding:5px!important;border-radius:50%!important;}
 html body.handoff #question .qa-perk-row .kti{width:20px!important;height:20px!important;}
 html body.handoff #question .qa-perk-row .kt-perk-name{display:none!important;}
 html body.handoff :is(#question,#answer) .qa-topbar{flex:none;min-height:44px;flex-wrap:nowrap!important;gap:6px;margin:0!important;padding:0 0 4px!important;}
 html body.handoff :is(#question,#answer) .qa-topbar .btn{min-height:40px!important;padding:6px 10px!important;font:600 12px/1.4 var(--font-body)!important;}
 html body.handoff :is(#question,#answer) .points-tag{font-size:16px!important;white-space:nowrap;}
 html body.handoff #question .timer{font-size:26px!important;min-width:76px!important;padding:2px 6px!important;line-height:1.4!important;}
 html body.handoff :is(#question,#answer) .qa-content{flex:1 1 0;min-height:0!important;overflow:auto;display:flex;flex-direction:column;justify-content:safe center;gap:4px;padding:6px 0!important;}
 html body.handoff :is(#question,#answer) .qa-content > *{flex-shrink:0;}
 html body.handoff :is(#question,#answer) :is(.question-text,.answer-text){font-size:clamp(22px,2.7vw,30px)!important;line-height:1.5!important;margin:0!important;}
 html body.handoff :is(#question,#answer) :is(.category-tag,.answer-tagline){font-size:10px!important;margin:0!important;}
 html body.handoff :is(#question,#answer) :is(.qa-actions,.award-buttons){flex:none;margin:0!important;padding:4px 0 0!important;gap:8px!important;}
 html body.handoff :is(#question,#answer) :is(.qa-actions,.award-buttons) .btn{min-height:36px!important;padding:6px 12px!important;font-size:13px!important;}
 html body.handoff :is(#question,#answer) .visual-image{max-height:160px;max-width:100%;}
 html body.handoff #vegasWagerStrip{font-size:11px!important;padding:3px 8px!important;margin:0!important;}
 body.handoff:has(:is(#question,#answer).is-active) #kt-miniboard{bottom:max(6px,env(safe-area-inset-bottom))!important;gap:10px!important;}
 body.handoff:has(:is(#question,#answer).is-active) .kt-mini-team{width:120px!important;min-width:0!important;padding:4px 12px!important;border-radius:8px!important;}
 body.handoff:has(:is(#question,#answer).is-active) .kt-mini-name{font-size:11px!important;line-height:1.4!important;}
 body.handoff:has(:is(#question,#answer).is-active) .kt-mini-score{font-size:23px!important;line-height:1.2!important;}
}
/* الحصار on a phone in landscape (2026-09-16): the 6×6 map is HEIGHT-bound — with the team rails
   stacked under it, six hex rows in a ~430px screen came out ~45px wide. Park the two rails at the
   sides instead (width is the one thing a landscape phone has plenty of) so the map takes the full
   height. #scoreboard becomes display:contents so its two panels join the stage grid directly. */
@media(orientation:landscape) and (max-height:600px){
 html body.handoff.mode-siege #board > .stage-bg{display:grid!important;grid-template-columns:minmax(112px,140px) minmax(0,1fr) minmax(112px,140px);grid-template-rows:auto minmax(0,1fr);grid-template-areas:"head head head" "a map b";gap:5px 8px!important;}
 html body.handoff.mode-siege #board .stage-header{grid-area:head;min-height:34px!important;}
 /* :not(.kt-kebab-menu .btn) — the kebab menu items live inside .stage-header__actions too; without the
    exclusion they collapsed into 34px columns (2026-09-21). */
 html body.handoff.mode-siege #board .stage-header__actions .btn:not(.kt-kebab-menu .btn),html body.handoff.mode-siege #board .ar-fullscreen,html body.handoff.mode-siege :is(#board) #kt-audio-dock{width:34px!important;min-width:34px!important;height:34px!important;min-height:34px!important;flex-basis:34px!important;font-size:18px!important;}
 html body.handoff.mode-siege #board #kt-audio-dock .kt-dock-toggle{width:32px!important;height:32px!important;min-height:32px!important;}
 html body.handoff.mode-siege #board .alarm-meter{display:none!important;}
 html body.handoff.mode-siege #board .board-grid.siege-mode{grid-area:map;min-height:0!important;height:100%!important;padding:4px!important;}
 html body.handoff.mode-siege #board .siege-map-scroll{height:100%!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard{display:contents!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-panel{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto auto auto auto auto!important;align-content:start!important;gap:8px!important;padding:8px 6px!important;margin:0!important;min-height:0!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-a{grid-area:a!important;grid-row:a!important;grid-column:a!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-b{grid-area:b!important;grid-row:b!important;grid-column:b!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-panel > div:first-child{display:contents!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .kt-team-label{display:none!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-name-tag{grid-row:1!important;grid-column:1!important;font-size:14px!important;line-height:1.3!important;text-align:center;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-score{grid-row:2!important;grid-column:1!important;grid-template-columns:28px minmax(0,1fr) 28px!important;gap:2px!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-score .score-btn{width:28px!important;min-width:28px!important;height:28px!important;min-height:28px!important;font-size:18px!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .score-value{font-size:26px!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-perks{grid-row:3!important;grid-column:1!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px!important;justify-items:center;padding:0!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip{flex-basis:auto!important;width:40px!important;height:40px!important;min-height:40px!important;padding:8px!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip .kti{width:24px!important;height:24px!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .siege-stats{grid-row:4!important;grid-column:1!important;font-size:11px!important;min-height:0!important;text-align:center;padding:0!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-effects{grid-row:5!important;grid-column:1!important;}
}
@media(orientation:landscape) and (max-height:600px) and (max-width:760px){
 /* Small phones: the rails were eating the width the map needs (hexes went width-bound at ~39px). */
 html body.handoff.mode-siege #board > .stage-bg{grid-template-columns:96px minmax(0,1fr) 96px;gap:5px 6px!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-panel{padding:6px 4px!important;gap:6px!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-perks{gap:4px!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-perks .perk-pip{width:36px!important;height:36px!important;min-height:36px!important;padding:7px!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .team-score{grid-template-columns:26px minmax(0,1fr) 26px!important;}
 html body.handoff.mode-siege #board #scoreboard.scoreboard.scoreboard .score-value{font-size:22px!important;}
 html body.handoff.mode-siege #board .board-grid.siege-mode{padding:2px!important;}
}
@media(orientation:landscape) and (max-height:600px){
 /* Hex labels on a phone (2026-09-17): at ~60px hexes the 9px name over cover art was unreadable.
    Bigger, bolder, two lines max, on a solid dark band instead of a text-shadow; the points pill
    moves up a touch to make room. Applies to الحصار only. */
 html body.handoff.mode-siege #board .siege-name{font-size:clamp(10px,1.3vw,12.5px)!important;line-height:1.12!important;font-weight:800!important;left:3%!important;right:3%!important;bottom:11%!important;padding:2px 3px!important;border-radius:5px!important;background:rgba(8,4,2,.78)!important;text-shadow:none!important;display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden!important;word-break:break-word;}
 html body.handoff.mode-siege #board .siege-face--card .siege-pts{font-size:clamp(11px,1.4vw,14px)!important;top:15%!important;padding:1px 6px!important;}
 html body.handoff.mode-siege #board .siege-face--card::after{background:linear-gradient(180deg,rgba(8,4,2,.10) 0%,rgba(8,4,2,.55) 70%)!important;}
}
@media(orientation:landscape) and (max-height:600px){
 /* Long names (>14 chars, e.g. «لهجة وتراث الجزائر») were losing their distinguishing last word to the
    2-line clamp — give those three tighter lines instead of an ellipsis. */
 html body.handoff.mode-siege #board .siege-name--long{font-size:clamp(9px,1.15vw,11px)!important;line-height:1.08!important;-webkit-line-clamp:3;bottom:7%!important;}
 html body.handoff.mode-siege #board .siege-cell:has(.siege-name--long) .siege-pts{top:11%!important;}
}

/* ── Quick-fire board (2026-09-22): 3 categories / 18 tiles ─────────────────────────
   renderBoard() stamps data-cats on #boardGrid. One row of three tall columns on desktop
   and landscape phones; a single stacked column in portrait (the 2-col portrait grid would
   leave an orphan). Six-category boards are untouched. */
html body.handoff #board .board-grid:not(.siege-mode)[data-cats="3"]{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:minmax(0,1fr)!important;grid-auto-rows:minmax(0,1fr)!important;max-width:min(100%,1180px);margin-inline:auto;}
@media(orientation:portrait) and (max-width:1050px){
 html body.handoff #board .board-grid:not(.siege-mode)[data-cats="3"]{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:repeat(3,minmax(180px,1fr))!important;}
}
/* Wide screens: a single full-height row turns the covers into 160×620 strips — cap the row and centre it. */
@media(min-width:1051px){
 html body.handoff #board .board-grid:not(.siege-mode)[data-cats="3"]{grid-template-rows:minmax(0,min(62svh,560px))!important;align-content:center;max-width:min(100%,1040px);}
}
