/* Podbój Świata · Hot-seat 7.0. Layout parity with multiplayer, local state untouched. */
body.in-game{--hs-sidebar-width:clamp(315px,27vw,395px);--hs-hud:50px}
body.in-game .game-top{display:grid!important;grid-template-columns:minmax(0,1fr) auto auto;gap:12px;align-items:center!important;position:absolute!important;top:0;left:0;right:0;height:var(--hs-hud)!important;min-height:0!important;padding:4px 14px!important;background:#0b2030f5!important;border-bottom:1px solid #36596e;z-index:15;pointer-events:none}
body.in-game .game-top .hud-current{border:0;padding:0;max-width:none;min-width:0;pointer-events:none;gap:8px}
body.in-game .game-top h2{font-family:Inter,system-ui,sans-serif!important;font-size:15px!important;color:#fff!important;margin:2px 0!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.in-game .hud-current-label{font-size:8px!important;color:#bbcfdb}
body.in-game .hud-status{display:none!important}
body.in-game .hs-phase-progress{display:flex;align-items:center;gap:4px;min-width:0;justify-content:center}
body.in-game .hs-phase-chip{font-size:10px;font-weight:800;color:#9cbbca;background:#20384a;border:1px solid #355267;padding:8px 10px;border-radius:7px;white-space:nowrap}
body.in-game .hs-phase-chip.is-active{color:#ffe1a9;border-color:#e8b978;background:#4a3c2d}
body.in-game .hs-phase-chip.is-done{color:#a6ddba;border-color:#41745d;background:#1b3b38}
body.in-game .hs-phase-progress.is-setup .hs-phase-chip{opacity:.55}
body.in-game .top-actions{display:flex!important;justify-self:end;flex-wrap:nowrap;align-items:center;pointer-events:auto}
body.in-game .top-actions>#toggleScore,body.in-game .top-actions>#toggleLog{display:none!important}
body.in-game .game-layout{position:absolute!important;inset:var(--hs-hud) 0 0!important;display:grid!important;grid-template-columns:minmax(0,1fr) var(--hs-sidebar-width)!important;gap:7px!important;align-items:stretch!important}
body.in-game .map-wrap{position:relative!important;inset:auto!important;width:100%!important;height:100%!important;min-height:0;border-radius:13px!important;overflow:hidden}
body.in-game #mapViewport{position:absolute!important;inset:0!important;top:0!important;height:100%!important;width:100%!important;}
body.in-game .map-tools{top:10px!important;right:10px!important;flex-direction:row!important}
body.in-game .map-tip{top:auto!important;bottom:8px;left:9px;display:block!important;font-size:10px}
body.in-game .sidebar.hs-sidebar{position:relative!important;top:auto!important;bottom:auto!important;right:auto!important;left:auto!important;width:100%!important;max-width:none!important;min-height:0;height:100%!important;display:flex!important;flex-direction:column!important;padding:0!important;gap:0!important;overflow:hidden;background:#102838;border:1px solid #38566a;border-radius:12px!important;pointer-events:auto}
body.in-game .hs-panel-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:3px;flex:0 0 auto;padding:6px;background:#0d2737;border-bottom:1px solid #34566a}
body.in-game .hs-tab{min-width:0;padding:11px 2px!important;background:transparent;color:#abc4d1;font-size:10px;font-weight:750;border:1px solid transparent;border-radius:8px;white-space:nowrap}
body.in-game .hs-tab.is-active{color:#f6c57d;background:#29475a;border-color:#456275}
body.in-game .sidebar.hs-sidebar>.panel{position:relative!important;flex:1 1 0!important;min-height:0!important;max-height:none!important;height:auto!important;width:100%!important;border:0!important;border-radius:0!important;background:#102838!important;box-shadow:none!important;overflow:hidden!important;padding:13px 12px!important;inset:auto!important;z-index:auto!important}
body.in-game .sidebar.hs-sidebar>.panel.hidden{display:none!important}
body.in-game .sidebar.hs-sidebar>#commandPanel:not(.hidden){display:flex!important;flex-direction:column!important;padding:0!important}
body.in-game #commandPanel .command-head{flex:0 0 auto;min-height:0;padding:12px 13px 8px}
body.in-game #commandPanel .command-content{display:flex;flex-direction:column;flex:1 1 0;min-height:0;overflow:hidden}
body.in-game #commandPanel .command-scroll{flex:1 1 0;min-height:0;overflow-y:auto;padding:9px 13px}
body.in-game #commandPanel .command-actions{flex:0 0 auto;padding:10px 13px 12px;background:#112b3c;border-top:1px solid #2b495d}
body.in-game .sidebar.hs-sidebar>#scorePanel:not(.hidden){display:flex!important;flex-direction:column;gap:8px;overflow-y:auto!important}
body.in-game #scorePanel .side-back,body.in-game #historyPanel .side-back{display:none!important}
body.in-game #scoreboard{display:flex;flex-direction:column;gap:8px}
body.in-game .hs-player-card{padding:12px;border:1px solid #365569;border-radius:11px;background:#193648}
body.in-game .hs-player-card.is-eliminated{opacity:.42}
body.in-game .hs-player-head{display:flex;align-items:center;gap:9px;margin-bottom:9px;font-size:13px;min-width:0}
body.in-game .hs-player-head strong{flex:1;min-width:0;overflow-wrap:anywhere;color:#eef5f8}
body.in-game .hs-player-head small{font-size:9px;color:#afc6d1}
body.in-game .hs-player-dot{width:11px;height:11px;flex:0 0 11px;background:var(--hs-player-color);border-radius:50%}
body.in-game .hs-player-metrics{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:#b9d0da}
body.in-game .sidebar.hs-sidebar>#historyPanel:not(.hidden){display:flex!important;flex-direction:column;padding:12px!important;min-height:0;max-height:none!important;height:auto!important}
body.in-game #historyPanel .journal-heading{flex:0 0 auto}
body.in-game #historyPanel .journal-events{flex:1 1 0;height:0;min-height:0;direction:ltr!important;overflow-y:auto;max-height:none!important}
body.in-game .sidebar.hs-sidebar>#hsRegionPanel:not(.hidden){display:flex!important;flex-direction:column!important;gap:10px}
body.in-game .hs-region-panel h3{font:600 20px Georgia,serif;margin:0;color:#eef6f9}
body.in-game .hs-regions-content{display:flex;flex-direction:column;gap:10px;overflow:auto;flex:1 1 auto;min-height:0}
body.in-game .hs-region-card{padding:12px;border:1px solid #34586e;border-radius:11px;background:#1a394b;display:grid;gap:10px}
body.in-game .hs-region-head{display:flex;justify-content:space-between;align-items:center;gap:7px;font-size:12px}
body.in-game .hs-region-head b{color:#eac080;font-size:11px;white-space:nowrap}
body.in-game .hs-region-track{height:7px;border-radius:9px;background:#314d60;overflow:hidden}
body.in-game .hs-region-track span{display:block;height:100%;border-radius:9px;background:var(--hs-region-color)}
body.in-game .hs-region-card>small{font-size:10px;color:#a9c3d1}
body.in-game .sidebar.hs-sidebar>.panel :where(.command-scroll,.journal-events,#scoreboard,.hs-regions-content){scrollbar-width:thin;scrollbar-color:#b99360 #18364b}
/* Compact battle dialog with persistent header and footer. */
#battleOverlay .battle-modal{display:flex!important;flex-direction:column!important;overflow:hidden!important;width:min(570px,100%)!important;max-height:min(90dvh,790px)!important;padding:0!important;background:#102b3c;border-color:#4b6c7f}
#battleOverlay .modal-heading{flex:0 0 auto;padding:16px 18px 11px;border-bottom:1px solid #36556a;background:#122f41}
#battleOverlay .modal-heading h2{font-size:clamp(17px,2vw,22px)!important;line-height:1.2}
#battleOverlay #modalCombat{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:14px 17px;scrollbar-width:thin;scrollbar-color:#b99360 #18364b}
#battleOverlay #modalCombat::-webkit-scrollbar{width:6px}
#battleOverlay #modalCombat::-webkit-scrollbar-thumb{border-radius:7px;background:#b99360}
#battleOverlay .hs-battle-footer:not(.hidden){display:flex;flex:0 0 auto;flex-direction:column;gap:7px;padding:11px 17px max(12px,env(safe-area-inset-bottom));border-top:1px solid #36556a;background:#102b3c}
#battleOverlay .hs-battle-footer button{min-height:42px;width:100%}
#battleOverlay .modal-combat .battle-match{margin:0 0 9px}
#battleOverlay .battle-side{min-width:0;overflow-wrap:anywhere}
#battleOverlay .hs-battle-slider{margin:10px 0;padding:12px;border:1px solid #37586d;background:#173648;border-radius:10px}
#battleOverlay .hs-battle-slider-head{display:flex;justify-content:space-between;gap:10px;align-items:center;font-size:13px;color:#d0e1e9}
#battleOverlay .hs-battle-slider-head output{color:#f0c178;font-size:20px;font-weight:800;font-variant-numeric:tabular-nums}
#battleOverlay .hs-battle-slider input[type=range]{display:block;width:100%;accent-color:#efba70;margin:9px 0 0}
#battleOverlay .hs-combat-hint{font-size:11px;line-height:1.5;color:#a9c2d0;margin:7px 0}
#battleOverlay .hs-combat-verdict{padding:11px;border-radius:10px;border:1px solid #716a4f;background:#3d443e;color:#edd8bb;font-size:12px;font-weight:800;margin-bottom:10px}
#battleOverlay .hs-combat-verdict.is-conquered{color:#c3ead1;background:#234b3d;border-color:#427c5f}
#battleOverlay .hs-combat-losses{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:10px}
#battleOverlay .hs-combat-losses>div{display:flex;flex-direction:column;gap:5px;border-radius:9px;border:1px solid #38566a;background:#19374a;padding:10px}
#battleOverlay .hs-combat-losses span{font-size:10px;color:#b8cdd8}
#battleOverlay .hs-combat-losses strong{font-size:23px;color:#f2b4a8}
#battleOverlay .hs-combat-round-tabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:6px}
#battleOverlay .hs-combat-round-tabs button{padding:8px 4px;min-height:37px;font-size:10px;background:#28485c;color:#d0e0e8;border:1px solid #47677a}
#battleOverlay .hs-combat-round-tabs button.is-active{color:#ffda9a;background:#4a4030;border-color:#e7b873}
/* Shared dice graphics from multiplayer, scoped to local battle. */
#battleOverlay .wd-dice-detail{border:1px solid #806647;background:#182f41;border-radius:12px;margin-top:11px;padding:11px;min-width:0}
#battleOverlay .wd-dice-detail.is-rolling{box-shadow:0 0 0 1px #d2a96930,0 0 17px #d2a96926}
#battleOverlay .wd-dice-detail-label{color:#e9bb78;font-size:10px;font-weight:850;letter-spacing:.1em}
#battleOverlay .wd-dice-board{display:flex;flex-direction:column;gap:8px;margin-top:10px}
#battleOverlay .wd-dice-group{display:flex;align-items:center;gap:9px}
#battleOverlay .wd-dice-group-head{min-width:73px;display:grid;gap:3px;color:#e6eff4;font-size:10px;font-weight:800}
#battleOverlay .wd-dice-group-head span:last-child{font-size:9px;color:#a5bdcb}
#battleOverlay .wd-dice-row{display:flex;gap:7px;align-items:center;min-width:0}
#battleOverlay .wd-die{width:44px;height:44px;flex:0 0 44px;position:relative;display:grid;place-items:center;border:2px solid transparent;border-radius:10px;background:#2c495a;box-shadow:0 3px 9px #0004}
#battleOverlay .wd-die-svg{width:100%;height:100%;display:block}
#battleOverlay .wd-die-attack .wd-die-square{fill:#f0e4d1}
#battleOverlay .wd-die-defense .wd-die-square{fill:#d7e7ed}
#battleOverlay .wd-die-pip{fill:#1b2e40}
#battleOverlay .wd-die.is-win{border-color:#76d6a3;box-shadow:0 0 9px #4abd8250}
#battleOverlay .wd-die.is-loss{border-color:#e8867d}
#battleOverlay .wd-die.is-unused{opacity:.55;border-color:#576e7d}
#battleOverlay .wd-die-unused{position:absolute;right:-5px;bottom:-6px;font-size:9px;color:#dceaf0;background:#203b4f;padding:0 3px;border-radius:3px}
#battleOverlay .wd-dice-matches{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
#battleOverlay .wd-dice-match{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:8px;border:1px solid #47866b;border-radius:9px;background:#1e453c;font-size:11px;min-width:0}
#battleOverlay .wd-dice-match.is-defense{background:#493538;border-color:#955c58}
#battleOverlay .wd-dice-match span{font-size:10px;color:#bdebd1;text-align:right}
#battleOverlay .wd-dice-match.is-defense span{color:#f2bfb7}
@keyframes hs-die-reveal{0%{opacity:0;transform:translateY(6px) scale(.78)}65%{opacity:1;transform:translateY(-2px) scale(1.05)}100%{opacity:1;transform:none}}
#battleOverlay .wd-die.is-revealing{animation:hs-die-reveal .24s ease-out var(--reveal-delay,0ms) both}
#battleOverlay .wd-dice-match.is-revealing{animation:hs-die-reveal .22s ease-out var(--reveal-delay,0ms) both}
/* Portrait: map-first, foldable bottom sheet. */
@media(orientation:portrait) and (max-width:820px){
 body.in-game{--hs-hud:55px;--hs-sidebar-width:100vw}
 body.in-game .game-top{grid-template-columns:minmax(0,1fr) auto;gap:4px;padding:5px 9px!important}
 body.in-game .hs-phase-progress{grid-column:auto;grid-row:auto;justify-content:flex-start;gap:3px;position:absolute!important;top:30px!important;left:21px!important;max-width:calc(100vw - 60px)}
 body.in-game .hs-phase-chip{font-size:8px;padding:2px 6px;background:transparent;border-color:transparent}
 body.in-game .hs-phase-chip.is-active{background:#5b4830;border-color:#cca36e}
 body.in-game .hs-phase-chip.is-done{background:#204437;border-color:#3f7255}
 body.in-game .top-actions{grid-column:2;grid-row:1;display:flex!important}
 body.in-game .game-top h2{font-size:14px!important}
 body.in-game .game-layout{display:block!important;top:var(--hs-hud)!important;bottom:0!important}
 body.in-game .map-wrap{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}
 body.in-game .map-tools{top:11px!important;right:6px!important}
 body.in-game .map-tip{bottom:calc(110px + env(safe-area-inset-bottom));font-size:9px}
 body.in-game .sidebar.hs-sidebar{position:absolute!important;inset:auto 0 0 0!important;width:100%!important;height:auto!important;max-height:min(84dvh,700px)!important;border-radius:15px 15px 0 0!important;box-shadow:0 -10px 26px #0008;border-bottom:0;overflow:hidden}
 body.in-game .hs-panel-tabs{order:0;gap:1px;padding:4px}
 body.in-game .hs-tab{font-size:9px;padding:9px 1px!important}
 body.in-game .sidebar.hs-sidebar>.panel{max-height:min(72dvh,630px)!important;height:min(72dvh,630px)!important;flex:0 1 auto!important}
 body.in-game .sidebar.hs-sidebar>#commandPanel:not(.hidden){height:auto!important;max-height:min(70dvh,620px)!important;min-height:80px!important}
 body.in-game #commandPanel .command-head{min-height:67px!important;padding:8px 12px!important}
 body.in-game #commandPanel.is-collapsed .command-head{min-height:74px!important}
 body.in-game #commandPanel .command-content{max-height:min(62dvh,560px)}
 body.in-game .sidebar.hs-sidebar>#historyPanel:not(.hidden),body.in-game .sidebar.hs-sidebar>#scorePanel:not(.hidden),body.in-game .sidebar.hs-sidebar>#hsRegionPanel:not(.hidden){height:min(72dvh,615px)!important;max-height:min(72dvh,615px)!important}
 body.in-game .sidebar.hs-sidebar>.panel .side-back{display:none!important}
 body.in-game .hs-player-card{padding:10px}
 #battleOverlay .battle-modal{max-height:92dvh!important;border-radius:17px 17px 0 0!important}
 #battleOverlay #modalCombat{padding:10px 12px;scrollbar-width:none}
 #battleOverlay #modalCombat::-webkit-scrollbar{display:none}
 #battleOverlay .hs-battle-footer:not(.hidden){padding:8px 12px max(10px,env(safe-area-inset-bottom))}
 #battleOverlay .wd-die{width:38px;height:38px;flex-basis:38px}
 #battleOverlay .wd-dice-group-head{min-width:60px}
 #battleOverlay .wd-dice-row{gap:5px}
 #battleOverlay .wd-dice-match{flex-direction:column;align-items:flex-start;padding:6px}
}
/* Landscape mobile: separate fixed sidebar, same four tabs. */
@media(orientation:landscape) and (max-height:560px) and (max-width:980px){
 body.in-game{--hs-sidebar-width:min(335px,40vw);--hs-hud:43px}
 body.in-game .game-top{width:calc(100vw - var(--hs-sidebar-width) - 7px)!important;right:auto!important;grid-template-columns:minmax(0,1fr) auto!important;padding:0 8px!important}
 body.in-game .hs-phase-progress{display:none}
 body.in-game .top-actions{display:none!important}
 body.in-game .game-layout{grid-template-columns:minmax(0,1fr) var(--hs-sidebar-width)!important}
 body.in-game .sidebar.hs-sidebar{height:calc(100dvh - var(--hs-hud))!important;position:relative!important}
 body.in-game .hs-tab{font-size:9px;padding:8px 1px!important}
 body.in-game .map-tip{display:none!important}
 #battleOverlay .battle-modal{max-height:calc(100dvh - 8px)!important}
 #battleOverlay .modal-heading{padding:6px 12px}
 #battleOverlay #modalCombat{padding:7px 12px}
 #battleOverlay .hs-battle-footer:not(.hidden){padding:6px 12px}
 #battleOverlay .hs-battle-footer button{min-height:34px;padding:7px}
 #battleOverlay .hs-battle-slider{padding:6px;margin:6px 0}
 #battleOverlay .wd-die{width:34px;height:34px;flex-basis:34px}
}
@media(prefers-reduced-motion:reduce){#battleOverlay .wd-die.is-revealing,#battleOverlay .wd-dice-match.is-revealing{animation:none!important;opacity:1}}

/* Local participant setup — one shared mode for humans and bots. */
.landing .setup-panel{background:#112b3d;border-color:#3c5d72}
.landing .hs-setup-lead{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;color:#b9ceda;font-size:12px;line-height:1.5;margin:-8px 0 17px}
.landing .hs-setup-lead button{min-height:37px;background:#24465a;border:1px solid #557184;color:#f1c384;white-space:nowrap}
.landing .players-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.landing .player-row{background:#18374a;border-color:#3e6178;border-radius:12px;padding:11px 9px;min-height:67px;box-shadow:inset 0 1px 0 #ffffff0a}
.landing .player-row:focus-within{border-color:#d6a866;box-shadow:0 0 0 1px #d6a86644}
.landing .player-row select{background:#253f51;color:#e5eff4}
@media(max-width:680px){.landing .players-form{grid-template-columns:1fr}.landing .hs-setup-lead{flex-direction:column;align-items:stretch}.landing .hs-setup-lead button{align-self:flex-start}}
/* Initial deployment precedes the three recurring turn phases. */
body.in-game .hs-phase-progress.is-setup{display:none!important}
