/* Public project viewer — map-first, logical properties for RTL, bottom sheet on phones */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
    font-family: Inter, "Segoe UI", system-ui, -apple-system, "Noto Sans Arabic", Tahoma, sans-serif;
    color: var(--pm-ink); background: #fff; font-size: 14px; -webkit-font-smoothing: antialiased;
    display: flex; flex-direction: column; overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
.pm-muted { color: var(--pm-muted); font-size: 12px; }
.pm-green { color: var(--pm-available); }
.pm-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.pm-draft-banner { background: #FEF3C7; color: #92400E; text-align: center; font-size: 13px; font-weight: 600; padding: 6px; }

/* Header: layout and brand come from .pm-app-header in design-system.css */
.pm-top { flex: none; z-index: 10; }

.pm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--pm-line); background: #fff; font-weight: 600; font-size: 14px; text-decoration: none; color: var(--pm-ink); white-space: nowrap; }
.pm-btn-primary { background: var(--pm-brand); border-color: var(--pm-brand); color: #fff; }
.pm-btn-wa { background: #22C55E; border-color: #22C55E; color: #fff; }
.pm-btn-ghost { border-color: transparent; }
.pm-btn-dark { background: #1E293B; border-color: #334155; color: #fff; height: 34px; min-width: 34px; padding: 0 10px; }
.pm-btn:focus-visible, .pm-chip:focus-visible, .pm-card:focus-visible, .pm-cell:focus-visible { outline: 3px solid var(--pm-blue); outline-offset: 2px; }

/* Layout */
.pm-main { flex: 1; display: flex; min-height: 0; }
.pm-map-wrap { position: relative; flex: 1; min-width: 0; overflow: hidden; background: #D6D3CC; }
.pm-map { position: absolute; inset: 0; }
.pm-map-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; z-index: 4;
    background: repeating-linear-gradient(45deg, #F1F5F9 0 12px, #E2E8F0 12px 24px); }
.pm-map-fallback > div { background: #fff; border-radius: 14px; padding: 18px 22px; max-width: 380px; box-shadow: 0 8px 24px rgba(15, 23, 42, .12); }
.pm-map-fallback p { margin: 6px 0 0; color: var(--pm-muted); }

.pm-legend-card, .pm-compass-card, .pm-overlay-card { position: absolute; z-index: 3; background: #fff; box-shadow: 0 6px 20px rgba(15, 23, 42, .16); }
.pm-legend-card { top: 12px; left: 50%; transform: translateX(-50%); border-radius: 999px; padding: 7px 14px; display: flex; gap: 12px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pm-legend-card span { display: inline-flex; align-items: center; gap: 5px; }
.pm-compass-card { top: 12px; inset-inline-end: 12px; width: 64px; border-radius: 14px; padding: 4px; text-align: center; }
.pm-compass-card svg { width: 56px; height: 56px; display: block; }
.pm-compass-plan { font-size: 10px; font-weight: 700; color: var(--pm-muted); padding-bottom: 2px; }
.pm-overlay-card { bottom: 28px; inset-inline-start: 12px; width: 270px; border-radius: 14px; padding: 12px 14px; }
.pm-overlay-card input[type=range] { width: 100%; accent-color: var(--pm-brand); margin: 8px 0 2px; direction: ltr; }
.pm-range-labels { font-size: 11px; color: var(--pm-muted); direction: ltr; }
.pm-seg { display: flex; gap: 2px; background: #F1F5F9; border-radius: 10px; padding: 3px; margin-top: 8px; }
.pm-seg button { flex: 1; border: 0; background: transparent; border-radius: 8px; padding: 6px; font-size: 12px; font-weight: 600; color: var(--pm-muted); }
.pm-seg button.on { background: #fff; color: var(--pm-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.pm-tip { position: absolute; z-index: 6; transform: translate(-50%, -100%); background: var(--pm-ink); color: #fff; font-size: 12px; font-weight: 600; padding: 6px 10px; border-radius: 8px; pointer-events: none; white-space: nowrap; }

/* Panel */
.pm-panel { width: 420px; flex: none; border-inline-start: 1px solid var(--pm-line); background: #fff; display: flex; flex-direction: column; min-height: 0; }
.pm-sheet-handle { display: none; }
.pm-panel-body { flex: 1; overflow-y: auto; padding: 16px 18px 24px; }
.pm-hero { position: relative; height: 150px; border-radius: 14px; overflow: hidden; background: linear-gradient(180deg, #9CC7EE, #DDEBF7 60%, #C9B892 61%); }
.pm-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-hero-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 22px; font-weight: 800; color: rgba(15, 23, 42, .55); }
.pm-hero-badge { position: absolute; top: 10px; inset-inline-start: 10px; background: #EDE9FE; color: #5B21B6; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pm-h1 { font-size: 22px; font-weight: 800; letter-spacing: -.3px; margin: 12px 0 2px; }
.pm-title-row .pm-h1 { margin-bottom: 0; }
.pm-title-row { margin-top: 12px; }
.pm-title-row .pm-h1 { margin-top: 0; }
.pm-sub { font-size: 13px; color: var(--pm-muted); margin-top: 2px; }
.pm-desc { color: #334155; line-height: 1.55; margin: 12px 0 0; }
.pm-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.pm-stats-5 { grid-template-columns: repeat(5, 1fr); }
.pm-stats > div { background: #F8FAFC; border: 1px solid var(--pm-line); border-radius: 12px; padding: 9px 10px; min-width: 0; }
.pm-stats b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-stats span { font-size: 11px; color: var(--pm-muted); }
.pm-section { font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--pm-muted); margin: 18px 0 8px; }
.pm-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; background: #CBD5E1; }
.pm-bar i { display: block; }
.pm-bg-available { background: var(--pm-available); }
.pm-bg-reserved { background: var(--pm-reserved); }
.pm-bar-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--pm-muted); margin-top: 6px; }
.pm-bar-legend span:nth-child(1) { color: var(--pm-available); }
.pm-bar-legend span:nth-child(2) { color: #B45309; }
.pm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-chip { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--pm-line); background: #fff; font-size: 13px; font-weight: 600; }
.pm-chip.on { background: var(--pm-ink); border-color: var(--pm-ink); color: #fff; }
.pm-list { display: flex; flex-direction: column; gap: 8px; }
.pm-card { display: flex; gap: 12px; align-items: center; width: 100%; text-align: start; padding: 10px; border: 1px solid var(--pm-line); border-radius: 12px; background: #fff; }
.pm-card:hover, .pm-card.is-hovered { border-color: #B9D7CC; background: #F4F8F6; }
.pm-card-thumb { width: 52px; height: 52px; flex: none; border-radius: 10px; overflow: hidden; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--c); }
.pm-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pm-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pm-mini-bar { display: block; height: 5px; border-radius: 4px; background: #E2E8F0; overflow: hidden; margin-top: 4px; }
.pm-mini-bar i { display: block; height: 100%; }
.pm-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pm-pill-available, .pm-pill-unit-available { background: #DCFCE7; color: #166534; }
.pm-pill-fewLeft, .pm-pill-unit-reserved { background: #FEF3C7; color: #92400E; }
.pm-pill-soldOut, .pm-pill-unit-sold { background: #F1F5F9; color: #475569; }
.pm-pill-comingSoon { background: #EDE9FE; color: #5B21B6; }
.pm-back { border: 0; background: none; padding: 0 0 10px; color: var(--pm-brand); font-weight: 700; font-size: 13px; }
.pm-back::before { content: "\2039\00a0"; }
[dir="rtl"] .pm-back::before { content: "\203A\00a0"; }
.pm-price { font-size: 15px; font-weight: 700; margin-top: 6px; }
.pm-price-lg { font-size: 26px; font-weight: 800; }
.pm-facing { display: flex; gap: 14px; align-items: center; margin-top: 12px; padding: 12px; border: 1px solid var(--pm-line); border-radius: 14px; }
.pm-facing svg { width: 64px; height: 64px; flex: none; }
.pm-facing text { font-size: 10px; font-weight: 800; text-anchor: middle; fill: #64748B; }
.pm-facing .pm-facing-n { fill: #DC2626; }
.pm-facing-ring { fill: #F8FAFC; stroke: #E2E8F0; }
.pm-facing-sector { fill: rgba(14, 138, 106, .22); }
.pm-facing-arrow { stroke: var(--pm-brand); stroke-width: 5; stroke-linecap: round; }
.pm-legend { font-size: 11px; color: var(--pm-muted); text-transform: none; letter-spacing: 0; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.pm-stack { display: flex; flex-direction: column; gap: 4px; }
.pm-stack-row { display: flex; gap: 4px; align-items: center; }
.pm-stack-floor { width: 44px; flex: none; font-size: 11px; font-weight: 700; color: var(--pm-muted); }
.pm-cell { flex: 1; min-width: 0; height: 28px; border: 0; border-radius: 6px; font-size: 11px; font-weight: 700; color: #fff; }
.pm-cell.pm-st-sold { background: #E2E8F0; color: #94A3B8; }
.pm-cell:hover { outline: 2px solid var(--pm-brand); outline-offset: 1px; }
.pm-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pm-thumb { border: 1px solid var(--pm-line); border-radius: 10px; background: #F8FAFC; padding: 4px; text-align: center; }
.pm-thumb img { width: 100%; height: 70px; object-fit: contain; display: block; }
.pm-thumb span { display: block; font-size: 11px; color: var(--pm-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 3px; }
.pm-plan-preview { display: block; width: 100%; border: 1px solid var(--pm-line); border-radius: 12px; background: #F8FAFC; padding: 6px; }
.pm-plan-preview img { width: 100%; max-height: 260px; object-fit: contain; display: block; }
.pm-plan-preview span { display: block; font-size: 12px; color: var(--pm-muted); margin-top: 4px; }
.pm-note { margin-top: 12px; background: #F1F5F9; border-radius: 10px; padding: 10px 12px; color: #475569; font-size: 13px; }
.pm-cta { position: sticky; bottom: -24px; display: flex; gap: 8px; margin: 18px -18px -24px; padding: 12px 18px 16px; background: #fff; border-top: 1px solid var(--pm-line); }
.pm-cta .pm-btn { flex: 1; height: 44px; }

/* Lightbox */
.pm-lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(11, 18, 32, .94); display: flex; flex-direction: column; }
.pm-lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; color: #E2E8F0; font-weight: 700; }
.pm-lb-actions { display: flex; gap: 6px; }
.pm-lb-stage { flex: 1; overflow: hidden; display: grid; place-items: center; touch-action: none; }
.pm-lb-stage img { max-width: 94vw; max-height: calc(100vh - 80px); background: #fff; border-radius: 10px; transition: transform .12s ease-out; cursor: zoom-in; }
.pm-lb-nav { position: absolute; top: 50%; width: 44px; height: 64px; margin-top: -32px; border: 0; border-radius: 12px; background: rgba(30, 41, 59, .8); color: #fff; font-size: 30px; }
.pm-lb-prev { inset-inline-start: 12px; }
.pm-lb-next { inset-inline-end: 12px; }
[dir="rtl"] .pm-lb-prev, [dir="rtl"] .pm-lb-next { transform: scaleX(-1); }
.pm-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--pm-ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 60; }

/* Phones: full-screen map with a bottom sheet */
@media (max-width: 768px) {
    .pm-hide-sm, .pm-app-header .pm-app-button.pm-hide-sm { display: none; }
    .pm-main { position: relative; }
    .pm-legend-card { display: none; }
    .pm-overlay-card { bottom: auto; top: 12px; inset-inline-start: 12px; width: 210px; padding: 8px 10px; }
    .pm-overlay-card .pm-seg, .pm-overlay-card .pm-range-labels { display: none; }
    .pm-compass-card { width: 48px; }
    .pm-compass-card svg { width: 40px; height: 40px; }
    .pm-panel { position: absolute; left: 0; right: 0; bottom: 0; width: auto; z-index: 8; border: 0; border-radius: 20px 20px 0 0;
        box-shadow: 0 -8px 30px rgba(15, 23, 42, .2); transition: height .25s ease; }
    .pm-panel[data-sheet="peek"] { height: 34%; }
    .pm-panel[data-sheet="half"] { height: 58%; }
    .pm-panel[data-sheet="full"] { height: 92%; }
    .pm-sheet-handle { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; border: 0; background: none; padding: 8px 16px 2px; }
    .pm-sheet-handle span { width: 40px; height: 5px; border-radius: 5px; background: #CBD5E1; }
    .pm-sheet-handle b { font-size: 13px; color: var(--pm-muted); font-weight: 600; }
    .pm-panel-body { padding-top: 6px; }
    .pm-hero { height: 120px; }
    .pm-stats-5 { grid-template-columns: repeat(3, 1fr); }
    body.pm-no-map .pm-panel { height: 100%; border-radius: 0; }
}

/* ---------- share links (buyer view of one broker unit) ---------- */
.pm-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.pm-gallery-item { border: 0; padding: 0; background: #F1F5F9; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; cursor: zoom-in; }
.pm-gallery-item.is-main { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.pm-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-broker { display: flex; gap: 12px; align-items: center; margin-top: 16px; padding: 12px; border: 1px solid var(--pm-line); border-radius: 14px; background: #F8FAFC; }
.pm-broker-avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--pm-brand); color: #fff; display: grid; place-items: center; font-weight: 800; }
.pm-btn-block { display: flex; width: 100%; margin-top: 16px; }
.pm-unavailable { display: grid; place-items: center; min-height: 100vh; background: #F8FAFC; padding: 24px; }
.pm-unavailable-card { max-width: 420px; text-align: center; background: #fff; border: 1px solid var(--pm-line); border-radius: 18px; padding: 32px 28px; }
.pm-unavailable-card h1 { font-size: 20px; margin: 8px 0; }
.pm-unavailable-card p { color: var(--pm-muted); margin: 0; }
.pm-unavailable-icon { font-size: 40px; }

/* ---------- share link details page: information 70% / map 30% ---------- */
body.pm-share-mode .pm-panel { order: -1; width: 70%; border-inline-start: 0; }
body.pm-share-mode .pm-main { background: #F1F5F9; }
body.pm-share-mode .pm-map-wrap { margin: 16px; margin-inline-start: 24px; margin-inline-end: 40px; border-radius: 20px; border: 1px solid var(--pm-line); box-shadow: 0 10px 30px rgba(15, 23, 42, .12); isolation: isolate; }
body.pm-share-mode .pm-panel-body { padding: 24px 32px 32px; }
body.pm-share-mode .pm-overlay-card { width: auto; max-width: 270px; inset-inline-end: 12px; }
.pm-label.pm-facing-tag { gap: 6px; padding: 5px 12px 5px 6px; font-size: 13px; background: var(--pm-emerald); color: #fff; border: 2px solid #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .35); pointer-events: none; }
.pm-facing-tag-arrow { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; color: var(--pm-emerald); font-size: 13px; line-height: 1; }
.pm-share { max-width: 1120px; margin: 0 auto; }
.pm-share-top { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.pm-share-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.pm-block { margin-top: 22px; }
.pm-block-main { margin-top: 0; }
.pm-block-title { font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; color: var(--pm-muted); margin: 0 0 10px; }
.pm-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.pm-fact { background: #F8FAFC; border: 1px solid var(--pm-line); border-radius: 12px; padding: 8px 12px; min-width: 0; }
.pm-fact dt { font-size: 11px; color: var(--pm-muted); }
.pm-fact dd { margin: 2px 0 0; font-weight: 700; overflow-wrap: anywhere; }

.pm-sgallery-main { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; padding: 0; border-radius: 14px; overflow: hidden; background: #F1F5F9; cursor: zoom-in; }
.pm-sgallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-sgallery-count, .pm-sgallery-zoom { position: absolute; bottom: 10px; background: rgba(15, 23, 42, .7); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.pm-sgallery-count { inset-inline-start: 10px; }
.pm-sgallery-zoom { inset-inline-end: 10px; }
.pm-sgallery-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--pm-muted); cursor: default;
    background: repeating-linear-gradient(45deg, #F8FAFC 0 12px, #F1F5F9 12px 24px); border: 1px dashed #CBD5E1; }
.pm-sgallery-empty span:first-child { font-size: 36px; }
.pm-sgallery-thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; padding-bottom: 2px; }
.pm-sgallery-thumb { flex: none; width: 76px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 9px; overflow: hidden; background: #F1F5F9; opacity: .75; }
.pm-sgallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-sgallery-thumb.is-active { border-color: var(--pm-brand); opacity: 1; }
.pm-sgallery-thumb:focus-visible, .pm-sgallery-main:focus-visible { outline: 3px solid var(--pm-blue); outline-offset: 2px; }

.pm-money-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pm-money { border: 1px solid var(--pm-line); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.pm-money span { display: block; font-size: 11px; color: var(--pm-muted); }
.pm-money b { display: block; font-size: 16px; margin-top: 2px; overflow-wrap: anywhere; }
.pm-money.is-total { background: #EEF2FF; border-color: #C7D2FE; }
.pm-progress { height: 12px; border-radius: 8px; background: #E2E8F0; overflow: hidden; margin-top: 14px; }
.pm-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--pm-emerald), var(--pm-gold)); border-radius: 8px; }
[dir="rtl"] .pm-progress i { background: linear-gradient(270deg, var(--pm-emerald), var(--pm-gold)); }
.pm-progress-legend { margin-top: 6px; font-size: 13px; }
.pm-progress-legend b { color: var(--pm-brand); }
.pm-updated { margin-top: 6px; }

.pm-table-wrap { overflow-x: auto; border: 1px solid var(--pm-line); border-radius: 12px; }
.pm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pm-table th, .pm-table td { padding: 9px 12px; text-align: start; border-bottom: 1px solid var(--pm-line); white-space: nowrap; }
.pm-table thead th { background: #F8FAFC; font-size: 11px; color: var(--pm-muted); font-weight: 700; }
.pm-table tfoot th, .pm-table tfoot td { border-bottom: 0; font-weight: 800; }
.pm-table .pm-num { text-align: end; font-variant-numeric: tabular-nums; }
.pm-inst { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pm-inst-upcoming { background: #E0F2FE; color: #075985; }
.pm-inst-paid { background: #DCFCE7; color: #166534; }
.pm-inst-overdue { background: #FEE2E2; color: #991B1B; }

.pm-share .pm-broker { margin-top: 0; }
.pm-role { font-size: 11px; font-weight: 700; color: var(--pm-brand); background: #EEF2FF; border-radius: 999px; padding: 1px 8px; }
.pm-contact { display: flex; flex-direction: column; gap: 8px; }
.pm-contact .pm-btn { height: 42px; }
body.pm-share-mode .pm-cta { margin: 24px -32px -32px; padding: 12px 32px 16px; bottom: -32px; justify-content: flex-end; }
body.pm-share-mode .pm-cta .pm-btn { flex: 0 1 220px; }

@media (max-width: 1280px) {
    .pm-share-top { grid-template-columns: 1fr; }
    .pm-money-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) and (min-width: 769px) {
    body.pm-share-mode .pm-panel { width: 62%; }
    body.pm-share-mode .pm-panel-body { padding: 20px 22px 24px; }
    body.pm-share-mode .pm-cta { margin: 20px -22px -24px; padding: 12px 22px 16px; bottom: -24px; }
}
/* Phones: information first, map below (no bottom sheet). */
@media (max-width: 768px) {
    body.pm-share-mode .pm-main { flex-direction: column; overflow-y: auto; }
    body.pm-share-mode .pm-panel[data-sheet] { position: static; order: -1; width: auto; height: auto; flex: none; border: 0; border-radius: 0; box-shadow: none; }
    body.pm-share-mode .pm-sheet-handle { display: none; }
    body.pm-share-mode .pm-panel-body { overflow: visible; padding: 14px 14px 0; }
    body.pm-share-mode .pm-map-wrap { flex: none; height: 340px; margin: 14px; border-radius: 16px; }
    body.pm-share-mode .pm-cta { position: sticky; bottom: 0; margin: 18px -14px 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); z-index: 9; }
    body.pm-share-mode .pm-cta .pm-btn { flex: 1; }
    .pm-share-two { grid-template-columns: 1fr; }
    .pm-table th, .pm-table td { padding: 8px; }
}
@media (max-width: 420px) {
    .pm-money b { font-size: 14px; }
}

/* Premium share-page details layout */
body.pm-share-mode {
    display: block;
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--pm-bg);
}
body.pm-share-mode .pm-top {
    position: sticky;
    top: 0;
    box-shadow: 0 4px 18px rgba(11, 31, 58, .14);
}
body.pm-share-mode .pm-main { display: block; min-height: 0; overflow: visible; background: var(--pm-bg); }
body.pm-share-mode .pm-panel { display: block; width: auto; min-height: 0; border: 0; background: transparent; }
body.pm-share-mode .pm-sheet-handle { display: none; }
body.pm-share-mode .pm-panel-body { max-width: 1320px; margin: 0 auto; padding: 26px 0 72px; overflow: visible; }
.pm-share-page { color: var(--pm-ink); }
.pm-share-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; align-items: start; gap: 34px; margin-top: 25px; }
.pm-share-content { min-width: 0; }
.pm-share-heading { padding-bottom: 20px; border-bottom: 1px solid var(--pm-line); }
.pm-share-eyebrow { margin-bottom: 8px; color: var(--pm-blue); font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.pm-share-title-row { align-items: start; }
.pm-share-title-row h1 { margin: 0; color: var(--pm-navy); font: 700 30px/1.2 "Plus Jakarta Sans", Inter, sans-serif; letter-spacing: 0; }
.pm-share-location { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--pm-muted); font-size: 13px; }
.pm-share-price { margin-top: 13px; color: var(--pm-navy); font: 800 29px/1.2 "Plus Jakarta Sans", Inter, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.pm-share-page .pm-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 17px 0 0; }
.pm-share-page .pm-fact { padding: 11px 13px; border: 1px solid var(--pm-line); border-radius: 10px; background: #fff; }
.pm-share-page .pm-fact dt { color: var(--pm-muted); font-size: 10px; }
.pm-share-page .pm-fact dd { margin-top: 4px; color: var(--pm-navy); font-size: 14px; font-weight: 700; }
.pm-market-section-block { margin-top: 29px; }
.pm-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.pm-section-heading h2 { margin: 0; color: var(--pm-navy); font: 700 19px/1.35 "Plus Jakarta Sans", Inter, sans-serif; letter-spacing: 0; }
.pm-section-heading > span { color: var(--pm-muted); font-size: 11px; }
.pm-share-page .pm-desc { color: #526174; font-size: 14px; line-height: 1.8; }
.pm-map-section { margin-top: 30px; }
.pm-map-section .pm-section-heading { margin-bottom: 12px; }
.pm-map-section .pm-section-heading > span { max-width: 55%; text-align: end; }
.pm-share-map-mount { min-height: 0; }
body.pm-share-mode #pmMapWrap { position: relative; width: 100%; height: clamp(340px, 42vw, 520px); margin: 0; overflow: hidden; border: 1px solid var(--pm-line); border-radius: 14px; background: #E6EAE4; box-shadow: var(--pm-shadow-sm); isolation: isolate; }
body.pm-share-mode #pmMap { position: absolute; inset: 0; width: 100%; height: 100%; }
body.pm-share-mode .pm-compass-card { top: 14px; inset-inline-end: 14px; }
body.pm-share-mode .pm-overlay-card { inset-inline-start: 14px; bottom: 14px; border: 1px solid rgba(255,255,255,.75); border-radius: 10px; box-shadow: var(--pm-shadow-md); }
.pm-summary-card { position: sticky; top: 90px; padding: 21px; border: 1px solid var(--pm-line); border-radius: 14px; background: #fff; box-shadow: var(--pm-shadow-md); }
.pm-summary-kicker { color: var(--pm-blue); font-size: 10px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.pm-summary-price { margin-top: 7px; color: var(--pm-navy); font: 800 26px/1.2 "Plus Jakarta Sans", Inter, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.pm-summary-meta { margin-top: 4px; color: var(--pm-muted); font-size: 11px; }
.pm-summary-payment { margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--pm-line); }
.pm-summary-payment .pm-row { color: var(--pm-muted); font-size: 11px; }
.pm-summary-payment .pm-row b { color: var(--pm-emerald); font-size: 12px; }
.pm-summary-payment .pm-progress { height: 8px; margin: 9px 0 6px; }
.pm-summary-payment small { color: var(--pm-muted); font-size: 11px; }
.pm-summary-action { display: flex; width: 100%; min-height: 44px; margin-top: 9px; border-radius: 8px; font-size: 12px; }
.pm-summary-seller { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--pm-line); }
.pm-summary-seller > span:last-child { min-width: 0; }
.pm-summary-seller b, .pm-summary-seller small { display: block; }
.pm-summary-seller b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.pm-summary-seller small { margin-top: 3px; color: var(--pm-muted); font-size: 10px; }
.pm-summary-updated { margin-top: 13px; color: var(--pm-muted); font-size: 10px; }
.pm-sgallery { position: relative; display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(220px, 1fr); gap: 8px; height: clamp(340px, 35vw, 490px); }
.pm-sgallery .pm-sgallery-main { width: 100%; height: 100%; min-height: 0; aspect-ratio: auto; border-radius: 14px; }
.pm-sgallery-side { display: grid; grid-template: 1fr 1fr / 1fr 1fr; gap: 8px; min-height: 0; }
.pm-sgallery-tile { position: relative; min-width: 0; min-height: 0; padding: 0; overflow: hidden; border: 0; border-radius: 10px; background: #E8EDF0; }
.pm-sgallery-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.pm-sgallery-tile:hover img { transform: scale(1.04); }
.pm-sgallery-tile span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(11,31,58,.54); font-size: 20px; font-weight: 700; }
.pm-sgallery .pm-sgallery-empty { grid-column: 1 / -1; width: 100%; }
.pm-video-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: #0B1F3A; }
.pm-video-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.pm-video-poster { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.pm-video-poster img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; transition: opacity .2s ease; }
.pm-video-poster:hover img { opacity: 1; }
.pm-video-play { position: absolute; top: 50%; left: 50%; width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; transform: translate(-50%, -50%); background: #E62117; color: #fff; font-size: 24px; box-shadow: 0 6px 18px rgba(0,0,0,.3); transition: transform .2s ease; }
.pm-video-poster:hover .pm-video-play { transform: translate(-50%, -50%) scale(1.08); }
.pm-video-chip { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 1; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 999px; background: rgba(11,31,58,.82); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.pm-video-chip span { color: #FF4E45; }
.pm-video-poster:focus-visible, .pm-video-chip:focus-visible { outline: 3px solid #F0D791; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .pm-video-poster img, .pm-video-play { transition: none; } }
.pm-share-page .pm-block { margin-top: 27px; }
.pm-share-page .pm-block-title { color: var(--pm-navy); font: 700 19px/1.35 "Plus Jakarta Sans", Inter, sans-serif; letter-spacing: 0; text-transform: none; }
.pm-share-page .pm-money { padding: 12px; border-radius: 10px; }
.pm-share-page .pm-money b { color: var(--pm-navy); font-variant-numeric: tabular-nums; }
.pm-share-page .pm-money.is-total { border-color: #C4D5E4; background: #F1F6F9; }
.pm-share-page .pm-progress { height: 10px; }
.pm-share-page .pm-progress i { background: linear-gradient(90deg, var(--pm-emerald), var(--pm-gold)); }
.pm-share-page .pm-broker { margin-top: 0; border-color: var(--pm-line); border-radius: 12px; background: #fff; }
.pm-similar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pm-similar-card { display: block; overflow: hidden; border: 1px solid var(--pm-line); border-radius: 11px; background: #fff; transition: transform .18s ease, box-shadow .18s ease; }
.pm-similar-card:hover { transform: translateY(-2px); box-shadow: var(--pm-shadow-md); }
.pm-similar-image { display: grid; place-items: center; aspect-ratio: 16 / 10; overflow: hidden; color: #fff; background: var(--pm-navy); font-size: 20px; font-weight: 800; }
.pm-similar-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.pm-similar-card:hover img { transform: scale(1.035); }
.pm-similar-body { display: grid; gap: 4px; padding: 10px 11px 12px; }
.pm-similar-body b { color: var(--pm-navy); font-size: 14px; font-variant-numeric: tabular-nums; }
.pm-similar-body span { overflow: hidden; color: var(--pm-ink); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pm-similar-body small { color: var(--pm-muted); font-size: 10px; }
.pm-gallery-tools { position: absolute; top: 12px; inset-inline-end: 12px; z-index: 1; }
.pm-save-unit { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.75); border-radius: 50%; color: var(--pm-navy); background: rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(11,31,58,.17); font-size: 22px; }
.pm-save-unit[aria-pressed="true"] { color: #B8404B; }
.pm-mobile-contact { display: none; }
@media (max-width: 980px) {
    body.pm-share-mode .pm-panel-body { max-width: 100%; padding-inline: 24px; }
    .pm-share-layout { grid-template-columns: minmax(0, 1fr) 310px; gap: 22px; }
    .pm-share-page .pm-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pm-similar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    body.pm-share-mode .pm-panel-body { padding: 14px 14px 82px; }
    .pm-share-layout { display: flex; flex-direction: column; gap: 0; margin-top: 17px; }
    .pm-share-content { display: contents; }
    .pm-share-heading { order: 0; width: 100%; }
    .pm-summary-card { display: none; }
    .pm-share-title-row h1 { font-size: 23px; }
    .pm-share-price { font-size: 24px; }
    .pm-share-page .pm-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .pm-share-page .pm-fact { padding: 8px; }
    .pm-share-page .pm-fact dd { font-size: 12px; }
    .pm-share-content > .pm-market-section-block, .pm-share-content > .pm-block, .pm-share-content > .pm-broker, .pm-share-content > .pm-note { width: 100%; }
    .pm-map-section { order: 2; }
    body.pm-share-mode #pmMapWrap { height: 300px; border-radius: 11px; }
    .pm-share-page .pm-money-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pm-similar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .pm-similar-grid .pm-similar-card:last-child:nth-child(odd) { display: none; }
    .pm-sgallery { display: block; height: auto; aspect-ratio: 1.38; }
    .pm-sgallery .pm-sgallery-main { aspect-ratio: auto; border-radius: 11px; }
    .pm-sgallery-side { display: none; }
    .pm-mobile-contact { position: fixed; inset-inline: 0; bottom: 0; z-index: 21; display: flex; gap: 8px; padding: 9px 14px calc(9px + env(safe-area-inset-bottom)); border-top: 1px solid var(--pm-line); background: rgba(255,255,255,.97); backdrop-filter: blur(12px); }
    .pm-mobile-contact .pm-btn { flex: 1; min-height: 44px; margin: 0; border-radius: 8px; font-size: 12px; }
    .pm-sgallery-main { aspect-ratio: 16 / 10; border-radius: 11px; }
    .pm-sgallery-thumb { width: 64px; height: 48px; }
    body.pm-share-mode .pm-overlay-card { top: 10px; bottom: auto; inset-inline-start: 10px; }
    body.pm-share-mode .pm-overlay-card .pm-seg, body.pm-share-mode .pm-overlay-card .pm-range-labels { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pm-similar-card, .pm-similar-image img { transition: none; } }

/* Public project map */
body:not(.pm-share-mode) { background: var(--pm-bg); }
body:not(.pm-share-mode) .pm-map-wrap { background: #E5E9DF; }
body:not(.pm-share-mode) .pm-panel { width: min(38vw, 520px); border-inline-start: 1px solid var(--pm-line); background: var(--pm-bg); }
body:not(.pm-share-mode) .pm-panel-body { padding: 22px 24px 32px; }
body:not(.pm-share-mode) .pm-hero { height: 190px; border-radius: 13px; background: linear-gradient(135deg, #DCE7E5, #C8D6D4); }
body:not(.pm-share-mode) .pm-h1 { color: var(--pm-navy); font: 700 25px/1.25 "Plus Jakarta Sans", Inter, sans-serif; letter-spacing: 0; }
body:not(.pm-share-mode) .pm-card { padding: 11px; border-color: var(--pm-line); border-radius: 12px; box-shadow: var(--pm-shadow-sm); transition: transform .18s ease, box-shadow .18s ease; }
body:not(.pm-share-mode) .pm-card:hover { transform: translateY(-2px); border-color: #C6D4E1; background: #fff; box-shadow: var(--pm-shadow-md); }
body:not(.pm-share-mode) .pm-card-thumb { width: 82px; height: 72px; border-radius: 9px; }
body:not(.pm-share-mode) .pm-card-body { gap: 4px; }
body:not(.pm-share-mode) .pm-card-body > .pm-row b { color: var(--pm-navy); font-size: 13px; }
body:not(.pm-share-mode) .pm-stats > div { border-color: var(--pm-line); border-radius: 10px; background: #fff; }
body:not(.pm-share-mode) .pm-stats b { color: var(--pm-navy); font: 700 15px "Plus Jakarta Sans", Inter, sans-serif; letter-spacing: 0; }
body:not(.pm-share-mode) .pm-stats .pm-green { color: var(--pm-emerald); }
body:not(.pm-share-mode) .pm-price, body:not(.pm-share-mode) .pm-price-lg { color: var(--pm-navy); font-family: "Plus Jakarta Sans", Inter, sans-serif; letter-spacing: 0; }
body:not(.pm-share-mode) .pm-price-lg { font-size: 27px; }
body:not(.pm-share-mode) .pm-section { color: var(--pm-navy); font-size: 12px; letter-spacing: .45px; }
body:not(.pm-share-mode) .pm-legend-card, body:not(.pm-share-mode) .pm-compass-card, body:not(.pm-share-mode) .pm-overlay-card {
    border: 1px solid rgba(255,255,255,.72); border-radius: 11px; box-shadow: var(--pm-shadow-md);
}
body:not(.pm-share-mode) .pm-overlay-card { width: 250px; }
body:not(.pm-share-mode) .pm-seg { border-radius: 8px; background: #EEF2F4; }
body:not(.pm-share-mode) .pm-seg button { border-radius: 6px; }
body:not(.pm-share-mode) .pm-seg button.on { color: var(--pm-navy); }
body:not(.pm-share-mode) .pm-facing { border-color: var(--pm-line); border-radius: 12px; background: #fff; }
body:not(.pm-share-mode) .pm-facing-sector { fill: rgba(14, 138, 106, .2); }
body:not(.pm-share-mode) .pm-facing-arrow { stroke: var(--pm-emerald); }
body:not(.pm-share-mode) .pm-pill-available, body:not(.pm-share-mode) .pm-pill-unit-available { background: #E0F2EB; color: #17634E; }
body:not(.pm-share-mode) .pm-pill-comingSoon { background: #EEF1F4; color: var(--pm-blue); }
body:not(.pm-share-mode) .pm-pill-fewLeft { background: #FFF4D8; color: #875B08; }
body:not(.pm-share-mode) .pm-back { color: var(--pm-blue); }
@media (max-width: 768px) {
    body:not(.pm-share-mode) .pm-panel { width: auto; }
    body:not(.pm-share-mode) .pm-panel-body { padding: 6px 16px 24px; }
    body:not(.pm-share-mode) .pm-hero { height: 150px; }
    body:not(.pm-share-mode) .pm-card-thumb { width: 72px; height: 64px; }
}

@media (max-width: 700px) {
    .pm-share-content { display: block; }
    .pm-share-layout { display: block; }
    .pm-share-heading { order: initial; }
    .pm-map-section { order: initial; }
}

.pm-compass-card.pm-bilingual-compass { width: 196px; display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 5px; padding: 8px; }
.pm-compass-card.pm-bilingual-compass svg { width: 44px; height: 44px; }
.pm-bilingual-compass .pm-compass-plan { grid-column: 1 / -1; }
@media (max-width: 768px) {
    body.pm-share-mode .pm-compass-card.pm-bilingual-compass,
    body:not(.pm-share-mode) .pm-compass-card.pm-bilingual-compass { top: 108px; width: 152px; grid-template-columns: 1fr; padding: 7px; }
    .pm-compass-card.pm-bilingual-compass svg { display: none; }
}
