:root {
  color-scheme: light;
  --bg: #f6f4ef;
  --panel: #fffdf8;
  --ink: #202124;
  --muted: #687076;
  --line: #d9d3c8;
  --accent: #1b7f79;
  --accent-strong: #0d5f5a;
  --danger: #a74032;
  --admin-accent: var(--accent);
  --admin-accent-strong: var(--accent-strong);
  --admin-accent-soft: rgba(27, 127, 121, 0.12);
  --admin-focus: rgba(27, 127, 121, 0.16);
  --admin-panel-bg: #fffdf8;
  --admin-control-bg: #ffffff;
  --admin-control-muted-bg: #f6f4ef;
  --admin-border: var(--line);
  --admin-text: var(--ink);
  --admin-muted: var(--muted);
  --shadow: 0 16px 40px rgba(25, 33, 38, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body,
.app-shell {
  width: 100%;
  height: 100%;
  margin: 0;
}

html,
body {
  min-height: 100%;
  overflow: hidden;
}

body {
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.is-hidden {
  display: none !important;
}

.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  overflow: auto;
  background: #f1f3f8;
}

.auth-card {
  width: min(420px, 100%);
  padding: 28px;
  background: #ffffff;
  border: 1px solid #d2d2d2;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(167, 172, 180, 0.28);
}

.auth-card h1 {
  margin: 0;
  color: #2e2e2e;
  font-size: 32px;
  font-weight: 800;
}

.auth-card p {
  margin: 10px 0 20px;
  color: #5c6570;
  font-size: 14px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 7px;
}

.auth-form span {
  color: #2e2e2e;
  font-size: 13px;
  font-weight: 750;
}

.auth-form input {
  min-height: 42px;
  background: #fafbfd;
  border-color: #d2d2d2;
  border-radius: 6px;
}

.auth-form input:focus {
  border-color: #d31b2c;
  box-shadow: 0 0 0 3px rgba(211, 27, 44, 0.12);
}

.auth-form button,
.admin-user-form button,
.admin-temp-password button {
  min-height: 40px;
  color: #ffffff;
  cursor: pointer;
  background: var(--admin-accent);
  border: 0;
  border-radius: 6px;
  font-weight: 800;
}

.auth-form button:hover,
.admin-user-form button:hover,
.admin-temp-password button:hover {
  background: var(--admin-accent-strong);
}

.auth-form button:disabled,
.admin-user-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.auth-error {
  margin: 14px 0 0;
  color: #d31b2c;
  font-size: 13px;
  font-weight: 650;
}

.app-shell {
  position: fixed;
  inset: 0;
  display: block;
  width: auto;
  height: auto;
  max-height: none;
  min-height: 0;
  overflow: hidden;
}

.filters-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(360px, 100vw);
  min-width: 0;
  min-height: 0;
  height: auto;
  align-self: stretch;
  padding: 20px;
  overflow-y: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  background: var(--panel);
  border-right: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition:
    width 180ms ease,
    padding 180ms ease;
}

.app-shell.filters-collapsed .filters-panel {
  width: 72px;
  padding: 16px;
  overflow: hidden;
}

.app-shell.filters-collapsed .brand-title,
.app-shell.filters-collapsed .filters-form,
.app-shell.filters-collapsed #reset-filters {
  display: none;
}

.app-shell.filters-collapsed .brand-row {
  justify-content: center;
}

.filters-toggle-button {
  font-size: 22px;
  line-height: 1;
}

.app-shell.filters-collapsed .filters-toggle-button {
  transform: rotate(180deg);
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.brand-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
}

.brand-row p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  color: var(--ink);
  cursor: pointer;
  background: #f0ece3;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.icon-button:hover {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.reset-button {
  min-height: 40px;
  padding: 9px 12px;
  color: #ffffff;
  font-weight: 750;
  cursor: pointer;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
}

.reset-button:hover {
  background: var(--accent-strong);
}

.filter-reset-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 13px;
  line-height: 1;
  vertical-align: -2px;
}

.filter-reset-button:hover {
  color: var(--accent-strong);
  background: rgba(27, 127, 121, 0.08);
  border-color: rgba(27, 127, 121, 0.18);
}

.filter-title-with-reset {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
}

.mobile-filter-reset {
  display: none;
}

.filters-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field,
.field-set {
  min-width: 0;
}

.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-wide {
  width: 100%;
}

.field span,
.field-set legend {
  color: #3b4145;
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 127, 121, 0.16);
}

select[multiple] {
  min-height: 104px;
}

.search-suggestions,
.searchable-select-panel {
  position: absolute;
  z-index: 900;
  right: 0;
  left: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(25, 33, 38, 0.16);
}

.search-suggestions {
  top: calc(100% + 4px);
  max-height: 260px;
  overflow-y: auto;
}

.search-suggestions.is-hidden,
.searchable-select-panel.is-hidden {
  display: none;
}

.suggestion-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  color: var(--ink);
  cursor: pointer;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #ece6dc;
  text-align: left;
}

.suggestion-item:hover,
.suggestion-item:focus {
  background: #f6f4ef;
}

.suggestion-item span {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-item small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.native-select-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.searchable-select {
  position: relative;
  min-width: 0;
}

.searchable-select:focus-within {
  z-index: 950;
}

.searchable-select-button {
  position: relative;
  width: 100%;
  min-height: 40px;
  padding: 9px 34px 9px 10px;
  color: var(--ink);
  cursor: pointer;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.searchable-select-button::after {
  position: absolute;
  top: 50%;
  right: 12px;
  content: "⌄";
  color: var(--muted);
  transform: translateY(-50%);
}

.searchable-select-button:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(27, 127, 121, 0.16);
}

.searchable-select-panel {
  top: calc(100% + 4px);
  padding: 7px;
  overflow: hidden;
}

.searchable-select-search {
  min-height: 34px;
  margin-bottom: 7px;
  padding: 7px 9px;
  border-radius: 6px;
}

.searchable-select-options {
  max-height: 216px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.searchable-select-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 6px 7px;
  color: var(--ink);
  cursor: pointer;
  border-radius: 6px;
  line-height: 1.22;
}

.searchable-select-option:hover {
  background: #f6f4ef;
}

.searchable-select-option.is-selected {
  color: #ffffff;
  background: var(--accent);
}

.searchable-select-option.is-selected:hover {
  background: #166d68;
}

.searchable-select-option input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.searchable-select-option.is-selected input {
  accent-color: #ffffff;
}

.searchable-select-option span {
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.searchable-select-divider {
  height: 1px;
  margin: 7px 2px;
  background: #ded6ca;
}

.searchable-select-empty {
  padding: 10px 6px;
  color: var(--muted);
  font-size: 13px;
}

.field-set {
  padding: 0;
  margin: 0;
  border: 0;
}

.room-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(42px, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.room-options label,
.checkbox-list label {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 8px;
  color: #2f363a;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.room-options input,
.checkbox-list input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.room-options label:has(input:checked),
.checkbox-list label:has(input:checked) {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  max-height: 220px;
  margin-top: 8px;
  overflow-y: auto;
}

.checkbox-list-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: none;
  overflow: visible;
}

.checkbox-list label {
  justify-content: flex-start;
  text-align: left;
}

.checkbox-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-wrap {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: min(360px, 100vw);
  min-width: 0;
  min-height: 0;
  height: auto;
  align-self: stretch;
  overflow: hidden;
  transition:
    top 180ms ease,
    left 180ms ease;
}

.app-shell.filters-collapsed .map-wrap {
  left: 72px;
}

.map-user-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 700;
  display: flex;
  gap: 8px;
  align-items: center;
  pointer-events: auto;
}

.map-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  color: var(--ink);
  cursor: pointer;
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(25, 33, 38, 0.16);
  font-size: 13px;
  font-weight: 750;
  line-height: 1;
  backdrop-filter: blur(6px);
  white-space: nowrap;
}

.map-action-button:hover {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.logout-button {
  color: #ffffff;
  background: var(--danger);
  border-color: var(--danger);
}

.logout-button:hover {
  color: #ffffff;
  background: #7f2f25;
  border-color: #7f2f25;
}

.map-page-invest {
  --admin-accent: #d31b2c;
  --admin-accent-strong: #9b1827;
  --admin-accent-soft: rgba(211, 27, 44, 0.1);
  --admin-focus: rgba(211, 27, 44, 0.12);
  --admin-panel-bg: #ffffff;
  --admin-control-bg: #fafbfd;
  --admin-control-muted-bg: #f1f3f8;
  --admin-border: #d2d2d2;
  --admin-text: #2e2e2e;
  --admin-muted: #5c6570;
  background: #f1f3f8;
}

.app-shell-invest .filters-panel {
  width: min(380px, 100vw);
  gap: 16px;
  padding: 18px;
  background: #ffffff;
  border-right: 1px solid #d2d2d2;
  box-shadow: 0 14px 34px rgba(167, 172, 180, 0.26);
}

.app-shell-invest .brand-row {
  padding: 0 0 14px;
  border-bottom: 1px solid #d2d2d2;
}

.app-shell-invest h1 {
  color: #2e2e2e;
  font-size: 30px;
  font-weight: 800;
}

.app-shell-invest .brand-row p {
  color: #5c6570;
  font-size: 13px;
  font-weight: 600;
}

.app-shell-invest .brand-actions {
  gap: 7px;
}

.app-shell-invest .icon-button {
  width: 38px;
  height: 38px;
  color: #5c6570;
  background: #f1f3f8;
  border-color: #d2d2d2;
  border-radius: 6px;
}

.app-shell-invest .icon-button:hover {
  color: #ffffff;
  background: #d31b2c;
  border-color: #d31b2c;
}

.app-shell-invest .filters-form {
  gap: 13px;
}

.app-shell-invest .field-grid {
  gap: 9px;
}

.app-shell-invest .field span,
.app-shell-invest .field-set legend {
  color: #2e2e2e;
  font-size: 12px;
  font-weight: 750;
}

.app-shell-invest input,
.app-shell-invest select,
.app-shell-invest .searchable-select-button {
  min-height: 38px;
  color: #2e2e2e;
  background: #fafbfd;
  border-color: #d2d2d2;
  border-radius: 6px;
}

.app-shell-invest input::placeholder {
  color: #9aa4b2;
}

.app-shell-invest input:focus,
.app-shell-invest select:focus,
.app-shell-invest .searchable-select-button:focus {
  border-color: #d31b2c;
  box-shadow: 0 0 0 3px rgba(211, 27, 44, 0.12);
}

.app-shell-invest .checkbox-list {
  gap: 6px;
  max-height: 190px;
  padding-right: 2px;
}

.app-shell-invest .checkbox-list-compact {
  max-height: none;
}

.app-shell-invest .checkbox-list label {
  min-height: 36px;
  padding: 0 10px;
  color: #2e2e2e;
  background: #fafbfd;
  border-color: #d2d2d2;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.app-shell-invest .checkbox-list label:hover,
.app-shell-invest .searchable-select-option:hover,
.app-shell-invest .suggestion-item:hover,
.app-shell-invest .suggestion-item:focus {
  background: #fff7f8;
}

.app-shell-invest .checkbox-list label:has(input:checked),
.app-shell-invest .searchable-select-option.is-selected {
  color: #ffffff;
  background: #d31b2c;
  border-color: #d31b2c;
}

.app-shell-invest .searchable-select-panel,
.app-shell-invest .search-suggestions {
  background: #ffffff;
  border-color: #d2d2d2;
  border-radius: 7px;
  box-shadow: 0 14px 34px rgba(167, 172, 180, 0.24);
}

.app-shell-invest .searchable-select-search {
  min-height: 34px;
  padding: 7px 9px;
}

.app-shell-invest .searchable-select-option {
  min-height: 34px;
  padding: 6px 7px;
  border-radius: 5px;
}

.app-shell-invest .searchable-select-option.is-selected:hover {
  background: #9b1827;
}

.app-shell-invest .filter-reset-button:hover {
  color: #d31b2c;
  background: rgba(211, 27, 44, 0.08);
  border-color: rgba(211, 27, 44, 0.2);
}

.app-shell-invest .suggestion-item {
  border-bottom-color: #eef0f3;
}

.app-shell-invest .suggestion-item span {
  color: #2e2e2e;
}

.app-shell-invest .suggestion-item small {
  color: #5c6570;
}

.app-shell-invest .reset-button {
  min-height: 38px;
  background: #d31b2c;
  border-radius: 6px;
  font-weight: 800;
}

.app-shell-invest .reset-button:hover {
  background: #9b1827;
}

.app-shell-invest .map-action-button {
  background: rgba(255, 255, 255, 0.96);
  border-color: #d2d2d2;
  border-radius: 6px;
}

.app-shell-invest .map-action-button:hover {
  background: #fff7f8;
  border-color: rgba(211, 27, 44, 0.32);
}

.app-shell-invest .logout-button {
  color: #ffffff;
  background: #d31b2c;
  border-color: #d31b2c;
}

.app-shell-invest .logout-button:hover {
  background: #9b1827;
  border-color: #9b1827;
}

.app-shell-invest .map-wrap {
  left: min(380px, 100vw);
}

.app-shell-invest.filters-collapsed .filters-panel {
  width: 72px;
  padding: 16px;
}

.app-shell-invest.filters-collapsed .brand-row {
  padding: 0;
  border-bottom: 0;
}

.app-shell-invest.filters-collapsed .map-wrap {
  left: 72px;
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(46, 46, 46, 0.34);
}

.admin-modal-card {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  padding: 18px;
  overflow: auto;
  background: var(--admin-panel-bg);
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(25, 33, 38, 0.24);
}

.admin-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-modal-head h2 {
  margin: 0;
  color: var(--admin-text);
  font-size: 22px;
  font-weight: 800;
}

.admin-modal-head p {
  margin: 6px 0 0;
  color: var(--admin-muted);
  font-size: 13px;
}

.admin-user-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 150px 120px;
  gap: 10px;
  margin: 16px 0;
  align-items: end;
}

.admin-tabs {
  display: flex;
  gap: 0;
  margin: 16px 0 0;
  border-bottom: 1px solid var(--admin-border);
}

.admin-tab {
  position: relative;
  min-height: 40px;
  padding: 0 18px;
  color: var(--admin-muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-weight: 750;
}

.admin-tab:hover {
  color: var(--admin-text);
  background: var(--admin-control-muted-bg);
}

.admin-tab.is-active {
  color: var(--admin-text);
  background: transparent;
}

.admin-tab.is-active::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 3px;
  content: "";
  background: var(--admin-accent);
  border-radius: 3px 3px 0 0;
}

.admin-tab-panel {
  margin-top: 14px;
}

.admin-user-form label {
  display: grid;
  gap: 6px;
}

.admin-user-form span,
.telegram-settings-form span,
.admin-temp-password span {
  color: var(--admin-text);
  font-size: 12px;
  font-weight: 750;
}

.admin-user-form input,
.admin-user-form select,
.telegram-settings-form input {
  min-height: 38px;
  background: var(--admin-control-bg);
  border-color: var(--admin-border);
  border-radius: 6px;
}

.admin-user-form input:focus,
.admin-user-form select:focus,
.telegram-settings-form input:focus {
  border-color: var(--admin-accent);
  box-shadow: 0 0 0 3px var(--admin-focus);
}

.telegram-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.telegram-settings-form label {
  display: grid;
  gap: 6px;
}

.telegram-settings-form label:first-child,
.telegram-settings-form .telegram-bot-info {
  grid-column: 1 / -1;
}

.telegram-settings-form small {
  color: var(--admin-muted);
  font-size: 12px;
}

.telegram-bot-info {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  background: var(--admin-control-bg);
  border: 1px solid var(--admin-border);
  border-radius: 6px;
}

.telegram-bot-info span {
  color: var(--admin-muted);
}

.telegram-bot-info strong {
  min-width: 0;
  color: var(--admin-text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.telegram-settings-form button,
.telegram-actions button {
  min-height: 38px;
  color: #ffffff;
  cursor: pointer;
  background: var(--admin-accent);
  border: 0;
  border-radius: 6px;
  font-weight: 800;
}

.telegram-settings-form button:hover,
.telegram-actions button:hover {
  background: var(--admin-accent-strong);
}

.telegram-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.telegram-actions button {
  padding: 8px 12px;
}

.admin-temp-password {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--admin-accent-soft);
  border: 1px solid var(--admin-focus);
  border-radius: 7px;
}

.admin-temp-password span {
  grid-column: 1 / -1;
  color: var(--admin-muted);
}

.admin-temp-password strong {
  min-width: 0;
  color: var(--admin-text);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.admin-temp-password button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.admin-users {
  display: grid;
  gap: 8px;
}

.admin-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  background: var(--admin-control-bg);
  border: 1px solid var(--admin-border);
  border-radius: 7px;
}

.admin-user-row div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.admin-user-row strong {
  color: var(--admin-text);
  font-size: 14px;
}

.admin-user-row span,
.admin-user-row small {
  color: var(--admin-muted);
  font-size: 12px;
}

.admin-user-row small {
  flex: 0 0 auto;
  font-weight: 700;
}

.telegram-user-row {
  align-items: flex-start;
}

.telegram-user-actions {
  display: grid;
  gap: 6px;
  min-width: 130px;
}

.telegram-user-actions label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--admin-text);
  font-size: 12px;
  font-weight: 700;
}

.telegram-user-actions input {
  width: 15px;
  min-height: 15px;
  accent-color: var(--admin-accent);
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
}

.leaflet-container {
  overflow: hidden;
  background: #d8e7d0;
  outline-offset: 1px;
  touch-action: none;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute;
  left: 0;
  top: 0;
}

.leaflet-container img,
.leaflet-container svg {
  max-width: none;
  max-height: none;
}

.leaflet-tile {
  width: 256px;
  height: 256px;
  user-select: none;
}

.leaflet-tile-pane {
  z-index: 200;
}

.leaflet-overlay-pane {
  z-index: 400;
}

.leaflet-shadow-pane {
  z-index: 500;
}

.leaflet-marker-pane {
  z-index: 600;
}

.leaflet-tooltip-pane {
  z-index: 650;
}

.leaflet-popup-pane {
  z-index: 700;
}

.leaflet-control {
  position: relative;
  z-index: 800;
  pointer-events: auto;
}

.leaflet-top,
.leaflet-bottom {
  position: absolute;
  z-index: 1000;
  pointer-events: none;
}

.leaflet-top {
  top: 0;
}

.leaflet-right {
  right: 0;
}

.leaflet-bottom {
  bottom: 0;
}

.leaflet-left {
  left: 0;
}

.leaflet-control {
  float: left;
  clear: both;
}

.leaflet-right .leaflet-control {
  float: right;
}

.leaflet-top .leaflet-control {
  margin-top: 10px;
}

.leaflet-left .leaflet-control {
  margin-left: 10px;
}

.leaflet-right .leaflet-control {
  margin-right: 10px;
}

.leaflet-bottom .leaflet-control {
  margin-bottom: 10px;
}

.leaflet-control-zoom {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.leaflet-control-zoom a {
  display: block;
  width: 34px;
  height: 34px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 32px;
  text-align: center;
  text-decoration: none;
  background: #ffffff;
}

.leaflet-control-zoom a + a {
  border-top: 1px solid var(--line);
}

.leaflet-control-attribution {
  padding: 4px 7px;
  color: #4d565b;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.82);
}

.leaflet-control-attribution a {
  color: var(--accent-strong);
}

.dot-marker {
  width: 18px;
  height: 18px;
  background: var(--publication-color, var(--accent));
  border: 2px solid #ffffff;
  border-radius: 999px;
  box-shadow: 0 7px 18px rgba(25, 33, 38, 0.22);
}

.price-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 28px;
  padding: 0 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  background: var(--publication-color, #0d5f5a);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 7px;
  box-shadow: 0 9px 22px rgba(25, 33, 38, 0.22);
}

.price-marker::after {
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 9px;
  height: 9px;
  content: "";
  background: var(--publication-color, #0d5f5a);
  border-right: 1px solid rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  transform: translateX(-50%) rotate(45deg);
}

.price-marker-group {
  min-width: 68px;
  gap: 4px;
  background: var(--publication-color, #126f69);
}

.price-marker-group span {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  color: var(--publication-color, #126f69);
  font-size: 11px;
  background: #ffffff;
  border-radius: 999px;
}

.price-marker-group::after {
  background: var(--publication-color, #126f69);
}

.publication-new {
  --publication-color: #1f9d55;
  --publication-shadow: rgba(31, 157, 85, 0.2);
}

.publication-recent {
  --publication-color: #d39b18;
  --publication-shadow: rgba(211, 155, 24, 0.2);
}

.publication-old {
  --publication-color: #2867b2;
  --publication-shadow: rgba(40, 103, 178, 0.2);
}

.publication-inactive {
  --publication-color: #737373;
  --publication-shadow: rgba(115, 115, 115, 0.18);
}

.cluster-marker {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: #ffffff;
  cursor: pointer;
  background: var(--publication-color, #1b7f79);
  border: 3px solid rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  box-shadow:
    0 0 0 7px var(--publication-shadow, rgba(27, 127, 121, 0.18)),
    0 12px 26px rgba(25, 33, 38, 0.24);
}

.cluster-marker-count {
  font-size: 17px;
  font-weight: 750;
  line-height: 1;
}

.group-panel {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 680;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(390px, calc(100vw - 32px));
  max-height: calc(100% - 28px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(25, 33, 38, 0.22);
}

.group-panel.is-hidden {
  display: none;
}

.group-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid #ebe5dc;
}

.group-panel-head strong {
  display: block;
  font-size: 16px;
  font-weight: 650;
}

.group-panel-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.group-panel-close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--muted);
  cursor: pointer;
  background: transparent;
  border: 0;
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
}

.group-panel-close:hover {
  color: var(--ink);
}

.group-list {
  display: grid;
  gap: 0;
  min-height: 0;
  overflow-y: auto;
}

.group-card {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  cursor: pointer;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #ebe5dc;
  text-align: left;
}

.group-card:hover,
.group-card:focus {
  background: #f6f4ef;
}

.group-card-title {
  color: #2f3538;
  font-size: 12px;
  font-weight: 550;
}

.group-card strong {
  color: #0d5f5a;
  font-size: 19px;
  font-weight: 650;
  line-height: 1.1;
}

.group-card .group-card-valuation {
  color: #146c43;
  font-size: 12px;
  font-weight: 650;
}

.group-card span {
  color: #202124;
  font-size: 13px;
  font-weight: 600;
}

.group-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.status {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 450;
  max-width: min(380px, calc(100vw - 36px));
  padding: 10px 12px;
  color: #ffffff;
  font-size: 14px;
  background: rgba(32, 33, 36, 0.86);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.status.is-hidden {
  display: none;
}

.status.is-error {
  background: rgba(167, 64, 50, 0.94);
}

.mobile-filter-buttons,
.mobile-sheet-backdrop,
.mobile-apartment-card {
  display: none;
}

@keyframes mobile-sheet-in {
  from {
    opacity: 0.75;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.leaflet-popup-content-wrapper {
  padding: 1px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(25, 33, 38, 0.16);
}

.leaflet-popup {
  position: absolute;
  margin-bottom: 20px;
  text-align: center;
}

.leaflet-popup-content {
  width: min(390px, calc(100vw - 40px)) !important;
  max-height: none;
  margin: 12px;
  overflow-x: hidden;
  overflow-y: visible;
  text-align: left;
}

.leaflet-popup-tip-container {
  position: absolute;
  left: 50%;
  width: 40px;
  height: 20px;
  margin-left: -20px;
  overflow: hidden;
  pointer-events: none;
}

.leaflet-popup-tip {
  width: 16px;
  height: 16px;
  padding: 1px;
  margin: -10px auto 0;
  background: #ffffff;
  transform: rotate(45deg);
  box-shadow: var(--shadow);
}

.leaflet-popup-close-button {
  position: absolute;
  top: 8px;
  right: 10px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  text-decoration: none;
  z-index: 1;
}

.popup {
  min-width: 0;
  max-width: 390px;
  color: #24282b;
  font-weight: 400;
}

.popup h2 {
  margin: 0 22px 6px 0;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: 0;
}

.price-formula {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
  padding: 8px 10px;
  color: #202124;
  background: #fbfaf7;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.price-formula-start {
  display: grid;
  gap: 2px;
}

.price-formula-start strong {
  color: var(--accent-strong);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.05;
}

.price-formula-start span,
.price-formula-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.2;
}

.price-formula-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1.1fr);
  align-items: start;
  gap: 7px;
}

.price-formula-row div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.price-formula-row strong {
  color: #293136;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.12;
}

.price-formula-operator {
  color: #8a9297;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.1;
}

.price-formula-result strong {
  color: #146c43;
}

.price-formula.is-bad .price-formula-result strong {
  color: #9f2f2f;
}

.price-formula-object {
  margin: 0;
  padding: 14px;
}

.price-formula-object .price-formula-start strong {
  font-size: 30px;
}

.price-formula-object .price-formula-row strong {
  font-size: 16px;
}

.popup-valuation {
  display: grid;
  gap: 2px;
  margin: 0 0 8px;
  padding: 6px 8px;
  background: #f7f4ee;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.popup-valuation strong {
  color: #202124;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.popup-valuation span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
}

.popup-valuation-warning {
  background: #fff3df;
  border-color: #e2b878;
}

.popup-valuation-warning strong {
  color: #7a3e13;
}

.popup-valuation-cian {
  background: #eef7f3;
  border-color: #b8d7c8;
}

.popup-valuation-cian strong {
  color: #105f52;
}

.popup-photos {
  position: relative;
  margin: 8px 0 10px;
}

.popup-photo-main-link {
  display: block;
  overflow: hidden;
  height: 132px;
  background: #e9e3da;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.popup-photo-main {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup-photo-nav {
  position: absolute;
  top: calc((100% - 48px) / 2);
  display: grid;
  place-items: center;
  width: 28px;
  height: 36px;
  color: #ffffff;
  cursor: pointer;
  background: rgba(25, 33, 38, 0.52);
  border: 0;
  border-radius: 6px;
  font-size: 25px;
  font-weight: 300;
  line-height: 1;
}

.popup-photo-nav:hover {
  background: rgba(25, 33, 38, 0.72);
}

.popup-photo-prev {
  left: 7px;
}

.popup-photo-next {
  right: 7px;
}

.popup-photo-thumbs {
  display: flex;
  gap: 5px;
  margin-top: 5px;
  padding-bottom: 2px;
  overflow-x: auto;
}

.popup-photo-thumb {
  flex: 0 0 43px;
  width: 43px;
  height: 32px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #e9e3da;
  border: 2px solid transparent;
  border-radius: 6px;
}

.popup-photo-thumb.is-active {
  border-color: var(--accent);
}

.popup-photo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.copy-button,
.popup-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 4px 8px;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  text-decoration: none;
}

.popup-link-secondary {
  color: var(--accent-strong);
  background: #edf6f4;
  border: 1px solid rgba(27, 127, 121, 0.18);
}

.copy-button:hover,
.popup-link-button:hover {
  color: #ffffff;
  background: var(--accent-strong);
}

.popup-link-secondary:hover {
  color: #ffffff;
  background: var(--accent);
}

.popup-details-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  margin-top: 12px;
  padding: 6px 10px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 550;
  background: #f5fbfa;
  border: 1px solid rgba(27, 127, 121, 0.22);
  border-radius: 7px;
  text-decoration: none;
}

.popup-details-button:hover {
  color: #ffffff;
  background: var(--accent);
}

.copy-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.popup dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 3px 8px;
  margin: 0;
  font-size: 12px;
  line-height: 1.18;
}

.popup dt {
  color: var(--muted);
  font-weight: 400;
}

.popup dd {
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.popup-metro {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.popup-metro-time {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
}

.popup-metro-icon {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  color: var(--accent-strong);
  font-size: 10px;
  line-height: 1;
  background: #edf6f4;
  border-radius: 50%;
}

.popup-metro-icon svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
}

.popup-metro-icon-transport {
  color: #475569;
  background: #eef2f7;
}

.popup-description {
  margin: 0;
  color: #3d4549;
}

.popup-invest {
  width: auto;
  max-width: 100%;
  color: #2e2e2e;
}

.popup-invest-header {
  display: grid;
  gap: 4px;
  margin: 0 22px 6px 0;
}

.popup-invest-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.popup-invest-kicker span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  color: #5c6570;
  background: #f1f3f8;
  border: 1px solid #d2d2d2;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.popup-invest h2 {
  margin: 0;
  color: #2e2e2e;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.12;
}

.popup-invest-header p {
  margin: 0;
  color: #5c6570;
  font-size: 12px;
  line-height: 1.25;
}

.popup-invest-details {
  margin: 0 0 6px;
  padding: 6px 8px;
  background: #ffffff;
  border: 1px solid #d2d2d2;
  border-radius: 7px;
}

.popup-invest .popup-invest-details {
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 3px 8px;
  font-size: 12px;
}

.popup-invest .popup-photos {
  margin: 6px 0 7px;
}

.popup-invest .popup-photo-main-link {
  height: 116px;
}

.popup-invest .popup-photo-thumbs {
  margin-top: 5px;
}

.popup-invest .popup-photo-thumb {
  flex-basis: 42px;
  width: 42px;
  height: 31px;
}

.popup-invest .price-formula-popup {
  margin-bottom: 7px;
  padding: 7px 8px;
  border-left: 4px solid #9aa4b2;
}

.popup-invest .price-formula-row {
  grid-template-columns: auto minmax(0, 0.9fr) auto minmax(0, 1fr);
  gap: 5px;
}

.popup-invest .price-formula-start strong {
  color: #5c6570;
  font-size: 22px;
}

.popup-invest .price-formula-row strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.popup-invest .price-formula-result strong {
  color: #219653;
}

.popup-invest .price-formula.is-bad .price-formula-result strong {
  color: #d31b2c;
}

.popup-invest .popup-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 5px;
  margin-bottom: 6px;
}

.popup-invest .copy-button,
.popup-invest .popup-link-button {
  width: 100%;
  min-height: 28px;
  padding: 5px 7px;
  background: #d31b2c;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.popup-invest .popup-link-secondary {
  color: #2e2e2e;
  background: #f1f3f8;
  border-color: #d2d2d2;
}

.popup-invest .copy-button:hover,
.popup-invest .popup-link-button:hover {
  color: #ffffff;
  background: #9b1827;
}

.popup-invest-details-button {
  min-height: 29px;
  margin-top: 8px;
  color: #d31b2c;
  background: #fff7f8;
  border-color: rgba(211, 27, 44, 0.24);
}

.popup-invest-details-button:hover {
  color: #ffffff;
  background: #d31b2c;
}

@media (max-width: 460px) {
  .leaflet-popup-content {
    width: min(360px, calc(100vw - 40px)) !important;
    margin: 12px;
  }

  .popup-invest .popup-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
  }

  .filters-panel {
    right: 0;
    bottom: auto;
    width: auto;
    height: 48vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .app-shell.filters-collapsed .filters-panel {
    width: auto;
    height: 72px;
  }

  .map-wrap {
    top: 48vh;
    left: 0;
  }

  .app-shell.filters-collapsed .map-wrap {
    top: 72px;
    left: 0;
  }

  .app-shell-invest .map-wrap {
    top: 48vh;
    left: 0;
  }

  .app-shell-invest.filters-collapsed .map-wrap {
    top: 72px;
    left: 0;
  }

  .admin-user-form {
    grid-template-columns: 1fr;
  }

  .telegram-settings-form {
    grid-template-columns: 1fr;
  }

  .admin-temp-password {
    grid-template-columns: 1fr;
  }

  .admin-user-row,
  .telegram-user-row {
    display: grid;
  }

  .telegram-user-actions {
    min-width: 0;
  }

  .map-user-actions {
    top: 10px;
    right: 10px;
    gap: 6px;
  }

  .map-action-button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
  }

  h1 {
    font-size: 24px;
  }

  .group-panel {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: 48%;
  }
}

@media (max-width: 520px) {
  .filters-panel {
    padding: 14px;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .room-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  html,
  body,
  .app-shell {
    height: 100dvh;
  }

  .app-shell,
  .app-shell-invest {
    background: #0b1224;
  }

  .map-wrap,
  .app-shell.filters-collapsed .map-wrap,
  .app-shell-invest .map-wrap,
  .app-shell-invest.filters-collapsed .map-wrap {
    inset: 0;
    left: 0;
    top: 0;
  }

  .filters-panel,
  .app-shell-invest .filters-panel {
    top: max(8px, env(safe-area-inset-top));
    right: 8px;
    bottom: auto;
    left: 8px;
    width: auto;
    height: auto;
    max-height: none;
    gap: 10px;
    padding: 10px;
    overflow: visible;
    background: rgba(255, 253, 248, 0.96);
    border: 1px solid rgba(217, 211, 200, 0.92);
    border-radius: 16px;
    box-shadow: 0 14px 34px rgba(10, 17, 32, 0.22);
    backdrop-filter: none;
  }

  .app-shell.mobile-filter-open .filters-panel,
  .app-shell-invest.mobile-filter-open .filters-panel {
    z-index: 1130;
  }

  .app-shell-invest .filters-panel {
    background: rgba(255, 255, 255, 0.96);
  }

  .app-shell.filters-collapsed .filters-panel,
  .app-shell-invest.filters-collapsed .filters-panel {
    width: auto;
    height: 58px;
    padding: 9px 10px;
  }

  .app-shell.filters-collapsed .brand-title,
  .app-shell.filters-collapsed .filters-form,
  .app-shell.filters-collapsed #reset-filters {
    display: none;
  }

  .brand-row,
  .app-shell-invest .brand-row {
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
  }

  h1,
  .app-shell-invest h1 {
    font-size: 20px;
  }

  .brand-row p,
  .app-shell-invest .brand-row p {
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.2;
  }

  .brand-actions {
    margin-left: auto;
  }

  .icon-button,
  .app-shell-invest .icon-button {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .filters-form,
  .app-shell-invest .filters-form {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    overflow: visible;
  }

  .filters-form > :not([data-mobile-filter]):not(.mobile-filter-buttons) {
    display: none !important;
  }

  .filters-form > [data-mobile-filter-key] {
    display: none !important;
  }

  .filters-form > [data-mobile-filter-key].is-mobile-active {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1140;
    display: grid !important;
    width: auto;
    max-height: min(66dvh, 560px);
    padding: 48px 14px calc(env(safe-area-inset-bottom) + 16px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 44px rgba(10, 17, 32, 0.28);
    animation: mobile-sheet-in 170ms ease-out;
  }

  .filter-reset-button {
    display: none;
  }

  .filters-form > .field-grid[data-mobile-filter-key].is-mobile-active {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .filters-form > [data-mobile-filter-key].is-mobile-active::before {
    position: absolute;
    top: 17px;
    left: 16px;
    color: #111827;
    content: attr(data-mobile-title);
    font-size: 18px;
    font-weight: 850;
    line-height: 1;
  }

  .filters-form > [data-mobile-filter-key].is-mobile-active::after {
    position: absolute;
    top: 10px;
    left: 50%;
    width: 42px;
    height: 4px;
    content: "";
    background: #d1d5db;
    border-radius: 999px;
    transform: translateX(-50%);
  }

  .filters-form > .field-wide[data-mobile-filter] {
    display: grid;
  }

  .mobile-filter-buttons {
    display: flex;
    gap: 7px;
    margin: 0 -2px;
    padding-bottom: 1px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-filter-buttons::-webkit-scrollbar {
    display: none;
  }

  .mobile-filter-buttons button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 7px 12px;
    color: #172033;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid #cfd7e6;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 750;
    box-shadow: 0 6px 16px rgba(10, 17, 32, 0.08);
  }

  .mobile-filter-buttons button.is-active {
    color: #ffffff;
    background: #0f766e;
    border-color: #0f766e;
  }

  .mobile-filter-buttons button.has-value:not(.is-active) {
    color: #0f766e;
    background: #e9f7f3;
    border-color: #0f766e;
    box-shadow:
      inset 0 0 0 1px rgba(15, 118, 110, 0.1),
      0 6px 16px rgba(10, 17, 32, 0.08);
  }

  .mobile-filter-buttons button.has-value::after {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 6px;
    content: "";
    background: currentColor;
    border-radius: 999px;
    vertical-align: middle;
  }

  .app-shell-invest .mobile-filter-buttons button.is-active {
    background: #d31b2c;
    border-color: #d31b2c;
  }

  .app-shell-invest .mobile-filter-buttons button.has-value:not(.is-active) {
    color: #d31b2c;
    background: #fff1f3;
    border-color: #d31b2c;
  }

  .mobile-filter-reset {
    position: absolute;
    top: 9px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 10px;
    color: #0f766e;
    cursor: pointer;
    background: #eef8f6;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
  }

  .app-shell-invest .mobile-filter-reset {
    color: #d31b2c;
    background: #fff1f3;
    border-color: rgba(211, 27, 44, 0.2);
  }

  .mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 650;
    display: block;
    background: transparent;
  }

  .mobile-sheet-backdrop.is-hidden {
    display: none;
  }

  .field span,
  .field-set legend,
  .app-shell-invest .field span,
  .app-shell-invest .field-set legend {
    font-size: 12px;
    line-height: 1.1;
  }

  input,
  select,
  .searchable-select-button {
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 14px;
  }

  .searchable-select-panel {
    position: static;
    max-height: none;
    margin-top: 8px;
    box-shadow: none;
  }

  .searchable-select-options {
    max-height: min(42dvh, 320px);
  }

  .search-suggestions {
    position: fixed;
    top: 112px;
    right: 10px;
    left: 10px;
    max-height: min(44dvh, 320px);
  }

  .checkbox-list,
  .app-shell-invest .checkbox-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    max-height: none;
    margin-top: 7px;
    overflow: visible;
  }

  .checkbox-list label,
  .app-shell-invest .checkbox-list label {
    min-height: 36px;
    padding: 0 12px;
    white-space: normal;
    border-radius: 12px;
  }

  .leaflet-top.leaflet-left {
    top: 160px;
  }

  .app-shell.filters-collapsed .leaflet-top.leaflet-left,
  .app-shell-invest.filters-collapsed .leaflet-top.leaflet-left {
    top: 76px;
  }

  .leaflet-control-zoom a {
    width: 38px;
    height: 38px;
    line-height: 38px;
    font-size: 22px;
  }

  .map-user-actions {
    top: auto;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom) + 10px);
    z-index: 720;
    gap: 7px;
  }

  .map-action-button {
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 11px;
    box-shadow: 0 10px 24px rgba(10, 17, 32, 0.22);
  }

  .map-settings-button {
    max-width: 124px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .status {
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom) + 58px);
    max-width: calc(100vw - 20px);
    font-size: 12px;
    border-radius: 10px;
  }

  .cluster-marker {
    width: 48px;
    height: 48px;
  }

  .cluster-marker-count {
    font-size: 16px;
  }

  .leaflet-popup-pane {
    z-index: 760;
  }

  .leaflet-popup {
    display: none;
  }

  .leaflet-popup-content-wrapper {
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(10, 17, 32, 0.34);
  }

  .leaflet-popup-content {
    width: auto !important;
    max-height: min(48dvh, 430px);
    margin: 0;
    overflow-y: auto;
  }

  .leaflet-popup-tip-container {
    display: none;
  }

  .leaflet-popup-close-button {
    top: 8px;
    right: 10px;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #ffffff;
    background: rgba(10, 17, 32, 0.54);
    border-radius: 999px;
    font-size: 20px;
  }

  .popup-mobile {
    max-width: none;
    color: #111827;
    background: #ffffff;
  }

  .mobile-apartment-card {
    position: fixed;
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom) + 58px);
    left: 10px;
    z-index: 1080;
    display: block;
    max-height: min(46dvh, 390px);
    overflow-y: auto;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(10, 17, 32, 0.34);
  }

  .mobile-apartment-card.is-hidden {
    display: none;
  }

  .mobile-card-close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    color: #ffffff;
    cursor: pointer;
    background: rgba(10, 17, 32, 0.54);
    border: 0;
    border-radius: 999px;
    font-size: 20px;
    line-height: 1;
  }

  .popup-mobile .popup-photos {
    margin: 0;
  }

  .popup-mobile .popup-photo-main-link {
    height: 118px;
    border: 0;
    border-radius: 0;
  }

  .popup-mobile .popup-photo-thumbs {
    display: none;
  }

  .popup-mobile .popup-photo-nav {
    top: 41px;
  }

  .popup-mobile-body {
    display: grid;
    gap: 6px;
    padding: 9px 11px 11px;
  }

  .popup-mobile h2 {
    margin: 0 32px 0 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.15;
  }

  .popup-mobile-address {
    display: -webkit-box;
    margin: 0;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.24;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .popup-mobile .price-formula {
    margin: 0;
    padding: 8px 10px;
    border-radius: 11px;
  }

  .popup-mobile .price-formula-start strong {
    color: #0f766e;
    font-size: 22px;
    font-weight: 850;
  }

  .popup-mobile .price-formula-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 7px;
  }

  .popup-mobile .price-formula-row strong {
    font-size: 13px;
  }

  .popup-mobile .price-formula-start span,
  .popup-mobile .price-formula-row span {
    font-size: 10.5px;
  }

  .popup-mobile .price-formula-row .price-formula-operator:nth-of-type(2) {
    grid-column: 1;
  }

  .popup-mobile .price-formula-result {
    grid-column: 2;
  }

  .popup-mobile-metro {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 24px;
    color: #4b5563;
    font-size: 12px;
  }

  .popup-mobile-metro > strong {
    min-width: 0;
    color: #111827;
    font-weight: 700;
  }

  .popup-mobile .popup-details-button {
    min-height: 34px;
    margin: 0;
    color: #ffffff;
    background: #1b7f79;
    border: 0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
  }

  .app-shell-invest .popup-mobile .popup-details-button {
    background: #d31b2c;
  }

  .group-panel {
    right: 10px;
    bottom: calc(env(safe-area-inset-bottom) + 58px);
    left: 10px;
    max-height: min(48dvh, 430px);
    border-radius: 16px;
  }
}

.object-page-body {
  min-height: 100vh;
  overflow: auto;
  background: #f5f2ec;
}

html.object-document,
html.object-document body {
  overflow: auto;
}

.object-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.object-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.object-head h1 {
  max-width: 820px;
  margin: 6px 0 8px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 650;
  line-height: 1.12;
}

.object-head p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.object-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.object-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  color: #31525b;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #d9e3e0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 550;
}

.object-back-link {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.object-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.object-gallery {
  display: block;
  margin-bottom: 18px;
}

.object-photo-main-link {
  position: relative;
  display: block;
  overflow: hidden;
  height: min(58vh, 560px);
  min-height: 320px;
  background: #e9e3da;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.object-photo-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 160ms ease;
}

.object-photo-main-link:hover .object-photo-main {
  transform: scale(1.025);
}

.object-photo-viewer {
  position: relative;
}

.object-photo-nav {
  position: absolute;
  top: calc((100% - 92px) / 2);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 36px;
  height: 48px;
  color: #ffffff;
  cursor: pointer;
  background: rgba(25, 33, 38, 0.54);
  border: 0;
  border-radius: 7px;
  font-size: 31px;
  font-weight: 300;
  line-height: 1;
}

.object-photo-nav:hover {
  background: rgba(25, 33, 38, 0.74);
}

.object-photo-prev {
  left: 12px;
}

.object-photo-next {
  right: 12px;
}

.object-photo-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-bottom: 4px;
  overflow-x: auto;
  scroll-behavior: smooth;
}

.object-photo-thumb {
  flex: 0 0 96px;
  width: 96px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: #e9e3da;
  border: 2px solid transparent;
  border-radius: 7px;
}

.object-photo-thumb.is-active {
  border-color: var(--accent);
}

.object-photo-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.object-gallery-empty {
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.92);
  border: 1px dashed #d9d1c6;
  border-radius: 8px;
  font-size: 14px;
}

.object-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.object-main,
.object-side {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
}

.object-section,
.object-summary {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(25, 33, 38, 0.08);
}

.object-section {
  min-width: 0;
  padding: 16px;
}

.object-section h2 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
}

.object-section h3 {
  margin: 0 0 10px;
  color: #2f3538;
  font-size: 14px;
  font-weight: 650;
}

.object-section p {
  margin: 0;
  color: #2f3538;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.object-summary {
  display: grid;
  gap: 5px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.cian-calculator-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  background: rgba(238, 247, 243, 0.96);
  border: 1px solid #b8d7c8;
  border-radius: 8px;
}

.cian-calculator-card span,
.cian-calculator-card small {
  color: var(--muted);
  font-size: 12px;
}

.cian-calculator-card strong {
  color: #105f52;
  font-size: 22px;
  line-height: 1.1;
}

.object-fields {
  display: grid;
  grid-template-columns: minmax(230px, 0.42fr) minmax(0, 1fr);
  gap: 8px 14px;
  margin: 0;
}

.object-fields dt {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.object-fields dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.object-fields-compact {
  grid-template-columns: minmax(120px, 0.48fr) minmax(0, 1fr);
  gap: 7px 10px;
}

.raw-block + .raw-block {
  margin-top: 18px;
}

.object-documents {
  display: grid;
  gap: 8px;
}

.object-document-row {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
  color: var(--ink);
  background: #f8f6f2;
  border: 1px solid #e3ddd4;
  border-radius: 7px;
  text-decoration: none;
}

.object-document-row:hover {
  border-color: rgba(27, 127, 121, 0.32);
  background: #f2fbf9;
}

.object-document-row span {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.object-document-row small {
  color: var(--muted);
  font-size: 12px;
}

.raw-json summary {
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}

.raw-json {
  min-width: 0;
}

.raw-json pre {
  width: 100%;
  max-width: 100%;
  max-height: 620px;
  margin: 12px 0 0;
  padding: 14px;
  overflow: auto;
  color: #1f2933;
  background: #f7f5f1;
  border: 1px solid #e3ddd4;
  border-radius: 7px;
  font-size: 12px;
  line-height: 1.45;
}

.object-page-invest {
  background: #f1f3f8;
}

.object-page-invest .object-page {
  width: min(1240px, calc(100% - 40px));
  padding-top: 22px;
}

.object-page-invest .object-head {
  align-items: stretch;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #d2d2d2;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(167, 172, 180, 0.22);
}

.object-page-invest .object-back-link {
  color: #d31b2c;
}

.object-page-invest .object-head h1 {
  max-width: 900px;
  margin-top: 8px;
  color: #2e2e2e;
  font-size: 32px;
  font-weight: 750;
}

.object-page-invest .object-head p {
  max-width: 900px;
  color: #5c6570;
}

.object-page-invest .object-meta span {
  min-height: 26px;
  color: #5c6570;
  background: #f1f3f8;
  border-color: #d2d2d2;
  border-radius: 4px;
  font-weight: 650;
}

.object-page-invest .object-head-actions {
  align-content: flex-start;
  min-width: 260px;
}

.object-page-invest .object-head-actions .popup-link-button {
  min-height: 36px;
  padding: 8px 12px;
  background: #d31b2c;
  border-radius: 5px;
  font-weight: 700;
}

.object-page-invest .object-head-actions .popup-link-secondary {
  color: #2e2e2e;
  background: #f1f3f8;
  border-color: #d2d2d2;
}

.object-page-invest .object-head-actions .popup-link-button:hover {
  color: #ffffff;
  background: #9b1827;
}

.object-page-invest .object-gallery {
  margin: 18px 0;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #d2d2d2;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(167, 172, 180, 0.18);
}

.object-page-invest .object-photo-main-link {
  height: min(52vh, 520px);
  min-height: 300px;
  border-color: #d2d2d2;
  border-radius: 7px;
}

.object-page-invest .object-photo-thumb {
  border-radius: 5px;
}

.object-page-invest .object-photo-thumb.is-active {
  border-color: #d31b2c;
}

.object-page-invest .object-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.object-page-invest .object-section,
.object-page-invest .object-summary {
  background: #ffffff;
  border-color: #d2d2d2;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(167, 172, 180, 0.18);
}

.object-page-invest .object-section {
  padding: 18px;
}

.object-page-invest .object-section h2 {
  color: #2e2e2e;
  font-size: 18px;
  font-weight: 750;
}

.object-page-invest .object-section h3 {
  color: #2e2e2e;
}

.object-page-invest .object-section p {
  color: #383838;
}

.object-page-invest .object-side {
  position: sticky;
  top: 18px;
}

.object-page-invest .object-summary {
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.object-page-invest .price-formula-object {
  padding: 16px;
  background: #ffffff;
  border-color: #d2d2d2;
  border-left: 5px solid #9aa4b2;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(167, 172, 180, 0.18);
}

.object-page-invest .price-formula-object .price-formula-start strong {
  color: #5c6570;
  font-size: 34px;
  font-weight: 750;
}

.object-page-invest .price-formula-object .price-formula-row strong {
  font-size: 16px;
  overflow-wrap: anywhere;
}

.object-page-invest .price-formula-object .price-formula-result strong {
  color: #219653;
}

.object-page-invest .price-formula-object.is-bad .price-formula-result strong {
  color: #d31b2c;
}

.object-page-invest .cian-calculator-card {
  background: #ffffff;
  border-color: #d2d2d2;
  border-left: 5px solid #219653;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(167, 172, 180, 0.16);
}

.object-page-invest .cian-calculator-card strong {
  color: #219653;
}

.object-page-invest .cian-calculator-card.popup-valuation-warning {
  border-left-color: #eb8226;
}

.object-page-invest .object-fields {
  grid-template-columns: minmax(210px, 0.36fr) minmax(0, 1fr);
  gap: 9px 16px;
}

.object-page-invest .object-fields dt {
  color: #5c6570;
  font-weight: 600;
}

.object-page-invest .object-fields dd {
  color: #2e2e2e;
  font-weight: 650;
}

.object-page-invest .object-fields-compact {
  grid-template-columns: minmax(128px, 0.48fr) minmax(0, 1fr);
}

.object-page-invest .object-document-row {
  background: #fafbfd;
  border-color: #d2d2d2;
  border-radius: 6px;
}

.object-page-invest .object-document-row:hover {
  background: #fff7f8;
  border-color: rgba(211, 27, 44, 0.28);
}

.object-page-invest .raw-json summary {
  color: #d31b2c;
}

.object-page-invest .raw-json pre {
  background: #fafbfd;
  border-color: #d2d2d2;
}

@media (max-width: 900px) {
  .object-head,
  .object-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .object-page-invest .object-head,
  .object-page-invest .object-layout {
    grid-template-columns: 1fr;
  }

  .object-page-invest .object-head-actions {
    min-width: 0;
    justify-content: flex-start;
  }

  .object-page-invest .object-side {
    position: static;
  }

  .object-head-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .object-page {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .object-fields {
    grid-template-columns: 1fr;
  }

  .object-fields dt {
    margin-top: 5px;
  }
}
