/* Moppsy-inspired design system (NordSwap / home exchange) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
    color-scheme: light;
    --bg: #f7f7fb;
    --surface: #ffffff;
    --surface-2: #ffffff;
    --surface-soft: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --line-soft: #f1f5f9;
    --brand: #7c3aed;
    --brand-mid: #8b5cf6;
    --brand-2: #ec4899;
    --brand-soft: #f5f3ff;
    --brand-soft-2: #fdf2f8;
    --good: #10b981;
    --good-soft: #ecfdf5;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
    --gradient: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 45%, #ec4899 100%);
    --max: 80rem;
    /* Mobile-first layout tokens */
    --header-h: 72px;
    --page-pad-x: 1rem;
    --page-pad-y: 1.25rem;
    --touch-min: 44px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
}

.dark {
    color-scheme: dark;
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-2: #1e293b;
    --surface-soft: #0f172a;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --line: #334155;
    --line-soft: #1e293b;
    --brand: #a78bfa;
    --brand-mid: #8b5cf6;
    --brand-2: #f472b6;
    --brand-soft: rgba(91, 33, 182, 0.35);
    --brand-soft-2: rgba(131, 24, 67, 0.25);
    --good: #34d399;
    --good-soft: rgba(6, 78, 59, 0.35);
    --shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.25);
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.25s ease, color 0.25s ease;
    padding-bottom: var(--safe-bottom);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.gradient-text {
    display: inline;
    background-image: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* Longhand only — `background` shorthand would reset background-clip */
}

.glass {
    backdrop-filter: blur(16px);
    background: rgba(255, 255, 255, 0.88);
}
.dark .glass {
    background: rgba(15, 23, 42, 0.88);
}

.wrap {
    width: min(var(--max), calc(100% - var(--page-pad-x) * 2));
    margin: 0 auto;
    padding-left: var(--page-pad-x);
    padding-right: var(--page-pad-x);
}

/* ── Header ── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 1100;
    padding-top: var(--safe-top);
    border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
}

.nav {
    min-height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: -0.02em;
    color: var(--text);
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 0.35rem;
}

.brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.brand-logo {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    display: grid;
    place-items: center;
    color: white;
    font-weight: 900;
    font-size: 1.1rem;
    box-shadow: 0 8px 20px rgba(124, 58, 237, 0.28);
}

.nav-desktop,
.nav-desktop-only {
    display: none;
}

.nav-desktop {
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.nav-logout-form { margin: 0; display: none; }

.nav-desktop a {
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    color: var(--muted);
    transition: background 0.2s, color 0.2s;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
    background: var(--brand-soft);
    color: #6d28d9;
}
.dark .nav-desktop a:hover,
.dark .nav-desktop a.is-active {
    color: #c4b5fd;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

@media (max-width: 767px) {
    .nav-toolbar-extra {
        display: none !important;
    }

    /* Join / Gå med lives in the hamburger menu on phones */
    .nav-auth-join {
        display: none !important;
    }

    .nav-auth-login {
        padding: 0.45rem 0.65rem;
        font-size: 0.8rem;
        min-height: 2.75rem;
    }

    .nav-actions {
        gap: 0.35rem;
    }

    .brand {
        max-width: calc(100% - 3rem);
        gap: 0.4rem;
    }

    .brand-name {
        font-size: clamp(1.05rem, 5vw, 1.45rem);
    }

    .nav-toggle {
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 14px;
    }
}

@media (max-width: 430px) {
    .brand-logo {
        width: 58px;
        height: 58px;
    }

    .brand-name {
        display: none;
    }
}

.nav-actions > .locale-switcher {
    display: inline-flex;
}

.locale-switcher {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.locale-pill,
.locale-pill-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.35rem 0.5rem;
    border-radius: 9px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    pointer-events: auto;
}

.locale-pill-link:hover,
.locale-pill:hover:not(.is-active) {
    color: var(--text);
    background: var(--surface);
}

.locale-pill.is-active {
    background: var(--gradient);
    color: #fff;
    cursor: default;
}

.locale-pill.is-active:hover {
    background: var(--gradient);
    color: #fff;
}

.locale-switcher--drawer {
    display: grid;
    gap: 0.35rem;
    padding: 0.5rem 0 0;
    border-top: 1px solid var(--line);
    margin-top: 0.5rem;
}

.nav-toggle {
    display: flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.nav-toggle svg { width: 1.25rem; height: 1.25rem; }

.theme-btn {
    display: flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.theme-btn:hover { background: var(--surface-soft); }

.theme-icon-sun { display: none; }

html.dark .theme-icon-moon { display: none; }

html.dark .theme-icon-sun { display: inline; }

.nav-toggle-icon--close { display: none; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon--open { display: none; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon--close { display: block; }

.mobile-drawer-backdrop {
    position: fixed;
    inset: calc(var(--header-h) + var(--safe-top)) 0 0;
    z-index: 1096;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
}

.mobile-drawer-backdrop[hidden] {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}

.mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top));
    right: 0;
    z-index: 1097;
    width: min(100%, 20rem);
    height: calc(100dvh - var(--header-h) - var(--safe-top));
    max-height: calc(100dvh - var(--header-h) - var(--safe-top));
    background: var(--surface);
    border-left: 1px solid var(--line);
    padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom));
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    box-shadow: -12px 0 40px rgba(15, 23, 42, 0.15);
}

.mobile-drawer.is-open { transform: translateX(0); }

.mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.mobile-drawer-brand { font-weight: 900; font-size: 1.05rem; }

.mobile-drawer-close {
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: var(--text);
}

.mobile-drawer-links {
    display: grid;
    gap: 0.25rem;
}

.mobile-drawer-links a {
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    font-weight: 700;
    color: var(--text);
}

.mobile-drawer-links a:hover { background: var(--brand-soft); }

.mobile-drawer-actions {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.mobile-drawer-prefs {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 1rem;
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.mobile-drawer-pref-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
}

.mobile-drawer-pref-row--lang {
    flex-direction: column;
    align-items: stretch;
}

.mobile-drawer-pref-row--lang .locale-switcher--drawer {
    margin-top: 0;
}

.theme-btn--drawer {
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1.15rem;
}

.mobile-drawer-lang {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.locale-switcher--drawer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0;
    border: 0;
}

body.nav-open { overflow: hidden; }

/* Site nav must sit above map Hem/Filter toolbar (1090) but below header (1100) */
body.nav-open .map-mobile-bar {
    visibility: hidden;
    pointer-events: none;
}

.navlinks { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.navlinks a,
.navlinks button,
.button {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius);
    padding: 0.65rem 1rem;
    min-height: var(--touch-min);
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: border-color 0.2s, background 0.2s, transform 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.button.primary,
.button.warm,
.navlinks .button.primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent;
    color: white;
    box-shadow: 0 10px 24px rgba(124, 58, 237, 0.25);
}

.navlinks a:not(.button):hover,
.navlinks button:not(.button):hover,
.button:not(.primary):not(.warm):hover {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    background: var(--brand-soft);
}

.button.primary:hover,
.button.warm:hover,
.navlinks .button.primary:hover {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent;
    color: #fff;
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(124, 58, 237, 0.3);
}

.button.full { width: 100%; text-align: center; }

/* ── Hero / marketing ── */
.page-hero-wrap {
    position: relative;
    overflow: hidden;
}

.page-hero-wrap::before,
.page-hero-wrap::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    opacity: 0.45;
}

.page-hero-wrap::before {
    width: 600px;
    height: 600px;
    top: -200px;
    left: -200px;
    background: #c4b5fd;
}

.page-hero-wrap::after {
    width: 400px;
    height: 400px;
    top: 0;
    right: -100px;
    background: #fbcfe8;
}

.dark .page-hero-wrap::before { background: rgba(91, 33, 182, 0.4); }
.dark .page-hero-wrap::after { background: rgba(236, 72, 153, 0.25); }

.hero {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    align-items: center;
    padding: 1.5rem 0 2rem;
}

.hero > div:first-child { order: 1; }

.hero > .hero-glider,
.hero > .hero-media { order: 2; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #6d28d9;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: var(--brand-soft);
    margin-bottom: 1rem;
}

.dark .eyebrow { color: #c4b5fd; }

.eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand);
    animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

h1 {
    font-size: clamp(1.75rem, 7vw, 4.25rem);
    line-height: 1.08;
    margin: 0 0 0.85rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.hero h1 .gradient-text {
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin: 0 0 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

h3 { font-weight: 800; margin: 0.5rem 0; }

.lead {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.65;
    max-width: 36rem;
    font-weight: 400;
}

@media (min-width: 768px) {
    .lead { font-size: 1.125rem; line-height: 1.7; }
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.actions .button {
    width: 100%;
    flex: unset;
}

.trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.35rem, 1.5vw, 0.65rem);
    margin-top: 1.25rem;
}

.trust span {
    display: grid;
    grid-template-columns: 1.35rem minmax(0, 1fr);
    align-items: start;
    gap: 0.4rem;
    min-height: 0;
    padding: clamp(0.45rem, 1.2vw, 0.55rem) clamp(0.35rem, 1vw, 0.7rem);
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 78%, var(--brand-soft));
    color: var(--text);
    font-size: clamp(0.62rem, 2.35vw, 0.78rem);
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    hyphens: auto;
    overflow-wrap: anywhere;
}

.trust span strong {
    width: 1.35rem;
    height: 1.35rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--brand-soft);
    color: #6d28d9;
    font-size: 0.8rem;
    line-height: 1;
}

.dark .trust span {
    border-color: rgba(196, 181, 253, 0.22);
    background: rgba(91, 33, 182, 0.18);
}

.dark .trust span strong {
    color: #c4b5fd;
    background: rgba(196, 181, 253, 0.12);
}

.hero-media {
    min-height: 260px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #ddd6fe, #fce7f3);
    position: relative;
}

.hero-media img {
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
}

.hero-panel {
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1.25rem;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.15rem;
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-sm);
}

.hero-panel-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.45rem;
}

.hero-glider {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--surface);
    border: 1px solid var(--line);
}

.hero-glider-visual {
    position: relative;
    min-height: 240px;
    background: linear-gradient(135deg, #ddd6fe, #fce7f3);
    overflow: hidden;
    touch-action: pan-y;
}

.hero-glider-track {
    position: relative;
    min-height: 240px;
}

.hero-glider-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0.55s ease;
    z-index: 0;
}

.hero-glider-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-glider-media-link {
    display: block;
    height: 100%;
    min-height: 240px;
    color: inherit;
    text-decoration: none;
}

.hero-glider-slide img {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
    display: block;
}

.hero-glider-fallback {
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: #6d28d9;
    background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.hero-glider-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, background 0.15s ease;
}

.hero-glider-arrow:hover {
    transform: translateY(-50%) scale(1.06);
    background: var(--surface);
}

.hero-glider-arrow[data-glider-prev] { left: 0.75rem; }
.hero-glider-arrow[data-glider-next] { right: 0.75rem; }

.hero-glider-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.5rem;
    background: var(--surface-soft, var(--surface));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.hero-glider-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    border: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.42);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.dark .hero-glider-dot:not(.is-active) {
    background: color-mix(in srgb, var(--muted) 55%, transparent);
}

.hero-glider-dot.is-active {
    width: 1.15rem;
    background: var(--gradient, linear-gradient(135deg, #7c3aed, #ec4899));
}

.hero-glider-info {
    display: grid;
    padding: 1rem 1.15rem 1.15rem;
    background: var(--surface);
}

.hero-glider-info-panel {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
}

.hero-glider-info-panel.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hero-glider-info-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.hero-glider-info-link strong {
    display: block;
    font-size: 1.15rem;
    margin: 0.35rem 0 0.25rem;
}

.hero-glider-info-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.section { padding: var(--page-pad-y) 0 calc(var(--page-pad-y) * 2); position: relative; z-index: 1; }

.grid { display: grid; gap: 1rem; }

.grid.cards {
    grid-template-columns: 1fr;
}

.grid.cards.compact { padding-top: 0; gap: 0.75rem; }

.card,
.panel {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.card { overflow: hidden; }

.card-body { padding: 1rem; }

@media (min-width: 768px) {
    .card-body { padding: 1.25rem; }
}

.meta {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.3rem 0.65rem;
    background: var(--brand-soft);
    color: #6d28d9;
    font-size: 0.75rem;
    font-weight: 800;
}

.dark .chip { color: #c4b5fd; }

.hidden { display: none !important; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Map (mobile-first: full map + slide-in list & filters) ── */
.map-shell {
    height: calc(100dvh - var(--header-h));
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: 'map';
    overflow: hidden;
    position: relative;
}

.map-canvas-wrap {
    grid-area: map;
    position: relative;
    z-index: 1;
    min-width: 0;
    min-height: calc(100dvh - var(--header-h));
    width: 100%;
    background: var(--bg);
}

.map-status-bar { display: none; }

.map-backdrop[hidden] {
    display: none !important;
    pointer-events: none;
}

.map-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: calc(var(--header-h) + var(--safe-top)) 0 0;
    z-index: 11;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(2px);
    -webkit-tap-highlight-color: transparent;
}

/* Mobile: no full-screen blur overlay (it blocked Hem/Filter taps); tap map to close panels */
@media (max-width: 899px) {
    .map-backdrop {
        display: none !important;
        pointer-events: none !important;
    }

    .map-panel-list:not(.is-open),
    .map-panel-filters:not(.is-open) {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
}

.map-panel-list,
.map-panel-filters {
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top));
    bottom: 0;
    width: min(100%, 100vw);
    max-width: 100%;
    height: calc(100dvh - var(--header-h) - var(--safe-top));
    max-height: none;
    transition: transform 0.28s ease, visibility 0.28s ease;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
    z-index: 13;
    pointer-events: none;
    visibility: hidden;
}

.map-panel-list {
    left: 0;
    transform: translate3d(-105%, 0, 0);
}

.map-panel-list.is-open {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    z-index: 1095;
}

.map-panel-filters {
    right: 0;
    left: auto;
    transform: translate3d(105%, 0, 0);
}

.map-panel-filters.is-open {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    z-index: 1095;
}

.map-mobile-bar {
    display: flex;
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top) + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1090;
    gap: 0.45rem;
    align-items: center;
    width: calc(100% - 1rem);
    max-width: 24rem;
    justify-content: center;
    pointer-events: auto;
    isolation: isolate;
}

.map-mobile-bar .map-mobile-toggle {
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.map-mobile-toggle {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.map-mobile-toggle.primary {
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.35);
}

.map-mobile-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
}

.map-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: var(--surface);
    z-index: 11;
}

.map-panel-list {
    grid-area: list;
    border-right: 1px solid var(--line);
}

.map-panel-filters {
    grid-area: filters;
    border-left: 1px solid var(--line);
    background: var(--surface-soft);
}

.map-panel-head {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.map-panel-head-main {
    flex: 1 1 auto;
    min-width: 0;
}

.map-panel-head h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1.2;
}

.map-panel-collapse {
    display: none;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.map-panel-collapse:hover {
    background: var(--brand-soft);
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}

.map-panel-head-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.map-panel-close {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: var(--touch-min);
    padding: 0 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.map-panel-close span[aria-hidden="true"] {
    font-size: 1.15rem;
    line-height: 1;
    color: var(--muted);
}

.map-panel-close:hover {
    background: var(--brand-soft);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    color: var(--brand);
}

.map-panel-close-label {
    line-height: 1.1;
}

@media (max-width: 899px) {
    .map-panel-close {
        display: inline-flex;
    }

    .map-panel-head {
        position: sticky;
        top: 0;
        z-index: 2;
    }
}

.map-edge-toggle {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 15;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.65rem;
    min-height: var(--touch-min);
    border: 1px solid var(--line);
    border-radius: 0 12px 12px 0;
    background: var(--surface);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.map-edge-toggle--list {
    left: 0;
    border-left: 0;
}

.map-edge-toggle--filters {
    right: 0;
    border-right: 0;
    border-radius: 12px 0 0 12px;
}

.map-edge-toggle:hover {
    background: var(--brand-soft);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    box-shadow: var(--shadow);
}

.map-edge-toggle-icon {
    font-size: 1rem;
    line-height: 1;
    color: var(--brand);
}

.map-edge-toggle-label {
    white-space: nowrap;
}

.map-toolbar-count {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 700;
    margin-top: 0.2rem;
}

.map-panel-body,
.map-panel-filters-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.map-panel-filters-body {
    padding: 0.75rem 0.85rem 1rem;
}

.map-panel-body {
    display: flex;
    flex-direction: column;
    position: relative;
}

.map-filter-group {
    margin-bottom: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
}

.map-filter-group summary {
    padding: 0.5rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    cursor: pointer;
    list-style: none;
}

.map-filter-group summary::-webkit-details-marker { display: none; }

.map-filter-group .map-chip-scroll {
    padding: 0 0.5rem 0.55rem;
}

.map-filter-compact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.35rem 0 0.5rem;
}

.map-toggle-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

.map-toggle-compact input { accent-color: var(--brand); }

/* legacy alias */
.map-sidebar-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; position: relative; overflow: hidden; }

.map-results-meta {
    flex-shrink: 0;
    margin: 0;
    padding: 0.5rem 1rem 0.35rem;
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 700;
    border-bottom: 1px solid var(--line-soft);
    background: var(--surface);
}

.map-sidebar-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.5rem 0.65rem 0.65rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    align-content: flex-start;
}

.map-sidebar-list > .map-home-card,
.map-sidebar-list > .map-empty {
    flex-shrink: 0;
}

.map-panel-body.is-detail-open .map-sidebar-list,
.map-sidebar-body.is-detail-open .map-sidebar-list {
    padding-bottom: 0.5rem;
}

.map-sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.map-sidebar-head h2 { margin: 0.2rem 0 0; font-size: 1.25rem; font-weight: 900; }

.map-sidebar-sub { margin: 0.35rem 0 0; font-size: 0.8rem; }

.map-locate-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.map-search-wrap { position: relative; margin-bottom: 0.75rem; }

.map-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.map-search-wrap input { padding-left: 2.5rem; }

.map-sidebar-section { margin-bottom: 0.5rem; }

.map-sidebar-filters .map-sidebar-head { margin-bottom: 0.65rem; }

.map-sidebar-filters .map-search-wrap { margin-bottom: 0.55rem; }

.map-sidebar-filters .map-sidebar-toggles { margin: 0.35rem 0 0.5rem; }

.map-sidebar-filters .map-sort-row { margin-bottom: 0.35rem; }

.map-section-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.map-chip-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
}

.map-chip-wrap {
    flex-wrap: wrap;
    overflow-x: visible;
}

.map-chip {
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.map-chip.is-active,
.map-filter.is-active {
    background: var(--gradient);
    color: #fff;
    border-color: transparent;
}

.map-sidebar-toggles {
    display: grid;
    gap: 0.5rem;
    margin: 0.5rem 0 0.75rem;
}

.map-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface-soft);
    cursor: pointer;
}

.map-toggle-row strong { display: block; font-size: 0.82rem; }

.map-toggle-row .meta { font-size: 0.72rem; margin-top: 0.15rem; }

.map-toggle-input { position: absolute; opacity: 0; pointer-events: none; }

.map-toggle-ui {
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
}

.map-toggle-ui::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.map-toggle-input:checked + .map-toggle-ui { background: #10b981; }

.map-toggle-input:checked + .map-toggle-ui::after { transform: translateX(18px); }

.map-sort-row { margin-bottom: 0.5rem; }

.map-sort-tabs { display: flex; gap: 0.35rem; }

.map-sort {
    flex: 1;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    border-radius: 10px;
    padding: 0.4rem 0.35rem;
    font-size: 0.7rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
}

.map-sort.is-active {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #6d28d9;
}

.dark .map-sort.is-active { background: rgba(124, 58, 237, 0.2); color: #c4b5fd; }

.map-home-card {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.55rem;
    min-height: var(--touch-min);
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
    text-align: left;
}

.map-home-open {
    display: grid;
    place-items: center;
    width: var(--touch-min);
    height: var(--touch-min);
    min-width: var(--touch-min);
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--brand);
    font-size: 1.1rem;
    font-weight: 800;
    text-decoration: none;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.map-home-open:hover {
    background: var(--brand-soft);
    border-color: #c4b5fd;
    transform: translateX(2px);
}

.map-home-card.is-selected .map-home-open {
    background: #fff;
    border-color: #8b5cf6;
}

.map-home-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.12);
}

.map-home-card.is-selected {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.25);
    background: linear-gradient(135deg, rgba(237, 233, 254, 0.5), rgba(252, 231, 243, 0.35));
}

.dark .map-home-card.is-selected {
    background: rgba(124, 58, 237, 0.12);
}

.map-home-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-soft);
}

.map-home-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.map-home-thumb-fallback {
    display: grid;
    place-items: center;
    height: 100%;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--muted);
    text-align: center;
    padding: 0.25rem;
}

.map-home-body { min-width: 0; }

.map-home-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
}

.map-home-top h3 {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.25;
}

.chip-verified { background: #d1fae5; color: #047857; }

.dark .chip-verified { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }

.map-home-meta { margin: 0.2rem 0 0; font-size: 0.75rem; color: var(--muted); font-weight: 600; }

.map-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--muted);
    font-weight: 700;
}

.map-detail-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 6;
    max-height: min(58%, 320px);
    overflow-x: hidden;
    overflow-y: auto;
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -16px 40px rgba(15, 23, 42, 0.16);
}

.map-detail-layout {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem 0.75rem;
    padding-top: 2rem;
}

.map-detail-thumb {
    width: 88px;
    height: 88px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-soft);
    flex-shrink: 0;
}

.map-detail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-detail-thumb .map-home-thumb-fallback {
    height: 100%;
    font-size: 0.62rem;
}

.map-detail-content {
    min-width: 0;
    padding: 0;
}

.map-detail-panel[hidden] {
    display: none !important;
}

.map-detail-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
}

.map-detail-content h3 { margin: 0.2rem 0; font-size: 0.95rem; line-height: 1.25; }

.map-detail-content .button { margin-top: 0.45rem; padding: 0.5rem 0.75rem; font-size: 0.78rem; }

#swap-map { position: absolute; inset: 0; }

.map-fallback-msg {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    font-weight: 800;
    background: var(--surface-soft);
}

.map-status-bar {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 0.45rem 1rem;
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid var(--line);
    font-size: 0.72rem;
    color: var(--muted);
    justify-content: space-between;
    backdrop-filter: blur(8px);
}

@media (min-width: 900px) {
    .map-status-bar { display: flex; }
}

.dark .map-status-bar { background: rgba(15, 23, 42, 0.9); }

.mapboxgl-ctrl-logo,
.mapboxgl-ctrl-attrib { opacity: 0.72; }

.mapboxgl-ctrl-group {
    border-radius: 1rem !important;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18) !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
}

.hm-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    user-select: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    font: inherit;
}

.hm-ring {
    position: relative;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    background: #fff;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.22);
}

.hm-ring.verified::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid #10b981;
    animation: hm-pulse 2.2s ease-out infinite;
}

.hm-icon { font-size: 1.35rem; line-height: 1; }

.hm-badge {
    margin-top: 4px;
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 45%, #ec4899 100%);
    background-color: #7c3aed;
    color: #fff !important;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.3;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1.5px solid #fff;
    white-space: nowrap;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.35);
    -webkit-font-smoothing: antialiased;
    opacity: 1 !important;
}

/* Mapbox markers: keep pins + labels fully opaque on the map canvas */
.mapboxgl-marker .hm-wrap {
    opacity: 1 !important;
}

.mapboxgl-marker .hm-badge {
    position: relative;
    z-index: 1;
    pointer-events: none;
}

@keyframes hm-pulse {
    0% { transform: scale(1); opacity: 0.9; }
    70% { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

.user-dot {
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(59, 130, 246, 0.22);
}

.mapboxgl-popup-content {
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    color: var(--text);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.map-popup-img {
    display: block;
    width: 100%;
    height: 100px;
    min-height: 100px;
    object-fit: cover;
}

.map-popup-img--empty {
    background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.map-popup-body { padding: 0.75rem 0.9rem; }

.map-popup-body strong { display: block; font-size: 0.95rem; }

.map-popup-body p { margin: 0.25rem 0 0; font-size: 0.8rem; color: var(--muted); }

.map-popup-cta {
    display: inline-block;
    margin-top: 0.55rem;
    font-size: 0.78rem;
    font-weight: 800;
    color: #6d28d9;
    text-decoration: none;
}

.map-popup-cta:hover { text-decoration: underline; }

.map-locate-fab {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 16;
    width: 42px;
    height: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    background: var(--surface);
}

.thin-scroll::-webkit-scrollbar { width: 4px; }
.thin-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }

.button.block { width: 100%; display: block; text-align: center; }

/* ── Forms ── */
.field { display: grid; gap: 0.4rem; margin-bottom: 0.85rem; }

.field label {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 700;
}

input, select, textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.8rem 0.9rem;
    min-height: var(--touch-min);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--brand-mid);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
    outline: none;
}

textarea { min-height: 110px; resize: vertical; }

.split { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }

.page { padding: var(--page-pad-y) 0 calc(var(--page-pad-y) * 2.5); }

/* ── Dashboard (mobile-first) ── */
.dashboard-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }

.dashboard-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
}

.perspective-switch {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
}

.segmented {
    display: flex;
    gap: 4px;
    background: var(--surface-soft);
    padding: 4px;
    border-radius: var(--radius);
    border: 1px solid var(--line-soft);
    width: 100%;
}

.segmented button {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 0.65rem 0.75rem;
    min-height: var(--touch-min);
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    flex: 1;
    font-size: 0.8rem;
}

.segmented button.is-active {
    background: var(--surface);
    color: #6d28d9;
    box-shadow: var(--shadow-sm);
}

.dark .segmented button.is-active { color: #c4b5fd; }

.dash-sidebar { position: static; overflow: hidden; }

.dash-sidebar .dash-nav {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.5rem 0.65rem 0.65rem;
}

.dash-sidebar .dash-nav::-webkit-scrollbar { display: none; }

.dash-sidebar .dash-nav a {
    flex-shrink: 0;
    white-space: nowrap;
}

.dash-sidebar .dash-nav a span:last-child { display: none; }

.dash-user {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--line-soft);
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.dash-nav { padding: 0.65rem; display: grid; gap: 0.25rem; }

.dash-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.875rem;
}

.dash-nav a:hover,
.dash-nav a.is-active {
    background: var(--brand-soft);
    color: #6d28d9;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.stat { padding: 1rem 1.15rem; }

.stat strong {
    display: block;
    font-size: 1.6rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.feature-list { display: grid; gap: 0.65rem; padding: 0; margin: 0; }

.feature-list li {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.feature-list li::before {
    content: '✦';
    color: var(--brand);
    font-weight: 900;
}

.dashboard-overview-panel {
    display: grid;
    gap: 0.95rem;
    margin-bottom: 1rem;
    padding: clamp(1rem, 2.4vw, 1.35rem);
}

.dashboard-overview-copy {
    display: grid;
    gap: 0.8rem;
    align-content: start;
}

.dashboard-overview-copy h1 {
    max-width: 48rem;
    font-size: clamp(1.7rem, 4.8vw, 2.55rem);
}

.dashboard-overview-copy .lead {
    max-width: 56rem;
    font-size: clamp(1rem, 2vw, 1.12rem);
}

.dashboard-overview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.dashboard-overview-side {
    display: grid;
    gap: 0.85rem;
}

.dashboard-metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.dashboard-metric {
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-soft) 72%, transparent);
}

.dashboard-metric strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1;
}

.dashboard-metric span {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-weight: 800;
    font-size: 0.68rem;
    line-height: 1.2;
    max-width: 100%;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.dashboard-checklist {
    display: grid;
    gap: 0.5rem;
}

.dashboard-check-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.65rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: var(--surface);
}

.dashboard-check-item:hover {
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    transform: translateY(-1px);
}

.dashboard-check-item.is-complete {
    border-color: color-mix(in srgb, var(--success, #16a34a) 30%, var(--line));
}

.dashboard-check-item.is-complete .swap-setup-step {
    background: color-mix(in srgb, var(--success, #16a34a) 14%, var(--surface));
    color: var(--success, #16a34a);
}

.dashboard-check-item small {
    display: none;
}

.dashboard-check-action {
    color: #6d28d9;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.swap-setup-step {
    width: 2rem;
    height: 2rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--brand-soft);
    color: #6d28d9;
    font-weight: 900;
}

.dashboard-section-head,
.dashboard-form-head {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.dashboard-section-head {
    margin: 1.25rem 0 0.85rem;
}

.swap-plan-card {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.swap-plan-home {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    align-items: start;
}

.swap-plan-media {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    color: var(--muted);
    font-weight: 800;
    font-size: 0.8rem;
}

.swap-plan-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swap-plan-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.7rem;
}

.swap-needs-drawer {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: color-mix(in srgb, var(--surface-soft) 48%, transparent);
    overflow: hidden;
}

.swap-needs-drawer > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.9rem;
}

.swap-needs-drawer > summary::-webkit-details-marker {
    display: none;
}

.swap-needs-drawer > summary::before {
    content: '+';
    width: 1.85rem;
    height: 1.85rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    color: #6d28d9;
    font-weight: 900;
}

.swap-needs-drawer[open] > summary::before {
    content: '−';
}

.swap-needs-drawer > summary strong,
.swap-needs-drawer > summary small {
    display: block;
}

.swap-needs-form {
    display: grid;
    gap: 1rem;
    padding: 0.9rem;
    border-top: 1px solid var(--line);
    background: var(--surface);
}

.swap-needs-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.dashboard-fieldset {
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.9rem;
    margin: 0;
    background: color-mix(in srgb, var(--surface-soft) 65%, transparent);
}

.dashboard-fieldset legend,
.dashboard-sublegend {
    padding: 0 0.35rem;
    font-weight: 900;
    font-size: 0.9rem;
}

.dashboard-sublegend {
    display: block;
    margin: 1rem 0 0.5rem;
}

.dashboard-chip-scroll {
    max-height: 13rem;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.choice-chip--block {
    width: 100%;
    align-items: flex-start;
    border-radius: 14px;
    padding: 0.85rem 1rem;
    gap: 0.75rem;
}

.choice-chip-content {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
    flex: 1;
}

.choice-chip-hint {
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.45;
    color: var(--muted);
}

.swap-pyramid-option {
    margin-top: 0.5rem;
}

.swap-pyramid-option .choice-chip--block {
    border-style: dashed;
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    background: color-mix(in srgb, var(--brand) 5%, var(--surface));
}

.swap-pyramid-option .choice-chip--block:has(input:checked) {
    border-style: solid;
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}

.dashboard-beta-toggle {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px dashed color-mix(in srgb, var(--brand) 35%, var(--line));
    border-radius: 8px;
    background: color-mix(in srgb, var(--brand) 7%, transparent);
}

.swap-plan-matches {
    padding: 0;
    border-top: 0;
}

.swap-insights-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.swap-insights-grid .swap-plan-matches {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0.9rem;
    background: color-mix(in srgb, var(--surface-soft) 42%, transparent);
}

.pyramid-match-list {
    display: grid;
    gap: 0.65rem;
}

.pyramid-match-card {
    display: grid;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 6%, var(--surface));
}

.pyramid-score strong {
    display: block;
    font-size: 1.4rem;
    line-height: 1;
}

.pyramid-route {
    display: grid;
    gap: 0.25rem;
}

.pyramid-route span,
.pyramid-route strong {
    min-width: 0;
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    font-size: 0.78rem;
}

.empty-swap-plan {
    display: grid;
    gap: 0.75rem;
    justify-items: start;
    margin-bottom: 1rem;
}

@media (min-width: 760px) {
    .dashboard-overview-panel {
        grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.8fr);
        align-items: start;
    }

    .dashboard-section-head,
    .dashboard-form-head {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .swap-plan-home {
        grid-template-columns: minmax(12rem, 17rem) minmax(0, 1fr);
    }

    .swap-needs-drawer > summary {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .swap-needs-drawer > summary::before {
        order: 2;
        flex: 0 0 auto;
    }

    .swap-needs-columns {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr);
    }

    .swap-needs-columns .dashboard-fieldset:last-child {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1120px) {
    .swap-needs-columns {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(20rem, 0.95fr);
    }

    .swap-needs-columns .dashboard-fieldset:last-child {
        grid-column: auto;
    }

    .swap-insights-grid {
        grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.8fr);
    }
}

.about-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: white;
    padding: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.75rem;
}

.about-hero h1 { color: white; max-width: 48rem; }

.about-hero p {
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 48rem;
}

.hero-pill,
.hero-tags span {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: white;
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 800;
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }

.dark-card {
    background: #0f172a;
    color: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.dark-card h2 { color: white; }
.dark-card p { color: #cbd5e1; line-height: 1.65; }
.dark-card a:not(.button) { color: #c4b5fd; font-weight: 800; }

.alert {
    margin: 0.75rem var(--page-pad-x);
    max-width: var(--max);
    width: auto;
    border: 1px solid #a7f3d0;
    background: var(--good-soft);
    color: #047857;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.875rem;
}

.dark .alert { color: #6ee7b7; border-color: rgba(16, 185, 129, 0.35); }

.chat-box {
    min-height: 430px;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.125rem;
}

.bubble {
    max-width: min(88%, 20rem);
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius);
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.bubble.me {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(236, 72, 153, 0.1));
    border-color: #ddd6fe;
}

.chat-thread-layout {
    display: grid;
    grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.chat-thread-list {
    display: grid;
    gap: 0.65rem;
    position: sticky;
    top: 5.25rem;
}

.chat-thread-link {
    display: grid;
    gap: 0.2rem;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem;
    background: var(--surface);
}

.chat-thread-link.is-active,
.chat-thread-link:hover {
    border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
    background: color-mix(in srgb, var(--brand) 7%, var(--surface));
}

.chat-thread-head {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.chat-reply-form {
    margin-top: 0.75rem;
}

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--line);
    padding: 2rem 0;
    color: var(--muted);
    font-size: 0.875rem;
    margin-top: auto;
}

.footer-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
}

.footer a:hover { color: var(--brand); }

/* ── Modals (Moppsy-style) ── */
.modal-open { overflow: hidden; }

.modal-layer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: max(1rem, var(--safe-top)) 1rem max(1rem, var(--safe-bottom));
}

.modal-layer.is-open { display: flex; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(8px);
    cursor: pointer;
}

.auth-modal {
    position: relative;
    width: min(100%, 460px);
    max-height: calc(100dvh - 2rem - var(--safe-top) - var(--safe-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: white;
    color: #0f172a;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
    padding: 1.25rem 1.25rem max(1.25rem, var(--safe-bottom));
    margin: auto;
}

.auth-modal.wide { width: min(100%, 560px); padding: 0; }

.modal-soft {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 999px;
    filter: blur(28px);
    opacity: 0.65;
    pointer-events: none;
}

.modal-soft.one { left: -34px; top: -34px; background: #ede9fe; }
.modal-soft.two { right: -34px; bottom: -34px; background: #fce7f3; }

.modal-head {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.125rem;
}

.modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #7c3aed;
    background: linear-gradient(135deg, #ede9fe, #fce7f3);
    font-weight: 900;
    margin-bottom: 0.65rem;
}

.modal-head h2,
.register-banner h2 {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.05;
    font-weight: 900;
}

.modal-close,
.modal-x {
    border: 0;
    cursor: pointer;
    font-weight: 900;
    font-family: inherit;
}

.modal-close {
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    padding: 0.55rem 0.75rem;
}

.modal-x {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: white;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.4rem;
}

.modal-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    background: #f1f5f9;
    border-radius: 16px;
    padding: 4px;
    margin-bottom: 1.125rem;
}

.modal-tabs button {
    border: 0;
    background: transparent;
    color: #64748b;
    border-radius: 12px;
    padding: 0.7rem 0.5rem;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
}

.modal-tabs button.is-active {
    background: white;
    color: #6d28d9;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.modal-tabs.inverse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1.125rem 0 0;
    background: rgba(255, 255, 255, 0.18);
}

.modal-tabs.inverse button { color: white; }
.modal-tabs.inverse button.is-active { color: #6d28d9; }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

.modal-form { display: grid; gap: 0.75rem; }

.auth-modal input,
.auth-modal select,
.auth-modal textarea {
    background: white;
    color: #0f172a;
    border-color: #e2e8f0;
}

.auth-modal .field label,
.auth-modal .meta { color: #64748b; }

.check-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 600;
}

.check-row input { width: auto; }

.center { text-align: center; }

.google-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    border: 2px solid #e2e8f0;
    background: white;
    color: #334155;
    border-radius: var(--radius);
    padding: 0.8rem;
    font-weight: 800;
    margin: 0.875rem 0;
}

.google-button svg { width: 20px; height: 20px; }

.qr-box { min-height: 260px; display: grid; place-items: center; gap: 0.65rem; }

.qr-status { color: #6d28d9; font-weight: 800; font-size: 0.8rem; }

#login-qr-canvas {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: white;
}

.modal-switch {
    margin: 1rem 0 0;
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
}

.modal-switch button {
    border: 0;
    background: transparent;
    color: #7c3aed;
    font-weight: 900;
    cursor: pointer;
    font-family: inherit;
}

.register-banner {
    position: relative;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: white;
    padding: 1.6rem;
}

.register-banner .modal-x { position: absolute; right: 1.25rem; top: 1.25rem; }

.register-banner > div:first-child { padding-right: 2.75rem; }

.register-banner p { color: rgba(255, 255, 255, 0.84); margin: 0.35rem 0 0; }

.modal-body { padding: 1.5rem; }

.divider {
    position: relative;
    text-align: center;
    color: #94a3b8;
    font-size: 0.75rem;
    margin: 0.75rem 0;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px solid #e2e8f0;
}

.divider span { position: relative; background: white; padding: 0 0.75rem; }

.owner-pitch {
    border-radius: 12px;
    background: #f5f3ff;
    color: #5b21b6;
    padding: 0.75rem;
    font-weight: 800;
    font-size: 0.8rem;
}

/* ── Progressive enhancement (tablet & desktop) ── */
@media (min-width: 480px) {
    .actions {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .actions .button { width: auto; }
}

@media (min-width: 600px) {
    .grid.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    :root {
        --header-h: 120px;
        --page-pad-x: 1.25rem;
        --page-pad-y: 2rem;
    }

    .brand { font-size: 1.15rem; }
    .brand-logo { width: 104px; height: 104px; }
    .brand-mark { width: 44px; height: 44px; }

    .nav { gap: 1rem; }
    .nav-desktop { display: flex; }
    .nav-desktop-only { display: inline-flex; }

    .nav-auth-join {
        display: inline-flex;
    }
    .nav-logout-form { display: inline-flex; }
    .nav-toggle { display: none; }
    .mobile-drawer,
    .mobile-drawer-backdrop { display: none !important; }

    h1 { font-size: clamp(2.25rem, 5.5vw, 4.25rem); }

    .hero {
        grid-template-columns: 1.05fr 0.95fr;
        gap: 2.5rem;
        padding: 3rem 0 2.5rem;
    }

    .hero > div:first-child,
    .hero > .hero-glider,
    .hero > .hero-media { order: unset; }

    .hero-media,
    .hero-media img { min-height: 380px; }

    .hero-glider-visual,
    .hero-glider-track,
    .hero-glider-media-link,
    .hero-glider-slide img,
    .hero-glider-fallback { min-height: 320px; }

    .trust {
        gap: 0.65rem;
        margin-top: 1.5rem;
    }

    .trust span {
        font-size: 0.78rem;
        padding: 0.55rem 0.7rem;
    }

    .auth-modal {
        border-radius: 28px;
        padding: 28px;
    }

    .grid.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .footer-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .dashboard-grid { grid-template-columns: 1fr 1fr; }
    .dashboard-shell { grid-template-columns: minmax(220px, 270px) 1fr; gap: 1.5rem; }
    .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

    .perspective-switch {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .dash-sidebar { position: sticky; top: calc(var(--header-h) + 1rem); }

    .dash-sidebar .dash-nav {
        display: grid;
        flex-direction: column;
        overflow: visible;
        padding: 0.65rem;
    }

    .dash-sidebar .dash-nav a span:last-child { display: inline; }

    .bubble { max-width: 72%; }
}

@media (min-width: 900px) {
    .map-shell {
        height: calc(100dvh - var(--header-h));
        --map-list-col: minmax(280px, 320px);
        --map-filters-col: minmax(260px, 290px);
        grid-template-columns: var(--map-list-col) minmax(0, 1fr) var(--map-filters-col);
        grid-template-areas: 'list map filters';
        transition: grid-template-columns 0.28s ease;
    }

    .map-shell.is-filters-collapsed:not(.is-list-collapsed) {
        grid-template-columns: var(--map-list-col) minmax(0, 1fr);
        grid-template-areas: 'list map';
    }

    .map-shell.is-list-collapsed:not(.is-filters-collapsed) {
        grid-template-columns: minmax(0, 1fr) var(--map-filters-col);
        grid-template-areas: 'map filters';
    }

    .map-shell.is-list-collapsed.is-filters-collapsed {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: 'map';
    }

    .map-mobile-bar { display: none; }

    .map-panel-list,
    .map-panel-filters {
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        right: auto;
        width: auto;
        height: 100%;
        min-width: 0;
        max-width: 100%;
        transform: none;
        box-shadow: none;
        pointer-events: auto;
        visibility: visible;
        transition: opacity 0.22s ease, visibility 0.22s ease;
    }

    .map-panel-list.is-collapsed,
    .map-panel-filters.is-collapsed {
        display: none !important;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        border-width: 0 !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .map-panel-list.is-open,
    .map-panel-filters.is-open { transform: none; }

    .map-panel-collapse,
    .map-edge-toggle:not([hidden]) {
        display: inline-flex;
    }

    .map-backdrop { display: none !important; }

    .map-canvas-wrap { min-height: 100%; }

    .map-status-bar { display: flex; }

    .map-detail-panel { max-height: min(48%, 280px); }
}

.badge-new {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
    color: #fff;
}

.badge-new.inline { margin-left: 0.35rem; vertical-align: middle; }

.office-swap-banner {
    position: relative;
    margin-bottom: 1.25rem;
    border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 8%, var(--surface)), var(--surface));
}

.office-swap-banner .badge-new {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.swap-modal-preview {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}

.split-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.65rem;
    flex-wrap: wrap;
}

.dash-list-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}

.dash-list-item:last-child { border-bottom: 0; }

.card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Listing detail & form */
.listing-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-bottom: 1rem;
}

.listing-breadcrumb a { color: var(--accent); text-decoration: none; }

.listing-detail-hero {
    display: grid;
    gap: 0;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.listing-detail-media {
    aspect-ratio: 16 / 9;
    background: var(--surface-2);
    max-height: 420px;
}

.listing-detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.listing-detail-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--muted);
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface-2));
}

.listing-detail-fallback.compact { min-height: 160px; font-size: 1rem; }

.listing-detail-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.listing-detail-actions { margin-top: 1rem; }

.listing-detail-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .listing-detail-hero { grid-template-columns: 1.2fr 1fr; }
    .listing-detail-media { max-height: none; min-height: 100%; }
    .listing-detail-grid { grid-template-columns: 1fr 320px; align-items: start; }
}

.listing-chip-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.listing-owner {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    margin-top: 0.75rem;
}

.listing-similar { margin-top: 2rem; }

.listing-form-page .listing-form-card { margin-top: 1.25rem; }

.listing-form-section {
    border: 0;
    padding: 0;
    margin: 0 0 1.75rem;
}

.listing-form-section legend {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.85rem;
    padding: 0;
}

.availability-row {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--line);
}

.availability-row:last-child { border-bottom: 0; }

.field-label {
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    display: block;
}

.property-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (min-width: 600px) {
    .property-type-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.address-picker {
    position: relative;
}

.address-picker-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 1.35rem);
    z-index: 20;
    display: grid;
    gap: 0.25rem;
    max-height: 18rem;
    overflow-y: auto;
    padding: 0.45rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.address-picker-results[hidden] {
    display: none;
}

.address-picker-option {
    width: 100%;
    min-height: var(--touch-min);
    display: grid;
    gap: 0.1rem;
    padding: 0.65rem 0.75rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.address-picker-option:hover,
.address-picker-option:focus {
    background: var(--surface-soft);
    outline: none;
}

.address-picker-option strong {
    font-size: 0.9rem;
}

.address-picker-option span,
.address-picker-empty {
    font-size: 0.8rem;
}

.image-picker-shell {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    align-items: start;
}

.image-picker-preview {
    min-height: 13rem;
    border: 1px dashed var(--line);
    border-radius: 8px;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--surface-soft);
    color: var(--muted);
    font-weight: 800;
}

.image-picker-preview img {
    width: 100%;
    height: 100%;
    min-height: 13rem;
    object-fit: cover;
    display: block;
}

.image-picker-controls {
    display: grid;
    gap: 0.55rem;
}

.image-picker input[type="file"] {
    padding: 0.75rem;
    background: var(--surface);
}

.compact-image-picker .image-picker-preview,
.compact-image-picker .image-picker-preview img {
    min-height: 9rem;
}

@media (min-width: 720px) {
    .image-picker-shell {
        grid-template-columns: minmax(12rem, 16rem) minmax(0, 1fr);
    }

    .compact-image-picker .image-picker-shell {
        grid-template-columns: 1fr;
    }
}

.property-type-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    cursor: pointer;
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.property-type-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.property-type-option.is-selected,
.property-type-option:has(input:checked) {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
}

.property-type-icon { font-size: 1.35rem; }

.property-type-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

.listing-available-toggle { margin-top: 0.5rem; }

.listing-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding-top: 0.5rem;
}

/* —— Rich listing detail —— */
.listing-detail-page { padding-bottom: calc(6.5rem + var(--safe-bottom)); }

.listing-detail-top { margin-bottom: 1rem; }

.listing-detail-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.listing-detail-title-row h1 {
    margin: 0.35rem 0 0.25rem;
    font-size: clamp(1.35rem, 5vw, 2rem);
    line-height: 1.15;
}

.listing-booking-card {
    position: static;
    box-shadow: var(--shadow-sm);
}

.listing-detail-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
    width: 100%;
    justify-content: flex-end;
    align-items: center;
}

.listing-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    white-space: nowrap;
}

.listing-chat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    background: #fff;
    color: var(--brand, #7c3aed);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent);
}

.button.primary .listing-chat-badge {
    background: rgba(255, 255, 255, 0.95);
}

.dark .listing-chat-badge {
    background: var(--surface);
    color: var(--brand-2, #a78bfa);
}

.listing-save-btn.is-saved { color: var(--brand-2); border-color: color-mix(in srgb, var(--brand-2) 40%, var(--line)); }

.listing-stat-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.listing-stat-strip li:not(:last-child)::after {
    content: '·';
    margin-left: 1rem;
    opacity: 0.5;
}

.listing-gallery { margin-bottom: 1.25rem; border-radius: var(--radius-lg); overflow: hidden; }

@media (max-width: 719px) {
    .listing-detail-page .listing-gallery {
        margin-left: calc(-1 * var(--page-pad-x));
        margin-right: calc(-1 * var(--page-pad-x));
        width: calc(100% + var(--page-pad-x) * 2);
        border-radius: 0;
    }
}

/* Mobile slider */
.listing-gallery-slider {
    display: block;
    background: var(--surface-2);
}

.listing-gallery-mosaic {
    display: none;
}

.listing-gallery-slider-viewport {
    position: relative;
    background: var(--surface-2);
}

.listing-gallery-slider-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.listing-gallery-slider-track::-webkit-scrollbar { display: none; }

.listing-gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    border: 0;
    padding: 0;
    margin: 0;
    display: block;
    cursor: pointer;
    background: var(--surface-2);
    aspect-ratio: 4 / 3;
    max-height: min(72vw, 420px);
}

.listing-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.listing-gallery-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 0;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    color: var(--text);
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    display: grid;
    place-items: center;
    -webkit-tap-highlight-color: transparent;
}

.listing-gallery-slider-nav.prev { left: 0.5rem; }
.listing-gallery-slider-nav.next { right: 0.5rem; }

.listing-gallery-slider-badge {
    position: absolute;
    right: 0.65rem;
    bottom: 0.65rem;
    z-index: 2;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
}

.listing-gallery-dots {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding: 0.55rem 0.75rem;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.listing-gallery-dots::-webkit-scrollbar { display: none; }

.listing-gallery-dot {
    flex-shrink: 0;
    width: 0.45rem;
    height: 0.45rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--muted) 50%, transparent);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.listing-gallery-dot:not(.is-active) {
    background: rgba(15, 23, 42, 0.42);
}

.dark .listing-gallery-dot:not(.is-active) {
    background: color-mix(in srgb, var(--muted) 50%, transparent);
}

.listing-gallery-dot.is-active {
    width: 1.1rem;
    background: var(--gradient, linear-gradient(135deg, #7c3aed, #ec4899));
}

.listing-gallery-slider-all {
    display: block;
    width: calc(100% - 1.5rem);
    margin: 0.5rem auto 0.75rem;
    text-align: center;
    font-size: 0.82rem;
}

@media (min-width: 720px) {
    .listing-gallery-slider { display: none; }

    .listing-gallery-mosaic {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 4px;
        position: relative;
        background: var(--surface-2);
        min-height: 420px;
        max-height: 520px;
    }

    .listing-gallery-cell-main { grid-row: 1 / span 2; grid-column: 1; }
    .listing-gallery-cell-side:nth-of-type(2) { grid-column: 2; grid-row: 1; }
    .listing-gallery-cell-side:nth-of-type(3) { grid-column: 3; grid-row: 1; }
    .listing-gallery-cell-side:nth-of-type(4) { grid-column: 2; grid-row: 2; }
    .listing-gallery-cell-side:nth-of-type(5) { grid-column: 3; grid-row: 2; }
}

.listing-gallery-cell {
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    overflow: hidden;
    background: var(--surface-2);
    position: relative;
}

.listing-gallery-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.listing-gallery-cell:hover img { transform: scale(1.03); }

.listing-gallery-more {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 2;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.listing-detail-layout {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 960px) {
    .listing-detail-layout { grid-template-columns: 1fr min(360px, 34%); }
}

.listing-detail-main { display: flex; flex-direction: column; gap: 1rem; }

.listing-trust-bar { background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 15%, var(--line)); }

.listing-trust-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
}

.listing-trust-list li::before { content: '✓ '; color: var(--good); }

.listing-prose { line-height: 1.65; margin: 0.5rem 0 0; }

.listing-check-list {
    list-style: none;
    padding: 0;
    margin: 0.65rem 0 0;
    display: grid;
    gap: 0.45rem;
}

.listing-check-list li::before {
    content: '✓';
    color: var(--good);
    margin-right: 0.5rem;
    font-weight: 700;
}

.listing-facts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0.75rem 0 1rem;
}

@media (min-width: 600px) {
    .listing-facts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.listing-fact {
    padding: 0.75rem;
    border-radius: var(--radius);
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
}

.listing-fact-label {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.2rem;
}

.listing-dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1.25rem;
    margin: 0.5rem 0 1rem;
}

.listing-dl dt { font-size: 0.78rem; color: var(--muted); margin: 0; }
.listing-dl dd { margin: 0.15rem 0 0; font-weight: 600; }

.chip-accent { background: var(--brand-soft); color: var(--brand); }

.listing-policy-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.listing-policy-list li {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.listing-mini-map {
    margin: 1rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    height: min(420px, 62vh);
    min-height: 280px;
    padding: 0;
    position: relative;
}

.listing-mini-map-canvas {
    width: 100%;
    height: 100%;
    min-height: 280px;
    z-index: 0;
}

.listing-mini-map-canvas.mapboxgl-map,
.listing-mini-map .mapboxgl-canvas {
    width: 100%;
    height: 100%;
}

.listing-mini-map .mapboxgl-ctrl-attrib {
    font-size: 0.65rem;
}

.listing-mini-map-fallback-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 1.25rem;
    text-align: center;
}

.dashboard-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dashboard-page-head h1 {
    margin: 0 0 0.35rem;
}

.dashboard-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dashboard-section-head h2 {
    margin: 0;
}

.saved-homes-grid .saved-home-card {
    display: flex;
    flex-direction: column;
}

.saved-homes-grid .saved-home-card .card-link img {
    height: 160px;
    width: 100%;
    object-fit: cover;
}

.saved-home-card-actions {
    padding: 0 1rem 1rem;
    margin-top: auto;
}

.listing-save-btn.is-saved {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    color: var(--brand);
}

@media (min-width: 960px) {
    .listing-booking-card {
        position: sticky;
        top: calc(var(--header-h) + 1rem);
        box-shadow: var(--shadow);
    }
}

.listing-booking-location { margin: 0.25rem 0; font-size: 1.05rem; }

.listing-booking-stats { margin: 0.35rem 0 1rem; }

.listing-detail-actions.stack { flex-direction: column; align-items: stretch; }

.listing-detail-actions.stack .button { width: 100%; justify-content: center; }

.listing-divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 1.25rem 0;
}

.listing-sticky-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding-bottom: var(--safe-bottom);
    background: var(--surface);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(110%);
    transition: transform 0.25s ease;
    pointer-events: none;
}

.listing-sticky-bar.is-visible {
    transform: translateY(0);
    pointer-events: auto;
}

.listing-sticky-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 1rem;
}

.listing-sticky-meta strong {
    display: block;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 55vw;
}

.listing-sticky-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (max-width: 719px) {
    .listing-detail-page {
        padding-bottom: 2rem;
    }

    .listing-sticky-bar {
        display: none;
    }

    .listing-sticky-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.75rem var(--page-pad-x) calc(0.85rem + var(--safe-bottom));
    }

    .listing-sticky-inner.wrap {
        max-width: none;
        width: 100%;
        margin: 0;
        padding-left: var(--page-pad-x);
        padding-right: var(--page-pad-x);
    }

    .listing-sticky-meta {
        min-width: 0;
    }

    .listing-sticky-meta strong {
        max-width: none;
        white-space: normal;
        font-size: 1rem;
        line-height: 1.25;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .listing-sticky-meta .meta {
        margin-top: 0.15rem;
        font-size: 0.82rem;
    }

    .listing-sticky-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
    }

    .listing-sticky-actions .button {
        width: 100%;
        min-height: var(--touch-min);
        justify-content: center;
        padding-left: 1rem;
        padding-right: 1rem;
        font-size: 0.9rem;
    }

    .listing-sticky-actions .button.ghost {
        order: 2;
    }

    .listing-sticky-actions .button.primary {
        order: 1;
    }
}

/* Lightbox */
body.lightbox-open { overflow: hidden; }

.listing-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.listing-lightbox[hidden] { display: none !important; }

.listing-lightbox-backdrop {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(15, 23, 42, 0.92);
    cursor: pointer;
}

.listing-lightbox-close-fab {
    position: fixed;
    top: max(0.75rem, env(safe-area-inset-top, 0px));
    right: max(0.75rem, env(safe-area-inset-right, 0px));
    z-index: 3;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.65rem;
    line-height: 1;
    font-weight: 900;
    font-family: inherit;
    color: #fff;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.listing-lightbox-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    padding: max(0.75rem, env(safe-area-inset-top, 0px)) max(0.75rem, env(safe-area-inset-right, 0px)) max(0.75rem, env(safe-area-inset-bottom, 0px)) max(0.75rem, env(safe-area-inset-left, 0px));
    color: #f8fafc;
    pointer-events: none;
}

.listing-lightbox-inner > * {
    pointer-events: auto;
}

.listing-lightbox-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    padding-right: 3rem;
}

.listing-lightbox-close {
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
}

.listing-lightbox-stage {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 0;
    pointer-events: none;
}

.listing-lightbox-viewport {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
    pointer-events: auto;
}

.listing-lightbox-figure {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: min(50vh, calc(100dvh - 200px));
    max-height: calc(100dvh - 180px);
}

.listing-lightbox-image {
    max-width: 100%;
    max-height: calc(100dvh - 180px);
    object-fit: contain;
    border-radius: 8px;
    transform-origin: center center;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}

.listing-lightbox-image.is-zoomed {
    max-width: none;
    max-height: none;
}

.listing-lightbox-hint {
    margin: 0.35rem 0 0;
    text-align: center;
    color: rgba(248, 250, 252, 0.65);
    font-size: 0.8rem;
}

.listing-lightbox-nav {
    flex-shrink: 0;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    pointer-events: auto;
}

@media (max-width: 719px) {
    .listing-lightbox-toolbar .listing-lightbox-close {
        display: none;
    }

    .listing-lightbox-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 2;
        opacity: 0.9;
    }

    .listing-lightbox-nav.prev {
        left: 0.35rem;
    }

    .listing-lightbox-nav.next {
        right: 0.35rem;
    }

    .listing-lightbox-stage {
        position: relative;
    }
}

@media (min-width: 720px) {
    .listing-lightbox-close-fab {
        display: none;
    }

    .listing-lightbox-toolbar {
        padding-right: 0;
    }

    .listing-lightbox-hint {
        display: none;
    }
}

.listing-lightbox-thumbs {
    display: flex;
    gap: 0.35rem;
    overflow-x: auto;
    padding: 0.65rem 0 0.25rem;
    margin-top: 0.5rem;
}

.listing-lightbox-thumb {
    flex-shrink: 0;
    width: 72px;
    height: 52px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.65;
    background: transparent;
}

.listing-lightbox-thumb.is-active {
    opacity: 1;
    border-color: #fff;
}

.listing-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Map detail preview */
.map-detail-layout.map-detail-layout-rich {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.map-detail-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
    border-radius: 12px;
    overflow: hidden;
    min-height: 100px;
}

.map-detail-preview-cell {
    position: relative;
    display: block;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--surface-2);
}

.map-detail-preview-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-detail-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.map-detail-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.map-detail-save {
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
}

.map-detail-photo-count { margin: 0.25rem 0 0; font-size: 0.72rem; }

@media (min-width: 900px) {
    .map-detail-layout.map-detail-layout-rich { flex-direction: row; align-items: flex-start; }
    .map-detail-layout-rich .map-detail-media { flex: 0 0 42%; }
    .map-detail-layout-rich .map-detail-preview-grid { min-height: 120px; }
}

/* ── Swap matching & modal wizard ── */
.swap-modal { max-height: min(92dvh, 52rem); overflow-y: auto; }

.swap-modal-target {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.swap-modal-target-media {
    flex: 0 0 4.5rem;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 12px;
    overflow: hidden;
}

.swap-modal-target-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swap-modal-steps {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    background: var(--surface-soft);
    border-radius: 12px;
}

.swap-step {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--muted);
    cursor: pointer;
}

.swap-step.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.swap-modal-pane { display: none; }

.swap-modal-pane.is-active { display: block; }

.swap-criteria-hint { margin: 0 0 0.75rem; }

.swap-pref-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    max-height: 8.5rem;
    overflow-y: auto;
    padding: 0.15rem;
}

.swap-pref-chips--modal { max-height: 6.5rem; }

.swap-pref-chip {
    display: inline-flex;
    cursor: pointer;
}

.swap-pref-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.swap-pref-chip span {
    display: inline-flex;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.swap-pref-chip input:checked + span {
    background: var(--brand-soft);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    color: #6d28d9;
}

.dark .swap-pref-chip input:checked + span { color: #c4b5fd; }

.swap-pref-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.swap-pref-suggest {
    border: 1px dashed var(--line);
    background: transparent;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.68rem;
    cursor: pointer;
    color: var(--muted);
}

.swap-match-results {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.swap-match-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.swap-match-list {
    display: grid;
    gap: 0.65rem;
    max-height: 14rem;
    overflow-y: auto;
}

.swap-match-list--page {
    max-height: none;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.swap-match-card {
    display: flex;
    gap: 0.65rem;
    padding: 0.65rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.swap-match-thumb {
    width: 4rem;
    height: 4rem;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.swap-match-thumb--empty {
    display: grid;
    place-items: center;
    font-size: 0.65rem;
    text-align: center;
    padding: 0.25rem;
    background: var(--surface-2);
}

.swap-match-body { flex: 1; min-width: 0; }

.swap-match-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem;
}

.swap-match-top strong {
    font-size: 0.88rem;
    line-height: 1.25;
}

.chip-score {
    font-size: 0.62rem;
    white-space: nowrap;
}

.swap-match-reasons { font-size: 0.72rem; }

.swap-match-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.swap-match-actions .button {
    padding: 0.35rem 0.55rem;
    font-size: 0.72rem;
}

.listing-swap-prefs { margin-top: 0.5rem; }

.listing-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.listing-host-wants {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.lead.compact {
    max-width: 48rem;
}

.section-head {
    max-width: 48rem;
    margin-bottom: 1rem;
}

.landing-split-band {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 1rem;
    align-items: center;
}

.landing-compare-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.muted-list li {
    color: var(--muted);
}

.landing-feature-card {
    min-height: 13rem;
}

.landing-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 12%, var(--surface-soft));
    border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 0.65rem;
}

.landing-use-band {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.landing-use-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.landing-final-cta {
    display: grid;
    gap: 0.65rem;
    justify-items: start;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, transparent), transparent 48%),
        var(--surface);
}

/* Site footer (Moppsy-style) */
.site-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--brand) 4%, var(--bg)) 100%);
}

.site-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr);
    gap: 2.5rem 2rem;
    padding: 3rem 0 2rem;
}

.site-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text);
}

.site-footer-name {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.site-footer-tagline,
.site-footer-company {
    margin: 0.5rem 0 0;
    max-width: 22rem;
    line-height: 1.5;
}

.site-footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.site-footer-heading {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 0.75rem;
}

.site-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer-col li + li {
    margin-top: 0.45rem;
}

.site-footer-col a {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
    text-decoration: none;
}

.site-footer-col a:hover {
    color: var(--brand);
}

.site-footer-bottom {
    border-top: 1px solid var(--line);
    padding: 1.1rem 0 1.5rem;
    text-align: center;
}

.site-footer-bottom p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted);
}

.store-badges {
    margin-top: 1rem;
}

.store-badges-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 0.5rem;
}

.store-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.store-badge-link {
    display: inline-flex;
    height: 2.5rem;
    width: 8.25rem;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}

.store-badges--lg .store-badge-link {
    height: 2.75rem;
    width: 8.5rem;
}

.store-badge-link:hover {
    transform: scale(1.03);
}

.store-badge-link img {
    height: 100%;
    width: 100%;
    object-fit: contain;
}

.store-badges-soon {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
}

.store-badges--pending .store-badge-link {
    opacity: 0.92;
    cursor: default;
}

.hero .store-badges {
    margin-top: 1.25rem;
}

@media (max-width: 860px) {
    .site-footer-grid {
        grid-template-columns: 1fr;
    }

    .site-footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem 1rem;
    }
}

/* Listing wizard (create / edit) */
.listing-wizard-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.listing-wizard {
    display: grid;
    gap: 1rem;
}

.listing-wizard-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.65rem;
}

.listing-wizard-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.listing-wizard-nav-btn.is-active,
.listing-wizard-nav-btn.is-done {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    color: var(--text);
}

.listing-wizard-nav-btn.is-active {
    background: color-mix(in srgb, var(--brand) 14%, var(--surface));
    color: var(--brand);
}

.listing-wizard-nav-num {
    width: 1.35rem;
    height: 1.35rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--surface-soft);
    font-size: 0.7rem;
}

.listing-wizard-body {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 1rem;
    align-items: start;
}

.listing-wizard-step[hidden] {
    display: none !important;
}

.listing-step-head {
    margin-bottom: 1rem;
}

.listing-step-head h2 {
    font-size: 1.25rem;
    margin: 0 0 0.25rem;
}

.listing-wizard-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.listing-wizard-preview {
    position: sticky;
    top: 5.5rem;
    padding: 1rem;
    min-width: 0;
}

.listing-preview-hint {
    margin-bottom: 0.75rem;
}

.listing-preview-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    min-width: 0;
    max-width: 100%;
}

.listing-preview-hero {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--surface-soft);
    overflow: hidden;
}

.listing-preview-hero img[data-preview-image] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.listing-preview-hero img[data-preview-image][hidden] {
    display: none !important;
}

.listing-preview-hero-placeholder {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.25rem 1rem;
    text-align: center;
    overflow: hidden;
}

.listing-preview-hero-placeholder[hidden] {
    display: none !important;
}

.listing-preview-hero-placeholder-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--brand) 18%, #ede9fe) 0%, color-mix(in srgb, var(--brand-2) 12%, #fce7f3) 55%, var(--surface-soft) 100%);
    opacity: 1;
}

.listing-preview-hero-placeholder-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, color-mix(in srgb, var(--brand) 25%, transparent) 0%, transparent 45%),
        radial-gradient(circle at 80% 70%, color-mix(in srgb, var(--brand-2) 22%, transparent) 0%, transparent 40%),
        linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
    background-size: auto, auto, 18px 18px, 18px 18px;
    opacity: 0.65;
}

.listing-preview-hero-mascot {
    position: relative;
    z-index: 1;
    width: 4.5rem;
    height: 4.5rem;
    object-fit: contain;
    opacity: 0.35;
    filter: saturate(0.85);
    margin-bottom: 0.15rem;
}

.listing-preview-hero-placeholder-content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.2rem;
    justify-items: center;
    max-width: 12rem;
}

.listing-preview-hero-icon {
    display: inline-grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
    color: var(--brand);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.15rem;
}

.listing-preview-hero-label {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.3;
}

.listing-preview-hero-sublabel {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.35;
}

.dark .listing-preview-hero-placeholder-bg {
    background:
        linear-gradient(145deg, rgba(91, 33, 182, 0.35) 0%, rgba(131, 24, 67, 0.22) 55%, var(--surface-soft) 100%);
}

.dark .listing-preview-hero-icon {
    background: color-mix(in srgb, var(--surface) 75%, transparent);
    color: #c4b5fd;
}

.listing-preview-body {
    padding: 0.85rem 1rem 1rem;
    min-width: 0;
}

.listing-preview-body h3 {
    margin: 0.35rem 0 0.15rem;
    font-size: 1.05rem;
}

.listing-preview-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    list-style: none;
    padding: 0.5rem 0 0;
    margin: 0;
}

.listing-preview-desc {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0.5rem 0 0;
    line-height: 1.5;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    overflow: hidden;
}

.listing-preview-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    padding: 0.65rem 0 0;
    margin: 0;
}

.property-type-grid--modern {
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
}

.property-type-option {
    border: 2px solid var(--line);
    border-radius: 14px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}

.property-type-option:has(input:checked),
.property-type-option.is-selected {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.property-type-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.property-type-icon {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 0.25rem;
}

.field-hint {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    line-height: 1.45;
}

.field-counter {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    font-weight: 600;
}

.field-counter.is-short {
    color: #b45309;
}

.field-counter.is-ok {
    color: var(--good);
}

.listing-wizard-step-error {
    border-color: color-mix(in srgb, #dc2626 40%, var(--line));
    background: color-mix(in srgb, #dc2626 8%, var(--surface));
    color: #b91c1c;
    font-weight: 600;
    font-size: 0.88rem;
}

.listing-wizard-step-error[hidden] {
    display: none !important;
}

/* Address picker (Mapbox) */
.address-picker--modern .address-picker-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    padding: 0.35rem 0.65rem 0.35rem 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.address-picker--modern.is-confirmed .address-picker-input-wrap {
    border-color: color-mix(in srgb, var(--good) 55%, var(--line));
}

.address-picker--modern:focus-within .address-picker-input-wrap {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.address-picker-pin {
    font-size: 1.1rem;
    opacity: 0.85;
}

.address-picker--modern #listing-address-search {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.55rem 0.25rem;
    font: inherit;
    font-size: 0.95rem;
    min-width: 0;
}

.address-picker--modern #listing-address-search:focus {
    outline: none;
}

.address-picker-results {
    margin-top: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
    max-height: 16rem;
    overflow-y: auto;
}

.address-picker-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.7rem 0.85rem;
    border: none;
    border-bottom: 1px solid var(--line-soft);
    background: var(--surface);
    font-family: inherit;
    cursor: pointer;
}

.address-picker-option:hover {
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}

.address-picker-option strong {
    display: block;
    font-size: 0.88rem;
}

.address-picker-option span {
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

.address-picker-empty {
    margin: 0;
    padding: 0.75rem 0.85rem;
    font-size: 0.82rem;
    color: var(--muted);
}

/* Modern photo upload */
.photo-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.photo-upload-dropzone {
    border: 2px dashed color-mix(in srgb, var(--brand) 35%, var(--line));
    border-radius: 18px;
    padding: 1rem;
    background: color-mix(in srgb, var(--brand) 4%, var(--surface-soft));
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
}

.photo-upload-dropzone.is-dragover,
.photo-upload-dropzone:focus-visible {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, var(--surface-soft));
    outline: none;
}

.photo-upload-dropzone.has-image {
    border-style: solid;
    cursor: default;
}

.photo-upload-preview {
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
    margin-bottom: 0.85rem;
}

.photo-upload-dropzone:not(.has-image) .photo-upload-preview {
    border: none;
    background: transparent;
    margin-bottom: 0;
}

.photo-upload-dropzone.has-image .photo-upload-preview {
    aspect-ratio: 16 / 10;
    background: var(--surface);
    border: 1px solid var(--line);
}

.photo-upload-preview img[data-upload-preview-image] {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload-dropzone:not(.has-image) .photo-upload-preview img {
    display: none !important;
}

.listing-video-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid var(--line);
}

.listing-video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.photo-upload-empty {
    text-align: center;
    padding: 1.5rem 1rem;
}

.photo-upload-icon {
    font-size: 2.25rem;
    display: block;
    margin-bottom: 0.5rem;
}

.photo-upload-empty strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.photo-upload-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.photo-upload-advanced {
    margin-top: 0.75rem;
}

.photo-upload-advanced summary {
    cursor: pointer;
    font-weight: 600;
}

.swap-country-filter {
    width: 100%;
    max-width: 20rem;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
}

.swap-pref-chips--scroll {
    max-height: 11rem;
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.swap-pref-chip.is-filtered-out {
    display: none !important;
}

.swap-country-filter-empty {
    margin: 0.25rem 0 0.35rem;
    font-size: 0.8rem;
}

.swap-country-filter-empty[hidden] {
    display: none !important;
}

.image-picker--hero .image-picker-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
}

.image-picker-preview--hero {
    min-height: 200px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface-soft);
    display: grid;
    place-items: center;
}

.image-picker-preview--hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-facts-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: 0.65rem;
}

/* Unified checkbox chips (policy toggles, etc.) */
.choice-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.choice-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem 0.5rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.choice-chip:has(input:focus-visible) {
    outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent);
    outline-offset: 2px;
}

.choice-chip:has(input:checked) {
    border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}

.choice-chip input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.choice-chip-mark {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    border: 2px solid var(--line);
    border-radius: 5px;
    background: var(--surface);
    display: grid;
    place-items: center;
    transition: border-color 0.15s, background 0.15s;
}

.choice-chip:has(input:checked) .choice-chip-mark {
    border-color: var(--brand);
    background: var(--brand);
}

.choice-chip:has(input:checked) .choice-chip-mark::after {
    content: '';
    width: 0.3rem;
    height: 0.55rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.choice-chip-label {
    line-height: 1.2;
}

.listing-policy-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.listing-available-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
    font-weight: 700;
    margin-bottom: 1rem;
    cursor: pointer;
}

.pick-chips-wrap {
    margin: 0.4rem 0 0.5rem;
}

.pick-chips-wrap--compact {
    margin-bottom: 0.35rem;
}

.pick-chips-label {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.pick-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.pick-chips--scroll {
    max-height: 9.5rem;
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.pick-chips--wide .pick-chip-btn,
.pick-chip-btn--wide {
    max-width: 100%;
    text-align: left;
    white-space: normal;
    line-height: 1.3;
}

.pick-chips--compact {
    gap: 0.3rem;
}

.pick-chip-btn {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    color: var(--text);
    transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.pick-chip-btn:hover {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}

.pick-chip-btn.is-picked {
    border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
    background: color-mix(in srgb, var(--brand) 14%, var(--surface));
    color: #6d28d9;
}

.dark .pick-chip-btn.is-picked {
    color: #c4b5fd;
}

.pick-chip-btn--num {
    min-width: 2.25rem;
    text-align: center;
    padding-inline: 0.5rem;
}

.listing-facts-input-grid--picks .field input[type="number"] {
    margin-top: 0.15rem;
}

.listing-coords-advanced {
    margin-top: 0.75rem;
}

.listing-coords-advanced summary {
    cursor: pointer;
    font-weight: 600;
}

.listing-form-errors {
    border: 1px solid color-mix(in srgb, var(--danger, #dc2626) 35%, var(--line));
    margin-bottom: 1rem;
}

@media (max-width: 960px) {
    .listing-wizard-body {
        grid-template-columns: 1fr;
    }
    .listing-wizard-preview {
        position: static;
        order: -1;
    }
    .image-picker--hero .image-picker-shell {
        grid-template-columns: 1fr;
    }
}

/* ── Site footer (Moppsy-style) ── */
.site-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, var(--surface) 0%, color-mix(in srgb, var(--brand) 5%, var(--bg)) 100%);
    color: var(--text);
}

.site-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr);
    gap: 2.5rem 3rem;
    padding: 3rem 0 2.25rem;
    align-items: start;
}

.site-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 26rem;
}

.site-footer-logo {
    align-self: flex-start;
    margin-bottom: 0.15rem;
    gap: 0.75rem;
}

.site-footer-logo .brand-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.site-footer-logo .brand-name {
    font-size: 1.5rem;
}

.site-footer-tagline,
.site-footer-company {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--muted);
}

.site-footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem 2rem;
}

.site-footer-heading {
    margin: 0 0 0.85rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.site-footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer-list li + li {
    margin-top: 0.5rem;
}

.site-footer-list a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s ease;
}

.site-footer-list a:hover {
    color: var(--brand);
}

.site-footer-bottom {
    border-top: 1px solid var(--line);
    padding: 1rem 0 1.35rem;
    text-align: center;
}

.site-footer-bottom p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted);
}

/* App store badges — always side by side */
.store-badges {
    margin-top: 0.35rem;
}

.store-badges-label {
    margin: 0 0 0.55rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.store-badges-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.store-badge-link {
    display: block;
    flex: 0 0 auto;
    width: 8.4375rem;
    aspect-ratio: 135 / 40;
    height: auto;
    line-height: 0;
    transition: transform 0.15s ease;
}

.store-badges--lg .store-badge-link {
    width: 9.375rem;
}

.store-badge-link:hover {
    transform: scale(1.03);
}

.store-badge-link img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
    object-position: center;
    filter: none;
}

.dark .store-badge-link img {
    filter: none;
}

.hero .store-badges {
    margin-top: 1.35rem;
}

/* Hero — search-focused layout (admin design tab) */
.hero--search {
    display: block;
    padding-top: 2rem;
    padding-bottom: 2.5rem;
}

.hero-search-inner {
    max-width: 40rem;
    margin: 0 auto;
    text-align: center;
}

.hero-search-inner .eyebrow {
    justify-content: center;
}

.hero-search-inner .trust {
    justify-content: center;
}

.hero-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1.35rem 0 1rem;
    justify-content: center;
}

.hero-search-input {
    flex: 1 1 16rem;
    min-width: 0;
    max-width: 28rem;
    padding: 0.85rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font: inherit;
    font-size: 1rem;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.hero-search-input:focus {
    outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent);
    border-color: var(--brand);
}

.hero-search-submit {
    flex: 0 0 auto;
    border-radius: 999px;
    padding-left: 1.35rem;
    padding-right: 1.35rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) {
    .site-footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .site-footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem 1rem;
    }
}

@media (max-width: 520px) {
    .store-badges-row {
        gap: 0.5rem;
    }
}

.legal-prose h2 {
    font-size: 1.1rem;
    margin: 1.25rem 0 0.5rem;
}

.legal-prose .legal-lead {
    margin-bottom: 1rem;
}

.dash-nav-danger {
    color: var(--danger, #dc2626);
}

.dash-nav-danger.is-active {
    background: color-mix(in srgb, var(--danger, #dc2626) 12%, transparent);
}

.dash-flash--info {
    border-left: 3px solid var(--brand);
}

/* ── Toast notifications ── */
.toast-root {
    position: fixed;
    top: calc(var(--header-h) + var(--safe-top) + 0.75rem);
    right: max(0.75rem, var(--page-pad-x));
    z-index: 1300;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    width: min(22rem, calc(100vw - 1.5rem));
    pointer-events: none;
}

.toast {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 0.65rem;
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(14px);
    transform: translateX(110%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
    pointer-events: auto;
}

.toast.is-visible {
    transform: translateX(0);
    opacity: 1;
}

.toast.is-leaving {
    transform: translateX(110%);
    opacity: 0;
}

.toast-icon {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    font-weight: 900;
    flex-shrink: 0;
}

.toast--success .toast-icon {
    background: var(--good-soft);
    color: #047857;
}

.toast--error .toast-icon {
    background: #fef2f2;
    color: #b91c1c;
}

.toast--info .toast-icon {
    background: var(--brand-soft);
    color: #6d28d9;
}

.toast--warning .toast-icon {
    background: #fffbeb;
    color: #b45309;
}

.dark .toast--success .toast-icon { color: #6ee7b7; }
.dark .toast--error .toast-icon { background: rgba(185, 28, 28, 0.2); color: #fca5a5; }
.dark .toast--info .toast-icon { color: #c4b5fd; }

.toast-message {
    margin: 0.1rem 0 0;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text);
}

.toast-close {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 8px;
}

.toast-close:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.gallery-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.gallery-upload-thumb {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    aspect-ratio: 1;
    background: var(--surface-soft);
}

.gallery-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-upload-thumb .meta {
    position: absolute;
    left: 0.35rem;
    bottom: 0.35rem;
    background: rgba(15, 23, 42, 0.65);
    color: #fff;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.65rem;
}

/* ── Member profile page ── */
.profile-page {
    max-width: 56rem;
    display: grid;
    gap: 1.25rem;
}

.profile-page-head h1 {
    margin-bottom: 0.35rem;
}

.profile-hero {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .profile-hero {
        grid-template-columns: minmax(0, 1.4fr) minmax(12rem, 0.75fr);
        align-items: start;
    }
}

.profile-hero-main {
    display: flex;
    gap: 1.15rem;
    align-items: flex-start;
    min-width: 0;
}

.profile-hero-avatar {
    flex-shrink: 0;
}

.profile-avatar-img,
.profile-hero-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    object-fit: cover;
    display: block;
    box-shadow: var(--shadow-sm);
    border: 2px solid color-mix(in srgb, var(--brand) 25%, var(--line));
}

.profile-hero-avatar .profile-avatar-img,
.profile-hero-avatar .profile-avatar-fallback {
    width: 96px;
    height: 96px;
}

.dash-user-avatar .profile-avatar-img,
.dash-user-avatar .profile-avatar-fallback {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.listing-owner-avatar .profile-avatar-img,
.listing-owner-avatar .profile-avatar-fallback {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.profile-hero-name {
    margin: 0 0 0.2rem;
    font-size: 1.45rem;
    line-height: 1.2;
}

.profile-hero-username {
    margin: 0 0 0.15rem;
    font-weight: 700;
    color: var(--brand);
}

.profile-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.65rem;
}

.profile-chip-google {
    background: color-mix(in srgb, #4285f4 12%, var(--surface));
    border-color: color-mix(in srgb, #4285f4 35%, var(--line));
}

.profile-chip-rating {
    background: color-mix(in srgb, #f59e0b 14%, var(--surface));
    border-color: color-mix(in srgb, #f59e0b 40%, var(--line));
    color: #b45309;
    font-weight: 800;
}

.dark .profile-chip-rating {
    color: #fcd34d;
}

.profile-chip-rating-sub {
    font-weight: 600;
    opacity: 0.75;
}

.profile-interest-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.profile-interest-tags li {
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: #6d28d9;
    font-size: 0.72rem;
    font-weight: 700;
}

.dark .profile-interest-tags li {
    color: #c4b5fd;
}

.profile-hero-aside {
    display: grid;
    gap: 0.85rem;
    padding-top: 0.15rem;
    border-top: 1px solid var(--line-soft);
}

@media (min-width: 768px) {
    .profile-hero-aside {
        border-top: 0;
        padding-top: 0;
        padding-left: 1rem;
        border-left: 1px solid var(--line-soft);
    }
}

.profile-completion-bar {
    height: 8px;
    border-radius: 999px;
    background: var(--line);
    overflow: hidden;
    margin-top: 0.45rem;
}

.profile-completion-fill {
    height: 100%;
    background: var(--gradient);
    border-radius: inherit;
}

.profile-hero-bio {
    margin: 0;
    line-height: 1.55;
}

.profile-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1rem;
    margin: 0;
}

.profile-hero-stats dt {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.profile-hero-stats dd {
    margin: 0.15rem 0 0;
    font-weight: 800;
    font-size: 0.92rem;
}

.profile-form {
    display: grid;
    gap: 0.5rem;
}

.profile-form-grid {
    display: grid;
    gap: 1.35rem;
}

.profile-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.profile-fieldset legend {
    padding: 0;
    margin: 0 0 0.85rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.profile-form-grid .split {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-form-grid .field--full {
    grid-column: 1 / -1;
}

.profile-form-grid .field--readonly input:disabled {
    opacity: 1;
    cursor: not-allowed;
    background: var(--surface-soft);
    color: var(--muted);
}

.field-hint {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.45;
}

.profile-modal-more {
    margin: 0.25rem 0 0;
}

.profile-modal-more a {
    color: var(--brand);
    font-weight: 800;
}

.profile-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line-soft);
}

.profile-form--modal {
    padding: 0 0.25rem 0.25rem;
}

.auth-modal.wide .profile-form--modal {
    padding: 0 1.25rem 1.25rem;
}

@media (max-width: 599px) {
    .profile-form-grid .split {
        grid-template-columns: 1fr;
    }

    .profile-hero-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile-hero-chips,
    .profile-interest-tags {
        justify-content: center;
    }
}

.delete-form-danger {
    border: 2px solid color-mix(in srgb, var(--danger, #dc2626) 35%, var(--line));
}

.dash-user-meta {
    min-width: 0;
}

@media (max-width: 760px) {
    .chat-thread-layout { grid-template-columns: 1fr; }
    .chat-thread-list { position: static; }
    .chat-thread-head { align-items: flex-start; flex-direction: column; }
    .landing-split-band,
    .landing-compare-grid,
    .landing-use-grid {
        grid-template-columns: 1fr;
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.google-signin-mount {
    display: flex;
    justify-content: center;
    min-height: 44px;
    margin: 0.5rem 0 1rem;
}

.google-one-tap-note {
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

.chat-live-hint {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: var(--muted, #64748b);
}

.chat-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.chat-page-head h1 {
    margin: 0;
}

.chip-live {
    background: color-mix(in srgb, var(--accent, #6366f1) 18%, transparent);
    color: var(--accent, #6366f1);
}

.chat-main {
    min-width: 0;
}

.chat-empty-state h2 {
    margin-top: 0;
}

.nav-chat-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-chat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    background: var(--accent, #6366f1);
    color: #fff;
}

.dash-nav-chat .nav-chat-badge {
    margin-left: 0.25rem;
}

.presence-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.25rem 0;
}

.presence-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #94a3b8;
    flex-shrink: 0;
}

.presence-dot.is-online {
    background: #22c55e;
    box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 25%, transparent);
}

.chat-now-btn {
    font-weight: 600;
}

.toast-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.toast-action {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent, #6366f1);
    text-decoration: none;
}

.toast-action:hover {
    text-decoration: underline;
}
