@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #19211d;
  --muted: #6d7771;
  --line: #e2e7e4;
  --paper: #ffffff;
  --soft: #f5f7f5;
  --green: #1e6a4b;
  --green-deep: #15543a;
  --green-soft: #e6f2ec;
  --parcel: #d5841c;
  --building: #b65347;
  --shadow: 0 14px 40px rgba(27, 45, 35, 0.14), 0 2px 8px rgba(27, 45, 35, 0.08);
  --header-height: 68px;
  font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  height: 100%;
  background: var(--soft);
}

.app-header {
  position: relative;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  stroke: none;
  fill: currentColor;
}

.brand-mark .brand-mark-accent {
  fill: #e7b75c;
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.015em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-link {
  border: 0;
  background: none;
  padding: 9px 11px;
  color: #4b5650;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.header-link:hover {
  color: var(--green);
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  background: var(--soft);
}

.icon-button svg {
  width: 20px;
  height: 20px;
}

.header-help {
  margin-left: 4px;
  color: #66706b;
}

.language-pill {
  position: relative;
  width: 72px;
  height: 42px;
  margin-left: 5px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #3f4944;
  font-size: 12px;
  font-weight: 800;
}

.language-pill select {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  appearance: none;
  padding: 0 28px 0 14px;
  border: 0;
  border-radius: inherit;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.language-pill svg {
  position: absolute;
  right: 9px;
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.map-workspace {
  position: relative;
  height: calc(100% - var(--header-height));
  overflow: hidden;
}

#map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #e5e8e3;
}

.leaflet-container {
  font-family: inherit;
  cursor: crosshair;
}

.identify-pulse {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
}

.identify-pulse span {
  width: 14px;
  height: 14px;
  display: block;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 2px var(--green), 0 3px 10px rgba(20, 61, 42, 0.3);
  animation: identify-pulse 0.8s ease-out infinite;
}

@keyframes identify-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(30, 106, 75, 0.55), 0 3px 10px rgba(20, 61, 42, 0.3);
  }
  100% {
    box-shadow: 0 0 0 11px rgba(30, 106, 75, 0), 0 3px 10px rgba(20, 61, 42, 0.08);
  }
}

.leaflet-control-attribution {
  padding: 2px 7px !important;
  border-radius: 5px 0 0 0;
  font-size: 9px !important;
}

.search-panel {
  position: absolute;
  z-index: 600;
  top: 18px;
  left: 76px;
  width: min(500px, calc(100vw - 590px));
}

.search-box {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 0 15px;
  border: 1px solid rgba(218, 225, 220, 0.95);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 24px rgba(31, 48, 39, 0.13);
}

.search-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: #6f7973;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
}

.search-box input::placeholder {
  color: #8d9691;
}

.search-box kbd {
  padding: 3px 6px;
  border: 1px solid #d9dfdb;
  border-radius: 5px;
  background: #f8f9f8;
  color: #929a95;
  font-family: inherit;
  font-size: 9px;
  box-shadow: 0 1px 0 #d8ddd9;
}

.search-submit {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 17px;
  border: 0;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.search-submit:hover {
  background: var(--green-deep);
}

.search-results {
  display: none;
  margin-top: 7px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-results.is-open {
  display: grid;
}

.search-result {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.search-result:hover,
.search-result:focus-visible {
  background: var(--soft);
  outline: 0;
}

.result-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff2df;
  color: var(--parcel);
}

.result-icon svg {
  width: 17px;
  height: 17px;
}

.result-copy {
  min-width: 0;
  display: grid;
}

.result-copy strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-copy small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-area {
  color: #65706a;
  font-size: 9px;
}

.empty-result {
  padding: 16px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.map-toolbar {
  position: absolute;
  z-index: 550;
  top: 18px;
  left: 17px;
  display: grid;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 7px 20px rgba(31, 48, 39, 0.12);
}

.map-tool {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #58635d;
  cursor: pointer;
}

.map-tool:hover {
  background: #f0f3f1;
}

.map-tool.is-active {
  background: var(--green-soft);
  color: var(--green);
}

.map-tool svg {
  width: 19px;
  height: 19px;
}

.tool-separator {
  height: 1px;
  margin: 3px 6px;
  background: var(--line);
}

.zoom-stack {
  position: absolute;
  z-index: 500;
  top: 168px;
  left: 17px;
  display: grid;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 7px 20px rgba(31, 48, 39, 0.12);
}

.map-control {
  width: 37px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #445049;
  font-size: 23px;
  font-weight: 400;
  cursor: pointer;
}

.map-control:hover {
  background: var(--soft);
}

.locate-control svg {
  width: 18px;
  height: 18px;
}

.control-separator {
  height: 1px;
  margin: 2px 5px;
  background: var(--line);
}

.basemap-switch {
  position: absolute;
  z-index: 500;
  top: 18px;
  right: 436px;
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 7px 20px rgba(31, 48, 39, 0.1);
}

.basemap-option {
  height: 33px;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #68716c;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.basemap-option.is-active {
  background: var(--green);
  color: #fff;
}

.yandex-logo {
  position: absolute;
  z-index: 460;
  bottom: 0;
  left: 0;
  width: 88px;
  height: 48px;
}

.yandex-logo[hidden] {
  display: none;
}

.yandex-logo img {
  width: 88px;
  height: 48px;
  display: block;
}

.layers-button {
  position: absolute;
  z-index: 500;
  bottom: 50px;
  left: 17px;
  width: 202px;
  min-height: 54px;
  display: grid;
  grid-template-columns: 38px 1fr 18px;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  text-align: left;
  cursor: pointer;
}

.layers-button > span:nth-child(2) {
  display: grid;
}

.layers-button strong {
  font-size: 11px;
  font-weight: 750;
}

.layers-button small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
}

.layers-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

.layers-icon svg,
.layers-button .chevron {
  width: 18px;
  height: 18px;
}

.layers-button .chevron {
  color: #7c8580;
}

.layers-panel {
  position: absolute;
  z-index: 800;
  bottom: 50px;
  left: 17px;
  width: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
}

.layers-panel[hidden] {
  display: none;
}

.layers-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 14px 13px 17px;
  border-bottom: 1px solid var(--line);
}

.layers-panel header > div {
  display: grid;
}

.layers-panel header strong {
  font-size: 13px;
}

.layers-panel header small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.layer-group {
  padding: 12px 16px 7px;
}

.layer-group + .layer-group {
  border-top: 1px solid var(--line);
}

.group-title {
  display: block;
  margin-bottom: 6px;
  color: #8b948f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.layer-row {
  min-height: 49px;
  display: grid;
  grid-template-columns: 28px 1fr 34px;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.layer-name {
  min-width: 0;
  display: grid;
}

.layer-name strong {
  font-size: 10px;
  font-weight: 700;
}

.layer-name small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.layer-legend {
  width: 25px;
  height: 19px;
  border-radius: 4px;
}

.parcel-legend {
  border: 2px solid var(--parcel);
  background: rgba(240, 175, 76, 0.18);
}

.building-legend {
  border: 2px solid var(--building);
  background: rgba(182, 83, 71, 0.24);
}

.label-legend {
  display: grid;
  place-items: center;
  color: #53605a;
  font-size: 9px;
  font-weight: 800;
}

.zone-legend {
  border: 2px dashed #7b6b9b;
  background: rgba(123, 107, 155, 0.08);
}

.layer-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 20px;
  background: #c8cfcb;
  transition: 0.2s ease;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: 0.2s ease;
}

.layer-row input:checked + .toggle {
  background: var(--green);
}

.layer-row input:checked + .toggle::after {
  transform: translateX(14px);
}

.object-drawer {
  position: absolute;
  z-index: 700;
  top: 0;
  right: 0;
  width: 410px;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.985);
  box-shadow: -6px 0 24px rgba(31, 48, 39, 0.09);
  transform: translateX(0);
  transition: transform 0.28s ease;
}

.object-drawer:not(.is-open) {
  transform: translateX(105%);
}

.object-drawer.has-feedback .drawer-header,
.object-drawer.has-feedback .status-line,
.object-drawer.has-feedback .object-tabs,
.object-drawer.has-feedback .drawer-content,
.object-drawer.has-feedback .drawer-actions {
  display: none;
}

.drawer-feedback {
  min-height: 0;
  display: none;
  flex: 1;
  flex-direction: column;
}

.object-drawer.has-feedback .drawer-feedback {
  display: flex;
}

.drawer-feedback-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 21px 0 23px;
}

.drawer-feedback-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(56px, 12vh, 104px) 30px 28px;
  text-align: center;
}

.drawer-spinner {
  position: relative;
  width: 58px;
  height: 58px;
  margin-bottom: 24px;
}

.drawer-spinner i {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(30, 106, 75, 0.14);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: drawer-spin 1s linear infinite;
}

.drawer-spinner i:nth-child(2) {
  inset: 8px;
  border-color: rgba(213, 139, 46, 0.14);
  border-right-color: var(--parcel);
  animation-direction: reverse;
  animation-duration: 0.8s;
}

.drawer-spinner i:nth-child(3) {
  inset: 22px;
  border: 0;
  background: var(--green);
  animation: drawer-breathe 1s ease-in-out infinite alternate;
}

@keyframes drawer-spin {
  to { transform: rotate(360deg); }
}

@keyframes drawer-breathe {
  to { transform: scale(0.65); opacity: 0.55; }
}

.drawer-feedback-body h2 {
  margin: 0;
  color: #202824;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.drawer-feedback-body > p {
  max-width: 270px;
  margin: 9px 0 28px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.drawer-skeleton {
  width: 100%;
  display: grid;
  gap: 10px;
}

.skeleton-line,
.skeleton-card {
  display: block;
  overflow: hidden;
  border-radius: 7px;
  background: #edf1ee;
}

.skeleton-line::after,
.skeleton-card::after {
  content: "";
  width: 55%;
  height: 100%;
  display: block;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.82), transparent);
  animation: skeleton-shimmer 1.25s ease-in-out infinite;
}

.skeleton-line { height: 10px; }
.skeleton-line-wide { width: 72%; }
.skeleton-line-short { width: 42%; margin-bottom: 7px; }
.skeleton-card { height: 48px; }
.skeleton-card-small { height: 34px; }

@keyframes skeleton-shimmer {
  from { transform: translateX(-110%); }
  to { transform: translateX(210%); }
}

.drawer-error-icon {
  width: 58px;
  height: 58px;
  display: none;
  place-items: center;
  margin-bottom: 24px;
  border-radius: 50%;
  background: #fff2e7;
  color: #b9621d;
}

.drawer-error-icon svg {
  width: 27px;
  height: 27px;
}

.object-drawer.is-error .drawer-spinner,
.object-drawer.is-error .drawer-skeleton {
  display: none;
}

.object-drawer.is-error .drawer-error-icon {
  display: grid;
}

.drawer-handle {
  display: none;
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 21px 11px 23px;
}

.object-kicker {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.drawer-header h1 {
  margin: 5px 0 0;
  color: #202824;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 23px 16px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 8.5px;
  font-weight: 750;
}

.status-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #29986d;
}

.updated-date {
  color: #929a96;
  font-size: 8px;
}

.object-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 23px;
  border-bottom: 1px solid var(--line);
}

.object-tab {
  position: relative;
  height: 43px;
  border: 0;
  background: transparent;
  color: #7f8883;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.object-tab::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: -1px;
  left: 8px;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: transparent;
}

.object-tab.is-active {
  color: var(--green);
}

.object-tab.is-active::after {
  background: var(--green);
}

.object-tab span {
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 10px;
  background: #edf0ee;
  color: #68726c;
  font-size: 7px;
}

.drawer-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #c9d0cc transparent;
}

.tab-content[hidden] {
  display: none;
}

.property-section {
  padding: 20px 23px;
  border-bottom: 1px solid var(--line);
}

.property-section h2 {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 800;
}

.property-list {
  margin: 0;
}

.property-list > div {
  display: grid;
  grid-template-columns: minmax(0, 44%) minmax(0, 1fr);
  gap: 10px;
  padding: 7px 0;
}

.property-list dt {
  color: #7b847f;
  font-size: 9px;
}

.property-list dd {
  margin: 0;
  color: #28312c;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.45;
  text-align: right;
}

.section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.section-toggle svg {
  width: 17px;
  height: 17px;
  color: #76807a;
}

.section-body {
  margin-top: 14px;
}

.section-body[hidden] {
  display: none;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.price-row strong {
  color: #202824;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.025em;
}

.price-row span {
  color: #5f6963;
  font-size: 9px;
  font-weight: 650;
}

.property-section p {
  margin: 6px 0 0;
  color: #909894;
  font-size: 8px;
  line-height: 1.5;
}

.compact-section {
  padding-top: 16px;
  padding-bottom: 16px;
}

.context-intro {
  background: #f1f6f3;
}

#contextTab p {
  color: #66736b;
  font-size: 11px;
  line-height: 1.55;
}

.context-item {
  margin: 12px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.context-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

#contextTab a {
  color: #22674a;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}

#contextTab .property-list dt,
#contextTab .property-list dd {
  font-size: 11px;
  overflow-wrap: anywhere;
}

.context-retry {
  margin-top: 12px;
  padding: 8px 12px;
  border: 1px solid #a5bbae;
  border-radius: 6px;
  background: white;
  color: #22674a;
  cursor: pointer;
}

.building-selection label {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
}

.building-selection select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #c9d4cd;
  border-radius: 6px;
  background: white;
  padding: 6px;
  font: inherit;
  font-size: 11px;
}

.building-selection p {
  color: #637068;
  font-size: 11px;
}

.candidate-button {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid #c9d4cd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
}

.measure-handle {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
}

.measure-handle::after {
  content: "";
  width: 13px;
  height: 13px;
  border: 2px solid white;
  border-radius: 50%;
  background: #1e6a4b;
  box-shadow: 0 1px 5px #0005;
}

.measure-midpoint::after {
  width: 10px;
  height: 10px;
  border: 2px solid #1e6a4b;
  background: white;
}

.measure-handle:hover::after,
.measure-handle:focus-visible::after {
  outline: 3px solid #69b99699;
}

.building-card {
  padding: 18px 23px 0;
}

.building-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border: 1px solid #e0e5e2;
  border-radius: 10px;
  background: #f8faf8;
}

.building-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f2e7e4;
  color: var(--building);
}

.building-icon svg {
  width: 20px;
  height: 20px;
}

.building-heading > div {
  min-width: 0;
  display: grid;
}

.building-heading small {
  color: var(--muted);
  font-size: 8px;
}

.building-heading strong {
  overflow: hidden;
  margin-top: 3px;
  font-size: 10px;
  text-overflow: ellipsis;
}

.drawer-actions {
  display: flex;
  gap: 8px;
  padding: 13px 23px 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.primary-action,
.secondary-action {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

.primary-action {
  flex: 1;
  padding: 0 18px;
  background: var(--green);
  color: #fff;
  font-size: 10px;
  font-weight: 750;
}

.primary-action:hover {
  background: var(--green-deep);
}

.primary-action svg,
.secondary-action svg {
  width: 17px;
  height: 17px;
}

.secondary-action {
  width: 42px;
  border: 1px solid var(--line);
  background: #fff;
  color: #5d6761;
}

.secondary-action:hover {
  background: var(--soft);
}

.reopen-card {
  position: absolute;
  z-index: 500;
  top: 18px;
  right: 17px;
  height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--green);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.reopen-card[hidden] {
  display: none;
}

.reopen-card svg {
  width: 17px;
  height: 17px;
}

.map-status {
  position: absolute;
  z-index: 450;
  bottom: 13px;
  left: calc(50% - 205px);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border: 1px solid rgba(219, 225, 221, 0.88);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(31, 48, 39, 0.08);
  color: #68716c;
  font-size: 8px;
  transform: translateX(-50%);
  backdrop-filter: blur(5px);
}

.map-workspace.drawer-closed .map-status {
  left: 50%;
}

.map-workspace.drawer-closed .basemap-switch {
  right: 17px;
}

.map-workspace.drawer-closed .map-hint {
  right: 17px;
}

.map-status i {
  width: 1px;
  height: 11px;
  background: #d4dad6;
}

.map-status button {
  border: 0;
  border-radius: 5px;
  background: var(--green);
  color: #fff;
  font-size: 8px;
  cursor: pointer;
}

.measurement-panel {
  position: absolute;
  z-index: 750;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  width: 350px;
  /* Keep space for the fixed layer button on narrow desktop/tablet maps. */
  max-width: calc(100% - 470px);
  padding: 20px 22px;
  border: 1px solid #c5d8cb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 32px #193c2529;
}

.measurement-panel[hidden] {
  display: none;
}

.measurement-label,
.measurement-value,
.measurement-perimeter {
  display: block;
}

.measurement-label {
  color: #53685b;
  font-size: 13px;
  font-weight: 700;
}

.measurement-value {
  margin: 5px 0;
  color: #15543a;
  font-size: 34px;
  line-height: 1.25;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.measurement-perimeter {
  color: #334e3e;
  font-size: 15px;
  font-weight: 650;
}

.measurement-hint {
  margin: 12px 0;
  color: #64736a;
  font-size: 11px;
  line-height: 1.55;
}

#cancelMeasure {
  min-height: 36px;
  padding: 7px 15px;
  border: 1px solid #a5bbae;
  border-radius: 7px;
  background: white;
  color: #22674a;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.map-workspace.is-measuring .map-status,
.map-workspace.is-measuring .map-hint {
  display: none;
}

.map-hint {
  position: absolute;
  z-index: 520;
  right: 427px;
  bottom: 13px;
  max-width: 360px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #e7dcbe;
  border-radius: 8px;
  background: rgba(255, 249, 232, 0.94);
  color: #735e28;
  box-shadow: 0 4px 12px rgba(31, 48, 39, 0.08);
  font-size: 7.5px;
  backdrop-filter: blur(5px);
}

.map-hint > svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
}

.map-hint strong {
  margin-right: 3px;
}

.map-hint button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.parcel-label {
  width: auto !important;
  height: auto !important;
  padding: 2px 4px;
  border: 0;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 1px 3px rgba(45, 52, 48, 0.2);
  color: #805419;
  font-family: "Manrope", sans-serif;
  font-size: 7px;
  font-weight: 750;
  white-space: nowrap;
}

.leaflet-tooltip.parcel-label::before {
  display: none;
}

.modal-backdrop {
  position: fixed;
  z-index: 2000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 28, 23, 0.45);
  backdrop-filter: blur(4px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: min(430px, 100%);
  padding: 30px;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 30px 80px rgba(10, 25, 17, 0.27);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
}

.modal-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
}

.modal-mark svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  stroke: none;
}

.modal h2 {
  margin: 19px 0 10px;
  font-size: 21px;
}

.modal p {
  margin: 8px 0;
  color: #69736d;
  font-size: 11px;
  line-height: 1.7;
}

.modal-action {
  width: 100%;
  margin-top: 20px;
}

.toast {
  position: fixed;
  z-index: 3000;
  bottom: 28px;
  left: 50%;
  max-width: min(360px, calc(100vw - 30px));
  padding: 11px 16px;
  border-radius: 9px;
  background: #202b25;
  box-shadow: var(--shadow);
  color: #fff;
  font-size: 10px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.measurement-toast {
  top: calc(var(--header-height) + 72px);
  bottom: auto;
}

@media (max-width: 980px) {
  .header-link {
    display: none;
  }

  .search-panel {
    width: calc(100vw - 520px);
  }

  .search-result {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .result-area {
    display: none;
  }

  .basemap-switch {
    right: 426px;
  }

  .map-hint {
    display: none;
  }
}

@media (max-width: 760px) {
  .measurement-panel {
    /* The panel yields space to controls; controls never depend on its height. */
    bottom: 208px;
    max-width: calc(100% - 20px);
    max-height: calc(100% - 350px);
    padding: 12px 14px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
  }

  .measurement-label,
  .measurement-value,
  .measurement-perimeter {
    grid-column: 1;
  }

  .measurement-value {
    font-size: 30px;
  }

  .measurement-hint {
    grid-column: 1 / -1;
    margin: 8px 0 0;
  }

  #cancelMeasure {
    grid-column: 2;
    grid-row: 1 / 4;
    align-self: center;
  }

  :root {
    --header-height: 60px;
  }

  .app-header {
    padding: 0 13px;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
  }

  .brand-copy strong {
    font-size: 13px;
  }

  .brand-copy small,
  .header-help {
    display: none;
  }

  .language-pill {
    margin-left: 0;
  }

  .search-panel {
    top: 11px;
    right: 12px;
    left: 58px;
    width: auto;
  }

  .search-box {
    height: 44px;
  }

  .search-box kbd,
  .search-submit {
    display: none;
  }

  .map-toolbar {
    top: 11px;
    left: 10px;
    padding: 3px;
  }

  .map-toolbar .tool-separator,
  .map-toolbar #printButton {
    display: none;
  }

  .map-tool {
    width: 38px;
    height: 38px;
  }

  .zoom-stack {
    top: 145px;
    left: 10px;
  }

  .basemap-switch {
    top: auto;
    right: 10px;
    bottom: 96px;
  }

  .layers-button {
    bottom: 96px;
    left: 10px;
    width: 48px;
    min-height: 48px;
    grid-template-columns: 1fr;
    padding: 5px;
  }

  .layers-button > span:nth-child(2),
  .layers-button > .chevron {
    display: none;
  }

  .layers-panel {
    right: 10px;
    bottom: 95px;
    left: 10px;
    width: auto;
  }

  .object-drawer {
    top: auto;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    height: min(66vh, 560px);
    border: 1px solid var(--line);
    border-radius: 17px;
    box-shadow: 0 -10px 35px rgba(21, 36, 28, 0.2);
    transform: translateY(0);
  }

  .object-drawer:not(.is-open) {
    transform: translateY(110%);
  }

  .drawer-handle {
    width: 38px;
    height: 4px;
    display: block;
    flex: 0 0 auto;
    margin: 8px auto -4px;
    border-radius: 4px;
    background: #d8ddda;
  }

  .drawer-header {
    padding: 14px 18px 8px;
  }

  .drawer-header h1 {
    font-size: 18px;
  }

  .status-line {
    padding: 0 18px 11px;
  }

  .object-tabs,
  .property-section,
  .drawer-actions {
    padding-right: 18px;
    padding-left: 18px;
  }

  .reopen-card {
    top: auto;
    right: 10px;
    bottom: 154px;
  }

  .map-status {
    left: 50%;
    bottom: 9px;
    white-space: nowrap;
  }

  .map-hint {
    display: none;
  }
}

@media print {
  .app-header,
  .search-panel,
  .map-toolbar,
  .zoom-stack,
  .basemap-switch,
  .yandex-logo,
  .layers-button,
  .layers-panel,
  .map-hint,
  .map-status,
  .drawer-actions {
    display: none !important;
  }

  .map-workspace {
    height: 100vh;
  }

  .object-drawer {
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drawer-spinner i,
  .skeleton-line::after,
  .skeleton-card::after {
    animation-duration: 2.5s;
  }
}
