/* The world is the game surface; management panels float above it. */
[hidden]{display:none!important}html,body{width:100%;height:100%;overflow:hidden}body{background:#d6b987}button:focus-visible,input:focus-visible,canvas:focus-visible{outline:3px solid #ecc479;outline-offset:3px}.world-main{position:fixed;inset:0;padding:0;max-width:none;outline:none}#world-host{position:absolute;inset:0;overflow:hidden}#world-canvas{display:block;width:100%;height:100%;touch-action:none;cursor:grab;outline-offset:-5px}#world-canvas:active{cursor:grabbing}.world-loading{position:absolute;inset:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px;background:#ddc596;color:#594831}.world-loading>span{font:80px Georgia;color:#956f3a}.world-loading strong{font:600 32px var(--serif)}.world-loading small{font-size:13px}.world-error{position:absolute;inset:25% 20%;z-index:40;display:grid;align-content:center;justify-items:center;text-align:center;gap:18px;background:#faf4e8f2;border:1px solid #baa17c;border-radius:16px;padding:25px}.world-error strong{font:600 28px var(--serif)}
.topbar{position:fixed;z-index:12;inset:16px 22px auto;height:54px;padding:0 15px;background:#26332be8;color:#f6edda;border:1px solid #f3dfb93b;border-radius:11px;box-shadow:0 6px 24px #493a2922;gap:24px}.brand{min-width:0;gap:9px}.brand-mark{font-size:35px;color:#e9c67e}.brand strong{font-size:20px;letter-spacing:.15em}.brand small{font-size:8px;color:#d4b87d;letter-spacing:.2em}.dynasty-label{border-color:#ffffff20;padding-left:20px;font-size:12px;gap:2px}.dynasty-label .eyebrow{color:#d2b783;font-size:8px}.header-actions{gap:6px}.header-actions .icon-button{color:#e8d9bd}.header-actions .icon-button:hover{background:#ffffff15}.save-indicator{color:#cbd1b9;font-size:10px}.save-indicator::before{background:#a0c786}.resource-bar{position:fixed;top:82px;left:50%;transform:translateX(-50%);z-index:11;display:flex;gap:0;padding:10px 7px;width:max-content;max-width:calc(100% - 44px);border:1px solid #fff1cc65;border-radius:10px;background:#fcf4e5ed;box-shadow:0 5px 20px #553c2620}.resource-item{padding:0 12px;gap:8px;min-width:105px;border-color:#ccb48c60}.resource-icon{width:28px;height:30px;background:transparent!important;border-radius:0;color:#987442}.resource-icon .icon{width:23px;height:23px}.resource-text small{font-size:9px;letter-spacing:.02em;margin-bottom:1px;color:#7d6e58}.resource-number{font-size:15px;line-height:18px}.resource-rate{display:block;font-size:9px;margin:0;line-height:11px}.resource-item:last-child{min-width:94px}
.world-monument{position:absolute;top:155px;left:26px;width:230px;color:#4b412f;padding:16px 18px;background:#fff2daba;border:1px solid #ffffdf80;border-radius:11px;box-shadow:0 4px 18px #543f2210;pointer-events:none}.world-monument .eyebrow{color:#8b7250;font-size:9px;letter-spacing:.2em}.world-monument h1{font:600 37px/1.05 var(--serif);margin:5px 0 13px}.monument-progress-row{display:flex;justify-content:space-between;font-size:10px;gap:12px}.monument-progress-row strong{color:#81632f;font-variant-numeric:tabular-nums}.world-monument .progress-track{height:5px;margin:6px 0 8px;background:#bcac8c55}.world-monument .progress-fill{background:#ab823e}.world-monument>small{font-size:9px;color:#7d6a4e}.world-mission{position:absolute;right:26px;top:155px;width:225px;padding:14px 16px;border-radius:11px;background:#26332be8;color:#f5e8cd;border:1px solid #f3dfb940;box-shadow:0 6px 24px #493a291c}.world-mission .eyebrow{font-size:8px;color:#d6b775;letter-spacing:.16em}.world-mission>button:first-of-type{background:none;text-align:left;display:flex;width:100%;justify-content:space-between;gap:12px;color:#faf0da;font:600 19px var(--serif);padding:7px 0}.world-mission p{font-size:10px;color:#c5c9ae;line-height:1.5}.world-mission .small{margin-top:10px;font-size:11px;padding:7px 10px}
.world-navigation{position:absolute;left:26px;top:340px;border-radius:10px;padding:6px;background:#26332bec;border:1px solid #f3dfb936;z-index:3}.world-navigation nav{display:grid;gap:2px}.world-navigation .nav-item{width:42px;height:41px;padding:10px;margin:0;justify-content:center;position:relative;color:#dbd5bd;border-radius:6px}.world-navigation .nav-item>span:not(:first-child){position:absolute;left:52px;top:7px;background:#26332b;color:#f5e9cd;padding:8px 12px;border-radius:6px;white-space:nowrap;font-size:11px;opacity:0;pointer-events:none;box-shadow:0 4px 14px #0002}.world-navigation .nav-item:hover,.world-navigation .nav-item:focus-visible,.world-navigation .nav-item.active{background:#d8b370;color:#293129}.world-navigation .nav-item:hover>span,.world-navigation .nav-item:focus-visible>span{opacity:1}.world-navigation .nav-item .nav-badge{display:none}.world-navigation .nav-item .icon{width:21px;height:21px}.world-status{position:absolute;left:26px;bottom:108px;width:200px;padding:12px 14px;border-radius:9px;background:#26332bcf;color:#e4dfc7;border:1px solid #f3dfb92b;pointer-events:none}.world-status .kingdom-status{padding:0}.world-status .status-title{font-size:10px}.world-status .status-title strong{font-size:11px}.world-status .thin-progress{margin-top:6px;height:3px}.world-status .kingdom-status p{display:none}.world-status .cycle-card{padding:9px 0 0;gap:8px}.world-status .cycle-card strong{font-size:10px}.world-status .cycle-card small{font-size:8px;color:#b7c0a7}
.world-camera{position:absolute;right:26px;bottom:104px;display:flex;gap:2px;border-radius:9px;background:#26332bdf;color:#f0e3c8;border:1px solid #f3dfb935;padding:5px;z-index:4}.world-camera .icon-button{font-size:24px;width:35px;height:35px}.world-camera .icon-button:hover{background:#ffffff18}.world-controls-hint{position:absolute;bottom:25px;left:26px;font-size:9px;color:#64573f;text-shadow:0 1px #fff9}.world-controls-hint span{padding:0 5px}.world-actions{position:absolute;left:50%;bottom:26px;transform:translateX(-50%);display:flex;gap:6px;padding:7px;border-radius:11px;background:#26332bf2;border:1px solid #e0bc7d75;box-shadow:0 7px 24px #372c2850;z-index:9;white-space:nowrap}.world-actions .button{display:flex;align-items:center;gap:8px;font-size:12px;border-radius:7px;height:43px;padding:0 15px;border:1px solid #ffffff20}.world-actions .button .icon{width:18px;height:18px}.world-actions .build-button{background:#dbb779;color:#2f352c;font-weight:700;border-color:#e8c788}.world-actions .quarry-action{background:#405648;color:#f3e8cd}.world-actions .quarry-action:hover{background:#4b6554}.world-actions .quarry-action small{font-size:10px;color:#dbca91}.world-actions .secondary{background:#ffffff08;color:#e9ddc2}.world-actions .secondary:hover{background:#ffffff18}.world-labels{position:absolute;inset:0;pointer-events:none;overflow:hidden}.world-label{position:absolute;top:0;left:0;pointer-events:auto;display:grid;gap:2px;text-align:center;background:#fcf3dfe8;color:#51472f;border:1px solid #ffffddc9;border-radius:6px;padding:6px 12px;box-shadow:0 3px 10px #47352430;white-space:nowrap;min-width:105px}.world-label:after{content:'';position:absolute;top:100%;left:calc(50% - 4px);border:4px solid transparent;border-top-color:#fcf3dfe8}.world-label strong{font-size:10px}.world-label small{font-size:8px;color:#91713f}.world-label:hover,.world-label.selected{background:#ffdf9b;border-color:#aa8244}.world-labels .world-label[hidden]{display:none}
.management-panel{position:absolute;right:24px;top:146px;bottom:102px;width:min(485px,calc(100% - 48px));overflow:auto;overscroll-behavior:contain;padding:25px 22px 20px;background:#f8f3e9f7;border:1px solid #fff3dd;border-radius:13px;box-shadow:0 12px 40px #302b2450;z-index:15;scrollbar-width:thin;scrollbar-color:#bea987 transparent}.management-panel .page-heading{display:block;margin-bottom:20px;padding-right:15px}.management-panel .page-heading h1{font-size:32px}.management-panel .page-heading p{font-size:12px;line-height:1.5}.management-panel .page-heading .eyebrow{font-size:8px}.management-panel .heading-right{margin-top:10px}.panel-close{position:sticky;float:right;top:0;margin:-13px -10px 0 0;z-index:2;background:#eee4d4}.management-panel .content-grid,.management-panel .content-grid.two{grid-template-columns:minmax(0,1fr)}.management-panel .card{padding:17px;border-radius:8px;margin-bottom:10px}.management-panel .card h2{font-size:24px}.management-panel .section-intro{flex-wrap:wrap;gap:8px;margin:20px 0 12px}.management-panel .section-intro h2{font-size:26px}.management-panel .section-intro p{font-size:11px}.management-panel .stat-strip{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.management-panel .campaign-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.management-panel .campaign-card{padding:12px!important}.management-panel .campaign-card h3{font-size:20px}.management-panel .campaign-card p{font-size:10px}.management-panel .pill{font-size:9px}.management-panel .trade-row{gap:10px;flex-wrap:wrap}.management-panel .button{font-size:12px}.management-panel .info-card p{font-size:12px}.management-panel .notice{font-size:12px}.management-panel .job-row{gap:8px}.management-panel .job-copy{min-width:0}.management-panel .job-copy p{font-size:11px}.management-panel .population-stats{gap:8px}.management-panel .completion-panel{flex-wrap:wrap;padding:15px;background:#eee4ca;border-radius:8px;margin-bottom:16px}.management-panel .objective-card{margin-bottom:15px}.management-panel .info-icon{margin-bottom:12px}.management-panel .progress-track{margin:12px 0}.management-panel .construction-numbers{font-size:11px}.management-panel .cosmetic-selector{flex-wrap:wrap}
.build-catalog{position:absolute;left:50%;bottom:100px;transform:translateX(-50%);width:min(900px,calc(100% - 48px));max-height:52vh;overflow:auto;background:#f8f1e4f8;border:1px solid #fff2d2;border-radius:13px;padding:18px;z-index:18;box-shadow:0 14px 50px #302b2450}.catalog-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.catalog-heading .eyebrow{font-size:8px}.catalog-heading h2{font:600 27px var(--serif);margin-top:3px}#building-list{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.building-option{display:flex;flex-direction:column;text-align:left;gap:6px;padding:12px;background:#fffaf0;border:1px solid #d5c5a8;border-radius:8px;min-width:0}.building-option:hover,.building-option:focus-visible{border-color:#ad8345;background:#f7e8c8}.building-option>.icon{width:29px;height:29px;color:#a67e3d;margin-bottom:3px}.building-option strong{font-size:12px}.building-option .building-effect{font-size:9px;color:#758056;line-height:1.4;min-height:26px}.building-option small{font-size:9px;color:#8b7150;line-height:1.5}.building-option .building-size{font-size:8px;color:#9b9381}.building-option.unaffordable small{color:#ae6250}.placement-panel{position:absolute;left:50%;bottom:102px;transform:translateX(-50%);width:365px;max-width:calc(100% - 32px);background:#f8f1e4fa;border:1px solid #ffedc7;box-shadow:0 10px 35px #302b2440;border-radius:12px;padding:16px;z-index:17}.placement-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.placement-title strong{font:600 25px var(--serif)}.placement-title span{font-size:10px;color:#8a704c}.placement-panel p{font-size:11px;margin:7px 0 12px;color:#477558;line-height:1.4}.placement-panel p.invalid{color:#ac503e}.placement-coordinates{display:flex;align-items:end;gap:8px;margin-bottom:12px}.placement-coordinates label{font-size:9px;color:#85745c;display:grid;gap:4px;flex:1;min-width:0}.placement-coordinates input{width:100%;height:35px;border:1px solid #cfbea0;border-radius:5px;background:#fff9ed;color:#453d30;padding:4px 7px}.placement-coordinates .button{font-size:11px;height:35px;padding:0 12px}.placement-actions{display:flex;gap:8px}.placement-actions .button{flex:1;font-size:12px}.placement-panel>small{display:block;margin-top:10px;font-size:8px;text-align:center;color:#8a7c65}.building-inspector{position:absolute;right:26px;bottom:160px;background:#f8f1e4f5;border:1px solid #fff0ce;border-radius:11px;width:245px;padding:16px;box-shadow:0 8px 30px #302b2440;z-index:14}.building-inspector .inspector-heading{display:flex;justify-content:space-between;align-items:start}.building-inspector h2{font:600 27px var(--serif)}.building-inspector .icon-button{width:25px;height:25px}.building-inspector p{font-size:11px;color:#756b58;line-height:1.6;margin:7px 0 10px}.building-inspector .details{font-size:9px;color:#9b886b;margin-bottom:11px}.building-inspector .button{font-size:11px;padding:9px 12px}.inspector-actions{display:flex;gap:6px;flex-wrap:wrap}.inspector-actions .wide{flex-basis:100%}.building-inspector .text-button{font-size:10px;color:#a15846;margin-top:10px}
.world-main>.event-banner{position:absolute;z-index:20;left:50%;top:144px;transform:translateX(-50%);width:min(520px,calc(100% - 50px));margin:0;box-shadow:0 5px 20px #0002;font-size:11px}.world-main>.active-buffs{position:absolute;top:calc(100% - 140px);left:50%;transform:translateX(-50%);max-width:45%;margin:0;z-index:5;pointer-events:none}.world-main>.active-buffs .buff-pill{font-size:9px}.toast-container{z-index:60;bottom:105px;right:26px;max-width:330px}.toast{font-size:12px;border-radius:9px}dialog{z-index:100}dialog .guide-steps{font-size:13px}.world-actions .float-number{color:#ffe2a0}
@media(max-width:900px){.topbar{inset:12px 14px auto}.world-monument{left:18px;top:155px;width:195px;padding:12px 14px}.world-monument h1{font-size:32px}.world-mission{right:18px;top:155px;width:195px}.world-navigation{left:18px;top:315px}.world-status{left:18px;width:175px}.world-camera{right:18px}.world-controls-hint{display:none}#building-list{grid-template-columns:repeat(4,minmax(0,1fr))}.world-monument>small{font-size:8px}}
@media(max-width:650px){.topbar{height:47px;inset:8px 10px auto;padding:0 10px;gap:12px}.brand strong{font-size:16px}.brand small{font-size:6px}.brand-mark{font-size:30px}.dynasty-label{padding-left:10px;font-size:10px}.dynasty-label .eyebrow{font-size:6px}.header-actions .icon-button{width:30px;height:30px}.save-indicator{position:fixed;left:17px;bottom:7px;color:#665437;font-size:8px;margin:0}.resource-bar{top:64px;max-width:calc(100% - 20px);width:calc(100% - 20px);padding:9px 2px}.resource-item{min-width:0!important;flex:1;padding:0 6px;gap:3px}.resource-icon{width:16px;height:22px}.resource-icon .icon{width:16px;height:16px}.resource-number{font-size:12px}.resource-text small{font-size:7px}.resource-rate{font-size:7px}.world-monument{top:130px;left:12px;width:164px;padding:10px 12px}.world-monument h1{font-size:30px;margin:4px 0 8px}.world-monument .eyebrow{font-size:7px}.monument-progress-row{font-size:8px}.world-monument>small{font-size:7px}.world-mission{top:130px;right:12px;width:155px;padding:10px 11px}.world-mission .eyebrow{font-size:6px;letter-spacing:.12em}.world-mission>button:first-of-type{font-size:17px;padding:4px 0}.world-mission p{font-size:8px}.world-mission .small{padding:5px 7px;font-size:9px}.world-navigation{left:12px;top:260px;padding:4px}.world-navigation .nav-item{width:34px;height:36px;padding:7px}.world-navigation .nav-item .icon{width:18px;height:18px}.world-navigation .nav-item>span:not(:first-child){left:43px;font-size:10px;padding:6px 9px}.world-status{left:12px;bottom:98px;padding:8px 10px;width:147px}.world-status .status-title{font-size:9px}.world-status .cycle-card strong{font-size:8px}.world-status .cycle-card small{font-size:7px}.world-status .cycle-card>.icon{width:16px}.world-camera{right:12px;bottom:99px;gap:0;padding:3px}.world-camera .icon-button{width:27px;height:29px;font-size:21px}.world-actions{bottom:25px;width:calc(100% - 24px);padding:5px;gap:4px;justify-content:space-between}.world-actions .button{height:40px;padding:0 8px;font-size:10px;gap:5px;flex:1;justify-content:center}.world-actions .button .icon{width:15px;height:15px}.world-actions .quarry-action small{font-size:8px}.world-actions #lay-stone-button{font-size:9px}.management-panel{inset:120px 10px 91px;width:auto;padding:20px 16px}.management-panel .page-heading h1{font-size:29px}.management-panel .page-heading{margin-bottom:14px}.management-panel .card{padding:14px}.build-catalog{bottom:91px;width:calc(100% - 20px);max-height:55vh;padding:14px}.catalog-heading h2{font-size:23px}#building-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.building-option{padding:10px}.building-option>.icon{width:24px;height:24px;margin:0}.building-option .building-effect{min-height:0}.placement-panel{bottom:91px;padding:13px}.placement-title strong{font-size:24px}.building-inspector{right:12px;bottom:144px;width:210px;padding:13px}.building-inspector h2{font-size:24px}.world-main>.event-banner{top:116px;width:calc(100% - 24px);font-size:10px;left:12px;transform:none}.world-main>.active-buffs{display:none}.toast-container{bottom:95px;right:12px;max-width:calc(100% - 24px)}.world-label{min-width:85px;padding:5px 8px}.world-label strong{font-size:9px}.world-label small{font-size:7px}.world-error{inset:26% 8%}}
@media(max-width:360px){.brand small{display:none}.brand strong{font-size:14px}.dynasty-label{font-size:9px}.world-monument{width:145px}.world-mission{width:137px}.resource-item{padding:0 4px}.resource-icon{display:none}.world-actions .button{padding:0 6px;font-size:9px}.world-actions .button .icon{display:none}.world-camera .icon-button{width:24px}.world-status{width:130px}.placement-title span{font-size:9px}}
.world-navigation .nav-item .icon{display:block}.world-status .kingdom-status{display:block}.world-status .cycle-card{display:flex}.village-item{width:100%;background:transparent;border-bottom:1px solid #d9caae;display:flex;gap:10px;align-items:center;padding:10px 0;text-align:left;font-size:12px}.village-item:hover{color:#9c742f}.village-item .icon{color:#a18049;width:17px}.village-item small{margin-left:auto;font-size:10px;color:#8a7758}.world-actions:has(~.placement-panel:not([hidden])){opacity:.4;pointer-events:none}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{transition:none!important;animation:none!important}}
.world-scale{position:absolute;right:24px;bottom:176px;z-index:3;display:grid;grid-template-columns:auto 22px;gap:3px 8px;padding:8px 10px;background:#f6ecd9e8;border:1px solid #ad8c52;border-radius:5px;color:#4c361e;font:600 11px system-ui;pointer-events:none;box-shadow:0 2px 10px #402a1420}.scale-rule{height:5px;border:solid #684b28;border-width:0 1px 2px}.scale-north{grid-column:2;grid-row:1;font-size:20px;line-height:18px;text-align:center;transform-origin:center}.world-scale small{grid-column:2;grid-row:2;text-align:center;font-size:9px}.metric-table{width:100%;border-collapse:collapse;font-size:13px}.metric-table caption{text-align:left;font-weight:600;margin-bottom:8px}.metric-table th,.metric-table td{text-align:left;padding:8px 4px;border-bottom:1px solid #d7c09a}.geography-card p{line-height:1.6}.geography-card a{color:#255f6d;text-decoration:underline}.nil-journey .world-scale,body:has(canvas[data-adventure]:not([data-adventure=""])) .world-scale{display:none}@media(max-width:760px){.world-scale{right:12px;bottom:200px;padding:6px 8px;font-size:10px}.egypt-hud:has(#heritage-panel:not([hidden])) .world-scale,.egypt-hud:has(.placement-panel:not([hidden])) .world-scale{display:none}.metric-table{font-size:11px}}
