/* Real Estate — Plots/Land.
   Every class is prefixed `re-` and scoped under `.re-shell` so shared
   sheets (oat, cards_style, cards) can't collide with us or vice versa. */

.re-shell,
.re-shell *,
.re-shell *::before,
.re-shell *::after { box-sizing: border-box; }

.re-shell {
  --re-primary: var(--primary, #6c5ce7);
  --re-border: var(--border, #e5e7eb);
  --re-muted: var(--foreground-light, #6b7280);
  --re-ink: var(--foreground, #111827);
  --re-radius: 14px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3.5rem;
}
.re-shell a:focus-visible,
.re-shell button:focus-visible,
.re-shell input:focus-visible,
.re-shell select:focus-visible {
  outline: 3px solid var(--re-primary);
  outline-offset: 2px;
}
.re-main { width: 100%; max-width: none; margin: 0; padding: 0; }
.re-ico { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Masthead ── */
.re-mast { border-bottom: 2px solid var(--re-ink); padding-bottom: 1rem; margin-bottom: 1.5rem; }
.re-kicker { display: block; font-size: .75rem; font-weight: 700; letter-spacing: .12em; color: var(--re-primary); margin-bottom: .3rem; }
.re-mast h1 { margin: 0 0 .35rem; font-size: 2.25rem; line-height: 1.1; letter-spacing: -.02em; }
.re-mast p { margin: 0; color: var(--re-muted); font-size: .9375rem; }

/* ── Filters ── */
.re-filters { display: flex; flex-direction: column; gap: .875rem; margin: 0 0 1.25rem; }

.re-search {
  display: flex; align-items: center; gap: .625rem;
  background: #fff; border: 1px solid var(--re-border); border-radius: 12px;
  padding: .375rem .375rem .375rem .875rem; max-width: 560px;
  transition: border-color .15s, box-shadow .15s;
}
.re-search:focus-within { border-color: var(--re-primary); box-shadow: 0 0 0 3px rgba(108, 92, 231, .15); }
.re-search input[type="search"] {
  flex: 1; min-width: 0; width: auto; margin: 0; padding: .5rem 0;
  border: 0; outline: 0; box-shadow: none; background: transparent;
  font-size: .9375rem; height: auto;
}
.re-search input[type="search"]::-webkit-search-cancel-button { display: none; }
.re-search .re-ico { width: 18px; height: 18px; color: var(--re-muted); flex: none; }

.re-cities { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .8125rem; color: var(--re-muted); }
.re-minichip {
  display: inline-block; border: 1px solid var(--re-border); border-radius: 999px;
  padding: .25rem .75rem; font-size: .8125rem; line-height: 1.4;
  background: #fff; color: var(--re-ink); text-decoration: none; cursor: pointer;
}
.re-minichip:hover { border-color: var(--re-primary); color: var(--re-primary); }
.re-minichip.is-active { background: var(--re-primary); border-color: var(--re-primary); color: #fff; }
button.re-minichip, button.re-chip { font-family: inherit; }

.re-filter-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; }
.re-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.re-chip {
  display: inline-block; border: 1px solid var(--re-border); border-radius: 999px;
  padding: .375rem .9rem; font-size: .8125rem; font-weight: 500; line-height: 1.3;
  background: #fff; color: var(--re-ink); text-decoration: none; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.re-chip:hover { border-color: var(--re-primary); color: var(--re-primary); }
.re-chip.is-active { background: var(--re-primary); border-color: var(--re-primary); color: #fff; }

.re-selects { display: flex; flex-wrap: wrap; gap: .5rem; }
.re-selects select {
  width: auto; min-width: 150px; max-width: 220px; margin: 0;
  border: 1px solid var(--re-border); border-radius: 10px;
  padding: .45rem .75rem; font-size: .8125rem; background-color: #fff; height: auto;
}

/* Active-filter summary */
.re-active { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1rem; font-size: .8125rem; color: var(--re-muted); }

.re-shell .results-bar strong { color: var(--re-ink); }
.re-clear { color: var(--re-primary); font-weight: 500; text-decoration: none; }
.re-clear:hover { text-decoration: underline; }

/* ── Rows: registry-style list instead of boxed cards ── */
.re-list { display: flex; flex-direction: column; border-top: 1px solid var(--re-border); }
.re-row {
  display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1.25rem;
  padding: 1.25rem .25rem; border-bottom: 1px solid var(--re-border);
  color: var(--re-ink); text-decoration: none;
  transition: background-color .15s;
}
.re-row:hover { background: #fafaff; }
.re-row:hover .re-rowarrow { transform: translateX(4px); color: var(--re-primary); }
.re-row:focus-visible { outline: 3px solid var(--re-primary); outline-offset: -3px; }
.re-rowmedia {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px;
  background: #f3f4f6; align-self: start;
}
.re-rowmedia img, .re-rowmedia svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.re-row.is-sold .re-rowmedia img, .re-row.is-sold .re-rowmedia svg { filter: grayscale(.7); opacity: .85; }
.re-row.is-sold .re-rowtitle { color: var(--re-muted); }
.re-rowbody { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.re-rowtop { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.re-rowtitle { margin: 0; font-size: 1.25rem; font-weight: 650; line-height: 1.25; letter-spacing: -.01em; }
.re-rowarrow { flex: none; width: 34px; height: 34px; display: grid; place-items: center; color: var(--re-muted); transition: transform .15s, color .15s; }
.re-rowarrow .re-ico { width: 22px; height: 22px; }
.re-row .re-price strong { font-size: 1.375rem; }
.re-row .re-meter { max-width: 220px; }
.re-spec { display: flex; flex-wrap: wrap; gap: .35rem 1.5rem; margin-top: .5rem; padding-top: .65rem; border-top: 1px dashed var(--re-border); }
.re-specitem { display: flex; flex-direction: column; font-size: .875rem; }
.re-specitem small { font-size: .75rem; color: var(--re-muted); }

/* ── Card (whole card is one link) ── */
.re-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--re-border); border-radius: var(--re-radius);
  color: var(--re-ink); text-decoration: none;
  transition: border-color .15s, box-shadow .15s;
}
.re-card:hover { border-color: #cfd3ff; box-shadow: 0 8px 24px rgba(17, 24, 39, .08); text-decoration: none; }
.re-card:focus-visible { outline: 3px solid var(--re-primary); outline-offset: 2px; }

.re-media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: #f3f4f6; display: grid; place-items: center;
}
.re-media img, .re-media svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.re-card.is-sold .re-media img, .re-card.is-sold .re-media svg { filter: grayscale(.7); opacity: .85; }

.re-status {
  position: absolute; top: .75rem; left: .75rem;
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .2rem .6rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; line-height: 1.4;
  background: #fff; border: 1px solid var(--re-border); color: var(--re-ink);
}
.re-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.re-status.is-available { color: #15803d; border-color: #bbf7d0; }
.re-status.is-upcoming { color: #1d4ed8; border-color: #bfdbfe; }
.re-status.is-sold { color: #b91c1c; border-color: #fecaca; }

/* Save (shortlist) button: JS-only, hidden until JS reveals it */
.re-save {
  position: absolute; top: .6rem; right: .6rem;
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--re-border);
  background: rgba(255, 255, 255, .92); color: var(--re-muted); cursor: pointer; padding: 0;
}
.re-save svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.re-save[aria-pressed="true"] { color: var(--re-primary); border-color: var(--re-primary); }
.re-save[aria-pressed="true"] svg { fill: currentColor; }

.re-body { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.125rem 1.125rem; flex: 1; }
.re-title {
  margin: 0; font-size: 1.0625rem; font-weight: 650; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.re-loc { display: flex; align-items: center; gap: .3rem; margin: 0; font-size: .8125rem; color: var(--re-muted); }
.re-loc .re-ico { width: 14px; height: 14px; flex: none; }
.re-loc span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.re-price { margin: .35rem 0 0; display: flex; align-items: baseline; gap: .25rem; }
.re-price strong { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.re-price span { font-size: .8125rem; color: var(--re-muted); }
.re-price.is-muted strong { font-size: .9375rem; font-weight: 500; color: var(--re-muted); }

/* Price meter: where this card sits in the filtered set's price range */
.re-meter { height: 3px; border-radius: 2px; background: #eef0f4; overflow: hidden; }
.re-meter span { display: block; height: 100%; background: var(--re-primary); border-radius: 2px; }

.re-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem;
  margin-top: auto; padding-top: .75rem; border-top: 1px solid #f0f1f3;
}
.re-size { font-size: .8125rem; color: var(--re-muted); }
.re-badges { display: flex; gap: .375rem; flex-wrap: wrap; margin-left: auto; }
.re-badge {
  font-size: .6875rem; font-weight: 600; line-height: 1.4; padding: .1rem .5rem;
  border-radius: 6px; background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb;
}
.re-badge.is-rera { background: #f5f4ff; color: #4c3fc9; border-color: #dcd8ff; }
.re-badge.is-ok { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }

/* The row above only gets a top gap when it isn't the first thing after the price */
.re-price + .re-foot { margin-top: .5rem; }

/* ── Empty state ── */
.re-empty {
  text-align: center; padding: 3rem 1rem; border: 1px dashed var(--re-border);
  border-radius: var(--re-radius); background: #fff;
}
.re-empty strong { display: block; font-size: 1.0625rem; }
.re-empty p { margin: .35rem 0 1.25rem; color: var(--re-muted); }

/* ── Pagination ── */
.re-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .375rem; margin-top: 2rem; }
.re-pager a {
  min-width: 2.25rem; padding: .45rem .75rem; text-align: center;
  border: 1px solid var(--re-border); border-radius: 9px; background: #fff;
  color: var(--re-ink); font-size: .875rem; text-decoration: none;
}
.re-pager a:hover { border-color: var(--re-primary); color: var(--re-primary); }
.re-pager a.is-active { background: var(--re-primary); border-color: var(--re-primary); color: #fff; }

/* ── Detail page ── */
.re-status.is-inline { position: static; }
.re-detail { display: flex; flex-direction: column; gap: 1rem; width: 100%; }
.re-crumbs { font-size: .8125rem; color: var(--re-muted); }
.re-crumbs a { color: var(--re-muted); text-decoration: none; }
.re-crumbs a:hover { color: var(--re-primary); }

.re-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.re-dmain { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.re-side { min-width: 0; display: flex; flex-direction: column; gap: 1rem; }

.re-hero { background: #fff; border: 1px solid var(--re-border); border-radius: var(--re-radius); overflow: hidden; }
.re-hero img { display: block; width: 100%; max-height: 360px; object-fit: cover; }
.re-hero-media { aspect-ratio: auto; height: 220px; }
.re-hero-body { display: flex; flex-direction: column; gap: .5rem; padding: 1.25rem 1.5rem 1.5rem; }
.re-hero-body h1 { margin: 0; font-size: 1.75rem; line-height: 1.2; letter-spacing: -.01em; }
.re-hero-body .re-loc { font-size: .9375rem; }
.re-hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .25rem; }

/* Buyer guide: section jump-links as pills */
.re-guide-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; }
.re-guide-nav a {
  display: inline-flex; align-items: center; padding: .4rem .85rem;
  border: 1px solid var(--re-border); border-radius: 999px; background: #fff;
  color: var(--re-ink); font-size: .8125rem; text-decoration: none; white-space: nowrap;
}
.re-guide-nav a:hover { border-color: var(--re-primary); color: var(--re-primary); }
.re-panel[id] { scroll-margin-top: 5rem; }
/* Buyer guide: space between stacked sections (detail page spaces its panels with flex gap instead) */
.re-main > .re-panel + .re-panel { margin-top: 1rem; }

.re-panel { background: #fff; border: 1px solid var(--re-border); border-radius: var(--re-radius); padding: 1.25rem 1.5rem; }
.re-panel h1 { margin: 0 0 .5rem; font-size: 1.5rem; }
.re-panel h2 { margin: 0 0 .875rem; font-size: 1.0625rem; }
.re-panel p { margin: 0 0 .75rem; line-height: 1.65; }
.re-panel p:last-child { margin-bottom: 0; }
.re-note { font-size: .8125rem; color: var(--re-muted); }
.re-facts + .re-note { margin-top: .875rem; }

.re-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.re-fact { display: flex; flex-direction: column; gap: .15rem; background: #f7f7fb; border-radius: 10px; padding: .7rem .875rem; }
.re-fact small { font-size: .75rem; color: var(--re-muted); }
.re-fact strong { font-size: 1rem; word-break: break-word; }
.re-fact .re-minichip { align-self: flex-start; margin-top: .3rem; }

/* Key facts strip */
.re-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .75rem;
  background: #fff; border: 1px solid var(--re-border); border-radius: var(--re-radius);
  padding: 1rem 1.25rem;
}
.re-stripfact { display: flex; flex-direction: column; gap: .1rem; }
.re-stripfact small { font-size: .8125rem; color: var(--re-muted); }
.re-stripfact strong { font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }

/* Cost estimator */
.re-est { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; margin-bottom: .875rem; }
.re-est label { display: flex; flex-direction: column; gap: .3rem; font-size: .8125rem; color: var(--re-muted); }
.re-est input, .re-lead input, .re-lead select, .re-lead textarea {
  border: 1px solid var(--re-border); border-radius: 10px; padding: .55rem .75rem;
  font-size: .875rem; color: var(--re-ink); background: #fff; width: 100%; margin: 0; font-family: inherit;
}
.re-estout { font-size: 1rem; }
.re-estout strong { font-size: 1.25rem; }

/* Sticky summary / enquiry card */
.re-summary {
  background: #fff; border: 1px solid var(--re-border); border-radius: var(--re-radius);
  padding: 1.25rem 1.5rem; /* not sticky: the FAQ card sits below it in the same column */
  display: flex; flex-direction: column; gap: .6rem;
}
.re-summary p { margin: 0; }
.re-sumprice { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.re-sumprice.is-muted { font-size: 1rem; font-weight: 500; color: var(--re-muted); }
.re-summeta { font-size: .875rem; color: var(--re-muted); }
.re-call {
  display: block; text-align: center; border-radius: 10px; padding: .7rem 1rem;
  background: #1faa55; color: #fff; font-weight: 700; font-size: 1rem; text-decoration: none;
}
.re-call:hover { filter: brightness(1.08); color: #fff; }
.re-call.is-alt { background: var(--re-primary); }
.re-or { display: flex; align-items: center; gap: .6rem; font-size: .75rem; color: var(--re-muted); }
.re-or::before, .re-or::after { content: ""; flex: 1; height: 1px; background: var(--re-border); }
.re-leadtitle { margin: 0; font-size: 1rem; font-weight: 650; scroll-margin-top: 5rem; }
.re-flash { font-size: .8125rem; padding: .55rem .75rem; border-radius: 10px; }
.re-flash.is-ok { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.re-flash.is-err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.re-lead { display: flex; flex-direction: column; gap: .55rem; margin-top: .25rem; }
.re-lead label { display: flex; flex-direction: column; gap: .25rem; font-size: .8125rem; color: var(--re-muted); }
.re-lead .btn-primary { text-align: center; width: 100%; }
.re-soldout { font-size: .9375rem; font-weight: 600; color: #b91c1c; }
.re-summary .btn-primary { text-align: center; }
.re-sumrow { display: flex; gap: .5rem; }
.re-sumrow .re-chip { flex: 1; text-align: center; }
.re-summary .re-note { font-size: .75rem; }

/* Units table (project detail) */
.re-units { display: flex; flex-direction: column; }
.re-unitrow {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr .9fr 1fr; gap: .75rem;
  padding: .6rem 0; border-top: 1px solid #f0f1f3; font-size: .875rem; align-items: center;
}
.re-unitrow:first-child { border-top: 0; }
.re-unitrow.is-head { font-size: .75rem; color: var(--re-muted); padding-top: 0; }
.re-ustat.is-available { color: #15803d; font-weight: 600; }
.re-ustat.is-upcoming { color: #1d4ed8; font-weight: 600; }
.re-ustat.is-sold { color: #b91c1c; font-weight: 600; }

/* Features: amenity chips */
.re-amenities { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: .875rem; }
.re-amenities .re-badge { font-size: .75rem; padding: .25rem .65rem; }
/* Nearby landmarks */
.re-nearby { display: flex; flex-direction: column; }
.re-nearbyrow { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .55rem 0; border-top: 1px solid #f0f1f3; font-size: .875rem; }
.re-nearbyrow:first-child { border-top: 0; }
.re-nearbyrow strong { font-weight: 600; white-space: nowrap; }

/* FAQ panel (side column, below the enquiry card) */
.re-faqsec { margin-top: 0; }
/* Link to the buying guide, shown above the FAQ list */
.re-guidelink {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin: 0 0 .875rem; padding: .8rem 1rem; border-radius: 12px; text-decoration: none;
  background: #f5f3ff; border: 1px solid #ddd6fe; color: var(--re-ink);
  transition: border-color .15s ease, background .15s ease;
}
.re-guidelink:hover { border-color: var(--re-primary); background: #efecff; }
.re-guidetext { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.re-guidetext strong { font-size: .9375rem; font-weight: 650; color: var(--re-primary); }
.re-guidetext span { font-size: .8125rem; color: var(--re-muted); line-height: 1.4; }
.re-guidechev { flex: none; width: 20px; height: 20px; color: var(--re-primary); stroke-width: 2.2; }
.re-faqlist { display: flex; flex-direction: column; gap: .75rem; }
.re-faqitem {
  border: 1px solid var(--re-border); border-radius: 12px; background: #fff;
  overflow: hidden; /* keeps the open state's background inside the rounded corners */
  transition: border-color .15s ease, box-shadow .15s ease;
}
.re-faqitem:hover { border-color: #d4d7dd; }
.re-faqitem[open] { border-color: var(--re-primary); box-shadow: 0 2px 10px rgba(108, 92, 231, .08); }
.re-faqitem > summary.re-faqq {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  cursor: pointer; font-size: .9375rem; font-weight: 600; line-height: 1.4; color: var(--re-ink);
  padding: .9rem 1rem; margin: 0; list-style: none;
  border: 0; border-radius: 0; background: transparent; /* neutralise shared-sheet summary styling */
}
.re-faqitem > summary.re-faqq::-webkit-details-marker { display: none; }
.re-faqitem > summary.re-faqq::marker { content: ""; }
.re-faqitem > summary.re-faqq::before,
.re-faqitem > summary.re-faqq::after { content: none; display: none; background: none; } /* drop any shared-sheet arrow; we draw our own */
.re-faqitem > summary.re-faqq { background-image: none; }
.re-faqtext { flex: 1; min-width: 0; }
.re-faqchev {
  flex: none; width: 20px; height: 20px; color: var(--re-primary); stroke-width: 2.2;
  transition: transform .2s ease;
}
.re-faqitem[open] > summary.re-faqq .re-faqchev { transform: rotate(180deg); }
.re-faqitem > summary.re-faqq:hover { background: #f9fafb; }
.re-faqa { padding: 0 1rem; }
.re-faqa p { font-size: .875rem; color: var(--re-muted); line-height: 1.65; margin: 0 0 .9rem; max-width: 75ch; }

/* Guide tabs (CSS-only: native radios, works without JS) */
.re-tabs > input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.re-tablabels { display: flex; gap: .5rem; margin: 0 0 1.25rem; }
.re-tablabels label {
  border: 1px solid var(--re-border); border-radius: 999px; background: #fff;
  padding: .45rem 1.25rem; font-size: .875rem; font-weight: 600; cursor: pointer; color: var(--re-ink);
}
.re-tabpanels .re-tabpanel { display: none; }
.re-tabpanels .re-tabpanel .re-panel { margin-bottom: 1rem; }
#re-tab-owners:checked ~ .re-tabpanels #re-panel-owners,
#re-tab-tenants:checked ~ .re-tabpanels #re-panel-tenants { display: block; }
#re-tab-owners:checked ~ .re-tablabels label[for="re-tab-owners"],
#re-tab-tenants:checked ~ .re-tablabels label[for="re-tab-tenants"] {
  background: var(--re-primary); border-color: var(--re-primary); color: #fff;
}

/* Similar plots */
/* Card grid (similar plots): 1rem gap between cards */
.re-grid { display: grid; gap: 1rem; }
.re-similar .re-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Mobile call bar */
.re-bottombar { display: none; }

@media (max-width: 959px) {
  .re-cols { grid-template-columns: minmax(0, 1fr); }
  /* Mobile: unwrap the side column so the enquiry card comes first and the FAQ last */
  .re-side { display: contents; }
  .re-summary { order: -1; }
  .re-faqsec { order: 2; }
  .re-bottombar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: .625rem 1rem calc(.625rem + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--re-border);
  }
  .re-bottombar .re-call { padding: .8rem 1rem; }
  .re-shell { padding-bottom: 5.5rem; }
}

@media (max-width: 640px) {
  .re-shell { padding: 1.25rem 1rem 2.5rem; }
  .re-mast h1 { font-size: 1.7rem; }
  .re-row { grid-template-columns: minmax(0, 1fr); }
  .re-selects { width: 100%; }
  .re-selects select { flex: 1 1 140px; max-width: none; min-height: 40px; }
  .re-grid { grid-template-columns: 1fr; }
  .re-chip, .re-pager a { min-height: 40px; }
  .re-hero-body { padding: 1rem 1.125rem 1.25rem; }
  .re-hero-body h1 { font-size: 1.4rem; }
  .re-hero-media { height: 180px; }
  .re-panel { padding: 1rem 1.125rem; }
}
@media (prefers-reduced-motion: reduce) {
  .re-card, .re-chip, .re-search { transition: none; }
}
/* ===== Photos: hero slider, photo grid, fullscreen lightbox ===== */
.re-gallery { position: relative; background: #eef0f4; }
.re-track {
  display: flex; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.re-track::-webkit-scrollbar { display: none; }
.re-slide { position: relative; flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; cursor: zoom-in; }
.re-slide img { display: block; width: 100%; height: 340px; max-height: none; object-fit: cover; }
.re-cap {
  position: absolute; left: .875rem; bottom: .875rem;
  background: rgba(17, 17, 27, .65); color: #fff; font-size: .75rem; font-weight: 500; line-height: 1;
  padding: .35rem .65rem; border-radius: 999px; backdrop-filter: blur(4px); pointer-events: none;
}
.re-dots { position: absolute; left: 0; right: 0; bottom: .75rem; display: flex; justify-content: center; gap: .4rem; pointer-events: none; }
.re-dot {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .6);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); pointer-events: auto; transition: background .15s, transform .15s;
}
.re-dot.is-active { background: #fff; transform: scale(1.3); }

.re-photogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; }
.re-photocell {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; margin: 0;
  border: 1px solid var(--re-border); border-radius: 12px; overflow: hidden;
  background: #f4f4f8; color: #fff; box-shadow: none; cursor: zoom-in; font: inherit; line-height: 0;
}
.re-photocell img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.re-photocell:hover img { transform: scale(1.04); }
.re-photocell span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.4rem .7rem .5rem;
  background: linear-gradient(to top, rgba(10, 10, 20, .72), transparent);
  font-size: .75rem; font-weight: 500; line-height: 1.2; text-align: left;
}
.re-photocell:focus-visible, .re-dot:focus-visible { outline: 2px solid var(--re-primary); outline-offset: 2px; }

.re-lightbox {
  position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center;
  background: rgba(10, 10, 20, .94);
}
.re-lightbox[hidden] { display: none; }
.re-lb-stage { flex: 1; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; }
.re-lb-stage img {
  max-width: min(92vw, 1400px); max-height: 82vh; width: auto; height: auto; object-fit: contain;
  transform-origin: center center; user-select: none; -webkit-user-drag: none; cursor: zoom-in;
}
.re-lightbox button {
  background: rgba(255, 255, 255, .14); color: #fff; border: 0; box-shadow: none; cursor: pointer;
  font: inherit; line-height: 1; transition: background .15s;
}
.re-lightbox button:hover { background: rgba(255, 255, 255, .26); }
.re-lb-close { position: absolute; top: 1rem; right: 1rem; width: 40px; height: 40px; border-radius: 50%; font-size: 1.1rem; z-index: 2; }
.re-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; font-size: 1.75rem; z-index: 2; }
.re-lb-nav.is-prev { left: 1rem; }
.re-lb-nav.is-next { right: 1rem; }
.re-lb-cap { position: absolute; left: 0; right: 0; bottom: 3.75rem; margin: 0; text-align: center; color: #e5e7eb; font-size: .875rem; pointer-events: none; }
.re-lb-tools { position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); display: flex; gap: .5rem; z-index: 2; }
.re-lb-tools button { min-width: 40px; height: 36px; padding: 0 .85rem; border-radius: 999px; font-size: .9rem; }

@media (max-width: 640px) {
  .re-slide img { height: 240px; }
  .re-photogrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
  .re-lb-nav { width: 38px; height: 38px; }
  .re-lb-nav.is-prev { left: .5rem; }
  .re-lb-nav.is-next { right: .5rem; }
}