/* 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);
}

@media (min-width: 768px) {
    .topbar {
        transition: transform 0.28s ease, box-shadow 0.28s ease;
        will-change: transform;
    }

    .topbar.is-scroll-hidden {
        transform: translateY(calc(-100% - var(--safe-top)));
        box-shadow: none;
        pointer-events: none;
    }
}

.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 {
    --brand-logo-size: 44px;
    width: var(--brand-logo-size);
    height: calc(var(--brand-logo-size) * 280 / 360);
    flex-shrink: 0;
    display: block;
    position: relative;
    aspect-ratio: 360 / 280;
    filter: drop-shadow(0 0.45rem 0.7rem color-mix(in srgb, var(--brand) 12%, transparent));
}

.topbar .brand-logo {
    --brand-logo-size: 44px;
}

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

.site-footer-logo .brand-bird-frame {
    animation-delay: 2.5s;
}

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

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

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

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

@keyframes brand-bird-frame-1 {
    0%, 2.85% { opacity: 1; }
    2.86%, 11.42% { opacity: 0; }
    11.43%, 14.28% { opacity: 1; }
    14.29%, 22.85% { opacity: 0; }
    22.86%, 100% { opacity: 1; }
}

@keyframes brand-bird-frame-2 {
    0%, 2.85% { opacity: 0; }
    2.86%, 5.71% { opacity: 1; }
    5.72%, 14.28% { opacity: 0; }
    14.29%, 17.14% { opacity: 1; }
    17.15%, 100% { opacity: 0; }
}

@keyframes brand-bird-frame-3 {
    0%, 5.71% { opacity: 0; }
    5.72%, 8.57% { opacity: 1; }
    8.58%, 17.14% { opacity: 0; }
    17.15%, 20% { opacity: 1; }
    20.01%, 100% { opacity: 0; }
}

@keyframes brand-bird-frame-4 {
    0%, 8.57% { opacity: 0; }
    8.58%, 11.42% { opacity: 1; }
    11.43%, 20% { opacity: 0; }
    20.01%, 22.85% { opacity: 1; }
    22.86%, 100% { opacity: 0; }
}

.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 color-mix(in srgb, var(--brand) 28%, transparent);
}

.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: var(--brand);
}

.nav-desktop a.nav-discover-link {
    background: var(--gradient);
    color: #fff !important;
    font-weight: 800;
    letter-spacing: -0.01em;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.28);
}

.nav-desktop a.nav-discover-link:hover,
.nav-desktop a.nav-discover-link.is-active {
    background: var(--gradient-vivid);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.38);
}
.dark .nav-desktop a:hover,
.dark .nav-desktop a.is-active {
    color: var(--brand);
}

.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% - 6.75rem);
        gap: 0.4rem;
    }

    /* 79px — mobile header logo */
    .topbar .brand .brand-logo.brand-bird {
        --brand-logo-size: 79px;
        width: 79px !important;
        height: calc(79px * 280 / 360) !important;
        min-width: 79px;
    }

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

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

@media (max-width: 430px) {
    .topbar .brand .brand-logo.brand-bird {
        --brand-logo-size: 72px;
        width: 72px !important;
        height: calc(72px * 280 / 360) !important;
        min-width: 72px;
    }

    .brand-name {
        font-size: 0.85rem;
        letter-spacing: -0.025em;
        background-image: none;
        -webkit-background-clip: unset;
        background-clip: unset;
        -webkit-text-fill-color: var(--text);
        color: var(--text);
    }
}

/* ── Narrow phones: 360px and below (e.g. Samsung Fold folded, small Androids) ── */
@media (max-width: 360px) {
    :root {
        --page-pad-x: 0.6rem;
        --header-h: 60px;
    }

    .topbar .brand .brand-logo.brand-bird {
        --brand-logo-size: 64px;
        width: 64px !important;
        height: calc(64px * 280 / 360) !important;
        min-width: 64px;
    }

    .brand {
        gap: 0.3rem;
        margin-right: 0.15rem;
    }

    /* Re-enable brand name — login button is hidden so there's room */
    .brand-name {
        display: block;
        font-size: 0.88rem;
        letter-spacing: -0.025em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        background-image: none;
        -webkit-background-clip: unset;
        background-clip: unset;
        -webkit-text-fill-color: var(--text);
        color: var(--text);
    }

    /* Login button already lives in the hamburger drawer — hide it up top */
    .nav-auth-login {
        display: none !important;
    }

    .nav-actions {
        gap: 0.15rem;
        flex-shrink: 0;
    }

    .brand {
        max-width: calc(100% - 5.5rem);
    }

    .nav-theme-toggle,
    .nav-toggle {
        width: 2.35rem;
        height: 2.35rem;
        border-radius: 12px;
    }
}

/* ── Ultra-narrow (Galaxy Fold folded ≈ 280px) ─────────────────────────── */
@media (max-width: 300px) {
    :root {
        --page-pad-x: 0.4rem;
        --header-h: 56px;
    }

    .topbar .brand .brand-logo.brand-bird {
        --brand-logo-size: 58px;
        width: 58px !important;
        height: calc(58px * 280 / 360) !important;
        min-width: 58px;
    }

    .brand-name {
        font-size: 0.8rem;
        -webkit-text-fill-color: var(--text);
        color: var(--text);
    }

    .brand {
        max-width: calc(100% - 5rem);
    }

    .nav-theme-toggle,
    .nav-toggle {
        width: 2.1rem;
        height: 2.1rem;
    }
}

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

.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.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);
    flex-shrink: 0;
}

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

.theme-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.theme-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

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

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

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

.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-link-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.8rem 0.9rem;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    color: var(--text);
    background: transparent;
    cursor: pointer;
}

.mobile-drawer-link-btn: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: flex-start;
}

.mobile-drawer-pref-row--lang .locale-switcher--drawer {
    margin-top: 0;
    width: fit-content;
    max-width: 100%;
}

.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: inline-flex;
    flex-wrap: nowrap;
    gap: 2px;
    width: fit-content;
    max-width: 100%;
    margin-top: 0.5rem;
}

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 color-mix(in srgb, var(--brand) 25%, transparent);
}

.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 color-mix(in srgb, var(--brand) 30%, transparent);
}

.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: color-mix(in srgb, var(--brand) 28%, white);
}

.page-hero-wrap::after {
    width: 400px;
    height: 400px;
    top: 0;
    right: -100px;
    background: color-mix(in srgb, var(--brand-2) 28%, white);
}

.dark .page-hero-wrap::before { background: color-mix(in srgb, var(--brand) 40%, transparent); }
.dark .page-hero-wrap::after { background: color-mix(in srgb, var(--brand-2) 25%, transparent); }

.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: var(--brand);
    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: color-mix(in srgb, var(--brand) 50%, #fff); }

.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: var(--brand);
    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: var(--brand);
    background: color-mix(in srgb, var(--brand) 12%, transparent);
}

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

.hero-media img {
    width: 100%;
    height: auto;
    min-height: clamp(300px, 58vw, 400px);
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    flex: 0 0 auto;
}

.hero-panel {
    position: static;
    width: 100%;
    margin: 0;
    background: var(--surface);
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    padding: 1.35rem 1.45rem 1.5rem;
    backdrop-filter: none;
    box-shadow: none;
}

.hero-panel strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1.3;
    margin-bottom: 0.45rem;
}

.hero-panel .meta {
    font-size: 0.98rem;
    line-height: 1.55;
}

.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, color-mix(in srgb, var(--brand) 20%, white), color-mix(in srgb, var(--brand-2) 20%, white));
    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: var(--brand);
    background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--brand-2) 12%, white));
}

.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: var(--brand);
    border: 1px solid color-mix(in srgb, var(--brand) 16%, var(--line));
    font-size: 0.75rem;
    font-weight: 800;
}

.dark .chip {
    background: color-mix(in srgb, var(--brand) 14%, var(--surface));
    color: var(--text);
    border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
}

.dark .chip-accent {
    background: color-mix(in srgb, var(--brand) 22%, var(--surface));
    color: color-mix(in srgb, var(--brand) 45%, var(--text));
    border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
}

.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) ── */
body.map-page {
    overflow: hidden;
    padding-bottom: 0;
    --map-mobile-bar-h: 3.25rem;
    --map-toolbar-top: calc(var(--header-h) + var(--safe-top) + 0.5rem + 48px);
    --map-top-toolbar-offset: calc(var(--map-mobile-bar-h) + 0.85rem + 48px);
    --map-fab-size: 42px;
    --map-fab-gap: 0.5rem;
    --map-fab-bottom: calc(0.75rem + var(--safe-bottom));
}

.map-shell {
    height: calc(100dvh - var(--header-h) - var(--safe-top));
    min-height: 0;
    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: 0;
    height: 100%;
    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-mobile-bar {
        left: 50%;
        right: auto;
        width: calc(100% - 1.5rem);
        max-width: 24rem;
        transform: translateX(-50%);
        justify-content: center;
    }

    .map-mobile-bar .map-mobile-toggle {
        flex: 1 1 0;
        padding: 0 0.7rem;
        font-size: 0.8125rem;
    }

    .map-canvas-wrap .mapboxgl-ctrl-bottom-left {
        bottom: calc(20px + var(--safe-bottom));
        left: 0.5rem;
    }

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

    .map-panel-list.is-open,
    .map-panel-filters.is-open {
        touch-action: pan-y;
    }

    .map-shell--panel-open .map-canvas-wrap {
        touch-action: none;
        pointer-events: none;
    }
}

body.map-panel-open {
    overflow: hidden;
    overscroll-behavior: none;
}

@media (max-width: 899px) {
    body.map-panel-open .map-mobile-bar {
        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;
    min-height: 0;
    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;
    left: 50%;
    right: auto;
    top: var(--map-toolbar-top);
    bottom: auto;
    transform: translateX(-50%);
    z-index: 1090;
    gap: 0.45rem;
    align-items: center;
    width: calc(100% - 1.5rem);
    max-width: 24rem;
    justify-content: center;
    pointer-events: none;
    isolation: isolate;
    padding: 0;
}

.map-mobile-bar .map-mobile-toggle {
    pointer-events: auto;
    position: relative;
    z-index: 1;
    min-height: var(--touch-min);
    flex: 1 1 0;
    justify-content: center;
}

.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 color-mix(in srgb, var(--brand) 35%, transparent);
}

.map-mobile-toggle.map-mobile-toggle-filters,
.map-edge-toggle--filters {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid color-mix(in srgb, #0f172a 12%, #ffffff);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.map-mobile-toggle.map-mobile-toggle-filters:hover,
.map-edge-toggle--filters:hover {
    background: #ffffff;
    color: #0f172a;
    opacity: 0.94;
}

.map-edge-toggle--filters .map-edge-toggle-icon {
    color: #0f172a;
}

html.dark .map-mobile-toggle.map-mobile-toggle-filters,
html.dark .map-edge-toggle--filters,
.dark .map-mobile-toggle.map-mobile-toggle-filters,
.dark .map-edge-toggle--filters {
    background: #ffffff;
    color: #0f172a;
    border-color: rgba(255, 255, 255, 0.42);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

html.dark .map-edge-toggle--filters .map-edge-toggle-icon,
.dark .map-edge-toggle--filters .map-edge-toggle-icon {
    color: #0f172a;
}

.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-list.is-open .map-panel-head-actions,
    .map-panel-filters.is-open .map-panel-head-actions {
        margin-top: 33px;
    }

    .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 0%;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.map-panel-filters-scroll {
    flex: 1 1 0%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem 0.85rem 0.5rem;
}

.map-panel-filters-footer {
    flex-shrink: 0;
    padding: 0.65rem 0.85rem calc(0.85rem + var(--safe-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
}

.map-panel-filters-footer .map-filter-compact-row {
    margin-top: 0;
    margin-bottom: 0.55rem;
}

.map-panel-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: contain;
}

.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-hint {
    margin: 0 0.5rem 0.45rem;
    font-size: 0.72rem;
    line-height: 1.35;
}

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

.map-filter-compact-row .map-chip {
    font-size: 0.7rem;
    padding: 0.45rem 0.7rem;
}

.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 0%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0.65rem calc(0.65rem + var(--safe-bottom, 0px));
    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: calc(var(--map-detail-panel-h, calc(12rem + 40px)) + var(--safe-bottom, 0px));
}

.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-wrap input,
.map-search-field {
    width: 100%;
    box-sizing: border-box;
    padding: 0.62rem 0.9rem 0.62rem 2.5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.map-search-wrap input:focus,
.map-search-field:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}

.map-search-wrap input::placeholder,
.map-search-field::placeholder {
    color: var(--muted);
}

.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-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;
    padding-bottom: 0;
}

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

.map-sort {
    flex: 1;
    min-height: var(--touch-min, 44px);
    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: var(--brand-soft);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    color: var(--brand);
}

.dark .map-sort.is-active { background: color-mix(in srgb, var(--brand) 20%, transparent); color: var(--brand-soft); }

.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: color-mix(in srgb, var(--brand) 40%, var(--line));
    transform: translateX(2px);
}

.map-home-card.is-selected .map-home-open {
    background: #fff;
    border-color: var(--brand-mid);
}

.map-home-card:hover {
    border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
    box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 12%, transparent);
}

.map-home-card.is-selected {
    border-color: var(--brand-mid);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent);
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 6%, var(--surface)), color-mix(in srgb, var(--brand-2) 4%, var(--surface)));
}

.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: 10;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: calc(12rem + 40px);
    max-height: min(62dvh, 22.5rem);
    overflow: hidden;
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.14);
}

.map-detail-layout {
    display: grid;
    grid-template-columns: 4.25rem 1fr;
    gap: 0.5rem;
    flex: 1 1 0;
    padding: 0.5rem 0.65rem 0.4rem;
    padding-top: 1.65rem;
    padding-right: 2.25rem;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.map-detail-layout-compact {
    align-items: start;
}

.map-detail-thumb-link {
    display: block;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
}

.map-detail-thumb {
    width: 72px;
    height: 72px;
    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.1rem 0 0;
    font-size: 0.88rem;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.map-detail-content .meta,
.map-detail-content .map-home-meta,
.map-detail-photo-count {
    margin: 0.1rem 0 0;
    font-size: 0.72rem;
    line-height: 1.35;
}

.map-detail-host .map-home-host {
    margin: 0.1rem 0 0;
    font-size: 0.72rem;
    line-height: 1.35;
}

.map-detail-actions {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 0.65rem calc(0.65rem + var(--safe-bottom, 0px));
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.08);
}

.map-detail-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.25rem;
    margin: 0;
    padding: 0.45rem 0.65rem;
    font-size: 0.78rem;
    text-align: center;
    text-decoration: none;
}

.map-detail-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.map-detail-action-row .button {
    flex: 1 1 calc(33.333% - 0.35rem);
    min-width: 0;
    margin: 0;
    padding: 0.42rem 0.35rem;
    font-size: 0.65rem;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
}

.map-detail-content .button { margin-top: 0; padding: 0.35rem 0.55rem; font-size: 0.72rem; }

@media (max-width: 899px) {
    .map-detail-host-badges {
        display: flex;
        flex-wrap: wrap;
        gap: 0.2rem;
        margin: 0.2rem 0 0;
    }

    .map-detail-host .host-trust-badge {
        font-size: 0.6rem;
        padding: 0.12rem 0.38rem;
    }
}

#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-rating {
    margin-bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    background: #fff;
    color: #78350f;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1.5px solid #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.28);
    white-space: nowrap;
    pointer-events: none;
}

.hm-rating-star {
    color: #f59e0b;
    font-size: 0.72rem;
    line-height: 1;
}

.hm-badge {
    margin-top: 4px;
    background: var(--gradient);
    background-color: var(--brand);
    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;
}

.hm-badge.is-hidden {
    display: none;
}

.hm-badge--rich {
    max-width: 132px;
    white-space: normal;
    text-align: center;
    padding: 4px 9px;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}

.hm-badge-title {
    display: block;
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.hm-badge-value {
    display: block;
    font-size: 10px;
    font-weight: 800;
    opacity: 0.92;
}

.hm-wrap.is-selected .hm-ring {
    box-shadow:
        0 0 0 3px color-mix(in srgb, var(--brand) 40%, transparent),
        0 8px 22px rgba(15, 23, 42, 0.28);
}

.hm-wrap.is-selected .hm-badge {
    background: var(--text);
    background-color: var(--text);
    max-width: 148px;
}

/* 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;
}

.mapboxgl-marker .hm-rating {
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    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);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

.mapboxgl-popup-tip {
    border-width: 8px;
}

.mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
    border-bottom-color: var(--surface);
}

.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
.mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
    border-top-color: var(--surface);
}

.mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
    border-right-color: var(--surface);
}

.mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
    border-left-color: var(--surface);
}

.mapboxgl-popup-close-button {
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.35rem 0.55rem;
    right: 0.15rem;
    top: 0.1rem;
}

.mapboxgl-popup-close-button:hover {
    color: var(--text);
    background: transparent;
}

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

.map-popup-img--empty {
    background: linear-gradient(135deg, var(--brand-soft), color-mix(in srgb, var(--brand-2) 15%, white));
}

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

.map-popup-body strong {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
    line-height: 1.3;
}

.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: var(--brand);
    text-decoration: none;
}

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

.dark .mapboxgl-popup-content {
    background: var(--surface);
    border-color: color-mix(in srgb, var(--line) 85%, transparent);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
    color: #fff;
}

.dark .mapboxgl-popup-anchor-top .mapboxgl-popup-tip,
.dark .mapboxgl-popup-anchor-top-left .mapboxgl-popup-tip,
.dark .mapboxgl-popup-anchor-top-right .mapboxgl-popup-tip {
    border-bottom-color: var(--surface);
}

.dark .mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip,
.dark .mapboxgl-popup-anchor-bottom-left .mapboxgl-popup-tip,
.dark .mapboxgl-popup-anchor-bottom-right .mapboxgl-popup-tip {
    border-top-color: var(--surface);
}

.dark .mapboxgl-popup-anchor-left .mapboxgl-popup-tip {
    border-right-color: var(--surface);
}

.dark .mapboxgl-popup-anchor-right .mapboxgl-popup-tip {
    border-left-color: var(--surface);
}

.dark .mapboxgl-popup-close-button {
    color: #fff;
    opacity: 0.92;
}

.dark .mapboxgl-popup-close-button:hover {
    color: #fff;
    opacity: 1;
}

.dark .map-popup-img--empty {
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 28%, #0f172a), #0f172a);
}

.dark .map-popup-body,
.dark .map-popup-body strong,
.dark .map-popup-body p,
.dark .map-popup-cta {
    color: #fff;
}

.dark .map-popup-cta:hover {
    color: #fff;
    opacity: 0.88;
}

.dark .map-detail-panel {
    background: var(--surface);
    border-top-color: color-mix(in srgb, var(--line) 85%, transparent);
    box-shadow: 0 -16px 40px rgba(0, 0, 0, 0.5);
}

.dark .map-detail-content h3,
.dark .map-detail-content .eyebrow,
.dark .map-detail-photo-count {
    color: var(--text);
}

.dark .map-detail-content .meta,
.dark .map-detail-content .map-home-meta {
    color: var(--muted);
}

.dark .map-detail-preview-cell {
    background: var(--surface-2);
}

.dark .map-host-verified {
    color: #6ee7b7;
}

.map-locate-fab {
    position: fixed;
    top: auto;
    right: 0.75rem;
    bottom: calc(var(--map-fab-bottom) + var(--map-fab-size) + var(--map-fab-gap));
    z-index: 1086;
    width: var(--map-fab-size);
    height: var(--map-fab-size);
    padding: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    background: var(--surface);
}

.map-pitch-toggle {
    position: fixed;
    right: 0.75rem;
    bottom: var(--map-fab-bottom);
    z-index: 1085;
    min-width: 42px;
    height: 42px;
    padding: 0 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    font-family: inherit;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

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

.map-pitch-toggle[aria-pressed="true"] {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 30%, transparent);
}

.map-pitch-toggle__label {
    line-height: 1;
}

@media (min-width: 900px) {
    .map-canvas-wrap .mapboxgl-ctrl-bottom-left {
        bottom: calc(10px + var(--safe-bottom));
        left: 0.5rem;
    }

    .map-canvas-wrap .mapboxgl-ctrl-bottom-right {
        right: calc(var(--map-fab-size) + 1.25rem);
        bottom: calc(var(--map-fab-bottom) + var(--map-fab-size) + var(--map-fab-gap) + var(--map-fab-size) + 0.35rem);
    }
}

.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; }
.split.split--address { grid-template-columns: 1fr; }

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

/* ── Insurance quote page ── */
.insurance-page {
    display: grid;
    gap: clamp(1.25rem, 3vw, 2rem);
}

.insurance-quote-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.insurance-quote-hero h1 {
    max-width: 12ch;
}

.insurance-rate-card,
.insurance-quote-main,
.insurance-quote-summary {
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    border-radius: 24px;
    background:
        radial-gradient(circle at 12% 10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 34%),
        linear-gradient(135deg, color-mix(in srgb, var(--surface) 96%, var(--brand-soft)), var(--surface));
    box-shadow: var(--shadow-sm);
}

.insurance-rate-card {
    display: grid;
    align-content: center;
    gap: 0.35rem;
    padding: clamp(1.1rem, 3vw, 1.5rem);
}

.insurance-rate-card span,
.insurance-section-heading .chip,
.insurance-quote-summary .chip {
    width: fit-content;
}

.insurance-rate-card strong {
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1;
    letter-spacing: -0.02em;
}

.insurance-rate-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.insurance-quote-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.insurance-quote-main {
    display: grid;
    gap: clamp(1.25rem, 2.5vw, 1.75rem);
    padding: clamp(1rem, 3vw, 1.5rem);
}

.insurance-section-heading {
    display: grid;
    gap: 0.35rem;
}

.insurance-section-heading h2 {
    margin: 0;
}

.insurance-section-heading .meta {
    margin: 0;
    max-width: 48rem;
}

.insurance-plan-grid,
.insurance-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
}

.insurance-field-span {
    grid-column: 1 / -1;
}

.insurance-field-span .field-label {
    display: block;
    margin-bottom: 0.55rem;
    font-weight: 800;
    color: var(--text);
}

.insurance-emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
    gap: 0.65rem;
}

.insurance-emoji-grid--amenities {
    grid-template-columns: repeat(auto-fill, minmax(7.25rem, 1fr));
}

.insurance-emoji-choice {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    min-height: 6.5rem;
    padding: 0.8rem 0.55rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 92%, #fff);
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.insurance-emoji-choice:hover,
.insurance-emoji-choice.is-selected {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
    box-shadow: 0 14px 30px color-mix(in srgb, var(--brand) 14%, transparent);
}

.insurance-emoji-choice.is-selected {
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}

.insurance-emoji-choice input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.insurance-emoji-choice-icon {
    font-size: 1.75rem;
    line-height: 1;
}

.insurance-emoji-choice-label {
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text);
}

.insurance-emoji-choice--check.is-selected .insurance-emoji-choice-icon {
    transform: scale(1.08);
}

.insurance-plan-card {
    position: relative;
    display: grid;
    gap: 0.35rem;
    min-height: 12rem;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 92%, #fff);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.insurance-plan-card:hover,
.insurance-plan-card.is-selected {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
    box-shadow: 0 18px 40px color-mix(in srgb, var(--brand) 16%, transparent);
}

.insurance-plan-card input {
    position: absolute;
    inset: 1rem 1rem auto auto;
    width: 1.15rem;
    min-height: 1.15rem;
    accent-color: var(--brand);
}

.insurance-plan-name {
    color: var(--muted);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
}

.insurance-plan-card strong,
.insurance-plan-price {
    font-size: clamp(2rem, 6vw, 3rem);
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.insurance-plan-price .currency-value {
    white-space: nowrap;
}

.insurance-plan-cover {
    align-self: end;
    color: var(--text);
    font-weight: 800;
    line-height: 1.3;
}

.insurance-disclaimer {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    border-radius: 18px;
    background: color-mix(in srgb, #fef3c7 58%, var(--surface));
    border: 1px solid color-mix(in srgb, #f59e0b 28%, var(--line));
    color: #78350f;
}

.insurance-disclaimer span {
    line-height: 1.55;
}

.insurance-quote-summary {
    position: sticky;
    top: calc(var(--header-height, 86px) + 1rem);
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 3vw, 1.5rem);
    min-width: 0;
}

.insurance-price-local {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.14em;
    max-width: 100%;
    font-size: clamp(1.75rem, 6.5vw, 3.5rem);
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.04em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.insurance-price-local.is-currency-prefix {
    flex-direction: row;
}

.insurance-price-value,
.insurance-price-currency {
    flex: 0 0 auto;
    white-space: nowrap;
}

.insurance-price-currency {
    font-size: 0.72em;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.insurance-price-base {
    margin: 0;
    color: var(--muted);
    font-weight: 800;
    max-width: 100%;
    line-height: 1.35;
}

.insurance-price-base .currency-value {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.insurance-factor-list {
    display: grid;
    gap: 0.55rem;
    margin: 0;
}

.insurance-factor-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line-soft);
}

.insurance-factor-list dt {
    color: var(--muted);
    font-weight: 800;
    min-width: 0;
    flex: 1 1 auto;
}

.insurance-factor-list dd {
    margin: 0;
    font-weight: 900;
    min-width: 0;
    flex: 0 1 auto;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dark .insurance-plan-card {
    background: color-mix(in srgb, var(--surface) 86%, #111827);
}

.dark .insurance-disclaimer {
    background: color-mix(in srgb, #451a03 46%, var(--surface));
    color: #fde68a;
}

@media (min-width: 760px) {
    .insurance-quote-hero {
        grid-template-columns: minmax(0, 1fr) minmax(16rem, 0.34fr);
    }

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

    .insurance-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1080px) {
    .insurance-quote-shell {
        grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.35fr);
    }
}

@media (max-width: 759px) {
    .insurance-quote-summary {
        position: relative;
        top: auto;
    }
}

/* ── 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;
}

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

.dark .segmented button.is-active { color: var(--brand); }

.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: var(--brand);
}

.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-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.dashboard-metric--center {
    padding: 1rem;
    text-align: center;
}

.dashboard-metric--center strong {
    font-size: 1.75rem;
}

.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: var(--brand);
    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: var(--brand);
    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: var(--brand);
    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: var(--gradient);
    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; }

.third-way-btn--toggle[aria-expanded="false"] {
    opacity: 0.85;
    border-style: dashed;
    background: var(--surface);
    color: var(--text);
}
.third-way-btn--toggle[aria-expanded="true"] {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}
.third-way-btn--toggle[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: var(--brand); 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: color-mix(in srgb, var(--brand) 22%, white);
}

.bubble--unread {
    border-color: color-mix(in srgb, var(--accent, #6366f1) 55%, white);
    background: color-mix(in srgb, var(--accent, #6366f1) 10%, var(--surface-soft));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #6366f1) 18%, transparent);
}

.bubble--unread:not(.me) {
    position: relative;
}

.bubble-unread-tag {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.35rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--accent, #6366f1);
    background: color-mix(in srgb, var(--accent, #6366f1) 14%, white);
}

.chat-unread-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.35rem 0 0.15rem;
    color: var(--accent, #6366f1);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.chat-unread-divider::before,
.chat-unread-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: color-mix(in srgb, var(--accent, #6366f1) 35%, var(--line));
}

.chat-unread-divider span {
    flex-shrink: 0;
}

.bubble-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.bubble-head strong {
    min-width: 0;
}

.bubble-actions {
    display: flex;
    gap: 0.25rem;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.bubble:hover .bubble-actions,
.bubble:focus-within .bubble-actions {
    opacity: 1;
}

.bubble-action {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    cursor: pointer;
}

.bubble-action:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--line) 70%, transparent);
}

.bubble-action--danger:hover {
    color: #dc2626;
    background: color-mix(in srgb, #dc2626 12%, transparent);
}

.bubble-body {
    margin: 0.35rem 0 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.bubble-body--deleted {
    color: var(--muted);
    font-style: italic;
}

.bubble--deleted {
    opacity: 0.82;
}

.bubble-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-top: 0.45rem;
    font-size: 0.68rem;
    color: var(--muted);
}

.bubble-meta time {
    font-variant-numeric: tabular-nums;
}

.bubble-edited {
    font-style: italic;
}

.bubble-status {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    line-height: 1;
}

.bubble-status-icon {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
}

.bubble-status-icon--second {
    margin-left: -0.28rem;
}

.bubble-status--read .bubble-status-icon {
    color: var(--accent, #6366f1);
}

.bubble-edit {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.bubble-edit textarea {
    width: 100%;
    min-height: 4.5rem;
    resize: vertical;
}

.bubble-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.bubble-edit-actions .button {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
}

.bubble-attachment {
    margin-bottom: 0.45rem;
}

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

.bubble-attachment-link--image {
    max-width: 100%;
}

.bubble-attachment-image {
    display: block;
    max-width: min(100%, 16rem);
    max-height: 14rem;
    border-radius: calc(var(--radius) - 2px);
    object-fit: cover;
    border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}

.bubble-attachment-link--file {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.65rem;
    border-radius: calc(var(--radius) - 2px);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    border: 1px solid var(--line);
    font-weight: 600;
    font-size: 0.875rem;
}

.bubble-attachment-link--location {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.65rem;
    border-radius: calc(var(--radius) - 2px);
    background: color-mix(in srgb, var(--brand-soft) 70%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
    font-weight: 600;
    font-size: 0.875rem;
    color: inherit;
    text-decoration: none;
}

.bubble-attachment-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 14rem;
}

.chat-attachment-field {
    margin-top: 0.35rem;
}

.chat-attachment-hint {
    margin-top: 0.35rem;
}

.chat-attachment-name {
    margin-top: 0.35rem;
    font-weight: 600;
}

.bubble.me .bubble-attachment-link--file {
    background: color-mix(in srgb, var(--surface) 92%, white);
    color: var(--text);
}

.bubble.me .bubble-attachment-name {
    color: var(--text);
}

.bubble.me:has(.bubble-attachment) .bubble-body {
    color: var(--text);
}

.bubble-reactions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.45rem;
    padding-top: 0.15rem;
}

.bubble.me .bubble-reactions {
    justify-content: flex-end;
}

.bubble-reaction-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.bubble-reaction-btn.is-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    min-height: 1.75rem;
    padding: 0.1rem 0.45rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: inherit;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.bubble-reaction-btn.is-pill:hover,
.bubble-reaction-btn.is-pill:focus-visible {
    background: var(--surface-soft);
    border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
    outline: none;
}

.bubble-reaction-btn.is-pill.is-active {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
}

.bubble-reaction-btn.is-pill:active {
    transform: scale(0.96);
}

.rxn-picker {
    position: relative;
}

.rxn-picker-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    min-height: 1.75rem;
    padding: 0.15rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: inherit;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.rxn-picker-toggle:hover,
.rxn-picker-toggle:focus-visible,
.rxn-picker-toggle[aria-expanded="true"] {
    background: var(--surface-soft);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    outline: none;
}

.rxn-picker-icon {
    font-size: 0.95rem;
    line-height: 1;
}

.rxn-picker-plus {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.rxn-emoji-picker {
    position: absolute;
    bottom: calc(100% + 0.35rem);
    left: 0;
    z-index: 30;
    min-width: 12rem;
    padding: 0.45rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.bubble.me .rxn-emoji-picker {
    left: auto;
    right: 0;
}

.rxn-emoji-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(2rem, 1fr));
    gap: 0.2rem;
}

.rxn-emoji-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: none;
    border-radius: calc(var(--radius) - 4px);
    background: transparent;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.rxn-emoji-option:hover,
.rxn-emoji-option:focus-visible,
.rxn-emoji-option.is-active {
    background: color-mix(in srgb, var(--brand) 12%, var(--surface-soft));
    outline: none;
}

.bubble-reaction-emoji {
    font-size: 1rem;
    line-height: 1;
}

.bubble-reaction-count {
    min-width: 0.85rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
}

.bubble-reaction-btn.is-pill.is-active .bubble-reaction-count {
    color: inherit;
}

.dark .rxn-emoji-picker {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.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.5rem;
    position: sticky;
    top: 5.25rem;
}

.chat-thread-list > h2 {
    margin: 0 0 0.15rem;
    font-size: 1rem;
}

.chat-thread-link {
    display: block;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.7rem 0.8rem;
    background: var(--surface);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.chat-thread-link-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.chat-thread-title {
    display: block;
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
}

.chat-thread-badge {
    flex-shrink: 0;
    align-self: flex-start;
    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.68rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: var(--accent, #6366f1);
}

.chat-thread-badge[hidden],
.chat-thread-badge.is-hidden {
    display: none !important;
}

.chat-thread-meta,
.chat-thread-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.28rem;
    font-size: 0.76rem;
    line-height: 1.4;
    color: var(--muted);
}

.chat-thread-foot {
    margin-top: 0.18rem;
    font-size: 0.72rem;
}

.chat-thread-partner {
    font-weight: 500;
    color: color-mix(in srgb, var(--text) 72%, var(--muted));
}

.chat-thread-sep {
    opacity: 0.55;
}

.chat-thread-status {
    text-transform: capitalize;
}

.chat-thread-time {
    font-variant-numeric: tabular-nums;
}

.chat-thread-link.is-active {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    box-shadow: inset 3px 0 0 var(--brand);
}

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

.chat-thread-link.has-unread:not(.is-active) {
    border-color: color-mix(in srgb, var(--accent, #6366f1) 32%, var(--line));
    background: color-mix(in srgb, var(--accent, #6366f1) 5%, var(--surface));
}

.chat-thread-link.has-unread .chat-thread-title {
    font-weight: 700;
}

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

.chat-composer {
    position: relative;
}

.chat-composer-field textarea {
    width: 100%;
    padding-bottom: 2.5rem;
}

.chat-composer-bar {
    position: absolute;
    left: 0.55rem;
    bottom: 0.55rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    z-index: 2;
}

.chat-emoji-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) - 2px);
    background: var(--surface);
    color: inherit;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.chat-emoji-toggle:hover,
.chat-emoji-toggle:focus-visible {
    background: var(--surface-soft);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    outline: none;
}

.chat-emoji-toggle[aria-expanded="true"] {
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
}

.chat-emoji-picker {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + 0.45rem);
    z-index: 20;
    max-height: 16rem;
    overflow: auto;
    padding: 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.chat-emoji-group + .chat-emoji-group {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid var(--line);
}

.chat-emoji-group-title {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.chat-emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(2rem, 1fr));
    gap: 0.2rem;
}

.chat-emoji-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    border: none;
    border-radius: calc(var(--radius) - 4px);
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.chat-emoji-option:hover,
.chat-emoji-option:focus-visible {
    background: var(--surface-soft);
    outline: none;
}

.dark .chat-emoji-picker {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.dark .chat-reply-form {
    background: var(--surface);
    border-color: var(--line);
}

.dark .chat-composer-field textarea {
    background: var(--surface-soft);
    border-color: var(--line);
    color: var(--text);
}

.dark .chat-composer-field textarea::placeholder {
    color: var(--muted);
}

.dark .chat-composer-field textarea:focus {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    background: var(--surface);
}

.dark .chat-emoji-toggle {
    background: var(--surface-soft);
    border-color: var(--line);
    color: var(--muted);
}

.dark .chat-emoji-toggle:hover,
.dark .chat-emoji-toggle:focus-visible {
    background: color-mix(in srgb, var(--brand) 12%, var(--surface-soft));
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    color: var(--text);
}

.dark .chat-emoji-toggle[aria-expanded="true"] {
    background: color-mix(in srgb, var(--brand) 18%, var(--surface-soft));
    border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
    color: var(--text);
}

/* ── 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 ── */
.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.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
}

/* ── Auth modal card ── */
.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: var(--surface);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow:
        0 4px 6px -1px rgba(15,23,42,.04),
        0 20px 50px -8px rgba(15,23,42,.22),
        0 0 0 1px rgba(255,255,255,.06) inset;
    padding: 1.75rem 1.75rem max(1.75rem, var(--safe-bottom));
    margin: auto;
    transition: transform 0.2s cubic-bezier(.32,1.5,.56,1), opacity 0.18s;
}

.dark .auth-modal {
    box-shadow:
        0 20px 60px -10px rgba(0,0,0,.55),
        0 0 0 1px rgba(255,255,255,.05) inset;
}

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

/* Login modal — clearer boundaries & scroll body */
.modal-layer[data-modal="login"] .auth-modal {
    display: flex;
    flex-direction: column;
    width: min(100%, 440px);
    max-height: min(90dvh, 620px);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--line) 85%, var(--brand) 15%);
    border-radius: 24px;
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--line) 70%, transparent),
        0 24px 60px -12px rgba(15, 23, 42, 0.35);
    padding: 1.5rem 1.5rem max(1.5rem, var(--safe-bottom));
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 55%),
        var(--surface);
}

.dark .modal-layer[data-modal="login"] .auth-modal {
    border-color: color-mix(in srgb, var(--line) 90%, #fff 10%);
    box-shadow:
        0 0 0 1px color-mix(in srgb, #fff 8%, transparent),
        0 24px 60px -12px rgba(0, 0, 0, 0.65);
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 55%),
        var(--surface);
}

.modal-layer[data-modal="login"] .modal-topbar,
.modal-layer[data-modal="login"] .modal-head,
.modal-layer[data-modal="login"] .modal-tabs,
.modal-layer[data-modal="login"] .modal-switch {
    flex-shrink: 0;
}

.modal-layer[data-modal="login"] .modal-topbar {
    margin-bottom: 1.25rem;
}

.modal-layer[data-modal="login"] .modal-head {
    margin-bottom: 1rem;
}

.modal-layer[data-modal="login"] .modal-tabs {
    margin-bottom: 1rem;
}

.modal-layer[data-modal="login"] .modal-brand {
    min-width: 0;
    flex: 1 1 auto;
}

.modal-layer[data-modal="login"] .modal-brand-name {
    white-space: nowrap;
}

.modal-layer[data-modal="login"] .auth-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.modal-layer[data-modal="login"] .tab-panel {
    min-height: 17rem;
}

@media (max-width: 480px) {
    .modal-layer[data-modal="login"] .auth-modal {
        width: min(100%, calc(100vw - 1.5rem));
        border-radius: 20px;
        padding: 1.25rem 1.15rem max(1.25rem, var(--safe-bottom));
        max-height: min(92dvh, 620px);
    }

    .modal-layer[data-modal="login"] .tab-panel {
        min-height: 15rem;
    }
}

/* Decorative blobs */
.modal-soft {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 999px;
    filter: blur(32px);
    opacity: 0.45;
    pointer-events: none;
}
.modal-soft.one { left: -40px; top: -40px; background: color-mix(in srgb, var(--brand) 35%, transparent); }
.modal-soft.two { right: -40px; bottom: -40px; background: color-mix(in srgb, var(--brand-2) 28%, transparent); }

/* ── Modal top bar (brand + close) ── */
.modal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.modal-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.modal-brand .brand-logo {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
}

.modal-brand-name {
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    background-image: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ── Modal heading ── */
.modal-head {
    position: relative;
    margin-bottom: 1.25rem;
}

.modal-head h2 {
    margin: 0 0 0.2rem;
    font-size: 1.75rem;
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.035em;
    color: var(--text);
}

.modal-head .meta { margin: 0; }

/* ── Close buttons ── */
.modal-close {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft, color-mix(in srgb, var(--bg) 60%, var(--surface)));
    color: var(--muted);
    padding: 0.38rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s, color 0.15s;
}
.modal-close:hover {
    background: var(--line);
    color: var(--text);
}

.modal-x {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    background: rgba(255,255,255,.22);
    border: 1px solid rgba(255,255,255,.25);
    font-size: 1.25rem;
    font-weight: 900;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-family: inherit;
    transition: background 0.15s;
    flex-shrink: 0;
    line-height: 1;
}
.modal-x:hover { background: rgba(255,255,255,.35); }

/* ── Tabs ── */
.modal-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    background: color-mix(in srgb, var(--bg) 70%, var(--line));
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 3px;
    margin-bottom: 1.25rem;
}

.modal-tabs button {
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 13px;
    padding: 0.55rem 0.35rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s;
}

.modal-tabs button.is-active {
    background: var(--surface);
    color: var(--brand);
    box-shadow: 0 1px 4px rgba(15,23,42,.1), 0 0 0 1px rgba(15,23,42,.05);
}
.dark .modal-tabs button.is-active {
    box-shadow: 0 1px 6px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.05);
}

.modal-tabs button.modal-tab-social {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0.4rem 0.2rem;
    line-height: 1;
}

.modal-tab-social-icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.modal-tab-social-icon {
    display: inline-flex;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.modal-tab-social-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.modal-tab-social-icon--apple {
    color: var(--text);
}

.modal-tab-social-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: inherit;
}

.modal-tabs button.modal-tab-social.is-active .modal-tab-social-icon--apple {
    color: var(--text);
}

.modal-tabs.inverse {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 1.25rem 0 0;
    background: rgba(255,255,255,.15);
    border-color: rgba(255,255,255,.2);
}
.modal-tabs.inverse button { color: rgba(255,255,255,.75); }
.modal-tabs.inverse button.is-active { background: white; color: var(--brand); box-shadow: none; }

/* ── Tab panels ── */
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

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

/* ── PIN UI ── */
.pin-alert {
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}
.pin-alert.is-error {
    background: color-mix(in srgb, #dc2626 8%, var(--surface));
    border: 1px solid color-mix(in srgb, #dc2626 30%, transparent);
    color: #dc2626;
}

.pin-sent-note {
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    margin-bottom: 0.75rem;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
    color: var(--brand);
    font-size: 0.8125rem;
    font-weight: 600;
}

.pin-box-row {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.pin-box {
    width: 2.8rem;
    height: 3.4rem;
    text-align: center;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    border-radius: 14px;
    border: 2px solid var(--line);
    background: color-mix(in srgb, var(--bg) 60%, var(--surface));
    color: var(--text);
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.pin-box:focus {
    outline: none;
    border-color: var(--brand-mid);
    background: var(--surface);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent);
}

.pin-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.65rem;
    font-size: 0.8125rem;
    font-weight: 700;
}
.pin-actions .linkish {
    background: none;
    border: 0;
    padding: 0;
    color: var(--brand);
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
}
.pin-actions .linkish:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Inputs inside modal ── */
.auth-modal .field input:not([type="checkbox"]):not([type="radio"]):not(.pin-box),
.auth-modal .field select,
.auth-modal .field textarea,
.auth-modal input:not([type="checkbox"]):not([type="radio"]):not(.pin-box),
.auth-modal select,
.auth-modal textarea {
    background: color-mix(in srgb, var(--bg) 55%, var(--surface));
    color: var(--text);
    border-color: var(--line);
    border-radius: 999px;
    padding: 0.72rem 1.05rem;
    min-height: 2.85rem;
    font-size: 0.9375rem;
    box-shadow: none;
}

.auth-modal .field input:not([type="checkbox"]):not([type="radio"]):not(.pin-box):focus,
.auth-modal .field select:focus,
.auth-modal .field textarea:focus,
.auth-modal input:not([type="checkbox"]):not([type="radio"]):not(.pin-box):focus,
.auth-modal select:focus,
.auth-modal textarea:focus {
    background: var(--surface);
    border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}

.auth-modal .field {
    margin-bottom: 0.65rem;
}

.auth-modal .field label,
.auth-modal .meta { color: var(--muted); }

.auth-modal .field label {
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--text);
}

.auth-modal .modal-form .button.primary.full {
    margin-top: 0.35rem;
    border-radius: 999px;
    min-height: 2.85rem;
    font-size: 0.95rem;
    font-weight: 800;
}

.check-row {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.875rem;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    width: auto;
    max-width: 100%;
    margin: 0.1rem 0 0.25rem;
    user-select: none;
}

.check-row input[type="checkbox"],
.check-row input[type="radio"] {
    appearance: auto;
    -webkit-appearance: checkbox;
    width: 1.0625rem !important;
    height: 1.0625rem !important;
    min-width: 1.0625rem !important;
    min-height: 1.0625rem !important;
    margin: 0;
    padding: 0;
    flex: 0 0 auto;
    border-radius: 4px;
    accent-color: var(--brand);
    cursor: pointer;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: none;
}

.auth-modal .check-row {
    display: flex;
    align-items: center;
}

/* ── Google button ── */
.google-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    border: 1.5px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
    margin: 0.5rem 0;
}
.google-button:hover {
    border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
    background: color-mix(in srgb, var(--brand) 5%, var(--surface));
}
.google-button svg { width: 20px; height: 20px; flex-shrink: 0; }

.apple-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    border: 0;
    background: #111827;
    color: #fff;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.15s;
    margin: 0.5rem 0;
}

html.dark .apple-button {
    background: #f8fafc;
    color: #111827;
}

.apple-button:hover:not(:disabled) {
    opacity: 0.92;
    transform: translateY(-1px);
}

.apple-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.apple-button svg { width: 20px; height: 20px; flex-shrink: 0; }

.auth-oauth-stack {
    display: grid;
    gap: 0.35rem;
}

/* ── QR panel ── */
.qr-box { min-height: 260px; display: grid; place-items: center; gap: 0.65rem; }
.qr-status { color: var(--brand); font-weight: 800; font-size: 0.8rem; }
#login-qr-canvas {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

/* ── Modal switch footer ("No account?") ── */
.modal-switch {
    margin: 1.25rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
}
.modal-switch button {
    border: 0;
    background: transparent;
    color: var(--brand);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

/* center utility */
.center { text-align: center; }

/* ── Register modal ── */
.register-banner {
    position: relative;
    background: var(--gradient);
    color: white;
    padding: 1.75rem;
    border-radius: 28px 28px 0 0;
}
.register-banner .modal-x { position: absolute; right: 1.25rem; top: 1.25rem; }

.register-banner-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
    padding-right: 2.5rem;
}
.register-banner .brand-bird.register-bird {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
}
.register-banner-site-name {
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: white;
    opacity: 0.9;
}
.register-banner h2 {
    margin: 0 0 0.3rem;
    font-size: 1.65rem;
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: white;
    padding-right: 2rem;
}
.register-banner p {
    color: rgba(255,255,255,.8);
    margin: 0;
    font-size: 0.875rem;
}

.modal-body { padding: 1.5rem 1.75rem 1.75rem; }

.divider {
    position: relative;
    text-align: center;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0.75rem 0;
}
.divider::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    border-top: 1px solid var(--line);
}
.divider span {
    position: relative;
    background: var(--surface);
    padding: 0 0.75rem;
}

.owner-pitch {
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    color: var(--brand);
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent);
}

/* ── 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)); }
    .split.split--address { grid-template-columns: repeat(3, 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; }
    .topbar .brand .brand-logo.brand-bird {
        width: 114.4px;
        height: calc(114.4px * 280 / 360);
    }
    .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 img {
        min-height: 420px;
        aspect-ratio: 16 / 11;
    }

    .hero-panel {
        padding: 1.5rem 1.75rem 1.65rem;
    }

    .hero-panel strong {
        font-size: 1.35rem;
    }

    .hero-panel .meta {
        font-size: 1.02rem;
    }

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

    .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) - var(--safe-top));
        --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-shell.is-list-collapsed.is-filters-collapsed .map-mobile-bar {
        display: flex;
    }

    .map-panel-list,
    .map-panel-filters {
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        right: auto;
        width: auto;
        height: 100%;
        min-width: 0;
        min-height: 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 {
        min-height: calc(11rem + 40px);
        max-height: min(50dvh, calc(18.5rem + 40px));
        overflow: hidden;
    }

    .map-panel-body.is-detail-open .map-sidebar-list,
    .map-sidebar-body.is-detail-open .map-sidebar-list {
        padding-bottom: calc(var(--map-detail-panel-h, calc(11rem + 40px)) + var(--safe-bottom, 0px));
    }
}

.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, var(--brand-2));
    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;
    min-width: 0;
}

.listing-detail-main .panel.card-body {
    overflow-x: clip;
}

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

.host-trust-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-top: 0.85rem;
}

.host-trust-card--compact {
    margin-top: 0.65rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 0.75rem;
    background: var(--panel-soft, rgba(0, 0, 0, 0.02));
}

.host-trust-card--sidebar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding: 0.85rem;
    border: 1px solid var(--line, #e5e7eb);
    border-radius: 12px;
    background: var(--panel-soft, rgba(0, 0, 0, 0.02));
}

.host-trust-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.host-trust-identity {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.host-trust-avatar-link {
    flex-shrink: 0;
    line-height: 0;
    border-radius: 14px;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.host-trust-avatar-link:hover {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 35%, transparent);
    transform: translateY(-1px);
}

.host-trust-name-link {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.host-trust-name-link--inline {
    display: inline;
}

.host-trust-name-link:hover .host-trust-name {
    color: var(--brand);
    text-decoration: underline;
}

.host-trust-name-link:hover .host-trust-username {
    color: var(--brand);
}

.host-trust-card--sidebar .host-trust-body--sidebar {
    flex: none;
    width: 100%;
    padding-left: 0;
}

.host-trust-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
    min-width: 0;
}

.host-trust-name-row--inline {
    display: inline-flex;
    vertical-align: middle;
}

.host-trust-card--sidebar .host-trust-details {
    margin-top: 0;
}

.host-trust-card--sidebar .host-trust-rating {
    margin-top: 0;
    padding-top: 0.15rem;
}

.host-trust-card--sidebar .presence-row {
    margin: 0;
}

.host-trust-username {
    display: block;
    font-size: 0.78rem;
    line-height: 1.3;
}

.host-trust-rating-link {
    display: inline-flex;
    color: inherit;
    text-decoration: none;
    border-radius: 8px;
}

.host-trust-rating-link:hover {
    color: var(--brand);
}

.host-trust-rating-link:hover .star-rating-meta strong {
    color: var(--brand);
}

.host-trust-avatar .profile-avatar-img,
.host-trust-avatar .profile-avatar-fallback {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.host-trust-card--compact .host-trust-avatar .profile-avatar-img,
.host-trust-card--compact .host-trust-avatar .profile-avatar-fallback {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.host-trust-body {
    flex: 1;
    min-width: 0;
}

.host-trust-line {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: baseline;
}

.host-trust-label {
    color: var(--muted, #6b7280);
    font-size: 0.9rem;
}

.host-trust-name {
    font-size: 1rem;
}

.host-trust-card--sidebar .host-trust-name {
    font-size: 1.05rem;
}

.host-trust-signals {
    list-style: none;
    margin: 0.6rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.host-trust-signal {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.42rem 0.55rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
}

.host-trust-signal-icon {
    flex-shrink: 0;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.05rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
}

.host-trust-signal-text {
    min-width: 0;
}

.host-trust-signal--verified {
    background: #ecfdf5;
    color: #047857;
}

.host-trust-signal--verified .host-trust-signal-icon {
    background: #10b981;
    color: #fff;
}

.host-trust-signal--attested {
    background: #eff6ff;
    color: #1d4ed8;
}

.host-trust-signal--attested .host-trust-signal-icon {
    background: #3b82f6;
    color: #fff;
}

.host-trust-signal--address {
    background: #f5f3ff;
    color: #6d28d9;
}

.host-trust-signal--address .host-trust-signal-icon {
    background: #8b5cf6;
    color: #fff;
}

.host-trust-details {
    list-style: none;
    margin: 0.65rem 0 0;
    padding: 0.65rem 0 0;
    border-top: 1px solid var(--line, #e5e7eb);
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}

.host-trust-details .meta {
    margin: 0;
    font-size: 0.82rem;
}

.host-trust-badges {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.host-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.14rem 0.42rem;
    border-radius: 999px;
    white-space: nowrap;
}

.host-trust-badge--verified {
    background: #d1fae5;
    color: #047857;
}

.host-trust-badge--attested {
    background: #dbeafe;
    color: #1d4ed8;
}

.host-trust-badge--address {
    background: #ede9fe;
    color: #6d28d9;
}

.listing-owner-verify-banner {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    border-color: #f59e0b;
    background: #fffbeb;
}

.listing-owner-verify-banner.is-pending {
    border-color: #93c5fd;
    background: #eff6ff;
}

.listing-owner-verify-banner.is-warn {
    border-color: #fca5a5;
    background: #fef2f2;
}

.listing-verify-address-target {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 1rem;
}

.listing-verify-methods {
    margin-top: 1.5rem;
}

.host-trust-meta {
    font-size: 0.82rem;
}

.map-home-host,
.map-detail-host .map-home-host {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
}

.map-host-verified {
    color: #047857;
    font-weight: 700;
    margin-left: 0.2rem;
}

.map-detail-host-badges {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-left: 0.25rem;
}

.hub-card-host {
    display: block;
    font-size: 0.78rem;
    color: var(--muted, #6b7280);
    margin-top: 0.15rem;
    overflow-wrap: anywhere;
}

.hub-card-host-badges {
    display: inline-flex;
    gap: 0.2rem;
    margin-left: 0.15rem;
}

.hub-host-badge {
    font-weight: 700;
}

.hub-host-badge--verified { color: #047857; }
.hub-host-badge--attested { color: #1d4ed8; }

.listing-ownership-check {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-size: 0.95rem;
    line-height: 1.55;
    cursor: pointer;
    min-width: 0;
    padding: 1rem 1.15rem;
    border: 2px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.15s;
}
.listing-ownership-check:has(input:checked) {
    border-color: var(--brand);
    background: color-mix(in srgb, var(--brand) 5%, var(--surface));
}
.listing-ownership-check input {
    margin-top: 0.25rem;
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--brand);
}
.listing-ownership-check span {
    min-width: 0;
    overflow-wrap: break-word;
}

.listing-host-response {
    margin-top: 0.5rem;
}

.dark .host-trust-card--compact,
.dark .host-trust-card--sidebar {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
}

.dark .host-trust-signal--verified {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

.dark .host-trust-signal--verified .host-trust-signal-icon {
    background: #10b981;
    color: #ecfdf5;
}

.dark .host-trust-signal--attested {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
}

.dark .host-trust-signal--attested .host-trust-signal-icon {
    background: #3b82f6;
    color: #eff6ff;
}

.dark .host-trust-signal--address {
    background: rgba(139, 92, 246, 0.12);
    color: #c4b5fd;
}

.dark .host-trust-signal--address .host-trust-signal-icon {
    background: #8b5cf6;
    color: #f5f3ff;
}

.dark .host-trust-details {
    border-top-color: rgba(255, 255, 255, 0.08);
}

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

.dark .host-trust-badge--attested {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.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));
    overflow-x: clip;
    max-width: 100%;
}

.listing-detail-page > *,
.listing-detail-layout,
.listing-detail-main,
.listing-detail-aside {
    min-width: 0;
    max-width: 100%;
}

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

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

.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;
    justify-content: flex-start;
}

.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-nav-meta {
    font-size: 0.62rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 9.5rem;
    opacity: 0.85;
}

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

@media (max-width: 899px) {
    .listing-detail-nav-row {
        position: sticky;
        top: calc(var(--header-h) + var(--safe-top));
        z-index: 90;
        margin-bottom: 0.65rem;
        padding: 0.45rem 0 0.55rem;
        background: color-mix(in srgb, var(--bg) 92%, transparent);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .listing-nav-btn {
        flex: 1 1 0;
        max-width: calc(50% - 0.375rem);
        padding: 0.5rem 0.55rem;
    }

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

    .listing-nav-btn--next {
        margin-left: 0;
    }

    .listing-nav-title,
    .listing-nav-meta {
        max-width: 100%;
    }
}

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

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

@media (min-width: 900px) {
    .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;
}

.dark .listing-stat-strip {
    color: color-mix(in srgb, var(--text) 72%, var(--muted));
}

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

@media (max-width: 719px) {
    .listing-detail-page .listing-gallery {
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        border-radius: var(--radius-lg);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
    }
}

.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: min(58vw, 300px);
    max-height: 360px;
}

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

@media (min-width: 720px) {
    .listing-gallery-mosaic {
        min-height: 420px;
        max-height: 520px;
    }
}

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

.listing-gallery-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

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

.listing-gallery-cell:active img { transform: scale(1.01); }

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

@media (max-width: 719px) {
    .listing-gallery-more {
        right: 0.65rem;
        bottom: 0.65rem;
        font-size: 0.78rem;
        padding: 0.45rem 0.7rem;
    }
}

.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 {
    padding: 1.1rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.listing-trust-details {
    margin: 0;
}

.listing-trust-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.listing-trust-summary::-webkit-details-marker {
    display: none;
}

.listing-trust-summary-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand);
    flex-shrink: 0;
}

.listing-trust-toggle-label--hide {
    display: none;
}

.listing-trust-details[open] .listing-trust-toggle-label--show {
    display: none;
}

.listing-trust-details[open] .listing-trust-toggle-label--hide {
    display: inline;
}

.listing-trust-chevron {
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

.listing-trust-details[open] .listing-trust-chevron {
    transform: rotate(-90deg);
}

.listing-trust-eyebrow {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.listing-trust-signals {
    list-style: none;
    margin: 0.85rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem 1.5rem;
}

.listing-trust-details:not([open]) .listing-trust-signals {
    display: none;
}

@media (max-width: 640px) {
    .listing-trust-bar {
        padding: 0.85rem 1rem;
    }

    .listing-trust-signals {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        margin-top: 0.75rem;
    }
}

.listing-trust-signal {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.35;
    color: var(--text);
}

.listing-trust-signal-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.listing-trust-signal-icon svg {
    width: 0.95rem;
    height: 0.95rem;
}

.listing-trust-signal-text {
    min-width: 0;
}

.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);
    border-color: color-mix(in srgb, var(--brand) 24%, var(--line));
}

.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-map-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
    pointer-events: none;
}

.listing-map-marker-bird {
    --brand-logo-size: 80px;
    aspect-ratio: 466 / 422;
    height: calc(var(--brand-logo-size) * 422 / 466);
    filter: drop-shadow(0 6px 16px rgba(190, 24, 93, 0.28));
}

.listing-map-marker-bird .brand-bird-frame {
    animation: none;
    opacity: 1;
}

.listing-map-marker-bird .brand-bird-frame--1 {
    background-image: url('/img/houseswapp-landing-red-bird-frame-1.png?v=2');
    opacity: 1;
}

.listing-map-marker-bird .brand-bird-frame--2,
.listing-map-marker-bird .brand-bird-frame--3,
.listing-map-marker-bird .brand-bird-frame--4 {
    display: none;
}

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

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

.dashboard-back-link {
    display: inline-block;
    margin-bottom: 0.35rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}

.dashboard-back-link:hover {
    color: var(--brand);
}

.dashboard-table-wrap {
    overflow: hidden;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.dashboard-table th,
.dashboard-table td {
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.dashboard-table thead th {
    border-top: 0;
    background: color-mix(in srgb, var(--surface-soft) 80%, transparent);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.dashboard-table-empty {
    padding: 2rem 1rem !important;
    text-align: center;
    color: var(--muted);
}

.dashboard-table__actions {
    width: 1%;
    white-space: nowrap;
}

.dashboard-table-listing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.dashboard-table-listing__thumb {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--line);
}

.dashboard-table-listing__placeholder {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    flex-shrink: 0;
    font-size: 1rem;
}

.dashboard-table-listing strong {
    display: block;
}

.dashboard-table-listing .meta {
    display: block;
    margin-top: 0.15rem;
}

.dashboard-table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.dashboard-table-actions form {
    display: inline;
}

.dashboard-status {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    background: color-mix(in srgb, var(--surface-soft) 80%, transparent);
    border: 1px solid var(--line);
}

.dashboard-status--active {
    color: #047857;
    border-color: color-mix(in srgb, #10b981 35%, var(--line));
    background: color-mix(in srgb, #10b981 12%, var(--surface));
}

.dashboard-status--draft,
.dashboard-status--archived {
    color: var(--muted);
}

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

.dashboard-form-grid .field--full {
    grid-column: 1 / -1;
}

.dashboard-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.dashboard-images-section {
    margin-top: 1rem;
}

.dashboard-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.dashboard-image-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
}

.dashboard-image-card.is-primary {
    border-color: var(--brand);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent);
}

.dashboard-image-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.dashboard-image-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    padding: 0.45rem 0.5rem;
}

.dashboard-image-badge {
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--brand);
}

.dashboard-upload-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line);
}

.dashboard-upload-form .field {
    flex: 1;
    min-width: 14rem;
    margin-bottom: 0;
}

.dashboard-danger-zone {
    margin-top: 1rem;
}

.dashboard-danger-zone h3 {
    margin: 0 0 0.35rem;
}

.dashboard-btn-danger {
    color: #b91c1c !important;
}

.dashboard-btn-danger:hover {
    background: color-mix(in srgb, #ef4444 10%, var(--surface)) !important;
}

.dashboard-alert {
    margin-bottom: 1rem;
}

.dashboard-alert--error {
    border-color: color-mix(in srgb, #ef4444 35%, var(--line));
}

.dashboard-alert-list {
    margin: 0;
    padding-left: 1.1rem;
    color: #b91c1c;
}

.dashboard-pagination {
    margin-top: 1rem;
}

.dashboard-dispute-open {
    margin-bottom: 1rem;
}

.dashboard-dispute-list {
    margin-top: 0;
}

.dashboard-dispute-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
}

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

.dashboard-dispute-statement,
.dashboard-dispute-message {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.dashboard-dispute-resolution {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
}

.dashboard-dispute-awaiting {
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    background: var(--surface-soft);
}

.dashboard-dispute-messages {
    display: grid;
    gap: 0.75rem;
}

@media (max-width: 720px) {
    .dashboard-form-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-table-wrap {
        overflow-x: auto;
    }

    .dashboard-table {
        min-width: 640px;
    }
}

.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-host-profile-btn {
    margin-top: 0.75rem;
}

.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;
    flex-wrap: nowrap;
}

.listing-lightbox-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.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;
    overflow: hidden;
    pointer-events: auto;
}

.listing-lightbox-viewport.is-zoomed {
    touch-action: none;
}

.listing-lightbox-track {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: min(50vh, calc(100dvh - 200px));
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    touch-action: pan-x pan-y pinch-zoom;
}

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

.listing-lightbox-track.is-scroll-locked {
    overflow: hidden;
    touch-action: none;
}

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

.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-actions {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
    }

    .listing-lightbox-actions .listing-save-btn {
        width: auto;
        min-height: 44px;
        white-space: nowrap;
    }

    .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 (legacy rich grid — kept for reference elsewhere) */
.map-detail-layout.map-detail-layout-rich {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.map-detail-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    border-radius: 10px;
    overflow: hidden;
    min-height: 0;
    max-height: 56px;
}

.map-detail-preview-cell {
    position: relative;
    display: block;
    aspect-ratio: 1;
    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.15rem 0 0; font-size: 0.68rem; }

@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 { max-height: 56px; }
}

/* ── 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.35rem;
    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%, color-mix(in srgb, var(--brand) 5%, white) 48%, color-mix(in srgb, var(--brand-2) 5%, white) 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.5rem;
    padding: 0 1.6rem 0.15rem;
    flex-wrap: nowrap;
}

.third-way-pager-mid {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 0;
}

.third-way-pager-counter {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.01em;
    white-space: nowrap;
    line-height: 1.2;
}

.third-way-pager-dots {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.3rem;
    max-width: min(9rem, 38vw);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.third-way-pager-dots::-webkit-scrollbar {
    display: none;
}

.third-way-pager-dot {
    width: 0.4rem;
    height: 0.4rem;
    flex-shrink: 0;
    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: 1rem;
    background: var(--gradient);
}

.third-way-pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 2rem;
    min-width: 2rem;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
    background: var(--surface);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    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);
    }
}

@media (max-width: 719px) {
    .modal-layer:has(.swap-modal),
    .third-way-demo-layer {
        align-items: stretch;
        padding: max(0.35rem, var(--safe-top)) 0.35rem max(0.35rem, var(--safe-bottom));
    }

    .auth-modal.wide.swap-modal,
    .auth-modal.wide.third-way-demo-modal {
        width: 100%;
        max-width: none;
        border-radius: 18px;
    }

    .swap-modal-chrome {
        padding: 0.75rem 0.85rem;
    }

    .swap-modal-target-media {
        flex: 0 0 2.65rem;
        width: 2.65rem;
        height: 2.65rem;
    }

    .swap-modal-target-title {
        font-size: 0.88rem;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .swap-modal-target-meta,
    .swap-modal-target-stats {
        font-size: 0.72rem;
    }

    .swap-modal-body {
        flex-direction: column;
    }

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

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

    .swap-step {
        flex: 1 1 0;
        min-width: 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        padding: 0.5rem 0.35rem;
        border-left: 0;
        border-bottom: 3px solid transparent;
        font-size: 0.66rem;
        line-height: 1.15;
        text-align: center;
    }

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

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

    .swap-modal-content {
        flex: 1 1 auto;
        min-height: 0;
    }

    .swap-pane-inner {
        padding: 0.85rem 0.9rem 1.25rem;
        gap: 0.75rem;
    }

    .swap-pane-inner .split {
        grid-template-columns: 1fr;
    }

    .swap-third-way-shell {
        padding: 0.75rem 0.9rem 0;
        gap: 0.65rem;
    }

    .swap-third-way-search-preview {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-align: left;
    }

    .swap-third-way-results-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .swap-third-way-count {
        white-space: normal;
    }

    .third-way-pager {
        padding-inline: 0.9rem;
        padding-bottom: 0.1rem;
        gap: 0.35rem;
    }

    .third-way-pager-mid {
        gap: 0;
    }

    .third-way-pager-counter {
        font-size: 0.7rem;
    }

    .third-way-pager-dots {
        display: none;
    }

    .third-way-pager-btn {
        min-height: 1.85rem;
        min-width: 1.85rem;
        padding: 0.25rem 0.45rem;
        font-size: 0.68rem;
    }

    .third-way-approval {
        padding: 0.65rem 0.75rem;
    }

    .third-way-approval-parties {
        gap: 0.3rem;
    }

    .third-way-approval-chip {
        font-size: 0.64rem;
        padding: 0.18rem 0.45rem;
    }

    .swap-modal .swap-third-way-loop-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .swap-modal .swap-third-way-loop-actions .button.primary {
        min-width: 0;
        width: 100%;
    }

    .third-way-demo-shell {
        max-height: calc(100dvh - max(0.7rem, var(--safe-top)) - max(0.7rem, var(--safe-bottom)));
        border-radius: 18px;
    }

    .third-way-demo-head {
        padding: 1rem 1rem 0.55rem;
        gap: 0.75rem;
    }

    .third-way-demo-head h2 {
        font-size: 1.28rem;
    }

    .third-way-demo-sub {
        font-size: 0.84rem;
    }

    .third-way-demo-flow {
        margin: 0 0.9rem 0.75rem;
        padding: 0.65rem 0.75rem;
        gap: 0.28rem 0.4rem;
    }

    .third-way-demo-flow-node {
        font-size: 0.62rem;
        padding: 0.28rem 0.55rem;
    }

    .third-way-demo-flow-arrow {
        width: 0.7rem;
    }

    .third-way-demo-status {
        margin-inline: 0.9rem;
        font-size: 0.82rem;
    }

    .third-way-demo-results {
        padding-inline: 0.9rem;
    }

    .third-way-demo-foot {
        flex-direction: column;
        align-items: stretch;
        padding: 0.9rem 0.9rem calc(0.95rem + var(--safe-bottom));
        gap: 0.55rem;
    }

    .third-way-demo-foot .button {
        flex: 1 1 auto;
        width: 100%;
        min-height: var(--touch-min, 44px);
    }

    .landing-flagship-copy .landing-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
    }

    .landing-flagship-copy .landing-actions .button {
        width: 100%;
        justify-content: center;
        min-height: var(--touch-min, 44px);
    }
}

.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: var(--brand);
}

.dark .swap-pref-chip span {
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    color: var(--text);
    border-color: var(--line);
}

.dark .swap-pref-chip input:checked + span {
    background: color-mix(in srgb, var(--brand) 22%, var(--surface));
    border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
    color: color-mix(in srgb, var(--brand) 45%, var(--text));
}

.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;
}
.listing-host-wants .chip.is-collapsed {
    display: none;
}
.listing-pref-toggle {
    display: inline-flex;
    align-items: center;
    margin-top: 0.55rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.listing-pref-toggle:hover {
    background: var(--brand-soft);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}
.listing-pref-toggle[hidden],
.listing-pref-toggle [hidden] {
    display: none !important;
}

.dark .listing-host-wants .chip {
    background: color-mix(in srgb, var(--brand) 16%, var(--surface));
    color: var(--text);
}

.dark .listing-host-wants .chip-accent {
    background: color-mix(in srgb, var(--brand) 24%, var(--surface));
    color: color-mix(in srgb, var(--brand) 40%, var(--text));
}

/* Continent chip for show page */
.chip-continent {
    background: color-mix(in srgb, var(--brand) 14%, var(--surface));
    color: var(--brand);
    border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
    font-weight: 600;
}

/* Swap type row on listing show page */
.listing-swap-type-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.swap-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1.5px solid transparent;
}

.swap-type-badge--direct {
    background: color-mix(in srgb, #22c55e 12%, var(--surface));
    color: #16a34a;
    border-color: color-mix(in srgb, #22c55e 35%, var(--line));
}

.swap-type-badge--3way {
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 8%, var(--surface)), color-mix(in srgb, var(--brand-2, var(--brand)) 6%, var(--surface)));
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
    padding: 0.35rem 0.85rem 0.35rem 0.55rem;
    gap: 0;
    box-shadow: 0 1px 3px color-mix(in srgb, var(--brand) 12%, transparent);
}
.third-way-exclusive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 6px;
    background: var(--gradient);
    color: #fff;
    flex-shrink: 0;
    margin-right: 0.45rem;
}
.third-way-exclusive-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
    white-space: nowrap;
}
.third-way-exclusive-sep {
    width: 1px;
    height: 1rem;
    background: color-mix(in srgb, var(--brand) 25%, var(--line));
    margin: 0 0.55rem;
    flex-shrink: 0;
}
.third-way-exclusive-desc {
    font-size: 0.78rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--brand) 70%, var(--text));
    white-space: nowrap;
}

.swap-type-badge--none {
    color: var(--muted);
}

.dark .swap-type-badge--direct {
    background: color-mix(in srgb, #22c55e 15%, var(--surface));
    color: #4ade80;
    border-color: color-mix(in srgb, #22c55e 30%, var(--line));
}

/* Continent quick-select bar in listing form */
.swap-continent-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.swap-continent-btn {
    appearance: none;
    cursor: pointer;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.swap-continent-btn:hover {
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
}

.swap-continent-btn.is-active {
    background: color-mix(in srgb, var(--brand) 14%, var(--surface));
    border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
    color: var(--brand);
    font-weight: 700;
}

/* Swap type options (direct + 3-way side by side) */
.swap-type-options {
    display: grid;
    gap: 0.6rem;
}

.swap-type-field {
    margin-bottom: 0.25rem;
}

.swap-type-options .choice-chip--block {
    border-style: solid;
}

.swap-type-options .choice-chip--block:first-child {
    border-color: color-mix(in srgb, #22c55e 45%, var(--line));
    background: color-mix(in srgb, #22c55e 5%, var(--surface));
}

.swap-type-options .choice-chip--block:first-child:has(input:checked) {
    background: color-mix(in srgb, #22c55e 12%, var(--surface));
    border-color: #22c55e;
}

.swap-type-options .choice-chip--featured {
    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-type-options .choice-chip--featured:has(input:checked) {
    border-style: solid;
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}

.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-airbnb-alt {
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--brand-2) 10%, var(--surface)), color-mix(in srgb, var(--brand) 12%, var(--surface)));
}

.landing-airbnb-compare {
    display: grid;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 720px) {
    .landing-airbnb-compare {
        grid-template-columns: 1fr 1fr;
    }
}

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

.dark .landing-listing-overlay .chip {
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    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);
}

.dark .button.ghost,
.dark .landing-see-all.button.ghost {
    color: var(--text);
    border-color: var(--line);
}

.dark .button.ghost:hover,
.dark .landing-see-all.button.ghost:hover {
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    color: var(--text);
}

.landing-cta-band {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 3rem);
    text-align: center;
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    background: var(--gradient-vivid);
    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;
    }
}

/* Home: horizontal swipe card tracks on small screens */
@media (max-width: 639px) {
    .landing-card-track {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x;
        scrollbar-width: none;
        gap: 0.85rem;
        margin-inline: calc(-1 * var(--page-pad-x));
        padding-inline: var(--page-pad-x);
        scroll-padding-inline: var(--page-pad-x);
        padding-bottom: 0.35rem;
    }

    .landing-card-track::-webkit-scrollbar {
        display: none;
    }

    .landing-card-track > * {
        flex: 0 0 min(82vw, 18.5rem);
        scroll-snap-align: start;
        min-width: 0;
    }

    .landing-card-track--peek > * {
        flex-basis: min(44vw, 10.75rem);
    }

    .landing-card-track--wide > * {
        flex-basis: min(86vw, 20rem);
    }

    .landing-card-track--listings > * {
        flex-basis: min(72vw, 15rem);
    }

    .landing-bento--use.landing-card-track > .landing-office-card {
        flex-basis: min(88vw, 22rem);
    }

    .landing-bento--compare {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .landing-bento--compare > .landing-card-track {
        margin-inline: calc(-1 * var(--page-pad-x));
    }

    .landing-flagship.landing-airbnb-alt {
        overflow: visible;
    }

    .landing-airbnb-alt .landing-card-track {
        margin-inline: calc(-1 * clamp(1.25rem, 3vw, 2rem));
        padding-inline: clamp(1.25rem, 3vw, 2rem);
        scroll-padding-inline: clamp(1.25rem, 3vw, 2rem);
    }
}

@media (min-width: 640px) {
    .landing-bento.landing-card-track,
    .landing-listings.landing-card-track {
        display: grid;
        overflow: visible;
        margin-inline: 0;
        padding-inline: 0;
        scroll-snap-type: none;
        touch-action: auto;
        padding-bottom: 0;
    }

    .landing-bento--compare > .landing-card-track {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-column: 1 / -1;
        gap: 0.85rem;
        overflow: visible;
        margin-inline: 0;
        padding-inline: 0;
        scroll-snap-type: none;
    }

    .landing-airbnb-compare.landing-card-track {
        display: grid;
        overflow: visible;
        margin-inline: 0;
        padding-inline: 0;
        scroll-snap-type: none;
    }

    .landing-card-track > * {
        flex: unset;
        scroll-snap-align: unset;
    }
}

@media (prefers-reduced-motion: reduce) {
    .landing-card-track {
        scroll-behavior: auto;
    }

    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: var(--gradient-vivid, var(--gradient));
    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, var(--brand) 0%, var(--brand-2) 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, var(--brand-mid) 0%, var(--brand-2) 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;
}

@media (max-width: 767px) {
    .landing-2026 .hero-glider-visual,
    .landing-2026 .hero-glider-track,
    .landing-2026 .hero-glider-media-link,
    .landing-2026 .hero-glider-slide img,
    .landing-2026 .hero-glider-fallback {
        min-height: clamp(300px, 58vw, 400px);
    }

    .landing-2026 .hero-glider-info {
        padding: 1.35rem 1.45rem 1.5rem;
    }

    .landing-2026 .hero-glider-info-link strong {
        font-size: 1.25rem;
        margin: 0.4rem 0 0.35rem;
    }

    .landing-2026 .hero-glider-info-link .meta {
        font-size: 0.98rem;
        line-height: 1.55;
    }
}

.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, minmax(0, 1fr));
    gap: 1rem;
    padding: 2rem 0;
    width: min(100%, 42rem);
    margin-inline: 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,
        color-mix(in srgb, var(--brand) 15%, #0f172a) 0%,
        color-mix(in srgb, var(--brand) 35%, #0f172a) 50%,
        color-mix(in srgb, var(--brand-mid) 55%, #0f172a) 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, color-mix(in srgb, var(--brand) 40%, transparent), 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: rgba(255, 255, 255, 0.9);
    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, var(--brand), var(--brand-2));
    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 color-mix(in srgb, var(--brand) 40%, transparent));
    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: var(--gradient);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--brand) 35%, transparent);
}

.landing-insurance .button.primary:hover {
    background: var(--gradient-vivid);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--brand) 50%, transparent);
}

.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: 466 / 422;
    filter: drop-shadow(0 0.85rem 1.1rem rgba(190, 24, 93, 0.2));
    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(190, 24, 93, 0.24))
        drop-shadow(0 0 0.65rem rgba(225, 29, 72, 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-landing-red-bird-frame-1.png?v=2');
    animation-name: landing-flight-frame-1;
}

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

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

.landing-flight-frame--4 {
    background-image: url('/img/houseswapp-landing-red-bird-frame-4.png?v=2');
    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(190, 24, 93, 0.24))
        drop-shadow(0 0 0.75rem rgba(225, 29, 72, 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%, transparent);
    border-radius: 22px;
    background:
        radial-gradient(circle at 8% 22%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 28%),
        radial-gradient(circle at 92% 82%, color-mix(in srgb, var(--brand-2) 12%, transparent), transparent 34%),
        linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, var(--brand-soft) 60%, var(--surface)) 58%, color-mix(in srgb, var(--brand-soft-2) 40%, var(--surface)) 100%);
    box-shadow: 0 1.6rem 4rem rgba(15, 23, 42, 0.2);
    backdrop-filter: blur(18px);
}

.dark .cookie-consent-card {
    border-color: color-mix(in srgb, var(--brand) 32%, transparent);
    background:
        radial-gradient(circle at 8% 22%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 28%),
        radial-gradient(circle at 92% 82%, color-mix(in srgb, var(--brand-2) 16%, transparent), transparent 34%),
        linear-gradient(135deg, var(--bg) 0%, color-mix(in srgb, var(--brand) 5%, var(--bg)) 58%, color-mix(in srgb, var(--brand-2) 4%, var(--bg)) 100%);
}

.cookie-bird {
    position: relative;
    align-self: center;
    width: clamp(4.5rem, 10vw, 6rem);
    aspect-ratio: 466 / 422;
    filter: drop-shadow(0 0.9rem 1.2rem rgba(190, 24, 93, 0.2));
}

.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;
    /* 5s cycle: flap burst for 0.64s (≈12.8%), idle on frame-1 for 4.36s */
    animation-duration: 5s;
    animation-iteration-count: infinite;
    animation-timing-function: steps(1, end);
}

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

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

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

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

/*
 * Each frame covers 3.2% of 5s = 0.16s (matching the original 0.64s/4 frame pace).
 * After 12.8% (0.64s), frame-1 takes over as the "resting" pose until 100%.
 */
@keyframes cookie-bird-frame-1 {
    0%,  3.19%  { opacity: 1; }   /* frame 1 active during flap */
    3.2%, 12.79% { opacity: 0; }  /* other frames play */
    12.8%, 100% { opacity: 1; }   /* frame 1 = resting pose during idle */
}

@keyframes cookie-bird-frame-2 {
    0%,  3.19%  { opacity: 0; }
    3.2%, 6.39% { opacity: 1; }   /* frame 2 active */
    6.4%, 100%  { opacity: 0; }
}

@keyframes cookie-bird-frame-3 {
    0%,  6.39%  { opacity: 0; }
    6.4%, 9.59% { opacity: 1; }   /* frame 3 active */
    9.6%, 100%  { opacity: 0; }
}

@keyframes cookie-bird-frame-4 {
    0%,   9.59%  { opacity: 0; }
    9.6%, 12.79% { opacity: 1; }  /* frame 4 active */
    12.8%, 100%  { opacity: 0; }
}

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

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

    .brand-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 inline panel */
.detail-loops-panel {
    margin-bottom: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

@media (max-width: 719px) {
    .detail-loops-panel[open] {
        overflow: visible;
    }
}

.detail-loops-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 5%, var(--surface)), color-mix(in srgb, var(--brand-2) 3%, var(--surface)));
}

.detail-loops-summary::-webkit-details-marker { display: none; }

.detail-loops-summary-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.detail-loops-summary-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.detail-loops-summary-text strong {
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.detail-loops-summary-text .meta { font-size: 0.78rem; }

.detail-loops-summary-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand);
    flex-shrink: 0;
}

.detail-loops-toggle-label--hide { display: none; }
.detail-loops-panel[open] .detail-loops-toggle-label--show { display: none; }
.detail-loops-panel[open] .detail-loops-toggle-label--hide { display: inline; }

.detail-loops-chevron {
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
    transform: rotate(90deg);
    transition: transform 0.2s ease;
}

.detail-loops-panel[open] .detail-loops-chevron { transform: rotate(-90deg); }

.detail-loops-body {
    padding: 0 1.15rem 1.15rem;
    border-top: 1px solid color-mix(in srgb, var(--brand) 12%, var(--line));
}

.detail-loops-intro {
    margin: 0.85rem 0 0.75rem;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
    max-width: 42rem;
}

.detail-loops-foot {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed color-mix(in srgb, var(--brand) 15%, var(--line));
}

.detail-loops-matcher-btn { font-size: 0.78rem; }

.detail-loops-slider-wrap {
    position: relative;
    z-index: 1;
    padding-top: 0.25rem;
    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;
    }

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

@media (max-width: 719px) {
    .detail-loops-slider-wrap {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "track track track"
            "prev dots next";
        align-items: center;
        gap: 0.55rem 0.65rem;
        padding-inline: 0;
        overflow: visible;
    }

    .detail-loops-track {
        grid-area: track;
        width: 100%;
        max-width: 100%;
        scroll-padding-inline: 0;
        padding-bottom: 0.15rem;
    }

    .detail-loops-arrow {
        position: static;
        top: auto;
        transform: none;
        width: 2.35rem;
        height: 2.35rem;
        box-shadow: var(--shadow);
    }

    .detail-loops-arrow--prev {
        grid-area: prev;
        justify-self: start;
    }

    .detail-loops-arrow--next {
        grid-area: next;
        justify-self: end;
    }

    .detail-loops-dots {
        grid-area: dots;
        margin-top: 0;
        padding: 0;
        flex-wrap: wrap;
        max-width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .detail-loops-dots::-webkit-scrollbar {
        display: none;
    }

    .detail-loop-card {
        min-width: 0;
        width: 100%;
        flex: 0 0 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .detail-loop-card-head {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .detail-loop-score-pill {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.45rem;
        min-width: 0;
        width: fit-content;
        max-width: 100%;
        padding: 0.4rem 0.65rem;
    }

    .detail-loop-score-value {
        font-size: 1rem;
    }

    .detail-loop-score-label {
        font-size: 0.58rem;
        text-align: left;
    }

    .detail-loop-interest-count {
        grid-column: auto;
        white-space: normal;
    }

    .detail-loop-connector {
        padding-left: 0.85rem;
        padding-right: 0;
        gap: 0.35rem;
    }

    .detail-loop-connector-line {
        min-width: 0;
    }

    .detail-loop-connector-score {
        flex-shrink: 0;
        font-size: 0.68rem;
        padding: 0.15rem 0.45rem;
    }

    .detail-loop-card-foot {
        gap: 0.75rem;
    }

    .detail-loop-parties {
        width: 100%;
    }

    .detail-loop-party {
        max-width: 100%;
        white-space: normal;
        line-height: 1.25;
    }

    .detail-loop-actions {
        width: 100%;
        justify-content: stretch;
    }

    .detail-loop-interest-btn,
    .detail-loop-actions .detail-loop-status {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .detail-loops-foot {
        justify-content: stretch;
    }

    .detail-loops-matcher-btn {
        width: 100%;
        justify-content: center;
    }
}

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

.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;
    flex-shrink: 0;
}

.detail-loop-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--brand) 2%, var(--surface));
    border: 1px solid var(--line);
    min-width: min(380px, 88vw);
    flex: 0 0 min(380px, 88vw);
    scroll-snap-align: center;
    scroll-snap-stop: always;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.detail-loop-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: color-mix(in srgb, var(--brand) 22%, var(--line));
}

.detail-loop-card-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.65rem;
}

.detail-loop-score-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    padding: 0.35rem 0.5rem;
    border-radius: 12px;
    background: var(--gradient);
    color: #fff;
    text-align: center;
}

.detail-loop-score-value {
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1;
}

.detail-loop-score-label {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.9;
}

.detail-loop-interest-meter {
    height: 0.35rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 10%, var(--line));
    overflow: hidden;
}

.detail-loop-interest-meter-fill {
    height: 100%;
    border-radius: inherit;
    background: var(--gradient);
    transition: width 0.3s ease;
}

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

.detail-loop-trail {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.detail-loop-stop {
    display: grid;
    grid-template-columns: 3.25rem 1fr;
    gap: 0.65rem;
    align-items: center;
}

.detail-loop-stop-media {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

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

.detail-loop-stop-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    font-size: 0.55rem;
    font-weight: 700;
    text-align: center;
    padding: 0.25rem;
    color: var(--muted);
}

.detail-loop-stop-body { min-width: 0; }

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

.detail-loop-stop--you .detail-loop-stop-role { color: var(--brand); }

.detail-loop-stop-body strong {
    display: block;
    font-size: 0.82rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-loop-stop-body .meta {
    display: block;
    font-size: 0.72rem;
    margin-top: 0.1rem;
}

.detail-loop-connector {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.15rem 0 0.15rem 1.2rem;
    min-height: 1.5rem;
}

.detail-loop-connector-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 35%, var(--line)), color-mix(in srgb, var(--brand-2) 25%, var(--line)));
}

.detail-loop-connector-score {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--brand);
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    flex-shrink: 0;
}

.detail-loop-connector--return .detail-loop-connector-return {
    font-size: 0.85rem;
    color: var(--muted);
}

.detail-loop-card-foot {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--line);
}

.detail-loop-actions {
    display: flex;
    justify-content: flex-end;
}

/* 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,
.detail-similar-grid {
    display: none;
}

.listing-card-carousel {
    position: relative;
    margin-inline: calc(-1 * var(--page-pad-x));
}

.listing-card-carousel__track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-inline: var(--page-pad-x);
    scroll-padding-inline: var(--page-pad-x);
    padding-bottom: 0.25rem;
}

.listing-card-carousel__track::-webkit-scrollbar {
    display: none;
}

.listing-card-carousel__track > .detail-match-card,
.listing-card-carousel__track > .detail-similar-card {
    flex: 0 0 min(272px, calc(100vw - var(--page-pad-x) * 2 - 2.5rem));
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.listing-card-carousel__track > .detail-similar-card {
    flex-basis: min(252px, calc(100vw - var(--page-pad-x) * 2 - 2.5rem));
}

.listing-card-carousel__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--text);
    transform: translateY(-50%);
    transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.listing-card-carousel__arrow:hover:not(:disabled) {
    box-shadow: var(--shadow);
}

.listing-card-carousel__arrow:disabled {
    opacity: 0.35;
    pointer-events: none;
}

.listing-card-carousel__arrow[hidden] {
    display: none;
}

.listing-card-carousel__arrow--prev {
    left: 0.35rem;
}

.listing-card-carousel__arrow--next {
    right: 0.35rem;
}

@media (max-width: 719px) {
    .listing-card-carousel__arrow {
        display: none;
    }
}

.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, var(--brand-soft), color-mix(in srgb, var(--brand-2) 15%, white));
}

.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: var(--gradient);
    color: #fff;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 30%, transparent);
}

.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-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, var(--brand-soft), color-mix(in srgb, var(--brand-2) 15%, white));
}

.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.94);
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.1);
    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: trust bar */
.listing-trust-bar {
    position: relative;
}

.dark .listing-trust-bar {
    box-shadow: none;
}

.dark .listing-trust-signal-icon {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
}

/* 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);
}

.dark .listing-detail-chips .chip:not(.chip-verified) {
    background: color-mix(in srgb, var(--brand) 16%, var(--surface));
    color: var(--text);
    border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}

.dark .listing-detail-chips .chip-verified {
    color: #6ee7b7;
}

/* Loop card: interest UI */
.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(400px, calc(50% - 0.5rem));
        scroll-snap-align: start;
    }
}

@media (max-width: 600px) {
    .detail-loops-summary { padding: 0.85rem 1rem; }
    .detail-loops-body { padding-inline: 0.85rem; }
}

/* 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%, var(--brand-soft)) 0%, color-mix(in srgb, var(--brand-2) 12%, color-mix(in srgb, var(--brand-2) 12%, white)) 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: var(--brand);
}

.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: var(--brand);
}

.dark .pick-chip-btn {
    background: var(--surface);
    color: var(--text);
    border-color: var(--line);
}

.dark .pick-chip-btn:hover {
    background: color-mix(in srgb, var(--brand) 10%, var(--surface));
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
}

.dark .pick-chip-btn.is-picked {
    background: color-mix(in srgb, var(--brand) 22%, var(--surface));
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    color: color-mix(in srgb, var(--brand) 45%, var(--text));
}

.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 {
    --brand-logo-size: 94px;
}

@media (max-width: 767px) {
    .site-footer-logo .brand-logo {
        --brand-logo-size: 80px;
    }
}

.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-link-btn {
    display: inline;
    padding: 0;
    border: 0;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease;
}

.site-footer-link-btn: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-badges--sm .store-badge-link {
    width: 6.75rem;
}

.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: 639px) {
    .store-badges {
        text-align: center;
    }

    .store-badges-row {
        justify-content: center;
        gap: 0.5rem;
    }
}

.legal-prose h2 {
    font-size: 1.1rem;
    margin: 1.25rem 0 0.5rem;
}

.legal-prose .legal-lead {
    margin-bottom: 1rem;
}
.legal-processor-list {
    padding-left: 1.2rem;
    margin: 0.5rem 0 0.75rem;
    list-style: disc;
}
.legal-processor-list li {
    margin-bottom: 0.35rem;
    line-height: 1.5;
}

.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: var(--brand);
}

.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: var(--brand); }

.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 {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    overflow: hidden;
    border-radius: 14px;
}

.dash-user-avatar .profile-avatar-img,
.dash-user-avatar .profile-avatar-fallback {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    border-radius: 14px;
    object-fit: cover;
}

.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: var(--brand);
    font-size: 0.72rem;
    font-weight: 700;
}

.dark .profile-interest-tags li {
    color: var(--brand);
}

.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,
.profile-form-grid .field--readonly select:disabled {
    opacity: 1;
    cursor: not-allowed;
    background: var(--surface-soft);
    color: var(--muted);
}

.profile-lock-notice {
    grid-column: 1 / -1;
    margin: 0 0 0.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    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-stat-cell {
        padding: 0.85rem 0.9rem;
    }
}

.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: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.chat-page-head-main {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 14rem;
}

.chat-page-head-main .chip-live {
    justify-self: start;
    margin-top: 0.15rem;
}

.chat-page-unread {
    flex-shrink: 0;
    align-self: center;
}

.chat-page-unread[hidden],
.chat-page-unread.is-hidden {
    display: none !important;
}

.chat-page-head h1 {
    margin: 0;
}

.chip-live {
    background: color-mix(in srgb, var(--accent, #6366f1) 18%, transparent);
    color: var(--accent, #6366f1);
}

.chip-live.is-connected {
    background: color-mix(in srgb, #10b981 16%, transparent);
    color: #047857;
}

.chip-live.is-connecting {
    background: color-mix(in srgb, var(--accent, #6366f1) 18%, transparent);
    color: var(--accent, #6366f1);
}

.chip-live.is-offline {
    background: color-mix(in srgb, #64748b 14%, transparent);
    color: #64748b;
}

.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.is-hidden {
    display: none !important;
}

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

.toast-regret {
    align-self: flex-start;
    margin-top: 0.15rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
    background: color-mix(in srgb, var(--brand-soft) 70%, var(--surface));
    color: var(--brand);
    font-size: 0.78rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.18s ease;
}

.toast-regret:hover:not(:disabled) {
    transform: translateY(-1px);
    opacity: 0.9;
}

.toast-regret:disabled,
.toast-regret.is-expired {
    opacity: 0.45;
    cursor: not-allowed;
}


/* ═══════════════════════════════════════════════════════════════════
   SWAP HUB — Listing-grid match hub page
   ═══════════════════════════════════════════════════════════════════ */

.swap-hub-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - var(--header-h, 80px));
    background: var(--bg);
    max-width: 100%;
    overflow-x: clip;
}

/* ── Hero header ── */
.hub-hero {
    background: var(--gradient);
    padding: 2rem 0 1.6rem;
}

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

.hub-hero-title {
    margin: 0 0 0.3rem;
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: -0.035em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.hub-hero-sub {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.78);
}

.hub-picker-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.hub-picker-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
}

.hub-picker-select {
    font-size: 0.85rem;
    padding: 0.45rem 0.75rem;
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.15);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    backdrop-filter: blur(6px);
}

.hub-picker-select option { background: var(--surface); color: var(--text); }

/* ── Page body ── */
.hub-body {
    flex: 1;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* ── My home strip ── */
.hub-my-strip {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    background: color-mix(in srgb, var(--brand) 7%, var(--bg));
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    border-radius: calc(var(--radius) + 2px);
}

.hub-my-strip-photo {
    flex: 0 0 3rem;
    width: 3rem;
    height: 3rem;
    border-radius: 10px;
    overflow: hidden;
    background: color-mix(in srgb, var(--brand) 12%, var(--bg));
    display: grid;
    place-items: center;
    font-size: 1.4rem;
}

.hub-my-strip-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hub-my-strip-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.hub-my-strip-label {
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--brand);
}

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

.hub-my-strip-loc {
    font-size: 0.78rem;
    color: var(--muted);
}

.hub-my-strip-actions { flex-shrink: 0; }

.hub-no-listing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2.5rem;
    text-align: center;
    background: var(--surface-soft);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 1.5rem;
}

.hub-no-listing p { font-size: 0.9rem; margin: 0; }

/* ── Filter bar ── */
.hub-filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: space-between;
    border-bottom: 2px solid var(--line);
    padding-bottom: 0;
}

.hub-filter-tabs {
    display: flex;
    gap: 0;
    align-items: flex-end;
}

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

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

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

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

.hub-filter-count--loop { background: var(--brand-mid); }

.hub-only-open-check {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
    padding-bottom: 0.65rem;
}

.hub-only-open-check input[type="checkbox"] {
    width: 0.9rem;
    height: 0.9rem;
    flex-shrink: 0;
    accent-color: var(--brand);
}

.hub-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-left: auto;
    padding-bottom: 0.65rem;
}

.hub-view-toggle {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 999px;
    overflow: hidden;
    background: var(--surface-soft);
}

.hub-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.65rem;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.hub-view-btn + .hub-view-btn {
    border-left: 1px solid var(--line);
}

.hub-view-btn.is-active {
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
    color: var(--brand);
}

.hub-view-btn-label {
    display: none;
}

@media (min-width: 640px) {
    .hub-view-btn-label {
        display: inline;
    }
}

/* ── State panels ── */
.hub-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--muted);
}

.hub-state[hidden] {
    display: none !important;
}

/* Tighten space between filter tabs and first listing row */
.hub-filter-bar + .hub-state[hidden] + .hub-grid,
.hub-filter-bar + .hub-grid {
    margin-top: 0.15rem;
}

.hub-grid > .hub-tier-divider:first-child {
    padding-top: 0;
}

/* Loading dots */
.hub-loading-dots {
    display: flex;
    gap: 0.4rem;
    justify-content: center;
}

.hub-loading-dots span {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--brand);
    animation: hubDot 1.2s ease-in-out infinite;
}

.hub-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.hub-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes hubDot {
    0%, 80%, 100% { transform: scale(0.4); opacity: 0.3; }
    40%            { transform: scale(1);   opacity: 1; }
}

/* ── Grid ── */
.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.1rem;
}

.hub-grid.hub-grid--list {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    --hub-list-row-h: 6.5rem;
}

.hub-grid--list .hub-card {
    display: grid;
    grid-template-columns: 7.25rem minmax(0, 1fr) auto;
    grid-template-rows: var(--hub-list-row-h);
    align-items: stretch;
    height: var(--hub-list-row-h);
    min-height: var(--hub-list-row-h);
    max-height: var(--hub-list-row-h);
    overflow: hidden;
}

.hub-grid--list .hub-card--loop {
    grid-template-columns: 12.5rem minmax(0, 1fr) auto;
}

.hub-grid--list .hub-card--loop .hub-card-body {
    gap: 0.18rem;
    justify-content: center;
}

.hub-grid--list .hub-card--loop .hub-card-name {
    font-size: 0.86rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-card-loop-listings {
    margin: 0;
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.3;
}

.hub-grid--list .hub-card--loop .hub-card-loop-listings {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-card-loop-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.05rem;
}

.hub-card-loop-chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--brand-mid) 85%, var(--text));
    background: color-mix(in srgb, var(--brand-mid) 10%, var(--bg));
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    white-space: nowrap;
}

.hub-card-loop-chip--interest {
    color: #15803d;
    background: color-mix(in srgb, #22c55e 12%, var(--bg));
}

.hub-grid--list .hub-card--loop .hub-card-interest-badge {
    display: none;
}

.hub-grid--list .hub-card--loop .hub-card-foot {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    min-width: 7.5rem;
}

.hub-grid--list .hub-card--loop .hub-card-foot .button {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.72rem;
    padding: 0.42rem 0.55rem;
}

.hub-grid--list .hub-card--loop .hub-card-foot .button + .button {
    flex: 0 0 auto;
}

.hub-grid--list .hub-card-photo {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: var(--hub-list-row-h);
    min-height: var(--hub-list-row-h);
    max-height: var(--hub-list-row-h);
    align-self: stretch;
    overflow: hidden;
}

.hub-grid--list .hub-card-photo--loop {
    min-height: var(--hub-list-row-h);
    max-height: var(--hub-list-row-h);
}

.hub-grid--list .hub-card-photo > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hub-grid--list .hub-loop-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 100%;
    height: var(--hub-list-row-h);
    min-height: var(--hub-list-row-h);
    max-height: var(--hub-list-row-h);
}

.hub-grid--list .hub-loop-photo {
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.hub-grid--list .hub-loop-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hub-grid--list .hub-loop-conn-badge {
    display: none;
}

.hub-grid--list .hub-card-type-badge {
    top: 0.35rem;
    left: 0.35rem;
    max-width: calc(100% - 3.25rem);
    padding: 0.18rem 0.45rem;
    font-size: 0.62rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-grid--list .hub-card-score-badge {
    top: 0.35rem;
    right: 0.35rem;
    padding: 0.18rem 0.35rem;
    font-size: 0.68rem;
    min-width: 0;
}

.hub-grid--list .hub-card-body {
    grid-column: 2;
    grid-row: 1;
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 0.75rem 0.85rem;
    justify-content: center;
    overflow: hidden;
    border-left: 1px solid var(--line);
}

.hub-grid--list .hub-card-foot {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.65rem 0.85rem;
    border-left: 1px solid var(--line);
    flex-wrap: nowrap;
}

.hub-grid--list .hub-card-foot .button {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Direct swap cards — compact fixed-height list row */
.hub-grid--list .hub-card--direct {
    grid-template-columns: 9rem minmax(0, 1fr) auto;
    contain: layout style paint;
    contain-intrinsic-size: auto var(--hub-list-row-h);
}

.hub-grid--list .hub-card--direct .hub-card-photo {
    height: var(--hub-list-row-h);
    min-height: var(--hub-list-row-h);
    max-height: var(--hub-list-row-h);
}

.hub-grid--list .hub-card--direct .hub-card-photo > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hub-grid--list .hub-card--direct .hub-card-type-badge {
    top: 0.3rem;
    left: 0.3rem;
    max-width: calc(100% - 2.75rem);
    padding: 0.15rem 0.4rem;
    font-size: 0.58rem;
}

.hub-grid--list .hub-card--direct .hub-card-score-badge {
    top: 0.3rem;
    right: 0.3rem;
    padding: 0.15rem 0.32rem;
    font-size: 0.64rem;
    min-width: 0;
}

.hub-grid--list .hub-card--direct .hub-card-you-badge {
    bottom: 0.3rem;
    right: 0.3rem;
    left: auto;
    max-width: calc(100% - 0.6rem);
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
}

.hub-grid--list .hub-card--direct .hub-card-body {
    justify-content: center;
    gap: 0.14rem;
    padding: 0.45rem 0.85rem;
    overflow: hidden;
}

.hub-grid--list .hub-card--direct .hub-card-emoji {
    display: none;
}

.hub-grid--list .hub-card--direct .hub-card-name {
    font-size: 0.86rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-grid--list .hub-card--direct .hub-card-subline {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0.45rem;
    min-width: 0;
    overflow: hidden;
}

.hub-grid--list .hub-card--direct .hub-card-loc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    flex: 1 1 auto;
    min-width: 0;
}

.hub-grid--list .hub-card--direct .hub-card-meta {
    flex: 0 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.hub-grid--list .hub-card--direct .hub-card-meta::before {
    content: '·';
    margin-right: 0.45rem;
    color: var(--muted);
    opacity: 0.65;
}

.hub-grid--list .hub-card--direct .hub-card-host {
    font-size: 0.74rem;
    line-height: 1.25;
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-grid--list .hub-card--direct .hub-card-reasons {
    margin-top: 0.08rem;
    gap: 0.2rem;
    flex-wrap: nowrap;
    overflow: hidden;
}

.hub-grid--list .hub-card--direct .hub-card-reasons span {
    font-size: 0.66rem;
    padding: 0.1rem 0.35rem;
    flex: 0 0 auto;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-grid--list .hub-card--direct .hub-card-foot {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    align-self: stretch;
    gap: 0.35rem;
    padding: 0.65rem 0.75rem;
    min-width: 6.75rem;
}

.hub-grid--list .hub-card--direct .hub-card-foot .button {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}

.hub-grid--list .hub-card--direct .hub-card-foot .button + .button {
    flex: 0 0 auto;
}

.hub-grid--list .hub-card:hover {
    transform: none;
}

.hub-grid--list .hub-card:hover .hub-card-photo img {
    transform: none;
}

@media (max-width: 719px) {
    /* Grid view: one full-width card per row */
    .hub-grid:not(.hub-grid--list) {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.75rem;
    }

    .hub-grid:not(.hub-grid--list) .hub-card-photo,
    .hub-grid:not(.hub-grid--list) .hub-card-photo--loop {
        height: 168px;
    }

    .hub-grid:not(.hub-grid--list) .hub-card-body {
        padding: 0.75rem 0.85rem 0.6rem;
    }

    .hub-grid:not(.hub-grid--list) .hub-card-foot {
        padding: 0 0.85rem 0.85rem;
    }

    /* List view: direct swaps stay compact horizontal rows */
    .hub-grid.hub-grid--list {
        --hub-list-row-h: 5.75rem;
        gap: 0.55rem;
    }

    .hub-grid--list .hub-card--direct {
        grid-template-columns: 5.5rem minmax(0, 1fr) auto;
    }

    .hub-grid--list .hub-card--direct .hub-card-body {
        padding: 0.38rem 0.55rem;
        gap: 0.1rem;
    }

    .hub-grid--list .hub-card--direct .hub-card-name {
        font-size: 0.8rem;
    }

    .hub-grid--list .hub-card--direct .hub-card-host {
        font-size: 0.68rem;
    }

    .hub-grid--list .hub-card--direct .hub-card-reasons span {
        font-size: 0.62rem;
        padding: 0.08rem 0.3rem;
    }

    .hub-grid--list .hub-card--direct .hub-card-foot {
        flex-direction: column;
        justify-content: center;
        gap: 0.25rem;
        min-width: 0;
        padding: 0.4rem 0.45rem;
    }

    .hub-grid--list .hub-card--direct .hub-card-foot .button {
        font-size: 0.68rem;
        padding: 0.38rem 0.45rem;
    }

    .hub-grid--list .hub-card--direct .hub-card-foot .button + .button {
        display: none;
    }

    /* List view: 3-way loops stack vertically for clarity */
    .hub-grid--list .hub-card--loop {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto;
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .hub-grid--list .hub-card--loop .hub-card-photo--loop {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        height: 8.25rem;
        min-height: 8.25rem;
        max-height: 8.25rem;
    }

    .hub-grid--list .hub-card--loop .hub-loop-photos {
        height: 8.25rem;
        min-height: 8.25rem;
        max-height: 8.25rem;
    }

    .hub-grid--list .hub-card--loop .hub-card-body {
        grid-column: 1;
        grid-row: 2;
        border-left: 0;
        border-top: 1px solid var(--line);
        padding: 0.7rem 0.85rem;
        overflow: visible;
        justify-content: flex-start;
        gap: 0.3rem;
    }

    .hub-grid--list .hub-card--loop .hub-card-name {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        font-size: 0.92rem;
    }

    .hub-grid--list .hub-card--loop .hub-card-loop-listings {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
        display: block;
        -webkit-line-clamp: unset;
    }

    .hub-grid--list .hub-card--loop .hub-card-foot {
        grid-column: 1;
        grid-row: 3;
        flex-direction: row;
        align-items: stretch;
        border-left: 0;
        border-top: 1px solid var(--line);
        padding: 0.65rem 0.85rem 0.85rem;
        min-width: 0;
        gap: 0.5rem;
    }

    .hub-grid--list .hub-card--loop .hub-card-foot .button {
        flex: 1 1 auto;
        font-size: 0.78rem;
    }

    .hub-grid--list .hub-card--loop .hub-card-type-badge {
        max-width: calc(50% - 2rem);
    }

    .hub-grid--list .hub-card-type-badge {
        max-width: calc(100% - 2.5rem);
        font-size: 0.56rem;
        padding: 0.12rem 0.32rem;
    }

    .hub-grid--list .hub-card-score-badge {
        font-size: 0.6rem;
        padding: 0.12rem 0.28rem;
    }
}

/* Tier section dividers — full-width, sit outside the card grid columns */
.hub-tier-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--muted);
    text-transform: uppercase;
}

.hub-tier-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
    opacity: 0.6;
}

.hub-tier-divider--strong { color: #16a34a; }
.hub-tier-divider--good   { color: var(--brand); }
.hub-tier-divider--possible { color: var(--muted); }
.hub-tier-divider--explore  { color: var(--muted); opacity: 0.7; }

/* ── Card ── */
.hub-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 3px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    content-visibility: auto;
    contain-intrinsic-size: auto 320px;
    contain: layout style paint;
}

@media (hover: hover) and (pointer: fine) {
    .hub-card {
        transition: box-shadow 0.18s, border-color 0.18s, transform 0.15s;
    }

    .hub-card:hover {
        box-shadow: 0 4px 20px color-mix(in srgb, var(--brand) 15%, transparent);
        border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
        transform: translateY(-2px);
    }

    .hub-card-photo img {
        transition: transform 0.4s ease;
    }

    .hub-card:hover .hub-card-photo img { transform: scale(1.04); }
}

.hub-card.is-active {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}

/* Card photo area */
.hub-card-photo {
    position: relative;
    height: 168px;
    background: color-mix(in srgb, var(--brand) 8%, var(--surface-soft));
    overflow: hidden;
}

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

.hub-card-ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 3.5rem;
    opacity: 0.35;
}

/* Swap type badge (top-left of photo) */
.hub-card-type-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hub-card-type-badge--direct {
    background: color-mix(in srgb, var(--brand) 90%, transparent);
    color: #fff;
}

.hub-card-type-badge--loop {
    background: color-mix(in srgb, var(--brand-mid) 90%, transparent);
    color: #fff;
}

/* Score badge (top-right of photo) */
.hub-card-score-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    min-width: 2.4rem;
    text-align: center;
    padding: 0.22rem 0.4rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    background: var(--sc, #f97316);
}

.hub-card-interest-badge {
    position: absolute;
    bottom: 0.6rem;
    left: 0.6rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #fff;
    background: rgba(34, 197, 94, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 3-way card photo layout */
.hub-card-photo--loop { height: 168px; }

.hub-loop-photos {
    display: flex;
    height: 100%;
    align-items: stretch;
    gap: 0;
}

.hub-loop-photo {
    flex: 1;
    overflow: hidden;
    background: color-mix(in srgb, var(--brand) 6%, var(--surface-soft));
    position: relative;
    display: grid;
    place-items: center;
    font-size: 2.5rem;
}

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

.hub-loop-conn-badge {
    flex: 0 0 2.2rem;
    display: grid;
    place-items: center;
    background: var(--surface);
    color: var(--brand-mid);
    font-size: 1rem;
    font-weight: 900;
    z-index: 1;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
}

/* Card body */
.hub-card-body {
    flex: 1;
    padding: 0.85rem 0.9rem 0.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.hub-card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.4rem;
    justify-content: space-between;
}

.hub-card-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.hub-card-emoji {
    font-size: 1.05rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.hub-card-loc {
    font-size: 0.78rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-card-subline {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.hub-card-meta {
    font-size: 0.75rem;
    color: var(--muted);
}

.hub-card-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.15rem;
}

.hub-card-reasons span {
    font-size: 0.7rem;
    color: color-mix(in srgb, var(--brand) 80%, var(--text));
    background: color-mix(in srgb, var(--brand) 8%, var(--bg));
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

/* Card footer */
.hub-card-foot {
    display: flex;
    gap: 0.5rem;
    padding: 0 0.9rem 0.85rem;
    flex-shrink: 0;
}

.hub-card-foot .button { flex: 1; text-align: center; justify-content: center; }
.hub-card-foot .button + .button { flex: 0 0 auto; }

/* ── Drawer ── */
.hub-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 800;
    background: var(--surface);
    border-top: 1px solid var(--line);
    border-radius: 20px 20px 0 0;
    max-height: 90dvh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.32,0.72,0,1);
    box-shadow: 0 -4px 40px rgba(0,0,0,0.18);
    padding: 1.5rem 1.25rem 2rem;
}

.hub-drawer.is-open { transform: translateY(0); }

.hub-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 799;
    background: rgba(15, 23, 42, 0.45);
}

body.hub-drawer-open {
    overflow: hidden;
}

.hub-drawer-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    color: var(--muted);
    transition: background 0.15s, color 0.15s;
}

.hub-drawer-close:hover { background: color-mix(in srgb, var(--brand) 10%, var(--bg)); color: var(--text); }

/* Detail pill */
.hub-detail-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    letter-spacing: 0.02em;
}

.hub-detail-pill--direct { background: color-mix(in srgb, var(--brand) 15%, var(--bg)); color: var(--brand); }
.hub-detail-pill--loop   { background: color-mix(in srgb, var(--brand-mid) 15%, var(--bg)); color: var(--brand-mid); }

/* Direct swap detail arena */
.hub-detail-arena {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.hub-detail-home {
    flex: 1 1 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
}

.hub-detail-home strong { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.hub-detail-home span   { font-size: 0.75rem; color: var(--muted); }

.hub-detail-photo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-soft);
    display: grid;
    place-items: center;
    font-size: 2rem;
}

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

.hub-detail-conn {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.hub-detail-conn svg:first-child {
    width: 160px;
    height: 64px;
}

/* Score ring inside drawer */
.hub-detail-score-ring {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}

.hub-detail-score-ring svg { width: 52px; height: 52px; display: block; }

.hub-ring-bg {
    fill: none;
    stroke: var(--line);
    stroke-width: 4;
}

.hub-ring-fill {
    fill: none;
    stroke: #22c55e;
    stroke-width: 4;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.04s linear, stroke 0.2s;
}

.hub-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
}

.hub-ring-pct { font-size: 0.5rem; font-weight: 600; color: var(--muted); }

/* Match reasons */
.hub-reasons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.hub-reason-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 10%, var(--bg));
    color: color-mix(in srgb, var(--brand) 80%, var(--text));
    font-size: 0.73rem;
    font-weight: 600;
    animation: chipIn 0.25s ease both;
}

@keyframes chipIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

/* Drawer action bar */
.hub-drawer-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.hub-drawer-actions .button { flex: 1 1 auto; text-align: center; justify-content: center; }

/* 3-way chain layout */
.hub-tri-chain {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.hub-tri-stop {
    flex: 1 1 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.3rem;
    min-width: 80px;
}

.hub-tri-stop--you .hub-tri-photo {
    border: 2px solid var(--brand);
}

.hub-tri-photo {
    width: 68px;
    height: 68px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-soft);
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

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

.hub-tri-role {
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--brand-mid);
}

.hub-tri-role--you  { color: var(--brand); }
.hub-tri-role--link { color: var(--muted); font-style: italic; }

.hub-tri-stop strong { font-size: 0.78rem; font-weight: 700; color: var(--text); }
.hub-tri-stop span   { font-size: 0.7rem; color: var(--muted); }

.hub-tri-view-btn {
    font-size: 0.72rem;
    color: var(--brand);
    text-decoration: none;
    font-weight: 700;
}

.hub-tri-arrow {
    flex: 0 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 1.8rem;
    gap: 0.1rem;
}

.hub-tri-arrow-line {
    width: 1px;
    height: 1.5rem;
    background: var(--line);
}

.hub-loop-score {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 1.1rem;
}

/* Interest toggle button */
.hub-interest-toggle {
    min-width: 9rem;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.hub-interest-toggle.is-on,
.hub-interested-btn.is-done {
    background: #22c55e;
    border-color: #16a34a;
    color: #fff;
}

.hub-interest-toggle.is-on:hover:not(:disabled) {
    background: #16a34a;
    border-color: #15803d;
}

.hub-interest-toggle:disabled {
    opacity: 0.72;
    cursor: wait;
}

.hub-interest-toggle[aria-busy="true"] {
    pointer-events: none;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (min-width: 640px) {
    .hub-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

    .hub-drawer {
        right: auto;
        left: auto;
        width: min(520px, 95vw);
        left: 50%;
        transform: translateX(-50%) translateY(100%);
        border-radius: 20px 20px 0 0;
    }

    .hub-drawer.is-open {
        transform: translateX(-50%) translateY(0);
    }
}

@media (min-width: 900px) {
    .hub-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

    .hub-drawer {
        position: fixed;
        top: var(--header-h, 64px);
        bottom: 0;
        right: 0;
        left: auto;
        width: 420px;
        border-radius: 0;
        border-top: 1px solid var(--line);
        border-left: 1px solid var(--line);
        max-height: calc(100dvh - var(--header-h, 64px));
        overflow-y: auto;
        transform: translateX(100%);
        box-shadow: -4px 0 40px rgba(0,0,0,0.15);
    }

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

    .hub-tri-chain { flex-direction: column; gap: 0.75rem; }
    .hub-tri-arrow { flex-direction: row; padding: 0; }
    .hub-tri-arrow-line { width: 1.5rem; height: 1px; }
    .hub-tri-stop { flex-direction: row; text-align: left; align-items: center; }
    .hub-tri-stop .hub-tri-photo { flex-shrink: 0; }
    .hub-tri-stop > div { display: flex; flex-direction: column; gap: 0.1rem; }
}

@media (max-width: 719px) {
    .hub-hero {
        padding: 1.35rem 0 1.1rem;
    }

    .hub-hero-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .hub-hero-title {
        font-size: 1.3rem;
    }

    .hub-picker-wrap {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        flex-shrink: 1;
    }

    .hub-picker-label {
        white-space: normal;
    }

    .hub-picker-select {
        width: 100%;
        max-width: 100%;
    }

    .hub-body {
        padding-top: 1.1rem;
        padding-bottom: 2rem;
        min-width: 0;
    }

    .hub-my-strip {
        flex-wrap: wrap;
        padding: 0.85rem;
        gap: 0.75rem;
    }

    .hub-my-strip-actions {
        width: 100%;
    }

    .hub-my-strip-actions .button {
        width: 100%;
        justify-content: center;
    }

    .hub-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }

    .hub-filter-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
        min-width: 0;
    }

    .hub-filter-tab {
        justify-content: center;
        white-space: normal;
        text-align: center;
        padding: 0.5rem 0.35rem 0.55rem;
        font-size: 0.72rem;
        line-height: 1.2;
        min-width: 0;
    }

    .hub-only-open-check {
        padding-bottom: 0;
        align-items: flex-start;
        line-height: 1.35;
    }

    .hub-only-open-check span {
        min-width: 0;
    }

    .hub-grid:not(.hub-grid--list) {
        min-width: 0;
    }

    .hub-card {
        min-width: 0;
    }

    .hub-card-body,
    .hub-card-foot {
        min-width: 0;
    }

    .hub-card-foot {
        flex-wrap: wrap;
    }

    .hub-card-foot .button {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 0;
    }

    .hub-card-foot .button:first-child {
        flex: 1 1 100%;
    }

    .hub-card-photo {
        height: 140px;
    }

    .hub-drawer {
        width: 100%;
        max-width: 100%;
        padding-left: max(1rem, env(safe-area-inset-left, 0px));
        padding-right: max(1rem, env(safe-area-inset-right, 0px));
    }

    .hub-drawer-inner {
        max-width: 100%;
        overflow-x: clip;
    }

    .hub-detail-arena {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .hub-detail-conn svg:first-child {
        display: none;
    }

    .hub-detail-score-ring {
        align-self: center;
    }

    .hub-detail-home {
        min-width: 0;
    }

    .hub-detail-home strong,
    .hub-detail-home span {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .hub-tri-chain {
        flex-direction: column;
        gap: 0.75rem;
        overflow-x: visible;
        padding-bottom: 0;
    }

    .hub-tri-arrow {
        flex-direction: row;
        padding: 0;
        align-self: center;
    }

    .hub-tri-arrow-line {
        width: 1.5rem;
        height: 1px;
    }

    .hub-tri-stop {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-rows: auto auto auto auto;
        gap: 0.12rem 0.65rem;
        align-items: center;
        text-align: left;
        min-width: 0;
        width: 100%;
    }

    .hub-tri-photo {
        grid-row: 1 / span 4;
        grid-column: 1;
    }

    .hub-tri-role,
    .hub-tri-stop strong,
    .hub-tri-stop > span:not(.hub-tri-role),
    .hub-tri-view-btn {
        grid-column: 2;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .hub-drawer-actions {
        flex-direction: column;
    }

    .hub-drawer-actions .button {
        width: 100%;
        flex: 1 1 auto;
        min-width: 0;
    }

    .hub-interest-toggle {
        min-width: 0;
        width: 100%;
    }

    .hub-reasons,
    .hub-interest-panel {
        max-width: 100%;
        min-width: 0;
    }
}

/* ── Auth page (login / register) ────────────────────────────────────── */
.auth-page {
    min-height: calc(100dvh - var(--header-h));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem var(--page-pad-x);
    position: relative;
    overflow: hidden;
}

.auth-blob {
    position: absolute;
    border-radius: 999px;
    filter: blur(90px);
    pointer-events: none;
    opacity: 0.5;
}

.auth-blob--1 {
    width: 520px;
    height: 520px;
    top: -220px;
    left: -180px;
    background: color-mix(in srgb, var(--brand) 18%, transparent);
}

.auth-blob--2 {
    width: 380px;
    height: 380px;
    bottom: -160px;
    right: -120px;
    background: color-mix(in srgb, var(--brand-2) 16%, transparent);
}

.auth-card {
    position: relative;
    width: min(100%, 440px);
    background: var(--surface);
    border: 1px solid color-mix(in srgb, var(--line) 90%, transparent);
    border-radius: 28px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.10), 0 2px 8px rgba(15, 23, 42, 0.04);
    padding: 2rem 2rem 1.75rem;
    z-index: 1;
}

.dark .auth-card {
    border-color: var(--line);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.auth-card-brand {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1.75rem;
    text-decoration: none;
    width: fit-content;
}

.auth-card-brand .brand-logo {
    width: 38px !important;
    height: 38px !important;
}

.auth-card-brand-name {
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    background-image: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.auth-card-head {
    margin-bottom: 1.5rem;
}

.auth-card-head h1 {
    margin: 0 0 0.3rem;
    font-size: clamp(1.55rem, 4vw, 2rem);
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -0.035em;
    color: var(--text);
}

.auth-card-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.auth-alert {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.auth-alert--error {
    background: color-mix(in srgb, #dc2626 8%, var(--surface));
    border: 1px solid color-mix(in srgb, #dc2626 28%, transparent);
    color: #dc2626;
}

.auth-alert--success {
    background: color-mix(in srgb, var(--good) 8%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--good) 30%, transparent);
    color: var(--good);
}

.auth-tabs {
    display: flex;
    gap: 0.2rem;
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    padding: 0.22rem;
    margin-bottom: 1.5rem;
}

.dark .auth-tabs {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
}

.auth-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    border-radius: 11px;
    padding: 0.5rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}

.auth-tab-btn.is-active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.09);
}

.dark .auth-tab-btn.is-active {
    background: var(--surface-2);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}

.auth-tab-btn--social {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 0.45rem 0.35rem;
    line-height: 1;
}

.auth-tab-btn--social .modal-tab-social-label {
    font-size: 0.62rem;
}

.auth-tab-panel[hidden] { display: none; }

.auth-hint {
    font-size: 0.82rem;
    color: var(--muted);
    text-align: center;
    line-height: 1.55;
    margin: 0.75rem 0;
}

.auth-pin-sent-to {
    font-size: 0.875rem;
    color: var(--muted);
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.auth-pin-sent-to strong { color: var(--text); }

.auth-pin-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.auth-pin-actions .button {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.55rem 0.75rem;
    min-height: 38px;
}

.auth-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    border: 1.5px solid var(--line);
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius);
    padding: 0.8rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.auth-google-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.auth-google-btn:hover {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
    background: var(--brand-soft);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

.auth-card-footer {
    margin: 1.5rem 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line-soft);
}

.auth-card-footer a {
    color: var(--brand);
    font-weight: 700;
}

.auth-card-footer a:hover { text-decoration: underline; }

/* Check-row inside auth card */
.auth-card .check-row {
    margin-bottom: 1.25rem;
    cursor: pointer;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem 1.25rem 1.5rem;
        border-radius: 22px;
    }

    .auth-card-head h1 { font-size: 1.55rem; }
}

/* ══════════════════════════════════════════════════════════════════════════
   SWAP HUB — Interest progress panel
   ══════════════════════════════════════════════════════════════════════════ */

.hub-interest-panel {
    margin: 1rem 0;
    padding: 0.875rem 1rem;
    background: color-mix(in srgb, var(--brand) 6%, var(--card));
    border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
    border-radius: 12px;
}

.hub-interest-parties {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.hub-int-pip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    min-width: 52px;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    background: var(--card);
    border: 1.5px solid var(--line);
    font-size: 0.7rem;
    color: var(--muted);
    transition: border-color 0.2s, background 0.2s;
}

.hub-int-pip.is-on {
    border-color: var(--brand);
    color: var(--brand);
    background: color-mix(in srgb, var(--brand) 10%, var(--card));
}

.hub-int-pip-dot {
    font-size: 1rem;
    line-height: 1;
}

.hub-int-pip-name {
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.hub-interest-status {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0 0 0.5rem;
}

.hub-interest-status--complete {
    color: var(--green, #22c55e);
    font-weight: 700;
}

.hub-interest-status--partial {
    color: var(--brand);
    font-weight: 600;
}

.hub-interest-finalize {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    margin-top: 0.25rem;
}

/* ── Toast notification ───────────────────────────────────────── */

.hub-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(120%);
    z-index: 9999;
    background: var(--card);
    border: 1.5px solid var(--brand);
    border-radius: 14px;
    padding: 0.875rem 1.25rem;
    max-width: min(380px, calc(100vw - 2rem));
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}

.hub-toast.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.hub-toast--error { border-color: #ef4444; }
.hub-toast--success { border-color: #22c55e; }

.hub-toast-title { font-weight: 700; font-size: 0.875rem; }
.hub-toast-body  { font-size: 0.8rem; color: var(--muted); }

.hub-toast-link {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
}
.hub-toast-link:hover { text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════════════
   SWAP FINALIZE PAGE
   ══════════════════════════════════════════════════════════════════════════ */

.finalize-page { padding: 2rem 1rem 4rem; max-width: 860px; margin: 0 auto; }

.finalize-hero { margin-bottom: 2rem; }
.finalize-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.85rem;
    text-decoration: none;
    margin-bottom: 1rem;
}
.finalize-back:hover { color: var(--text); }
.finalize-hero-badge {
    display: inline-block;
    background: color-mix(in srgb, var(--brand-2) 12%, var(--card));
    color: var(--brand-2);
    border: 1px solid var(--brand-2);
    border-radius: 20px;
    padding: 0.2rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.finalize-hero-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    margin: 0 0 0.5rem;
}
.finalize-hero-sub { color: var(--muted); margin: 0; }

/* Progress tracker */
.finalize-progress {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0 0 2rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.finalize-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 80px;
    opacity: 0.4;
    transition: opacity 0.2s;
}
.finalize-step--done { opacity: 1; }

.finalize-step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--line);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    border: 2px solid var(--line);
}
.finalize-step--done .finalize-step-icon {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.finalize-step-label {
    font-size: 0.7rem;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
}

.finalize-step-connector {
    flex: 1;
    height: 2px;
    background: var(--line);
    min-width: 24px;
    margin-bottom: 1.4rem;
}

/* Booked banner */
.finalize-booked-banner {
    background: color-mix(in srgb, #22c55e 12%, var(--card));
    border: 1.5px solid #22c55e;
    color: #166534;
    border-radius: 14px;
    padding: 1rem 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}
.dark .finalize-booked-banner { color: #bbf7d0; }

/* Grid */
.finalize-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 640px) { .finalize-grid { grid-template-columns: 1fr; } }

.finalize-card { padding: 1.25rem !important; }
.finalize-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
}
.finalize-card-sub { font-size: 0.82rem; color: var(--muted); margin: 0 0 0.875rem; }

/* Chain */
.finalize-chain {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.finalize-chain-stop {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 110px;
    flex: 1;
}
.finalize-chain-stop--you .finalize-chain-photo { border: 2px solid var(--brand); }
.finalize-chain-photo {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    background: var(--well);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
.finalize-chain-photo img { width: 100%; height: 100%; object-fit: cover; }
.finalize-chain-info { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.8rem; }
.finalize-chain-arrow {
    font-size: 1.25rem;
    color: var(--brand);
    padding-top: 1.5rem;
    align-self: flex-start;
}
.finalize-chain-you-badge {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Parties */
.finalize-parties { display: flex; flex-direction: column; gap: 0.75rem; }
.finalize-party {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 10px;
    background: var(--well);
    border: 1px solid transparent;
}
.finalize-party--you { border-color: var(--brand); }
.finalize-party-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.finalize-party-info { flex: 1; min-width: 0; font-size: 0.82rem; }
.finalize-party-info strong { display: block; font-weight: 700; }
.finalize-party-checks {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    align-items: flex-end;
}
.finalize-check {
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 500;
}
.finalize-check--ok { color: #22c55e; font-weight: 700; }

/* Insurance section */
.finalize-insurance-ok {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: color-mix(in srgb, #22c55e 10%, var(--card));
    border: 1px solid #22c55e;
    border-radius: 10px;
}
.finalize-insurance-icon { font-size: 1.5rem; flex-shrink: 0; }

/* What's next */
.finalize-next { padding: 1.5rem !important; }
.finalize-next h2 { margin: 0 0 1rem; font-size: 1rem; font-weight: 800; }
.finalize-next-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    counter-reset: next;
}
.finalize-next-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 10px;
    background: var(--well);
    counter-increment: next;
}
.finalize-next-list li.is-done { background: color-mix(in srgb, #22c55e 8%, var(--well)); }
.finalize-next-list li::before {
    content: counter(next);
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--line);
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    flex-shrink: 0;
}
.finalize-next-list li.is-done::before { background: #22c55e; color: #fff; content: '✓'; }
.finalize-next-list li > * { display: block; }
.finalize-next-list li strong { font-size: 0.85rem; font-weight: 700; }
.finalize-next-list li .meta { font-size: 0.78rem; }

/* ══════════════════════════════════════════════════════════════════════════
   DASHBOARD — Finalize swap CTAs
   ══════════════════════════════════════════════════════════════════════════ */

.dash-list-item--accepted {
    border-left: 3px solid var(--brand);
    padding-left: 0.75rem;
    margin-left: -0.75rem;
}

.chip--green {
    background: color-mix(in srgb, #22c55e 15%, var(--card));
    color: #166534;
    border-color: #22c55e;
}
.dark .chip--green { color: #bbf7d0; }

.dash-finalize-banner {
    margin: 0.5rem 0;
    padding: 0.625rem 0.875rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand) 6%, var(--card));
    border: 1px solid color-mix(in srgb, var(--brand) 20%, transparent);
}

.dash-finalize-banner .button { display: inline-flex; }

.dash-finalize-prompt {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0 0 0.5rem;
}

.dash-finalize-ok {
    font-size: 0.85rem;
    font-weight: 700;
    color: #22c55e;
}

/* ── Hub: personal "you marked" badge ── */
.hub-card-you-badge {
    position: absolute;
    bottom: 0.6rem;
    right: 0.6rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2, #6366f1) 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    max-width: calc(100% - 1.2rem);
    overflow: hidden;
    text-overflow: ellipsis;
    z-index: 2;
}

.hub-card--you-marked {
    border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 18%, transparent);
}

.hub-card--you-marked.is-active {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 28%, transparent);
}

/* ── Identity verification page ── */
.verify-identity-page .lead { margin-bottom: 1.25rem; }
.verify-identity-banner {
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    margin: 1rem 0;
}
.verify-identity-banner--ok { border-color: color-mix(in srgb, #22c55e 40%, var(--line)); background: color-mix(in srgb, #22c55e 8%, var(--panel)); }
.verify-identity-banner--pending { border-color: color-mix(in srgb, #f59e0b 35%, var(--line)); }
.verify-identity-banner--warn { border-color: color-mix(in srgb, #ef4444 35%, var(--line)); }
.verify-identity-list { padding-left: 1.2rem; margin: 0.5rem 0 1rem; }
.verify-identity-list li + li { margin-top: 0.35rem; }
.verify-identity-start { margin-top: 1rem; }
.verify-identity-foot { margin-top: 1.5rem; }
.dash-nav-badge {
    font-style: normal;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: color-mix(in srgb, #f59e0b 18%, transparent);
    color: #b45309;
    margin-left: 0.35rem;
}
.legal-checkbox {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 0.75rem 0;
}
.legal-checkbox input { margin-top: 0.2rem; flex-shrink: 0; }
.dash-verify-prompt,
.insurance-verify-prompt { margin-bottom: 0.65rem; }
.verify-identity-upload { margin-top: 1.25rem; max-width: 32rem; }
.verify-identity-upload .field + .field { margin-top: 1rem; }
.verify-identity-profile-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand) 6%, var(--panel));
    margin: 0.75rem 0 1rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   DASHBOARD — My swap marks page
   ══════════════════════════════════════════════════════════════════════════ */

.my-swaps-head { margin-bottom: 1rem; }

.my-swaps-stats {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.my-swaps-stat {
    flex: 1;
    min-width: 120px;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 7%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.my-swaps-stat strong {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--brand);
}

.my-swaps-stat span {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}

.my-swaps-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.35rem;
    background: var(--surface-soft, var(--well));
    border-radius: 14px;
    border: 1px solid var(--line);
}

.my-swaps-tab {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.my-swaps-tab:hover {
    color: var(--text);
    background: color-mix(in srgb, var(--brand) 6%, transparent);
}

.my-swaps-tab.is-active {
    background: var(--surface);
    color: var(--brand);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.my-swaps-tab-count {
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--brand) 15%, var(--surface));
    color: var(--brand);
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-grid;
    place-items: center;
}

.my-swap-card {
    margin-bottom: 1rem;
}

.my-swap-card-badge-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.my-swap-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.my-swap-type-pill--direct {
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
    color: var(--brand);
}

.my-swap-type-pill--loop {
    background: color-mix(in srgb, var(--brand-2, #6366f1) 12%, var(--surface));
    color: var(--brand-2, #6366f1);
}

.my-swap-you-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2, #6366f1));
}

.my-swap-arena {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

@media (max-width: 560px) {
    .my-swap-arena { grid-template-columns: 1fr; }
    .my-swap-conn { display: none; }
}

.my-swap-home {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    min-width: 0;
}

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

.my-swap-thumb--empty {
    display: grid;
    place-items: center;
    background: var(--well);
    font-size: 1.5rem;
}

.my-swap-role {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 0.15rem;
}

.my-swap-conn {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--brand);
    text-align: center;
}

.my-swap-dates { margin: 0 0 0.85rem; }

.my-swap-loop-chain {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.my-swap-loop-stop {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.82rem;
}

.my-swap-loop-stop--you .my-swap-loop-photo {
    border: 2px solid var(--brand);
}

.my-swap-loop-photo {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 8px;
    object-fit: cover;
    background: var(--well);
}

.my-swap-loop-photo--empty {
    display: grid;
    place-items: center;
    font-size: 1.5rem;
}

.my-swap-loop-arrow {
    color: var(--brand);
    padding-top: 2rem;
    font-weight: 900;
}

.my-swap-parties {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
}

.my-swap-party-pip {
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: var(--well);
    color: var(--muted);
    border: 1px solid var(--line);
}

.my-swap-party-pip.is-on {
    color: #16a34a;
    border-color: #22c55e;
    background: color-mix(in srgb, #22c55e 10%, var(--surface));
}

.my-swap-party-pip.is-you {
    font-weight: 700;
    border-color: var(--brand);
}

.my-swaps-empty {
    text-align: center;
    padding: 2.5rem 1.5rem !important;
}

.my-swaps-empty-icon {
    display: block;
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.my-swaps-empty h2 {
    margin: 0 0 0.5rem;
    font-size: 1.15rem;
}

/* ══════════════════════════════════════════════
   Identity verification — modern multi-step modal
   ══════════════════════════════════════════════ */
.idv-stage {
    display: flex;
    justify-content: center;
    padding: 0.25rem 0 1.5rem;
}
.idv-card {
    width: 100%;
    max-width: 40rem;
    padding: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    position: relative;
}
.idv-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: var(--gradient);
}
.idv-flash {
    margin: 1.1rem 1.4rem 0;
}
.idv-flash--warn {
    border-color: color-mix(in srgb, #ef4444 45%, var(--line));
    background: color-mix(in srgb, #ef4444 8%, var(--surface));
}

/* ── Header ── */
.idv-head {
    padding: 1.9rem 1.6rem 1.1rem;
    text-align: center;
}
.idv-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
    background: var(--brand-soft);
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
}
.idv-eyebrow svg { width: 0.95rem; height: 0.95rem; }
.idv-head h1 {
    margin: 0.7rem 0 0.4rem;
    font-size: clamp(1.5rem, 4vw, 1.95rem);
    line-height: 1.15;
}
.idv-intro {
    margin: 0 auto;
    max-width: 30rem;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

/* ── Progress steps ── */
.idv-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0.5rem 1.2rem 0;
    flex-wrap: wrap;
}
.idv-step {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}
.idv-step::after {
    content: "";
    width: 1.1rem;
    height: 2px;
    border-radius: 2px;
    background: var(--line);
    margin-left: 0.35rem;
}
.idv-step:last-child::after { display: none; }
.idv-step-num {
    display: inline-grid;
    place-items: center;
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: var(--surface);
    font-size: 0.78rem;
    font-weight: 800;
    transition: all 0.2s ease;
}
.idv-step-label { display: none; }
.idv-step.is-active { color: var(--text); }
.idv-step.is-active .idv-step-num {
    border-color: transparent;
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent);
}
.idv-step.is-active .idv-step-label { display: inline; }
.idv-step.is-done .idv-step-num {
    border-color: var(--good);
    background: var(--good);
    color: #fff;
}
.idv-step.is-done .idv-step-num { font-size: 0; }
.idv-step.is-done .idv-step-num::after {
    content: "✓";
    font-size: 0.85rem;
}

/* ── Body ── */
.idv-body {
    padding: 1rem 1.6rem 0.4rem;
}
.idv-step-counter {
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.68rem;
    color: var(--brand);
    margin: 0 0 0.9rem;
}
.idv-panel { display: none; animation: idvFade 0.3s ease; }
.idv-panel.is-active { display: block; }
@keyframes idvFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}
.idv-panel-title {
    margin: 0 0 0.3rem;
    font-size: 1.2rem;
}
.idv-panel-sub {
    margin: 0 0 1.1rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ── Document type cards ── */
.idv-doc-grid {
    display: grid;
    gap: 0.7rem;
}
.idv-doc-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    width: 100%;
    text-align: left;
    padding: 0.95rem 1rem;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}
.idv-doc-card:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); transform: translateY(-1px); }
.idv-doc-card.is-selected {
    border-color: var(--brand);
    background: var(--brand-soft);
}
.idv-doc-icon {
    display: grid;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    flex-shrink: 0;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 12%, var(--surface));
    color: var(--brand);
}
.idv-doc-icon svg { width: 1.5rem; height: 1.5rem; }
.idv-doc-text { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; }
.idv-doc-text strong { font-size: 0.98rem; }
.idv-doc-text .meta { font-size: 0.8rem; }
.idv-doc-check {
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: 2px solid var(--line);
    color: transparent;
    flex-shrink: 0;
    transition: all 0.18s ease;
}
.idv-doc-check svg { width: 0.9rem; height: 0.9rem; }
.idv-doc-card.is-selected .idv-doc-check {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}
.idv-profile-chip {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.1rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}
.idv-profile-chip .profile-avatar-img,
.idv-profile-chip .profile-avatar-fallback {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    object-fit: cover;
}
.idv-profile-chip span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.idv-profile-chip .meta { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; }
.idv-profile-chip strong { font-size: 0.88rem; }

/* ── Dropzone ── */
.idv-drop {
    position: relative;
    border-radius: 16px;
}
.idv-drop-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 2rem 1rem;
    border: 2px dashed color-mix(in srgb, var(--brand) 35%, var(--line));
    border-radius: 16px;
    background: color-mix(in srgb, var(--brand) 4%, var(--surface));
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}
.idv-drop-trigger:hover,
.idv-drop.is-drag .idv-drop-trigger {
    border-color: var(--brand);
    background: var(--brand-soft);
}
.idv-drop-frame {
    display: grid;
    place-items: center;
    color: var(--brand);
    border: 2px solid color-mix(in srgb, var(--brand) 40%, var(--line));
    background: var(--surface);
}
.idv-drop-frame svg { width: 2rem; height: 2rem; }
.idv-drop-frame--card {
    width: 5.5rem;
    height: 3.6rem;
    border-radius: 10px;
}
.idv-drop-frame--face {
    width: 4.4rem;
    height: 4.4rem;
    border-radius: 50%;
}
.idv-drop-cta { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.idv-drop-hint { font-size: 0.78rem; }

.idv-drop-preview {
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #0b1220;
}
.idv-drop-preview img {
    display: block;
    width: 100%;
    max-height: 18rem;
    object-fit: contain;
    background: #0b1220;
}
.idv-drop-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.65rem;
    background: var(--surface);
}
.idv-pill {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.idv-pill:hover { border-color: var(--brand); color: var(--brand); }
.idv-pill--danger:hover { border-color: #ef4444; color: #ef4444; }

/* idle stage buttons */
.idv-drop-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.6rem;
}
.idv-cam-open {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.idv-cam-open svg { width: 1.05rem; height: 1.05rem; }
.idv-link-btn {
    border: none;
    background: none;
    color: var(--brand);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Live camera ── */
.idv-cam {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #0b1220;
}
.idv-cam-viewport {
    position: relative;
    width: 100%;
    background: #0b1220;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}
.idv-cam-viewport video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.idv-cam-viewport video.is-mirrored { transform: scaleX(-1); }
.idv-cam-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: 0 0 0 100vmax rgba(11, 18, 32, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 14px;
}
.idv-cam-overlay--card {
    /* ID-1 card ratio framing */
    inset: 14% 8%;
    border-radius: 14px;
}
.idv-cam-overlay--face {
    inset: 8% 22%;
    border-radius: 50%;
}
.idv-cam-error {
    margin: 0;
    padding: 0.6rem 0.9rem;
    font-size: 0.82rem;
    color: #fecaca;
    background: rgba(220, 38, 38, 0.25);
}
.idv-cam-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    background: var(--surface);
}
.idv-cam-controls .idv-pill { min-width: 4.5rem; }
.idv-shutter {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    border: none;
    background: var(--gradient);
    cursor: pointer;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 32%, transparent);
    transition: transform 0.1s ease;
    flex-shrink: 0;
}
.idv-shutter:active { transform: scale(0.93); }
.idv-shutter-ring {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: 3px solid #fff;
    background: rgba(255, 255, 255, 0.18);
}

/* ── Tips & skip ── */
.idv-tips {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
}
.idv-tips li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--muted);
}
.idv-tips li::before {
    content: "✓";
    font-weight: 800;
    color: var(--good);
}
.idv-skip {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.1rem;
    font-size: 0.85rem;
    color: var(--muted);
    cursor: pointer;
}
.idv-skip input { width: 1.05rem; height: 1.05rem; accent-color: var(--brand); }

/* ── Review ── */
.idv-review-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
}
.idv-review-item { margin: 0; }
.idv-review-thumb {
    display: grid;
    place-items: center;
    aspect-ratio: 3 / 2;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface-soft) center / cover no-repeat;
    color: var(--muted);
    font-size: 0.72rem;
    text-align: center;
}
.idv-review-item.is-filled .idv-review-thumb { border-color: var(--good); }
.idv-review-item figcaption {
    margin-top: 0.35rem;
    text-align: center;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--muted);
}
.idv-assure {
    margin-top: 1.1rem;
    display: grid;
    gap: 0.5rem;
}
.idv-assure p {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
}
.idv-assure svg { width: 1.1rem; height: 1.1rem; color: var(--good); flex-shrink: 0; }

/* ── Footer ── */
.idv-foot {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.1rem 1.6rem;
    margin-top: 0.6rem;
    border-top: 1px solid var(--line);
    background: var(--surface-soft);
}
.idv-foot-spacer { flex: 1; }
.idv-foot .button { min-width: 8rem; justify-content: center; }
.idv-next:disabled { opacity: 0.45; cursor: not-allowed; }
.idv-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.idv-spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: idvSpin 0.7s linear infinite;
}
.idv-submit.is-loading .idv-spinner { display: inline-block; }
@keyframes idvSpin { to { transform: rotate(360deg); } }
.idv-privacy {
    padding: 0 1.6rem 1.5rem;
    margin: 0;
    text-align: center;
    font-size: 0.78rem;
}
.idv-privacy a { color: var(--brand); }

/* ── Status states (verified / pending / rejected) ── */
.idv-status {
    text-align: center;
    padding: 2.4rem 1.6rem 1.6rem;
}
.idv-status-icon {
    display: grid;
    place-items: center;
    width: 4rem;
    height: 4rem;
    margin: 0 auto 0.9rem;
    border-radius: 50%;
}
.idv-status-icon svg { width: 2.1rem; height: 2.1rem; }
.idv-status h1 { margin: 0 0 0.4rem; font-size: 1.5rem; }
.idv-status p { max-width: 28rem; margin: 0.25rem auto; }
.idv-status .button { margin-top: 1rem; }
.idv-status--ok .idv-status-icon { background: var(--good-soft); color: var(--good); }
.idv-status--pending .idv-status-icon { background: color-mix(in srgb, #f59e0b 16%, transparent); color: #d97706; }
.idv-status--warn .idv-status-icon { background: color-mix(in srgb, #ef4444 14%, transparent); color: #dc2626; }

@media (max-width: 540px) {
    .idv-head { padding: 1.5rem 1.1rem 0.9rem; }
    .idv-body { padding: 0.9rem 1.1rem 0.3rem; }
    .idv-foot { padding: 1rem 1.1rem; }
    .idv-privacy { padding: 0 1.1rem 1.2rem; }
    .idv-step::after { width: 0.7rem; }
    .idv-foot .button { min-width: 0; flex: 1; }
    .idv-review-thumb { font-size: 0.66rem; }
}

/* ══════════════════════════════════════════════════════════════════════════
   DASHBOARD — Wallet & Stripe
   ══════════════════════════════════════════════════════════════════════════ */

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

.wallet-stripe-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: color-mix(in srgb, #f59e0b 12%, var(--surface));
    color: #b45309;
    border: 1px solid color-mix(in srgb, #f59e0b 28%, var(--line));
}

.wallet-stripe-pill--ready {
    background: color-mix(in srgb, #10b981 12%, var(--surface));
    color: #047857;
    border-color: color-mix(in srgb, #10b981 28%, var(--line));
}

.wallet-alert { margin-bottom: 1rem; }

.wallet-stats {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.wallet-stat {
    flex: 1;
    min-width: 120px;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: color-mix(in srgb, var(--brand) 7%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.wallet-stat strong {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--brand);
}

.wallet-stat span {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
}

.wallet-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.wallet-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-height: 100%;
}

.wallet-card h2 {
    margin: 0;
    font-size: 1.05rem;
}

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

.wallet-card .button {
    margin-top: auto;
    align-self: flex-start;
}

.wallet-connect-done {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--good, #047857);
}

.wallet-transactions-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.wallet-transactions-head h2 {
    margin: 0 0 0.2rem;
}

.wallet-empty {
    padding: 1.5rem 0 0.5rem;
}

.wallet-empty h3 {
    margin: 0 0 0.35rem;
}

.wallet-table-wrap {
    overflow-x: auto;
}

.wallet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.wallet-table th,
.wallet-table td {
    padding: 0.75rem 0.65rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.wallet-table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.wallet-ref {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.78rem;
    color: var(--muted);
}

.wallet-status {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.wallet-status--ok {
    background: #d1fae5;
    color: #047857;
}

.wallet-status--warn {
    background: #fef3c7;
    color: #b45309;
}

.wallet-status--muted {
    background: var(--well, #f3f4f6);
    color: var(--muted);
}

.wallet-row-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
}

.payment-result-head {
    margin-bottom: 1rem;
}

.payment-result-eyebrow {
    color: #047857;
}

.payment-result-eyebrow--warn {
    color: #b45309;
}

.payment-result-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 720px;
}

.payment-result-card--success {
    border-color: color-mix(in srgb, #10b981 28%, var(--line));
    box-shadow: 0 18px 40px color-mix(in srgb, #10b981 10%, transparent);
}

.payment-result-card--failed {
    border-color: color-mix(in srgb, #f59e0b 28%, var(--line));
}

.payment-result-icon {
    font-size: 2.4rem;
    line-height: 1;
}

.payment-result-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem 1rem;
    margin: 0;
}

.payment-result-summary div {
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: color-mix(in srgb, var(--brand) 6%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--brand) 14%, var(--line));
}

.payment-result-summary dt {
    margin: 0 0 0.2rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.payment-result-summary dd {
    margin: 0;
    font-weight: 700;
}

.payment-result-note {
    margin: 0;
}

.payment-result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.checkout-session-timer {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: color-mix(in srgb, #f59e0b 10%, var(--surface));
    border: 1px solid color-mix(in srgb, #f59e0b 24%, var(--line));
    color: #92400e;
    font-size: 0.82rem;
}

.checkout-session-timer__value {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.checkout-session-timer--expired,
.checkout-session-timer.is-expired {
    background: color-mix(in srgb, #ef4444 10%, var(--surface));
    border-color: color-mix(in srgb, #ef4444 24%, var(--line));
    color: #b91c1c;
}

@media (max-width: 720px) {
    .wallet-table thead { display: none; }

    .wallet-table tr {
        display: block;
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--line);
    }

    .wallet-table td {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        border: 0;
        padding: 0.25rem 0;
    }

    .wallet-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
}

/* ── Member page editor & public profile ───────────────────────────────────── */
.member-page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.member-page-alert {
    border-left: 4px solid var(--brand);
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}

.member-page-progress {
    padding: 1rem 1.15rem;
}

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

.member-page-section-head h2 {
    margin: 0 0 0.25rem;
    font-size: 1.15rem;
}

.member-page-tools {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
    max-width: 100%;
}

.member-page-templates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.member-page-template-btn {
    cursor: pointer;
    border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--line));
    background: color-mix(in srgb, var(--brand) 6%, var(--surface));
    color: var(--text);
}

.member-page-template-btn:hover {
    border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
    background: var(--brand-soft);
}

.member-page-ai-btn {
    white-space: nowrap;
}

.member-page-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.member-page-gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--surface-2);
}

.member-page-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.member-page-gallery-item--pending {
    outline: 2px dashed color-mix(in srgb, var(--brand) 45%, transparent);
}

.member-page-gallery-remove {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 1.65rem;
    height: 1.65rem;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.member-page-gallery-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.25rem;
    padding: 0.85rem 1rem;
    border: 1px dashed color-mix(in srgb, var(--brand) 35%, var(--line));
    border-radius: 14px;
    background: color-mix(in srgb, var(--brand) 4%, var(--surface));
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    color: var(--brand);
}

.member-page-gallery-upload input {
    display: none;
}

.member-page-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    cursor: pointer;
}

.member-page-form {
    display: grid;
    gap: 1rem;
}

.member-public-page {
    display: grid;
    gap: 1.25rem;
    padding-bottom: 2.5rem;
}

.member-public-hero {
    display: grid;
    gap: 1.25rem;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 100% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 55%),
        radial-gradient(90% 70% at 0% 100%, color-mix(in srgb, var(--brand-2) 10%, transparent), transparent 50%),
        var(--surface);
}

@media (min-width: 860px) {
    .member-public-hero {
        grid-template-columns: minmax(0, 1.5fr) minmax(12rem, 0.55fr);
        align-items: start;
    }
}

.member-public-hero-main {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    min-width: 0;
}

.member-public-avatar-wrap {
    flex-shrink: 0;
    width: 7.5rem;
    height: 7.5rem;
    padding: 3px;
    border-radius: 1.35rem;
    background: linear-gradient(145deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #fff));
    box-shadow: 0 14px 36px color-mix(in srgb, var(--brand) 22%, transparent);
    overflow: hidden;
}

.member-public-avatar-wrap .member-public-avatar-img,
.member-public-avatar-wrap .profile-avatar-img,
.member-public-avatar-wrap .profile-avatar-fallback {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border-radius: 1.15rem;
    object-fit: cover;
    object-position: center top;
}

.member-public-avatar-img,
.member-public-avatar .profile-avatar-img,
.member-public-avatar .profile-avatar-fallback {
    width: 7rem !important;
    height: 7rem !important;
    border-radius: 22px;
    box-shadow: 0 12px 30px color-mix(in srgb, var(--brand) 18%, transparent);
}

.member-public-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
}

.member-public-name {
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 2.35rem);
    line-height: 1.08;
}

.member-public-headline {
    margin: 0.45rem 0 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--text) 82%, var(--muted));
}

.member-public-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.85rem;
}

.member-public-chip {
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
    border-color: color-mix(in srgb, var(--brand) 18%, var(--line));
}

.member-public-chip--verified {
    background: color-mix(in srgb, var(--good, #10b981) 12%, var(--surface));
    border-color: color-mix(in srgb, var(--good, #10b981) 28%, var(--line));
    color: color-mix(in srgb, var(--good, #059669) 85%, var(--text));
}

.member-public-intro {
    margin: 1rem 0 0;
    font-size: 1rem;
    line-height: 1.65;
    color: color-mix(in srgb, var(--text) 88%, var(--muted));
}

.member-public-rating {
    margin: 0.65rem 0 0;
}

.member-public-actions {
    display: grid;
    gap: 0.55rem;
}

.member-public-actions form {
    margin: 0;
}

.member-public-aside {
    display: grid;
    gap: 0.85rem;
}

.member-public-stats {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.member-public-stats dt {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.member-public-stats dd {
    margin: 0.1rem 0 0;
    font-weight: 700;
}

.member-public-gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-auto-rows: 8.5rem;
    gap: 0.55rem;
}

.member-public-gallery-cell {
    margin: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface-2);
}

.member-public-gallery-cell--lead {
    grid-column: span 3;
    grid-row: span 2;
}

.member-public-gallery-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.member-public-body {
    display: grid;
    gap: 1rem;
}

.member-public-block h2 {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
}

.member-public-prose {
    line-height: 1.7;
    color: color-mix(in srgb, var(--text) 90%, var(--muted));
}

.member-public-columns {
    display: grid;
    gap: 1rem;
}

@media (min-width: 860px) {
    .member-public-columns {
        grid-template-columns: 1fr 1fr;
    }
}

.member-public-tags {
    margin: 0;
}

.member-public-listings-head h2 {
    margin: 0 0 0.85rem;
    font-size: 1.25rem;
}

.member-public-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 0.85rem;
}

.member-public-listing-card {
    display: grid;
    gap: 0;
    padding: 0;
    overflow: hidden;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.member-public-listing-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.member-public-listing-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--surface-2);
}

.member-public-listing-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.member-public-listing-body h3 {
    margin: 0 0 0.2rem;
    font-size: 0.95rem;
}

.host-trust-name a {
    color: inherit;
    text-decoration: none;
}

.host-trust-name a:hover {
    color: var(--brand);
    text-decoration: underline;
}

.member-link {
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.member-link:hover {
    color: var(--brand);
    text-decoration: underline;
}

.profile-avatar-link {
    display: inline-flex;
    border-radius: 12px;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.profile-avatar-link:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.profile-avatar-link:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

@media (max-width: 720px) {
    .member-public-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 7rem;
    }

    .member-public-gallery-cell--lead {
        grid-column: span 2;
        grid-row: span 1;
    }

    .member-public-hero-main {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .member-public-chips {
        justify-content: center;
    }

    .member-public-rating {
        display: flex;
        justify-content: center;
    }
}

/* Star ratings */
.star-rating {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.star-rating-stars {
    display: inline-flex;
    gap: 0.08rem;
    line-height: 1;
}

.star-rating-star {
    color: color-mix(in srgb, var(--muted) 35%, var(--line));
    font-size: 1rem;
}

.star-rating-star.is-full {
    color: #f59e0b;
}

.star-rating-star.is-half {
    background: linear-gradient(90deg, #f59e0b 50%, color-mix(in srgb, var(--muted) 35%, var(--line)) 50%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.star-rating--sm .star-rating-star { font-size: 0.85rem; }
.star-rating--md .star-rating-star { font-size: 1rem; }
.star-rating--lg .star-rating-star { font-size: 1.15rem; }

.star-rating-meta strong {
    font-weight: 800;
    color: var(--text);
}

.host-trust-rating {
    margin-top: 0.45rem;
}

/* Host reviews (listing sidebar) */
.host-reviews-panel {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
}

.host-reviews-list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.host-review-item {
    padding: 0.65rem 0.75rem;
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--brand) 5%, var(--surface-2, var(--surface)));
    border: 1px solid color-mix(in srgb, var(--brand) 10%, var(--line));
}

.host-review-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.host-review-author {
    margin: 0.35rem 0 0;
}

.host-review-body {
    margin: 0.35rem 0 0;
    font-size: 0.88rem;
    line-height: 1.5;
}

.host-reviews-more {
    display: inline-block;
    margin-top: 0.65rem;
    text-decoration: none;
}

.host-reviews-more:hover {
    color: var(--brand);
}

/* Member page reviews */
.member-reviews-block {
    display: grid;
    gap: 1rem;
}

.member-reviews-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.member-reviews-head h2 {
    margin: 0;
}

.member-reviews-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.member-review-card {
    display: grid;
    gap: 0.35rem;
}

.member-review-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.member-review-author {
    margin: 0;
}

.member-review-body {
    margin: 0;
    line-height: 1.6;
}

/* Dashboard reviews */
.reviews-page {
    display: grid;
    gap: 1.25rem;
}

.reviews-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    background:
        radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 55%),
        var(--surface);
    border-color: color-mix(in srgb, var(--brand) 22%, var(--line));
}

.reviews-banner-copy strong {
    display: block;
    font-size: 1.05rem;
}

.reviews-banner-copy p {
    margin: 0.25rem 0 0;
}

.reviews-pending-list,
.review-pending-card {
    display: grid;
    gap: 1rem;
}

.review-pending-card {
    padding: 1rem;
    border-radius: 0.85rem;
    border: 1px solid var(--line);
    background: color-mix(in srgb, var(--brand) 4%, var(--surface));
}

.review-pending-summary strong {
    display: block;
}

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

.review-stars-input {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.12rem;
}

.review-stars-input input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.review-stars-input label {
    cursor: pointer;
    line-height: 1;
}

.review-stars-input label span {
    display: block;
    font-size: 1.85rem;
    color: color-mix(in srgb, var(--muted) 35%, var(--line));
    transition: color 0.12s ease, transform 0.12s ease;
}

.review-stars-input label:hover span,
.review-stars-input label:hover ~ label span,
.review-stars-input input:checked ~ label span {
    color: #f59e0b;
}

.review-stars-input label:hover span {
    transform: scale(1.06);
}

.review-public-toggle {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.92rem;
    cursor: pointer;
}

.review-public-toggle input {
    margin-top: 0.2rem;
}

/* Listing emoji features (Swaphouse-style) */
.listing-subsection-title {
    margin: 1.25rem 0 0.5rem;
    font-size: 1rem;
    font-weight: 800;
}

.listing-emoji-grid {
    display: grid;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

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

@media (max-width: 640px) {
    .listing-emoji-grid--cols-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.listing-emoji-choice {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    min-height: 5.75rem;
    padding: 0.75rem 0.5rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: color-mix(in srgb, var(--surface) 92%, #fff);
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.listing-emoji-choice:hover,
.listing-emoji-choice.is-selected {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--brand) 50%, var(--line));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 12%, transparent);
}

.listing-emoji-choice.is-selected {
    background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}

.listing-emoji-choice input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.listing-emoji-choice-icon {
    font-size: 1.65rem;
    line-height: 1;
}

.listing-emoji-choice-label {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text);
}

.listing-room-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.listing-room-card {
    display: grid;
    gap: 0.45rem;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.listing-room-card-select {
    width: 100%;
}

.listing-about-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.listing-about-stats li {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    color: var(--text);
}

.listing-about-stat-emoji {
    font-size: 1.35rem;
    line-height: 1;
}

.listing-room-display-grid,
.listing-wfh-grid {
    display: grid;
    gap: 0.75rem;
}

.listing-room-display-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.listing-wfh-grid {
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
}

@media (min-width: 720px) {
    .listing-room-display-grid {
        grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    }
}

@media (max-width: 380px) {
    .listing-room-display-card {
        padding: 0.7rem 0.75rem;
    }

    .listing-room-display-card strong {
        font-size: 0.88rem;
    }

    .listing-room-display-card .meta {
        font-size: 0.76rem;
        line-height: 1.35;
    }
}

.listing-room-display-card,
.listing-wfh-card {
    display: grid;
    gap: 0.25rem;
    padding: 0.9rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.listing-room-display-emoji,
.listing-wfh-emoji {
    font-size: 1.5rem;
    line-height: 1;
}

.listing-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (max-width: 640px) {
    .listing-feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.listing-feature-grid--rules .listing-feature-item {
    grid-template-columns: auto 1fr auto;
}

.listing-feature-item {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.92rem;
    color: var(--text);
}

.listing-feature-emoji {
    font-size: 1.25rem;
    line-height: 1;
}

.listing-feature-show-all {
    margin-top: 0.85rem;
}

.listing-swaphouse-section + .listing-swaphouse-section {
    margin-top: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   SWAP DISCOVER — premium card-stack experience
   ═══════════════════════════════════════════════════════════════════ */

html.discover-app-root,
body.discover-app {
    margin: 0; padding: 0;
    overflow: hidden;
    height: 100%; min-height: 100dvh;
}
body.discover-app .toast-root {
    z-index: 9999;
    top: max(0.85rem, env(safe-area-inset-top, 0.85rem));
}

.dsc-page {
    z-index: 1;
    --dsc-fg: #0f172a;
    --dsc-fg-muted: rgba(15, 23, 42, 0.52);
    --dsc-fg-soft: rgba(15, 23, 42, 0.72);
    --dsc-page-bg: radial-gradient(ellipse 140% 90% at 50% -10%, #ede9fe 0%, #f7f7fb 48%, #eef2ff 100%);
    --dsc-chrome-bg: rgba(255, 255, 255, 0.9);
    --dsc-chrome-border: rgba(15, 23, 42, 0.1);
    --dsc-chrome-fg: #0f172a;
    --dsc-brand-grad: linear-gradient(90deg, #6d28d9 0%, #be185d 100%);
    --dsc-footer-fade: linear-gradient(to top, rgba(247, 247, 251, 0.97) 0%, transparent 100%);
    --dsc-sheet-bg: #ffffff;
    --dsc-sheet-border: rgba(15, 23, 42, 0.08);
    --dsc-sheet-muted: rgba(15, 23, 42, 0.58);
    --dsc-sheet-soft: rgba(15, 23, 42, 0.72);
    --dsc-sheet-chip-bg: rgba(15, 23, 42, 0.04);
    --dsc-sheet-chip-border: rgba(15, 23, 42, 0.08);
    --dsc-loading-bg: radial-gradient(ellipse at center, #ede9fe 0%, #f7f7fb 60%);
    --dsc-loading-fg: rgba(15, 23, 42, 0.52);
    --dsc-scrim: rgba(15, 23, 42, 0.42);
    --dsc-action-info-bg: rgba(255, 255, 255, 0.96);
    --dsc-action-info-border: rgba(15, 23, 42, 0.14);
    --dsc-action-info-fg: #334155;
    --dsc-select-bg: rgba(255, 255, 255, 0.94);
    --dsc-select-border: rgba(15, 23, 42, 0.12);
    --dsc-card-shadow-0: 0 28px 72px rgba(15, 23, 42, 0.2), 0 6px 20px rgba(15, 23, 42, 0.1);
    --dsc-card-shadow-1: 0 14px 36px rgba(15, 23, 42, 0.14);
    --dsc-card-shadow-2: 0 6px 18px rgba(15, 23, 42, 0.1);
    --dsc-empty-fg: rgba(15, 23, 42, 0.55);
    --dsc-pass-btn-bg: #fff;
    --dsc-pass-btn-shadow: 0 8px 28px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.08);
}

html.dark .dsc-page {
    --dsc-fg: #fff;
    --dsc-fg-muted: rgba(255, 255, 255, 0.48);
    --dsc-fg-soft: rgba(255, 255, 255, 0.78);
    --dsc-page-bg: radial-gradient(ellipse 140% 90% at 50% -10%, #1e0a40 0%, #0d0a1e 50%, #0a0a14 100%);
    --dsc-chrome-bg: rgba(255, 255, 255, 0.1);
    --dsc-chrome-border: rgba(255, 255, 255, 0.16);
    --dsc-chrome-fg: #fff;
    --dsc-brand-grad: linear-gradient(90deg, #c4b5fd 0%, #f9a8d4 100%);
    --dsc-footer-fade: linear-gradient(to top, rgba(10, 8, 20, 0.88) 0%, transparent 100%);
    --dsc-sheet-bg: #15152a;
    --dsc-sheet-border: rgba(255, 255, 255, 0.1);
    --dsc-sheet-muted: rgba(255, 255, 255, 0.58);
    --dsc-sheet-soft: rgba(255, 255, 255, 0.88);
    --dsc-sheet-chip-bg: rgba(255, 255, 255, 0.06);
    --dsc-sheet-chip-border: rgba(255, 255, 255, 0.08);
    --dsc-loading-bg: radial-gradient(ellipse at center, #1a0840 0%, #0a0a14 60%);
    --dsc-loading-fg: rgba(255, 255, 255, 0.5);
    --dsc-scrim: rgba(0, 0, 0, 0.52);
    --dsc-action-info-bg: rgba(255, 255, 255, 0.11);
    --dsc-action-info-border: rgba(255, 255, 255, 0.2);
    --dsc-action-info-fg: rgba(255, 255, 255, 0.92);
    --dsc-select-bg: rgba(255, 255, 255, 0.08);
    --dsc-select-border: rgba(255, 255, 255, 0.2);
    --dsc-card-shadow-0: 0 28px 72px rgba(0, 0, 0, 0.72), 0 6px 20px rgba(0, 0, 0, 0.5);
    --dsc-card-shadow-1: 0 14px 36px rgba(0, 0, 0, 0.5);
    --dsc-card-shadow-2: 0 6px 18px rgba(0, 0, 0, 0.35);
    --dsc-empty-fg: rgba(255, 255, 255, 0.52);
    --dsc-pass-btn-bg: #fff;
    --dsc-pass-btn-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.25);
}

html.discover-app-root:not(.dark),
html.discover-app-root:not(.dark) body.discover-app {
    background: var(--bg);
}
html.discover-app-root.dark,
html.discover-app-root.dark body.discover-app {
    background: #0f0f1a;
}

/* ── page shell ──────────────────────────────────────────────────── */
.dsc-page {
    position: fixed;
    inset: 0;
    background: var(--dsc-page-bg);
    color: var(--dsc-fg);
    font-family: inherit;
    overflow: hidden;
    transition: background 0.25s ease, color 0.25s ease;
}

/* ── topbar ──────────────────────────────────────────────────────── */
.dsc-topbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: max(0.85rem, env(safe-area-inset-top, 0.85rem)) 1rem 0.7rem;
    pointer-events: none;
}
.dsc-topbar > * { pointer-events: auto; }

.dsc-back-btn {
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--dsc-chrome-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--dsc-chrome-border);
    color: var(--dsc-chrome-fg);
    text-decoration: none;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.dsc-back-btn:hover {
    background: color-mix(in srgb, var(--dsc-chrome-bg) 82%, var(--dsc-chrome-fg) 18%);
    transform: scale(1.05);
    color: var(--dsc-chrome-fg);
}

.dsc-topbar-mid {
    flex: 1; min-width: 0;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 1px;
}

.dsc-counter {
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--dsc-fg-muted);
    min-height: 1em;
}

.dsc-topbar-brand {
    display: block;
    font-size: 0.96rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: var(--dsc-brand-grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dsc-topbar-spacer { width: 40px; flex-shrink: 0; }

.dsc-select {
    width: auto;
    min-width: 5.5rem;
    max-width: min(48vw, 240px);
    flex-shrink: 1;
    padding: 0.38rem 1.75rem 0.38rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--dsc-select-border);
    background: var(--dsc-select-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--dsc-chrome-fg);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
}
html.dark .dsc-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
.dsc-select option { background: var(--surface); color: var(--text); }
html.dark .dsc-select option { background: #1a1a2e; color: #fff; }

/* ── arena ───────────────────────────────────────────────────────── */
.dsc-arena {
    position: absolute;
    inset: 0;
}

/* ── cards ───────────────────────────────────────────────────────── */
.dsc-card {
    position: absolute;
    /* Card sits between the topbar and footer */
    top: calc(max(0.85rem, env(safe-area-inset-top, 0.85rem)) + 68px);
    bottom: calc(max(1rem, env(safe-area-inset-bottom, 1rem)) + 96px);
    left: 14px; right: 14px;
    border-radius: 24px;
    overflow: hidden;
    transform-origin: 50% 115%;
    will-change: transform;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.38s ease,
                opacity 0.38s ease;
    touch-action: none;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}
.dsc-card:active { cursor: grabbing; }

.dsc-card[data-stack="0"] {
    z-index: 30;
    transform: translateY(0) scale(1);
    box-shadow: var(--dsc-card-shadow-0);
}
.dsc-card[data-stack="1"] {
    z-index: 20;
    transform: translateY(16px) scale(0.94);
    box-shadow: var(--dsc-card-shadow-1);
    pointer-events: none;
}
.dsc-card[data-stack="2"] {
    z-index: 10;
    transform: translateY(30px) scale(0.88);
    box-shadow: var(--dsc-card-shadow-2);
    pointer-events: none;
}

@media (min-width: 600px) {
    .dsc-card {
        left: 50%;
        right: auto;
        width: min(420px, 100% - 28px);
        margin-left: calc(-1 * min(210px, 50% - 14px));
    }
}

/* Card photo background */
.dsc-card-photo {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    animation: dscKenBurns 22s ease-in-out infinite alternate;
}
.dsc-card-photo--empty {
    background: linear-gradient(145deg, #1e1b4b 0%, #312e81 35%, #4c1d95 65%, #6d1f7b 100%);
    animation: none;
}
@keyframes dscKenBurns {
    from { transform: scale(1.05) translate(0, 0); }
    to   { transform: scale(1.12) translate(-1.2%, -0.8%); }
}

/* Multi-layer gradient for legibility */
.dsc-card-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom,
            rgba(0,0,0,0.12) 0%,
            rgba(0,0,0,0)    28%,
            rgba(0,0,0,0.15) 52%,
            rgba(0,0,0,0.72) 76%,
            rgba(0,0,0,0.96) 100%
        );
    pointer-events: none;
}

/* Top badge row */
.dsc-card-top {
    position: absolute;
    top: 14px; left: 14px; right: 14px;
    z-index: 4;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
}

.dsc-card-badges { display: flex; flex-wrap: wrap; gap: 5px; }

.dsc-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}
.dsc-tag--live {
    background: #15803d;
    border: 1px solid #4ade80;
    color: #fff;
}
.dsc-tag--live i {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #bbf7d0;
    animation: dscDotPulse 1.7s ease-in-out infinite;
    font-style: normal;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}
@keyframes dscDotPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(187, 247, 208, 0.65); }
    50% { box-shadow: 0 0 0 5px rgba(187, 247, 208, 0); }
}
.dsc-tag--verified {
    background: #5b21b6;
    border: 1px solid #c084fc;
    color: #fff;
}

/* Score ring */
.dsc-score {
    position: relative;
    flex-shrink: 0;
    width: 44px; height: 44px;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}
.dsc-score svg { width: 100%; height: 100%; }
.dsc-score > span {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.76rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* Card body (bottom info overlay) */
.dsc-card-body {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 4;
    padding: 1.1rem 1.25rem 1.35rem;
    pointer-events: none;
}
.dsc-card-type {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: capitalize;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}
.dsc-card-title {
    margin: 0 0 5px;
    font-size: clamp(1.25rem, 5.5vw, 1.75rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 2px 16px rgba(0,0,0,0.55);
}
.dsc-card-loc {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 7px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.82);
}
.dsc-card-meta {
    margin: 0 0 10px;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.58);
}
.dsc-tier-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    background: rgba(255,255,255,0.09);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.14);
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.82);
}

/* Swipe stamps */
.dsc-stamp {
    position: absolute;
    top: 32%;
    padding: 5px 14px;
    border-radius: 8px;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    border: 3.5px solid;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
    transition: opacity 0.08s ease;
}
.dsc-stamp--like {
    left: 1.25rem;
    color: #4ade80;
    border-color: #4ade80;
    transform: rotate(12deg);
    text-shadow: 0 0 28px rgba(74,222,128,0.6);
}
.dsc-stamp--pass {
    right: 1.25rem;
    color: #f87171;
    border-color: #f87171;
    transform: rotate(-12deg);
    text-shadow: 0 0 28px rgba(248,113,113,0.6);
}

/* ── footer ──────────────────────────────────────────────────────── */
.dsc-footer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 24px max(18px, env(safe-area-inset-bottom, 18px));
    background: var(--dsc-footer-fade);
    pointer-events: none;
}
.dsc-footer > * { pointer-events: auto; }

.dsc-guest-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--dsc-chrome-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--dsc-chrome-border);
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--dsc-fg-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 16px);
}
.dsc-guest-pill span { overflow: hidden; text-overflow: ellipsis; }
.dsc-guest-login-btn {
    flex-shrink: 0;
    border: none;
    background: linear-gradient(90deg, #7c3aed, #db2777);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 5px 13px;
    border-radius: 999px;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.dsc-guest-login-btn:hover { opacity: 0.82; }

/* Action button row */
.dsc-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    max-width: 100%;
    padding: 0 0.5rem;
}
.dsc-action {
    display: flex; align-items: center; justify-content: center;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease, opacity 0.2s;
}
.dsc-action:active { transform: scale(0.88) !important; }

.dsc-action--pass {
    width: 62px; height: 62px;
    background: var(--dsc-pass-btn-bg);
    color: #ef4444;
    box-shadow: var(--dsc-pass-btn-shadow);
}
.dsc-action--pass:hover {
    transform: scale(1.07);
    box-shadow: 0 12px 36px rgba(239,68,68,0.28), 0 4px 12px rgba(0,0,0,0.3);
}

.dsc-action--info {
    width: 46px; height: 46px;
    background: var(--dsc-action-info-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid var(--dsc-action-info-border);
    color: var(--dsc-action-info-fg);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}
html.dark .dsc-action--info {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.dsc-action--info:hover {
    background: color-mix(in srgb, var(--dsc-action-info-bg) 88%, var(--dsc-action-info-fg) 12%);
    transform: scale(1.06);
}

.dsc-action--later {
    width: 46px; height: 46px;
    background: var(--dsc-action-info-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid rgba(217, 119, 6, 0.55);
    color: #b45309;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
}
html.dark .dsc-action--later {
    border-color: rgba(251, 191, 36, 0.45);
    color: #fcd34d;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.dsc-action--later:hover {
    background: rgba(251, 191, 36, 0.14);
    transform: scale(1.06);
}

.dsc-action--like {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 45%, #db2777 100%);
    color: #fff;
    box-shadow: 0 8px 32px rgba(124,58,237,0.5), 0 2px 8px rgba(0,0,0,0.3);
}
.dsc-action--like:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 44px rgba(124,58,237,0.62), 0 4px 12px rgba(0,0,0,0.35);
}

/* ── detail bottom sheet ─────────────────────────────────────────── */
.dsc-sheet {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 300;
    max-height: 83dvh;
    border-radius: 24px 24px 0 0;
    background: var(--dsc-sheet-bg);
    border-top: 1px solid var(--dsc-sheet-border);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease;
    display: flex;
    flex-direction: column;
    color: var(--dsc-fg);
}
.dsc-sheet.is-open { transform: translateY(0); }
.dsc-sheet[hidden] { display: none; }

.dsc-sheet-inner {
    display: flex; flex-direction: column;
    max-height: 83dvh;
    overflow: hidden;
}
.dsc-sheet-handle {
    width: 40px; height: 4px;
    border-radius: 2px;
    background: color-mix(in srgb, var(--dsc-fg) 18%, transparent);
    margin: 11px auto 0;
    flex-shrink: 0;
}
.dsc-sheet-scroll {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 18px max(22px, env(safe-area-inset-bottom, 22px));
    display: flex; flex-direction: column;
    gap: 14px;
}

/* Sheet header */
.dsc-sheet-photo {
    width: 100%; height: 170px;
    border-radius: 16px;
    background-size: cover; background-position: center;
    flex-shrink: 0;
}
.dsc-sheet-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.dsc-sheet-type {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--dsc-sheet-muted);
    text-transform: capitalize;
    margin-bottom: 3px;
}
.dsc-sheet-title {
    margin: 0 0 3px;
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.2;
}
.dsc-sheet-loc {
    display: flex; align-items: center; gap: 4px;
    margin: 0;
    font-size: 0.83rem;
    color: var(--dsc-sheet-muted);
}

/* Sheet score ring */
.dsc-sheet-score-ring {
    position: relative;
    flex-shrink: 0;
    width: 50px; height: 50px;
    background: rgba(0, 0, 0, 0.72);
    border: 1.5px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}
.dsc-sheet-score-ring svg { width: 100%; height: 100%; }
.dsc-sheet-score-ring > span {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* Fact chips */
.dsc-sheet-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dsc-fact {
    display: flex; align-items: center; gap: 7px;
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--dsc-sheet-chip-bg);
    border: 1px solid var(--dsc-sheet-chip-border);
    font-size: 0.8rem;
    font-weight: 600;
    flex: 1;
    min-width: 110px;
    color: var(--dsc-fg);
}
.dsc-fact-icon { font-size: 1rem; }

.dsc-sheet-host {
    margin: 0;
    font-size: 0.83rem;
    color: var(--dsc-sheet-muted);
}
.dsc-sheet-host strong { color: var(--dsc-sheet-soft); }

.dsc-sheet-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.dsc-reason-tag {
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.12);
    border: 1px solid rgba(124, 58, 237, 0.24);
    color: #6d28d9;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: capitalize;
}
html.dark .dsc-reason-tag {
    background: rgba(167, 139, 250, 0.14);
    border-color: rgba(167, 139, 250, 0.24);
    color: #c4b5fd;
}

/* Sheet compare */
.dsc-sheet-compare {
    display: flex; align-items: center; gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: var(--dsc-sheet-chip-bg);
    border: 1px solid var(--dsc-sheet-chip-border);
}
.dsc-sheet-compare-side {
    flex: 1; text-align: center;
    font-size: 0.76rem;
}
.dsc-sheet-compare-photo {
    width: 50px; height: 50px;
    border-radius: 11px;
    overflow: hidden;
    background: var(--dsc-sheet-chip-bg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    margin: 0 auto 5px;
    border: 1.5px solid var(--dsc-sheet-chip-border);
}
.dsc-sheet-compare-photo img { width: 100%; height: 100%; object-fit: cover; }
.dsc-sheet-compare-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dsc-sheet-muted);
    margin-bottom: 2px;
}
.dsc-sheet-compare-arrow {
    font-size: 1.3rem;
    color: var(--dsc-sheet-muted);
    flex-shrink: 0;
}

/* Sheet action buttons */
.dsc-sheet-actions {
    display: flex; flex-direction: column;
    gap: 9px;
    flex-shrink: 0;
}
.dsc-sheet-btn {
    display: flex; align-items: center; justify-content: center;
    gap: 7px;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.18s;
    text-align: center;
    color: #fff;
}
.dsc-sheet-btn:active { transform: scale(0.97); }
.dsc-sheet-btn--like {
    background: linear-gradient(135deg, #7c3aed, #a855f7 50%, #db2777);
    box-shadow: 0 6px 24px rgba(124,58,237,0.38);
}
.dsc-sheet-btn--like:hover { opacity: 0.88; color: #fff; }
.dsc-sheet-btn--pass {
    background: var(--dsc-sheet-chip-bg);
    color: var(--dsc-fg-soft);
    border: 1px solid var(--dsc-sheet-chip-border);
}
.dsc-sheet-btn--later {
    background: rgba(251, 191, 36, 0.16);
    color: #92400e;
    border: 1px solid rgba(217, 119, 6, 0.35);
}
html.dark .dsc-sheet-btn--later {
    background: rgba(251, 191, 36, 0.1);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.28);
}
.dsc-sheet-btn--later:hover { opacity: 0.88; color: #78350f; }
html.dark .dsc-sheet-btn--later:hover { color: #fde68a; }
.dsc-sheet-btn--view {
    background: var(--dsc-sheet-chip-bg);
    color: var(--dsc-sheet-muted);
    border: 1px solid var(--dsc-sheet-chip-border);
    font-size: 0.84rem;
}
.dsc-sheet-btn--view:hover { color: var(--dsc-fg); }

@media (min-width: 600px) {
    .dsc-sheet {
        left: 50%;
        right: auto;
        bottom: max(1.25rem, env(safe-area-inset-bottom, 1.25rem));
        width: min(420px, calc(100% - 28px));
        max-height: min(1040px, 92dvh);
        border-radius: 24px;
        border: 1px solid var(--dsc-sheet-border);
        box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
        transform: translateX(-50%) translateY(calc(100% + 1.5rem));
    }
    html.dark .dsc-sheet {
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
    }
    .dsc-sheet.is-open {
        transform: translateX(-50%) translateY(0);
    }
    .dsc-sheet-inner {
        max-height: min(1040px, 92dvh);
    }
    .dsc-sheet-handle {
        display: none;
    }
    .dsc-sheet-scroll {
        padding: 16px 20px 20px;
        flex: 1;
        min-height: 0;
    }
    .dsc-sheet-photo {
        height: 200px;
    }
    .dsc-sheet-title {
        font-size: 1.15rem;
    }
    .dsc-sheet-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .dsc-sheet-btn--like,
    .dsc-sheet-btn--view {
        grid-column: 1 / -1;
    }
}

/* Scrim */
.dsc-scrim {
    position: absolute; inset: 0;
    z-index: 290;
    background: var(--dsc-scrim);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.dsc-scrim.is-open { opacity: 1; pointer-events: auto; }
.dsc-scrim[hidden] { display: none; }

/* ── loading state ───────────────────────────────────────────────── */
.dsc-loading {
    position: absolute; inset: 0;
    z-index: 50;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 14px;
    background: var(--dsc-loading-bg);
    color: var(--dsc-fg);
}
.dsc-loading[hidden] { display: none; }
.dsc-loading-ring {
    width: 50px; height: 50px;
    color: #a78bfa;
    animation: dscSpin 1s linear infinite;
}
@keyframes dscSpin { to { transform: rotate(360deg); } }
.dsc-loading-ring svg { width: 100%; height: 100%; }
.dsc-loading p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--dsc-loading-fg);
    letter-spacing: 0.02em;
}

/* ── empty state ─────────────────────────────────────────────────── */
.dsc-empty {
    position: absolute; inset: 0;
    z-index: 50;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 11px;
    padding: 2rem;
    text-align: center;
    color: var(--dsc-fg);
}
.dsc-empty[hidden] { display: none; }
.dsc-empty-glow {
    position: absolute;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,58,237,0.22), transparent 70%);
    animation: dscGlow 3.5s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes dscGlow {
    from { transform: scale(0.82); opacity: 0.45; }
    to   { transform: scale(1.18); opacity: 1; }
}
.dsc-empty-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 6px 24px rgba(124,58,237,0.35));
}
.dsc-empty h2 {
    margin: 0;
    font-size: 1.38rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}
.dsc-empty p {
    margin: 0;
    max-width: 270px;
    color: var(--dsc-empty-fg);
    font-size: 0.88rem;
    line-height: 1.6;
}
.dsc-empty-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.dsc-empty-map-btn {
    padding: 12px 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: #fff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(124,58,237,0.38);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.dsc-empty-map-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124,58,237,0.5);
    color: #fff;
}

/* ── confetti burst ──────────────────────────────────────────────── */
.dsc-burst {
    position: absolute; inset: 0;
    z-index: 400;
    pointer-events: none;
    overflow: hidden;
}
.dsc-burst.is-active span {
    position: absolute;
    left: 50%; top: 50%;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--c, #a78bfa);
    animation: dscBurst 1s ease-out forwards;
    animation-delay: calc(var(--i) * 0.045s);
}
@keyframes dscBurst {
    0%   { transform: translate(-50%,-50%) rotate(calc(var(--i)*25.7deg)) translateY(0);      opacity: 1; }
    100% { transform: translate(-50%,-50%) rotate(calc(var(--i)*25.7deg)) translateY(-160px); opacity: 0; }
}

/* In-page interest toast */
.dsc-toast {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: calc(max(1rem, env(safe-area-inset-bottom, 1rem)) + 108px);
    z-index: 450;
    pointer-events: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.dsc-toast:not([hidden]) { pointer-events: auto; }
.dsc-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.dsc-toast-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--dsc-sheet-bg) 92%, transparent);
    border: 1px solid var(--dsc-sheet-border);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--dsc-fg);
}
html.dark .dsc-toast-card {
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}
.dsc-toast-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.dsc-toast-body {
    margin: 0;
    font-size: 0.8rem;
    color: var(--dsc-fg-soft);
    line-height: 1.35;
}
.dsc-toast-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 2px;
}
.dsc-toast-regret {
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(217, 119, 6, 0.45);
    background: rgba(251, 191, 36, 0.16);
    color: #92400e;
    font-size: 0.76rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
}
html.dark .dsc-toast-regret {
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.35);
    background: rgba(251, 191, 36, 0.12);
}
.dsc-toast-regret:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.dsc-toast-link {
    padding: 0.42rem 0.85rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #db2777);
    color: #fff !important;
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
}
.dsc-toast-close {
    margin-left: auto;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: var(--dsc-sheet-chip-bg);
    color: var(--dsc-fg-muted);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

@media (min-width: 600px) {
    .dsc-toast {
        left: 50%;
        right: auto;
        width: min(420px, calc(100% - 28px));
        transform: translateX(-50%) translateY(12px);
    }
    .dsc-toast.is-visible {
        transform: translateX(-50%) translateY(0);
    }
}

/* ── hub / nav discover links (used outside this page) ───────────── */
.hub-discover-link {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
    background: var(--gradient);
    box-shadow: 0 4px 18px rgba(124,58,237,0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}
.hub-discover-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(124,58,237,0.45);
    color: #fff;
}


.mobile-drawer-discover {
    font-weight: 800;
    color: var(--brand);
}

/* Ecosystem grid (about page) */
.ecosystem-section { margin-top: 1rem; }
.ecosystem-section__lead { margin-bottom: 1rem; }
.ecosystem-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr));
}
.ecosystem-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    border-radius: calc(var(--radius-lg) - 4px);
    border: 1px solid var(--line);
    background: var(--surface-soft);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
a.ecosystem-card:hover {
    border-color: color-mix(in srgb, var(--brand) 35%, var(--line));
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.ecosystem-card.is-current {
    border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
    background: color-mix(in srgb, var(--brand) 6%, var(--surface-soft));
}
.ecosystem-card__logo {
    flex: 0 0 3.25rem;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.85rem;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
}
.ecosystem-card__logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.ecosystem-card__copy { min-width: 0; flex: 1; }
.ecosystem-card h3 {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.ecosystem-card__ext { font-size: 0.78rem; color: var(--brand); font-weight: 800; }
.ecosystem-card p { margin: 0; font-size: 0.82rem; color: var(--muted); line-height: 1.45; }

.about-page { padding-bottom: 2.5rem; }

.about-hero--premium {
    isolation: isolate;
    min-height: clamp(14rem, 32vw, 18rem);
    display: flex;
    align-items: flex-end;
}

.about-hero__orb {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.about-hero__orb--1 {
    width: clamp(8rem, 18vw, 12rem);
    height: clamp(8rem, 18vw, 12rem);
    top: -2rem;
    right: -1rem;
}

.about-hero__orb--2 {
    width: clamp(6rem, 14vw, 9rem);
    height: clamp(6rem, 14vw, 9rem);
    bottom: -2rem;
    left: 12%;
    background: rgba(255, 255, 255, 0.08);
}

.about-hero__inner { position: relative; z-index: 1; }

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
    .about-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.about-stat {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1rem 1.1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.about-stat__value {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--ink);
    line-height: 1.2;
}

.about-stat__label {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.about-story-cards {
    display: grid;
    gap: 0.85rem;
    margin-top: 1.25rem;
}

@media (min-width: 768px) {
    .about-story-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.about-story-card {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}

.about-story-card h3 {
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
}

.about-mission { margin-top: 1.25rem; }

.about-cta {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: clamp(1.25rem, 3vw, 1.75rem);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: white;
    box-shadow: var(--shadow);
}

.about-cta h2 {
    margin: 0 0 0.35rem;
    color: white;
    font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.about-cta p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    max-width: 36rem;
    line-height: 1.6;
}

.about-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.about-cta .button.ghost {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
    color: white;
}

.about-cta .button.primary {
    background: white;
    color: var(--brand);
    border-color: white;
}

