/* A raised isometric stage. Logical plot order and all saved positions stay intact. */
.city-map{padding:30px 6px 24px;min-height:414px;background:radial-gradient(ellipse at 70% 6%,#a0d6c31c,transparent 48%),linear-gradient(150deg,#183947,#172f3c 48%,#122b34);box-shadow:inset 0 1px 0 #d7efb721,0 22px 35px -24px #0009}
.city-map[data-stage="1"]{background:radial-gradient(ellipse at 72% 4%,#c0deb52a,transparent 50%),linear-gradient(150deg,#20464c,#17343c 65%,#19352e)}
.city-map[data-stage="2"]{background:radial-gradient(ellipse at 72% 4%,#ebd3a332,transparent 50%),linear-gradient(150deg,#244b4d,#1b3b3b 65%,#1c392f)}
.city-map:before,.city-map:after{content:'';position:absolute;left:2%;right:2%;top:98px;bottom:30px;clip-path:polygon(44% 0,100% 51%,57% 100%,0 49%);pointer-events:none;z-index:0}
.city-map:before{background:linear-gradient(155deg,#365d4c,#183e36 65%,#0c2a2c);translate:0 12px;box-shadow:0 18px 20px #0005}
.city-map:after{background:linear-gradient(135deg,#5d80604d,#6b956344 60%,#426e53);border-top:1px solid #a1c58533}
.city-plots{display:block;position:relative;height:360px;z-index:2;perspective:650px}
.city-plot{position:absolute;width:27%;height:102px;left:calc(50% + (var(--col) - var(--row) - .5)*13%);top:calc(26px + (var(--col) + var(--row))*43px);margin-left:-13.5%;padding:0;z-index:calc(2 + var(--depth));border:0!important;border-radius:0;background:transparent!important;box-shadow:none!important;clip-path:polygon(10% -25%,90% -25%,90% 43%,100% 65%,100% 79%,50% 100%,0 79%,0 65%,10% 43%);transform:none;overflow:visible}
.city-plot:active:enabled{transform:none}
.city-plot:before{content:'';position:absolute;inset:65px 0 14px;clip-path:polygon(0 0,50% 65%,100% 0,100% 36%,50% 100%,0 36%);background:linear-gradient(90deg,#315c43 0 50%,#1d473a 50%);z-index:0}
.plot-pad{left:0;right:0;top:45px;bottom:20px;border:0;clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);background:linear-gradient(135deg,#679565,#547e58);z-index:1;transition:translate .35s ease,background .35s ease}
.city-plot[data-type] .plot-pad{background:linear-gradient(135deg,#9ab578,#70935e 55%,#597d54)}
.city-plot[data-type=garden] .plot-pad{background:linear-gradient(135deg,#99be73,#668e52)}
.city-plot[aria-pressed=true] .plot-pad,.city-plot:hover:enabled .plot-pad,.city-plot:focus-visible .plot-pad{background:linear-gradient(135deg,#c5d795,#8eb271);translate:0 -2px;box-shadow:inset 0 0 0 2px #f1db9c}
.city-plot:focus-visible{outline:2px solid var(--gold);outline-offset:-6px}
.city-plot>.city-building{bottom:36px;z-index:3;scale:1.12;transition:translate .35s ease}
.city-plot[aria-pressed=true]>.city-building{translate:0 -2px}
.plot-plus{inset:42px 0 auto;z-index:4;font:22px Georgia,serif;color:#d6e8b88c;pointer-events:none}
.plot-name{left:calc(50% - 8px);right:auto;bottom:9px;width:16px;min-height:13px;border-radius:6px;font:7px/1 system-ui;background:#14332f85;color:#d6e5c3;z-index:5;pointer-events:none}
.city-plot[aria-pressed=true] .plot-name{background:#ecd59b;color:#264a3e;font-weight:700}
.city-paths{inset:30px 6px auto;height:360px;z-index:1;transform:none;background:none;pointer-events:none}
.city-paths svg{width:100%;height:100%;overflow:visible}.city-paths path{fill:none;stroke-linecap:round;stroke-linejoin:round}
.road-edge{stroke:#233f38;stroke-width:15}.road-surface{stroke:#a59d7b;stroke-width:8;opacity:.65}.road-marks{stroke:#dfcda1;stroke-width:1.2;stroke-dasharray:2 9;opacity:.7}
/* Front walls, side walls, roofs and cast shadows provide volume without a camera sway. */
.city-building{isolation:isolate;filter:drop-shadow(6px 7px 3px #0b292d55)}
.building-shell{transform:skewY(-6deg);background:linear-gradient(110deg,#efe6bf,#b6cbb6);border-color:#ecedce;box-shadow:0 1px 0 #e6edc5,inset -7px 0 #74978c33}
.building-side{position:absolute;left:100%;top:2px;bottom:-2px;width:10px;background:linear-gradient(100deg,#84a896,#567e78);transform:skewY(34deg);transform-origin:left top;border:1px solid #b7ccac77;border-left:0;border-radius:0 3px 2px 0}
.home .building-shell:before{top:-12px;height:15px;left:-3px;right:-11px;background:linear-gradient(160deg,#c4d5a4 0 45%,#799b79 46% 70%,#4f7866 71%);clip-path:polygon(0 60%,55% 0,100% 37%,88% 89%,0 100%)}
.home[data-level="3"] .building-shell{box-shadow:-10px 9px 0 -3px #91b39b,inset -9px 0 #7d9e8b22,0 1px 0 #e6edc5}
.home-door{position:absolute;bottom:0;left:12px;width:6px;height:9px;border-radius:4px 4px 0 0;background:#37635d;border:1px solid #a1b89b}
.roof-flag{position:absolute;left:10px;top:-22px;width:1px;height:15px;background:#d3dfbe;z-index:2}.roof-flag:after{content:'';position:absolute;left:1px;top:1px;width:8px;height:5px;border-radius:0 4px 2px 0;background:#e2c194;transform-origin:left center;animation:colony-flag 2.8s ease-in-out infinite alternate}
.city-map[data-powered=true] .window{animation:home-warmth 7s ease-in-out infinite alternate}
.garden .building-side{display:none}.garden .building-shell{border-width:1px;background:linear-gradient(150deg,#95b66e,#638c54);box-shadow:0 4px #365f41,3px 5px 4px #13342c66}
.garden .tree{animation:garden-breeze 3.2s calc(var(--i)*-.8s) ease-in-out infinite alternate}
.garden .tree:after{box-shadow:inset -4px -4px 2px #47754a55,2px 4px 4px #274f3a33;background:radial-gradient(ellipse at 28% 20%,#c1db93,#8ab76d 55%,#60905b)}
.garden[data-level="3"] .tree:after{background:radial-gradient(ellipse at 28% 20%,#c4dda0,#8cba75 55%,#57864f)}
.garden-butterfly{position:absolute;left:30px;top:20px;width:3px;height:4px;border-radius:50%;background:#f3e0ac;animation:butterfly-drift 5s ease-in-out infinite}
.garden-butterfly:before,.garden-butterfly:after{content:'';position:absolute;width:5px;height:6px;background:#edb3c4;border-radius:80% 20% 65% 25%;transform-origin:right center;animation:butterfly-wing .55s ease-in-out infinite alternate}
.garden-butterfly:before{right:2px}.garden-butterfly:after{left:2px;transform-origin:left center;border-radius:20% 80% 25% 65%;animation-delay:-.25s}
.utility .building-side{width:8px;background:linear-gradient(100deg,#7da7b0,#476f86)}
.utility .solar-panel{box-shadow:2px 3px 0 #436577;overflow:hidden}.utility .solar-panel:after{content:'';position:absolute;inset:-5px;background:linear-gradient(115deg,transparent 30%,#deefdc66 50%,transparent 65%);animation:solar-sheen 6.5s ease-in-out infinite}
.energy-rotor{position:absolute;left:6px;top:-22px;width:15px;height:15px;animation:rotor-turn 5.5s linear infinite;z-index:3}
.energy-rotor:after{content:'';position:absolute;left:6px;top:6px;width:4px;height:4px;border-radius:50%;background:#e3e5bf;box-shadow:0 0 5px #cbe4b955}
.energy-rotor i{position:absolute;left:7px;top:7px;width:3px;height:10px;border-radius:2px 2px 4px 4px;background:linear-gradient(#b8d6b6,#ecedd0);transform-origin:1px 0;transform:rotate(calc(var(--blade)*120deg)) translateY(-8px)}
/* Quiet sky layers stay behind the settlement; nothing falls toward the planet. */
.city-sky{position:absolute;inset:0;pointer-events:none;overflow:hidden;z-index:0}.scene-sun{position:absolute;right:16%;top:24px;width:15px;height:15px;border-radius:50%;background:#ead7a587;box-shadow:0 0 45px 20px #ead7a510}
.scene-cloud{position:absolute;width:84px;height:18px;border-radius:50%;background:linear-gradient(#dbecdc33,#c9e3d511);box-shadow:22px -6px 0 -4px #d9e5d122,-14px -3px 0 -3px #d9e5d122;animation:scene-cloud-drift 36s linear infinite;top:32px;left:-100px}
.scene-cloud.cloud-b{width:60px;height:12px;top:78px;animation-duration:48s;animation-delay:-24s;opacity:.65}
.scene-birds{position:absolute;left:0;top:70px;animation:birds-cross 29s linear infinite;opacity:.6}.scene-birds i{position:absolute;width:8px;height:4px;border-top:1px solid #d9e4c2;rotate:-16deg;animation:bird-wing .8s ease-in-out infinite alternate}.scene-birds i:after{content:'';position:absolute;width:8px;height:4px;left:7px;top:-1px;border-top:1px solid #d9e4c2;rotate:32deg}.scene-birds i:nth-child(2){left:20px;top:9px;scale:.7;animation-delay:-.4s}
/* Commuters follow the street lattice. These are ambient illustrations, not extra resources. */
.city-activity{position:absolute;left:6px;right:6px;top:30px;height:360px;pointer-events:none;overflow:visible;z-index:12;display:none}
.city-map[data-populated=true] .city-activity{display:block}
.route-agent{position:absolute;inset:0;pointer-events:none;animation:colony-route 24s linear infinite;opacity:0}
.colonist{position:absolute;width:5px;height:8px;border-radius:3px 3px 2px 2px;background:#e7c19b;box-shadow:3px 4px 2px #0e282d55;animation:colonist-step .6s ease-in-out infinite alternate}
.colonist:before{content:'';position:absolute;left:0;top:-4px;width:5px;height:5px;border-radius:50%;background:#d9ceac;border-top:2px solid #718e81}.colonist:after{content:'';position:absolute;bottom:-3px;left:0;width:2px;height:3px;background:#385a55;box-shadow:3px 0 #385a55}
.citizen-b{animation-duration:31s;animation-delay:-15s}.citizen-b .colonist{background:#b6d4c1}.citizen-c{animation-duration:26s;animation-delay:-8s}.citizen-c .colonist{background:#d1b8c5}.citizen-d{animation-duration:34s;animation-delay:-24s}.citizen-d .colonist{background:#a7c7d5}
.city-map[data-activity=quiet] .citizen-c,.city-map[data-activity=quiet] .citizen-d{display:none}
.delivery-pod{animation-duration:19s;animation-delay:-11s;display:none}.city-map[data-powered=true] .delivery-pod{display:block}.courier-pod{position:absolute;left:-5px;top:-3px;width:13px;height:8px;border-radius:6px;background:linear-gradient(#bedbd0,#6c9d9c);border:1px solid #c2e0d5;box-shadow:0 5px 3px #08252e44;animation:pod-hover 1.6s ease-in-out infinite alternate}.courier-pod:before{content:'';position:absolute;left:3px;top:0;width:5px;height:2px;border-radius:4px;background:#426d80}
@keyframes colony-route{0%{transform:translate(37%,31.7%);opacity:0}3%{opacity:1}25%{transform:translate(76%,67.5%);opacity:1}40%{transform:translate(63%,79.5%);opacity:1}66%{transform:translate(24%,43.6%);opacity:1}83%{transform:translate(50%,31.7%);opacity:1}97%{opacity:1}100%{transform:translate(37%,31.7%);opacity:0}}
@keyframes garden-breeze{from{rotate:-9deg}to{rotate:8deg}}
@keyframes rotor-turn{to{rotate:360deg}}
@keyframes solar-sheen{0%,20%{translate:-120% 0}70%,100%{translate:120% 0}}
@keyframes colony-flag{from{transform:skewY(-6deg) scaleX(.75)}to{transform:skewY(8deg) scaleX(1)}}
@keyframes home-warmth{from{opacity:.7}to{opacity:1}}
@keyframes butterfly-drift{0%,100%{translate:-8px -3px;rotate:-10deg}35%{translate:6px -15px;rotate:18deg}70%{translate:14px 0;rotate:-12deg}}
@keyframes butterfly-wing{from{scale:.4 1}to{scale:1 1}}
@keyframes scene-cloud-drift{from{translate:0 0}to{translate:560px -12px}}
@keyframes birds-cross{0%{translate:-50px 5px}100%{translate:440px -25px}}
@keyframes bird-wing{from{scale:1 .6}to{scale:1 1.2}}
@keyframes colonist-step{from{translate:0 0;rotate:-3deg}to{translate:0 -1px;rotate:3deg}}
@keyframes pod-hover{from{translate:0 0}to{translate:0 -2px}}
.scene-paused .city-map *{animation-play-state:paused!important}
body.calm .city-activity,body.calm .scene-birds{display:none!important}
@media(prefers-reduced-motion:reduce){body:not(.lively) .city-activity,body:not(.lively) .scene-birds{display:none!important}}
@media(max-width:620px){body[data-view=play] .city-map *{animation-play-state:paused}.city-plot{height:102px}.city-plot>.city-building{scale:1.08}.city-map{min-height:414px}.plot-name{font-size:8px}}
