.vacant-lots{position:absolute;inset:0;z-index:3;pointer-events:none}.vacant-lot{position:absolute;width:13.5%;height:13.5%;transform:translate(-50%,-100%);pointer-events:none;animation:parcel-reveal .35s ease-out}.vacant-lot>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:50% 100%;filter:brightness(.88) saturate(.7) drop-shadow(0 2px 2px #10262255)}.lot-caption{position:absolute;left:5%;right:5%;bottom:22%;display:flex;align-items:center;justify-content:center;gap:5px;white-space:nowrap;text-shadow:0 1px 3px #102821,0 0 4px #102821}.lot-caption>small{font-size:9px;color:#dacb9b}.lot-caption>b{font:12px var(--game-font);color:#f3dfa8}.world.overview .lot-caption{display:none}@keyframes parcel-reveal{from{opacity:0}to{opacity:1}}.plots .plot.sold .building-visual>img{animation:building-retire .55s ease-in forwards}.plot.sold .building-pick{pointer-events:none}.map-widget.sold{display:none}@keyframes building-retire{from{opacity:1;transform:translateY(0) scale(1)}to{opacity:0;transform:translateY(20px) scale(.94,.8)}}.neighborhood-label{position:absolute;transform:translate(-50%,-50%) rotate(23deg);font:24px var(--game-font);color:#f7e8b29c;letter-spacing:.15em;text-shadow:0 2px 3px #102c2b;white-space:nowrap}.world.overview .building-visual>img{filter:var(--building-outline,brightness(1)) drop-shadow(6px 10px 5px #00171d66)}
#game.playing .city-backdrop{background:var(--district-surround,#22362f);filter:none}#world-scene>#city-surround{inset:-600%;background:radial-gradient(#73836515 1px,transparent 1px) 0 0/11px 11px,var(--district-surround,#26392f)}#world-scene>#city-surround:after{inset:0}#world-scene>#ground{left:-100%;top:-100%;width:300%;height:300%;mask-image:linear-gradient(90deg,transparent,#000 4%,#000 96%,transparent),linear-gradient(0deg,transparent,#000 4%,#000 96%,transparent);mask-composite:intersect}
/* The camera owns the continuous city. Trade controls are a separate world
   layer above every depth-sorted sprite, including newly completed buildings. */
.world{z-index:0;isolation:isolate}.world-scene{z-index:0}.play-screen>.world:after{z-index:2}.world>.map-leaders{z-index:3}.world>.world-ui{z-index:4}.world>.world-ui,.world>.map-leaders{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.city-surround{position:absolute;inset:0;z-index:0;pointer-events:none}.city-surround>img{position:absolute;width:100%;height:100%;max-width:none;object-fit:fill}.city-surround:after{content:'';position:absolute;inset:-100%;background:var(--district-tint,transparent);pointer-events:none}
.game-shell.playing .city-backdrop{background-image:url('assets/isometric-city.webp');filter:brightness(.8)}.game-shell.playing .atmosphere{z-index:1;background:none}.play-screen{z-index:2}.world{position:absolute;inset:0;overflow:clip;touch-action:none;cursor:grab}.world:after{content:'';position:absolute;inset:0;z-index:3000;pointer-events:none;background:radial-gradient(ellipse at 50% 48%,transparent 48%,#08222844 100%),linear-gradient(0deg,#09232977,transparent 19%,transparent 87%,#0b262b33)}.world.dragging{cursor:grabbing}.world-scene{position:absolute;left:50%;top:50%;transform-origin:50% 50%;isolation:isolate;will-change:transform}.world-scene>#ground,.plots,.world-ui,.map-leaders,#float-layer{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.world-scene>#ground{z-index:0}.plots{z-index:10;isolation:isolate}.world-ui{z-index:1000;isolation:isolate}.map-leaders{z-index:999;overflow:visible}.map-leaders path{stroke:#d3ceac99;stroke-width:1;fill:none}#float-layer{z-index:2000}
.plot{position:absolute;width:calc(13% * var(--building-scale,1));height:calc(32% * var(--building-scale,1));transform:translate(-50%,-100%);pointer-events:none}.building-pick{position:absolute;inset:0;padding:0;width:100%;height:100%;background:none;pointer-events:auto;cursor:pointer}.building-visual>img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;object-position:bottom;filter:var(--building-outline,brightness(1)) drop-shadow(10px 15px 8px #00171d66);transform-origin:50% 100%;animation:building-rise .7s cubic-bezier(.15,.8,.25,1.08) both;transition:filter .4s,transform .4s}.building-pick:active{translate:none}.plot:hover .building-visual>img{filter:var(--building-outline,brightness(1)) brightness(1.06) drop-shadow(10px 15px 8px #00171d66)}.plot.sold .building-visual>img{filter:grayscale(1) brightness(.62) drop-shadow(10px 15px 8px #00171d55);transform:translateY(7px) scale(.97)}.plot.building .building-visual>img,.plot.reserved .building-visual>img{animation:construction-breathe 3s ease-in-out infinite;filter:var(--building-outline,brightness(1)) drop-shadow(8px 12px 8px #00171d66)}.plot .building-visual>img.finished-building{animation:building-rise .7s cubic-bezier(.15,.8,.25,1.08) both}.world.dragging .building-pick{pointer-events:none}
.construction-sparks{display:none;position:absolute;bottom:17%;left:40%;width:3px;height:3px;background:#ffdb85;box-shadow:7px -8px #ffbb5b,-5px 5px #ffdb85,11px 3px #ffdb85;animation:construction-spark .7s infinite;pointer-events:none}.plot.building .construction-sparks,.plot.reserved .construction-sparks{display:block}
.map-widget{position:absolute;width:112px;transform:translate(-50%,0) scale(var(--price-scale,1));transform-origin:50% 0;pointer-events:none;text-align:center;filter:drop-shadow(0 3px 3px #00191f88)}.price-tag{display:flex;flex-direction:column;gap:2px;width:112px;height:45px;justify-content:center;border:1px solid #c5c39a99;border-bottom:0;border-radius:6px 6px 0 0;background:linear-gradient(#29433ff5,#153033f5);box-shadow:inset 0 2px 0 #fff1;white-space:nowrap}.price-tag small{font-size:10px;color:#dfd8b8;letter-spacing:-.04em}.tag-row{display:flex;justify-content:center;align-items:center;gap:6px}.price-tag strong{font-size:16px;color:#fff2d0;font-weight:800;line-height:1.1;letter-spacing:-.05em}.price-tag em{font-style:normal;font-size:15px}.plot-trade{display:block;width:112px;height:32px;min-height:32px;margin:0;padding:3px 8px;font-family:var(--game-font);font-size:17px;color:#244139;background:linear-gradient(#b2e9c5,#72bca5);border:1px solid #d8e8b2;border-radius:0 0 6px 6px;box-shadow:inset 0 2px 0 #fff5,inset 0 -3px 0 #3a827c66,0 3px 0 #0b2528;pointer-events:auto;animation:trade-button-in .3s cubic-bezier(.2,.8,.2,1.1) both}.plot-trade:active:not(:disabled){translate:0 2px}.plot-trade.buy,.plot-trade.bid,.plot-trade.reserve{color:#3b3d2e;background:linear-gradient(#f8daa0,#dbad6d);border-color:#ffdf9f;box-shadow:inset 0 2px 0 #fff5,inset 0 -3px 0 #a46c4366,0 3px 0 #0b2528}.plot-trade.cancel{color:#d7e7dd;background:linear-gradient(#527176,#314e58);border-color:#9dbebd;font-size:15px}.plot-trade:disabled{background:linear-gradient(#435754,#2e4444);color:#9fb0a2;border-color:#71867a;box-shadow:inset 0 1px 0 #fff1,0 3px 0 #0b2528;opacity:.85}.map-widget.owned .price-tag{border-color:#b6dfac;background:linear-gradient(#294d41f5,#153831f5)}.map-widget.reserved .price-tag{border-color:#9fcfd6}.map-widget.auction .price-tag{background:linear-gradient(#59482cf5,#342f24f5);border-color:#f2cc83}.map-widget.building .price-tag small,.map-widget.reserved .price-tag small{color:#f4d09a}.map-widget.sold .price-tag{height:45px;border-bottom:1px solid #7f9482;border-radius:6px;color:#b3bdb1;background:#263d3ee8}.map-widget.sold .price-tag strong,.map-widget.sold .price-tag small{color:#b4bdb1}.map-widget.sold .plot-trade{display:none}.map-widget.selected{filter:drop-shadow(0 0 7px #f7d49277)}.map-widget.selected .price-tag{border-color:#ffe4a6}.map-widget .plot-trade[data-afford=false]{opacity:.82}
.float-text{position:absolute;transform:translate(-50%,-50%);font-family:var(--game-font);font-size:29px;color:#c9ffc7;text-shadow:0 3px 1px #123633,0 0 10px #071f25;z-index:20;pointer-events:none;white-space:nowrap;animation:money-float 1.5s ease-out forwards}.float-text.negative{color:#ffac97}.float-text small{display:block;font-size:17px;text-align:center;margin-top:4px;color:#ffe2a0}
@keyframes building-rise{0%{opacity:0;transform:translateY(48px) scaleY(.65)}75%{opacity:1;transform:translateY(-5px) scaleY(1.02)}100%{opacity:1;transform:translateY(0) scaleY(1)}}@keyframes trade-button-in{from{opacity:0;translate:0 -9px;scale:.85}to{opacity:1;translate:0 0;scale:1}}@keyframes construction-breathe{50%{filter:var(--building-outline,brightness(1)) drop-shadow(8px 12px 8px #00171d66) brightness(1.1)}}@keyframes construction-spark{0%,60%,100%{opacity:0}20%,40%,80%{opacity:.9}}@keyframes money-float{0%{opacity:0;translate:0 5px}15%,60%{opacity:1}100%{opacity:0;translate:0 -65px}}
/* Selection follows the image's own contact plane and shares its pixel anchor. */
.building-visual{position:absolute;inset:0;transform:translate(var(--sprite-x,0px),var(--sprite-y,0px));pointer-events:none;isolation:isolate}
.building-visual>img{z-index:1}
.building-footprint{position:absolute;inset:0;width:100%;height:100%;overflow:visible;z-index:0;pointer-events:none;opacity:0;transition:opacity .15s}
.building-footprint polygon{fill:#e9cb7942;stroke:#f7d985;stroke-width:1.25;stroke-linejoin:bevel;vector-effect:non-scaling-stroke}
.building-footprint polyline{fill:none;stroke:#fff0ad;stroke-width:2;stroke-linejoin:bevel;vector-effect:non-scaling-stroke}
.building-footprint-front{z-index:2}.building-footprint-front polygon{fill:#e9cb7928;stroke:none}.building-footprint-front polyline{stroke:#ffe7a0;stroke-width:2.2}
.plot.selected .building-footprint{opacity:1}.plot.sold .building-footprint{opacity:0}


/* Only the city painting fades; HUD and screen-space prices stay sharp. */
#ground.district-arrival{animation:district-arrival .5s ease-out both}@keyframes district-arrival{from{opacity:.3}to{opacity:1}}html.reduced-motion #ground.district-arrival{animation:none}@media(prefers-reduced-motion:reduce){#ground.district-arrival{animation:none}}

/* The name/price button is the primary property selector; trading is separate. */
.price-tag{padding:0;align-items:center;font-family:var(--game-font);pointer-events:auto;cursor:pointer;touch-action:none}
.price-tag:active:not(:disabled){translate:none}.price-tag small{display:block;max-width:106px;overflow:hidden;text-overflow:ellipsis}
.map-widget.hovered .price-tag,.map-widget.selected .price-tag{border-color:#ffe4a6;box-shadow:inset 0 0 0 1px #ffe4a633}
.plot.hovered,.plot.selected{--building-outline:url(#building-outline)}
.plot.hovered .building-footprint{opacity:1}.plot.sold{--building-outline:brightness(1)}
.world.dragging .price-tag{pointer-events:none}.world.dragging .building-pick,.world.dragging .price-tag{cursor:grabbing}
