@charset "UTF-8";
/* The map owns the viewport. Floating controls never reserve a header or footer row. */
html,body,.app,main{width:100%;height:100dvh;overflow:hidden}
.app{background:#161c20}
.hud{top:max(8px,env(safe-area-inset-top));left:56px;right:8px;width:auto;max-width:330px;height:44px;gap:5px}
.hud-chip{flex:none;min-width:0;padding:4px 7px;background:#172b30e0;backdrop-filter:blur(8px)}
#dp-chip{width:60px;flex:0 0 60px}#dp-chip small{font-size:8px}#dp-chip strong{font-size:16px}
#energy-chip{display:none}
#supply-chip{display:block;flex:1;min-width:0;padding:3px 5px}#supply-chip>small{display:none}
#supply{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;white-space:normal}
#supply .resource-reading{min-width:0;display:grid;gap:1px}#supply .resource-reading>small{font-size:9px;line-height:11px;color:#c9e5de}
#supply .resource-reading>span{display:flex;justify-content:center;align-items:center;gap:2px;font-size:14px;line-height:20px}
#supply .game-icon{width:19px;height:19px}#supply .resource-reading.low>small,#supply .resource-reading.low b{color:#ffbd98}
.round-chip{top:max(8px,env(safe-area-inset-top));left:8px;width:40px;height:40px}
.event-banner{left:8px;right:auto;top:56px;width:min(310px,calc(100vw - 16px));max-height:90px;background:#593c32df;backdrop-filter:blur(8px)}
.event-banner:empty{display:none}
.map-shell{inset:0}
.map{background-image:linear-gradient(#aa765288,#aa765288),url('assets/arcadia_crater_surface.webp');background-size:100% 100%;filter:none}
.tile{border-color:#f4d4ad14}
.tile.move-target{background:#67d9dc26;box-shadow:inset 0 0 0 2px #a7fff4b8}
.tile.mountain:not(.move-target):not(.selected){background:#382a315e;box-shadow:inset 0 0 0 2px #ffcf91b8}
.tile.mountain:after{display:none}
.tile .entity.mountain-art{width:86%!important;height:86%!important;filter:drop-shadow(0 4px 5px #21171bc9)!important}
.tile.first-goal{box-shadow:inset 0 0 0 3px #fff0a6,0 0 18px 4px #fcd47eaf;z-index:2}
.tile.first-goal .resource{width:48%;box-shadow:0 0 0 2px #fff1b8}
.tile.enemy-step{box-shadow:inset 0 0 0 3px #ff906c,0 0 16px 4px #ff906cb8;z-index:3}
.tile .entity{border:0!important;background:transparent!important;box-shadow:none!important;width:100%;height:100%;filter:drop-shadow(0 6px 3px #16101bb9)}
.tile .entity .game-icon{width:100%;height:100%}
.tile .entity.base .game-icon{width:110%;height:110%;transform:translate(-5%,-6%)}
.tile .entity.ai .game-icon{filter:hue-rotate(140deg) saturate(1.25)}
.tile .entity.spent{opacity:.6}
.tile .entity.me:after,.tile .entity.ai:after{right:0;top:1px;width:11px;height:11px}
.tile .hp{z-index:4}
.map-scale{bottom:max(6px,env(safe-area-inset-bottom));left:8px;right:auto;max-width:145px;background:#19242aaf;border-radius:6px;padding:2px 4px}
.map-scale span:nth-child(2){display:none}
.map-zoom{top:56px;right:8px}
.map-zoom button{width:44px;height:44px;background:#14252acb}
.bottom-nav{bottom:max(8px,env(safe-area-inset-bottom));right:8px;left:auto;width:auto;height:48px;gap:5px}
.app.lab-active .bottom-nav{display:none}
.bottom-nav button{height:48px;min-height:48px;border-radius:50%;width:48px;flex:0 0 48px;font-size:0}
.bottom-nav button span{font-size:21px}
.bottom-nav .next-turn{flex:0 0 58px;width:58px;border-radius:16px;font-size:9px}
.bottom-nav .next-turn span{display:block;font-size:19px}
.bottom-nav .menu-popup{bottom:55px;right:0;width:170px}
.bottom-nav .menu-popup button{width:100%;border-radius:9px;font-size:12px}
.action-sheet,.action-sheet.minimized{top:auto!important;bottom:65px!important;left:8px!important;right:auto!important;width:min(340px,calc(100vw - 16px))!important;max-height:min(46dvh,360px)!important;height:auto!important;overflow:auto!important;box-shadow:0 8px 25px #101318cf}
.action-sheet.minimized{top:110px!important;bottom:auto!important;width:auto!important;max-width:calc(100vw - 16px);height:52px!important;padding:4px 10px;border-radius:18px;background:#ead3acdf;overflow:hidden!important}
.action-sheet.minimized .sheet-top,.action-sheet.minimized .sheet-body,.action-sheet.minimized .sheet-icon{display:none!important}
.action-sheet.minimized .sheet-toggle{display:block!important;min-height:44px;font-size:12px}
.actions{grid-template-columns:1fr 1fr;gap:5px}.action{min-height:44px}
#lab-page,#log-page,#observe-page{padding:0;height:100dvh;overflow:hidden}
#lab-page{position:relative}.lab-head{position:absolute;top:8px;left:8px;right:8px;z-index:6;padding:0;pointer-events:none}.lab-head>div{display:none}.lab-head .outline{pointer-events:auto;margin-left:auto;background:#233b40e8;color:#fff4d8;border:1px solid #b7b39c;border-radius:9px;min-height:44px}
.lab-hint,.tech-route,.atlas-links{display:none!important}
.lab-layout{display:block;width:100%;height:100%;padding:0}
.tree-frame,.tree-window{width:100%;height:100%;min-height:0;max-height:none;border:0;border-radius:0}
.tree-window{background:radial-gradient(circle at 50% 40%,#274e55,#111a25 68%,#0a111b)}
.map-scroller,.tree-window{overflow:auto;touch-action:pan-x pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.map-scroller.panning,.tree-window.panning{cursor:grabbing;user-select:none}
@media(hover:hover){.map-scroller,.tree-window{cursor:grab}}
.map-scroller::-webkit-scrollbar,.tree-window::-webkit-scrollbar{display:none}
.tech-node,.tech-hub{border-radius:50%;box-shadow:inset 0 4px 12px #ffffff29,0 7px 0 #0c1720,0 10px 18px #060a11b0;background:radial-gradient(circle at 35% 25%,#3a6869,#1e3b48 68%);display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px}
.tech-node.ready{background:radial-gradient(circle at 35% 25%,#eaaa65,#8f4b36 72%)}
.tech-node.done{background:radial-gradient(circle at 35% 25%,#7be0bd,#237866 72%)}
.tech-node.future{background:radial-gradient(circle at 35% 25%,#536073,#29313e 72%)}
.tech-node .game-icon{width:48%;height:48%}.tech-node b{font-size:10px;line-height:1.05;max-width:90%}.tech-hub{position:absolute;border:3px solid #f3cf8c;color:#fff6dc;text-align:center}.tech-hub .game-icon{width:52%;height:52%}.tech-hub b{font-size:10px}
.tech-edges path{stroke:#4b9a8e;stroke-width:5}.tech-edges path.path-edge{stroke:#ffd07e}
.tree-controls{top:59px;right:8px}.tree-controls button{width:44px;height:44px;border-radius:50%;background:#233b40e8}
.tech-detail{display:none;position:absolute;z-index:7;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));max-height:min(55dvh,450px);overflow:auto;border-radius:16px;box-shadow:0 9px 30px #060b11c9}
.tech-open .tech-detail{display:block}
.close-tech{margin-left:auto;width:44px;height:44px;border:0;border-radius:50%;font-size:22px;background:#d5bc94;color:#46332d}
.detail-title h2{font-size:17px}.tech-detail p{font-size:12px}
.page-head{padding:60px 16px 16px}.log-list,.observation{max-height:calc(100dvh - 170px);overflow:auto}
#log-page,#observe-page{overflow:auto}
.turn-dialog,.result-dialog{border:2px solid #eab379;border-radius:20px;background:#20353b;color:#fff2d9;padding:22px;width:min(350px,calc(100vw - 32px));box-shadow:0 14px 50px #0009;text-align:center}
.turn-dialog::backdrop,.result-dialog::backdrop{background:#10151dc9}
.turn-dialog h2,.result-dialog h2{font-size:28px;margin:10px 0}.turn-dialog p,.result-dialog p{font-size:14px;line-height:1.5}.result-emblem .game-icon{width:80px;height:80px}
.turn-dialog .rival-summary{color:#ffd39e;font-weight:700}
.turn-dialog{max-height:calc(100dvh - 24px);overflow:auto;padding:18px}
.turn-dialog .reserves-heading{font-size:12px;margin:12px 0 7px;color:#c7ded8;text-align:left}
.turn-resources{display:grid;gap:6px;text-align:left}
.turn-resource{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:4px 8px;padding:9px 10px;border:1px solid #7ca59c77;border-radius:10px;background:#162b30}
.turn-resource .resource-label{display:flex;align-items:center;gap:5px;font-size:13px}.turn-resource .game-icon{width:23px;height:23px}
.reserve-change{justify-self:end;white-space:nowrap;font-size:15px;font-variant-numeric:tabular-nums}.reserve-change>b{font-size:21px;color:#fff8dc}.reserve-change>span{color:#b4cec7}
.reserve-change>small{font-size:11px;margin-left:5px}.reserve-change .decrease{color:#ffbc98}.reserve-change .increase{color:#a5e9c9}
.resource-reason{grid-column:1/-1;font-size:10px;line-height:1.5;color:#c7ded8}
.app .hud{right:8px;width:auto;height:44px}
.turn-dialog button,.result-dialog button{min-height:48px;padding:8px 16px;border:1px solid #e9c593;border-radius:10px;background:#cc7852;color:#fff;font-weight:bold}
.result-actions{display:flex;gap:8px;justify-content:center}.result-actions button:first-child{background:#31545a}
@media(orientation:landscape){.map-shell{inset:0}.hud{top:8px;left:56px;right:auto;width:auto;height:40px}.round-chip{left:8px;right:auto}.event-banner{top:56px;left:8px;right:auto}.bottom-nav{right:8px;bottom:8px;width:auto}.bottom-nav button{width:48px;flex-basis:48px}.bottom-nav .next-turn{width:58px;flex-basis:58px}.action-sheet,.action-sheet.minimized{left:8px!important;right:auto!important;top:auto!important;bottom:8px!important;width:min(320px,45vw)!important;max-height:calc(100dvh - 110px)!important}.action-sheet.minimized{width:auto!important}.lab-layout{height:100%}.tree-window{height:100%;max-height:none}.tech-detail{left:auto;right:8px;bottom:8px;width:min(340px,42vw);height:auto;max-height:calc(100dvh - 80px)}.tech-open .tree-window{width:100%}}
@media(orientation:landscape){.action-sheet.minimized{top:110px!important;bottom:auto!important}}
#map-page.alerting .action-sheet.minimized{top:156px!important}
