/* Fixed RTS console: resource strip, tactical map, then production on the right. */
:root{--sidebar-width:280px;--deck-height:0px}
#topbar{right:var(--sidebar-width);gap:14px}
#menu-button{width:43px;min-width:43px;height:39px;padding:0!important;position:relative;border:0!important;background:transparent!important;box-shadow:none!important}
#menu-button:before,#menu-button:after{display:none!important}.command-menu-art{display:block;position:absolute;inset:1px;background:url('assets/field-menu-v2.webp') center/contain no-repeat}.menu-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
#topbar .base-stat{margin-left:auto}#topbar .operation-clock{min-width:218px}#topbar .location{min-width:126px}#clock{min-width:45px}
#right-command{position:absolute;right:0;top:0;bottom:0;width:var(--sidebar-width);display:grid;grid-template-rows:64px 224px 44px minmax(0,1fr);background:#182019 url('assets/console-enamel-v2.webp') center/cover;border-left:2px solid #666950;z-index:11;min-height:0}
#right-resources{display:grid;grid-template-columns:minmax(0,1fr) 98px;gap:12px;padding:8px 12px;background:#121910a8;border-bottom:1px solid #6a6e51;min-width:0}
#right-resources .resource{display:grid;grid-template-columns:36px minmax(0,1fr);grid-template-rows:27px 16px;gap:0 7px;padding:0;margin:0;min-width:0;align-items:center}
#right-resources .resource-icon{grid-row:1/3;width:34px;height:38px;margin:0}#right-resources #resources{font-size:24px;line-height:27px;white-space:nowrap;color:#e9cb90}#right-resources #income{grid-column:2;font-size:11px;white-space:nowrap;color:#a0ad8e}
#right-resources .stat{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;gap:3px;padding:0;margin:0;min-width:0}#right-resources .stat>span{font-size:11px;color:#a2af95}#right-resources #population{font-size:19px;line-height:24px;white-space:nowrap;color:#d6dfc4}
#right-command>#minimap-panel{position:relative;display:flex;flex-direction:column;gap:0;height:100%;box-sizing:border-box;padding:8px 12px 5px!important;min-height:0;background:#10181077;border:0;border-bottom:1px solid #6e7157;overflow:hidden}
#minimap-panel .panel-title{height:22px;min-height:22px;display:flex;align-items:center;justify-content:space-between;margin:0;color:#c9d0b9;font-size:13px}#minimap-panel .panel-title small{font-size:11px;color:#9aa98b}
#minimap{width:254px;height:auto;aspect-ratio:480/290;touch-action:none;cursor:crosshair;max-width:100%;min-height:0;flex:none;border:1px solid #7b8069;box-shadow:inset 0 0 4px #000}
#minimap-panel .minimap-controls{height:24px;min-height:24px;gap:5px;margin-top:4px}#minimap-panel .minimap-controls button{height:22px;font-size:11px;padding:0 5px;min-width:24px}#minimap-panel .minimap-controls span{font-size:9px}#minimap-panel #save-status{height:11px;margin-top:1px;font-size:9px}
#field-tools{display:grid;grid-template-columns:1fr 1fr;gap:5px;padding:4px 10px;border-bottom:1px solid #5d674d;min-height:0}#field-tools button{position:relative;display:flex;align-items:center;justify-content:center;gap:9px;height:35px;min-height:0;padding:1px 8px!important;font-size:12px;--console-edge:4px}#field-tools button.active{color:#f2d28c;filter:brightness(1.25)}.facility-art{width:29px;height:29px;display:block;background:center/contain no-repeat}.repair-art{background-image:url('assets/field-repair-v2.webp')}.sell-art{background-image:url('assets/field-sell-v2.webp')}#hive-tools-status{grid-column:1/3;text-align:center;color:#b6aa8c;line-height:32px;font-size:12px}
#right-command>#production-sidebar{position:relative;inset:auto;width:100%;height:100%;min-height:0;box-sizing:border-box;border:0;padding-top:0;z-index:1;overflow:hidden}
#command-panel{right:var(--sidebar-width);height:var(--deck-height);grid-template-columns:400px minmax(0,1fr) 190px;padding:0 5px}
#command-panel>#selection-panel{padding:10px 12px}#selected-content{height:158px}.selection-description{max-width:245px;font-size:12px;line-height:1.7}.selection-info{gap:10px}.selection-info .portrait{width:104px;min-width:104px;height:108px}.selection-info .portrait .sprite-icon{width:86px;height:86px}
#orders-panel{padding:10px 14px!important}#mission{height:38px;min-height:38px;align-items:flex-start}#objective{font-size:12px;line-height:1.65}#terrain-readout{height:24px;min-height:24px}#supports{min-height:25px;height:25px;flex-wrap:wrap;gap:5px 12px;margin:0}.support-card{flex:1;min-width:110px}#command-tactics{display:flex;align-items:flex-end;gap:12px;margin-top:auto;min-height:61px}
#command-tactics #growth-toggle{height:56px;min-width:143px;padding:5px 12px;display:flex;align-items:center;justify-content:center;gap:9px;font-size:16px;--console-edge:5px}#growth-toggle:before{content:'';width:40px;height:40px;display:block;background:url('assets/command-icons.webp') 66.666% 100%/400% 400% no-repeat}body[data-pvp-faction=infected] #growth-toggle:before{background:url('assets/hive-evolution.webp') center/contain no-repeat}#growth-badge{font-size:15px;margin:0}
#command-grid-panel{padding:10px 5px!important;border-right:0!important}#command-grid-panel .panel-title{height:19px;min-height:19px;margin:0 0 6px;font-size:12px;color:#aeb89d}
#unit-orders{display:grid;grid-template-columns:repeat(3,54px);grid-template-rows:repeat(3,54px);gap:4px;height:170px;min-height:170px;width:170px;padding:0;margin:0;border:0;position:static}
.command-slot{position:relative;width:54px;height:54px;background:#0c140dbb;box-shadow:inset 0 0 0 1px #66704c30,inset 0 2px 5px #0007}
#unit-orders .command-slot>button{position:absolute;inset:0;width:54px;height:54px;min-height:0;display:block;padding:0!important;margin:0;border:3px solid transparent!important;border-image:url('assets/console-button-normal-v2.webp') 48 fill/3px stretch!important;background:transparent!important;box-shadow:none!important;overflow:hidden;opacity:1}
#unit-orders button[hidden]{display:none!important}#unit-orders button .order-art{display:block;position:absolute;inset:0;width:100%;height:100%;opacity:.92}#unit-orders button b{position:absolute;right:2px;top:1px;z-index:1;background:#0d130cc9;color:#e9d3a2;padding:0 2px;font:9px Consolas,monospace;border:0;margin:0}
#unit-orders button span:last-child{position:absolute;bottom:1px;left:1px;right:1px;font-size:9px!important;line-height:13px;text-align:center;color:#e8e5d1;text-shadow:0 1px 2px #000;background:#0e150ec9;white-space:normal}
#unit-orders button:disabled{filter:saturate(.25) brightness(.6)}#unit-orders #siege-button .order-art{background:url('assets/field-siege-v2.webp') center/cover}#unit-orders #siege-button.deployed .order-art{background-image:url('assets/field-mobile-v2.webp')}body[data-pvp-faction=infected] #unit-orders [data-order=unload] .order-art{background:url('assets/field-neural-v2.webp') center/cover}
#unit-orders #tripod-button .order-art{background:url('assets/portrait-machinegunner-tripod.webp') center/cover}
#unit-orders #tripod-button.deployed .order-art{background-image:url('assets/portrait-machinegunner-v2.webp')}
#workshop-panel{right:200px;left:10px;height:198px}#hive-guide{max-width:calc(100% - 40px)}#growth{z-index:25}#right-panel{right:calc(var(--sidebar-width) + 12px);top:55px}
#coop-hud{right:var(--sidebar-width)}#coop-objective{max-width:400px}body[data-pvp-faction] #hive-sidebar{grid-template-rows:minmax(0,1fr) 96px}.hive-unit{min-height:123px}.hive-unit .hive-icon{height:63px;width:85px}.hive-card b{font-size:12px}.hive-heading{height:27px;min-height:27px;font-size:13px}.hive-command-summary{gap:12px}.hive-command-summary>.hive-icon{width:76px;height:76px}.hive-command-summary b{font-size:13px}.hive-command-summary p{font-size:11px}.hive-command-summary small{font-size:9px}

/* Compact image slots: count and clockwise build progress live on the icon. */
@property --production-turn{syntax:'<angle>';inherits:false;initial-value:0deg}
#right-command>#production-sidebar{gap:5px;padding:4px 6px 5px}
#construction-grid,#production-grid{grid-auto-rows:90px;gap:5px;padding:2px 2px 4px 0}
#construction-grid .production-card,#production-grid .production-card{height:90px;min-height:90px;border-width:3px!important;--console-edge:3px}
#production-sidebar .production-card .sprite-icon{inset:0;width:100%;height:100%;background-size:cover!important;background-position:center!important;opacity:1}
#production-sidebar .production-card b{inset:auto 0 0;height:22px;line-height:22px;padding:0 2px;font-size:12px;z-index:3;background:linear-gradient(transparent,#071008ed);text-shadow:0 1px 3px #000}
#production-sidebar .production-card .cost-line{left:3px;right:auto;top:2px;bottom:auto;width:auto;font-size:10px;padding:1px 3px;background:#071008c9;z-index:3}
#production-sidebar .production-card .cost-line small{display:none!important}
#production-sidebar .production-card .lock{inset:auto 0 22px;max-height:27px;padding:2px;font-size:8px;line-height:1.3;z-index:3}
#production-sidebar .production-card.is-producing .lock,#production-sidebar .production-card.complete:not(.locked) .lock{display:none!important}
#production-sidebar .production-card.is-producing:after{content:none!important}
#production-sidebar .card-details{inset:0 0 22px;z-index:4;font-size:10px;padding:5px;background:#071008ec}
.production-sweep{position:absolute;inset:0;z-index:1;pointer-events:none;background:conic-gradient(from 0deg,transparent 0deg var(--production-turn),#000a var(--production-turn) 360deg);transition:--production-turn .2s linear}
.production-count{position:absolute;right:3px;top:2px;z-index:5;min-width:21px;height:21px;padding:0 3px;line-height:21px;text-align:center;font-size:15px;font-weight:700;color:#ffe2a2;background:#0c140de8;text-shadow:0 1px 2px #000;box-shadow:inset 0 0 0 1px #c5a35e88}
.production-sweep[hidden],.production-count[hidden]{display:none!important}
#production-sidebar .production-heading,#production-tabs{height:29px;min-height:29px;font-size:12px}
#production-tabs button{height:27px;min-height:27px;padding:0 5px;font-size:12px}
#queue-strip,#construction-status{display:none!important}

/* The battlefield extends behind a few floating controls, with no bottom deck. */
#battle-area{bottom:0}
#command-panel{left:12px;right:calc(var(--sidebar-width) + 12px);bottom:12px;height:auto;display:grid;grid-template-columns:300px minmax(180px,1fr) 150px;align-items:end;gap:12px;padding:0;pointer-events:none;background:none!important;background-image:none!important;border:0!important;box-shadow:none!important}
#command-panel>section{pointer-events:auto;background:none!important;background-image:none!important;border:0!important;box-shadow:none!important;padding:0!important}
#command-panel>#selection-panel{padding:8px 10px!important;background:#0c140cb8!important;border-radius:3px}
#selection-panel>.panel-title{height:19px;min-height:19px;margin:0 0 5px;font-size:13px}
#selected-content{height:auto;min-height:0;margin:0}.selection-body{display:block;min-height:0}
.selection-info{align-items:center;gap:9px}.selection-info .portrait{width:62px;min-width:62px;height:62px;padding:0;border:0!important;border-image:none!important;background:none!important;box-shadow:none!important}
.selection-info .portrait .sprite-icon{width:62px;height:62px}.selection-description{max-width:205px;padding:0;font-size:11px;line-height:1.5}.selection-description strong{font-size:14px}
.selection-icons{grid-template-columns:repeat(8,29px);grid-auto-rows:29px;gap:3px;height:auto;max-height:94px;overflow-y:auto}.selection-icons button{width:29px;height:29px}.selection-icons .sprite-icon{width:27px;height:27px}
#command-panel>#orders-panel{align-items:flex-start;gap:4px;padding:0!important}
#orders-panel #mission{height:auto;min-height:0;max-width:440px;padding:5px 8px;background:#0c140cb8;border-radius:3px;gap:7px}
#mission .eyebrow{font-size:10px;white-space:nowrap}#objective{font-size:11px;line-height:1.5}
#terrain-readout{height:auto;min-height:0;max-width:440px;padding:0 6px;font-size:10px;text-shadow:0 1px 3px #000}
#terrain-readout:empty{display:none}
#supports{display:flex;flex-wrap:wrap;gap:7px 12px;height:auto;min-height:0;margin:0;padding:4px 7px;background:#0c140cb0;border-radius:3px}
.support-card{display:grid;grid-template-columns:20px auto;align-items:center;gap:0 4px;min-width:0;flex:0 1 auto;padding:0;background:none;border:0}
.support-card .sprite-icon{position:static;width:20px;height:20px;grid-row:1/3}.support-card b{font-size:10px;line-height:13px}.support-card strong{position:static;grid-column:2;font-size:9px!important;line-height:12px}.support-card .bar{display:none}
#command-tactics{margin:0;min-height:0;gap:6px}#command-tactics #growth-toggle{height:39px;min-width:100px;padding:2px 9px;font-size:13px;gap:6px}#growth-toggle:before{width:27px;height:27px}
#command-grid-panel>.panel-title{display:none}#unit-orders{grid-template-columns:repeat(3,48px);grid-template-rows:repeat(3,48px);gap:3px;width:150px;height:150px;min-height:150px}.command-slot{width:48px;height:48px;background:#0c140c8a}
#unit-orders .command-slot>button{width:48px;height:48px}#unit-orders button span:last-child{font-size:8px!important;line-height:11px}
#command-panel>#workshop-panel{inset:auto 164px 0 0;height:198px;padding:8px 12px!important;background:#172018f5!important;pointer-events:auto}
#bottom-strip{display:none!important}

/* Range tracks must be explicit in Firefox as well as Chromium. */
.volume-control input[type=range]{appearance:none;-webkit-appearance:none;width:270px!important;height:28px;margin:0;padding:0;border:0!important;border-image:none!important;background:transparent!important;box-shadow:none!important;cursor:pointer;accent-color:#dfc18a}
.volume-control input[type=range]::-webkit-slider-runnable-track{height:8px;border:1px solid #9b9d7b;border-radius:4px;background:linear-gradient(90deg,#d7ba7b 0 var(--range-progress,60%),#3e4938 var(--range-progress,60%) 100%);box-shadow:inset 0 1px 2px #0008}
.volume-control input[type=range]::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:18px;height:18px;margin-top:-6px;border:2px solid #eed7aa;border-radius:50%;background:#ad9258;box-shadow:0 1px 4px #0009}
.volume-control input[type=range]::-moz-range-track{height:6px;border:1px solid #9b9d7b;border-radius:4px;background:#3e4938;box-shadow:inset 0 1px 2px #0008}
.volume-control input[type=range]::-moz-range-progress{height:6px;border-radius:4px;background:#d7ba7b}
.volume-control input[type=range]::-moz-range-thumb{width:15px;height:15px;border:2px solid #eed7aa;border-radius:50%;background:#ad9258;box-shadow:0 1px 4px #0009}
.volume-control input[type=range]:focus-visible{outline:1px solid #d7ba7b;outline-offset:3px}

/* Automatic air support stays in one fixed corner, independent of bottom tactics. */
@property --support-turn{syntax:'<angle>';inherits:false;initial-value:0deg}
#battle-area>#supports{position:absolute;left:12px;top:12px;display:flex;flex-wrap:nowrap;gap:6px;width:auto;height:48px;padding:0;margin:0;background:none;border:0;z-index:9;pointer-events:auto}
#supports .support-card{position:relative;display:block;width:48px;height:48px;min-width:48px;flex:none;padding:0;background:#10180edb;border:1px solid #8c92716b;border-radius:2px;box-shadow:0 2px 5px #0008}
#supports .support-card .sprite-icon{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:1}
#supports .support-card.locked .sprite-icon{filter:grayscale(1);opacity:.35}#supports .support-card.active{border-color:#b7d48b;box-shadow:0 0 7px #a8d78655}
#supports .support-sweep{position:absolute;inset:0;pointer-events:none;background:conic-gradient(from 0deg,transparent 0deg var(--support-turn),#000b var(--support-turn) 360deg);transition:--support-turn .2s linear}
#supports .support-seconds{position:absolute;right:2px;bottom:1px;min-width:18px;text-align:center;color:#f5deb1;background:#0d140cd9;font-size:13px;line-height:17px;text-shadow:0 1px 2px #000}
#supports .support-seconds:empty,#supports .support-sweep[hidden]{display:none!important}
#supports .support-tooltip{display:none;position:absolute;left:0;top:55px;white-space:nowrap;padding:6px 9px;background:#111b10f5;border:1px solid #818d66;color:#e1dcc0;font-size:12px;z-index:20;pointer-events:none}
#supports .support-card:hover .support-tooltip,#supports .support-card:focus-visible .support-tooltip{display:block}#supports .support-card:focus-visible{outline:1px solid #e2c887;outline-offset:2px}
#battle-area>#tutorial{top:76px}#coop-party{left:184px!important}

#supports .support-card,#supports .support-card.locked{display:block!important;border:1px solid #8c92716b!important;background:#10180edb!important;box-shadow:0 2px 5px #0008!important}
#supports .support-card .sprite-icon{display:block!important}#supports .support-card.active{border-color:#b7d48b!important;box-shadow:0 0 7px #a8d78655!important}
#production-origin{height:19px;min-height:19px;flex:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:2px 3px;font-size:10px;line-height:15px;color:#acb69c;background:#0c140c60}
#unit-orders [data-order=scatter] .order-art{background-position:66.666% 33.333%}#unit-orders [data-order=guard] .order-art{background-position:33.333% 100%}
.minimap-enemy-key{display:inline-block;width:5px;height:5px;margin-right:3px;border:1px solid #ffb1a0;background:#ef6b5d;box-shadow:0 0 2px #000}

/* Both production columns use the full height; category changes never shift slots. */
#production-tabs,#production-origin,#production-sidebar .production-heading{display:none!important}
#right-command>#production-sidebar{padding-top:2px}
#construction-grid,#production-grid{padding-top:0}
#command-panel>#workshop-panel{height:236px}
#workshop-queue{height:28px;display:flex;gap:4px;overflow-x:auto;overflow-y:hidden;margin-top:8px;scrollbar-width:thin}
#workshop-queue button{flex:none;height:25px;min-height:25px;padding:0 7px!important;font-size:10px;white-space:nowrap;--console-edge:3px}
#workshop-queue button span{color:#e2bc85;margin-left:5px}
.workshop-card strong em{font:11px Consolas;color:#d9b56f}
.workshop-pips i.reserved{background:#857046;opacity:.7}
.doctrine-development{height:440px;min-height:0;display:flex;flex-direction:column}
.doctrine-upgrades{height:100%;min-height:0;flex:1;overflow-y:auto;overflow-x:hidden;grid-template-rows:none;grid-auto-rows:158px;align-content:start;padding:3px 8px 5px 3px;scrollbar-gutter:stable}

@layer consoleSkin {
  #command-panel{background:none!important;background-image:none!important;box-shadow:none!important;border:0!important}
  #command-panel>section{background:none!important;background-image:none!important;box-shadow:none!important;border:0!important}
  #command-panel>#selection-panel{background:#0c140cb8!important}
  #command-panel>#workshop-panel{background:#172018f5!important}
}
