/* The apartment page (templates/marketplace/rentals/detail.html): the photo mosaic and full-screen viewer,
   the header and facts, video / 3D tour / floor plans, amenities, open houses, the map, "Listed by", the
   sticky contact card (a bottom bar on a phone), and the similar and sponsored rails. Tokens only, except
   the photo viewer, which is always dark. */

.ld-body .s-footer { margin-top: 32px; }

/* ---------- Top: breadcrumbs, share, unavailable ----------------------------------------- */

.ld-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 16px; }
.ld-top .s-crumbs { min-width: 0; }
.ld-top .s-crumbs li:last-child { min-width: 0; }
.ld-top .s-crumbs [aria-current] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38ch; display: inline-block; vertical-align: bottom; }
.ld-share { flex: none; }

.ld-gone { align-items: center; margin-bottom: 16px; }
.ld-gone > .s-ic { align-self: flex-start; margin-top: 3px; }
.ld-gone-words { flex: 1; min-width: 0; font-weight: 500; }
.ld-gone-title { font-weight: 800; color: var(--ink); }
.ld-gone .s-btn { flex: none; }

/* ---------- Photo mosaic ---------------------------------------------------------------- */

.ld-gallery {
  position: relative; display: grid; gap: 8px; height: clamp(340px, 36vw, 760px);
  border-radius: var(--r-xl); overflow: hidden; isolation: isolate; background: var(--bg-sunk);
}
.ld-gallery--2 { grid-template-columns: 1fr 1fr; }
.ld-gallery--3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.ld-gallery--3 .ld-tile:first-child { grid-row: 1 / 3; }
.ld-gallery--4 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.ld-gallery--4 .ld-tile:first-child { grid-row: 1 / 3; }
.ld-gallery--4 .ld-tile:nth-child(2) { grid-column: 2 / 4; }
.ld-gallery--5 { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; }
.ld-gallery--5 .ld-tile:first-child { grid-row: 1 / 3; }

.ld-tile { position: relative; display: block; min-width: 0; min-height: 0; padding: 0; border: 0; background: var(--bg-sunk); overflow: hidden; cursor: zoom-in; }
.ld-tile img { width: 100%; height: 100%; object-fit: cover; color: transparent; font-size: 0; transition: transform .6s var(--ease), filter .3s; }
.ld-tile:hover img { transform: scale(1.035); filter: brightness(.94); }
.ld-tile:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; border-radius: 0; }
.ld-tile-badge { position: absolute; left: 14px; top: 14px; z-index: 1; }

.ld-gallery-bar { position: absolute; right: 16px; bottom: 16px; z-index: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: calc(100% - 32px); }
.ld-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 0; border-radius: var(--pill);
  background: rgba(255, 255, 255, .94); color: #0e1726; box-shadow: 0 4px 14px rgba(5, 8, 15, .22);
  font-size: 0.86rem; font-weight: 700; white-space: nowrap; text-decoration: none !important; cursor: pointer;
  transition: background-color .15s, transform .15s;
}
.ld-chip:hover { background: #fff; transform: translateY(-1px); }
.ld-chip .s-ic { width: 16px; height: 16px; }
.ld-chip--all { background: #0e1726; color: #fff; }
.ld-chip--all:hover { background: #1b2638; }
.ld-gallery-count { display: none; }

.ld-nophoto { display: grid; place-content: center; justify-items: center; gap: 10px; height: 260px; border-radius: var(--r-xl); border: 1px dashed var(--line-strong); background: var(--surface-2); color: var(--ink-3); font-weight: 600; }
.ld-nophoto .s-ic { width: 36px; height: 36px; color: var(--ink-4); }

/* ---------- Full-screen photo viewer (always dark) ---------------------------------------- */

.ld-viewer {
  width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #05080f; color: #fff; overflow: hidden;
}
.ld-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.ld-viewer::backdrop { background: #05080f; }
.ld-viewer-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 14px 18px; }
.ld-viewer-title { font-weight: 700; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-viewer-count { font-size: 0.88rem; font-weight: 700; color: rgba(255, 255, 255, .72); font-variant-numeric: tabular-nums; }
.ld-viewer-btn { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; transition: background-color .15s; }
.ld-viewer-btn:hover { background: rgba(255, 255, 255, .18); }
.ld-viewer-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ld-viewer-btn[disabled] { opacity: .3; cursor: default; }
.ld-viewer-btn .s-ic { width: 20px; height: 20px; }
.ld-viewer-stage { position: relative; min-height: 0; }
.ld-viewer-step { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); }
.ld-viewer-step--prev { left: 18px; }
.ld-viewer-step--next { right: 18px; }
.ld-viewer-track {
  list-style: none; margin: 0; padding: 0; height: 100%; display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior: contain;
}
.ld-viewer-track::-webkit-scrollbar { display: none; }
.ld-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; padding: 0 84px; }
.ld-slide-fig { position: relative; margin: 0; height: 100%; width: 100%; display: grid; place-items: center; }
.ld-slide-fig img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.ld-slide-cap { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; max-width: 90%; padding: 6px 12px 6px 6px; border-radius: var(--pill); background: rgba(5, 8, 15, .72); color: rgba(255, 255, 255, .9); font-size: 0.85rem; font-weight: 600; }
.ld-slide-cap:not(:has(.s-badge)) { padding-left: 12px; }
.ld-viewer-thumbs { display: flex; gap: 8px; padding: 14px 18px 18px; overflow-x: auto; scrollbar-width: none; justify-content: safe center; }
.ld-viewer-thumbs::-webkit-scrollbar { display: none; }
.ld-thumb { flex: none; width: 76px; height: 54px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #111827; opacity: .55; transition: opacity .15s, border-color .15s; }
.ld-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ld-thumb:hover { opacity: .85; }
.ld-thumb.is-on { opacity: 1; border-color: #fff; }
body.ld-noscroll { overflow: hidden; }

/* ---------- Main column ----------------------------------------------------------------- */

.ld-grid { display: grid; grid-template-columns: minmax(0, 1fr) 392px; gap: 56px; align-items: start; padding-top: 32px; }
.ld-main { min-width: 0; }

.ld-head { padding-bottom: 28px; }
.ld-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 0.9rem; }
.ld-title { margin-top: 14px; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.5rem); line-height: 1.1; font-weight: 800; letter-spacing: -0.035em; color: var(--ink); overflow-wrap: anywhere; }
.ld-area { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--ink-3); font-weight: 600; }
.ld-area .s-ic { width: 17px; height: 17px; color: var(--ink-4); }
.ld-area--lg { margin-top: 0; color: var(--ink-2); font-size: 1.02rem; }
.ld-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-top: 20px; }
.ld-price-n { font-size: clamp(1.9rem, 1.6rem + 1vw, 2.5rem); line-height: 1; font-weight: 800; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ld-per { margin-left: 2px; font-size: 1rem; font-weight: 600; letter-spacing: 0; color: var(--ink-3); }
.ld-concession { display: inline-flex; align-items: center; gap: 6px; font-size: 0.9rem; font-weight: 700; color: var(--ok); }
.ld-concession .s-ic { width: 16px; height: 16px; }
.ld-keyfacts { list-style: none; padding: 0; margin-top: 18px; display: flex; flex-wrap: wrap; gap: 10px; }
.ld-keyfacts li { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--pill); background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink); font-weight: 700; font-size: 0.93rem; }
.ld-keyfacts .s-ic { width: 17px; height: 17px; color: var(--ink-3); }

.ld-section { padding: 34px 0; border-top: 1px solid var(--line); }
.ld-h2 { font-size: 1.32rem; line-height: 1.25; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 18px; }
.ld-h3 { font-size: 0.8rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 22px 0 12px; }
.ld-h2 + .ld-h3 { margin-top: 0; }

.ld-desc { max-width: 72ch; overflow-wrap: anywhere; }
.s-js .ld-desc.is-clamped { max-height: 12.5em; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent); mask-image: linear-gradient(180deg, #000 62%, transparent); }
.ld-readmore { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; color: var(--link); font-weight: 700; font-size: 0.95rem; }
.ld-readmore .s-ic { width: 16px; height: 16px; transition: transform .2s; }
.ld-readmore[aria-expanded="true"] .s-ic { transform: rotate(180deg); }

/* Cells draw their own top and left rules, shifted 1px under the frame, so a short last row stays clean. */
.ld-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.ld-fact { padding: 16px 18px; min-width: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); margin: -1px 0 0 -1px; }
.ld-fact dt { display: flex; align-items: center; gap: 7px; font-size: 0.8rem; font-weight: 700; color: var(--ink-3); }
.ld-fact dt .s-ic { width: 15px; height: 15px; color: var(--ink-4); }
.ld-fact dd { margin: 6px 0 0; font-size: 1rem; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }

/* Video, 3D tour, floor plans */
.ld-tabs { margin-bottom: 18px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.ld-tabs::-webkit-scrollbar { display: none; }
.ld-panel + .ld-panel { margin-top: 26px; }
.ld-tabs:not([hidden]) ~ .ld-panel + .ld-panel { margin-top: 0; }
.ld-tabs:not([hidden]) ~ .ld-panel .ld-panel-title { display: none; }
.ld-panel-title { margin-top: 0; }
.ld-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #0b1220; }
.ld-frame--tour { aspect-ratio: 16 / 10; }
.ld-frame iframe, .ld-video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.ld-play {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: #fff; text-decoration: none !important;
  background: radial-gradient(70% 90% at 30% 20%, color-mix(in oklab, var(--brand) 55%, transparent), transparent 70%), linear-gradient(160deg, #111b2e, #05080f);
}
.ld-play-ic { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .32); backdrop-filter: blur(6px); transition: transform .2s var(--ease), background-color .2s; }
.ld-play-ic .s-ic { width: 30px; height: 30px; }
.ld-play:hover .ld-play-ic { transform: scale(1.06); background: rgba(255, 255, 255, .24); }
.ld-play-words { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.01em; }
.ld-play-host { font-size: 0.82rem; font-weight: 600; color: rgba(255, 255, 255, .66); }
.ld-play:focus-visible { outline: 3px solid #fff; outline-offset: -6px; border-radius: var(--r-lg); }
.ld-panel-foot { margin-top: 12px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.92rem; }
.ld-panel-foot .s-ic { width: 15px; height: 15px; }

.ld-media-link { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); text-decoration: none !important; transition: border-color .15s, box-shadow .15s; }
.ld-media-link:hover { border-color: var(--primary-line); box-shadow: var(--sh-2); }
.ld-media-link > .s-ic { width: 18px; height: 18px; color: var(--ink-3); margin-left: auto; }
.ld-media-link-ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.ld-media-link-ic .s-ic { width: 22px; height: 22px; }
.ld-media-link-words { display: grid; gap: 2px; min-width: 0; }
.ld-media-link-words strong { font-size: 1rem; overflow-wrap: anywhere; }
.ld-media-link-words span { font-size: 0.84rem; color: var(--ink-3); }
.ld-plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.ld-plans + .ld-plan-links { margin-top: 14px; }
.ld-plan { position: relative; aspect-ratio: 4 / 3; padding: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; cursor: zoom-in; }
.ld-plan img { width: 100%; height: 100%; object-fit: contain; color: transparent; font-size: 0; }
.ld-plan-zoom { position: absolute; right: 10px; bottom: 10px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(14, 23, 38, .74); color: #fff; }
.ld-plan-zoom .s-ic { width: 16px; height: 16px; }
.ld-plan-links { list-style: none; padding: 0; display: grid; gap: 10px; }

/* Amenities */
.ld-ticks { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; }
.ld-ticks li { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-2); font-weight: 600; font-size: 0.95rem; line-height: 1.4; min-width: 0; }
.ld-ticks .s-ic { flex: none; width: 20px; height: 20px; padding: 3px; margin-top: 1px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); stroke-width: 3; }

/* Open houses */
.ld-opens { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.ld-open { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.ld-open-date { flex: none; width: 54px; height: 58px; border-radius: 12px; display: grid; place-content: center; text-align: center; background: var(--primary-soft); color: var(--primary); line-height: 1.05; }
.ld-open-date span { font-size: 0.72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ld-open-date strong { font-size: 1.4rem; font-weight: 800; }
.ld-open-words { display: grid; gap: 2px; min-width: 0; }
.ld-open-words strong { font-size: 0.95rem; color: var(--ink); }
.ld-open-words span { font-size: 0.88rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Location */
.ld-map-wrap { margin-top: 16px; }
.ld-map { height: 380px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--bg-sunk); }
.ld-map-note:empty { display: none; }
.ld-map-note { font-size: 0.88rem; color: var(--ink-3); }
.ld-links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 0.94rem; }
.ld-links .s-ic { width: 15px; height: 15px; }

/* Listed by */
.ld-lister-card { padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; }
.ld-lister-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ld-lister-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: contain; background: #fff; border: 1px solid var(--line); flex: none; }
.ld-lister-mono { width: 56px; height: 56px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 1.4rem; font-weight: 800; }
.ld-lister-name { font-size: 1.08rem; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.ld-lister-sub { font-size: 0.86rem; color: var(--ink-3); }
.ld-lister-contact { list-style: none; padding: 0; display: grid; gap: 8px; }
.ld-lister-contact a { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 0.93rem; overflow-wrap: anywhere; }
.ld-lister-contact .s-ic { width: 16px; height: 16px; color: var(--ink-3); flex: none; }

/* ---------- Sidebar: contact ------------------------------------------------------------ */

/* The contact card stays in view while the page scrolls (a tall one sticks by its bottom: rentals.js);
   the sponsored card waits at the foot of the column, under it. */
.ld-side { min-width: 0; align-self: stretch; display: flex; flex-direction: column; gap: 22px; }
.ld-side-stick { flex: 1 1 auto; }
.ld-side-in { position: sticky; top: var(--ld-side-top, calc(var(--header-h) + 20px)); }
.ld-contact { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--sh-2); }
.ld-contact-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.ld-contact-price { font-size: 1.6rem; line-height: 1; font-weight: 800; letter-spacing: -0.035em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ld-contact-price span { font-size: 0.9rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
.ld-contact-top .s-avail { font-size: 0.84rem; }
.ld-contact-title { font-size: 1.1rem; font-weight: 800; letter-spacing: -0.015em; color: var(--ink); line-height: 1.3; }
.ld-contact-note { margin-top: 4px; font-size: 0.86rem; color: var(--ink-3); line-height: 1.5; }
.ld-contact-actions { display: grid; gap: 8px; margin-top: 16px; }
.ld-or { display: flex; align-items: center; gap: 12px; margin: 16px 0 2px; font-size: 0.8rem; font-weight: 700; color: var(--ink-3); }
.ld-or::before, .ld-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ld-contact > .s-alert { margin-top: 14px; }
.ld-form { display: grid; gap: 12px; margin-top: 16px; }
.ld-form .s-field { gap: 5px; }
.ld-form .s-label { font-size: 0.82rem; }
.ld-form .s-input { min-height: 44px; padding: 9px 13px; }
.ld-form .s-textarea { min-height: 84px; padding: 10px 13px; }
.ld-form .s-alert { margin: 0; }
.ld-form .s-check { font-size: 0.9rem; }
.ld-consent { font-size: 0.74rem !important; line-height: 1.5 !important; color: var(--ink-3) !important; }
.ld-consent input { width: 16px; height: 16px; }
.ld-consent a { text-decoration: underline; text-underline-offset: 2px; }
.ld-contact-call { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--ink-3); text-align: center; }
.ld-contact-call a { font-weight: 700; }
.ld-contact--gone .s-btn { margin-top: 16px; }

.ld-side-ad { flex: none; display: grid; gap: 10px; }

/* ---------- Phone contact bar ----------------------------------------------------------- */

.ld-bar { display: none; }

/* ---------- Similar and sponsored rails --------------------------------------------------- */

.ld-more { border-top: 1px solid var(--line); margin-top: 40px; }
.ld-more + .ld-more { margin-top: 0; }
.ld-more-title { font-size: clamp(1.3rem, 1.1rem + .7vw, 1.7rem); }
.ld-more--ad { background: var(--ad-soft); border-top-color: var(--ad-line); border-bottom: 1px solid var(--ad-line); }
.ld-more--ad .s-rail-btn { background: var(--surface); }

/* ---------- Narrow screens -------------------------------------------------------------- */

@media (max-width: 1100px) {
  .ld-grid { grid-template-columns: minmax(0, 1fr) 348px; gap: 36px; }
  .ld-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ld-ticks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .ld-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; padding-top: 24px; }
  .ld-side-in { position: static; }
  .ld-contact { scroll-margin-top: calc(var(--header-h) + 12px); }

  .ld-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 44;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 24px -18px rgba(14, 23, 38, .4);
    transition: transform .25s var(--ease);
  }
  .ld-bar.is-away { transform: translateY(110%); }
  .ld-bar-price { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
  .ld-bar-price span { font-size: 0.82rem; font-weight: 600; color: var(--ink-3); letter-spacing: 0; }
  .ld-bar-actions { display: flex; gap: 8px; }
  .ld-bar-actions .s-btn { min-height: 46px; padding: 0 18px; }
  .ld-has-bar .s-footer { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

@media (max-width: 760px) {
  .ld-top { padding-top: 14px; padding-bottom: 12px; }
  .ld-top .s-crumbs li:last-child { display: none; }
  .ld-gone { flex-wrap: wrap; }
  .ld-gone .s-btn { width: 100%; }

  .ld-gallery { display: block; height: auto; aspect-ratio: 4 / 3; margin-inline: calc(var(--gutter) * -1); border-radius: 0; }
  .ld-gallery .ld-tile { width: 100%; height: 100%; }
  .ld-gallery .ld-tile ~ .ld-tile { display: none; }
  .ld-gallery-bar { left: 12px; right: 12px; bottom: 12px; max-width: none; gap: 6px; }
  .ld-chip { height: 34px; padding: 0 12px; font-size: 0.8rem; }
  .ld-chip--all span { display: none; }
  .ld-chip--all { width: 34px; padding: 0; justify-content: center; }
  .ld-gallery-count { position: absolute; top: 12px; right: 12px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--pill); background: rgba(8, 12, 20, .66); color: #fff; font-size: 0.8rem; font-weight: 700; }
  .ld-gallery-count .s-ic { width: 14px; height: 14px; }

  .ld-viewer-bar { padding: 10px 12px; gap: 10px; }
  .ld-viewer-step { display: none; }
  .ld-slide { padding: 0; }
  .ld-slide-fig img { border-radius: 0; }
  .ld-viewer-thumbs { padding: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
  .ld-thumb { width: 60px; height: 44px; }

  .ld-head { padding-bottom: 22px; }
  .ld-keyfacts li { height: 36px; padding: 0 12px; font-size: 0.88rem; }
  .ld-section { padding: 28px 0; }
  .ld-h2 { font-size: 1.2rem; }
  .ld-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ld-fact { padding: 14px; }
  .ld-ticks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
  .ld-ticks li { font-size: 0.9rem; }
  .ld-map { height: 280px; }
  .ld-frame { margin-inline: calc(var(--gutter) * -1); border-radius: 0; }
  .ld-play-ic { width: 64px; height: 64px; }
  .ld-lister-card { padding: 18px; }
  .ld-contact { padding: 20px 18px; border-radius: var(--r-lg); }
  .ld-more { margin-top: 24px; }
}

/* Wide screens (owner, 2026-10-16: full screen width): a wider sidebar and more facts in a row. */
@media (min-width: 1600px) {
  .ld-grid { grid-template-columns: minmax(0, 1fr) 420px; gap: 72px; }
  .ld-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ld-ticks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- "See all N apartments in this building" (rentals_views._building_link) ---------- */
.ld-building { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-2); color: var(--ink); text-decoration: none !important; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.ld-building:hover { border-color: var(--primary-line); box-shadow: var(--sh-1); }
.ld-building:focus-visible { outline: none; box-shadow: var(--ring); }
.ld-building-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.ld-building-ic .s-ic { width: 20px; height: 20px; }
.ld-building-words { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.ld-building-words strong { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-building-words span { font-size: 0.88rem; color: var(--ink-3); }
.ld-building > .s-ic { flex: none; width: 18px; height: 18px; color: var(--ink-3); transition: transform .2s var(--ease); }
.ld-building:hover > .s-ic { transform: translateX(3px); color: var(--primary); }
