:root {
  --ink: #17211f;
  --muted: #65706c;
  --line: #dfe6e2;
  --paper: #fbfcfa;
  --soft: #eef5f1;
  --mint: #1f8a70;
  --mint-dark: #12604f;
  --coral: #dc6b4f;
  --gold: #b98b2f;
  --white: #ffffff;
  --shadow: 0 18px 55px rgba(23, 33, 31, 0.13);
  --topbar-bg: rgba(251, 252, 250, 0.92);
  --topbar-line: rgba(223, 230, 226, 0.8);
  --field-bg: #ffffff;
  --hero-panel-bg: rgba(255, 255, 255, 0.96);
}

html[data-theme="dark"] {
  --ink: #edf6f2;
  --muted: #aebbb6;
  --line: #2c3a36;
  --paper: #101614;
  --soft: #17221f;
  --mint: #28a988;
  --mint-dark: #7bd6be;
  --coral: #ff8b70;
  --gold: #f1bd58;
  --white: #17211f;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.38);
  --topbar-bg: rgba(16, 22, 20, 0.92);
  --topbar-line: rgba(44, 58, 54, 0.9);
  --field-bg: #111b18;
  --hero-panel-bg: rgba(23, 33, 31, 0.94);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 40px;
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-line);
  backdrop-filter: blur(18px);
}

.brand,
.nav,
.phone-link,
.contact-actions {
  display: flex;
  align-items: center;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--mint);
}

.nav {
  gap: 24px;
  color: var(--muted);
  font-size: 15px;
}

.nav a:hover,
.phone-link:hover {
  color: var(--mint-dark);
}

.phone-link {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.ghost-button {
  min-height: 42px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.ghost-button:hover {
  color: var(--mint-dark);
  background: var(--soft);
}

.theme-toggle {
  width: auto;
  min-height: 42px;
  gap: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--line);
}

.theme-toggle:hover {
  color: var(--mint-dark);
  background: var(--soft);
}

.theme-toggle-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #ffffff;
  background: var(--mint);
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(10, 18, 16, 0.76), rgba(10, 18, 16, 0.24) 55%, rgba(10, 18, 16, 0.05)),
    var(--hero-image, url("https://images.unsplash.com/photo-1505693416388-ac5ce068fe85?auto=format&fit=crop&w=1800&q=82")) center / cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 34%;
  background: linear-gradient(0deg, var(--paper), rgba(251, 252, 250, 0));
}

.hero-content {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 92px 0 140px;
  align-self: center;
  color: var(--white);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffc7b6;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.hero-copy {
  max-width: 560px;
  margin: 24px 0 36px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
}

.search-panel {
  display: grid;
  grid-template-columns: 1.1fr repeat(3, 0.9fr) auto;
  gap: 10px;
  width: min(1040px, 100%);
  padding: 12px;
  color: var(--ink);
  background: var(--hero-panel-bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

label span,
.sort-row label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

input,
select,
static-field,
button {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

input,
select {
  padding: 0 12px;
  color: var(--ink);
  background: var(--field-bg);
}

.static-field {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--ink);
  background: var(--field-bg);
}

button,
.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

button,
.primary-link {
  color: #ffffff;
  border: 0;
  background: var(--mint);
}

button:hover,
.primary-link:hover {
  background: var(--mint-dark);
}

.secondary-link {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: var(--white);
}

html[data-theme="dark"] .hero-media {
  filter: brightness(0.7) saturate(0.95);
}

html[data-theme="dark"] .secondary-link {
  color: var(--ink);
  background: var(--soft);
  border-color: var(--line);
}

html[data-theme="dark"] .secondary-link:hover {
  color: #ffffff;
  background: var(--mint);
}

.quick-info,
.section,
.contact-band {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
}

.quick-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  transform: translateY(-72px);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.quick-info div {
  padding: 26px;
  background: var(--white);
}

.quick-info strong {
  display: block;
  color: var(--mint-dark);
  font-size: 30px;
  line-height: 1;
}

.quick-info span {
  color: var(--muted);
}

.section {
  padding: 18px 0 92px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.sort-row {
  min-width: 220px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 34px rgba(23, 33, 31, 0.08);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 42px rgba(23, 33, 31, 0.14);
  outline: none;
}

.card-image {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--soft) center / cover;
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 10px;
  color: var(--white);
  background: rgba(23, 33, 31, 0.78);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.availability {
  position: absolute;
  right: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 7px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.availability-hourly {
  color: #6f4300;
  background: #ffe2a8;
}

.availability-busy {
  color: var(--white);
  background: rgba(158, 62, 48, 0.88);
}

.card-body {
  padding: 18px;
}

.card-title {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.rating {
  color: var(--gold);
  white-space: nowrap;
  font-weight: 800;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.meta span {
  padding: 5px 8px;
  background: var(--soft);
  border-radius: 8px;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.card-contact-actions,
.detail-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-contact-actions {
  padding-top: 12px;
}

.card-contact-actions a,
.detail-contact-actions a {
  width: auto;
  min-height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

.card-contact-actions .secondary-link,
.detail-contact-actions .secondary-link {
  color: var(--ink);
  border-color: var(--line);
  background: var(--soft);
}

.card-contact-actions .secondary-link:hover,
.detail-contact-actions .secondary-link:hover {
  color: #ffffff;
  background: var(--mint);
}

.price {
  font-size: 22px;
  font-weight: 900;
}

.hour-price {
  display: block;
  margin-top: 4px;
  color: var(--mint-dark);
  font-size: 13px;
  font-weight: 800;
}

.price small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.book,
.details-button {
  width: auto;
  min-width: 132px;
}

.details-button {
  color: var(--mint-dark);
  background: var(--soft);
  border: 1px solid var(--line);
}

.details-button:hover {
  color: var(--white);
  background: var(--mint-dark);
}

.empty {
  display: none;
  margin: 28px 0 0;
  padding: 22px;
  color: var(--muted);
  background: var(--soft);
  border-radius: 8px;
}

.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 48px;
  align-items: start;
}

.body-copy {
  max-width: 480px;
  color: var(--muted);
  font-size: 18px;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.benefit-grid article {
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.benefit-grid p {
  margin: 0;
  color: var(--muted);
}

.contact-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
  padding: 38px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(18, 96, 79, 0.96), rgba(31, 138, 112, 0.78)),
    var(--contact-image, url("https://images.unsplash.com/photo-1513694203232-719a280e022f?auto=format&fit=crop&w=1400&q=82")) center / cover;
  border-radius: 8px;
}

.contact-band .eyebrow {
  color: #ffd1c4;
}

.contact-band p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
}

.contact-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.contact-channels {
  display: grid;
  gap: 12px;
  width: min(560px, 100%);
}

.contact-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
}

.contact-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.contact-card-title span {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  white-space: nowrap;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 18, 16, 0.62);
}

.modal.is-open {
  display: flex;
}

.modal-card {
  position: relative;
  width: min(480px, 100%);
  padding: 28px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.apartment-modal {
  align-items: stretch;
  overflow: auto;
}

.apartment-modal-card {
  width: min(1080px, 100%);
  margin: auto;
  padding: 0;
  overflow: hidden;
}

.apartment-details {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 620px;
}

.detail-gallery {
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: 520px;
  background: var(--soft);
}

.detail-main-photo,
.detail-thumbs button,
.similar-item span {
  background: var(--soft) center / cover;
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px;
}

.detail-thumbs button {
  aspect-ratio: 4 / 3;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
}

.detail-thumbs button.is-active {
  border-color: var(--mint);
}

.detail-content {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 34px;
}

.detail-address {
  margin: 0;
  color: var(--mint-dark);
  font-weight: 800;
}

.detail-description {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.detail-section {
  display: grid;
  gap: 10px;
}

.detail-section h3 {
  margin: 0;
  font-size: 16px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tags span {
  padding: 8px 10px;
  color: var(--ink);
  background: var(--soft);
  border-radius: 8px;
  font-weight: 800;
}

.detail-rules {
  padding: 12px;
  background: var(--soft);
  border-radius: 8px;
}

.detail-rules p {
  margin: 0;
  color: var(--muted);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-meta span {
  padding: 7px 10px;
  color: var(--ink);
  background: var(--soft);
  border-radius: 8px;
  font-weight: 700;
}

.detail-map {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: var(--soft);
  border-radius: 8px;
}

.map-grid {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(31, 138, 112, 0.14) 1px, transparent 1px),
    linear-gradient(rgba(31, 138, 112, 0.14) 1px, transparent 1px),
    #f7fbf8;
  background-size: 28px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.map-pin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 24px;
  background: var(--coral);
  border: 4px solid var(--white);
  border-radius: 50% 50% 50% 0;
  box-shadow: 0 8px 18px rgba(23, 33, 31, 0.28);
  transform: translate(-50%, -75%) rotate(-45deg);
}

.detail-map a {
  display: inline-flex;
  margin-top: 6px;
  color: var(--mint-dark);
  font-weight: 800;
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 4px;
}

.detail-contact-actions {
  padding-top: 2px;
}

.similar-section {
  padding-top: 6px;
}

.similar-list {
  display: grid;
  gap: 8px;
}

.similar-item {
  display: grid;
  grid-template-columns: 86px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 10px;
  align-items: center;
  min-height: 74px;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.similar-item:hover {
  color: var(--ink);
  background: #eef7f2;
}

.similar-item span {
  grid-row: span 2;
  width: 86px;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
}

.similar-item b,
.similar-item small {
  min-width: 0;
}

.similar-item small {
  color: var(--muted);
}

.close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  min-height: 36px;
  padding: 0;
  color: var(--ink);
  background: var(--soft);
}

.close:hover {
  color: var(--white);
  background: var(--coral);
}

.modal-meta {
  color: var(--muted);
}

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

.success {
  display: none;
  margin: 16px 0 0;
  color: var(--mint-dark);
  font-weight: 700;
}

.success.is-error {
  color: var(--coral);
}

.form-error {
  display: none;
  margin: 14px 0 0;
  color: var(--coral);
  font-weight: 800;
}

.form-error.is-visible {
  display: block;
}

.auth-card {
  width: min(420px, 100%);
}

.admin-only[hidden] {
  display: none;
}

.editor {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: 30;
  display: none;
  flex-direction: column;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 88px);
  padding: 18px;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.editor.is-open {
  display: flex;
}

.editor-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.editor-head h2 {
  font-size: 24px;
}

.save-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.save-status.is-saved {
  color: var(--mint-dark);
}

.editor-body {
  display: grid;
  gap: 18px;
  padding-top: 18px;
  overflow: auto;
}

.editor-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--soft);
  border-radius: 8px;
}

.editor-section h3 {
  margin: 0;
}

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

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

.editor-field {
  display: grid;
  gap: 6px;
}

.editor-field textarea,
.editor-field input,
.editor-field select {
  min-height: 42px;
}

.editor-field textarea {
  padding: 12px;
  resize: vertical;
}

.editor-field small,
.editor-hint {
  color: var(--muted);
  font-size: 13px;
}

.editor-hint {
  margin: 0;
}

.editor-list {
  display: grid;
  gap: 12px;
}

.editor-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.editor-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.editor-actions {
  display: flex;
  gap: 10px;
}

.editor-inline {
  display: flex;
  gap: 10px;
}

.editor-inline > * {
  flex: 1;
}

.crm-section {
  background: #17211f;
  color: var(--white);
}

.crm-section .editor-card-head {
  align-items: baseline;
}

.crm-counter {
  display: inline-grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  color: var(--ink);
  background: var(--white);
  border-radius: 8px;
  font-weight: 900;
}

.crm-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.crm-summary span {
  display: grid;
  gap: 2px;
  padding: 10px;
  color: var(--ink);
  background: var(--white);
  border-radius: 8px;
  font-size: 13px;
}

.crm-summary b {
  font-size: 22px;
}

.crm-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.crm-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  gap: 8px;
}

.crm-toolbar input,
.crm-toolbar select {
  min-height: 42px;
  color: var(--ink);
  background: var(--white);
}

.crm-toolbar button {
  min-height: 42px;
  white-space: nowrap;
}

.crm-list {
  display: grid;
  gap: 12px;
}

.crm-lead {
  display: grid;
  gap: 12px;
  padding: 14px;
  color: var(--ink);
  background: var(--white);
  border-radius: 8px;
}

.crm-lead.is-hidden {
  display: none;
}

.crm-lead-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 12px;
  align-items: start;
}

.crm-lead-head strong,
.crm-lead-head span {
  display: block;
}

.crm-lead-head span,
.crm-lead-body {
  color: var(--muted);
  font-size: 14px;
}

.crm-lead-body {
  display: grid;
  gap: 4px;
}

.crm-lead-body p {
  margin: 0;
}

.crm-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.crm-actions a,
.crm-actions button {
  width: auto;
  min-height: 40px;
  padding: 0 12px;
  font-size: 14px;
}

.dark-link {
  color: var(--ink);
  border-color: var(--line);
}

@media (max-width: 980px) {
  .topbar {
    padding: 0 24px;
  }

  .nav {
    display: none;
  }

  .search-panel,
  .cards,
  .split,
  .benefit-grid {
    grid-template-columns: 1fr 1fr;
  }

  .search-panel button {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .topbar {
    gap: 12px;
    min-height: 64px;
    padding: 0 16px;
  }

  .brand {
    font-size: 15px;
  }

  .phone-link {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  .ghost-button {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  .theme-toggle {
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
  }

  .theme-toggle-icon {
    width: 20px;
    height: 20px;
  }

  .top-actions {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    background:
      linear-gradient(180deg, rgba(10, 18, 16, 0.72), rgba(10, 18, 16, 0.34)),
      url("https://images.unsplash.com/photo-1505693416388-ac5ce068fe85?auto=format&fit=crop&w=1100&q=82") center / cover;
  }

  .hero-content {
    width: min(100% - 32px, 1180px);
    padding: 58px 0 112px;
  }

  h1 {
    font-size: 42px;
  }

  h2 {
    font-size: 30px;
  }

  .hero-copy {
    font-size: 17px;
  }

  .search-panel,
  .quick-info,
  .cards,
  .split,
  .benefit-grid,
  .apartment-details {
    grid-template-columns: 1fr;
  }

  .search-panel button {
    grid-column: auto;
  }

  .quick-info,
  .section,
  .contact-band {
    width: min(100% - 32px, 1180px);
  }

  .quick-info {
    transform: translateY(-54px);
  }

  .section {
    padding-bottom: 64px;
  }

  .section-head,
  .contact-band,
  .price-row {
    align-items: stretch;
    flex-direction: column;
  }

  .sort-row {
    min-width: 0;
  }

  .book,
  .contact-actions a,
  .card-contact-actions a,
  .detail-contact-actions a {
    width: 100%;
  }

  .contact-card-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .contact-band {
    padding: 28px;
  }

  .apartment-modal-card {
    margin: 0;
  }

  .detail-gallery {
    min-height: 360px;
  }

  .detail-content {
    padding: 24px;
  }

  .detail-map,
  .detail-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .editor {
    top: 64px;
    right: 0;
    left: 0;
    width: auto;
    max-height: calc(100vh - 72px);
    border-radius: 0;
  }

  .editor-grid,
  .editor-grid.three,
  .crm-summary,
  .crm-toolbar,
  .crm-lead-head {
    grid-template-columns: 1fr;
  }
}
