/* Rebuild 2026-11-25 additions. Gradient on filled buttons only; outline buttons stay flat. */

.signin-pill.is-outline,
.header-theme-toggle,
.theme-toggle.header-theme-toggle {
  background: rgba(255, 255, 255, 0.12);
  color: var(--am-text, #f5f5f7);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
}
:is(html.theme-light, html[data-theme="light"]) .signin-pill.is-outline,
:is(html.theme-light, html[data-theme="light"]) .header-theme-toggle,
:is(html.theme-light, html[data-theme="light"]) .theme-toggle.header-theme-toggle {
  background: rgba(0, 0, 0, 0.06);
  color: #1d1d1f;
  border-color: rgba(0, 0, 0, 0.16);
  box-shadow: none;
}

.register-buyer-btn,
.buy-btn,
.register-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: #1d1d1f;
  background: linear-gradient(180deg, #FFE08A 0%, #FFD23F 45%, #F5A623 100%);
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.38);
  cursor: pointer;
  white-space: nowrap;
}
.register-buyer-btn:hover,
.buy-btn:hover,
.register-submit:hover { color: #1d1d1f; filter: brightness(1.06); }

.public-top { width: 100%; }
.public-top .header-start { width: 100%; }
.look-row { width: 100%; }
@media (min-width: 900px) {
  .look-row { overflow: visible; flex-wrap: wrap; }
  .look-row .look-btn {
    flex: 1 1 auto;
    max-width: none;
    min-width: 10rem;
  }
  .listing-feed { width: 100%; padding-inline: 1.25rem; flex-wrap: nowrap; overflow-x: auto; }
  .listing-card { flex: 0 0 calc((100% - 3 * 0.9rem) / 4); min-width: 210px; max-width: none; }
}
@media (min-width: 1024px) {
  .listing-card { flex: 0 0 calc((100% - 4 * 0.9rem) / 5); min-width: 220px; max-width: none; }
}
@media (min-width: 1500px) {
  .listing-card { flex: 0 0 calc((100% - 5 * 0.9rem) / 6); min-width: 220px; max-width: none; }
}

.listing-card .buy-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
}
.listing-card-frame { position: relative; }
.hold-badge,
.sale-paused-banner {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffb347 0%, #ff7a18 100%);
  color: #1d1d1f;
}
.sale-paused-banner {
  display: block;
  margin: 0 0 1rem;
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  text-align: center;
}

.listing-page .listing-main {
  max-width: 44rem;
  display: flex;
  flex-direction: column;
}
.listing-page .listing-gallery {
  aspect-ratio: 3 / 4;
  width: 100%;
  max-height: 82vh;
}
.listing-page .listing-gallery img {
  object-fit: cover;
  object-position: center;
}
.listing-page .listing-facts,
.listing-page .listing-copy,
.listing-page .listing-features,
.listing-page .listing-buy-row {
  width: 100%;
  max-width: none;
}

.lang-switch {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.lang-switch a,
.lang-switch button {
  border: 1px solid rgba(255,255,255,0.28);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.lang-switch [aria-current="true"] { outline: 2px solid currentColor; }


.buyer-popup {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  background: rgba(8, 8, 12, 0.35);
}
.buyer-popup[hidden] { display: none; }
.buyer-popup-card {
  width: min(92vw, 22rem);
  background: rgba(20, 18, 24, 0.75);
  color: #fff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 1.25rem;
  padding: 1.2rem 1.2rem 1.3rem;
  position: relative;
}
.buyer-popup-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
}

.buyer-dashboard,
.buyer-page.login-page {
  min-height: 100vh;
  background-color: #121214;
}
.buyer-dashboard .login-bg,
.buyer-page .login-bg { position: fixed; inset: 0; z-index: 0; }
.buyer-dashboard .public-top,
.buyer-dashboard .buyer-dash,
.buyer-page .buyer-card { position: relative; z-index: 1; }
.buyer-dash { width: min(100% - 2rem, 60rem); margin: 1.5rem auto 3rem; }
.buyer-dash-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.buyer-dash-card {
  background: rgba(255, 255, 255, 0.25);
  border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 1.1rem;
  padding: 1rem 1.1rem;
  color: #fff;
}
.buyer-card { background: rgba(20, 18, 24, 0.75); }

.desk-page .top { display: flex; align-items: center; gap: 0.75rem; }
.desk-page .add-listing-btn { order: 5; margin-left: auto; }
.desk-page .header-start { order: 1; }
.desk-page .top-actions { order: 2; }
@media (max-width: 700px) {
  .desk-page .add-listing-btn { order: 0; margin-left: 0; width: 100%; }
}

.case-notes-box {
  background: #16161a;
  color: #f5f5f7;
  border-radius: 0.6rem;
  padding: 0.35rem 0.7rem;
  min-height: 1.4em;
  line-height: 1.3;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin: 0.6rem 0 0;
}
.who-card.on-admin { display: inline-flex; align-items: center; gap: 0.5rem; }
.admin-photo, .who-card.on-admin .agent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #2a3a66;
}
.who-handle { font-weight: 700; margin: 0; }

.hold-actions, .publish-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.hold-actions button, .publish-actions button, .archive-btn {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.hold-hide, .hold-visible, .hold-back {
  border: 0;
  color: #1d1d1f;
}
.hold-hide {
  background: linear-gradient(180deg, #ffb347 0%, #ff7a18 100%);
}
.hold-visible, .hold-back, .publish-admin-btn, .approve-publish-btn {
  background: linear-gradient(180deg, #FFE08A 0%, #FFD23F 45%, #F5A623 100%);
}
.listing-card .hold-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 5;
}
.archive-btn { border: 1px solid rgba(0,0,0,0.2); background: transparent; }

.possible-agency-flag {
  display: inline-block;
  margin: 0 0 0.4rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #3b1d12;
  color: #ffd0b0;
  font-size: 0.75rem;
  font-weight: 800;
}

/* iPhone / narrow header: keep REGISTER AS BUYER and Agent Login visible. */
@media (max-width: 700px) {
  .public-top {
    align-items: flex-start;
    overflow-x: hidden;
  }
  .public-top .header-start {
    flex-wrap: wrap;
    width: 100%;
    gap: 6px 4px;
  }
  .register-buyer-btn,
  .public-top .signin-pill,
  .public-top .become-agent-pill {
    font-size: 0.62rem;
    padding: 0.28rem 0.5rem;
    min-height: 34px;
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .public-top .lang-switch { flex: 0 0 auto; }
}

/* Full-width homepage: a single horizontal scroll row on every viewport.
   Desktop (>=1024px) shows 5 or more slides side-by-side; never wrap into rows. */
.listing-shelf { position: relative; }
.feed-scroll-btn {
  position: absolute;
  top: 42%;
  z-index: 6;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
}
.feed-scroll-btn.prev { left: 0.35rem; }
.feed-scroll-btn.next { right: 0.35rem; }
.feed-scroll-btn:hover { filter: brightness(1.1); }
.listing-feed {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}
.listing-feed .listing-card {
  flex: 0 0 85%;
  min-width: 210px;
  max-width: none;
  scroll-snap-align: start;
}
@media (min-width: 900px) {
  .public-top,
  .public-desk,
  .public-desk > .filters-panel,
  .listing-shelf,
  .listing-feed,
  .look-row {
    width: 100%;
    max-width: none;
  }
  .public-desk > .filters-panel {
    margin-inline: 0;
    width: 100%;
  }
  .listing-feed {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }
  .listing-feed .listing-card,
  .listing-card {
    flex: 0 0 calc((100% - 3 * 0.9rem) / 4);
    min-width: 210px;
    max-width: none;
    scroll-snap-align: start;
  }
}
@media (min-width: 1024px) {
  .listing-feed .listing-card,
  .listing-card {
    flex: 0 0 calc((100% - 4 * 0.9rem) / 5);
    min-width: 220px;
    max-width: none;
  }
}
@media (min-width: 1500px) {
  .listing-feed .listing-card,
  .listing-card {
    flex: 0 0 calc((100% - 5 * 0.9rem) / 6);
    min-width: 220px;
    max-width: none;
  }
}

/* Detail page: larger vertical photos, text below. */
.listing-page .listing-main {
  max-width: 52rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem 3rem;
}
.listing-page .listing-gallery {
  aspect-ratio: 3 / 4;
  width: 100%;
  max-height: 88vh;
  margin: 0 0 1.25rem;
}
.listing-page .listing-title,
.listing-page .listing-facts,
.listing-page .listing-copy,
.listing-page .listing-features,
.listing-page .listing-buy-row {
  width: 100%;
  max-width: none;
}

.lead-summary {
  margin: 0 0 1.2rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 1rem;
}
.lead-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0;
}
.lead-sources li { display: flex; gap: 0.4rem; }

.design-layout { display: grid; grid-template-columns: minmax(18rem, 28rem) 1fr; gap: 1.2rem; padding: 0 1rem 2rem; }
@media (max-width: 900px) { .design-layout { grid-template-columns: 1fr; } }
.design-form { display: grid; gap: 0.8rem; }
.design-section { display: grid; gap: 0.4rem; border: 1px solid rgba(255,255,255,0.12); border-radius: 1rem; padding: 0.8rem; }
.design-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.design-preview { border: 1px solid rgba(255,255,255,0.16); border-radius: 1rem; background: #111; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.4rem 0; }
.chip { border-radius: 999px; padding: 0.25rem 0.7rem; border: 1px solid rgba(255,255,255,0.2); text-decoration: none; color: inherit; }
.chip.is-on { background: linear-gradient(180deg, #FFE08A 0%, #FFD23F 45%, #F5A623 100%); color: #1d1d1f; border: 0; }

.edit-photo-list { display: flex; flex-wrap: wrap; gap: 0.8rem; list-style: none; padding: 0; }
.edit-photo { display: grid; gap: 0.3rem; }
.edit-photo img { object-fit: cover; border-radius: 0.5rem; }

.report-agency {
  margin-left: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  font-weight: 700;
  cursor: pointer;
  color: #1d1d1f;
  background: linear-gradient(180deg, #FFE08A 0%, #FFD23F 45%, #F5A623 100%);
}


body.design-editor-page {
  width: min(100% - 1.5rem, 96rem);
  max-width: none;
}
.design-preview-wrap { min-width: 0; }
.design-preview {
  width: 100%;
  min-height: 720px;
  background: #111;
  display: block;
}


/* Property descriptions flow as a single continuous line (no pre-wrap / <br>). */
.listing-copy,
.listing-features {
  white-space: normal;
}

/* ===== 26 Nov 2026 v3 ===== */

html, body.public-page, body.desk-page {
  overflow-x: hidden;
  max-width: 100%;
}
body.public-page *,
body.desk-page * {
  box-sizing: border-box;
}

/* A. Desk cards: one full-width column, no side-by-side splits */
.desk-page .card-main,
.desk-page .card-main.is-facts-only {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: 1fr !important;
  width: 100%;
  gap: 0.7rem;
  align-items: stretch !important;
}
.desk-page .facts {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  margin: 0.2rem 0 0;
  grid-template-columns: 1fr !important;
}
.desk-page .facts .fact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.15rem 0.8rem;
  width: 100%;
  min-width: 0;
}
.desk-page .facts .fact-row dt {
  flex: 0 1 7.5rem;
  min-width: 0;
}
.desk-page .facts .fact-row dd {
  flex: 1 1 10rem;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.desk-page .card-call-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
  margin: 0.15rem 0 0.2rem;
}
.desk-page .card-copy,
.desk-page .card-copy .ad,
.desk-page .card-copy .features,
.desk-page .card-copy .notes,
.desk-page .card-call-row,
.desk-page .facts,
.desk-page .desk-photo-strip,
.desk-page .checks,
.desk-page .links {
  width: 100%;
  max-width: 100%;
}

/* Swipeable 3–4 photo strip: no arrows, dots, or scrollbar chrome */
.desk-page .desk-photo-strip {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin: 0.35rem 0 0.5rem;
}
.desk-page .desk-photo-strip::-webkit-scrollbar { display: none; }
.desk-page .desk-photo-strip .desk-photo-snap {
  flex: 0 0 auto;
  width: 28%;
  min-width: 5.8rem;
  max-width: 9rem;
  scroll-snap-align: start;
}
.desk-page .desk-photo-strip.is-compact .desk-photo-snap {
  width: 24%;
  min-width: 4.6rem;
  max-width: 6.5rem;
}
.desk-page .desk-photo-strip img {
  display: block;
  width: 100%;
  height: 5.2rem;
  object-fit: cover;
  border-radius: 0.65rem;
  background: rgba(0,0,0,0.25);
}
.desk-page .desk-photo-strip.is-compact img { height: 3.6rem; }

/* Expanded header: eyebrow/meta must not overlap the agent avatar */
.desk-page .card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.55rem 0.75rem;
  width: 100%;
}
.desk-page .card-heading {
  flex: 1 1 12rem;
  min-width: 0;
  padding-right: 0;
}
.desk-page .card-heading .eyebrow,
.desk-page .card-heading .agent-line {
  overflow-wrap: anywhere;
  padding-right: 0;
}
.desk-page .card-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}
.desk-page .card-top-actions .agent-avatar,
.desk-page .agent-avatar.on-card {
  flex: 0 0 auto;
  position: static;
}

/* B. Public header: brand left, actions center, lang + theme right */
.public-page .public-top {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.public-page .header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 0.8rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
}
.public-page .header-start,
.public-page .header-mid,
.public-page .header-end {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.public-page .header-start { flex: 1 1 10rem; justify-content: flex-start; width: auto; max-width: 100%; }
.public-page .header-mid { flex: 2 1 16rem; justify-content: center; flex-wrap: wrap; }
.public-page .header-end { flex: 1 1 10rem; justify-content: flex-end; flex-wrap: wrap; }
.public-page .header-brand {
  font-size: 0.92rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.public-page .back-to-listings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(180deg, #5c5c64 0%, #3a3a40 55%, #2c2c31 100%);
  border: 1px solid transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
}
.public-page .public-top .register-buyer-btn,
.public-page .public-top .signin-pill,
.public-page .public-top .become-agent-pill,
.public-page .public-top .header-theme-toggle,
.public-page .public-top .lang-switch a,
.public-page .back-to-listings {
  min-height: 36px;
  font-size: 12px;
}
.public-page .lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.55rem;
}

/* Related listings: centered, word-safe truncation */
.related-strip {
  display: flex;
  justify-content: center;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}
.related-strip-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  max-width: 72rem;
  margin: 0 auto;
  padding: 8px 12px;
}
.related-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 11rem;
}

/* Homepage footer */
.site-footer {
  width: 100%;
  margin: 2.5rem 0 0;
  padding: 1.6rem 1.2rem 2.2rem;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: #d8d0d6;
}
.site-footer .footer-phone {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 800;
}
.site-footer .footer-phone a { color: inherit; text-decoration: none; }
.site-footer .footer-copy { margin: 0 0 0.35rem; font-weight: 650; }
.site-footer .footer-note {
  margin: 0 auto;
  max-width: 36rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: #b8b0b6;
}
:is(html.theme-light, html[data-theme="light"]) .site-footer {
  border-top-color: rgba(0,0,0,0.1);
  color: #2c2c2e;
}
:is(html.theme-light, html[data-theme="light"]) .site-footer .footer-note { color: #4a454c; }

/* C. Hero: large heading on a dimmed panel, balanced views counter */
.public-page .home-hero {
  aspect-ratio: auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-items: center;
  gap: 0.8rem;
  padding: 1.1rem 14px 1.2rem;
  overflow: hidden;
}
.public-page .home-hero .hero-chart {
  position: relative;
  inset: auto;
  width: min(100%, 52rem);
  height: 7.5rem;
  opacity: 0.7;
  z-index: 0;
}
.public-page .home-hero .hero-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 52rem);
  margin: 0 auto;
  padding: 0.95rem 1.1rem 1rem;
  border-radius: 1.1rem;
  background: rgba(8, 6, 10, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
}
.public-page .home-hero .hero-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.35rem, 3.4vw, 2.35rem);
  line-height: 1.15;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: none;
  opacity: 1;
}
.public-page .home-hero .hero-sub {
  margin: 0 0 0.55rem;
  font-size: clamp(0.8rem, 1.6vw, 1rem);
  color: #f3edf0;
  opacity: 1;
  text-shadow: none;
}
.public-page .home-hero .hero-views {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  font-weight: 800;
  color: #fff;
}
.public-page .home-hero .hero-views-count { font-size: clamp(1.15rem, 2.4vw, 1.7rem); letter-spacing: -0.03em; }
.public-page .home-hero .hero-views-delta { font-size: 0.95rem; color: #7dffb0; }
@media (min-width: 900px) {
  .public-page .home-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.85fr);
    align-items: center;
    padding: 1.4rem 2rem;
  }
  .public-page .home-hero .hero-chart { height: 10rem; width: 100%; }
}
:is(html.theme-light, html[data-theme="light"]) .public-page .home-hero .hero-panel {
  background: rgba(255,255,255,0.78);
}
:is(html.theme-light, html[data-theme="light"]) .public-page .home-hero .hero-title,
:is(html.theme-light, html[data-theme="light"]) .public-page .home-hero .hero-sub,
:is(html.theme-light, html[data-theme="light"]) .public-page .home-hero .hero-views {
  color: #1d1d1f;
  text-shadow: none;
}
:is(html.theme-light, html[data-theme="light"]) .public-page .home-hero .hero-views-delta { color: #0b7a3e; }

/* Search / filter bar: at least 12px, inputs not solid bars, centered count */
.filters-panel .ios-picker-pill,
.filters-panel .pill-control,
.filters-panel .look-btn,
.filters-panel .search-pill input,
.filters-panel .segment span {
  font-size: 12px !important;
}
.filters-panel .ios-picker-pill {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: none;
  color: inherit;
  font-weight: 650;
  min-height: 38px;
  border-radius: 0.7rem;
}
.filters-panel .ios-picker-pill.is-open {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.45);
}
:is(html.theme-light, html[data-theme="light"]) .filters-panel .ios-picker-pill {
  background: #fff;
  border-color: rgba(0,0,0,0.16);
  color: #1d1d1f;
}
.public-page .public-count {
  text-align: center;
  width: 100%;
  margin: 0.6rem auto 0.9rem;
  font-size: 0.95rem;
}

/* BUY lives in its own row, titles clamp cleanly */
.listing-card .listing-card-frame {
  display: flex;
  flex-direction: column;
  position: relative;
}
.listing-card .listing-card-link { flex: 1 1 auto; }
.listing-card .listing-card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.65rem;
  padding: 0.55rem 0.6rem 0.7rem;
}
.listing-card .listing-card-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.95rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
.listing-card .buy-btn {
  position: static !important;
  right: auto;
  bottom: auto;
  flex: 0 0 auto;
  align-self: flex-end;
  z-index: 1;
}

.listing-card .photo-soon,
.listing-gallery .photo-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  height: 100%;
  min-height: 10rem;
  background: linear-gradient(180deg, #2a2428 0%, #1a1518 100%);
  color: #d9d0d5;
  text-align: center;
  padding: 1rem;
}
.listing-card .photo-soon span,
.listing-gallery .photo-soon span {
  font-size: 0.85rem;
  font-weight: 650;
}

/* D. Listing gallery: larger on desktop, thumbs + arrows */
.listing-page .listing-main {
  max-width: 72rem;
  width: 100%;
}
.listing-page .listing-gallery-wrap,
.listing-page .listing-gallery-wrap.is-fullbleed {
  width: 100vw;
  max-width: 100vw;
  margin: 0 calc(50% - 50vw) 1.25rem;
  border-radius: 0;
}
.listing-page .listing-gallery {
  aspect-ratio: 16 / 10;
  width: 100%;
  max-width: 100%;
  max-height: 78vh;
  min-height: 18rem;
}
@media (min-width: 900px) {
  .listing-page .listing-gallery {
    aspect-ratio: 16 / 9;
    min-height: 28rem;
    max-height: 80vh;
  }
}
.listing-thumbs {
  display: none !important;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.55rem 0 0;
}
.listing-thumb {
  flex: 0 0 auto;
  width: 4.4rem;
  height: 3.2rem;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.4rem;
  overflow: hidden;
  background: #1a1216;
  cursor: pointer;
}
.listing-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.listing-thumb.is-active { border-color: #ffd23f; }

.listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: flex-start;
}
.listing-facts dt {
  font-size: 12px;
  color: #d4ced3;
  font-weight: 650;
}
.listing-facts .fact.is-price dt { color: #fff; }
.listing-facts .fact.is-price dd {
  font-size: 1.55rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  margin-top: 0.15rem;
}
:is(html.theme-light, html[data-theme="light"]) .listing-facts dt { color: #4a454c; }
:is(html.theme-light, html[data-theme="light"]) .listing-facts .fact.is-price dt,
:is(html.theme-light, html[data-theme="light"]) .listing-facts .fact.is-price dd { color: #1d1d1f; }

/* Buyer popup labels */
.buyer-register-popup .field span,
.buyer-form .field > span {
  color: #f4f0f2;
  font-weight: 700;
  font-size: 0.92rem;
}
:is(html.theme-light, html[data-theme="light"]) .buyer-register-popup .field span,
:is(html.theme-light, html[data-theme="light"]) .buyer-form .field > span {
  color: #1d1d1f;
}

/* Narrow / 390px: no horizontal page scroll */
@media (max-width: 700px) {
  .public-page .header-bar {
    align-items: flex-start;
  }
  .public-page .header-start,
  .public-page .header-mid,
  .public-page .header-end {
    flex: 1 1 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .public-page .header-end { justify-content: flex-start; }
  .public-page .header-brand { font-size: 0.85rem; }
  .filters-panel .ios-picker-pills {
    grid-template-columns: 1fr 1fr;
  }
  .public-page .home-hero { padding: 0.85rem 10px 1rem; }
  .public-page .home-hero .hero-title { font-size: 1.35rem; }
  .listing-page .listing-gallery { min-height: 16rem; }
  .desk-page .card-top-actions { width: 100%; }
}

/* =========================================================================
   v4: no Buy CTA on public pages; related carousel is a tall vertical card;
   listing pages repeat the contact row and related carousel at the bottom.
   Photo height is 144px — 3× the previous 48px related thumbnail.
   ========================================================================= */

.related-strip,
.listing-page .related-strip,
.related-strip-top,
.related-strip-bottom {
  display: block;
  height: auto;
  width: 100%;
  max-width: 100%;
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.related-strip-inner {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: stretch;
  gap: 12px;
  width: max-content;
  max-width: none;
  margin: 0 auto;
  padding: 10px 16px 14px;
}

.related-item,
.listing-page .related-item,
.related-item[class*="related-accent-"] {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 0 0 8.5rem;
  width: 8.5rem;
  max-width: 8.5rem;
  height: auto;
  gap: 0;
  padding: 0 0 0.55rem;
  overflow: hidden;
  box-sizing: border-box;
}

.related-item img,
.related-ph,
.listing-page .related-item img,
.listing-page .related-ph {
  display: block;
  width: 100%;
  height: 144px;
  flex: 0 0 144px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.06);
}

.related-item-body {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
  width: 100%;
  padding: 0.45rem 0.5rem 0;
  box-sizing: border-box;
}

.related-item-title,
.related-item span,
.related-item .related-item-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  max-width: none;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.related-item-meta,
.related-item-price {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.related-item-price { font-weight: 800; }

.listing-bottom {
  width: 100%;
  max-width: 100%;
  margin: 0 0 2rem;
}

.listing-agent-bar-bottom {
  border-top: 1px solid var(--am-header-border, rgba(255, 255, 255, 0.08));
  border-bottom: 0;
  margin-top: 0.35rem;
}

@media (max-width: 700px) {
  .related-strip,
  .listing-page .related-strip {
    height: auto;
    padding: 0;
  }
  .related-item,
  .listing-page .related-item {
    height: auto;
    width: 8.5rem;
    max-width: 8.5rem;
    flex-basis: 8.5rem;
  }
  .related-item img,
  .related-ph,
  .listing-page .related-item img,
  .listing-page .related-ph {
    width: 100%;
    height: 144px;
    flex-basis: 144px;
    border-radius: 8px 8px 0 0;
  }
}

@media (max-width: 390px) {
  .related-strip { max-width: 100%; }
  .related-item,
  .listing-page .related-item {
    width: 8.25rem;
    max-width: 8.25rem;
    flex-basis: 8.25rem;
  }
}


/* v5: listing carousel arrows, 1/N counter, fullscreen lightbox (no auto-rotate inside). */
.listing-page .listing-gallery .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.listing-page .listing-gallery .carousel-btn.prev { left: 0.7rem; }
.listing-page .listing-gallery .carousel-btn.next { right: 0.7rem; }
.listing-page .listing-gallery .photo-count,
.listing-page .listing-gallery [data-photo-index] {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 2;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}
.listing-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 2.5rem;
}
.listing-lightbox[hidden] { display: none !important; }
.listing-lightbox.is-open { display: flex; }
.listing-lightbox .lb-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 0.4rem;
}
.listing-lightbox .lb-close,
.listing-lightbox .lb-prev,
.listing-lightbox .lb-next {
  position: absolute;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
}
.listing-lightbox .lb-close {
  top: 1rem;
  right: 1rem;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.6rem;
}
.listing-lightbox .lb-prev,
.listing-lightbox .lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 2.8rem;
  height: 2.8rem;
  font-size: 1.8rem;
}
.listing-lightbox .lb-prev { left: 1rem; }
.listing-lightbox .lb-next { right: 1rem; }
.listing-lightbox .lb-count {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 700;
}
body.lightbox-open { overflow: hidden; }


/* v6: hide the top compact preview when a desk card is expanded; lower gallery is a swipeable carousel. */
.desk-page .card.is-expanded .card-compact .desk-photo-strip,
.desk-page .card.is-expanded .desk-photo-strip.is-compact {
  display: none;
}
.desk-page .desk-photo-carousel {
  position: relative;
  margin: 0.4rem 0 0.75rem;
  width: 100%;
  max-width: 100%;
}
.desk-page .desk-photo-carousel .desk-photo-strip,
.desk-page .card-details .desk-photo-strip.is-expanded-strip {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 0.5rem;
  scrollbar-width: none;
  width: 100%;
}
.desk-page .desk-photo-carousel .desk-photo-strip::-webkit-scrollbar {
  display: none;
}
.desk-page .desk-photo-carousel .desk-photo-snap {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  scroll-snap-align: start;
}
.desk-page .desk-photo-carousel img {
  display: block;
  width: 100%;
  height: 16rem;
  object-fit: cover;
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.25);
}
.desk-page .desk-photo-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 2.2rem;
  height: 2.2rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
}
.desk-page .desk-photo-nav.prev { left: 0.45rem; }
.desk-page .desk-photo-nav.next { right: 0.45rem; }
.desk-page .desk-photo-nav:hover { filter: brightness(1.1); }

/* v7: related-item Option 3 photo-bleed, same width, 25% shorter */
.related-item,
.listing-page .related-item,
.related-item[class*="related-accent-"] {
  position: relative;
  display: block;
  flex-direction: unset;
  width: 8.5rem;
  max-width: 8.5rem;
  flex: 0 0 8.5rem;
  height: 168px;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  background: transparent;
  background-image: none;
  box-sizing: border-box;
}
.related-item img,
.related-ph,
.listing-page .related-item img,
.listing-page .related-ph {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  flex: none;
  object-fit: cover;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.2);
}
.related-item-body {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.15rem;
  width: 100%;
  min-width: 0;
  padding: 12px 11px 11px;
  box-sizing: border-box;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}
.related-accent-lemon .related-item-body { background: linear-gradient(to top, rgba(168,125,0,0.96) 0%, rgba(120,86,0,0.88) 38%, rgba(80,58,0,0.25) 60%, transparent 74%); }
.related-accent-lime .related-item-body { background: linear-gradient(to top, rgba(72,135,0,0.96) 0%, rgba(46,92,0,0.88) 38%, rgba(30,62,0,0.25) 60%, transparent 74%); }
.related-accent-orange .related-item-body { background: linear-gradient(to top, rgba(214,82,0,0.96) 0%, rgba(154,52,0,0.88) 38%, rgba(110,36,0,0.25) 60%, transparent 74%); }
.related-accent-purple .related-item-body { background: linear-gradient(to top, rgba(116,44,218,0.96) 0%, rgba(76,29,149,0.88) 38%, rgba(55,18,110,0.25) 60%, transparent 74%); }
.related-accent-pink .related-item-body { background: linear-gradient(to top, rgba(214,24,148,0.96) 0%, rgba(145,14,98,0.88) 38%, rgba(95,8,65,0.25) 60%, transparent 74%); }
.related-accent-cyan .related-item-body { background: linear-gradient(to top, rgba(6,136,168,0.96) 0%, rgba(10,92,118,0.88) 38%, rgba(6,62,82,0.25) 60%, transparent 74%); }
.related-item,
.related-item[class*="related-accent-"] {
  background-color: transparent;
  background-image: none;
}
.related-accent-lemon { border: 2px solid #ffe14a; box-shadow: 0 0 14px rgba(255, 225, 74, 0.35); }
.related-accent-lime { border: 2px solid #9be82a; box-shadow: 0 0 14px rgba(155, 232, 42, 0.35); }
.related-accent-orange { border: 2px solid #ff8c24; box-shadow: 0 0 14px rgba(255, 120, 30, 0.35); }
.related-accent-purple { border: 2px solid #a855f7; box-shadow: 0 0 14px rgba(140, 80, 255, 0.38); }
.related-accent-pink { border: 2px solid #ff3ec8; box-shadow: 0 0 14px rgba(255, 43, 214, 0.38); }
.related-accent-cyan { border: 2px solid #22d3ee; box-shadow: 0 0 14px rgba(6, 182, 212, 0.38); }
.related-item-title,
.related-item span,
.related-item .related-item-title,
.related-item-meta,
.related-item-price {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}
@media (max-width: 700px) {
  .related-item,
  .listing-page .related-item {
    height: 168px;
    width: 8.5rem;
    max-width: 8.5rem;
    flex-basis: 8.5rem;
  }
  .related-item img,
  .related-ph,
  .listing-page .related-item img,
  .listing-page .related-ph {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
}
@media (max-width: 390px) {
  .related-item,
  .listing-page .related-item {
    width: 8.25rem;
    max-width: 8.25rem;
    flex-basis: 8.25rem;
    height: 168px;
  }
}
:is(html.theme-light, html[data-theme="light"]) .related-item,
:is(html.theme-light, html[data-theme="light"]) .related-item[class*="related-accent-"],
:is(html.theme-light, html[data-theme="light"]) .related-item-title,
:is(html.theme-light, html[data-theme="light"]) .related-item-meta,
:is(html.theme-light, html[data-theme="light"]) .related-item-price,
:is(html.theme-light, html[data-theme="light"]) .related-item span {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
  background-color: transparent;
}
.listing-page .listing-title {
  margin: 0.85rem 16px 0.65rem;
}
.listing-page .listing-agent-bar-after {
  margin-top: 0.7rem;
  border-top: 0;
  border-bottom: 1px solid var(--am-header-border, rgba(255, 255, 255, 0.08));
}
