:root {
    --bg: #1f1f1f;
    --panel: rgba(33, 33, 33, 0.88);
    --line: rgba(255, 255, 255, 0.14);
    --text: #f5f2ea;
    --muted: rgba(245, 242, 234, 0.72);
    --plot-fill: #d4c8a7;
    --plot-stroke: #2f3188;
    --hover-fill: #6eb5ff;
    --hover-stroke: #a6d2ff;
    --select-fill: #3f91ff;
    --select-stroke: #d9efff;
    --amenity: #7ea347;
    --road: #5f6368;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    background: var(--bg);
}

body {
    font-family: "Archivo", sans-serif;
    color: var(--text);
}

.viewer-app,
.viewer-stage {
    width: 100%;
    height: 100vh;
}

.viewer-stage {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.035), transparent 18%),
        #232323;
}

.viewer-brand {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 10;
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(31, 31, 31, 0.82);
    backdrop-filter: blur(12px);
}

.viewer-brand p,
.viewer-brand small {
    display: block;
    margin: 0;
}

.viewer-brand p {
    font-size: 0.92rem;
    font-weight: 600;
}

.viewer-brand small {
    color: var(--muted);
    font-size: 0.76rem;
}

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #58a8ff;
    box-shadow: 0 0 16px rgba(88, 168, 255, 0.75);
}

.viewer-canvas {
    width: 100%;
    height: 100%;
    min-height: 100vh;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

.viewer-canvas.is-dragging {
    cursor: grabbing;
}

.viewer-world {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    will-change: transform;
    user-select: none;
}

.visual-frame {
    position: relative;
    overflow: hidden;
}

.svg-overlay {
    position: absolute;
    inset: 0;
}

.svg-overlay {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.layout-map {
    display: block;
    width: 965.42px;
    height: 688.29px;
    overflow: visible;
}

.layout-boundary {
    fill: none;
    stroke: rgba(255, 92, 92, 0.78);
    stroke-width: 1.6;
    vector-effect: non-scaling-stroke;
}

.road-label,
.amenity-label,
.plot-label {
    pointer-events: none;
    text-anchor: middle;
    dominant-baseline: middle;
    user-select: none;
}

.road-label {
    fill: rgba(205, 205, 205, 0.66);
    font-size: 8px;
    letter-spacing: 0.08em;
}

.amenity-label {
    fill: rgba(131, 179, 75, 0.92);
    font-size: 9px;
    font-weight: 700;
}

.plot-group {
    cursor: pointer;
}

.plot-hit-area {
    fill: none;
    stroke: none;
    pointer-events: all;
    cursor: pointer;
}

.plot-hit-shape {
    fill: rgba(212, 200, 167, 0.92);
    stroke: rgba(47, 49, 136, 0.95);
    stroke-width: 1.35;
    pointer-events: all;
    cursor: pointer;
    vector-effect: non-scaling-stroke;
    transition: fill 120ms ease, stroke 120ms ease, opacity 120ms ease;
}

.plot-label {
    fill: rgba(27, 29, 32, 0.92);
    font-size: 8.6px;
    font-weight: 600;
}

.plot-group:hover .plot-hit-shape,
.plot-group.is-hover .plot-hit-shape {
    fill: rgba(110, 181, 255, 0.72);
    stroke: var(--hover-stroke);
}

.plot-group.is-selected .plot-hit-shape {
    fill: rgba(63, 145, 255, 0.84);
    stroke: var(--select-stroke);
}

.plot-group.is-selected .plot-label {
    fill: rgba(255, 255, 255, 0.98);
}

.selection-chip {
    position: absolute;
    right: 18px;
    top: 18px;
    z-index: 10;
    min-width: 150px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--panel);
    backdrop-filter: blur(12px);
}

.selection-chip.is-hidden {
    display: none;
}

.selection-chip__eyebrow,
.selection-chip__title,
.selection-chip__meta {
    display: block;
    margin: 0;
}

.selection-chip__eyebrow {
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.selection-chip__title {
    margin-top: 4px;
    font-size: 1.15rem;
}

.selection-chip__meta {
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.76rem;
}

.viewer-hud {
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 10;
    display: flex;
    gap: 10px;
    align-items: center;
}

.viewer-panel {
    position: absolute;
    right: 18px;
    bottom: 78px;
    z-index: 10;
    width: min(300px, calc(100vw - 36px));
    display: grid;
    gap: 10px;
}

.viewer-toolbar {
    justify-self: end;
    display: flex;
    gap: 10px;
}

.icon-pill,
.action-pill,
.status-toggle,
.search-pill {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(50, 50, 50, 0.88);
    color: var(--text);
    backdrop-filter: blur(12px);
}

.icon-pill {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border-radius: 50%;
    font-size: 0.82rem;
}

.icon-pill.is-active {
    background: rgba(66, 66, 66, 0.98);
    font-weight: 700;
}

.status-toggle {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 999px;
}

.status-toggle__label {
    font-size: 0.88rem;
}

.status-toggle__track {
    width: 52px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    position: relative;
}

.status-toggle__text {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    pointer-events: none;
    letter-spacing: 0.03em;
    transition: opacity 120ms;
}

.status-toggle[aria-pressed="true"] .status-toggle__text {
    right: auto;
    left: 6px;
    color: #fff;
}

.status-toggle__thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 140ms ease;
    z-index: 1;
}

.status-toggle[aria-pressed="true"] .status-toggle__thumb {
    transform: translateX(26px);
}

.plot-legend {
    list-style: none;
    margin: 0;
    padding: 8px 12px;
    background: rgba(20, 20, 30, 0.72);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.plot-legend__item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.82);
    font-weight: 500;
}

.plot-legend__dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.9;
}

.search-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 999px;
}

.search-pill__icon {
    color: var(--muted);
    font-size: 0.8rem;
}

.search-pill__input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.search-pill__input::placeholder {
    color: var(--muted);
}

.viewer-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.action-pill {
    min-height: 42px;
    border-radius: 999px;
    font-size: 0.88rem;
}

.round-pill,
.mode-pill {
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    backdrop-filter: blur(12px);
}

.round-pill {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.25rem;
}

.mode-pill {
    min-width: 74px;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
}

button {
    font: inherit;
}

.svg-overlay.is-status-mode .plot-group {
    opacity: 0.3;
}

.svg-overlay.is-status-mode .plot-status-available {
    opacity: 1;
}

.svg-overlay.is-status-mode .plot-status-available .plot-hit-shape {
    fill: rgba(108, 194, 124, 0.24);
    stroke: #dff7df;
}

.svg-overlay.is-status-mode .plot-status-sold .plot-hit-shape,
.svg-overlay.is-status-mode .plot-status-booked .plot-hit-shape,
.svg-overlay.is-status-mode .plot-status-reserved .plot-hit-shape {
    fill: rgba(141, 91, 91, 0.26);
    stroke: #d8b0b0;
}

.sector4-app,
.sector4-stage {
    width: 100%;
    height: 100vh;
}

.sector4-stage {
    position: relative;
    overflow: hidden;
    background: #8c8880;
}

.sector4-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    background: #8c8880;
}

/* Every descendant must also opt out of browser touch handling
   so iOS Safari doesn't intercept the second finger for page-zoom */
.sector4-canvas,
.sector4-canvas * {
    touch-action: none;
}

.sector4-canvas.is-dragging {
    cursor: grabbing;
}

.sector4-world {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: top left;
    background: #8c8880;
}

.sector4-frame {
    position: relative;
    background: #8c8880;
    isolation: isolate; /* contains mix-blend-mode:multiply within the grey background */
}

.sector4-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    user-select: none;
    object-fit: fill;
}


.sector4-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Plot label — number shown inside each plot */
.plot-label {
    fill: rgba(255, 255, 255, 0.55);
    font-size: 7px;
    font-family: inherit;
    font-weight: 600;
    text-anchor: middle;
    dominant-baseline: middle;
    pointer-events: none;
    letter-spacing: 0.03em;
    transition: opacity 0.08s;
}
.special-plot-group.is-selected .plot-label,
.special-plot-group.is-hover .plot-label {
    opacity: 0;
}

.special-plot-hit-shape {
    fill: rgba(210, 190, 150, 0.12);
    stroke: rgba(210, 190, 150, 0.55);
    stroke-width: 1.8;
    vector-effect: non-scaling-stroke;
    cursor: pointer;
    pointer-events: all;
    transition: fill 0.08s ease, stroke 0.08s ease;
}

/* Sold plots: skin/tan colour matching the background plots */
.special-plot-group.status-sold .special-plot-hit-shape {
    fill: rgba(210, 175, 150, 0.45);
    stroke: rgba(200, 165, 140, 0.7);
    stroke-width: 1.2;
}

/* Available plots: solid opaque blue */
.special-plot-group.status-available .special-plot-hit-shape {
    fill: #1a5fc8;
    stroke: #3a80e8;
    stroke-width: 1.8;
}

.special-plot-group.status-available.is-hover .special-plot-hit-shape {
    fill: #2070d8;
    stroke: #5090f0;
    stroke-width: 2;
}

.special-plot-group.is-selected .special-plot-hit-shape {
    fill: rgba(41, 128, 255, 0.15);
    stroke: rgba(88, 168, 255, 0.5);
    stroke-width: 2;
}

/* In-plot selection overlay */
.sel-fill {
    fill: rgba(41, 128, 255, 0.72);
    stroke: rgba(88, 168, 255, 1);
    stroke-width: 2;
}
.sel-dash-rect {
    fill: none;
    stroke: rgba(255, 255, 255, 0.85);
    stroke-width: 1.2;
    stroke-dasharray: 5 3;
}
.sel-plot-num {
    fill: #fff;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: -0.02em;
}
.sel-area-sqyd {
    fill: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-family: inherit;
}
.sel-area-sqm {
    fill: #fff;
    font-weight: 700;
    font-family: inherit;
}
.sel-dim-label {
    fill: #fff;
    font-weight: 600;
    font-family: inherit;
}

.sel-dim-bg {
    fill: rgba(0, 0, 0, 0.72);
    rx: 3;
}

/* Amenity plots: soft purple outline, subtle fill */
.special-plot-group.status-amenity .special-plot-hit-shape {
    fill: rgba(150, 90, 220, 0.18);
    stroke: rgba(170, 110, 235, 0.7);
    stroke-width: 1.6;
}
.special-plot-group.status-amenity.is-hover .special-plot-hit-shape {
    fill: rgba(160, 100, 230, 0.38);
    stroke: rgba(190, 130, 255, 0.9);
    stroke-width: 2;
}
.special-plot-group.status-amenity .plot-label {
    fill: rgba(210, 170, 255, 0.95);
    font-size: 3px;
    font-family: 'Newsreader', Georgia, serif;
    font-weight: 500;
    font-style: italic;
    letter-spacing: 0.04em;
    opacity: 1;
}
.special-plot-group.status-amenity.is-selected .plot-label,
.special-plot-group.status-amenity.is-hover .plot-label {
    opacity: 1;
}

/* Status mode — available = original tan solid, sold = red, booked = amber */
.sector4-overlay.is-dimmed .special-plot-group.status-available .special-plot-hit-shape {
    fill: rgba(210, 190, 150, 0.55);
    stroke: rgba(230, 210, 160, 0.95);
    stroke-width: 1.8;
}

.sector4-overlay.is-dimmed .special-plot-group.status-sold .special-plot-hit-shape {
    fill: rgba(220, 48, 48, 0.42);
    stroke: rgba(240, 80, 80, 0.85);
    stroke-width: 1.6;
}

.sector4-overlay.is-dimmed .special-plot-group.status-booked .special-plot-hit-shape {
    fill: rgba(240, 160, 32, 0.38);
    stroke: rgba(255, 185, 60, 0.85);
    stroke-width: 1.6;
}

/* Hover/select override in status mode */
.sector4-overlay.is-dimmed .special-plot-group.is-hover .special-plot-hit-shape,
.sector4-overlay.is-dimmed .special-plot-group.is-selected .special-plot-hit-shape {
    fill: rgba(41, 128, 255, 0.48);
    stroke: rgba(88, 168, 255, 1);
    stroke-width: 2.8;
}

.sector4-panel {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 10;
    width: min(330px, calc(100vw - 36px));
    display: grid;
    gap: 12px;
}

.sector4-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(33, 33, 33, 0.9);
    backdrop-filter: blur(12px);
}

.sector4-card.is-collapsed .sector4-card__meta,
.sector4-card.is-collapsed .sector4-card__dims,
.sector4-card.is-collapsed .sector4-actions {
    display: none;
}

.sector4-card__eyebrow,
.sector4-card__title,
.sector4-card__meta,
.sector4-card__dims {
    margin: 0;
}

.sector4-card__eyebrow {
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sector4-card__title {
    display: block;
    margin-top: 6px;
    font-size: 1.25rem;
}

.sector4-card__row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.sector4-card__meta {
    margin: 0;
    color: var(--text);
    font-size: 0.9rem;
}

.area-sqyd {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
}

.area-sqm {
    font-size: 0.82rem;
    color: var(--muted);
}

.sector4-card__dims {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.5;
    letter-spacing: 0.02em;
}

.sector4-card__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 0;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.sector4-card__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sector4-card[data-status="available"] .sector4-card__status { color: #20c4a0; }
.sector4-card[data-status="available"] .sector4-card__status-dot { background: #20c4a0; box-shadow: 0 0 6px rgba(32,196,160,0.7); }
.sector4-card[data-status="sold"] .sector4-card__status { color: #f05050; }
.sector4-card[data-status="sold"] .sector4-card__status-dot { background: #f05050; box-shadow: 0 0 6px rgba(240,80,80,0.7); }
.sector4-card[data-status="booked"] .sector4-card__status { color: #f0a020; }
.sector4-card[data-status="booked"] .sector4-card__status-dot { background: #f0a020; box-shadow: 0 0 6px rgba(240,160,32,0.7); }
.sector4-card[data-status="amenity"] .sector4-card__status { color: #a064ff; }
.sector4-card[data-status="amenity"] .sector4-card__status-dot { background: #a064ff; box-shadow: 0 0 6px rgba(160,100,255,0.7); }

.sector4-actions {
    margin-top: 10px;
}

.sector4-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(50, 50, 50, 0.88);
    color: var(--text);
    text-decoration: none;
}

.sector4-link.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.sector4-search {
    justify-self: stretch;
}

.sector4-actions-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sector4-sheet-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sector4-sheet-action.is-disabled {
    pointer-events: none;
    opacity: 0.45;
}

.sector4-hud {
    right: 18px;
    bottom: 18px;
}

/* ── Mobile layout ───────────────────────────────────── */
@media (max-width: 640px) {
    /* Panel becomes a bottom drawer */
    .sector4-panel {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: 100%;
        gap: 0;
        border-radius: 18px 18px 0 0;
        overflow: hidden;
        background: rgba(24, 24, 24, 0.97);
        backdrop-filter: blur(16px);
        box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    /* Drag handle */
    .sector4-panel::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: rgba(255,255,255,0.18);
        border-radius: 2px;
        margin: 10px auto 0;
    }

    .sector4-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-top: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        background: transparent;
        padding: 12px 16px;
    }

    .sector4-card.is-empty {
        padding: 10px 16px;
    }

    .sector4-card.is-empty .sector4-card__eyebrow {
        display: none;
    }

    /* Legend horizontal scroll */
    .plot-legend {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 8px 16px;
        gap: 14px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        scrollbar-width: none;
    }
    .plot-legend::-webkit-scrollbar { display: none; }

    .plot-legend__item {
        flex-shrink: 0;
        font-size: 0.78rem;
    }

    /* Search + toggle in one row */
    .sector4-search {
        padding: 8px 16px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .status-toggle {
        display: none; /* moved inline with actions */
    }

    /* Actions row: 4 equal cols, bigger touch targets */
    .sector4-actions-row {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        padding: 10px 16px 14px;
    }

    .action-pill {
        min-height: 48px;
        font-size: 0.82rem;
        border-radius: 14px;
    }

    /* HUD zoom buttons above the drawer */
    .sector4-hud {
        right: 12px;
        bottom: 220px;
    }

    .round-pill {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    .mode-pill {
        min-height: 44px;
        padding: 0 14px;
    }

    /* Brand stays top-left */
    .viewer-brand {
        top: 10px;
        left: 10px;
    }
}

/* ── Tailwind helpers not in CDN ─────────────────────── */
.pb-safe   { padding-bottom: env(safe-area-inset-bottom, 0px); }
.scrollbar-none { scrollbar-width: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }

/* ── Panel state rules (toggled by JS) ───────────────── */
.is-disabled { pointer-events: none !important; opacity: 0.38 !important; }

.js-sector4-card.is-collapsed .sector4-actions { display: none; }

/* Status dot colour per plot state */
.js-sector4-card[data-status="available"] .js-card-status { color: #20c4a0; }
.js-sector4-card[data-status="available"] .sector4-card__status-dot { background: #20c4a0; }
.js-sector4-card[data-status="sold"]      .js-card-status { color: #f05050; }
.js-sector4-card[data-status="sold"]      .sector4-card__status-dot { background: #f05050; }
.js-sector4-card[data-status="booked"]    .js-card-status { color: #f0a020; }
.js-sector4-card[data-status="booked"]    .sector4-card__status-dot { background: #f0a020; }
.js-sector4-card[data-status="resale"]    .js-card-status { color: #f0a020; }
.js-sector4-card[data-status="resale"]    .sector4-card__status-dot { background: #f0a020; }
.js-sector4-card[data-status="amenity"]   .js-card-status { color: #a064ff; }
.js-sector4-card[data-status="amenity"]   .sector4-card__status-dot { background: #a064ff; }

/* ── Gallery ─────────────────────────────────────────── */
.gallery-app {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    padding: 0 0 64px;
}

.gallery-header {
    padding: 24px 32px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gallery-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}
.gallery-back:hover { color: var(--text); }

.gallery-eyebrow {
    margin: 0;
    font-size: 0.78rem;
    color: var(--muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.gallery-title {
    margin: 4px 0 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.gallery-tabs {
    display: flex;
    gap: 8px;
    padding: 20px 32px 0;
    flex-wrap: wrap;
}

.gallery-tab {
    padding: 7px 18px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.gallery-tab:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }
.gallery-tab.is-active {
    background: rgba(255,255,255,0.1);
    color: var(--text);
    border-color: rgba(255,255,255,0.35);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    padding: 24px 32px 0;
}

.gallery-item {
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
}

.gallery-item__link {
    display: block;
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.gallery-item__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.gallery-item__link:hover .gallery-item__img { transform: scale(1.04); }

.gallery-item__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
}
.gallery-item__link:hover .gallery-item__overlay { opacity: 1; }

.gallery-item__caption {
    padding: 10px 14px;
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0;
}

.gallery-empty {
    padding: 64px 32px;
    text-align: center;
    color: var(--muted);
}
.gallery-empty a { color: var(--text); }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}
.lightbox[aria-hidden="true"] { opacity: 0; pointer-events: none; }
.lightbox[aria-hidden="false"] { opacity: 1; }

.lightbox__inner {
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
}

.lightbox__caption {
    color: rgba(255,255,255,0.7);
    font-size: 0.88rem;
    margin: 0;
    text-align: center;
}

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.lightbox__close:hover { background: rgba(255,255,255,0.2); }

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.lightbox__nav:hover { background: rgba(255,255,255,0.2); }
.lightbox__nav--prev { left: 20px; }
.lightbox__nav--next { right: 20px; }



/* -- Dashboard ------------------------------------------------- */
.dash-app {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 80px;
    font-family: inherit;
    color: var(--text, #f5f2ea);
}
.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.dash-eyebrow {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.45);
    margin: 0 0 3px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.dash-title { font-size: 1.4rem; font-weight: 700; margin: 0; }

.dash-btn {
    padding: 7px 16px;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    color: var(--text, #f5f2ea);
    text-decoration: none;
    transition: background 0.1s;
}
.dash-btn:hover { background: rgba(255,255,255,0.14); }

/* Stats */
.dash-stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.dash-stat {
    padding: 10px 18px;
    border-radius: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    min-width: 80px;
}
.dash-stat[data-status=available] { border-color: rgba(26,95,200,0.6); background: rgba(26,95,200,0.15); }
.dash-stat[data-status=sold]      { border-color: rgba(240,80,80,0.6); background: rgba(240,80,80,0.15); }
.dash-stat[data-status=booked]    { border-color: rgba(240,160,32,0.6); background: rgba(240,160,32,0.15); }
.dash-stat[data-status=resale]    { border-color: rgba(240,160,32,0.6); background: rgba(240,160,32,0.15); }
.dash-stat[data-status=amenity]   { border-color: rgba(160,100,255,0.6); background: rgba(160,100,255,0.15); }
.dash-stat__count { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1; }
.dash-stat__label { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.5); margin-top: 3px; }

/* Filters */
.dash-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.dash-filter {
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: all 0.1s;
}
.dash-filter:hover { background: rgba(255,255,255,0.1); color: #fff; }
.dash-filter.is-active { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.4); color: #fff; }

/* Card grid */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.dash-card {
    background: rgba(255,255,255,0.04);
    border: 1.5px solid rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 16px;
    transition: border-color 0.15s;
}
.dash-card:hover { border-color: rgba(255,255,255,0.22); }
.dash-card[data-status=available] { border-left: 3px solid #1a5fc8; }
.dash-card[data-status=sold]      { border-left: 3px solid #f05050; }
.dash-card[data-status=booked]    { border-left: 3px solid #f0a020; }
.dash-card[data-status=resale]    { border-left: 3px solid #f0a020; }
.dash-card[data-status=amenity]   { border-left: 3px solid #a064ff; }

.dash-card__top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.dash-card__num {
    font-size: 1.05rem;
    font-weight: 700;
    min-width: 48px;
    flex-shrink: 0;
}

/* Status pills */
.dash-card__pills {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    flex: 1;
}
.dash-pill {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    cursor: pointer;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.45);
    transition: all 0.1s;
    white-space: nowrap;
}
.dash-pill:hover { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.12); }
.dash-pill[data-status=available].is-active { background: rgba(26,95,200,0.25); border-color: #1a5fc8; color: #7ab4ff; }
.dash-pill[data-status=sold].is-active      { background: rgba(240,80,80,0.25); border-color: #f05050; color: #f99; }
.dash-pill[data-status=booked].is-active    { background: rgba(240,160,32,0.25); border-color: #f0a020; color: #ffd080; }
.dash-pill[data-status=resale].is-active    { background: rgba(240,160,32,0.25); border-color: #e08010; color: #ffd080; }
.dash-pill[data-status=amenity].is-active   { background: rgba(160,100,255,0.25); border-color: #a064ff; color: #c8a0ff; }

/* Save indicator */
.dash-save-indicator {
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: auto;
    min-width: 54px;
    text-align: right;
}
.dash-save-indicator.is-saving { color: rgba(255,255,255,0.4); }
.dash-save-indicator.is-ok  { color: #6fefaa; }
.dash-save-indicator.is-err { color: #f07070; }

/* Fields */
.dash-card__fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.dash-field { display: flex; flex-direction: column; gap: 4px; }
.dash-field--wide { grid-column: 1 / -1; }
.dash-field__label {
    font-size: 0.67rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.4);
}
.dash-field__label small { font-weight: 400; text-transform: none; letter-spacing: 0; }
.dash-field__input {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 7px;
    color: var(--text, #f5f2ea);
    padding: 7px 10px;
    font-size: 0.84rem;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.1s;
}
.dash-field__input:focus { outline: none; border-color: #2980ff; background: rgba(41,128,255,0.08); }
.dash-field__input[readonly] { color: rgba(255,255,255,0.4); cursor: default; }
.dash-field__input::placeholder { color: rgba(255,255,255,0.2); }
