:root{--safe-left:14px;--safe-bottom:12px}

.village-screen:has(#buildingPanel:not([hidden])) .food-balance{visibility:hidden}
.village-screen:has(#worldMapPanel:not([hidden])) .food-balance{visibility:hidden}
[hidden]{display:none!important}
.resource-card:has([data-resource-count="steelBar"]){display:none!important}
.house-mode .building-feature-hero p{display:block;max-width:600px;font-size:13px;line-height:1.6}
.worker-allocation-slider{width:100%;grid-column:1/-1;accent-color:#98713b;cursor:ew-resize}.recruit-total{display:block;margin-top:5px;font-size:11px;color:#75603e}.age-node.locked{opacity:.7}
.village-vitals{display:grid!important;grid-template-columns:170px 105px!important;gap:6px!important;flex:0 0 285px!important}.village-vitals .vital-chip{min-width:0!important;width:auto!important}.village-vitals .vital-chip>div:first-child{display:flex;justify-content:space-between;gap:6px}#vitalPopulation{max-width:none!important;width:auto!important;overflow:visible!important;font-size:13px!important}.village-vitals .vital-chip span{white-space:nowrap}.village-vitals .vital-chip strong{flex-shrink:0}
.workforce-editor{display:grid!important;grid-template-columns:minmax(160px,180px) minmax(110px,1fr) 34px 34px!important;gap:8px!important;align-items:center!important}.workforce-editor>span{grid-column:1;grid-row:1;min-width:160px;line-height:1.5;white-space:nowrap}.workforce-editor>.worker-allocation-slider{grid-column:2;grid-row:1;min-width:110px}.workforce-editor>button:nth-of-type(1){grid-column:3;grid-row:1}.workforce-editor>button:nth-of-type(2){grid-column:4;grid-row:1}
#resourceToggleButton{left:var(--safe-left)!important}.player-corner{z-index:65}.resource-drawer{left:max(var(--safe-left),18px)!important}
.vital-stat--population,#vitalPopulation{white-space:nowrap;font-variant-numeric:tabular-nums}#vitalPopulation{font-size:13px}
.food-balance{position:absolute;bottom:calc(var(--safe-bottom) + 78px);left:var(--safe-left);z-index:61;padding:9px 15px;color:#f7e6b8;background:linear-gradient(#56452b,#2e291c);border:1px solid #b99b5d;border-radius:5px;font:600 13px Georgia,serif;box-shadow:0 2px 8px #0006}.food-balance.deficit{color:#ffc6a0;border-color:#b57643}
.ledger-stocks{display:flex;align-items:center;gap:16px;padding:8px 14px;background:#8c754a18;border:1px solid #856a3e40;border-radius:5px;margin:6px 0}.ledger-stocks span{display:inline-flex;align-items:center;gap:5px;font:600 13px Georgia,serif}.ledger-stocks img{width:25px;height:25px;object-fit:contain}
.ledger-name small{max-width:240px;white-space:normal}.ledger-table td{vertical-align:middle}.ledger-table .ledger-info{margin-left:6px}.ledger-table button[disabled]{opacity:.65}.ledger-requirement{display:block;margin-top:5px;max-width:200px;font:11px Georgia,serif;color:#76592e}.ledger-cost.insufficient{color:#9b3528}.ledger-next{color:#447149}
.production-workshop{padding:14px 0;border-top:1px solid #88704155;margin-top:14px}.production-workshop header{display:flex;align-items:center;justify-content:space-between;gap:12px}.production-workshop h3{margin:0 0 8px}.production-workshop header span{font-size:11px;color:#786446}.recipe-options{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 12px}.recipe-options button{display:grid;grid-template-columns:40px 1fr;align-items:center;text-align:left;gap:4px 9px;min-width:145px;max-width:220px;padding:7px 10px;border:1px solid #8a7243;background:#ede0bc;color:#4b3821;border-radius:5px}.recipe-options button[aria-pressed=true]{border-color:#aa7430;box-shadow:inset 0 0 0 2px #c69b4e66}.recipe-options img{width:40px;height:40px;object-fit:contain;grid-row:span 2}.recipe-options small{font-size:10px;line-height:1.2}.recipe-controls{display:grid;grid-template-columns:110px 1fr auto;align-items:center;gap:12px}.recipe-controls label{display:grid;gap:5px;font-size:12px}.recipe-controls input{width:90px;background:#efe5c7;border:1px solid #9c895c;border-radius:4px;padding:6px;color:#3e3020}.recipe-controls button,.production-workshop button{cursor:pointer}.recipe-controls button{padding:9px 14px;background:linear-gradient(#8b6840,#4b3523);color:#f4e2b6;border:1px solid #b69961;border-radius:4px}.recipe-controls button:disabled{opacity:.5;cursor:default}#productionReason{font-size:12px;min-height:16px;color:#795939}.production-job{display:flex;align-items:center;gap:10px;padding:10px;background:#8b77451a;border-radius:4px}.production-job>img{width:44px;height:44px;object-fit:contain}.production-job>div{display:grid;gap:5px;flex:1}.production-job progress{width:100%;height:6px;accent-color:#987239}.production-job small{color:#786446}.food-details{display:grid;grid-template-columns:150px 1fr;gap:22px}.food-details>img{width:150px;height:150px;object-fit:contain}.food-details dl{display:grid;grid-template-columns:1fr auto;gap:10px 18px}.food-details dd{margin:0;text-align:right;font-weight:bold}.food-type-list{display:flex;gap:12px;flex-wrap:wrap}.food-type-list span{display:flex;align-items:center;font-size:12px;gap:4px}.food-type-list img{width:28px;height:28px;object-fit:contain}
.building-marker[data-building=fishery],.building-marker[data-building=farm],.building-marker[data-building=livestock],.building-marker[data-building=smelter]{width:150px;height:145px}.combat-cinema .combat-unit{filter:drop-shadow(0 3px 2px #0006)}
button{transition:filter .14s ease,box-shadow .14s ease,transform .12s ease}button:not(:disabled):hover{filter:brightness(1.1)}button:not(:disabled):active{filter:brightness(.95)}button:focus-visible{outline:2px solid #ddbc6d;outline-offset:3px}
@media(prefers-reduced-motion:reduce){button{transition:none}}
.ages-tree{height:365px!important;min-height:365px!important;position:relative;overflow:visible!important}.age-columns{grid-template-columns:repeat(5,1fr)!important}.age-links{height:365px!important;width:100%;inset:0!important}.age-links path{opacity:.1}.age-links path.focused{opacity:.8;stroke-width:1.5}.age-node{width:150px!important;height:40px!important;display:grid!important;grid-template-columns:30px 1fr!important;align-items:center!important;gap:5px;transform:translate(-50%,-30%)!important;border-radius:4px!important;padding:4px 6px!important;text-align:left}.age-node img{width:29px!important;height:29px!important;object-fit:contain}.age-node span{font:11px/1.1 Georgia,serif;color:#dec990}.age-node i{right:-4px!important;bottom:-4px!important}.age-node.locked{opacity:.55}.age-node.selected span{color:#fff0c4}.age-detail{min-height:120px!important}.age-detail-copy p{font-size:12px;line-height:1.4}.age-detail-art{width:70px!important;height:90px!important}.age-detail-action small{font-size:11px;color:#bd8d63}.age-refining{display:none!important}.age-columns b{font-size:13px}
