.district-game-host,.district-review-stage { position:relative; min-width:0; min-height:0; overflow:hidden; background:#17201c; }
.district-game-host { position:absolute; inset:0; z-index:1; }
.district-surface { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); isolation:isolate; }
.district-surface img { position:absolute; inset:0; display:block; width:100%; height:100%; max-width:none; object-fit:contain; filter:none; transform:none; pointer-events:none; }
.district-background { z-index:0; }
.district-building[data-district=factory] { z-index:20; }
.district-building[data-district=settlement] { z-index:10; }
.district-building[data-district=railway] { z-index:30; }
.district-surface[hidden],.district-surface img[hidden],.district-game-host[hidden] { display:none; }
.district-status { position:absolute; left:10px; right:10px; bottom:10px; z-index:5; width:fit-content; max-width:calc(100% - 20px); padding:6px 10px; border:1px solid #b9a46f; background:#15201deb; color:#f5ebcc; font:13px/1.4 Arial,sans-serif; letter-spacing:0; overflow-wrap:anywhere; }
.district-status:empty { display:none; }
.scene.district-panorama-active { isolation:isolate; }
.scene.district-panorama-active > .scene-asset-layer,.scene.district-panorama-active > .scene-progression-layers { display:none!important; }
.scene.district-panorama-active::before,.scene.district-panorama-active::after { display:none!important; }
.scene.district-panorama-active .map-markers {
  inset:auto auto 12px 50%;
  z-index:40;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  width:min(680px,calc(100% - 24px));
  height:auto;
  transform:translateX(-50%);
}
.scene.district-panorama-active .map-marker.upgrade-marker {
  position:relative;
  inset:auto;
  width:100%;
  min-width:0;
  max-width:none;
  transform:none;
}
.scene.district-panorama-active .map-marker.upgrade-marker:hover:not(:disabled),
.scene.district-panorama-active .map-marker.upgrade-marker:focus-visible:not(:disabled) {
  transform:translateY(-2px);
}
.scene.district-panorama-active .map-marker::after,
.scene.district-panorama-active .marker-stem { display:none; }
body:has(#modal.show) .scene .map-markers,
body:has(#gameMenuOverlay:not([hidden])) .scene .map-markers,
body:has(#tutorialLayer:not([hidden])) .scene .map-markers,
body:has(.trade-overlay.show) .scene .map-markers,
body:has(.difficulty-overlay.show) .scene .map-markers,
body:has(.internal-confirm.show) .scene .map-markers { display:none!important; }
@media(max-width:700px) {
  .scene.district-panorama-active .map-markers {
    bottom:8px;
    gap:5px;
    width:calc(100% - 16px);
  }
  .scene.district-panorama-active .map-marker.upgrade-marker {
    padding:6px;
  }
  .scene.district-panorama-active .marker-emblem { display:none; }
}
.painted-review-launch { position:absolute; left:12px; top:12px; z-index:8; padding:8px 12px; border:1px solid #c2a969; border-radius:3px; background:#1b241f; color:#f9ecc9; font:14px/1.2 Arial,sans-serif; cursor:pointer; }
.district-review { position:fixed; inset:0; z-index:50000; display:grid; grid-template-rows:auto minmax(0,1fr) auto; background:#17201c; color:#f7edcf; font:16px/1.4 Arial,sans-serif; isolation:isolate; }
.district-review[hidden] { display:none; }
.district-review * { box-sizing:border-box; letter-spacing:0; }
.district-review header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 18px; border-bottom:1px solid #586658; }
.district-review header strong { font-size:19px; }
.district-review footer { display:flex; align-items:center; gap:20px; padding:12px 18px; border-top:1px solid #586658; }
.district-review-levels { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; flex:1; }
.district-review label { display:grid; grid-template-columns:1fr auto; align-items:center; gap:5px; margin:0; color:inherit; font:14px/1.3 Arial,sans-serif; min-width:0; }
.district-review output { font:13px/1.3 Arial,sans-serif; color:#dbd4bb; }
.district-review input[type=range] { grid-column:1 / -1; width:100%; min-width:0; height:24px; padding:0; margin:0; accent-color:#d9bd77; cursor:pointer; }
.district-review button,.district-review select { min-width:0; min-height:40px; padding:8px 12px; border:1px solid #79856c; border-radius:3px; background:#25352b; color:#fbf0d1; font:14px/1.3 Arial,sans-serif; cursor:pointer; box-shadow:none; text-transform:none; }
.district-review .district-season { grid-template-columns:1fr; }
.district-review button:hover { background:#364837; }
.district-review :is(button,input,select):focus-visible { outline:2px solid #e4c375; outline-offset:3px; }
body.district-review-open { overflow:hidden; }
@media(max-width:650px) {
  .district-review header { padding:8px 10px; }
  .district-review header strong { font-size:16px; }
  .district-review header button { max-width:135px; }
  .district-review footer { flex-wrap:wrap; gap:10px; padding:10px; }
  .district-review-levels { flex-basis:100%; gap:12px; }
  .district-review label { font-size:13px; }
  .district-review .district-season { grid-template-columns:auto 1fr; flex:1; }
  .district-review button,.district-review select { padding:6px 8px; font-size:13px; }
  .district-review-stage .district-status { font-size:12px; }
}
@media(max-height:450px) and (min-width:651px) {
  .district-review header { padding:5px 10px; }
  .district-review footer { padding:6px 10px; gap:12px; }
  .district-review-levels { gap:12px; }
  .district-review button,.district-review select { min-height:32px; padding:4px 8px; }
}

/* Runtime diagnostics are available to tools/editor, never overlay the game. */
.district-game-host .district-status{display:none}

