:root{color-scheme:dark;--ink:#edf2e9;--panel:#142425;--line:#56776b;--accent:#d9bd7d}
#gameScreen #browserCity{background-image:url('assets/castle92/city-landscape92.png')}
#gameScreen #browserCity .browser-plot.empty{width:5%!important;min-width:0!important;background:#143a304d!important;border:1px dashed #f1ddb47a;border-radius:22%;aspect-ratio:1.7;transform:translate(-50%,-80%)}
#gameScreen #browserCity .browser-plot:not(.guard-plot60) span{font-size:clamp(8px,.72vw,12px);padding:2px 5px}
#gameScreen #browserCity .browser-plot.empty span{font-size:clamp(15px,1.4vw,23px);padding:0}
#gameScreen #browserCity .guard-plot60.vacant span{background:#143a305c;border:1px dashed #eadbb58a;padding:3px 8px;font-size:clamp(9px,.8vw,13px)}
#gameScreen #browserCity .browser-plot:hover,#gameScreen #browserCity .browser-plot:focus-visible{z-index:20}
#gameScreen #browserCity .browser-plot img{height:calc(var(--city-height,600px)*.12);aspect-ratio:auto}
#gameScreen #browserCity .browser-plot:first-child[data-construction-building="townhall"] img{height:calc(var(--city-height,600px)*.17)}
#gameScreen #browserCity .guard-plot60 img{height:calc(var(--city-height,600px)*.06)}
#gameScreen #browserCity .browser-plot[data-construction-building="wall"] img{height:calc(var(--city-height,600px)*.075)}
#gameScreen #browserCity .browser-queue{top:2%;font-size:12px}
.browser-dialog>article{min-width:0;max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
.browser-dialog>article>header{position:sticky;top:0;z-index:4;background:var(--panel);padding-bottom:8px}
.browser-dialog .browser-dialog-body{min-height:0;overflow-wrap:anywhere}
body button:disabled{cursor:not-allowed}
*{box-sizing:border-box}body{margin:0;background:#102124;color:var(--ink);font-family:system-ui,sans-serif}button{cursor:pointer;min-height:36px;border-radius:9px;border:1px solid var(--line);background:#203737;color:var(--ink);padding:8px 14px}button:hover{background:#33534b}button:focus-visible,input:focus-visible{outline:3px solid #e9cf87;outline-offset:3px}button:disabled{opacity:.5;cursor:wait}
#loginScreen{min-height:100dvh;background:linear-gradient(90deg,#07181be8,#10212430),url('assets/modern55/city.png') center/cover!important}#loginPanel{background:#122427e8!important;border:1px solid #789284!important;border-radius:20px!important;box-shadow:0 24px 90px #0008!important;max-width:420px;width:90%;padding:32px!important}#loginPanel h1{font-family:Georgia,serif;color:#efdba8!important;letter-spacing:3px}#loginPanel input{min-height:44px}body.auth-screen-active .modal,body.auth-screen-active .world-modal{display:none!important}
#gameScreen.layout{height:100dvh;min-height:0;flex-direction:column;overflow:hidden}.top-hud{height:auto!important;min-height:58px!important;padding:6px 14px!important;gap:12px;background:#142425f5!important;border-bottom:1px solid var(--line)!important;flex-shrink:0}.game-logo{font:18px Georgia,serif!important;color:var(--accent)!important}.resource-bar{gap:8px!important;flex:1;justify-content:center}.resource-item{background:#213334!important;border:1px solid #456258!important;border-radius:8px!important;min-width:110px!important;padding:5px 10px!important;font-size:14px!important}.resource-item img{width:24px!important;height:24px!important}.top-hud-actions{gap:4px!important}.top-hud-actions button{font-size:12px!important;padding:5px 8px!important}.city-panel{flex:1!important;min-height:0!important;padding:0!important;overflow:auto!important;display:flex!important;align-items:center;justify-content:center;background:radial-gradient(ellipse,#466854,#102124)}#city-map{display:none!important}#browserCity{position:relative;width:min(100%,calc((100dvh - 120px)*1.7778));aspect-ratio:1672/941;flex-shrink:0;background:url('assets/modern55/city.png') center/100% 100%;box-shadow:0 0 70px #0007}.browser-plot{position:absolute;transform:translate(-50%,-100%);border:0;background:transparent!important;padding:0;min-height:0;display:flex;flex-direction:column;align-items:center;overflow:visible}.browser-plot img{width:100%;aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 6px 5px #0007)}.browser-plot:hover img{filter:drop-shadow(0 0 7px #ffe5a6)}.browser-plot span{white-space:nowrap;font-size:clamp(9px,1vw,13px);padding:3px 7px;background:#102124dc;border:1px solid #789284;border-radius:7px;color:#fff}.browser-plot.empty{width:7%!important;aspect-ratio:1;background:#234537a8!important;border:1px dashed #eedca3;border-radius:50%;justify-content:center}.browser-plot.empty span{font-size:20px;background:transparent;border:0}.bottom-hud{height:auto!important;min-height:52px!important;padding:5px 12px!important;background:#142425!important;border-top:1px solid var(--line)!important;display:flex!important;justify-content:space-between;gap:10px;flex-shrink:0}.hud-actions{gap:6px!important}.hud-actions button{font-size:13px!important;padding:7px 13px!important}.troops-bar{gap:10px!important;font-size:12px!important}.modal{background:#081719b8!important;backdrop-filter:blur(5px)}.modal-content,.building-modal-content,.production-modal-content,.army-modal-content{background:#142425!important;border:1px solid #789284!important;border-radius:16px!important;max-height:85dvh;overflow:auto}.browser-dialog{position:fixed;inset:0;z-index:20000;background:#061417c9;display:grid;place-items:center;padding:16px;backdrop-filter:blur(6px)}.browser-dialog article{width:min(900px,100%);max-height:90dvh;overflow:auto;background:#142425;border:1px solid #789284;border-radius:18px;padding:22px}.browser-dialog header{display:flex;justify-content:space-between;align-items:center;gap:12px}.browser-catalog{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:10px}.browser-catalog button{display:flex;flex-direction:column;align-items:center}.browser-catalog img{width:95px;height:85px;object-fit:contain}.browser-world-grid{display:grid;grid-template-columns:repeat(6,minmax(90px,1fr));gap:8px}.browser-world-grid button{position:relative;min-height:115px;background-size:cover;background-position:center;display:flex;flex-direction:column;align-items:center;justify-content:end;text-shadow:0 2px 4px #000}.browser-world-grid img{width:75px;height:75px;object-fit:contain}.browser-world-grid span{background:#102124d9;padding:3px 6px;border-radius:5px}.browser-world-scroll{overflow:auto;max-height:64dvh}.browser-region-grid{display:grid;grid-template-columns:repeat(10,minmax(65px,1fr));gap:5px;min-width:700px}.browser-region-grid button{min-height:70px;background-size:cover;text-shadow:0 1px 4px #000}.browser-network{position:fixed;top:62px;left:50%;transform:translateX(-50%);z-index:25000;background:#6b4022;border-radius:9px;padding:10px;max-width:90vw}#eorDebugButton,#eorDebugPanel{display:none!important}
@media(max-width:1000px){.top-hud-actions{display:none!important}.game-logo{display:none!important}.troops-bar{display:none!important}.resource-item{min-width:0!important;flex:1;font-size:12px!important;padding:4px!important}.resource-bar{width:100%}.bottom-hud{overflow-x:auto}.hud-actions{flex-wrap:nowrap!important}.hud-actions button{white-space:nowrap;font-size:12px!important}.top-hud{min-height:45px!important}.browser-world-grid{min-width:620px}#browserCity{width:min(100%,calc((100dvh - 105px)*1.7778))}.browser-dialog article{padding:14px}.logout-button{font-size:11px!important}}
.top-hud-actions{display:none!important}.resource-bar{overflow:visible!important;min-width:0}.resource-item{flex:1;max-width:220px}.hud-actions button img{width:20px!important;height:20px!important}.hud-actions button{display:flex!important;align-items:center;gap:5px}.hud-actions{align-items:center}.troops-bar{display:none!important}.bottom-hud{justify-content:center!important}.city-panel{overflow:hidden!important}#browserCity{width:min(100%,calc((100dvh - 145px)*1.7778))}#buildingModal,.build-site-modal-content{background:#142425!important;border:1px solid #789284!important;border-radius:16px!important}.browser-queue{position:absolute;top:12px;left:50%;transform:translateX(-50%);background:#102124dd;border:1px solid #789284;border-radius:9px;padding:8px 15px;pointer-events:auto;cursor:pointer;z-index:20;color:inherit;font-size:13px}
.browser-region-grid{grid-template-columns:repeat(50,70px);width:max-content;min-width:0}.browser-world-grid{grid-auto-rows:clamp(80px,calc((100dvh - 220px)/5),100px)}.browser-world-grid button{min-height:0;padding:4px;overflow:hidden;font-size:11px}.browser-world-grid img{width:45px;height:45px;flex-shrink:0}.browser-world-grid span{max-width:100%;line-height:13px}.browser-world-scroll{overscroll-behavior:contain}
.slot-mission-content,.send-mission-content{background:#142425!important;border:1px solid #789284!important;border-radius:16px!important}.resource-bar .resource-item{background:#213334!important}.global-loading-box{background:#142425!important;border-color:#789284!important}.global-loading-title{color:#efdba8!important}
.browser-map-tools{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}.browser-map-tools input{min-height:38px;border:1px solid #789284;border-radius:8px;background:#213334;color:#fff;padding:7px;width:240px}@media(max-width:600px){.browser-plot{min-width:44px}.browser-plot.empty{min-width:36px;min-height:36px}.resource-item{max-width:none}.top-hud{gap:4px!important;padding:5px!important}.logout-button{padding:5px!important;min-height:34px}.bottom-hud{justify-content:start!important}.hud-actions{min-width:max-content}}
#gameScreen{padding:0!important;margin:0!important;width:100%!important;max-width:none!important}.top-hud{position:static!important;display:flex!important;flex-wrap:nowrap!important;width:100%!important;inset:auto!important}.bottom-hud{position:static!important;inset:auto!important;width:100%!important;margin:0!important}#storageWarning{display:none!important}.game-logo{max-width:none!important;flex-shrink:0;white-space:nowrap}.resource-bar{max-width:none!important;width:auto!important}.browser-world-grid{grid-auto-rows:clamp(64px,calc((64dvh - 32px)/5),100px)}
.logout-button{width:auto!important;flex:0 0 auto!important;align-self:center!important}.resource-bar{flex-wrap:nowrap!important;flex:1 1 auto!important;align-items:center!important}.top-hud{max-height:none!important;overflow:visible!important;align-items:center!important}.resource-item{white-space:nowrap}
#betaPolishStatus{display:none!important}
.slot-mission-window{inset:0!important;padding:12px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
.slot-mission-window>.send-mission-content,.slot-mission-window>.slot-mission-content{position:relative!important;inset:auto!important;transform:none!important;width:min(700px,100%)!important;max-width:100%!important;max-height:calc(100dvh - 24px)!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable}
.slot-mission-window .slot-mission-header{position:sticky;top:-18px;z-index:10;margin-top:-18px;padding-top:18px;padding-bottom:10px;background:#142425;border-bottom:1px solid #56776b;display:flex;justify-content:space-between;align-items:center;gap:12px}
.slot-mission-window .slot-mission-header button{flex-shrink:0;min-height:40px}
.city-panel{align-items:center!important;overflow:hidden!important}#browserCity{max-width:100%;min-height:0;aspect-ratio:auto;background-size:100% 100%}#browserCity .browser-plot{max-width:calc(var(--city-height,600px)*.28)}
.browser-map-dialog{padding:0;place-items:stretch}.browser-map-dialog>article{width:100%;height:100dvh;max-height:100dvh;max-width:none;border:0;border-radius:0;padding:12px 18px;display:flex;flex-direction:column;overflow:hidden}.browser-map-dialog header{flex-shrink:0}.browser-map-dialog header h2{margin:6px 0 12px;font-size:22px}.browser-map-dialog header button{min-width:44px;min-height:44px}.browser-map-dialog .browser-dialog-body{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px}.browser-map-dialog .browser-dialog-body>button{align-self:flex-start;flex-shrink:0}.browser-map-dialog .browser-world-scroll{flex:1;min-height:0;max-height:none}.browser-map-dialog .browser-map-tools{flex-shrink:0;margin:0}.browser-map-dialog .browser-world-grid{height:100%;min-height:390px;grid-template-rows:repeat(5,minmax(70px,1fr));grid-auto-rows:auto}.browser-map-dialog .browser-world-grid img{width:clamp(45px,6vw,90px);height:clamp(45px,6vw,90px)}.browser-map-dialog .browser-world-grid button{font-size:13px}.browser-map-dialog .browser-world-grid span{line-height:16px}
@media(max-width:600px){.browser-map-dialog>article{padding:8px}.browser-map-dialog header h2{font-size:17px}}
@media(max-width:600px) and (orientation:portrait){.city-panel{align-items:center!important}#browserCity{width:100%;transform:none}.resource-item{font-size:10px!important}.resource-item img{width:18px!important;height:18px!important}.browser-catalog{grid-template-columns:repeat(2,1fr)}}

/* The browser HUD is a full-width flex row, not the old fixed centred overlay.
   Reset the legacy translate at every viewport, including external monitors. */
.bottom-hud{transform:none!important;translate:none!important;max-width:none!important;min-width:0!important;align-self:stretch!important;flex-wrap:nowrap!important}
.bottom-hud .hud-actions,.bottom-hud .live-army59{min-width:0!important;max-width:100%!important}
.building-catalog73 button{gap:6px;justify-content:flex-start}
.building-catalog73 button.building-locked73{opacity:1;cursor:not-allowed;background:#1b292a;border-color:#68706b}
.building-catalog73 .building-locked73 img{opacity:.65;filter:grayscale(.45)}
.building-availability73{font-size:12px;color:#b9d9a1}.building-locked73 .building-availability73{color:#efd49c}
.building-lock-reason73{font-size:12px;line-height:1.4;color:#eadbc0;white-space:normal;text-align:center}
.forge-unit-art77{display:block;width:78px;height:85px;object-fit:contain;margin:0 auto 10px}
.browser-map-dialog,.browser-map-dialog>article,.browser-map-dialog .browser-dialog-body{min-width:0;max-width:100%;overflow-x:hidden}
.browser-map-dialog .browser-world-scroll{min-width:0;width:100%;max-width:100%;scroll-behavior:auto;overflow-anchor:none}
@media(max-width:1000px){.bottom-hud{align-items:stretch!important;overflow-x:hidden}.bottom-hud .hud-actions,.bottom-hud .live-army59{width:100%!important;flex-shrink:1!important;justify-content:flex-start!important;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain}}
