
  .sg-cookie {
    position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(8px);
    width: min(640px, calc(100vw - 32px));
    background: var(--paper); border: 1px solid var(--line-strong);
    border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(28, 24, 16, 0.45);
    padding: 22px 24px; z-index: 9000;
    font-family: var(--sans);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
  }
  .sg-cookie.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
  .sg-cookie h3 { font-family: var(--display); font-weight: 400; font-size: 19px; color: var(--ink); margin: 0 0 6px; letter-spacing: -0.01em; }
  .sg-cookie p { font-size: 13.5px; line-height: 1.6; color: var(--muted); margin: 0; }
  .sg-cookie p a { color: var(--cedar); text-decoration: underline; text-underline-offset: 2px; }
  .sg-cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; align-items: center; }
  .sg-cookie-btn {
    font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer;
    padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line-strong);
    background: transparent; color: var(--ink); transition: all 0.2s ease;
  }
  .sg-cookie-btn:hover { border-color: var(--ink); }
  .sg-cookie-btn.primary { background: var(--ink); color: var(--cream); border-color: var(--ink); }
  .sg-cookie-btn.primary:hover { background: var(--cedar-deep); border-color: var(--cedar-deep); }
  .sg-cookie-btn.link { border: none; padding: 11px 6px; color: var(--cedar); text-decoration: underline; text-underline-offset: 2px; margin-left: auto; }
  .sg-cookie-btn.link:hover { color: var(--cedar-deep); }
  /* preferences panel */
  .sg-cookie-prefs { display: none; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
  .sg-cookie.show-prefs .sg-cookie-prefs { display: block; }
  .sg-cookie.show-prefs .sg-cookie-btn.link { display: none; }
  .sg-pref-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .sg-pref-row:last-child { border-bottom: none; }
  .sg-pref-text b { display: block; font-size: 13.5px; color: var(--ink); font-weight: 600; margin-bottom: 3px; }
  .sg-pref-text small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
  .sg-pref-locked { font-size: 12px; font-weight: 600; color: var(--sage); white-space: nowrap; padding-top: 2px; }
  /* toggle */
  .sg-toggle { position: relative; width: 42px; height: 24px; flex-shrink: 0; margin-top: 1px; }
  .sg-toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
  .sg-toggle span { position: absolute; inset: 0; background: var(--cream-2); border: 1px solid var(--line-strong); border-radius: 999px; transition: background 0.2s ease; }
  .sg-toggle span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--paper); box-shadow: 0 1px 3px rgba(28,24,16,0.3); transition: transform 0.2s ease; }
  .sg-toggle input:checked + span { background: var(--sage); border-color: var(--sage); }
  .sg-toggle input:checked + span::after { transform: translateX(18px); }
  .sg-toggle input:focus-visible + span { outline: 2px solid var(--cedar); outline-offset: 2px; }
  @media (max-width: 520px) {
    .sg-cookie { bottom: 12px; padding: 20px; }
    .sg-cookie-actions { gap: 8px; }
    .sg-cookie-btn { flex: 1 1 auto; text-align: center; }
    .sg-cookie-btn.link { flex-basis: 100%; margin-left: 0; text-align: center; }
  }
  @media (prefers-reduced-motion: reduce) {
    .sg-cookie { transition: opacity 0.2s ease, visibility 0.2s; transform: translateX(-50%); }
    .sg-cookie.is-open { transform: translateX(-50%); }
  }

  /* ===== 3 cards per row on every screen (map beside the results on desktop) ===== */
  #listingsGrid.listings { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 16px; }
  @media (min-width: 1100px) {
    .results-split { grid-template-columns: minmax(0, 1fr) minmax(320px, 31%) !important; gap: 22px !important; }
    #listingsGrid .card h3 { font-size: 19px; }
    #listingsGrid .card-tags .card-tag:nth-child(n+3) { display: none; }
  }
  @media (min-width: 641px) and (max-width: 1099px) {
    #listingsGrid .card h3 { font-size: 18px; }
    #listingsGrid .card-tags .card-tag:nth-child(n+3), #listingsGrid .card-vibe span:nth-child(n+3) { display: none; }
  }
  /* phones: compact 3-across tiles — photo, name, place */
  @media (max-width: 640px) {
    #listingsGrid.listings { gap: 8px; padding-bottom: 90px; }
    #listingsGrid .card { border-radius: 14px; }
    #listingsGrid .card-img { margin: 4px 4px 0 !important; border-radius: 11px !important; aspect-ratio: 1 / 1 !important; }
    #listingsGrid .card-chip, #listingsGrid .card-vibe, #listingsGrid .card-tags, #listingsGrid .card-by, #listingsGrid .card-meta-top,
    #listingsGrid .card-price, #listingsGrid .card-desc, #listingsGrid .card-online { display: none !important; }
    #listingsGrid .card-save { width: 26px; height: 26px; top: 6px; right: 6px; }
    #listingsGrid .card-save svg { width: 13px; height: 13px; }
    #listingsGrid .card-body { padding: 7px 7px 9px !important; gap: 0 !important; }
    #listingsGrid .card h3 { font-size: 12.5px !important; line-height: 1.22 !important; margin: 0 !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.44em; }
    #listingsGrid .card-foot { margin: 5px 0 0 !important; padding: 0 !important; border: 0 !important; }
    #listingsGrid .card-loc { font-size: 10.5px !important; gap: 3px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    #listingsGrid .card-loc svg { width: 10px; height: 10px; flex: none; }
    #listingsGrid .verify-badge { transform: scale(.8); }
  }

  /* cookie notice: big "Got it" that fills the row, "What we store" as a matching outline button */
  .sg-cookie .sg-cookie-actions { display: flex; flex-wrap: nowrap; gap: 10px; align-items: stretch; margin-top: 18px; }
  .sg-cookie #sgCookieAccept { flex: 1 1 auto; padding: 15px 24px; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
  .sg-cookie #sgCookieManage { flex: 0 0 auto; margin-left: 0; padding: 15px 22px; font-size: 14px; border: 1.5px solid rgba(28,24,16,.42) !important; border-radius: 999px !important; background: transparent; text-decoration: none; color: var(--ink); -webkit-appearance: none; appearance: none; }
  .sg-cookie #sgCookieManage:hover { border-color: var(--ink); color: var(--ink); }
  .sg-cookie.show-prefs #sgCookieManage { display: none; }
  /* every cover is exactly 300px tall on desktop, tablet and phone (same as About, Contact and Cities) */
  .page-head.has-cover { height: 300px; min-height: 0 !important; box-sizing: border-box; }
  .page-head.has-cover .lead { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  @media (max-width: 767px) {
    .page-head.has-cover, .page-head.has-cover.cover-left, .page-head.has-cover.cover-left.cover-ev, .page-head.has-cover.cover-split { height: 300px; padding: 22px 20px !important; }
    .page-head.has-cover.cover-left, .page-head.has-cover.cover-left.cover-ev {
      background: linear-gradient(180deg, rgba(30,21,15,0.05) 0%, rgba(30,21,15,0.25) 35%, rgba(30,21,15,0.82) 70%, rgba(30,21,15,0.94) 100%),
                  var(--cover) var(--cover-pos, center 20%) / cover no-repeat, #2a1f18;
    }
    .page-head.has-cover h1 { font-size: 32px !important; line-height: 1.05 !important; margin: 0 0 6px !important; }
    .page-head.has-cover .lead { font-size: 13px !important; line-height: 1.45 !important; margin-top: 4px !important; }
    .page-head.has-cover .ex-stats { flex-wrap: nowrap !important; overflow: hidden; margin-top: 12px !important; gap: 6px !important; }
    .page-head.has-cover .ex-stats span { flex: none; font-size: 12px; padding: 6px 11px; }
  }
  @media (max-width: 1024px) {
    .sg-cookie .sg-cookie-actions { flex-wrap: wrap; }
    .sg-cookie #sgCookieAccept, .sg-cookie #sgCookieManage { flex: 1 1 100%; text-align: center; }
  }
