/* Siege — stone, aged brass and two unmistakable factions. */
html:root body.mode-hex{--sg-bg:#141b20;--sg-panel:#222e35;--sg-line:#697477;--sg-ink:#f0ebe1;--sg-muted:#c0c9c7;--sg-brass:#d6bd87;--sg-a:#a83b31;--sg-b:#17666b;--hex0:#ce5140;--hex1:#359b9e;--hexamber:#d6bd87;--hexburn:#272b2d;--team-a:#ce5140;--team-b:#359b9e;--kt-accent:#d6bd87;background:#141b20!important;color:#f0ebe1;--prompt-bg:#222e35;--prompt-line:#697477;--prompt-muted:#c0c9c7;--prompt-accent:#d6bd87;--prompt-on-accent:#201d16;--prompt-radius:7px}
html:root body.mode-hex :is(.stage-bg,#board,#question,#answer){background:#141b20!important}
html:root body.mode-hex :is(.stage-header h2,.team-world__name){color:#f0ebe1!important;text-shadow:none!important;font-family:var(--font-brand,Georgia),serif!important}
html:root body.mode-hex :is(.btn--primary,.kt-intro__btn){background:#d6bd87!important;color:#201d16!important;border-color:#d6bd87!important;box-shadow:none!important;text-shadow:none!important}
html:root body.mode-hex :is(.kt-intro__card,.kt-burst,.kt-toast){background:#222e35!important;border-color:#697477!important;color:#f0ebe1!important;box-shadow:none!important;--ki-accent:#d6bd87}
html:root body.mode-hex :is(.kt-intro__title,.kt-burst__label){color:#d6bd87!important;text-shadow:none!important}
html:root body.mode-hex :is(.kt-intro__sub,.kt-intro__rules,.kt-burst__msg){color:#f0ebe1!important}
/* The existing team selectors become banners flanking the physical fortress. */
html:root body #setup[data-world=hex]{--world-bg:#141b20;--world-panel:#222e35;--world-field:#192329;--world-line:#697477;--world-accent:#d6bd87;--world-ink:#f0ebe1;--world-muted:#c0c9c7}
html:root body #setup[data-world=hex] .team-world__art{height:250px;min-height:0;background:#141b20;border-color:#697477}
html:root body #setup[data-world=hex] .team-world__image,html:root body #setup[data-world=hex] .hex-muster__map{display:none}
html:root body #setup[data-world=hex] .team-world__poster{max-width:32%;padding:26px 0}
html:root body #setup[data-world=hex] .team-world__name{font-size:clamp(40px,5vw,70px);letter-spacing:.03em;margin:18px 0}
html:root body #setup[data-world=hex] .hex-muster{inset:0 0 0 auto;width:65%;height:100%;overflow:hidden}
.sg-fortress{position:absolute;width:100%;height:100%;object-fit:cover;object-position:50% 37%;opacity:.85;mask-image:linear-gradient(90deg,transparent,#000 16%,#000 84%,transparent)}
html:root body #setup[data-world=hex] .hex-muster__versus{inset:26px 12px auto;background:none;border:0;padding:0;display:flex;justify-content:space-between;pointer-events:none}
html:root body #setup[data-world=hex] .hex-muster__versus>b{display:none}
html:root body #setup[data-world=hex] .hex-team-selector{pointer-events:auto;display:flex;align-items:center;justify-content:center;white-space:normal;overflow-wrap:anywhere;width:116px;min-height:142px;padding:32px 12px 24px;border:0;border-radius:0;background:#842e28;color:#fff0dd;font:600 16px/1.3 Archivo,Arial,sans-serif;clip-path:polygon(0 0,100% 0,100% 100%,50% 87%,0 100%);transform:translateY(10px);transition:transform .25s,background .25s;box-shadow:inset 0 4px #d6bd87}
html:root body #setup[data-world=hex] .hex-team-selector:last-child{background:#17565c;color:#e2f5ef}
html:root body #setup[data-world=hex][data-faction=a] .hex-team-selector:first-child{transform:translateY(0);background:#aa3c31}
html:root body #setup[data-world=hex][data-faction=b] .hex-team-selector:last-child{transform:translateY(0);background:#227d80}
html:root body #setup[data-world=hex] .hex-team-selector:focus-visible{outline:3px solid #fff;outline-offset:-7px}
html:root body #setup[data-world=hex] .hex-team-hint{color:#f0ebe1;background:#141b20bb;bottom:4px}
html:root body #setup[data-world=hex] .rng-col{background:#242b2e;border:1px solid #9f6358;border-radius:7px}
html:root body #setup[data-world=hex] .rng-col[data-side=b]{background:#202f32;border-color:#548e8e}
html:root body #setup[data-world=hex] :is(.hex-faction-crest,.team-world__name-field label){color:#efa295}
html:root body #setup[data-world=hex] .rng-col[data-side=b] :is(.hex-faction-crest,.team-world__name-field label){color:#8dd0cb}
html:root body #setup[data-world=hex] .team-world__name-field input{background:#141e23!important;color:#f0ebe1!important;border-color:#697477!important}
/* Campaign planning. Category artwork retains its own colors. */
html:root body.mode-hex :is(#categorySelect,.cs-info-dialog)[data-world=hex]{--cs-bg:#202a30;--cs-panel:#2b3940;--cs-field:#29353c;--cs-line:#697477;--cs-muted:#c7cfca;--cs-accent:#d6bd87;--cs-accent-ink:#231f16;--cs-intro:#dcd8c9;--cs-intro-ink:#233037;--cs-intro-muted:#415156;--cs-group:#e1d9bb;--cs-count:#4e605f;--cs-dock:#172126;--cs-gold:#d6bd87}
html:root body.mode-hex #categorySelect .cs-intro{background-image:none;border-top:0;border-radius:7px}
html:root body.mode-hex #categorySelect .cs-world-art{background:#141b20 url('siege-fortress-art.webp') 50% 36%/cover;clip-path:none}
html:root body.mode-hex #categorySelect .cs-world-art>*{display:none}
html:root body.mode-hex #categorySelect .cs-tools{background:#202a30!important;backdrop-filter:none!important}
html:root body.mode-hex #categorySelect .cs-picked-mark{border-radius:50%;clip-path:none;border:2px solid #f0e5c3}
/* Stone hexes and distinct crests preserve category recognition and ownership. */
html:root body.mode-hex .hex-cell{background:#87928f;filter:none}
html:root body.mode-hex .hex-cell::before{background:linear-gradient(145deg,#44515a,#28343c);box-shadow:none}
html:root body.mode-hex .hex-cover{opacity:.58;filter:saturate(.65)}
html:root body.mode-hex .hex-face--card .hex-pts{background:#111b23;color:#fff7e7;border-radius:3px;font-variant-numeric:tabular-nums}
html:root body.mode-hex .hex-own0::before{background:#a83b31}
html:root body.mode-hex .hex-own1::before{background:#17666b}
html:root body.mode-hex .hex-glyph{color:#fff5df}
html:root body.mode-hex .hex-glyph .sg-crest{width:.85em;height:.85em}
html:root body.mode-hex .hex-burn::before,html:root body.mode-hex .hex-neutral::before{background:linear-gradient(125deg,#262e33 47%,#66716c 48%,#1b242a 51%)}
html:root body.mode-hex .hex-far{opacity:.4;filter:saturate(.35)}
html:root body.mode-hex .hex-fort{background:#e8d098;filter:none}
html:root body.mode-hex .hex-chip0{background:#ce5140}html:root body.mode-hex .hex-chip1{background:#359b9e}
html:root body.mode-hex .hex-legend{color:#d2d8d1;gap:10px;margin-block:8px 12px}
html:root body.mode-hex .hex-hint{opacity:1;color:#bdc8c5}
html:root body.mode-hex .hex-cell:focus-visible{background:#fff3c9;outline:none;filter:brightness(1.2)}
html:root body.mode-hex .sg-captured{animation:sg-capture .45s ease-out}
@keyframes sg-capture{0%{transform:scale(.9);filter:brightness(1.8)}100%{transform:scale(1);filter:brightness(1)}}
html:root body.mode-hex .team-panel{background:#222e35!important;border-color:#697477!important;box-shadow:none!important}
html:root body.mode-hex .team-panel.team-a{--faction:#efa295;border-top:3px solid #ce5140!important}
html:root body.mode-hex .team-panel.team-b{--faction:#8dd0cb;border-top:3px solid #359b9e!important}
html:root body.mode-hex .team-panel .team-name-tag{color:var(--faction)!important}
html:root body.mode-hex .team-panel.active{outline:2px solid #d6bd87;outline-offset:-2px;box-shadow:none!important}
html:root body.mode-hex .perk-pip{border-radius:50%!important;background:#19242c!important;border:1px solid #a18e65!important;color:#ead8b3!important;width:40px!important;height:40px!important;min-width:40px!important;padding:8px!important}
html:root body.mode-hex .perk-pip .kti{width:22px;height:22px}
html:root body.mode-hex .perk-pip.active{background:#d6bd87!important;color:#172126!important}
/* Quiet command panels place the question ahead of scenery. */
html:root body.mode-hex :is(#question,#answer) .qa-card{background:#222e35!important;border:1px solid #8a8067!important;border-radius:8px!important;box-shadow:none!important}
html:root body.mode-hex :is(.question-text,.answer-text,.qa-topbar){color:#f0ebe1!important;text-shadow:none!important}
html:root body.mode-hex :is(.qa-topbar,.qa-actions,.qa-perks){border-color:#5c696d!important}
html:root body.mode-hex :is(.points-tag,.category-tag,#timer){color:#e7cd94!important;text-shadow:none!important}
html:root body.mode-hex .award-buttons .btn--team-a{background:#88392f!important;border-color:#d68a77!important;color:#fff6e8!important}
html:root body.mode-hex .award-buttons .btn--team-b{background:#19545a!important;border-color:#78c3bd!important;color:#effcf6!important}
/* The final map explains the win; the banner belongs to the winning faction. */
html:root body.mode-hex #gameover.result-stage{--result-accent:#d6bd87;--result-surface:#222e35;--result-bg:#141b20;--result-border:#697477}
.sg-victory{margin-top:24px;border-top:1px solid #697477;padding-top:20px;max-width:440px}
.sg-victory-banner{display:flex;align-items:center;gap:12px;padding:12px 18px;background:#a83b31;color:#fff5df;animation:sg-banner .6s ease-out}
.sg-victory[data-side="1"] .sg-victory-banner{background:#17666b}
.sg-victory[data-side="-1"] .sg-victory-banner{background:#34454b}
.sg-victory-banner svg{width:28px;height:28px;flex:none}.sg-victory-banner strong{overflow-wrap:anywhere}
.sg-victory>svg{display:block;width:100%;max-height:240px;margin-top:18px}.sg-victory p{font:13px/1.5 Archivo,Arial,sans-serif;color:#c7cfca;margin:10px 0 0}
.sg-map-cell{fill:#303e45;stroke:#617273;stroke-width:1}.sg-own-a{fill:#a83b31}.sg-own-b{fill:#17666b}.sg-victory text{font:8px Archivo,Arial,sans-serif;fill:#fff5df}
.sg-map-cell.sg-route{stroke:#ffe3a1;stroke-width:2.5;animation:sg-route .55s ease-out both;animation-delay:calc(var(--step)*90ms)}
@keyframes sg-route{from{opacity:.35}to{opacity:1}}@keyframes sg-banner{from{transform:translateY(12px);opacity:0}to{transform:none;opacity:1}}
@media(max-width:800px){
 html:root body #setup[data-world=hex] .team-world__art{height:270px;margin-bottom:6px}
 html:root body #setup[data-world=hex] .team-world__poster{display:block;max-width:100%;padding:0;text-align:center}
 html:root body #setup[data-world=hex] .team-world__edition,html:root body #setup[data-world=hex] .team-world__tagline{display:none}
 html:root body #setup[data-world=hex] .team-world__name{font-size:38px;margin:0}
 html:root body #setup[data-world=hex] .hex-muster{top:46px;width:100%;height:218px}
 html:root body #setup[data-world=hex] .hex-muster__versus{inset:28px 6px auto}
 html:root body #setup[data-world=hex] .hex-team-selector{width:90px;min-height:116px;font-size:13px;padding:20px 8px}
 html:root body.mode-hex #board .perk-pip{width:32px!important;height:32px!important;min-width:32px!important;padding:5px!important}
 html:root body.mode-hex #board .perk-pip .kti{width:19px;height:19px}
}
@media(orientation:landscape) and (max-height:500px){
 html:root body #setup[data-world=hex] .team-world__art{height:175px}
 html:root body #setup[data-world=hex] .hex-muster{top:0;height:175px;width:68%}
 html:root body #setup[data-world=hex] .team-world__poster{width:29%;padding-top:40px}
 html:root body #setup[data-world=hex] .hex-team-selector{min-height:106px;width:85px}
 html:root body.mode-hex #board .perk-pip{width:27px!important;min-width:27px!important;height:27px!important;padding:4px!important}
 html:root body.mode-hex #board .hex-hint{display:none}
}
@media(prefers-reduced-motion:reduce){html:root body.mode-hex .sg-captured,.sg-victory-banner,.sg-map-cell.sg-route{animation:none}html:root body #setup[data-world=hex] .hex-team-selector{transition:none}}
/* One viewport: measured map region above a compact faction strip. */
html:root body.mode-hex #board>.stage-bg{display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;gap:10px!important;height:100dvh!important;min-height:0!important;padding:16px!important;background:#141b20!important;box-sizing:border-box}
html:root body.mode-hex #board .stage-header{order:0!important;min-height:0!important;margin:0!important;padding:0!important;align-items:center!important;gap:12px!important}
html:root body.mode-hex #board .stage-header h2{font:600 24px/1.2 var(--font-brand,Georgia),serif!important;color:#f0ebe1!important;text-shadow:none!important;margin:0!important}
html:root body.mode-hex #board #kt-tv-toggle{position:static!important;inset:auto!important;transform:none!important;background:#222e35!important;color:#f0ebe1!important;border-color:#697477!important}
html:root body.mode-hex #boardGrid{order:1!important;align-self:stretch!important;display:flex!important;flex-direction:column;justify-content:center;min-height:0!important;margin:0!important;padding:0!important;width:100%!important;max-width:none!important}
html:root body.mode-hex #board .hex-board{--hexw:var(--sg-hexw,50px)!important;flex:none;padding:0;margin:0}
html:root body.mode-hex #board .hex-legend{align-self:center;margin:6px 0 0!important;flex:none}
html:root body.mode-hex #board #scoreboard{order:2!important;position:static!important;inset:auto!important;transform:none!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;background:none!important}
html:root body.mode-hex #board #scoreboard .team-panel{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;gap:6px 14px!important;padding:10px 14px!important;margin:0!important;min-width:0!important;min-height:0!important;background:#222e35!important;transform:none!important;box-shadow:none!important;border-radius:7px!important}
html:root body.mode-hex #scoreboard .team-panel>div:first-child{display:contents!important}
html:root body.mode-hex #scoreboard .astra-team-label,html:root body.mode-hex #board .astra-board-foot{display:none!important}
html:root body.mode-hex #scoreboard .team-name-tag{grid-column:1;grid-row:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:600 15px/1.4 Archivo,Arial,sans-serif!important;color:var(--faction)!important}
html:root body.mode-hex #scoreboard .team-name-tag:after{display:none!important}
html:root body.mode-hex #scoreboard .team-perks{grid-column:1;grid-row:2;display:flex!important;gap:6px!important;margin:0!important;padding:0!important;flex-wrap:nowrap}
html:root body.mode-hex #scoreboard .astra-perk-name{display:none!important}
html:root body.mode-hex #scoreboard .team-score{grid-column:2;grid-row:1/3;display:flex!important;align-items:center;gap:5px!important;width:auto!important;flex-wrap:wrap;max-width:150px}
html:root body.mode-hex #scoreboard .score-value{font:650 28px/1 Archivo,Arial,sans-serif!important;color:#f0ebe1!important;text-shadow:none!important}
html:root body.mode-hex #scoreboard .score-btn{width:28px!important;height:32px!important;min-width:28px!important;min-height:32px!important;background:#19242b!important;border:1px solid #697477!important;color:#e9d3a1!important}
@media(max-width:1000px){html:root body.mode-hex #board .perk-pip{width:32px!important;min-width:32px!important;height:32px!important;padding:5px!important}html:root body.mode-hex #scoreboard .team-score{max-width:106px}html:root body.mode-hex #scoreboard .score-value{font-size:23px!important}html:root body.mode-hex #scoreboard .team-perks{gap:4px!important}}
@media(max-width:600px){
 html:root body.mode-hex #board>.stage-bg{padding:10px!important;gap:8px!important}
 html:root body.mode-hex #board .stage-header h2,html:root body.mode-hex #board .astra-progress>div:first-child{display:none!important}
 html:root body.mode-hex #board .astra-board-caption{font-size:13px!important}
 html:root body.mode-hex #board #scoreboard{gap:8px!important}
 html:root body.mode-hex #board #scoreboard .team-panel{grid-template-columns:1fr!important;grid-template-rows:auto auto auto;gap:6px!important;padding:8px!important}
 html:root body.mode-hex #scoreboard .team-score{grid-column:1;grid-row:2;max-width:none;width:100%!important;justify-content:space-between}
 html:root body.mode-hex #scoreboard .team-perks{grid-row:3;flex-wrap:wrap;justify-content:center}
 html:root body.mode-hex #board .perk-pip{width:27px!important;min-width:27px!important;height:27px!important;padding:4px!important}
 html:root body.mode-hex #board .hex-hint{display:none}
}
@media(orientation:landscape) and (max-height:500px){
 html:root body.mode-hex #board>.stage-bg{padding:6px 10px!important;gap:5px!important}
 html:root body.mode-hex #board .stage-header h2,html:root body.mode-hex #board .astra-progress>div:first-child{display:none!important}
 html:root body.mode-hex #board #scoreboard .team-panel{padding:5px 8px!important;gap:3px 8px!important}
 html:root body.mode-hex #scoreboard .team-name-tag{font-size:12px!important}
 html:root body.mode-hex #scoreboard .team-perks{gap:3px!important}
 html:root body.mode-hex #board .hex-legend{font-size:10px!important;margin-top:3px!important}
}

html:root body.mode-hex #astra-mode-title{color:#f0ebe1!important;text-shadow:none!important;-webkit-text-fill-color:#f0ebe1!important;background:none!important;font-family:Archivo,Arial,sans-serif!important}
html:root body.mode-hex #board .hex-pts{color:#fff5df!important;border-color:#a89976!important;box-shadow:none!important}
html:root body.mode-hex #scoreboard .solo-stats{grid-column:1/-1;margin:0!important;color:var(--faction)!important;font-size:12px!important}
html:root body.mode-hex #scoreboard .solo-stats span{color:inherit!important}
html:root body.mode-hex #scoreboard .team-score{display:grid!important;grid-template-columns:28px auto;grid-template-rows:1fr 1fr}
html:root body.mode-hex #scoreboard .score-value{grid-column:2;grid-row:1/3}
html:root body.mode-hex #scoreboard .score-btn:last-child{grid-column:1;grid-row:2}
html:root body.mode-hex #board .hex-hint{display:none}
@media(max-width:600px){html:root body.mode-hex #board .astra-progress{margin-left:auto!important}html:root body.mode-hex #board .stage-header{gap:6px!important}html:root body.mode-hex #board #kt-tv-toggle{font-size:11px!important;padding:8px!important}html:root body.mode-hex #scoreboard .solo-stats{grid-row:4}html:root body.mode-hex #scoreboard .team-score{justify-content:center;gap:4px 12px!important}}

/* Override the legacy phone positioning only inside Siege. */
html:root body.mode-hex #board .astra-progress{display:flex!important;align-items:center!important;position:static!important}
html:root body.mode-hex #board .astra-progress .stage-header__actions{display:flex!important;position:static!important}
html:root body.mode-hex #board .astra-refined-heading{display:block!important}
html:root body.mode-hex #board #scoreboard .team-perks{position:static!important;width:auto!important;min-width:0!important;transform:none!important;justify-content:flex-start!important;grid-column:1!important;grid-row:2!important}
html:root body.mode-hex #board #scoreboard .team-score{position:static!important;inset:auto!important;transform:none!important;display:grid!important;grid-template-columns:28px auto!important;grid-template-rows:32px 32px!important;grid-column:2!important;grid-row:1/3!important;width:auto!important;justify-content:end!important;align-self:center!important}
html:root body.mode-hex #board #scoreboard .score-value{position:static!important;grid-column:2!important;grid-row:1/3!important;align-self:center!important;transform:none!important;min-width:0!important}
html:root body.mode-hex #board #scoreboard .score-btn{position:static!important;grid-column:1!important;transform:none!important;margin:0!important}
html:root body.mode-hex #board #scoreboard .score-btn:first-child{grid-row:1!important}
html:root body.mode-hex #board #scoreboard .score-btn:last-child{grid-row:2!important}
html:root body.mode-hex #board #scoreboard .solo-stats{position:static!important;grid-row:3!important;grid-column:1/-1!important;transform:none!important}
html:root body.mode-hex #board #scoreboard .perk-pip{width:36px!important;height:36px!important;min-width:36px!important;min-height:36px!important;padding:6px!important;flex:0 0 36px!important}
@media(max-width:600px){
 html:root body.mode-hex #board #scoreboard .team-perks{grid-row:3!important;flex-wrap:wrap!important;gap:5px!important}
 html:root body.mode-hex #board #scoreboard .team-score{grid-column:1!important;grid-row:2!important;justify-content:start!important;width:100%!important}
 html:root body.mode-hex #board #scoreboard .solo-stats{grid-row:4!important}
 html:root body.mode-hex #board #scoreboard .perk-pip{width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;flex-basis:30px!important;padding:5px!important}
}
@media(orientation:landscape) and (max-height:500px){
 html:root body.mode-hex #board #scoreboard .perk-pip{width:27px!important;height:27px!important;min-width:27px!important;min-height:27px!important;flex-basis:27px!important;padding:4px!important}
 html:root body.mode-hex #board #scoreboard .team-score{grid-template-rows:24px 24px!important}
 html:root body.mode-hex #board #scoreboard .score-btn{height:24px!important;min-height:24px!important}
 html:root body.mode-hex #board #scoreboard .solo-stats{font-size:10px!important}
}

html:root body.mode-hex :is(#question,#answer) .astra-perk-name{display:none!important}
html:root body.mode-hex :is(#question,#answer) .stage-bg{min-height:100dvh!important;height:auto!important;padding:24px!important;display:flex!important;flex-direction:column!important;justify-content:flex-start!important;align-items:stretch!important;overflow:visible!important}
html:root body.mode-hex :is(#question,#answer) .qa-card{width:100%!important;max-width:1160px!important;margin:0 auto!important;box-sizing:border-box;transform:none!important}
html:root body.mode-hex :is(#question,#answer) .astra-question-context{width:100%;max-width:1160px;margin:0 auto 14px!important;flex-shrink:0}
html:root body.mode-hex :is(#question,#answer) .perk-pip{flex-shrink:0!important;min-height:40px!important}
html:root body.mode-hex :is(#question,#answer) .qa-content{min-height:210px!important}
html:root body.mode-hex #board #scoreboard .team-panel{opacity:1!important;filter:none!important}
@media(max-width:600px){html:root body.mode-hex :is(#question,#answer) .stage-bg{padding:14px!important}html:root body.mode-hex :is(#question,#answer) .qa-content{min-height:180px!important}html:root body.mode-hex :is(#question,#answer) .perk-pip{width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;padding:5px!important}}

html:root body.mode-hex :is(#question,#answer) .qa-stage{width:100%!important;max-width:1160px!important;margin:0 auto!important;position:relative!important;inset:auto!important;transform:none!important;translate:none!important;flex:none!important;min-width:0!important}

html:root body.mode-hex #board #scoreboard .score-btn{position:relative!important}
html:root body.mode-hex #board #scoreboard .score-btn::before,html:root body.mode-hex #board #scoreboard .score-btn::after{display:none!important}
