/* Buildings are independent image targets, never stretched with the map. */
#main-panel[data-view="city"]:has(.city-illustrated){overflow:auto}
.illustrated-city-stage{container-type:normal;flex:none;min-height:0;display:block;background:#e8e3d3;border:1px solid #b9ac8e}
.city-canvas.city-illustrated{--town-grass:#c2c6a4;--town-edge:#97a78d;position:relative;isolation:isolate;width:100%;height:auto;min-height:420px;max-height:none;aspect-ratio:3/1;border:0;box-shadow:inset 0 0 55px #69724925;background:radial-gradient(ellipse at 50% 50%,#f5efdf 0%,#e9e4d2 50%,transparent 80%),linear-gradient(125deg,var(--town-grass),#e7e3ce 40%,var(--town-edge));overflow:hidden}
.city-illustrated.theme-sea{--town-grass:#c5d6ce;--town-edge:#7faeb0}
.city-illustrated.theme-mountain{--town-grass:#c5c9c2;--town-edge:#9aa5a4}
.city-illustrated.theme-steppe{--town-grass:#d8c99e;--town-edge:#bfab79}
.city-setting{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;pointer-events:none;user-select:none}
.city-illustrated:before{content:"";position:absolute;inset:0;box-shadow:inset 0 0 22px #20342044;pointer-events:none;z-index:1}
.city-castle-title{display:none}
.city-illustrated .city-place{position:absolute;left:var(--building-x);top:var(--building-top);transform:translate(-50%,-50%);width:22%;max-width:290px;height:40%;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:0;padding:8px 6px 5px;border:1px solid transparent;border-radius:12px;background:transparent;filter:none;box-shadow:none;transition:background .15s,border-color .15s;z-index:1}
.city-illustrated .city-market{--building-x:18%;--building-top:35%}
.city-illustrated .city-gate{--building-x:86%;--building-top:23%;height:34%;width:20%}
.city-illustrated .city-arena{--building-x:41%;--building-top:80%;height:34%;width:20%}
.city-illustrated .city-square{--building-x:50%;--building-top:50%;height:24%;width:20%}
.city-illustrated .city-healer{--building-x:18%;--building-top:80%;height:34%;width:20%}
.city-illustrated .city-forge{--building-x:84%;--building-top:74%;height:34%;width:20%}
.city-illustrated .city-lab{--building-x:63%;--building-top:80%;height:34%;width:20%}
.city-building-art{display:block;flex:1;min-height:0;width:100%;pointer-events:none;filter:drop-shadow(0 6px 4px #44392035);transition:filter .15s}
.city-building-art img{display:block;width:100%;height:100%;object-fit:contain;object-position:center bottom}
.city-illustrated .city-place .building-label{position:static;display:block;flex:none;transform:none;opacity:1;visibility:visible;pointer-events:none;width:auto;max-width:100%;min-width:95px;padding:5px 10px;text-align:center;white-space:normal;color:#46371f;background:#faf6e9f2;border:1px solid #b4a17b;border-radius:3px;box-shadow:0 2px 4px #4f432322;font:13px/1.15 Georgia,serif;transition:none}
.city-illustrated .building-label strong{font-weight:600}
.city-illustrated .city-place .building-label small{display:block;font:10px/1.25 system-ui;color:#77674d;margin-top:3px}
.city-illustrated .city-place:hover,.city-illustrated .city-place:focus-visible{background:#fff9e724;border-color:#a88b53;z-index:3;outline:0}
.city-illustrated .city-place:focus-visible{outline:2px solid #7f642d;outline-offset:2px}
.city-illustrated .city-place:hover .city-building-art,.city-illustrated .city-place:focus-visible .city-building-art{filter:drop-shadow(0 6px 4px #44392035) brightness(1.06)}
.city-illustrated .city-place.current{background:#fff2ba1c;border-color:#aa853b}
.city-illustrated .city-place.destination{background:#d8e7ef40;border-color:#527c90}
.city-illustrated .city-place.current .building-label{background:#fff1c6;border-color:#aa853b}
.city-illustrated .city-place.destination .building-label{background:#e7f1f5;border-color:#527c90}
.city-building-state{position:absolute;top:1px;left:50%;transform:translateX(-50%);padding:3px 9px;border:1px solid #a17b34;border-radius:20px;background:#fff0bd;color:#73501c;white-space:nowrap;font:600 10px/1.2 system-ui;box-shadow:0 2px 4px #4f432322;pointer-events:none}
.destination .city-building-state{background:#e4f0f5;border-color:#527c90;color:#355a70}
@media(max-width:1100px){.city-illustrated .city-place .building-label small{display:none}.city-illustrated .city-place .building-label{font-size:12px;padding:5px 7px}}
@media(prefers-reduced-motion:reduce){.city-illustrated .city-place,.city-building-art{transition:none}}

.city-illustrated .city-place:disabled{cursor:default;opacity:.85}
.city-illustrated .city-place:disabled:hover{background:transparent;border-color:transparent}
.city-illustrated .city-place.current:disabled{opacity:1;border-color:#aa853b;background:#fff2ba1c}
#main-panel[data-view="city"] .gate-actions{flex:none;margin-bottom:8px}

/* Keep the reserved label space so revealing a name never moves the building. */
@media (hover:hover) and (pointer:fine){
 .city-illustrated .city-place .building-label{opacity:0;visibility:hidden}
 .city-illustrated .city-place:hover .building-label,
 .city-illustrated .city-place:focus-visible .building-label{opacity:1;visibility:visible}
}

/* Desktop hit areas stay invisible; names and art indicate hover and travel. */
#game .city-illustrated :is(.city-place,.city-castle-entry){background:transparent;border-color:transparent;box-shadow:none;outline:none}
#game .city-illustrated .city-place:focus-visible .building-label,
 #game .city-illustrated .city-castle-entry:focus-visible .castle-entry-label{outline:2px solid #916918;outline-offset:2px}

/* Adventurers' guild occupies the open courtyard east of the square. */
.city-illustrated .city-place.city-guild{display:none}
.city-illustrated .city-place.city-guild{display:flex;--building-x:67%;--building-top:50%;width:14%;height:24%}
.city-illustrated .city-guild .building-label{position:absolute;left:50%;bottom:-12px;transform:translateX(-50%);width:max-content;max-width:190%}

/* Desktop-only ambient life. Every decorative pixel is click-through. */
.city-life-wind,.city-life-people{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;user-select:none}
.city-life-wind{z-index:0;overflow:hidden}
.city-life-patch{position:absolute;pointer-events:none;user-select:none}
.city-life-people{z-index:2}
.city-life-marker{position:absolute;z-index:3;transform:translate(-50%,3px);padding:1px 6px;border-radius:9px;background:#fff0c4e8;border:1px solid #ac8c47;color:#674916;font:600 10px/1.25 system-ui;pointer-events:none;white-space:nowrap}
.city-life-control{display:inline-flex;align-items:center;gap:5px;margin-left:auto;color:#76694e;font:11px/1.3 system-ui;white-space:nowrap}
.city-life-control select{width:auto;min-width:94px;margin:0;padding:4px 6px;font:inherit;background:#fbf8ed;color:#65553b;border:1px solid #bdad89}
.city-life-control:focus-within{outline:2px solid #916918;outline-offset:2px}
