
/* The Tiled map shares the existing game scene, NPCs and player. */
body.tiled-city-enabled.scene-city #world{inset:0 auto auto 0!important;width:177.777778dvh!important;height:100dvh!important;background:#477e2c}
body.tiled-city-enabled #city-scene{z-index:auto;overflow:visible;background:#477e2c}
body.tiled-city-enabled #city-scene .tiled-city-world{transform:none;background:#477e2c}
body.tiled-city-enabled #city-scene .tiled-city-tile{position:absolute;object-fit:fill;pointer-events:none;image-rendering:auto;filter:brightness(1) saturate(1.02) contrast(1.04)}
body.tiled-city-enabled #city-scene .tiled-city-object{object-fit:fill;transform-origin:50% 100%;pointer-events:none;filter:brightness(.82) saturate(.92) contrast(1.05) drop-shadow(1px 3px 1px #0005)}
body.tiled-city-enabled #city-scene .tiled-city-object.mined{opacity:1;filter:brightness(.82) saturate(.92) contrast(1.05) drop-shadow(1px 3px 1px #0005)}
body.tiled-city-enabled #city-scene .city-sprite[data-npc-frames]{transform:translate(-50%,-100%);filter:drop-shadow(1px 3px 1px #0005)}
body.tiled-city-enabled #city-scene .city-sprite[data-sprite-key="blacksmithHouse"]{pointer-events:auto;cursor:pointer}
body.tiled-city-enabled #city-scene #city-to-plot{left:50%;top:93%;z-index:2200}
body.tiled-city-enabled #city-scene .city-mine-road-gate{z-index:2200}
body.tiled-city-enabled #city-scene .city-npc-name{z-index:2300}
body.tiled-city-enabled.scene-city #player{isolation:isolate}

/* Ground-level plaza, scaled with the map; no new obstacles or click targets. */
body.tiled-city-enabled #city-scene .city-fountain-plaza{
 position:absolute;z-index:7;pointer-events:none;image-rendering:pixelated;
 clip-path:polygon(24% 0,76% 0,100% 30%,100% 70%,76% 100%,24% 100%,0 70%,0 30%);
 background:#655b47;
}
body.tiled-city-enabled #city-scene .city-fountain-plaza::before,
body.tiled-city-enabled #city-scene .city-fountain-plaza::after{
 content:"";position:absolute;pointer-events:none;clip-path:inherit;
}
body.tiled-city-enabled #city-scene .city-fountain-plaza::before{
 inset:1.47% .93%;background:#b4a17d;
}
body.tiled-city-enabled #city-scene .city-fountain-plaza::after{
 inset:4.41% 2.78%;
 background:url('../../assets/maps/city/tiled/target-stone-a.png') repeat;
 background-size:25.49% 41.94%;
 filter:brightness(.98) saturate(.78);
}

/* Fade only foliage hiding the local avatar; the lower trunk/roots remain solid. */
@property --tree-canopy-alpha{syntax:"<number>";inherits:false;initial-value:1}
body.tiled-city-enabled #city-scene .tiled-city-tree{
 --tree-canopy-alpha:1;
 -webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,var(--tree-canopy-alpha)) 0%,rgba(0,0,0,var(--tree-canopy-alpha)) calc(var(--tree-canopy-end) - 12%),#000 var(--tree-canopy-end));
 mask-image:linear-gradient(to bottom,rgba(0,0,0,var(--tree-canopy-alpha)) 0%,rgba(0,0,0,var(--tree-canopy-alpha)) calc(var(--tree-canopy-end) - 12%),#000 var(--tree-canopy-end));
 transition:--tree-canopy-alpha .16s ease-out;
}
body.tiled-city-enabled #city-scene .tiled-city-tree.tree-canopy-occluding{--tree-canopy-alpha:.42}
body.tiled-city-enabled #city-scene .tiled-city-tree.felled{-webkit-mask-image:none;mask-image:none}
@media(prefers-reduced-motion:reduce){
 body.tiled-city-enabled #city-scene .tiled-city-tree{transition:none}
}
