:root { --bg: #fff; --fg: #1d1d1f; --m: #6b6b70; --line: #d9d9de; --acc: #1f5fd6; }
html, body { margin: 0; height: 100%; font: 14px/1.4 system-ui, sans-serif; color: var(--fg); background: var(--bg); }
#map { position: absolute; inset: 0 0 0 300px; }
#side { position: absolute; left: 0; top: 0; bottom: 0; width: 300px; box-sizing: border-box; padding: 10px 12px;
  overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg); z-index: 1000; }
#side .head { display: flex; justify-content: space-between; align-items: center; font-size: 16px; margin-bottom: 4px; }
#side .row { margin: 8px 0; display: block; }
#side select, #side input[type=text], #search { width: 100%; box-sizing: border-box; padding: 5px 6px; font: inherit; }
#fZones label { margin-right: 10px; white-space: nowrap; }
#cats label { display: flex; align-items: center; gap: 6px; padding: 2px 0; cursor: pointer; }
#cats .sw { width: 14px; height: 14px; border-radius: 3px; flex: none; border: 1px solid #0003; }
#cats .n { margin-left: auto; color: var(--m); }
#cats h4 { margin: 10px 0 2px; font-size: 13px; color: var(--m); font-weight: 600; }
.m { color: var(--m); font-size: 13px; }
.foot { margin-top: 14px; }
button { font: inherit; cursor: pointer; }
#hideSide, #showSide { border: 1px solid var(--line); background: var(--bg); border-radius: 6px; padding: 2px 8px; }
#showSide { position: absolute; left: 10px; top: 80px; z-index: 1000; display: none; font-size: 18px; }
body.noside #side { display: none; }
body.noside #map { left: 0; }
body.noside #showSide { display: block; }
#card { position: absolute; right: 10px; top: 10px; bottom: 10px; width: 380px; max-width: calc(100% - 20px);
  box-sizing: border-box; overflow-y: auto; background: var(--bg); z-index: 1000; border-radius: 10px;
  box-shadow: 0 4px 20px #0004; padding: 12px 14px; }
#card h3 { margin: 0 30px 6px 0; font-size: 16px; }
#card .x { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 18px; }
#card .f { margin: 6px 0; }
#card .k { color: var(--m); font-size: 12px; display: block; }
#card ul { margin: 2px 0; padding-left: 18px; }
#card select, #card textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 4px; }
#card textarea { min-height: 70px; }
#card .save { margin-top: 6px; background: var(--acc); color: #fff; border: 0; border-radius: 6px; padding: 6px 14px; }
#card .warn { color: #b3261e; }
#card .cat { display: inline-block; padding: 1px 8px; border-radius: 10px; color: #fff; font-size: 13px; }
#card .hist { font-size: 12px; color: var(--m); }
#card .mini { border: 1px solid var(--line); background: none; border-radius: 4px; padding: 0 6px; font-size: 12px; }
@media (max-width: 700px) {
  #side { width: 100%; bottom: auto; max-height: 70%; border-bottom: 1px solid var(--line); }
  #map { left: 0; }
  #card { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-width: none; max-height: 60%; border-radius: 10px 10px 0 0; }
}
.pt .k { display: block; color: var(--m); font-size: 12px; }
.pt b { font-size: 14px; user-select: all; }
.pt .mini { margin-top: 4px; border: 1px solid var(--line); background: none; border-radius: 4px; padding: 1px 8px; font-size: 12px; cursor: pointer; }
#layers h4 { margin: 10px 0 2px; font-size: 13px; color: var(--m); font-weight: 600; }
#layers label { display: flex; align-items: center; gap: 6px; padding: 2px 0; cursor: pointer; flex-wrap: wrap; }
#layers .sw { width: 14px; height: 10px; border: 2px solid; border-radius: 2px; flex: none; }
#layers .hint { font-size: 11px; }
.zl { background: none; border: 0; white-space: nowrap; font: 600 12px system-ui, sans-serif; color: #222;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff; transform: translate(-50%, -50%); }
.zl.prj { color: #1a237e; font-style: italic; }
.pt .info { margin-top: 6px; max-width: 280px; }
.pt .info .k { margin-top: 4px; }
#off button { border: 1px solid var(--line); background: var(--bg); border-radius: 4px; padding: 1px 8px; margin: 2px 2px 0 0; }
.lyr-pane canvas { pointer-events: none !important; } /* слои не перехватывают клики у мест */
.ml { background: rgba(255,255,255,0.9); border: 1px solid #d500f9; border-radius: 3px; padding: 0 3px; white-space: pre;
  font: 600 11px system-ui, sans-serif; color: #4a0072; transform: translate(-50%, -50%); text-align: center; }
.ml.big { font-size: 13px; border-width: 2px; }
.mtools a { font-size: 16px; line-height: 30px; }
#mBar { display: none; position: absolute; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 1100; background: #fff;
  border-radius: 8px; box-shadow: 0 2px 10px #0004; padding: 6px 10px; font-size: 13px; max-width: 80%; }
#mBar.on { display: block; }
#mBar button { font: inherit; border: 1px solid var(--line); background: var(--bg); border-radius: 4px; padding: 1px 8px; }
.measuring { cursor: crosshair !important; }
.measuring .leaflet-interactive { cursor: crosshair !important; }
#chkDlg { position: fixed; left: 50%; top: 20%; transform: translateX(-50%); z-index: 3000; background: var(--bg);
  border-radius: 10px; box-shadow: 0 6px 30px #0006; padding: 14px 16px; width: min(460px, 92vw); }
#chkDlg input { width: 100%; box-sizing: border-box; font: inherit; padding: 5px 6px; margin: 8px 0; }
#chkDlg button { font: inherit; border: 1px solid var(--line); background: var(--bg); border-radius: 4px; padding: 2px 10px; }
#chkSet .mini { border: 1px solid var(--line); background: none; border-radius: 4px; padding: 0 6px; font-size: 12px; }
#card .save.chk { background: #2e7d32; margin-right: 6px; }
#noAccess { position: fixed; inset: 0; z-index: 5000; background: var(--bg); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 20px; }
