:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --text: #1d2420;
  --muted: #5b665f;
  --border: #e3ded2;
  --brand: #2f4a3c;
  --brand-dark: #1f3327;
  --accent: #a9824f;
  --accent-light: #f1e6d3;
  --danger: #a3402f;
  --danger-bg: #fbe9e5;
  --success: #2f4a3c;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(29, 36, 32, 0.08), 0 1px 2px rgba(29, 36, 32, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  color: var(--brand-dark);
  line-height: 1.25;
  margin: 0 0 0.4em;
}

a { color: var(--brand); }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px 64px;
}

.site-header {
  padding: 28px 0 8px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

a.brand { text-decoration: none; }
a.brand:hover .brand-mark { color: var(--brand); }

.brand-mark {
  font-family: Georgia, serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand-dark);
  letter-spacing: 0.02em;
}

.brand-tag {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.intro {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin: 20px 0 28px;
}

.intro h1 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.intro p {
  color: var(--muted);
  margin: 0.6em 0;
}

.intro .property {
  color: var(--brand-dark);
  font-weight: 600;
}

form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
}

.section h2 {
  font-size: 1.15rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.field {
  margin-bottom: 18px;
}
.field:last-child { margin-bottom: 0; }

.field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 6px;
}

.field .required {
  color: var(--danger);
  margin-left: 2px;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="number"],
.field textarea,
.field select {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid #cdc6b6;
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 74, 60, 0.14);
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.field-hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

/* Side-by-side fields that collapse to a stack on narrow screens. */
.field-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.field-row > .field { flex: 1 1 160px; }

.radio-group {
  display: flex;
  gap: 20px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}
.checkbox-option input { width: 18px; height: 18px; accent-color: var(--brand); }

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.radio-option input { width: 18px; height: 18px; accent-color: var(--brand); }

.field-error {
  display: none;
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 6px;
}

.field.invalid input,
.field.invalid textarea,
.field.invalid select {
  border-color: var(--danger);
}

.field.invalid .field-error { display: block; }

.submit-row {
  display: flex;
  justify-content: flex-end;
}

button, .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px 26px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

button:hover, .btn:hover { background: var(--brand-dark); }
button:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
  background: transparent;
  color: var(--brand-dark);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--accent-light); }

.form-banner {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 0.92rem;
}
.form-banner.error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #eac6bd;
}
.form-banner.notice {
  background: var(--accent-light);
  color: var(--brand-dark);
  border: 1px solid #e0d0b0;
}
.form-banner.success {
  background: #e3ede7;
  color: var(--success);
  border: 1px solid #c5d8cc;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 36px;
}

/* Listing cards (index + homepage) */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.listing-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.listing-card:hover {
  box-shadow: 0 4px 14px rgba(29, 36, 32, 0.12);
  transform: translateY(-2px);
}

.listing-card-photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  background: var(--accent-light);
}
.listing-card-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-size: 2.4rem;
  color: var(--brand);
  opacity: 0.45;
}

.listing-card-body { padding: 16px 18px 18px; }
.listing-card-title {
  font-family: Georgia, serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 4px;
}
.listing-card-address { color: var(--muted); font-size: 0.88rem; }
.listing-card-specs { color: var(--brand-dark); font-size: 0.85rem; font-weight: 600; margin-top: 6px; }
.listing-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.listing-card-rent {
  font-family: Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-dark);
}

/* Admin photo manager */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.photo-item {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}
/* Fixed-size thumbnail box. A broken or oversized image inside it can't
   grow the card or push the delete control out of reach. */
.photo-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--bg);
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-item.photo-missing { border-color: #eac6bd; background: var(--danger-bg); }
.photo-missing-note {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 14px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--danger);
}

.photo-cover-flag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--brand-dark);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 999px;
}
.photo-alt {
  display: flex;
  gap: 6px;
  padding: 8px;
}
.photo-alt input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 8px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.photo-alt .btn { padding: 6px 10px; font-size: 0.78rem; }
.photo-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px 10px;
}
.linkish.danger { color: var(--danger); }

.home-quiet {
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

/* Listing page */
.listing { margin-top: 20px; }

.preview-bar {
  background: var(--accent-light);
  border: 1px solid #e0d0b0;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 0.9rem;
  color: var(--brand-dark);
}

.gallery { margin-bottom: 24px; }

/* Photos are buttons; strip the control chrome but keep a visible focus
   ring for keyboard users. */
.gallery-cover-btn,
.gallery-thumb-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius);
  position: relative;
}
.gallery-cover-btn:hover img,
.gallery-thumb-btn:hover img { filter: brightness(1.04); }
.gallery-cover-btn:focus-visible,
.gallery-thumb-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.gallery-cover {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--accent-light);
  display: block;
}
.gallery-count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  background: rgba(29, 36, 32, 0.78);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  pointer-events: none;
}

.gallery-rest {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.gallery-thumb-btn { border-radius: 8px; }
.gallery-rest img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--accent-light);
  display: block;
}

/* Full-size photo viewer */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: rgba(18, 23, 20, 0.94);
}
body.lightbox-open { overflow: hidden; }

.lightbox-figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.lightbox-img {
  max-width: 100%;
  /* Leaves room for the caption without the image ever overflowing. */
  max-height: calc(100vh - 110px);
  object-fit: contain;
  border-radius: 6px;
  display: block;
}
.lightbox-caption {
  color: #e6ece8;
  font-size: 0.88rem;
  text-align: center;
}

.lightbox-btn {
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.lightbox-btn[hidden] { display: none; }
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 1.1rem;
}

@media (max-width: 640px) {
  /* Thumb-reachable controls instead of tiny targets beside the photo. */
  .lightbox { padding: 12px; }
  .lightbox-prev { position: absolute; left: 12px; bottom: 20px; }
  .lightbox-next { position: absolute; right: 12px; bottom: 20px; }
  .lightbox-img { max-height: calc(100vh - 150px); }
}

.listing-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 28px;
  margin-bottom: 20px;
}
/* The price never wraps, so without this the text column is whatever's
   left over and a long headline breaks to a couple of words per line. */
.listing-head-main { flex: 1 1 auto; min-width: 0; }
.listing-head h1 { font-size: 1.6rem; margin: 10px 0 6px; overflow-wrap: break-word; }
.listing-address { color: var(--muted); margin: 0; }
.listing-specs { color: var(--brand-dark); font-weight: 600; margin: 8px 0 0; }
.listing-price { text-align: right; white-space: nowrap; }
.listing-price-value {
  font-family: Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brand-dark);
}
.listing-price-note { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }

/* Neighborhood map */
.map-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--accent-light);
}
.map-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.map-hint { color: var(--muted); font-size: 0.88rem; margin: 14px 0 8px; }
.map-links { display: flex; flex-wrap: wrap; gap: 8px; }
.map-links .btn { padding: 7px 14px; font-size: 0.85rem; }

@media (max-width: 640px) {
  .map-frame { aspect-ratio: 4 / 3; }
}

.listing-copy { color: var(--muted); margin: 0 0 0.9em; }
.listing-copy:last-child { margin-bottom: 0; }

.amenities {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 20px;
}
.amenities li {
  color: var(--muted);
  padding-left: 22px;
  position: relative;
}
.amenities li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand);
  font-weight: 700;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}
.fact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}
.fact-value { color: var(--text); font-weight: 600; }

.listing-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: var(--brand-dark);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-top: 20px;
}
.listing-cta h2 { color: #fff; font-size: 1.2rem; margin: 0 0 4px; }
.listing-cta p { color: #d6e0d9; margin: 0; font-size: 0.92rem; }
.listing-cta .btn { background: var(--accent); color: #1d2420; flex-shrink: 0; }
.listing-cta .btn:hover { background: #c19a63; }

.listing-contact {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 24px;
}

/* Thank-you page */
.thankyou {
  text-align: center;
  padding: 60px 28px;
}
.thankyou .check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 1.6rem;
}

/* Admin */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.admin-nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; row-gap: 10px; }
.admin-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.admin-nav a.active, .admin-nav a:hover { color: var(--brand-dark); border-color: var(--accent); }

/* Wide enough for the data tables (leads runs to eight columns) without
   letting prose-width panels sprawl on a large monitor. */
.admin-wrap { max-width: 1280px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.kpi-card .kpi-value {
  font-family: Georgia, serif;
  font-size: 1.9rem;
  color: var(--brand-dark);
  font-weight: 700;
}
.kpi-card .kpi-label {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.panel h2 { font-size: 1.05rem; margin-bottom: 14px; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; }

.bar-track {
  background: var(--accent-light);
  border-radius: 4px;
  height: 8px;
  width: 100%;
  min-width: 60px;
  overflow: hidden;
}
.bar-fill { background: var(--brand); height: 100%; }

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--brand-dark);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-success { background: #e3ede7; color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.toolbar input[type="search"] {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  min-width: 220px;
}

.toolbar-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 34px 9px 12px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%235b665f' d='M5.5 7.5l4.5 4.5 4.5-4.5' stroke='%235b665f' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(47, 74, 60, 0.14);
}

.responses-table a { text-decoration: none; font-weight: 600; }

/**
 * Tables that opt into becoming stacked cards on a phone. A wide table can
 * always be scrolled sideways, but an eight-column one means hunting for
 * the column you want; as cards every field is on screen with its own
 * label, taken from each cell's data-label.
 */
@media (max-width: 720px) {
  .table-cards thead {
    /* Visually gone, but the header text still labels each cell below via
       data-label, so nothing is lost to a screen reader. */
    display: none;
  }
  .table-cards,
  .table-cards tbody,
  .table-cards tr,
  .table-cards td {
    display: block;
    width: 100%;
  }
  .table-cards tr {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: var(--bg);
  }
  .table-cards tr:last-child { margin-bottom: 0; }
  .table-cards td {
    border-bottom: none;
    padding: 5px 0;
    white-space: normal;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
  }
  .table-cards td[data-label]::before {
    content: attr(data-label);
    flex: 0 0 38%;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 2px;
  }
  /* Long values (a URL, a note) wrap instead of forcing a scrollbar. */
  .table-cards td code { overflow-wrap: anywhere; }
  .table-cards td.num { text-align: left; }
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.pager .btn { padding: 8px 16px; font-size: 0.88rem; }
.pager-status { color: var(--muted); font-size: 0.85rem; text-align: center; }

.admin-identity {
  color: var(--muted);
  font-size: 0.82rem;
  border-left: 1px solid var(--border);
  padding-left: 18px;
}

/* A submit button that reads as a link, so sign-out can be a POST without
   looking like a button in the middle of the nav. */
.linkish {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.82rem;
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
}
.linkish:hover { background: none; color: var(--brand-dark); }

.login-wrap {
  max-width: 380px;
  margin: 90px auto;
  padding: 0 20px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.detail-item .k {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}
.detail-item .v { font-size: 0.98rem; }
.detail-item .v.empty { color: var(--muted); font-style: italic; }

.back-link { display: inline-block; margin-bottom: 16px; font-size: 0.9rem; }

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
}

@media (max-width: 640px) {
  .intro, .section, .panel { padding: 18px 18px; }

  /* Side by side there isn't room for both, so stack them and give the
     headline the full width. */
  .listing-head {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 18px 18px;
  }
  .listing-head h1 { font-size: 1.3rem; }
  .listing-price { text-align: left; }
  .listing-price-value { font-size: 1.45rem; }

  .listing-cta { padding: 20px 18px; gap: 16px; }
  /* Full width so the main call to action is an easy thumb target. */
  .listing-cta .btn { width: 100%; justify-content: center; }

  /* The thumbnail strip pushed the title and price below the fold. On a
     phone the cover alone leads, and its badge opens the full set — the
     thumbnails stay in the DOM (so the viewer still has every photo) but
     are never laid out, and being lazy they aren't downloaded either. */
  .gallery-rest { display: none; }
  .gallery-count {
    left: 12px;
    right: auto;
    background: rgba(29, 36, 32, 0.86);
    font-size: 0.82rem;
    padding: 8px 14px;
  }
  .admin-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .kpi-card .kpi-value { font-size: 1.5rem; }
  .admin-nav { gap: 12px; font-size: 0.85rem; width: 100%; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-form { flex-direction: column; }
  .toolbar input[type="search"] { min-width: 0; width: 100%; }
  .toolbar-form select { width: 100%; }
  .toolbar > .btn { width: 100%; justify-content: center; }
  .wrap.admin-wrap { padding-left: 14px; padding-right: 14px; }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
  .detail-grid { grid-template-columns: 1fr; gap: 14px; }
}
