/* Moppsy-inspired design system (HouseSwapp / home exchange) */
/* Fonts loaded via <link> in layouts/site.blade.php for faster paint */

: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);
    --shadow-glow: 0 0 60px rgba(124, 58, 237, 0.15);
    --gradient: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 45%, #ec4899 100%);
    --gradient-vivid: linear-gradient(135deg, #6d28d9 0%, #7c3aed 30%, #db2777 70%, #f472b6 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: clip avoids creating a scroll container (unlike hidden) so
       position:fixed modal layers are never clipped on mobile viewports */
    overflow-x: clip;
    -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,
.swap-third-way-option {
    margin-top: 0.75rem;
}

.third-way-feature-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: #fff;
    margin-bottom: 0.5rem;
}

.choice-chip--featured {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}

/* third-way hero styles live under .landing-flagship on home */

.third-way-loop-diagram {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    padding: 0.85rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px dashed color-mix(in srgb, var(--brand) 35%, var(--line));
}

.third-way-loop-node {
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.third-way-loop-node.is-you {
    background: color-mix(in srgb, var(--brand) 18%, var(--surface));
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    color: var(--brand);
}

.map-third-way-promo {
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}

.swap-step--highlight { color: var(--brand); font-weight: 800; }

.third-way-cycle-list { display: grid; gap: 0.75rem; max-height: 320px; overflow-y: auto; }

.third-way-cycle-card {
    padding: 0.85rem;
    border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
    border-radius: 12px;
}

.third-way-btn { display: inline-flex; align-items: center; gap: 0.35rem; }

#toggle-loops-btn[aria-expanded="false"] {
    opacity: 0.85;
    border-style: dashed;
    background: var(--surface);
    color: var(--text);
}
#toggle-loops-btn[aria-expanded="true"] {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}
#toggle-loops-btn[aria-expanded="false"]:hover {
    opacity: 1;
}

.third-way-demo-cta {
    margin-top: 1rem;
}

.swap-pyramid-option .choice-chip--block,
.swap-third-way-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;
}

.third-way-demo-layer {
    z-index: 1250;
}

.third-way-demo-layer .auth-modal {
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
}

.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-detail-aside {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.listing-nav {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
}

.listing-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    min-width: 0;
    flex: 0 1 auto;
    max-width: min(11rem, 46vw);
}

.listing-nav-btn:hover {
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.listing-nav-btn--prev {
    margin-right: auto;
}

.listing-nav-btn--next {
    margin-left: auto;
    justify-content: flex-end;
    text-align: right;
}

.listing-nav-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.listing-nav-label {
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.listing-nav-title {
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 9.5rem;
}

.listing-detail-nav-row {
    display: none;
    width: 100%;
    margin-bottom: 0.75rem;
}

.listing-nav--sidebar {
    margin-bottom: 0;
}

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

@media (max-width: 899px) {
    .listing-detail-nav-row,
    .listing-nav--header {
        display: none !important;
    }
}

@media (min-width: 900px) {
    .listing-detail-nav-row {
        display: block;
    }

    .listing-nav--sidebar {
        display: none !important;
    }

    .listing-detail-toolbar-actions {
        width: auto;
    }
}

.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 {
        box-shadow: var(--shadow);
    }
}

@media (min-width: 900px) {
    .listing-detail-aside {
        position: sticky;
        top: calc(var(--header-h) + 1rem);
        max-height: calc(100vh - var(--header-h) - 2rem);
        overflow-y: auto;
        scrollbar-width: thin;
    }
}

.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 (near full-screen height) ── */
.auth-modal.wide.swap-modal,
.auth-modal.wide.third-way-demo-modal {
    width: min(96vw, 56rem);
    height: calc(100dvh - max(1rem, var(--safe-top)) - max(1rem, var(--safe-bottom)));
    max-height: calc(100dvh - max(1rem, var(--safe-top)) - max(1rem, var(--safe-bottom)));
    min-height: calc(100dvh - max(1rem, var(--safe-top)) - max(1rem, var(--safe-bottom)));
}

/* ── Swap modal: flex column — chrome header + body (sidebar + content) ── */
.swap-modal {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - max(1rem, var(--safe-top)) - max(1rem, var(--safe-bottom)));
    max-height: calc(100dvh - max(1rem, var(--safe-top)) - max(1rem, var(--safe-bottom)));
    min-height: calc(100dvh - max(1rem, var(--safe-top)) - max(1rem, var(--safe-bottom)));
    overflow: hidden;
    padding: 0;
}

/* Swap modal layer: minimal chrome — modal uses almost the full viewport */
.modal-layer:has(.swap-modal) {
    align-items: stretch;
    justify-content: center;
    padding: max(0.5rem, var(--safe-top)) 0.75rem max(0.5rem, var(--safe-bottom));
}

/* Chrome: listing info + close button only — no tabs */
.swap-modal-chrome {
    flex-shrink: 0;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.swap-modal-chrome-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.swap-modal-target {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-width: 0;
}

.swap-modal-target-media {
    flex: 0 0 3.25rem;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface-soft);
}

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

.swap-modal-target-info {
    min-width: 0;
}

.swap-modal-target-type {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 0.15rem;
}

.swap-modal-target-title {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swap-modal-target-meta,
.swap-modal-target-stats {
    margin: 0;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
}

.swap-modal-close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--muted);
    background: color-mix(in srgb, var(--text) 6%, transparent);
    transition: background 0.18s ease, color 0.18s ease;
    display: grid;
    place-items: center;
}

.swap-modal-close:hover {
    background: color-mix(in srgb, var(--brand) 12%, transparent);
    color: var(--brand);
}

/* Body: sidebar nav + content side-by-side */
.swap-modal-body {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

/* Vertical sidebar navigation */
.swap-modal-nav {
    flex: 0 0 auto;
    width: 10.5rem;
    border-right: 1px solid var(--line);
    padding: 0.5rem 0;
    display: flex;
    flex-direction: column;
    background: color-mix(in srgb, var(--surface-soft, #f8fafc) 50%, var(--bg));
    overflow-y: auto;
}

/* Sidebar step button */
.swap-step {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.8rem 1rem;
    text-align: left;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.3;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 0;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    white-space: normal;
}

.swap-step:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--text) 5%, transparent);
}

.swap-step.is-active {
    color: var(--brand);
    font-weight: 700;
    border-left-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 8%, transparent);
}

.swap-step--highlight {
    color: color-mix(in srgb, var(--brand) 60%, var(--muted));
}

.swap-step--highlight.is-active {
    color: var(--brand);
}

.swap-step-icon {
    font-size: 1rem;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.65;
}

.swap-step.is-active .swap-step-icon {
    opacity: 1;
}

.swap-step-label {
    flex: 1 1 auto;
}

/* Content area: holds the panes absolutely so each fills the area */
.swap-modal-content {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Pane: fills content area; scrolls as one column (fix flex min-height trap) */
.swap-modal-pane {
    display: none;
    position: absolute;
    inset: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

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

.swap-modal-pane--third-way.is-active {
    display: flex;
    flex-direction: column;
}

.swap-pane-inner {
    padding: 1.1rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: min-content;
}

/* Direct swap: cap chip lists so filters don’t eat the whole modal */
.swap-modal-pane[data-swap-pane="find"] .swap-pref-chips--modal {
    max-height: 5.5rem;
}

.swap-modal-pane[data-swap-pane="find"] #swap-criteria-countries {
    max-height: 6.5rem;
}

.swap-pane-inner .field {
    margin: 0;
}

.swap-pane-inner .split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.swap-pane-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0;
}

.swap-pane-hint {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
}

.swap-field-hint {
    margin: 0.3rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
}

/* Request pane */
.swap-request-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.swap-request-form .field {
    margin: 0;
}

.swap-request-foot {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
}

/* Third-way pane — fills the scrollable area with its own inner layout */
/* Third-way pane: overflow hidden because shell manages its own scroll */
.swap-modal-pane--third-way.is-active {
    overflow: hidden;
}

.swap-third-way-shell {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    padding: 1rem 1.25rem 0;
    gap: 0.85rem;
    overflow-x: hidden;
}

/* Collapsible search block (home + find button + intro) */
.swap-third-way-search {
    flex-shrink: 0;
    border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
    border-radius: 12px;
    background: var(--surface-soft);
    overflow: hidden;
}

.swap-third-way-search-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.swap-third-way-search-toggle::-webkit-details-marker {
    display: none;
}

.swap-third-way-search-toggle::after {
    content: '›';
    margin-left: auto;
    flex-shrink: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.swap-third-way-search[open] .swap-third-way-search-toggle::after {
    transform: rotate(90deg);
}

.swap-third-way-search-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
    flex-shrink: 0;
}

.swap-third-way-search-preview {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

.swap-third-way-search:not([open]) .swap-third-way-search-preview {
    text-align: left;
}

.swap-third-way-search-body {
    padding: 0 0.75rem 0.65rem;
    border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.swap-third-way-search-reopen {
    flex-shrink: 0;
    border: 0;
    background: color-mix(in srgb, var(--brand) 10%, transparent);
    color: var(--brand);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}

.swap-third-way-search-reopen:hover {
    background: color-mix(in srgb, var(--brand) 18%, transparent);
}

.swap-third-way-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Collapsible 3-way intro (collapsed by default — keeps results visible) */
.swap-third-way-intro {
    flex-shrink: 0;
    border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 4%, var(--surface-soft));
    overflow: hidden;
}

.swap-third-way-intro-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.swap-third-way-intro-toggle::-webkit-details-marker {
    display: none;
}

.swap-third-way-intro-toggle::after {
    content: '›';
    margin-left: auto;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.swap-third-way-intro[open] .swap-third-way-intro-toggle::after {
    transform: rotate(90deg);
}

.third-way-feature-badge--sm {
    font-size: 0.55rem;
    padding: 0.2rem 0.45rem;
    margin: 0;
}

.swap-third-way-intro-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}

.swap-third-way-intro-body {
    padding: 0 0.75rem 0.65rem;
    border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.swap-third-way-lead {
    margin: 0.55rem 0 0.45rem;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--muted);
}

.swap-third-way-flow--compact {
    margin: 0;
    padding: 0.4rem 0.5rem;
    background: var(--surface);
    border-radius: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.swap-third-way-flow--compact .third-way-demo-flow-node {
    font-size: 0.65rem;
    padding: 0.25rem 0.45rem;
}

.swap-third-way-controls {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-shrink: 0;
}

.swap-third-way-field {
    margin: 0;
}

.swap-third-way-field label {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    display: block;
}

.swap-third-way-field select {
    width: 100%;
}

.swap-third-way-filter {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.75rem;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    cursor: pointer;
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--text);
}

.swap-third-way-filter input[type="checkbox"] {
    flex-shrink: 0;
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: var(--brand);
    cursor: pointer;
}

.swap-third-way-filter span {
    flex: 1 1 auto;
    min-width: 0;
}

.swap-third-way-results {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding-top: 0.75rem;
    border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    padding-bottom: 1rem;
}

.swap-third-way-results-head {
    margin-bottom: 0.6rem;
    flex-shrink: 0;
}

.swap-third-way-results-head .map-section-label {
    margin: 0;
    font-size: 0.7rem;
}

.swap-third-way-count {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand);
    white-space: nowrap;
}

.swap-third-way-status {
    margin: 0 0 0.5rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 7%, var(--surface-soft));
    font-size: 0.82rem;
    color: var(--muted);
}

.swap-third-way-pager {
    padding: 0 0 0.6rem;
    margin: 0;
    flex-shrink: 0;
}

.swap-third-way-results-scroll {
    flex: 1 1 auto;
    min-height: 8rem;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.swap-third-way-empty {
    padding: 0.5rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Third-way demo modal — modern shell (no harsh borders) */
.third-way-demo-modal.auth-modal {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.third-way-demo-shell {
    display: flex;
    flex-direction: column;
    max-height: min(94dvh, 58rem);
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(165deg, #ffffff 0%, #f8f5ff 48%, #fdf2f8 100%);
    box-shadow:
        0 28px 80px rgba(15, 23, 42, 0.2),
        0 0 0 1px rgba(124, 58, 237, 0.06);
}

.dark .third-way-demo-shell {
    background: linear-gradient(165deg, #1e293b 0%, #1a1630 50%, #2a1a2e 100%);
    box-shadow:
        0 28px 80px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(167, 139, 250, 0.12);
}

.third-way-demo-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.6rem 0.75rem;
}

.third-way-demo-head h2 {
    margin: 0.35rem 0 0.4rem;
    font-size: clamp(1.4rem, 2.8vw, 1.95rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
}

.third-way-demo-sub {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--muted);
    max-width: 36rem;
}

.third-way-demo-close {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--muted);
    background: color-mix(in srgb, var(--text) 6%, transparent);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.third-way-demo-close:hover {
    background: color-mix(in srgb, var(--brand) 14%, transparent);
    color: var(--brand);
    transform: scale(1.05);
}

.third-way-demo-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.4rem 0.55rem;
    margin: 0 1.6rem 1rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: color-mix(in srgb, var(--brand) 6%, transparent);
}

.third-way-demo-flow-node {
    padding: 0.38rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.third-way-demo-flow-node.is-you {
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 22%, var(--surface)), var(--surface));
    color: var(--brand);
}

.third-way-demo-flow-arrow {
    width: 1.25rem;
    height: 1px;
    background: color-mix(in srgb, var(--brand) 45%, transparent);
    position: relative;
}

.third-way-demo-flow-arrow::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 0.35rem;
    height: 0.35rem;
    border-top: 2px solid var(--brand);
    border-right: 2px solid var(--brand);
    transform: translateY(-50%) rotate(45deg);
}

.third-way-demo-status {
    margin: 0 1.6rem 0.75rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.third-way-demo-status--empty {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}

.third-way-demo-results-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.third-way-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0 1.6rem 0.25rem;
    flex-wrap: wrap;
}

.third-way-pager-mid {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.third-way-pager-counter {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.01em;
}

.third-way-pager-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
}

.third-way-pager-dot {
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: none;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 22%, var(--line));
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.third-way-pager-dot.is-active {
    width: 1.35rem;
    background: var(--gradient);
}

.third-way-pager-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2.25rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
    background: var(--surface);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.third-way-pager-btn:hover:not(:disabled) {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    background: var(--brand-soft);
}

.third-way-pager-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.third-way-pager-btn-label {
    display: none;
}

@media (min-width: 520px) {
    .third-way-pager-btn-label {
        display: inline;
    }
}

.third-way-demo-results {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 0 1.6rem 0.5rem;
    display: grid;
    gap: 1rem;
}

.third-way-demo-loop {
    padding: 1.15rem;
    border-radius: 20px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.07);
}

.dark .third-way-demo-loop {
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.third-way-demo-loop-head {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.third-way-demo-loop-score {
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.third-way-demo-loop-score-label {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
}

.third-way-demo-loop-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.third-way-demo-loop-route {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.third-way-demo-loop-route .third-way-cycle-stop {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    border: 0;
}

.third-way-demo-loop-route .third-way-cycle-stop-media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-soft);
}

.third-way-demo-loop-route .third-way-cycle-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.third-way-demo-loop-route .third-way-cycle-thumb--empty {
    width: 100%;
    height: 100%;
    min-height: 7rem;
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted);
}

.third-way-demo-loop-route .third-way-cycle-stop-body {
    padding: 0.85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.third-way-demo-loop-route .third-way-cycle-role {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--brand);
}

.third-way-demo-loop-route .third-way-cycle-title {
    font-size: 0.95rem;
    line-height: 1.35;
    font-weight: 800;
    color: var(--text);
}

.third-way-demo-loop-route .third-way-cycle-meta {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.third-way-demo-loop-route .third-way-cycle-link {
    margin-top: 0.5rem;
    align-self: flex-start;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 10%, transparent);
    transition: background 0.2s ease;
}

.third-way-demo-loop-route .third-way-cycle-link:hover {
    background: color-mix(in srgb, var(--brand) 18%, transparent);
}

.third-way-demo-loop-route .third-way-cycle-arrow {
    display: none;
}

.third-way-demo-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 1.15rem 1.6rem 1.5rem;
    margin-top: auto;
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    border-top: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
}

.third-way-demo-foot .button {
    flex: 1 1 12rem;
    min-height: 48px;
    border-radius: 14px;
}

.third-way-demo-foot-secondary {
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    color: var(--text);
}

.third-way-demo-foot-secondary:hover {
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    background: var(--brand-soft);
}

@media (min-width: 768px) {
    .third-way-demo-loop-route {
        grid-template-columns: 1fr auto 1fr auto 1fr;
        align-items: stretch;
        gap: 0.5rem;
    }

    .third-way-demo-loop-route .third-way-cycle-arrow {
        display: block;
        align-self: center;
        width: 1.5rem;
        height: 2px;
        background: color-mix(in srgb, var(--brand) 40%, transparent);
        position: relative;
        margin: 0 0.15rem;
    }

    .third-way-demo-loop-route .third-way-cycle-arrow::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        width: 0.4rem;
        height: 0.4rem;
        border-top: 2px solid var(--brand);
        border-right: 2px solid var(--brand);
        transform: translateY(-50%) rotate(45deg);
    }
}

/* Shared third-way results inside full swap modal */
.third-way-approval {
    margin: 0.75rem 0 0.85rem;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    background: color-mix(in srgb, var(--brand) 6%, var(--surface-soft));
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
}

.third-way-approval--complete {
    background: color-mix(in srgb, #22c55e 10%, var(--surface-soft));
    border-color: color-mix(in srgb, #22c55e 35%, var(--line));
}

.third-way-approval-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.45rem;
}

.third-way-approval-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
}

.third-way-approval-fraction {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--brand);
}

.third-way-approval-meter {
    height: 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--line) 60%, transparent);
    overflow: hidden;
    margin-bottom: 0.55rem;
}

.third-way-approval-meter-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--gradient);
    transition: width 0.35s ease;
}

.third-way-approval--complete .third-way-approval-meter-fill {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.third-way-approval-parties {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.third-way-approval-chip {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    border: 1px solid var(--line);
}

.third-way-approval-chip.is-approved {
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
}

.third-way-approval-chip.is-pending {
    opacity: 0.75;
}

.third-way-interest-btn.is-done {
    opacity: 0.85;
}

.swap-modal .third-way-cycle-list {
    display: grid;
    gap: 0.85rem;
    max-height: none;
    overflow: visible;
}

.swap-modal .swap-third-way-loop {
    padding: 1rem;
    border: 0;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
}

.dark .swap-modal .swap-third-way-loop {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.swap-modal .third-way-cycle-score-row {
    margin-bottom: 0.65rem;
}

.swap-modal .third-way-approval {
    margin: 0 0 0.75rem;
}

.swap-modal .swap-third-way-loop-route {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

.swap-modal .swap-third-way-loop-route .third-way-cycle-stop {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface-soft);
    border: 0;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.swap-modal .swap-third-way-loop-route .third-way-cycle-stop-media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: color-mix(in srgb, var(--line) 30%, transparent);
}

.swap-modal .swap-third-way-loop-route .third-way-cycle-thumb {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 0;
    object-fit: cover;
    display: block;
}

.swap-modal .swap-third-way-loop-route .third-way-cycle-thumb--empty {
    width: 100%;
    height: 100%;
    min-height: 5.5rem;
    display: grid;
    place-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--muted);
}

.swap-modal .swap-third-way-loop-route .third-way-cycle-stop-body {
    padding: 0.75rem 0.85rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.swap-modal .swap-third-way-loop-route .third-way-cycle-role {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--brand);
}

.swap-modal .swap-third-way-loop-route .third-way-cycle-title {
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.35;
    color: var(--text);
}

.swap-modal .swap-third-way-loop-route .third-way-cycle-meta {
    margin: 0;
    font-size: 0.76rem;
    color: var(--muted);
}

.swap-modal .swap-third-way-loop-route .third-way-cycle-link {
    margin-top: 0.35rem;
    align-self: flex-start;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 10%, transparent);
}

.swap-modal .swap-third-way-loop-route .third-way-cycle-arrow {
    display: none;
}

.swap-modal .swap-third-way-loop-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0;
}

.swap-modal .swap-third-way-loop-actions .button.primary {
    flex: 1 1 auto;
    min-width: 10rem;
}

@media (min-width: 640px) {
    .swap-modal .swap-third-way-loop-route {
        grid-template-columns: 1fr auto 1fr auto 1fr;
        align-items: stretch;
        gap: 0.4rem;
    }

    .swap-modal .swap-third-way-loop-route .third-way-cycle-arrow {
        display: block;
        align-self: center;
        width: 1.25rem;
        height: 2px;
        background: color-mix(in srgb, var(--brand) 40%, transparent);
        position: relative;
    }

    .swap-modal .swap-third-way-loop-route .third-way-cycle-arrow::after {
        content: '';
        position: absolute;
        right: 0;
        top: 50%;
        width: 0.35rem;
        height: 0.35rem;
        border-top: 2px solid var(--brand);
        border-right: 2px solid var(--brand);
        transform: translateY(-50%) rotate(45deg);
    }
}

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

.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: 9rem; }

/* Continent picker (swap modal) */
.swap-continent-chips {
    margin-bottom: 0.35rem;
}

.swap-continent-chip {
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
    background: var(--surface);
    padding: 0.4rem 0.7rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.swap-continent-chip:hover {
    color: var(--text);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}

.swap-continent-chip.is-active {
    color: var(--brand);
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}

.swap-country-chip.is-continent-hidden {
    display: none !important;
}

.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;
}

/* In swap modal: one scroll on the pane — don’t nest a short results scroller */
.swap-modal-pane[data-swap-pane="find"] .swap-match-list {
    max-height: none;
    overflow-y: visible;
}

.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;
}

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

.landing-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--brand) 14%, var(--surface-soft));
    border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
    color: var(--brand);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 0.75rem;
}

/* ── Landing 2026: bento, glass, scroll reveal ── */
.landing-2026 .section {
    padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.landing-2026 .landing-section {
    padding: clamp(1.75rem, 4vw, 3rem) 0;
    position: relative;
    z-index: 1;
}

.landing-glass {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

@supports (background: color-mix(in srgb, white 50%, transparent)) {
    .landing-glass {
        background: color-mix(in srgb, var(--surface) 88%, transparent);
        border-color: color-mix(in srgb, var(--line) 70%, transparent);
    }

    .dark .landing-glass {
        background: color-mix(in srgb, var(--surface) 82%, transparent);
        border-color: color-mix(in srgb, var(--line) 55%, transparent);
    }
}

@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
    .landing-glass {
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
}

.landing-section-head {
    max-width: 42rem;
    margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.landing-section-head--tight {
    margin-bottom: 0;
}

.landing-section-head--row {
    max-width: none;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
}

.landing-section-title {
    font-size: clamp(1.65rem, 4.5vw, 2.75rem);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 0 0.65rem;
    font-weight: 900;
}

.landing-section-title--light {
    color: #fff;
}

.landing-lead {
    color: var(--muted);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.65;
    max-width: 40rem;
    margin: 0;
}

.landing-lead--light {
    color: color-mix(in srgb, #fff 78%, transparent);
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.landing-actions--compact {
    margin-top: 0.85rem;
}

.landing-checklist {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.landing-checklist li {
    position: relative;
    padding-left: 1.35rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.landing-checklist li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45em;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--gradient);
}

.landing-checklist--muted li::before {
    background: var(--muted);
    opacity: 0.45;
}

.landing-bento {
    display: grid;
    gap: 0.85rem;
}

.landing-bento--stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-stat-cell {
    display: grid;
    gap: 0.2rem;
    padding: 1rem 1.1rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
    background: inherit;
    font: inherit;
    text-align: left;
    width: 100%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

button.landing-stat-cell {
    appearance: none;
}

.landing-stat-cell:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    box-shadow: var(--shadow);
}

.landing-stat-cell--accent {
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--brand) 18%, var(--surface)), color-mix(in srgb, var(--brand-2) 10%, var(--surface)));
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
}

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

.landing-stat-label {
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: -0.02em;
}

.landing-stat-hint {
    font-size: 0.72rem;
    color: var(--muted);
    line-height: 1.35;
}

.landing-flagship {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    align-items: center;
    padding: clamp(1.25rem, 3vw, 2rem);
    overflow: hidden;
    position: relative;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), color-mix(in srgb, var(--brand-2) 8%, var(--surface)));
    border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
}

.landing-flagship::before {
    content: '';
    position: absolute;
    inset: -40% 30% auto -20%;
    height: 80%;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand) 25%, transparent), transparent 68%);
    pointer-events: none;
}

.landing-flagship-copy,
.landing-flagship-visual {
    position: relative;
    z-index: 1;
}

.landing-flagship-copy .landing-actions {
    position: relative;
    z-index: 3;
}

.landing-flagship-copy .button {
    position: relative;
    z-index: 3;
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.landing-orbit {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 370px);
    aspect-ratio: 1.08;
    margin: 0 auto;
    padding: 1rem;
}

.landing-home-node {
    --node-width: clamp(5.5rem, 13vw, 7.25rem);
    position: absolute;
    z-index: 2;
    width: var(--node-width);
    transform: translate(-50%, -50%);
    border: 2px solid color-mix(in srgb, var(--brand) 72%, white);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
    box-shadow:
        0 1rem 2.25rem rgba(124, 58, 237, 0.16),
        0 0 0 6px color-mix(in srgb, var(--brand) 8%, transparent);
}

.landing-home-node--you {
    left: 50%;
    top: 12%;
}

.landing-home-node--b {
    left: 84%;
    top: 80%;
}

.landing-home-node--c {
    left: 16%;
    top: 80%;
}

.landing-home-node img {
    display: block;
    width: 100%;
    height: calc(var(--node-width) / 1.9);
    object-fit: cover;
}

.landing-home-node span {
    display: block;
    padding: 0.28rem 0.4rem 0.32rem;
    overflow: hidden;
    background: color-mix(in srgb, var(--surface) 90%, white);
    color: var(--text);
    font-size: clamp(0.58rem, 1.4vw, 0.72rem);
    font-weight: 900;
    line-height: 1.05;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.landing-home-node--you span {
    color: var(--brand);
}

.landing-orbit-ring {
    position: absolute;
    width: min(100%, 280px);
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px dashed color-mix(in srgb, var(--brand) 35%, var(--line));
    animation: landing-orbit-spin 24s linear infinite;
}

@keyframes landing-orbit-spin {
    to { transform: rotate(360deg); }
}

.landing-orbit-core {
    position: relative;
    z-index: 1;
}

.landing-orbit-tag {
    text-align: center;
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
}

.landing-bento--steps {
    grid-template-columns: 1fr;
}

.landing-step-card {
    padding: 1.35rem 1.4rem;
    display: grid;
    gap: 0.35rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.landing-step-card--featured {
    background:
        linear-gradient(160deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), var(--surface));
    border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
}

.landing-step-num {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.85;
}

.landing-bento--compare {
    grid-template-columns: 1fr;
}

.landing-bento-cell--span-full {
    grid-column: 1 / -1;
}

.landing-compare-card {
    padding: 1.35rem 1.4rem;
    display: grid;
    gap: 0.5rem;
    align-content: start;
}

.landing-compare-card--yes {
    border-color: color-mix(in srgb, var(--good) 35%, var(--line));
    background: color-mix(in srgb, var(--good-soft) 55%, var(--surface));
}

.landing-compare-mark {
    width: 2rem;
    height: 2rem;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    font-weight: 900;
    font-size: 1rem;
}

.landing-compare-mark--yes {
    background: var(--good-soft);
    color: var(--good);
}

.landing-compare-mark--no {
    background: color-mix(in srgb, var(--muted) 12%, var(--surface));
    color: var(--muted);
}

.landing-bento--trust {
    grid-template-columns: 1fr;
}

.landing-trust-card {
    padding: 1.35rem 1.4rem;
    min-height: 10rem;
}

.landing-bento--use {
    grid-template-columns: 1fr;
}

.landing-use-card,
.landing-office-card {
    padding: 1.35rem 1.4rem;
}

.landing-use-card--accent {
    background: linear-gradient(160deg, color-mix(in srgb, var(--brand-2) 10%, var(--surface)), var(--surface));
}

.landing-use-emoji {
    font-size: 1.5rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.landing-office-card {
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, var(--surface)), color-mix(in srgb, #0ea5e9 8%, var(--surface)));
}

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

.landing-listing-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.landing-listing-link {
    display: block;
    color: inherit;
}

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

.landing-listing-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.landing-listing-card:hover .landing-listing-media img {
    transform: scale(1.04);
}

.landing-listing-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 0.65rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    background: linear-gradient(transparent, rgba(15, 23, 42, 0.72));
}

.landing-listing-overlay .chip {
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    border: none;
}

.landing-listing-body {
    padding: 0.85rem 1rem 1rem;
}

.landing-listing-body h3 {
    font-size: 0.95rem;
    margin: 0 0 0.2rem;
    line-height: 1.3;
}

.landing-listing-meta {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.landing-see-all {
    flex-shrink: 0;
    white-space: nowrap;
}

.button.ghost,
.landing-see-all.button.ghost {
    background: transparent;
    border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
    color: var(--brand);
}

.button.ghost:hover {
    background: var(--brand-soft);
}

.landing-cta-band {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 3rem);
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 42%, #db2777 100%);
    border: none;
    color: #fff;
}

.landing-cta-glow {
    position: absolute;
    width: 120%;
    height: 120%;
    top: -30%;
    left: -10%;
    background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.2), transparent 55%);
    pointer-events: none;
}

.landing-cta-band .eyebrow {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    margin-bottom: 0.25rem;
}

.landing-cta-secondary {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.landing-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

/* Sections stay visible without JS; motion is optional enhancement */
.landing-reveal {
    opacity: 1;
    transform: none;
}

html.landing-motion .landing-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

html.landing-motion .landing-reveal.is-visible {
    opacity: 1;
    transform: none;
}

@media (min-width: 768px) {
    .landing-bento--stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.85rem;
    }
}

@media (min-width: 640px) {
    .landing-bento--steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

    .landing-bento--use {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .landing-office-card {
        grid-column: span 2;
    }

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

@media (min-width: 900px) {
    .landing-flagship {
        grid-template-columns: 1.1fr 0.9fr;
    }

    .landing-bento--use {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .landing-office-card {
        grid-column: span 1;
    }

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

@media (prefers-reduced-motion: reduce) {
    html.landing-motion .landing-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .landing-orbit-ring {
        animation: none;
    }

    .landing-flight-bird {
        animation: none;
    }

    .landing-flight-frame {
        animation: none;
    }

    .landing-flight-frame--1 {
        opacity: 1;
    }

    .landing-flight-bird {
        left: 50%;
        top: 12%;
        transform: translate(-50%, -50%) rotate(18deg);
    }
}

/* ── Landing 2026 Modernization ── */

/* Hero shimmer gradient text */
@keyframes landing-shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero h1 .gradient-text {
    background-image: linear-gradient(135deg, #7c3aed, #a855f7, #ec4899, #f472b6, #7c3aed);
    background-size: 300% 100%;
    animation: landing-shimmer 6s ease infinite;
}

/* Floating decorative blobs */
.landing-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
}

.landing-blob--hero-1 {
    width: min(420px, 55vw);
    aspect-ratio: 1;
    background: radial-gradient(circle, #7c3aed 0%, #ec4899 60%, transparent 100%);
    top: -10%;
    right: -8%;
    animation: landing-blob-drift 12s ease-in-out infinite alternate;
}

.landing-blob--hero-2 {
    width: min(320px, 40vw);
    aspect-ratio: 1;
    background: radial-gradient(circle, #0ea5e9 0%, #8b5cf6 60%, transparent 100%);
    bottom: 10%;
    left: -12%;
    animation: landing-blob-drift 14s ease-in-out infinite alternate-reverse;
}

@keyframes landing-blob-drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, -15px) scale(1.08); }
}

/* Hero section upgrades */
.landing-2026 .hero {
    position: relative;
    overflow: visible;
    padding-bottom: 2.5rem;
}

.hero .trust span {
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero .trust span:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
}

/* Social proof counters */
.landing-social-proof {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 2rem 0;
    max-width: 52rem;
    margin: 0 auto;
}

.landing-counter {
    text-align: center;
    padding: 1.5rem 0.75rem;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.landing-counter::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.landing-counter:hover::before { opacity: 0.04; }

.landing-counter-value {
    display: block;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    z-index: 1;
}

.landing-counter-label {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    position: relative;
    z-index: 1;
}

/* Insurance CTA (revenue driver) */
.landing-insurance {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 3rem);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    color: #fff;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: center;
}

.landing-insurance::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    top: -80px;
    right: -60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.4), transparent 70%);
    pointer-events: none;
}

.landing-insurance::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    bottom: -60px;
    left: 10%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.3), transparent 70%);
    pointer-events: none;
}

.landing-insurance-content {
    position: relative;
    z-index: 1;
}

.landing-insurance-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #c4b5fd;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}

.landing-insurance h2 {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 0 0 0.65rem;
    color: #fff;
}

.landing-insurance-sub {
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(0.9rem, 2vw, 1.05rem);
    line-height: 1.6;
    max-width: 34rem;
    margin: 0;
}

.landing-insurance-features {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: grid;
    gap: 0.65rem;
}

.landing-insurance-features li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.landing-insurance-check {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    display: inline-grid;
    place-items: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 900;
}

.landing-insurance-visual {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.landing-insurance-shield {
    width: min(180px, 40vw);
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(124, 58, 237, 0.4));
    animation: landing-shield-float 4s ease-in-out infinite;
}

@keyframes landing-shield-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.landing-insurance .landing-actions {
    margin-top: 1.75rem;
}

.landing-insurance .button.primary {
    background: linear-gradient(135deg, #a855f7, #ec4899);
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.35);
}

.landing-insurance .button.primary:hover {
    background: linear-gradient(135deg, #9333ea, #db2777);
    box-shadow: 0 12px 32px rgba(168, 85, 247, 0.5);
}

.landing-insurance-secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.landing-insurance-secondary:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

@media (min-width: 768px) {
    .landing-insurance {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

/* Upgraded bento stat cells with gradient border on hover */
.landing-stat-cell {
    position: relative;
    overflow: hidden;
}

.landing-stat-cell::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.landing-stat-cell:hover::after { opacity: 1; }

.landing-stat-icon {
    transition: transform 0.3s ease;
}

.landing-stat-cell:hover .landing-stat-icon {
    transform: scale(1.2) rotate(-4deg);
}

/* Animated step number entrance */
@keyframes landing-step-pop {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 0.85; }
}

html.landing-motion .landing-step-card.is-visible .landing-step-num,
html.landing-motion .is-visible .landing-step-card .landing-step-num {
    animation: landing-step-pop 0.5s ease-out both;
}

html.landing-motion .landing-bento--steps .landing-step-card:nth-child(2) .landing-step-num { animation-delay: 0.12s; }
html.landing-motion .landing-bento--steps .landing-step-card:nth-child(3) .landing-step-num { animation-delay: 0.24s; }

/* Step cards: playful hover */
.landing-step-card {
    position: relative;
    overflow: hidden;
}

.landing-step-card::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--gradient);
    opacity: 0;
    top: -40px;
    right: -40px;
    transition: opacity 0.35s ease, transform 0.35s ease;
    filter: blur(40px);
    pointer-events: none;
}

.landing-step-card:hover::before {
    opacity: 0.12;
    transform: translate(-10px, 10px);
}

.landing-flight-bird {
    --bird-width: clamp(3.8rem, 9vw, 5.5rem);
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 12%;
    width: var(--bird-width);
    aspect-ratio: 360 / 280;
    filter: drop-shadow(0 0.85rem 1.1rem rgba(37, 99, 235, 0.18));
    transform-origin: center;
    pointer-events: auto;
    touch-action: manipulation;
    animation: landing-bird-route 7.2s linear infinite;
}

.landing-flight-bird:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--brand) 72%, white);
    outline-offset: 0.35rem;
    border-radius: 999px;
}

.landing-flight-bird:hover {
    filter:
        drop-shadow(0 0.85rem 1.1rem rgba(37, 99, 235, 0.2))
        drop-shadow(0 0 0.65rem rgba(168, 85, 247, 0.18));
}

.landing-flight-frame {
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0;
    animation-duration: 0.56s;
    animation-iteration-count: infinite;
    animation-timing-function: steps(1, end);
}

.landing-flight-frame--1 {
    background-image: url('/img/houseswapp-flight-bird-frame-1.png?v=1');
    animation-name: landing-flight-frame-1;
}

.landing-flight-frame--2 {
    background-image: url('/img/houseswapp-flight-bird-frame-2.png?v=1');
    animation-name: landing-flight-frame-2;
}

.landing-flight-frame--3 {
    background-image: url('/img/houseswapp-flight-bird-frame-3.png?v=1');
    animation-name: landing-flight-frame-3;
}

.landing-flight-frame--4 {
    background-image: url('/img/houseswapp-flight-bird-frame-4.png?v=1');
    animation-name: landing-flight-frame-4;
}

.landing-flight-surprise {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 128%;
    height: 128%;
    object-fit: contain;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: opacity 0.12s ease;
}

.landing-flight-bird.is-surprised {
    animation-play-state: paused;
    filter:
        drop-shadow(0 0.85rem 1.1rem rgba(37, 99, 235, 0.2))
        drop-shadow(0 0 0.75rem rgba(168, 85, 247, 0.22));
}

.landing-flight-bird.is-surprised .landing-flight-frame {
    animation-play-state: paused;
    visibility: hidden;
    opacity: 0;
}

.landing-flight-bird.is-surprised .landing-flight-surprise {
    visibility: visible;
    opacity: 1;
}

@keyframes landing-flight-frame-1 {
    0%,
    24.99%,
    100% { opacity: 1; }

    25%,
    99.99% { opacity: 0; }
}

@keyframes landing-flight-frame-2 {
    0%,
    24.99%,
    50%,
    100% { opacity: 0; }

    25%,
    49.99% { opacity: 1; }
}

@keyframes landing-flight-frame-3 {
    0%,
    49.99%,
    75%,
    100% { opacity: 0; }

    50%,
    74.99% { opacity: 1; }
}

@keyframes landing-flight-frame-4 {
    0%,
    74.99%,
    100% { opacity: 0; }

    75%,
    99.99% { opacity: 1; }
}

@keyframes landing-bird-route {
    0%,
    100% {
        left: 50%;
        top: 11%;
        transform: translate(-50%, -50%) rotate(34deg) scaleX(1);
    }

    16% {
        left: 70%;
        top: 44%;
        transform: translate(-50%, -50%) rotate(38deg) scaleX(1);
    }

    32% {
        left: 84%;
        top: 80%;
        transform: translate(-50%, -50%) rotate(18deg) scaleX(1);
    }

    34% {
        left: 84%;
        top: 80%;
        transform: translate(-50%, -50%) rotate(-2deg) scaleX(-1);
    }

    50% {
        left: 50%;
        top: 83%;
        transform: translate(-50%, -50%) rotate(0deg) scaleX(-1);
    }

    66% {
        left: 16%;
        top: 80%;
        transform: translate(-50%, -50%) rotate(-12deg) scaleX(-1);
    }

    68% {
        left: 16%;
        top: 80%;
        transform: translate(-50%, -50%) rotate(-52deg) scaleX(1);
    }

    84% {
        left: 31%;
        top: 44%;
        transform: translate(-50%, -50%) rotate(-48deg) scaleX(1);
    }
}

.cookie-consent[hidden] {
    display: none;
}

.cookie-consent {
    position: fixed;
    inset: auto 0 0;
    z-index: 90;
    display: flex;
    justify-content: center;
    padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom));
    pointer-events: none;
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.cookie-consent.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-consent-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    width: min(64rem, calc(100vw - 2rem));
    padding: 1.05rem;
    border: 1px solid color-mix(in srgb, var(--brand) 22%, #ffffff);
    border-radius: 22px;
    background:
        radial-gradient(circle at 8% 22%, rgba(124, 58, 237, 0.16), transparent 28%),
        radial-gradient(circle at 92% 82%, rgba(236, 72, 153, 0.12), transparent 34%),
        linear-gradient(135deg, #ffffff 0%, #fbf8ff 58%, #fff7fb 100%);
    box-shadow: 0 1.6rem 4rem rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(18px);
}

.dark .cookie-consent-card {
    border-color: rgba(167, 139, 250, 0.32);
    background:
        radial-gradient(circle at 8% 22%, rgba(167, 139, 250, 0.22), transparent 28%),
        radial-gradient(circle at 92% 82%, rgba(244, 114, 182, 0.16), transparent 34%),
        linear-gradient(135deg, #111827 0%, #151123 58%, #1f1320 100%);
}

.cookie-bird {
    position: relative;
    align-self: center;
    width: clamp(4.5rem, 10vw, 6rem);
    aspect-ratio: 360 / 280;
    filter: drop-shadow(0 0.9rem 1.2rem rgba(37, 99, 235, 0.18));
}

.cookie-bird::after {
    content: '';
    position: absolute;
    left: 20%;
    right: 12%;
    bottom: -0.32rem;
    height: 0.8rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.12);
    filter: blur(8px);
}

.cookie-bird-frame {
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0;
    animation-duration: 0.64s;
    animation-iteration-count: infinite;
    animation-timing-function: steps(1, end);
}

.cookie-bird-frame--1 {
    background-image: url('/img/houseswapp-flight-bird-frame-1.png?v=1');
    animation-name: cookie-bird-frame-1;
}

.cookie-bird-frame--2 {
    background-image: url('/img/houseswapp-flight-bird-frame-2.png?v=1');
    animation-name: cookie-bird-frame-2;
}

.cookie-bird-frame--3 {
    background-image: url('/img/houseswapp-flight-bird-frame-3.png?v=1');
    animation-name: cookie-bird-frame-3;
}

.cookie-bird-frame--4 {
    background-image: url('/img/houseswapp-flight-bird-frame-4.png?v=1');
    animation-name: cookie-bird-frame-4;
}

@keyframes cookie-bird-frame-1 {
    0%,
    24.99%,
    100% { opacity: 1; }

    25%,
    99.99% { opacity: 0; }
}

@keyframes cookie-bird-frame-2 {
    0%,
    24.99%,
    50%,
    100% { opacity: 0; }

    25%,
    49.99% { opacity: 1; }
}

@keyframes cookie-bird-frame-3 {
    0%,
    49.99%,
    75%,
    100% { opacity: 0; }

    50%,
    74.99% { opacity: 1; }
}

@keyframes cookie-bird-frame-4 {
    0%,
    74.99%,
    100% { opacity: 0; }

    75%,
    99.99% { opacity: 1; }
}

.cookie-consent-copy {
    display: grid;
    gap: 0.25rem;
}

.cookie-consent-kicker {
    color: var(--brand);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cookie-consent-copy h2 {
    margin: 0;
    color: var(--text);
    font-size: clamp(1rem, 2vw, 1.28rem);
    line-height: 1.12;
}

.cookie-consent-copy p {
    max-width: 42rem;
    margin: 0;
    color: color-mix(in srgb, var(--muted) 92%, var(--text));
    font-size: 0.86rem;
    line-height: 1.5;
}

.cookie-consent-copy a {
    width: max-content;
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 800;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.55rem;
    align-items: center;
}

.cookie-consent-actions .button {
    white-space: nowrap;
}

@media (max-width: 760px) {
    .cookie-consent {
        padding: 0.75rem;
    }

    .cookie-consent-card {
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.75rem;
        align-items: start;
        border-radius: 18px;
        padding: 0.85rem;
    }

    .cookie-bird {
        width: 4rem;
    }

    .cookie-consent-actions {
        grid-column: 1 / -1;
        width: 100%;
    }

    .cookie-consent-actions .button {
        flex: 1;
        min-width: 0;
        padding-inline: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent {
        transition: none;
    }

    .cookie-bird-frame {
        animation: none;
    }

    .cookie-bird-frame--1 {
        opacity: 1;
    }
}

/* Compare cards: playful tilt */
.landing-compare-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.landing-compare-mark {
    transition: transform 0.3s ease;
}

.landing-compare-card:hover .landing-compare-mark {
    transform: scale(1.15) rotate(-5deg);
}

/* Trust cards: staggered entrance */
html.landing-motion .is-visible .landing-trust-card {
    animation: landing-trust-rise 0.45s ease-out both;
}

html.landing-motion .is-visible .landing-trust-card:nth-child(2) { animation-delay: 0.1s; }
html.landing-motion .is-visible .landing-trust-card:nth-child(3) { animation-delay: 0.2s; }

@keyframes landing-trust-rise {
    0% { opacity: 0; transform: translateY(16px); }
    100% { opacity: 1; transform: none; }
}

.landing-trust-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

/* Use-case cards hover uplift */
.landing-use-card,
.landing-office-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.landing-use-emoji {
    transition: transform 0.3s ease;
}

.landing-use-card:hover .landing-use-emoji {
    transform: scale(1.2) rotate(-6deg);
}

/* Listing cards: better hover with gradient shine */
.landing-listing-card {
    position: relative;
}

.landing-listing-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.landing-listing-card:hover::after { opacity: 0.7; }

/* CTA band: floating shapes */
.landing-cta-band {
    position: relative;
}

.landing-cta-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.12;
    pointer-events: none;
}

.landing-cta-shape--1 {
    width: 120px;
    height: 120px;
    top: -30px;
    right: 10%;
    background: rgba(255, 255, 255, 0.3);
    animation: landing-blob-drift 8s ease-in-out infinite alternate;
}

.landing-cta-shape--2 {
    width: 80px;
    height: 80px;
    bottom: -20px;
    left: 15%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: landing-blob-drift 10s ease-in-out infinite alternate-reverse;
}

.landing-cta-shape--3 {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 5%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 40% 60% 50% 50% / 60% 40% 60% 40%;
    animation: landing-blob-drift 12s ease-in-out infinite alternate;
}

/* Section divider blob */
.landing-section-blob {
    position: relative;
    height: 0;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}

.landing-section-blob::before {
    content: '';
    position: absolute;
    width: min(350px, 50vw);
    aspect-ratio: 1;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.08;
}

.landing-section-blob--purple::before {
    background: var(--brand);
    left: -5%;
    top: -60px;
}

.landing-section-blob--pink::before {
    background: var(--brand-2);
    right: -5%;
    top: -60px;
}

.landing-section-blob--blue::before {
    background: #0ea5e9;
    left: 30%;
    top: -80px;
}

/* Animated counter JS hook */
.landing-counter-value[data-target] {
    transition: none;
}

/* Responsive: social proof */
@media (max-width: 480px) {
    .landing-social-proof {
        gap: 0.6rem;
    }

    .landing-counter {
        padding: 1rem 0.5rem;
    }

    .landing-counter-value {
        font-size: 1.75rem;
    }
}

/* ── Listing Detail Page Modernization ── */

/* 3-way loops preview section */
.detail-loops-section {
    margin-bottom: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 6%, var(--surface)) 0%, color-mix(in srgb, var(--brand-2) 4%, var(--surface)) 100%);
    overflow-x: clip;
    overflow-y: visible;
    position: relative;
}

.detail-loops-section::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    top: -60px;
    right: -40px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand) 15%, transparent), transparent 70%);
    pointer-events: none;
}

.detail-loops-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem 0.75rem;
    position: relative;
    z-index: 1;
}

.detail-loops-head-text h2 {
    font-size: clamp(1.15rem, 3vw, 1.5rem);
    margin: 0.35rem 0 0.25rem;
    letter-spacing: -0.02em;
}

.detail-loops-head-text p {
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
    max-width: 36rem;
}

.detail-loops-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--gradient);
    color: #fff;
}

.detail-loops-cta {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.detail-loops-slider-wrap {
    position: relative;
    z-index: 1;
    padding: 0.75rem 1.5rem 1.5rem;
    overflow: visible;
}

.detail-loops-track {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: none;
    padding-bottom: 0.35rem;
    scroll-padding-inline: 0.5rem;
}
.detail-loops-track::-webkit-scrollbar { display: none; }

.detail-loops-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.65rem;
    padding: 0 0.5rem;
}

.detail-loops-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: color-mix(in srgb, var(--brand) 25%, var(--line));
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.detail-loops-dot.is-active {
    background: var(--brand);
    transform: scale(1.25);
}

.detail-loops-dot:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.detail-loops-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    color: var(--text);
    cursor: pointer;
    transition: opacity .2s, box-shadow .2s;
}
.detail-loops-arrow:hover { box-shadow: var(--shadow-lg); }
.detail-loops-arrow:disabled { opacity: .3; pointer-events: none; }
.detail-loops-arrow--prev { left: 0.25rem; }
.detail-loops-arrow--next { right: 0.25rem; }

@media (max-width: 899px) {
    .detail-loops-slider-wrap {
        padding-inline: 0.5rem 0.5rem;
    }

    .detail-loops-track {
        scroll-snap-type: x mandatory;
        scroll-padding-inline: 0.75rem;
    }

    .detail-loops-arrow {
        width: 2rem;
        height: 2rem;
        box-shadow: var(--shadow-lg);
    }

    .detail-loops-arrow--prev { left: 0.15rem; }
    .detail-loops-arrow--next { right: 0.15rem; }
}

@media (min-width: 640px) {
    .detail-loops-track {
        scroll-padding-inline-start: 0;
    }
}

.detail-loop-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    position: relative;
    min-width: min(420px, 88vw);
    flex: 0 0 min(420px, 88vw);
    scroll-snap-align: center;
    scroll-snap-stop: always;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.detail-loop-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.detail-loop-card:hover::after { opacity: 0.6; }

.detail-loop-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 80px;
}

.detail-loop-triangle {
    width: 80px;
    height: 70px;
}

.detail-loop-path {
    animation: detail-tri-draw 1.5s ease-out 0.2s forwards;
}

@keyframes detail-tri-draw {
    to { stroke-dashoffset: 0; }
}

.detail-loop-score-ring {
    position: relative;
    width: 44px;
    height: 44px;
}

.detail-loop-score-ring svg {
    width: 100%;
    height: 100%;
}

.detail-loop-score-ring span {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.68rem;
    font-weight: 900;
    color: var(--brand);
}

.detail-loop-route {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    align-self: center;
}

.detail-loop-node {
    padding: 0.35rem 0.65rem;
    border-radius: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    min-width: 0;
}

.detail-loop-node--you {
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    border-color: color-mix(in srgb, var(--brand) 25%, var(--line));
}

.detail-loop-node-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.1rem;
}

.detail-loop-node--you .detail-loop-node-label { color: var(--brand); }

.detail-loop-node strong {
    display: block;
    font-size: 0.78rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.detail-loop-arrow {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0.5;
}

.detail-loop-arrow--return {
    color: var(--brand);
    opacity: 0.7;
}

/* Swap matches section */
.detail-matches-section {
    margin-top: 2rem;
}

.detail-matches-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
}

.detail-matches-badge svg {
    color: var(--brand);
}

.detail-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.detail-match-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

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

.detail-match-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.detail-match-card:hover::after { opacity: 0.5; }

.detail-match-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.detail-match-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.detail-match-card:hover .detail-match-media img {
    transform: scale(1.04);
}

.detail-match-media-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brand);
}

.detail-match-score {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: #fff;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.detail-match-body {
    padding: 0.85rem 1rem 1rem;
}

.detail-match-body strong {
    display: block;
    margin: 0.35rem 0 0.15rem;
    font-size: 0.95rem;
    line-height: 1.3;
}

.detail-match-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.detail-match-actions .button {
    flex: 1 1 auto;
    font-size: 0.78rem;
    padding: 0.5rem 0.75rem;
    min-height: auto;
}

/* Similar listings section */
.detail-similar-section {
    margin-top: 2rem;
}

.detail-similar-section h2 {
    margin-bottom: 1.25rem;
}

.detail-similar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.detail-similar-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.detail-similar-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #ede9fe, #fce7f3);
}

.detail-similar-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.detail-similar-card:hover .detail-similar-media img {
    transform: scale(1.04);
}

.detail-similar-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--brand);
}

.detail-similar-chip {
    position: absolute;
    bottom: 0.55rem;
    left: 0.55rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    backdrop-filter: blur(6px);
}

.detail-similar-body {
    padding: 0.75rem 0.9rem 0.9rem;
}

.detail-similar-body h3 {
    font-size: 0.9rem;
    margin: 0 0 0.15rem;
    line-height: 1.3;
}

/* Listing detail: improved trust bar */
.listing-trust-bar {
    position: relative;
    overflow: hidden;
}

.listing-trust-bar::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    top: -60px;
    right: -30px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--brand) 10%, transparent), transparent 70%);
    pointer-events: none;
}

.listing-trust-list li {
    position: relative;
    z-index: 1;
}

/* Listing booking card: subtle gradient top */
.listing-booking-card {
    overflow: visible;
    position: relative;
    flex-shrink: 0;
}

.listing-booking-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Listing detail stat strip: better pills */
.listing-stat-strip li {
    position: relative;
    font-weight: 600;
}

/* Listing detail breadcrumb spacing */
.listing-breadcrumb {
    font-size: 0.82rem;
}

.listing-breadcrumb a {
    transition: color 0.15s ease;
}

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

/* Listing detail chips: modern pill style */
.listing-detail-chips .chip {
    transition: transform 0.15s ease;
}

.listing-detail-chips .chip:hover {
    transform: scale(1.04);
}

/* Loop card: interest UI */
.detail-loop-node-loc {
    display: block;
    font-size: 0.68rem;
    color: var(--muted);
    margin-top: 0.1rem;
}

.detail-loop-interest-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.detail-loop-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.detail-loop-interest {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
}

.detail-loop-parties {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.detail-loop-party {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 600;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    color: var(--muted);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-loop-party.is-approved {
    background: var(--good-soft);
    border-color: color-mix(in srgb, var(--good) 30%, var(--line));
    color: var(--good);
}

.detail-loop-party.is-you {
    border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}

.detail-loop-party.is-you.is-approved {
    background: color-mix(in srgb, var(--brand) 10%, var(--good-soft));
    border-color: color-mix(in srgb, var(--good) 30%, var(--line));
    color: var(--good);
}

.detail-loop-progress {
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.detail-loop-status {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.detail-loop-status--sent {
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
    color: var(--brand);
    border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line));
}

.detail-loop-status--complete {
    background: var(--good-soft);
    color: var(--good);
    border: 1px solid color-mix(in srgb, var(--good) 25%, var(--line));
}

.detail-loop-interest-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.85rem;
    min-height: auto;
}

.detail-loop-card--complete {
    border-color: color-mix(in srgb, var(--good) 30%, var(--line));
    background: color-mix(in srgb, var(--good) 3%, var(--surface));
}

/* Insurance sidebar card */
.detail-insurance-card {
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    background: linear-gradient(145deg, color-mix(in srgb, var(--brand) 5%, var(--surface)), color-mix(in srgb, var(--brand-2) 3%, var(--surface)));
    border: 1px solid color-mix(in srgb, var(--brand) 15%, var(--line));
    flex-shrink: 0;
}

.detail-insurance-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--gradient);
    color: #fff;
    margin-bottom: 0.75rem;
}

.detail-insurance-card h3 {
    font-size: 1rem;
    margin: 0 0 0.25rem;
}

.detail-insurance-card > .meta {
    line-height: 1.5;
    margin-bottom: 0.85rem;
}

.detail-insurance-tiers {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: grid;
    gap: 0.5rem;
}

.detail-insurance-tier {
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    position: relative;
    transition: border-color 0.2s ease;
}

.detail-insurance-tier:hover {
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}

.detail-insurance-tier--popular {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    background: color-mix(in srgb, var(--brand) 4%, var(--surface));
}

.detail-insurance-tier-tag {
    position: absolute;
    top: -0.5rem;
    right: 0.65rem;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: var(--gradient);
    color: #fff;
}

.detail-insurance-tier-name {
    display: block;
    font-weight: 800;
    font-size: 0.85rem;
}

.detail-insurance-tier-desc {
    display: block;
    font-size: 0.72rem;
    line-height: 1.4;
    margin-top: 0.1rem;
}

.detail-insurance-card .button.primary {
    margin-top: 0;
}

/* Responsive: loop cards stacking */
@media (min-width: 900px) {
    .detail-loop-card {
        flex: 0 0 calc(50% - 0.5rem);
        min-width: min(420px, calc(50% - 0.5rem));
        scroll-snap-align: start;
    }
}

@media (max-width: 600px) {
    .detail-loop-card {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        min-width: min(320px, 92vw);
        flex: 0 0 92vw;
        scroll-snap-align: center;
    }

    .detail-loop-visual {
        flex-direction: row;
        width: auto;
    }

    .detail-loop-route {
        gap: 0.25rem;
    }

    .detail-loop-node strong {
        max-width: 140px;
    }

    .detail-loops-slider-wrap {
        padding-inline: 0.75rem;
    }
}

/* 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-bento--steps,
    .landing-bento--compare,
    .landing-bento--trust,
    .landing-bento--use {
        grid-template-columns: 1fr;
    }

    .landing-bento--stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .landing-stat-cell {
        padding: 0.85rem 0.9rem;
    }

    .landing-office-card {
        grid-column: 1;
    }
}

.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;
}

/* ═══════════════════════════════════════════════════════════════════
   SWAP HUB — Match Hub dedicated page
   ═══════════════════════════════════════════════════════════════════ */

/* ── Page shell ── */
.swap-hub-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - var(--header-h, 80px));
}

.swap-hub-header {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 1.1rem 0;
}

.swap-hub-header-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

.swap-hub-title {
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin: 0 0 0.2rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.swap-hub-title-glyph {
    font-size: 1.8rem;
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.swap-hub-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.swap-hub-listing-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.swap-hub-picker-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.hub-listing-select {
    font-size: 0.82rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-family: inherit;
}

/* ── Layout ── */
.swap-hub-layout {
    display: flex;
    gap: 0;
    flex: 1;
    min-height: 0;
    align-items: stretch;
}

/* ── Sidebar ── */
.swap-hub-sidebar {
    flex: 0 0 17rem;
    width: 17rem;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    overflow: hidden;
}

/* My home card */
.hub-my-home {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--line);
    background: color-mix(in srgb, var(--brand) 5%, var(--bg));
    flex-shrink: 0;
}

.hub-my-home-img {
    flex: 0 0 2.6rem;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-soft);
    display: grid;
    place-items: center;
    font-size: 1.3rem;
}

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

.hub-my-home-body {
    min-width: 0;
    flex: 1 1 auto;
}

.hub-my-home-badge {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 0.15rem;
}

.hub-my-home-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-my-home-loc {
    display: block;
    font-size: 0.72rem;
    color: var(--muted);
}

.hub-my-home-empty {
    width: 100%;
    padding: 0.5rem 0;
}

/* Type tabs */
.hub-type-tabs {
    display: flex;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.hub-type-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.55rem 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.hub-type-tab:hover { color: var(--text); }

.hub-type-tab.is-active {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

.hub-type-tab-icon {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hub-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
}

/* Run button area */
.hub-run-area {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.hub-run-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.hub-run-spinner {
    display: none;
    width: 0.9rem;
    height: 0.9rem;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
}

.hub-run-btn.is-loading .hub-run-spinner {
    display: block;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Candidate panels */
.hub-candidate-panel {
    flex: 1 1 auto;
    min-height: 0;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.hub-candidate-panel.is-active { display: flex; }

.hub-loop-filter {
    padding: 0.5rem 0.9rem;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.hub-loop-filter-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

.hub-loop-filter-check input[type="checkbox"] {
    width: 0.9rem;
    height: 0.9rem;
    flex-shrink: 0;
}

/* Candidate list */
.hub-candidate-list {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.4rem 0;
}

.hub-cand-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--muted);
}

.hub-cand-ph-icon {
    font-size: 2rem;
    opacity: 0.3;
}

.hub-cand-placeholder p {
    font-size: 0.78rem;
    margin: 0;
}

/* Single candidate button */
.hub-candidate {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 0.9rem;
    text-align: left;
    background: transparent;
    border: 0;
    border-left: 3px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, border-color 0.12s;
}

.hub-candidate:hover {
    background: color-mix(in srgb, var(--text) 4%, transparent);
}

.hub-candidate.is-active {
    background: color-mix(in srgb, var(--brand) 8%, transparent);
    border-left-color: var(--brand);
}

.hub-cand-img {
    flex: 0 0 2.2rem;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 6px;
    overflow: hidden;
    background: var(--surface-soft);
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.hub-cand-img img,
.hub-cand-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }

.hub-cand-thumb-ph {
    font-size: 0.9rem;
}

.hub-cand-body {
    flex: 1 1 auto;
    min-width: 0;
}

.hub-cand-name {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-cand-loc {
    display: block;
    font-size: 0.68rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-cand-meta {
    display: block;
    font-size: 0.65rem;
    color: var(--muted);
}

.hub-cand-score {
    flex-shrink: 0;
    display: flex;
    align-items: baseline;
    gap: 0;
    font-weight: 800;
    color: var(--score-color, var(--brand));
    font-size: 0.88rem;
    min-width: 2.2rem;
    justify-content: flex-end;
}

.hub-cand-score-pct { font-size: 0.6rem; margin-left: 1px; }

/* Loop candidate thumbs */
.hub-candidate--loop { align-items: flex-start; }

.hub-loop-thumbs {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.hub-loop-thumb {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

.hub-loop-thumb-ph {
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    font-size: 0.85rem;
    background: var(--surface-soft);
    border-radius: 4px;
}

.hub-loop-arr {
    font-size: 0.65rem;
    color: var(--muted);
}

/* ══════════════════════════════
   THE STAGE — visualization area
   ══════════════════════════════ */
.swap-hub-stage {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #0c0c1e;
    overflow: hidden;
    min-height: 520px;
}

/* Background decoration */
.hub-stage-deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hub-stage-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(124, 58, 237, 0.18) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.6;
}

.hub-stage-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    animation: orbFloat 8s ease-in-out infinite alternate;
}

.hub-stage-orb--a {
    width: 28rem;
    height: 28rem;
    background: radial-gradient(circle, rgba(124,58,237,0.25) 0%, transparent 70%);
    top: -8rem;
    right: -6rem;
    animation-duration: 9s;
}

.hub-stage-orb--b {
    width: 22rem;
    height: 22rem;
    background: radial-gradient(circle, rgba(236,72,153,0.2) 0%, transparent 70%);
    bottom: -6rem;
    left: -4rem;
    animation-duration: 11s;
    animation-delay: -3s;
}

.hub-stage-orb--c {
    width: 18rem;
    height: 18rem;
    background: radial-gradient(circle, rgba(168,85,247,0.15) 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation-duration: 7s;
    animation-delay: -5s;
}

@keyframes orbFloat {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(20px, -20px) scale(1.05); }
}

/* ── Panels (states) ── */
.hub-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1;
}

/* hidden attribute must win over display:flex */
.hub-panel[hidden] {
    display: none !important;
}

/* Welcome panel */
.hub-panel-welcome {
    gap: 1rem;
    text-align: center;
}

.hub-welcome-ring {
    width: 7rem;
    height: 7rem;
    border-radius: 50%;
    border: 2px solid rgba(124,58,237,0.35);
    display: grid;
    place-items: center;
    animation: ringPulse 3s ease-in-out infinite;
    position: relative;
}

.hub-welcome-ring::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid rgba(124,58,237,0.15);
    animation: ringPulse 3s ease-in-out infinite 0.5s;
}

.hub-welcome-ring-inner {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(124,58,237,0.3), rgba(236,72,153,0.3));
    display: grid;
    place-items: center;
    border: 1px solid rgba(124,58,237,0.3);
}

.hub-welcome-glyph {
    font-size: 2rem;
    background: linear-gradient(135deg, #a78bfa, #f9a8d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes ringPulse {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.04); }
}

.hub-welcome-h {
    font-size: 1.3rem;
    font-weight: 800;
    color: #f0e8ff;
    margin: 0;
    letter-spacing: -0.02em;
}

.hub-welcome-p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    margin: 0;
    max-width: 24rem;
}

.hub-welcome-trigger {
    margin-top: 0.5rem;
}

/* Loading panel */
.hub-panel-loading {
    gap: 1.5rem;
}

.hub-loading-vis {
    position: relative;
    width: 7rem;
    height: 7rem;
    display: grid;
    place-items: center;
}

.hub-loading-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(124,58,237,0.5);
    animation: loadPulse 2s ease-out infinite;
}

.hub-loading-pulse--2 { animation-delay: 0.5s; }
.hub-loading-pulse--3 { animation-delay: 1s; }

@keyframes loadPulse {
    0%   { transform: scale(0.3); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.hub-loading-glyph {
    font-size: 2rem;
    color: #a78bfa;
    animation: spin 2s linear infinite;
}

.hub-loading-txt {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    margin: 0;
}

/* Empty panel */
.hub-panel-empty {
    gap: 0.75rem;
    text-align: center;
}

.hub-empty-icon { font-size: 2.5rem; }

.hub-empty-h {
    color: #f0e8ff;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.hub-empty-p {
    color: rgba(255,255,255,0.45);
    font-size: 0.85rem;
    margin: 0;
}

/* ── Direct swap panel ── */
.hub-panel-direct,
.hub-panel-loop {
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.25rem 1.5rem 1.25rem;
    gap: 1rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Top bar: type badge + score */
.hub-panel-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.hub-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(124,58,237,0.2);
    border: 1px solid rgba(124,58,237,0.35);
    color: #c4b5fd;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hub-type-pill--loop {
    background: rgba(236,72,153,0.15);
    border-color: rgba(236,72,153,0.3);
    color: #f9a8d4;
}

/* Score ring */
.hub-score-ring {
    position: relative;
    width: 3.5rem;
    height: 3.5rem;
    display: grid;
    place-items: center;
}

.hub-score-ring svg {
    width: 100%;
    height: 100%;
}

.hub-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,0.1);
    stroke-width: 5;
}

.hub-ring-fill {
    fill: none;
    stroke: #22c55e;
    stroke-width: 5;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.05s linear, stroke 0.3s;
}

.hub-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub-ring-val {
    font-size: 0.7rem;
    font-weight: 800;
    color: #f0e8ff;
    line-height: 1;
}

.hub-ring-pct {
    font-size: 0.5rem;
    color: rgba(255,255,255,0.5);
    margin-left: 1px;
    align-self: flex-start;
    margin-top: 1px;
}

/* ── Arena: two home cards + connection ── */
.hub-arena {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

/* Home card */
.hub-home-card {
    flex: 1 1 0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hub-home-card--you {
    border-color: rgba(124,58,237,0.4);
    box-shadow: 0 0 20px rgba(124,58,237,0.15), inset 0 1px 0 rgba(124,58,237,0.2);
}

.hub-home-card--them {
    border-color: rgba(236,72,153,0.3);
    box-shadow: 0 0 20px rgba(236,72,153,0.12), inset 0 1px 0 rgba(236,72,153,0.15);
}

.hub-home-card-crown {
    padding: 0.45rem 0.75rem;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a78bfa;
    background: rgba(124,58,237,0.12);
    border-bottom: 1px solid rgba(124,58,237,0.2);
}

.hub-home-card-crown--them {
    color: #f9a8d4;
    background: rgba(236,72,153,0.1);
    border-bottom-color: rgba(236,72,153,0.15);
}

.hub-home-card-photo {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    display: grid;
    place-items: center;
    font-size: 2.5rem;
}

.hub-home-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hub-home-card-info {
    padding: 0.7rem 0.85rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1 1 auto;
}

.hub-home-card-name {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #f0e8ff;
    line-height: 1.3;
}

.hub-home-card-city {
    display: block;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
}

.hub-home-card-stats {
    display: block;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
}

.hub-home-card-cta {
    display: block;
    padding: 0.5rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #a78bfa;
    text-align: right;
    border-top: 1px solid rgba(255,255,255,0.06);
    transition: color 0.15s;
    text-decoration: none;
}

.hub-home-card-cta--them { color: #f9a8d4; }

.hub-home-card-cta:hover { color: #fff; }

/* Connection SVG */
.hub-connection {
    flex: 0 0 12rem;
    width: 12rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.25rem;
}

.hub-connection-svg {
    width: 100%;
    height: auto;
    display: block;
}

.hub-connection-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
}

/* Match reasons */
.hub-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    flex-shrink: 0;
}

.hub-reason-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(124,58,237,0.15);
    border: 1px solid rgba(124,58,237,0.3);
    color: #c4b5fd;
    font-size: 0.72rem;
    font-weight: 600;
    animation: chipPop 0.3s ease both;
}

@keyframes chipPop {
    from { opacity: 0; transform: scale(0.85) translateY(4px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Action bar */
.hub-action-bar {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.hub-action-bar .button {
    border-color: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.07);
    font-size: 0.82rem;
}

.hub-action-bar .button:hover {
    border-color: rgba(255,255,255,0.35);
    color: #fff;
    background: rgba(255,255,255,0.12);
}

.hub-action-bar .button.primary {
    background: linear-gradient(135deg, #7c3aed, #a21caf);
    border-color: transparent;
    color: #fff;
}

.hub-action-bar .button.primary:hover {
    background: linear-gradient(135deg, #6d28d9, #86198f);
}

.hub-interested-btn.is-done {
    background: rgba(34,197,94,0.15) !important;
    border-color: rgba(34,197,94,0.35) !important;
    color: #86efac !important;
}

/* Loop score pill */
.hub-loop-score-pill {
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    padding: 0.3rem 0.7rem;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* ── Triangle visualization ── */
.hub-panel-loop {
    justify-content: flex-start;
    overflow-y: auto;
}

.hub-triangle {
    position: relative;
    width: 100%;
    max-width: 28rem;
    align-self: center;
    flex-shrink: 0;
}

.hub-tri-svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Triangle node cards */
.hub-tri-node {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 0.55rem 0.7rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 9rem;
    transition: box-shadow 0.2s;
}

.hub-tri-node--top {
    top: -1%;
    left: 50%;
    transform: translateX(-50%);
    border-color: rgba(124,58,237,0.45);
    box-shadow: 0 0 16px rgba(124,58,237,0.2);
}

.hub-tri-node--bl {
    bottom: 5%;
    left: 2%;
    border-color: rgba(124,58,237,0.3);
}

.hub-tri-node--br {
    bottom: 5%;
    right: 2%;
    border-color: rgba(236,72,153,0.35);
}

.hub-tri-photo {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.hub-tri-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hub-tri-info {
    min-width: 0;
}

.hub-tri-role {
    display: block;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #a78bfa;
    margin-bottom: 0.1rem;
}

.hub-tri-role--you { color: #a78bfa; }

.hub-tri-name {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #f0e8ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 6rem;
}

.hub-tri-loc {
    display: block;
    font-size: 0.62rem;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 6rem;
}

.hub-tri-view-btn {
    display: none; /* shown on hover if needed */
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
}

.hub-tri-node:hover .hub-tri-view-btn { display: inline; }

/* Center score orb */
.hub-tri-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,58,237,0.4) 0%, rgba(124,58,237,0.1) 100%);
    border: 1px solid rgba(124,58,237,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(124,58,237,0.4);
    animation: orbPulse 3s ease-in-out infinite;
}

@keyframes orbPulse {
    0%, 100% { box-shadow: 0 0 16px rgba(124,58,237,0.3); }
    50%       { box-shadow: 0 0 30px rgba(124,58,237,0.6); }
}

.hub-tri-orb-val {
    font-size: 0.75rem;
    font-weight: 900;
    color: #c4b5fd;
    line-height: 1;
}

.hub-tri-orb-lbl {
    font-size: 0.5rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ── Responsive ── */
@media (max-width: 860px) {
    .hub-connection {
        flex: 0 0 6rem;
        width: 6rem;
    }
    .hub-panel-direct,
    .hub-panel-loop {
        padding: 1rem;
    }
}

@media (max-width: 700px) {
    .swap-hub-layout {
        flex-direction: column;
    }
    .swap-hub-sidebar {
        width: 100%;
        flex: 0 0 auto;
        max-height: 55vw;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .swap-hub-stage {
        min-height: 420px;
        flex: 1 1 auto;
    }
    .hub-arena {
        flex-direction: column;
    }
    .hub-home-card {
        flex: none;
        width: 100%;
    }
    .hub-connection {
        flex: none;
        width: 4rem;
        transform: rotate(90deg);
        margin: 0.3rem 0;
    }
    .hub-triangle {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .swap-hub-header-inner {
        gap: 0.6rem;
    }
    .swap-hub-title {
        font-size: 1.15rem;
    }
    .hub-panel-direct,
    .hub-panel-loop {
        padding: 0.75rem;
        gap: 0.7rem;
    }
    .hub-type-pill {
        font-size: 0.68rem;
        padding: 0.25rem 0.55rem;
    }
}

/* ── Mobile: sidebar collapses to a compact horizontal top bar ──────────── */
@media (max-width: 600px) {
    /* Stack body vertically: nav on top, content below */
    .swap-modal-body {
        flex-direction: column;
    }

    .swap-modal-nav {
        width: 100%;
        flex-direction: row;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .swap-modal-nav::-webkit-scrollbar {
        display: none;
    }

    /* Compact horizontal step buttons */
    .swap-step {
        flex: 1 1 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.15rem;
        padding: 0.55rem 0.4rem;
        font-size: 0.65rem;
        border-left: 0;
        border-bottom: 2px solid transparent;
        border-radius: 0;
        white-space: nowrap;
        text-align: center;
    }

    .swap-step.is-active {
        border-left-color: transparent;
        border-bottom-color: var(--brand);
    }

    .swap-step-icon {
        font-size: 1.05rem;
        opacity: 1;
    }

    /* Pane fills remaining height and scrolls */
    .swap-modal-content {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        position: relative;
    }

    .swap-modal-pane {
        position: absolute;
        inset: 0;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .swap-modal-pane--third-way.is-active {
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    /* Reduce chrome padding slightly */
    .swap-modal-chrome {
        padding: 0.8rem 1rem;
    }

    /* Reduce inner pane padding for more content space */
    .swap-pane-inner {
        padding: 0.85rem 1rem 1.25rem;
    }
}

/* ── Mobile modal adjustments (very small screens) ───────────────────────── */
@media (max-width: 400px) {
    .swap-step {
        font-size: 0.6rem;
        padding: 0.5rem 0.25rem;
    }

    /* Demo modal shell tighter radius on small screens */
    .third-way-demo-shell {
        border-radius: 20px;
    }
}
