html, body, #map { height: 100%; margin: 0; }
body { font-family: system-ui, Arial, sans-serif; overflow: hidden; color: #1c1c1c; }
.panel {
  position: absolute;
  z-index: 1000;
  top: 10px;
  right: 10px;
  background: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  font-size: 15px;
  max-width: 340px;
  max-height: calc(100% - 20px);
  overflow: auto;
}
.panel label { display: block; margin: 6px 0 0; cursor: pointer; }
.legend-scope { margin: 8px 0 2px; font-size: 12px; color: #555; }
.legend-help { margin: 1px 0 7px 28px; font-size: 12px; line-height: 1.3; color: #444; }
#legend-details { display: none; }
#legend-details summary { cursor: pointer; font-size: 14px; margin: 4px 0; }
.panel input[type=checkbox] { transform: scale(1.35); margin-right: 8px; }
.panel h1 { margin: 0 0 6px; font-size: 16px; line-height: 1.3; }
.panel input[type=text], .panel select {
  width: 100%;
  box-sizing: border-box;
  padding: 6px;
  font-size: 15px;
  margin-top: 4px;
}
.panel button, .panel .btn {
  display: block;
  margin-top: 6px;
  padding: 8px 10px;
  font-size: 15px;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #1c1c1c;
  cursor: pointer;
}
.panel button.primary, .panel a.primary { background: #c62828; color: #fff; border-color: #c62828; }
.ic {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 3px #000; color: #fff; font-weight: bold; font-size: 16px;
  line-height: 24px; text-align: center;
}
.k { background: #1e9e3a; }
.q { background: #f08c00; }
.x { background: #d00000; }
.v { background: #888; }
.lg {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  vertical-align: middle; margin-right: 4px; color: #fff; font-size: 11px;
  text-align: center; line-height: 16px;
}
.leaflet-popup-content { font-size: 14px; line-height: 1.35; margin: 10px 12px; }
.st { font-weight: bold; font-size: 15px; }
.small, .note { font-size: 12px; color: #555; }
#search-msg { min-height: 1em; margin: 4px 0 0; }
#notice { background: #fff4e5; border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; }
#tp-badge {
  position: fixed;
  left: 10px;
  bottom: 22px;
  z-index: 1000;
  background: rgba(255,255,255,.94);
  padding: 5px 10px;
  border-radius: 6px;
  font: 13px/1.35 sans-serif;
  box-shadow: 0 1px 4px rgba(0,0,0,.3);
  max-width: min(320px, calc(100% - 20px));
}
#tp-badge a.brand { color: #c62828; font-weight: 800; text-decoration: none; letter-spacing: .03em; }
#tp-badge a.full { font-weight: 600; }
#tp-badge .lic { font-size: 11px; color: #333; }
.cluster {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 4px #000; color: #fff; font-weight: 700; font-size: 12px;
  line-height: 32px; text-align: center;
}
.c-k { background: #1e9e3a; }
.c-q { background: #f08c00; }
.c-x { background: #d00000; }
.c-v { background: #888; }
.c-mix { background: #6d4c41; }
.reopen { font-size: 16px; padding: 6px 10px; }
#loading {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.86); font-size: 18px; text-align: center; padding: 24px;
}
.vvk-comments:empty { display: none; }
.vvk-comments { margin-top: 8px; }
.cmt-head { font-weight: 700; margin-top: 4px; }
.cmt-list { list-style: none; margin: 4px 0; padding: 0; }
.cmt-list li { border-top: 1px solid #eee; padding: 5px 0; }
.cmt-meta { color: #555; font-size: 12px; }
.cmt-text { white-space: pre-wrap; }
.cmt-actions button, .cmt-form button { width: auto; margin: 4px 6px 0 0; padding: 4px 8px; }
.cmt-form textarea, .login-dialog input { width: 100%; box-sizing: border-box; font: inherit; padding: 6px; }
.cmt-form textarea { min-height: 64px; }
.auth-user, .auth-msg { font-size: 13px; margin: 4px 0; }
.auth-msg { color: #6d4c41; }
.login-back {
  position: fixed; inset: 0; z-index: 4000; background: rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.login-back[hidden] { display: none; }
.login-dialog { background: #fff; border-radius: 8px; padding: 14px; width: min(360px, 100%); box-shadow: 0 4px 20px rgba(0,0,0,.3); }
.login-dialog h2 { margin: 0 0 8px; font-size: 18px; }
.login-dialog label { display: block; margin: 8px 0; }
.login-dialog button { margin: 8px 8px 0 0; padding: 8px 12px; }
.recent-comments {
  position: fixed; z-index: 1000; left: 10px; top: 84px; width: min(280px, calc(100% - 20px));
  max-height: 42vh; overflow: auto; background: #fff; border-radius: 8px; padding: 8px 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.3); font-size: 14px;
}
.recent-comments[hidden] { display: none; }
.recent-item { display: block; width: 100%; text-align: left; background: #fff; border: 0; border-top: 1px solid #eee; padding: 6px 0; cursor: pointer; font: inherit; }
.recent-text { display: block; color: #333; }
.leaflet-div-icon.cmt-badge-icon { background: transparent; border: 0; }
.cmt-badge {
  min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: #c62828; color: #fff;
  font: 700 10px/16px system-ui, sans-serif; text-align: center; border: 1px solid #fff; box-shadow: 0 0 2px #000;
}
.cluster { position: relative; }
.cmt-dot { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: #c62828; border: 1px solid #fff; }
@media (max-width: 700px) {
  .recent-comments { top: 52px; max-height: 24vh; }
}
@media (max-width: 700px) {
  #tp-badge { top: 10px; left: 52px; bottom: auto; font-size: 12px; }
  .panel { top: auto; bottom: 8px; left: 8px; right: 8px; max-width: none; max-height: 46vh; }
  #legend-details { display: block; }
  .legend-help { display: none; }
  #legend-details[open] ~ .leg .legend-help { display: block; }
}
