/* Mobile-first scene shell. Existing art and simulation stay in their original coordinates. */
body.game-shell{--shell-safe-top:env(safe-area-inset-top,0px);--shell-top:calc(72px + var(--shell-safe-top));--shell-bottom:calc(66px + env(safe-area-inset-bottom,0px));margin:0;overflow:hidden;background:#0b1c14}.game-shell>.app{position:relative;width:100%;max-width:none;height:100dvh;padding:0;margin:0;overflow:hidden}.game-shell.opening-active>.app{display:none}.game-shell .masthead{position:absolute;top:var(--shell-safe-top);left:0;right:0;z-index:30;height:44px;margin:0;padding:0 12px;border:0;border-bottom:1px solid #9f945c66;background:linear-gradient(#23372af5,#102219f5);box-shadow:0 2px 10px #0006}.game-shell .brand{gap:8px}.game-shell .brand .crest{width:24px;height:29px;padding:0;border:0;flex:none}.game-shell .brand strong{font-size:17px;letter-spacing:3px}.game-shell .brand small{display:none}.game-shell .prototype{display:none}.game-shell .top-actions{gap:6px}.game-shell .icon-button{width:36px;height:36px;font-size:20px}.game-shell .realm-strip{position:absolute;left:0;right:0;top:calc(44px + var(--shell-safe-top));height:28px;box-sizing:border-box;padding:0 12px;z-index:30;font-size:11px;background:#102219eb;border-bottom:1px solid #84906455;gap:6px}.game-shell .realm-strip>div{gap:7px;max-width:55%;min-width:0}.game-shell #city-name{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.game-shell .quiet-button{font-size:9px;white-space:nowrap}.game-shell #level-tag{font-size:9px;white-space:nowrap}.game-shell .live-dot{width:5px;height:5px}.game-shell .layout{position:absolute;inset:var(--shell-top) 0 var(--shell-bottom);display:block;min-height:0;margin:0;padding:0;overflow:hidden}.game-shell .main-column{width:100%;height:100%;position:relative;min-height:0;overflow:hidden}.game-shell .sidebar,.game-shell .footnote{display:none}.game-shell #page-content,.game-shell #scene-backdrop{position:absolute;inset:0;overflow:hidden}.game-shell #scene-backdrop{z-index:0}.game-shell #page-content{z-index:1}.game-shell:not(.feature-open) #page-content>.page-heading,.game-shell #scene-backdrop>.page-heading{display:none}.game-shell .scene-caption,.game-shell .world-toolbar,.game-shell .world-bottom,.game-shell #world-missions,.game-shell #march-hud{display:none}.game-shell #page-content>.subheading,.game-shell #scene-backdrop>.subheading{display:none}.game-shell .city-stage{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:auto;margin:0;border:0;overflow:auto;scrollbar-width:none;border-radius:0;background:#25402a url('assets/art/city-scene-v3.png') center/cover}.game-shell .city-stage::-webkit-scrollbar{display:none}.game-shell .city-surface{width:max(100%,calc(100dvh - var(--shell-top) - var(--shell-bottom)));min-width:100%;aspect-ratio:1;min-height:100%;position:relative}.game-shell .city-scene-art{width:100%;height:100%;object-fit:cover}.game-shell .scene-title,.game-shell .scene-compass{display:none}.game-shell .city-stage .building-label{font-size:10px;min-height:22px;padding:2px 6px;display:flex;flex-direction:column;gap:1px;border-color:#9c9c6f9c;background:#14291edb}.game-shell .city-stage .building-label i{font-size:9px}.game-shell .city-stage .building .working{font-size:9px;white-space:nowrap}.game-shell .map-shell{position:absolute;inset:0}.game-shell #world-map{width:100%;height:100%;box-sizing:border-box;border:0;scrollbar-width:none}.game-shell #world-map::-webkit-scrollbar{display:none}.game-shell .map-zoom{bottom:12px;right:8px}.game-shell .map-zoom button{min-width:40px;min-height:40px}.game-shell .map-zoom button[data-map-zoom=reset]{min-width:53px}
.game-shell .bottom-nav{position:absolute;z-index:45;left:0;right:0;bottom:0;width:100%;height:var(--shell-bottom);box-sizing:border-box;margin:0;padding:3px 8px calc(3px + env(safe-area-inset-bottom,0px));display:grid;grid-template-columns:repeat(6,minmax(0,1fr));border:0;border-top:2px ridge #a69764;background:linear-gradient(#354936f5,#14291ff5);box-shadow:0 -3px 15px #06150ccc}.game-shell .bottom-nav button{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:3px;min-height:0;min-width:0;padding:3px 1px;font-size:11px;letter-spacing:0;border:0;border-right:1px solid #76816455;color:#dddfbe}.game-shell .bottom-nav button:last-child{border-right:0}.game-shell .bottom-nav button>span{font-size:24px;line-height:1.1}.game-shell .bottom-nav button.active{background:linear-gradient(#af9e5b42,#6e8a4a38);color:#ffe6a1;box-shadow:inset 0 2px #d6c079}.game-shell .toast{z-index:90;bottom:calc(var(--shell-bottom) + 12px);max-width:calc(100vw - 30px);font-size:12px;padding:10px 14px}
.floating-hud{position:absolute;z-index:25;left:8px;top:calc(var(--shell-top) + 10px);width:128px;pointer-events:none;filter:drop-shadow(0 2px 5px #0006)}.floating-hud button,.floating-hud .resources{pointer-events:auto}.game-shell .floating-hud .power-banner{display:flex;align-items:center;justify-content:flex-start;gap:5px;width:100%;min-height:34px;padding:6px 8px;margin:0 0 6px;border:1px solid #b39d60;background:#11281feb;border-radius:4px;color:#ecd99d;font-size:10px;box-shadow:none}.game-shell .power-banner .power-emblem{font-size:17px}.game-shell .power-banner>span:nth-child(2){display:none}.game-shell .power-banner strong{font:18px Georgia;color:#f4e6b7;min-width:0}.game-shell .power-detail-link{display:none}.game-shell .floating-hud .resources{display:flex;flex-direction:column;gap:3px;padding:0;margin:0;border:1px solid #81915e99;border-radius:4px;background:#10261ee6;overflow:hidden}.game-shell .floating-hud .resource{display:grid;grid-template-columns:20px minmax(0,1fr);align-items:center;gap:5px;padding:7px 8px;border:0;border-bottom:1px solid #7b8a5b44;background:none}.game-shell .floating-hud .resource-icon{font-size:20px;line-height:1;margin:0}.game-shell .floating-hud .resource-head{display:flex;flex-direction:column;align-items:flex-start;gap:2px;font-size:9px;line-height:1.1}.game-shell .floating-hud .resource-head strong{font:18px Georgia;line-height:1.1;color:#e7dfb4}.game-shell .floating-hud .resource-track,.game-shell .floating-hud .resource-meta,.game-shell .floating-hud .resource-protection{display:none}.game-shell .floating-hud .resource.has-unsafe .resource-head strong{color:#f0c389}.hud-resource-detail{width:100%;background:none;border:0;color:#b8c6a8;padding:5px;font:10px Georgia;cursor:pointer;min-height:27px}.hud-resource-detail:hover{color:#f5e1ac;background:#37523c}.hud-timers{pointer-events:auto;margin-top:8px}.hud-timers-title{display:flex;justify-content:space-between;gap:4px;color:#d9dfbd;background:#13291dd9;padding:5px 6px;font-size:9px;border:1px solid #83926180;border-radius:3px 3px 0 0}.hud-timer-list{max-height:min(32dvh,250px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8f9a6f transparent}.hud-timer{width:100%;display:flex;align-items:center;gap:6px;min-height:43px;text-align:left;background:linear-gradient(90deg,#10291eeb,#10291eb3);border:0;border-left:2px solid #b3ad69;border-bottom:1px solid #6c7e504d;padding:6px;color:#d7dfbd;cursor:pointer}.hud-timer:hover{background:#304e36eb}.hud-timer-icon{font-size:18px;width:20px;text-align:center;flex:none}.hud-timer>span:last-child{min-width:0}.hud-timer strong{font-weight:400;font-size:10px;display:block;max-width:90px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hud-timer time{display:block;color:#f1d38b;font:12px Georgia;font-variant-numeric:tabular-nums;margin-top:2px}.hud-timer small{display:block;color:#acbca0;font-size:9px;margin-top:3px}.hud-timer.march-outbound{border-left-color:#9ac880}.hud-timer.march-inbound{border-left-color:#8cc2db}.hud-timer.march-working{border-left-color:#d6b261}
.scene-shortcuts{position:absolute;z-index:26;right:8px;top:calc(var(--shell-top) + 12px);display:grid;gap:8px}.scene-shortcuts button{position:relative;width:48px;min-height:51px;padding:5px 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:#ecdca4;border:1px solid #a39561;border-radius:6px;background:linear-gradient(#314b36ed,#152d22ed);box-shadow:0 3px 7px #0006;cursor:pointer}.scene-shortcuts button>span{font-size:23px;line-height:1.1}.scene-shortcuts small{font-size:9px}.scene-shortcuts b{position:absolute;right:-5px;top:-5px;min-width:15px;height:15px;line-height:15px;text-align:center;border:1px solid #e8c487;border-radius:50%;background:#8b3d29;color:#fff1b6;font-size:10px}.scene-shortcuts b[hidden]{display:none}.game-shell[data-surface=city] .world-only,.game-shell[data-surface=world] .city-only{display:none}.game-shell button:focus-visible{outline:2px solid #ffe5a2;outline-offset:2px}
.feature-open #scene-backdrop:after{content:'';position:absolute;inset:0;z-index:10;background:#041008a8;pointer-events:auto}.game-shell.feature-open #page-content{z-index:40;pointer-events:none}.feature-sheet{pointer-events:auto;position:absolute;inset:10px 12px;max-width:900px;width:calc(100% - 24px);margin:0 auto;display:flex;flex-direction:column;border:2px ridge #a99765;border-radius:8px;background:linear-gradient(130deg,#263c2df7,#10261ffb);box-shadow:0 12px 60px #000b;overflow:hidden}.feature-sheet-top{height:44px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 14px;border-bottom:1px solid #84925f77;background:#142c20;color:#cbbd8e;font-size:11px;letter-spacing:2px}.feature-sheet-top button{min-width:65px;min-height:40px;border:0;background:none;color:#f0d994;font-size:13px;cursor:pointer;letter-spacing:0}.feature-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;padding:18px;scrollbar-width:thin;scrollbar-color:#8d9967 #182b21}.feature-body .page-heading{margin:0 0 14px}.game-shell .feature-body .page-heading h1{font-size:23px}.game-shell dialog{max-height:calc(100dvh - 36px);max-width:min(600px,calc(100vw - 20px));box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;z-index:80}.game-shell .feature-body .army-unit-stats strong{font-size:20px}.game-shell .feature-body #army-missions{margin-top:12px}.game-shell .feature-body .tree-panel{overflow:hidden}
@media(max-width:600px){body.game-shell{--shell-top:calc(68px + var(--shell-safe-top))}.game-shell .masthead{height:40px;padding:0 9px}.game-shell .realm-strip{top:calc(40px + var(--shell-safe-top));padding:0 8px}.game-shell .brand strong{font-size:16px;letter-spacing:2px}.game-shell .brand .crest{width:22px;height:27px}.game-shell #city-name{max-width:130px}.floating-hud{left:6px;top:calc(var(--shell-top) + 8px);width:116px}.game-shell .floating-hud .power-banner{padding:5px 7px;min-height:33px}.game-shell .power-banner strong{font-size:17px}.game-shell .floating-hud .resource{padding:6px 7px}.game-shell .floating-hud .resource-head strong{font-size:17px}.hud-timer-list{max-height:27dvh}.hud-timer{min-height:42px}.hud-timer strong{max-width:80px}.scene-shortcuts{right:6px;top:calc(var(--shell-top) + 8px);gap:7px}.scene-shortcuts button{width:43px;min-height:48px}.scene-shortcuts button>span{font-size:21px}.game-shell .bottom-nav{padding-left:3px;padding-right:3px}.game-shell .bottom-nav button{font-size:10px}.game-shell .bottom-nav button>span{font-size:22px}.feature-sheet{inset:6px;width:calc(100% - 12px);border-radius:6px}.feature-body{padding:13px 10px}.game-shell .feature-body .page-heading h1{font-size:21px}.feature-sheet-top{padding:0 10px;height:40px}.game-shell dialog{padding:17px}.game-shell .city-stage .building-label{font-size:9px;padding:2px 4px}.game-shell .map-zoom{bottom:8px;right:6px}.game-shell .map-zoom button{min-height:40px}.game-shell .map-tile .tile-name{font-size:11px}}
@media(max-height:620px){.hud-timer-list{max-height:22dvh}.floating-hud{width:110px}.game-shell .floating-hud .resource{padding:4px 7px}.hud-resource-detail{min-height:22px;padding:3px}.scene-shortcuts{grid-template-columns:repeat(2,43px);gap:5px}.scene-shortcuts button{min-height:43px}.scene-shortcuts small{font-size:8px}}
.game-shell.feature-open .floating-hud,.game-shell.feature-open .scene-shortcuts{opacity:.4;pointer-events:none}@media(max-height:620px){.floating-hud{max-height:calc(100dvh - var(--shell-top) - var(--shell-bottom) - 16px);overflow-y:auto;pointer-events:auto;scrollbar-width:none}}
.feature-dismiss{position:absolute;inset:0;z-index:0;width:100%;height:100%;padding:0;margin:0;border:0;background:transparent;pointer-events:auto;cursor:default}.feature-sheet{z-index:1;overflow:clip}.feature-sheet-top{position:sticky;top:0;z-index:2}.game-shell .feature-dismiss:focus-visible{outline:none}
/* 0.9.2: status lives above the scene; only the work drawer floats on the left. */
body.game-shell{--shell-top:calc(112px + var(--shell-safe-top))}.top-status-bar{position:absolute;z-index:31;top:calc(72px + var(--shell-safe-top));left:8px;right:8px;height:34px;display:grid;grid-template-columns:1.1fr 1fr 1fr 30px;gap:5px;max-width:600px;margin:0 auto;min-width:0}.game-shell .top-status-bar .resources{display:contents}.game-shell .top-status-bar .power-banner{display:flex;align-items:center;justify-content:center;gap:5px;width:100%;min-width:0;min-height:34px;height:34px;padding:3px 6px;margin:0;border:1px solid #9d925f99;border-radius:4px;background:#142b20f5;box-shadow:none}.game-shell .top-status-bar .power-emblem{font-size:16px;line-height:1}.game-shell .top-status-bar .power-banner>span:nth-child(2),.game-shell .top-status-bar .power-detail-link{display:none}.game-shell .top-status-bar .power-banner strong{font:clamp(12px,3.5vw,17px) Georgia;color:#f0dfac;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.game-shell .top-status-bar .resource{display:flex;align-items:center;justify-content:center;gap:4px;padding:3px 5px;border:1px solid #78875b99;border-radius:4px;background:#142b20f5;min-width:0}.game-shell .top-status-bar .resource-icon{font-size:16px;line-height:1;flex:none;margin:0}.game-shell .top-status-bar .resource>div{min-width:0}.game-shell .top-status-bar .resource-head{display:flex;align-items:center;gap:4px;font-size:9px;line-height:1}.game-shell .top-status-bar .resource-head strong{font:clamp(12px,3.5vw,17px) Georgia;line-height:1;white-space:nowrap;color:#e5dfb9;min-width:0}.game-shell .top-status-bar .resource.has-unsafe .resource-head strong{color:#ebc18a}.game-shell .top-status-bar .resource-track,.game-shell .top-status-bar .resource-meta,.game-shell .top-status-bar .resource-protection{display:none}.top-status-bar .hud-resource-detail{font-size:0;width:30px;min-width:0;min-height:34px;padding:0;border:1px solid #78875b99;border-radius:4px;background:#142b20f5}.top-status-bar .hud-resource-detail:after{content:'⋯';font:22px Georgia;color:#dfd7aa}.top-status-bar .hud-resource-detail:hover{background:#34533b}.game-shell .work-dock{--work-width:128px;width:var(--work-width);overflow:visible;max-height:none;transition:width .2s ease}.work-dock-panel{width:var(--work-width);transition:transform .2s ease;will-change:transform}.work-dock .hud-timers{margin-top:0}.work-dock-toggle{position:absolute;right:-29px;top:0;min-width:29px;width:29px;height:44px;min-height:44px;padding:0;border:1px solid #a79c67;border-left:0;border-radius:0 5px 5px 0;background:linear-gradient(#304c35ef,#142c20f5);color:#f0dba0;font:27px Georgia;cursor:pointer;pointer-events:auto;touch-action:manipulation}.game-shell.work-collapsed .work-dock{width:0}.work-collapsed .work-dock-panel{transform:translateX(calc(-100% - 9px))}.work-collapsed .work-dock-toggle{border-left:1px solid #a79c67;border-radius:4px}.work-dock .hud-timer-list{max-height:min(27dvh,calc(100dvh - var(--shell-top) - var(--shell-bottom) - 50px))}@media(max-width:600px){body.game-shell{--shell-top:calc(108px + var(--shell-safe-top))}.top-status-bar{top:calc(68px + var(--shell-safe-top));left:6px;right:6px;gap:4px;grid-template-columns:1.1fr 1fr 1fr 28px}.game-shell .work-dock{--work-width:116px}.game-shell .top-status-bar .resource{gap:3px;padding:3px 4px}.game-shell .top-status-bar .resource-head{gap:3px;font-size:8px}.game-shell .top-status-bar .resource-icon{font-size:14px}.top-status-bar .hud-resource-detail{width:28px}}@media(prefers-reduced-motion:reduce){.game-shell .work-dock,.work-dock-panel{transition:none}}
