:root { --accent:#176b63; --bg:#f1f5f3; --text:#19332f; --border:#dce6e1; }
.topbar { background:#fcfdfb; }
.map-intro { max-width:1540px; margin:25px auto 12px; padding:0 24px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.eyebrow { font-size:10px; letter-spacing:.13em; font-weight:800; color:#498277; }
.map-intro h1 { margin:8px 0; font-size:clamp(26px,3vw,36px); letter-spacing:-.035em; }
.map-intro p { margin:0; font-size:14px; color:var(--muted); }
.map-intro-badge { border:1px solid #c7dcd2; border-radius:22px; padding:10px 17px; background:#e9f1eb; font-size:12px; color:#386457; white-space:nowrap; }
.stats { max-width:1540px; padding:8px 24px 16px; gap:8px; }
.stats div { padding:10px 14px; border-radius:10px; display:flex; gap:10px; align-items:center; }
.stats b { font-size:21px; }
.stats div:nth-child(2) b { color:#238757; }
.stats div:nth-child(3) b { color:#c24b3c; }
.stats div:nth-child(4) b { color:#a16e12; }
.scheme-public { max-width:1540px; padding:0 24px 30px; grid-template-columns:minmax(0,1fr) 330px; grid-template-areas:'controls controls' 'scheme report' 'summary report'; gap:12px; align-items:start; }
.scheme-controls { display:block; padding:16px 20px; border-radius:12px; }
.scheme-controls > div:first-child { display:flex; align-items:baseline; gap:20px; margin-bottom:12px; }
.scheme-controls h2 { font-size:17px; }
.filter-grid { grid-template-columns:minmax(220px,1.4fr) 1fr 150px minmax(130px,.7fr); }
.filter-grid label { font-size:11px; font-weight:600; color:#577369; }
.filter-grid input,.filter-grid select { background:#f8faf8; border-radius:8px; }
.scheme-card { border-radius:12px; }
#scheme.town-map { height:66svh; min-height:480px; max-height:900px; width:100%; background:#e8efea; }
#admin-scheme.town-map { position:relative; height:640px; min-height:440px; }
.town-map { position:relative; overflow:hidden; }
.map-mode-controls { position:absolute; z-index:5; top:12px; left:12px; display:flex; gap:6px; }
.map-mode-controls button { min-height:42px; border-radius:9px; background:#fff; color:#24483e; padding:0 13px; border:1px solid #d8e1db; box-shadow:0 2px 8px #16372b15; font-size:12px; font-weight:700; }
.map-mode-controls button:first-child { background:#176b63; color:#fff; min-width:46px; }
.map-mode-controls button:disabled { opacity:.5; cursor:wait; }
.map-3d-note { position:absolute; top:62px; left:12px; background:#fffffff0; color:#52695f; padding:5px 9px; font-size:10px; border-radius:6px; z-index:3; pointer-events:none; }
.map-3d-note[hidden],.map-message[hidden] { display:none; }
.map-message { position:absolute; left:12px; right:55px; top:90px; padding:14px; z-index:10; background:#fff; border:1px solid #dbe5df; border-radius:8px; font:13px/1.5 system-ui; box-shadow:0 4px 20px #17352b15; cursor:pointer; }
.maplibregl-ctrl button { min-height:0; border-radius:0; padding:0; background-color:transparent; }
.maplibregl-ctrl-group button { width:38px; height:38px; }
.maplibregl-ctrl-attrib { font-size:10px; }
.maplibregl-ctrl-attrib a { color:#365147; }
.maplibregl-ctrl-scale { font-size:10px; background:#ffffffe0; }
.map-lamp { background:transparent; color:#238757; border:0; box-shadow:none; padding:0; min-height:44px; min-width:44px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.map-lamp:hover { background:transparent; }
.map-lamp.status-broken { color:#d34037; }
.map-lamp.status-repair { color:#d99a20; }
.map-lamp.status-disabled { color:#737e79; }
.map-lamp-dot { display:block; border:3px solid #fff; box-shadow:0 2px 8px #22372f50; background:currentColor; width:22px; height:22px; border-radius:50%; font-size:0; }
.map-lamp-label { background:#fff; border-radius:5px; color:#243f35; padding:2px 5px; font-size:10px; margin-left:3px; box-shadow:0 1px 4px #22372f25; max-width:110px; overflow:hidden; text-overflow:ellipsis; }
.map-lamp:focus-visible,.map-mode-controls button:focus-visible { outline:3px solid #f3b534; outline-offset:2px; }
.scheme-legend { position:absolute; left:10px; bottom:32px; right:auto; width:auto; display:flex; gap:12px; padding:7px 10px; background:#fffffff2; border-radius:7px; font-size:11px; }
.scheme-object-card { bottom:76px; border-radius:10px; z-index:8; }
.report-panel { padding:22px; border-radius:12px; max-height:none; overflow:visible; }
.report-panel h3 { font-size:21px; line-height:1.25; margin:10px 0; }
.report-panel .selected { border:1px dashed #bcd1c6; background:#f2f7f3; padding:13px; border-radius:9px; margin:16px 0; }
.report-panel label { font-size:12px; }
.report-panel input,.report-panel textarea,.report-panel select { border-radius:8px; }
.map-object-summary { grid-area:summary; font-size:12px; color:#61796d; padding:0 4px; margin:0; }
.address-search { position:relative; }
.address-results { position:absolute; z-index:1050; top:100%; left:0; right:0; background:#fff; border:1px solid var(--border); border-radius:10px; box-shadow:0 10px 30px #193d2820; padding:5px; max-height:300px; overflow:auto; }
.address-results[hidden] { display:none; }
.address-results button { display:block; width:100%; text-align:left; background:#fff; color:#254a40; border:0; border-radius:6px; font-size:13px; min-height:44px; font-weight:500; }
.address-results button:hover,.address-results button:focus { background:#edf5ef; }
.address-results p { padding:7px; font-size:12px; line-height:1.4; font-weight:400; }
.mobile-report-action { background:#176b63; }
@media(max-width:1000px) {
  .scheme-public { grid-template-columns:1fr; grid-template-areas:'controls' 'scheme' 'summary' 'report'; padding:0 12px 22px; }
  .filter-grid { grid-template-columns:1fr 1fr; }
  .filter-grid .search-field { grid-column:auto; }
  .map-intro { padding:0 16px; margin-top:19px; }
  .map-intro-badge { display:none; }
  .stats { padding:12px; }
  .scheme-controls > div:first-child { display:block; }
  .scheme-controls { padding:13px; }
  .report-panel { max-width:none; }
}
@media(max-width:540px) {
  .topbar { min-height:54px; padding:0 14px; }
  .map-intro h1 { font-size:28px; }
  .map-intro p { font-size:12px; line-height:1.5; }
  .stats div { display:block; padding:8px; }
  .stats b { font-size:20px; }
  .stats span { font-size:10px; }
  .scheme-controls h2 { font-size:15px; }
  .compact-help { font-size:11px; }
  .filter-grid { grid-template-columns:1fr 1fr; gap:8px; }
  .filter-grid .address-search { grid-column:1/-1; }
  .filter-grid .search-field { grid-column:1/-1; }
  .filter-grid input,.filter-grid select { min-height:42px; padding:9px; font-size:16px; }
  #scheme.town-map { height:62svh; min-height:430px; }
  #admin-scheme.town-map { height:60svh; min-height:430px; }
  .map-mode-controls { top:9px; left:9px; }
  .scheme-legend { gap:8px; font-size:10px; }
  .scheme-legend span:nth-child(1) { display:inline; }
  .report-panel { padding:18px; }
}
