/*
 * Public marketplace layout (marketplace/layouts/app.blade.php). Moved out of an inline <style>
 * so the browser caches it across pages instead of receiving ~68 KB with every page.
 * Loaded right after app.css, where the inline block used to be, so the cascade order is unchanged.
 * Served as written (not through Vite), so its media queries keep working on older phones.
 */
    @view-transition {
        navigation: auto;
    }
    /* Root font-size left to browser default (16px) — typography scale lives in resources/css/app.css @theme. */
    * { font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; }
    :root {
        --shaxi-blue: #1a5ba8;
        --shaxi-blue-dark: #0d2d5e;
        --shaxi-blue-mid: #154d8f;
        --shaxi-blue-light: #e8f0fb;
        --shaxi-red: #e5322e;
        --shaxi-red-dark: #c42a26;
        --shaxi-red-light: #fdecea;
    }
    [x-cloak] { display: none !important; }
    ::-webkit-scrollbar { width: 4px; height: 4px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 99px; }

    .client-page-shell {
        position: relative;
        min-height: 220px;
    }
    html:not([data-alpine-ready="true"]) .client-page-shell > * {
        display: none !important;
    }
    html:not([data-alpine-ready="true"]) .client-page-shell::before {
        content: 'Checking your account';
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 180px;
        border: 1px solid #e5e7eb;
        border-radius: 24px;
        background:
            linear-gradient(90deg, rgba(248,250,252,0), rgba(255,255,255,.86), rgba(248,250,252,0)) 0 0 / 220px 100% no-repeat,
            #fff;
        color: #64748b;
        font-size: 12px;
        font-weight: 800;
        letter-spacing: .01em;
        box-shadow: 0 1px 2px rgba(15,23,42,.04);
        animation: shaxi-client-boot 1.1s ease-in-out infinite;
    }
    @keyframes shaxi-client-boot {
        0% { background-position: -220px 0, 0 0; }
        100% { background-position: calc(100% + 220px) 0, 0 0; }
    }

    .public-main-content {
        view-transition-name: shaxi-main;
    }

    /* ── Tier 2: Category strip (sticky beneath tier 1) ── */
    .tier-2-bar {
        background: #fff;
        border-bottom: 1px solid #eef0f4;
        position: sticky;
        top: 64px;
        z-index: 29;
        display: flex;
        align-items: stretch;
        gap: 18px;
        padding: 0 18px;
        min-height: 56px;
        flex-wrap: nowrap;
    }
    .header-location-pill {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 7px 14px 7px 12px;
        background: #f4f6f9;
        border: 1.5px solid transparent;
        border-radius: 13px;
        cursor: pointer;
        transition: background .15s, border-color .15s, box-shadow .15s;
        min-height: 44px;
        text-align: left;
        white-space: nowrap;
        flex: 0 1 230px;
        max-width: 250px;
        min-width: 0;
    }
    .header-location-pill:hover {
        background: #eef2f7;
        border-color: #d6deea;
    }
    .header-location-pill.is-active {
        background: var(--shaxi-blue-light);
        border-color: rgba(26,91,168,0.25);
    }
    .header-location-pill .location-pill-pin {
        display: inline-flex;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: #fee4e2;
        color: var(--shaxi-red);
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    .header-location-pill .location-pill-pin svg { width: 14px; height: 14px; }
    .header-location-pill .location-pill-text {
        display: flex;
        flex-direction: column;
        line-height: 1.15;
        min-width: 0;
    }
    .header-location-pill .location-pill-name {
        font-size: 14px;
        font-weight: 800;
        color: #0d2d5e;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .header-location-pill .location-pill-caret {
        margin-left: 6px;
        color: #94a3b8;
        flex-shrink: 0;
    }

    .category-strip {
        flex: 1 1 auto;
        display: flex;
        align-items: stretch;
        gap: 2px;
        min-width: 0;
        overflow-x: auto;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }
    .category-strip::-webkit-scrollbar { height: 0; }
    .category-cell {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 8px 16px 6px;
        border-bottom: 2px solid transparent;
        text-decoration: none;
        color: #475569;
        transition: background .15s, color .15s, border-color .15s;
        cursor: pointer;
        white-space: nowrap;
        scroll-snap-align: start;
        flex-shrink: 0;
    }
    .category-cell:hover {
        background: #f8fafc;
        color: var(--shaxi-blue-dark);
        border-bottom-color: rgba(26,91,168,0.25);
    }
    .category-cell.is-active {
        color: var(--shaxi-blue-dark);
        border-bottom-color: var(--shaxi-blue);
    }
    .category-cell .category-cell-icon {
        display: inline-flex;
        width: 24px;
        height: 24px;
        align-items: center;
        justify-content: center;
        color: inherit;
    }
    .category-cell .category-cell-icon svg { width: 22px; height: 22px; }
    .category-cell .category-cell-name {
        font-size: 13px;
        font-weight: 800;
        line-height: 1.1;
    }
    .category-cell.is-active .category-cell-name { font-weight: 800; }

    /* ── Tier 3: Subcategory chips (only when a top-level category is active) ── */
    .subcategory-strip {
        background: #f8fafc;
        border-bottom: 1px solid #eef0f4;
        position: sticky;
        top: 120px;
        z-index: 28;
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 18px;
        overflow-x: auto;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .subcategory-strip::-webkit-scrollbar { height: 0; }
    .subcategory-chip {
        display: inline-flex;
        align-items: center;
        padding: 7px 15px;
        border-radius: 999px;
        background: #ffffff;
        border: 1.5px solid #e2e8f0;
        color: #475569;
        font-size: 13px;
        font-weight: 800;
        text-decoration: none;
        transition: background .15s, border-color .15s, color .15s;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .subcategory-chip:hover {
        border-color: #b9cbe4;
        color: var(--shaxi-blue-dark);
    }
    .subcategory-chip.is-active {
        background: var(--shaxi-blue-dark);
        border-color: var(--shaxi-blue-dark);
        color: #fff;
    }

    @media (max-width: 1024px) {
        /* On mobile, tier-1 wraps the search to its own line, making the
           header much taller than 64px. Stickying tier-2 at top:64px would
           then overlap the wrapped search. Switch tier-2 + tier-3 to
           non-sticky on tablet/mobile so they scroll naturally with the page. */
        .tier-2-bar {
            position: static;
            top: auto;
            gap: 8px;
            padding: 0 12px;
        }
        .category-strip {
            width: 100%;
            padding: 4px 0 6px;
        }
        .category-cell {
            padding: 4px 12px 6px;
        }
        .subcategory-strip {
            position: static;
            top: auto;
        }
    }

    /* ── Top header ── */
    .top-header {
        background: #fff;
        border-bottom: 1px solid #eef0f4;
        min-height: 64px;
        display: flex;
        align-items: center;
        padding: 10px 18px;
        gap: 12px;
        flex-shrink: 0;
        position: sticky;
        top: 0;
        z-index: 30;
        flex-wrap: wrap;
        view-transition-name: shaxi-header;
    }
    .topbar-shaxi-logo {
        display: block;
        width: auto;
        height: 38px;
        max-width: 104px;
        object-fit: contain;
    }
    /* ── Primary app switcher: inline on desktop, dropdown on mobile ── */
    .app-nav { display: none; }
    .app-nav-link,
    .app-nav-dropdown-summary {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        padding: 7px 14px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 800;
        color: #475569;
        text-decoration: none;
        white-space: nowrap;
        transition: background .15s, color .15s, box-shadow .15s;
    }
    .app-nav-link svg,
    .app-nav-dropdown-summary svg { width: 18px; height: 18px; }
    .app-nav-link:hover,
    .app-nav-dropdown-summary:hover { color: var(--shaxi-blue-dark); }
    /* Filled "thumb" = strong current-scope cue (segmented control). */
    .app-nav-link.is-active,
    .app-nav-dropdown.is-active .app-nav-dropdown-summary {
        background: #fff;
        color: var(--shaxi-blue-dark);
        box-shadow: 0 1px 2px rgba(15,23,42,.12);
    }
    .app-nav-dropdown {
        position: relative;
        display: inline-flex;
    }
    .app-nav-dropdown-summary {
        list-style: none;
        cursor: pointer;
        user-select: none;
    }
    .app-nav-dropdown-summary::-webkit-details-marker { display: none; }
    .app-nav-dropdown-caret {
        width: 13px !important;
        height: 13px !important;
        transition: transform .15s;
    }
    .app-nav-dropdown[open] .app-nav-dropdown-caret { transform: rotate(180deg); }
    .app-nav-dropdown-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        width: 255px;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 20px 50px rgba(15,23,42,.18);
        padding: 8px;
        z-index: 62;
    }
    .app-nav-dropdown-menu::before {
        content: '';
        position: absolute;
        top: -8px;
        right: 22px;
        width: 14px;
        height: 14px;
        transform: rotate(45deg);
        border-left: 1px solid #e5e7eb;
        border-top: 1px solid #e5e7eb;
        background: #fff;
    }
    .app-nav-dropdown-item {
        position: relative;
        display: flex;
        align-items: center;
        gap: 11px;
        min-height: 56px;
        border-radius: 12px;
        padding: 9px 10px;
        color: #273244;
        text-decoration: none;
    }
    .app-nav-dropdown-item:hover,
    .app-nav-dropdown-item.is-active {
        background: #f8fafc;
        color: var(--shaxi-blue-dark);
    }
    .app-nav-dropdown-item-icon {
        display: grid;
        width: 34px;
        height: 34px;
        place-items: center;
        border-radius: 11px;
        background: #eef4fb;
        color: var(--shaxi-blue-dark);
        flex: 0 0 auto;
    }
    .app-nav-dropdown-item-title {
        display: block;
        color: #0f172a;
        font-size: 13px;
        font-weight: 900;
        line-height: 1.2;
    }
    .app-nav-dropdown-item-subtitle {
        display: block;
        margin-top: 2px;
        color: #64748b;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.25;
    }
    /* Inline switcher only once there is comfortable room; below this the
       four apps stay reachable through the existing "Apps" dropdown. */
    /* Three header zones: logo (left) · app switcher (centre) · actions (right). */
    .top-header-left  { display: flex; align-items: center; gap: 12px; min-width: 0; }
    .top-header-right { display: flex; align-items: center; gap: 8px; min-width: 0; margin-left: auto; }
    @media (min-width: 1140px) {
        .top-header { flex-wrap: nowrap; }
        /* Higher specificity than the base `.public-app-menu-button` rule below, so
           the dropdown trigger reliably hides on desktop regardless of source order. */
        .top-header .public-app-menu-button { display: none; }
        /* Equal-width side zones centre the switcher between them. */
        .top-header-left  { flex: 1 1 0; justify-content: flex-start; margin-left: 0; }
        .top-header-right { flex: 1 1 0; justify-content: flex-end;   margin-left: 0; }
        /* Segmented control track holding the four app tabs (the centred item). */
        .app-nav {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px;
            background: #f1f5f9;
            border-radius: 13px;
            flex: 0 0 auto;
        }
    }

    /* ── Search trigger (icon-only) → opens the search modal ── */
    .header-search-trigger {
        width: 42px;
        height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #e5e7eb;
        border-radius: 11px;
        background: #f4f6f9;
        color: #344154;
        cursor: pointer;
        flex-shrink: 0;
        transition: background .15s, border-color .15s, color .15s;
    }
    .header-search-trigger:hover { background: #eef2f7; border-color: #d6deea; color: var(--shaxi-blue-dark); }
    .header-search-trigger svg { width: 20px; height: 20px; }

    /* ── Search modal (mirrors the location picker pattern) ── */
    .marketplace-search-layer {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 0 14px;
        pointer-events: none;
        z-index: 70;
    }
    .marketplace-search-panel {
        width: min(640px, calc(100vw - 28px));
        max-height: calc(100vh - 100px);
        overflow: auto;
        display: flex;
        flex-direction: column;
        border-radius: 16px;
        background: #fff;
        border: 1px solid #e5e7eb;
        box-shadow: 0 24px 70px rgba(15,23,42,.28);
        pointer-events: auto;
        transform-origin: top center;
        padding: 14px;
    }
    .marketplace-search-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }
    .marketplace-search-head-title {
        font-size: 15px;
        font-weight: 800;
        color: #0d2d5e;
    }
    .marketplace-search-close {
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 9px;
        background: #f1f5f9;
        color: #475569;
        cursor: pointer;
        flex-shrink: 0;
        transition: background .15s, color .15s;
    }
    .marketplace-search-close:hover { background: #e2e8f0; color: #0f172a; }
    .marketplace-search-close svg { width: 18px; height: 18px; }
    .marketplace-search-panel .header-search-form {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        min-width: 0;
        position: static;
    }
    .marketplace-search-panel .header-search-submit { display: inline-flex; align-items: center; }
    .global-search-service-tabs {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 2px 0 10px;
        scrollbar-width: none;
    }
    .global-search-service-tabs::-webkit-scrollbar { display: none; }
    .global-search-service-tab {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 34px;
        padding: 0 12px;
        border: 1px solid #e2e8f0;
        border-radius: 999px;
        background: #fff;
        color: #475569;
        font-size: 12px;
        font-weight: 900;
        cursor: pointer;
        transition: all .15s;
    }
    .global-search-service-tab:hover,
    .global-search-service-tab.is-active {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #0d4f8b;
    }
    .global-search-service-dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: #94a3b8;
    }
    .global-search-service-tab.is-active .global-search-service-dot { background: #68bd27; }
    .marketplace-search-panel .header-search-suggest {
        position: static;
        margin-top: 10px;
        border: 0;
        border-radius: 12px;
        box-shadow: none;
        max-height: none;
        overflow: visible;
    }
    @media (max-width: 768px) {
        .marketplace-search-layer {
            top: 0;
            padding: 0;
            align-items: flex-end;
        }
        .marketplace-search-panel {
            width: 100%;
            max-width: 100%;
            max-height: 88vh;
            border-radius: 18px 18px 0 0;
            border: 0;
            box-shadow: 0 -12px 40px rgba(15,23,42,.25);
            transform-origin: bottom center;
            padding-bottom: calc(14px + env(safe-area-inset-bottom));
        }
    }

    .header-search-form {
        flex: 1 1 360px;
        max-width: 720px;
        min-width: 220px;
        position: relative;
    }
    .header-search-shell {
        display: flex;
        align-items: center;
        min-height: 44px;
        background: #f4f6f9;
        border: 1.5px solid transparent;
        border-radius: 12px;
        overflow: hidden;
        transition: all .15s;
    }
    .header-search-shell:focus-within {
        border-color: var(--shaxi-blue);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(26,91,168,0.08);
    }
    .header-search-shell .search-icon {
        position: static;
        transform: none;
        margin-left: 13px;
        flex: 0 0 auto;
    }
    .header-search-shell input {
        width: 100%;
        min-width: 0;
        padding: 0 12px;
        background: transparent;
        border: 0;
        font-size: 16px;          /* 16px floor — prevents iOS auto-zoom on focus */
        color: #1a1a2e;
        outline: none;
        font-family: inherit;
        font-weight: 600;
    }
    .header-search-submit {
        height: 38px;
        margin-right: 5px;
        padding: 0 14px;
        border: 0;
        border-radius: 9px;
        background: var(--shaxi-blue-dark);
        color: #fff;
        font-size: 13px;
        font-weight: 800;
        cursor: pointer;
        white-space: nowrap;
    }
    .header-search-suggest {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        z-index: 70;
        max-height: min(72vh, 620px);
        overflow: auto;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18);
    }
    .search-suggest-section {
        padding: 10px;
        border-bottom: 1px solid #f1f5f9;
    }
    .search-suggest-section:last-child {
        border-bottom: 0;
    }
    .search-suggest-heading {
        padding: 4px 6px 8px;
        color: #64748b;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
    .search-suggest-option {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 10px;
        border: 0;
        border-radius: 11px;
        background: transparent;
        color: #0f172a;
        text-align: left;
        cursor: pointer;
        text-decoration: none;
    }
    .search-suggest-option:hover,
    .search-suggest-option.is-active {
        background: #f1f5f9;
        color: #0d2d5e;
    }
    .search-suggest-icon {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 9px;
        background: #eef6e9;
        color: #4d9b1f;
    }
    .search-suggest-thumb {
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
        border-radius: 10px;
        object-fit: cover;
        background: #e5e7eb;
    }
    .search-suggest-title {
        min-width: 0;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.25;
    }
    .search-suggest-meta {
        margin-top: 2px;
        color: #64748b;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.25;
    }
    .search-suggest-price {
        color: #0d2d5e;
        font-size: 12px;
        font-weight: 800;
        white-space: nowrap;
    }
    .search-suggest-state {
        padding: 18px;
        color: #64748b;
        font-size: 13px;
        font-weight: 700;
        text-align: center;
    }
    .search-suggest-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
        background: #f8fafc;
        color: #0d2d5e;
        font-size: 13px;
        font-weight: 800;
        text-decoration: none;
    }
    .search-suggest-footer:hover {
        background: #eef6e9;
        color: #0d2d5e;
    }
    .public-app-menu-button {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 0 12px;
        border: 1px solid #e5e7eb;
        border-radius: 11px;
        background: #fff;
        color: #344154;
        font-size: 14px;
        font-weight: 800;
        cursor: pointer;
        white-space: nowrap;
        transition: background .15s, border-color .15s, color .15s;
    }
    .public-app-menu-button:hover {
        background: #f8fafc;
        border-color: #d6deea;
        color: var(--shaxi-blue-dark);
    }
    .public-app-menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 18px;
        width: min(320px, calc(100vw - 36px));
        max-height: min(78vh, 620px);
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 22px 60px rgba(15,23,42,.18);
        overflow: auto;
        z-index: 60;
    }
    .public-app-menu-head {
        padding: 14px 16px;
        border-bottom: 1px solid #eef0f4;
    }
    .public-app-menu-head p:first-child {
        color: #111827;
        font-size: 14px;
        font-weight: 800;
    }
    .public-app-menu-head p:last-child {
        margin-top: 3px;
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
    }
    .public-app-menu-link {
        display: flex;
        align-items: center;
        gap: 11px;
        min-height: 48px;
        padding: 0 15px;
        color: #273244;
        text-decoration: none;
        font-size: 14px;
        font-weight: 800;
        border-bottom: 1px solid #f2f4f7;
    }
    .public-app-menu-link:last-child {
        border-bottom: 0;
    }
    .public-app-menu-link:hover,
    .public-app-menu-link.is-active {
        background: #f8fafc;
        color: var(--shaxi-blue-dark);
    }
    .public-app-menu-link.is-navigating {
        background: #eef4fb;
        color: var(--shaxi-blue-dark);
    }
    .public-app-menu-icon {
        width: 30px;
        height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 9px;
        background: #eef4fb;
        color: var(--shaxi-blue-dark);
        flex: 0 0 auto;
    }
    .public-app-menu-icon svg {
        width: 16px;
        height: 16px;
    }
    .public-app-menu-group {
        border-top: 1px solid #eef0f4;
        border-bottom: 1px solid #eef0f4;
        background: #f8fafc;
    }
    .public-app-menu-group-head {
        display: flex;
        align-items: center;
        gap: 11px;
        padding: 13px 15px 8px;
        color: #0d2d5e;
        font-size: 13px;
        font-weight: 900;
    }
    .public-app-menu-group-head svg {
        width: 17px;
        height: 17px;
        flex: 0 0 auto;
    }
    .public-app-menu-sub-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: 48px;
        margin: 0 8px 8px;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        background: #fff;
        padding: 9px 11px;
        color: #273244;
        text-decoration: none;
    }
    .public-app-menu-sub-link:hover,
    .public-app-menu-sub-link.is-active {
        border-color: #cbd5e1;
        background: #fff;
        color: var(--shaxi-blue-dark);
    }
    .public-app-menu-sub-title {
        display: block;
        font-size: 13px;
        font-weight: 900;
        line-height: 1.2;
    }
    .public-app-menu-sub-copy {
        display: block;
        margin-top: 2px;
        color: #64748b;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.25;
    }
    .marketplace-message-wrap {
        position: relative;
    }
    .marketplace-message-button {
        width: 44px;
        height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: relative;
        border: 1px solid #e5e7eb;
        border-radius: 13px;
        background: #fff;
        color: #0d2d5e;
        cursor: pointer;
        transition: background .15s, border-color .15s, box-shadow .15s, color .15s;
    }
    .marketplace-message-button:hover,
    .marketplace-message-button.is-open {
        background: #f8fafc;
        border-color: #d6deea;
        box-shadow: 0 1px 2px rgba(15,23,42,.05);
    }
    .marketplace-message-button svg {
        width: 20px;
        height: 20px;
    }
    .marketplace-message-badge {
        position: absolute;
        top: -6px;
        right: -6px;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #fff;
        border-radius: 999px;
        background: #e5322e;
        color: #fff;
        font-size: 10px;
        font-weight: 900;
        line-height: 1;
    }
    .marketplace-message-panel {
        position: absolute;
        right: 0;
        top: calc(100% + 10px);
        z-index: 72;
        width: min(380px, calc(100vw - 24px));
        max-height: min(78vh, 620px);
        overflow: hidden;
        border: 1px solid #e5e7eb;
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 24px 70px rgba(15,23,42,.18);
    }
    .marketplace-message-panel-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 15px;
        border-bottom: 1px solid #eef0f4;
        background: #f8fafc;
    }
    .marketplace-message-panel-title {
        color: #0f172a;
        font-size: 14px;
        font-weight: 900;
    }
    .marketplace-message-panel-count {
        color: #64748b;
        font-size: 11px;
        font-weight: 800;
        white-space: nowrap;
    }
    .marketplace-message-list {
        max-height: 410px;
        overflow: auto;
    }
    .marketplace-message-item {
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr);
        gap: 11px;
        padding: 12px 14px;
        border-bottom: 1px solid #f1f5f9;
        color: #0f172a;
        text-decoration: none;
    }
    .marketplace-message-item:hover {
        background: #f8fafc;
    }
    .marketplace-message-thumb {
        width: 46px;
        height: 46px;
        border-radius: 12px;
        object-fit: cover;
        background: #e5e7eb;
    }
    .marketplace-message-thumb-fallback {
        width: 46px;
        height: 46px;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #eef4fb;
        color: #0d2d5e;
    }
    .marketplace-message-item-title,
    .marketplace-message-item-preview {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .marketplace-message-item-title {
        color: #0f172a;
        font-size: 13px;
        font-weight: 900;
    }
    .marketplace-message-item-meta {
        margin-top: 3px;
        display: flex;
        align-items: center;
        gap: 6px;
        color: #64748b;
        font-size: 11px;
        font-weight: 800;
    }
    .marketplace-message-item-preview {
        margin-top: 5px;
        color: #334155;
        font-size: 12px;
        font-weight: 700;
    }
    .marketplace-message-item-count {
        flex: 0 0 auto;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background: #fdecea;
        color: #c42a26;
        font-size: 10px;
        font-weight: 900;
    }
    .marketplace-message-empty {
        padding: 28px 18px;
        color: #64748b;
        font-size: 13px;
        font-weight: 800;
        text-align: center;
    }
    .marketplace-message-panel-foot {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        border-top: 1px solid #eef0f4;
        background: #fff;
    }
    .marketplace-message-panel-foot a {
        color: #0d2d5e;
        font-size: 13px;
        font-weight: 900;
        text-decoration: none;
    }
    .marketplace-message-toast {
        position: fixed;
        right: 18px;
        top: 82px;
        z-index: 80;
        width: min(360px, calc(100vw - 24px));
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        gap: 11px;
        padding: 12px;
        border: 1px solid #dbe4ef;
        border-radius: 16px;
        background: #fff;
        color: #0f172a;
        text-decoration: none;
        box-shadow: 0 24px 70px rgba(15,23,42,.22);
    }
    .client-page-toast,
    .account-page-toast {
        position: fixed;
        right: 18px;
        top: 82px;
        z-index: 90;
        width: min(360px, calc(100vw - 24px));
    }
    .marketplace-message-toast-icon {
        width: 42px;
        height: 42px;
        border-radius: 13px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #eef4fb;
        color: #0d2d5e;
    }
    .marketplace-message-toast-title,
    .marketplace-message-toast-preview {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .marketplace-message-toast-title {
        font-size: 13px;
        font-weight: 900;
    }
    .marketplace-message-toast-preview {
        margin-top: 4px;
        color: #475569;
        font-size: 12px;
        font-weight: 700;
    }
    .profile-menu-wrap {
        position: relative;
    }
    .profile-menu-button {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        gap: 9px;
        padding: 4px 7px 4px 4px;
        border: 1px solid transparent;
        border-radius: 13px;
        background: #fff;
        color: #0f172a;
        cursor: pointer;
        transition: background .15s, border-color .15s, box-shadow .15s;
    }
    .profile-menu-button:hover,
    .profile-menu-button.is-open {
        background: #f8fafc;
        border-color: #dbe4ef;
        box-shadow: 0 1px 2px rgba(15,23,42,.05);
    }
    .profile-menu-avatar {
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
        border-radius: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--shaxi-blue-dark);
        color: #fff;
        font-size: 12px;
        font-weight: 800;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
    }
    .profile-menu-copy {
        min-width: 0;
        display: none;
        text-align: left;
        line-height: 1.05;
    }
    .profile-menu-label {
        display: block;
        max-width: 112px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        color: #111827;
        font-size: 13px;
        font-weight: 800;
    }
    .profile-menu-kicker {
        display: block;
        margin-top: 3px;
        color: #64748b;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .05em;
        text-transform: uppercase;
    }
    .profile-menu-caret {
        width: 24px;
        height: 24px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #64748b;
        transition: transform .15s, background .15s, color .15s;
    }
    .profile-menu-button:hover .profile-menu-caret,
    .profile-menu-button.is-open .profile-menu-caret {
        background: #eef4fb;
        color: var(--shaxi-blue-dark);
    }
    .profile-menu-button.is-open .profile-menu-caret {
        transform: rotate(180deg);
    }
    .profile-menu {
        position: absolute;
        right: 0;
        top: calc(100% + 10px);
        z-index: 70;
        width: min(304px, calc(100vw - 24px));
        max-height: calc(100vh - 112px);
        overflow: auto;
        border: 1px solid #e5e7eb;
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 24px 70px rgba(15,23,42,.18);
    }
    .profile-menu-head {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 15px;
        background: #f8fafc;
        border-bottom: 1px solid #eef0f4;
    }
    .profile-menu-head .profile-menu-avatar {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 14px;
        font-size: 14px;
    }
    .profile-menu-name {
        color: #0f172a;
        font-size: 14px;
        font-weight: 800;
        line-height: 1.2;
    }
    .profile-menu-contact {
        margin-top: 3px;
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }
    .profile-menu-section {
        padding: 8px;
        border-bottom: 1px solid #f1f5f9;
    }
    .profile-menu-section:last-child {
        border-bottom: 0;
    }
    .profile-menu-section-title {
        padding: 5px 8px 7px;
        color: #94a3b8;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
    .profile-menu-link {
        width: 100%;
        min-height: 43px;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 10px;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: #334155;
        text-decoration: none;
        font-size: 13px;
        font-weight: 800;
        text-align: left;
        cursor: pointer;
        transition: background .15s, color .15s;
    }
    .profile-menu-link:hover {
        background: #f1f5f9;
        color: var(--shaxi-blue-dark);
    }
    .profile-menu-link.is-primary {
        background: var(--shaxi-blue-dark);
        color: #fff;
    }
    .profile-menu-link.is-primary:hover {
        background: var(--shaxi-blue);
        color: #fff;
    }
    .profile-menu-link.is-danger {
        color: #dc2626;
    }
    .profile-menu-link.is-danger:hover {
        background: #fef2f2;
        color: #b91c1c;
    }
    .profile-menu-link-icon {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: #eef4fb;
        color: var(--shaxi-blue-dark);
    }
    .profile-menu-link-icon svg {
        width: 16px;
        height: 16px;
    }
    .profile-menu-link.is-primary .profile-menu-link-icon {
        background: rgba(255,255,255,.16);
        color: #fff;
    }
    .profile-menu-link.is-danger .profile-menu-link-icon {
        background: #fef2f2;
        color: #dc2626;
    }
    @media (min-width: 768px) {
        .profile-menu-copy {
            display: block;
        }
    }
    .search-bar { flex: 1; max-width: 460px; position: relative; }
    .search-bar input {
        width: 100%;
        padding: 11px 14px 11px 40px;
        background: #f4f6f9;
        border: 1.5px solid transparent;
        border-radius: 11px;
        font-size: 16px;          /* 16px floor — prevents iOS auto-zoom on focus */
        color: #1a1a2e;
        outline: none;
        transition: all 0.15s;
        font-family: inherit;
    }
    .search-bar input:focus { border-color: var(--shaxi-blue); background: #fff; box-shadow: 0 0 0 3px rgba(26,91,168,0.08); }
    .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9ca3af; width: 16px; height: 16px; }

    /* .marketplace-location-btn was the old tier-1 button; replaced by the header location pill. */
    .marketplace-location-layer {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 0 14px;
        pointer-events: none;
        z-index: 70;
    }
    .marketplace-location-panel {
        width: min(820px, calc(100vw - 28px));
        max-height: calc(100vh - 100px);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        border-radius: 14px;
        background: #eef5fb;
        border: 1px solid rgba(255,255,255,.72);
        box-shadow: 0 24px 70px rgba(15,23,42,.28);
        pointer-events: auto;
        transform-origin: top center;
        will-change: opacity, transform;
    }
    /* Drag handle, only visible on mobile bottom-sheet */
    .marketplace-location-handle {
        display: none;
        justify-content: center;
        padding: 8px 0 4px;
        background: #eef5fb;
    }
    .marketplace-location-handle::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: #c4d2e0;
    }
    /* Mobile back button — only shown when on the 'districts' step */
    .marketplace-location-back {
        display: none;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 999px;
        background: rgba(255,255,255,.78);
        color: #475569;
        border: 0;
        cursor: pointer;
        flex-shrink: 0;
    }
    .marketplace-location-back svg { width: 18px; height: 18px; }
    .marketplace-location-backdrop-enter,
    .marketplace-location-backdrop-leave {
        transition: opacity 120ms ease;
    }
    .marketplace-location-backdrop-enter-start,
    .marketplace-location-backdrop-leave-end {
        opacity: 0;
    }
    .marketplace-location-backdrop-enter-end,
    .marketplace-location-backdrop-leave-start {
        opacity: 1;
    }
    .marketplace-location-layer-enter {
        transition: opacity 180ms ease-out, transform 180ms ease-out;
    }
    .marketplace-location-layer-leave {
        transition: opacity 110ms ease-in, transform 110ms ease-in;
    }
    .marketplace-location-layer-enter-start {
        opacity: 0;
        transform: translateY(-6px) scale(.985);
    }
    .marketplace-location-layer-enter-end,
    .marketplace-location-layer-leave-start {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    .marketplace-location-layer-leave-end {
        opacity: 0;
        transform: translateY(-4px) scale(.99);
    }
    .marketplace-location-top {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 16px;
        border-bottom: 1px solid #dfe8f1;
    }
    .marketplace-location-search {
        position: relative;
        flex: 1;
    }
    .marketplace-location-search svg {
        position: absolute;
        left: 12px;
        top: 50%;
        width: 16px;
        height: 16px;
        transform: translateY(-50%);
        color: #6f8da5;
    }
    .marketplace-location-search input {
        width: 100%;
        height: 44px;
        border: 1.5px solid transparent;
        border-radius: 8px;
        background: #fff;
        padding: 0 36px 0 38px;
        outline: none;
        color: #172033;
        font-size: 16px;          /* 16px floor — prevents iOS auto-zoom on focus */
        font-weight: 600;
        transition: border-color .15s, box-shadow .15s;
    }
    .marketplace-location-search input:focus {
        border-color: var(--shaxi-blue);
        box-shadow: 0 0 0 3px rgba(26, 91, 168, .12);
    }
    .marketplace-location-search-clear {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 999px;
        background: #e2e8f0;
        color: #475569;
        cursor: pointer;
        transition: background .12s;
    }
    .marketplace-location-search-clear:hover { background: #cbd5e1; }
    .marketplace-location-search-clear svg { width: 12px; height: 12px; }
    .marketplace-location-close {
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 999px;
        background: rgba(255,255,255,.78);
        color: #475569;
        cursor: pointer;
    }
    .marketplace-location-body {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 16px;
        padding: 16px;
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
    .marketplace-region-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        align-content: start;
    }
    .marketplace-region-btn {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 3px;
        min-height: 64px;
        padding: 10px 14px;
        border: 1.5px solid #e2e8f0;
        border-radius: 12px;
        background: #fff;
        color: #0f172a;
        text-align: left;
        text-decoration: none;
        font-size: 14px;
        font-weight: 800;
        cursor: pointer;
        transition: border-color .15s, background .15s, transform .12s;
    }
    .marketplace-region-btn:hover {
        border-color: #b9cbe4;
        background: #f8fafc;
        transform: translateY(-1px);
    }
    .marketplace-region-btn.is-active {
        border-color: var(--shaxi-blue);
        background: var(--shaxi-blue-light);
        color: var(--shaxi-blue-dark);
    }
    .marketplace-region-btn .region-meta {
        font-size: 12px;
        font-weight: 700;
        color: #64748b;
    }
    .marketplace-region-btn.is-active .region-meta { color: var(--shaxi-blue); }
    .marketplace-district-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: 40px;
        padding: 0 12px;
        border: 0;
        background: #fff;
        color: #334155;
        text-align: left;
        text-decoration: none;
        font-size: 13px;
        font-weight: 800;
        cursor: pointer;
        border-bottom: 1px solid #f1f5f9;
    }
    .marketplace-district-link:hover,
    .marketplace-district-link.is-active {
        color: var(--shaxi-blue-dark);
        background: #f8fafc;
    }
    .marketplace-district-link.is-active {
        background: var(--shaxi-blue-light);
        font-weight: 800;
    }
    .marketplace-location-kind {
        flex: 0 0 auto;
        color: #7793aa;
        font-size: 11px;
        font-weight: 800;
    }
    .marketplace-district-panel {
        background: rgba(255,255,255,.48);
        border: 1px solid rgba(207,219,230,.76);
        border-radius: 10px;
        overflow: hidden;
        align-self: start;
    }
    .marketplace-district-head {
        padding: 12px;
        border-bottom: 1px solid #dfe8f1;
        background: rgba(255,255,255,.68);
    }
    .marketplace-district-head p {
        color: #64748b;
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .08em;
    }
    .marketplace-district-head h3,
    .marketplace-district-head .marketplace-location-title {
        margin-top: 4px;
        color: #111827;
        font-size: 14px;
        font-weight: 800;
    }
    .marketplace-location-empty {
        padding: 14px;
        color: #64748b;
        font-size: 14px;
        font-weight: 700;
    }

    /* ─── Phase 2: geolocation row ─── */
    .marketplace-location-geo {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        background: #fff;
        border: 1px solid #dbe7f4;
        border-radius: 12px;
        margin-bottom: 14px;
        transition: border-color .15s, background .15s, transform .12s;
        cursor: pointer;
        width: 100%;
        text-align: left;
        color: var(--shaxi-blue-dark);
        font-weight: 800;
        font-size: 14px;
    }
    .marketplace-location-geo:hover {
        border-color: var(--shaxi-blue);
        background: #f8fbff;
        transform: translateY(-1px);
    }
    .marketplace-location-geo:disabled,
    .marketplace-location-geo.is-loading {
        opacity: .7;
        cursor: progress;
    }
    .marketplace-location-geo .geo-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 999px;
        background: #e6f0fb;
        color: var(--shaxi-blue);
        flex-shrink: 0;
    }
    .marketplace-location-geo .geo-icon svg { width: 16px; height: 16px; }
    .marketplace-location-geo.is-loading .geo-icon svg {
        animation: shaxi-geo-spin 1.1s linear infinite;
    }
    @keyframes shaxi-geo-spin {
        from { transform: rotate(0deg); }
        to   { transform: rotate(360deg); }
    }
    .marketplace-location-geo .geo-copy { min-width: 0; flex: 1; }
    .marketplace-location-geo .geo-label { display: block; }
    .marketplace-location-geo .geo-sub {
        display: block;
        margin-top: 2px;
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
    }
    .marketplace-location-geo .geo-sub.is-error { color: #b91c1c; }
    .marketplace-location-geo .geo-sub.is-success { color: #047857; }

    /* ─── Phase 2: recently-used regions ─── */
    .marketplace-location-recents {
        margin-bottom: 14px;
    }
    .marketplace-location-recents-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 8px;
    }
    .marketplace-location-recents-head p {
        color: #64748b;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
    .marketplace-location-recents-clear {
        background: transparent;
        border: 0;
        color: #94a3b8;
        font-size: 11px;
        font-weight: 800;
        cursor: pointer;
        padding: 2px 6px;
        border-radius: 6px;
    }
    .marketplace-location-recents-clear:hover { color: var(--shaxi-red); background: #fef2f2; }
    .marketplace-location-recents-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }
    .marketplace-location-recent-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 36px;
        padding: 0 12px;
        border: 1.5px solid #dbe7f4;
        border-radius: 999px;
        background: #fff;
        color: #0f172a;
        font-size: 13px;
        font-weight: 800;
        cursor: pointer;
        transition: border-color .15s, background .15s, transform .12s;
    }
    .marketplace-location-recent-chip:hover {
        border-color: var(--shaxi-blue);
        background: var(--shaxi-blue-light);
        color: var(--shaxi-blue-dark);
        transform: translateY(-1px);
    }
    .marketplace-location-recent-chip svg {
        width: 12px;
        height: 12px;
        color: #94a3b8;
    }

    /* ─── Phase 2: drag-to-dismiss visual feedback ─── */
    .marketplace-location-panel[data-dragging="true"] {
        transition: none !important;
    }

    .btn-create {
        background: var(--shaxi-blue-dark);
        color: #fff;
        font-size: 14px;
        font-weight: 800;
        padding: 11px 18px;
        border-radius: 10px;
        border: none;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 42px;
        white-space: nowrap;
        text-decoration: none;
        transition: all 0.15s;
        letter-spacing: 0.01em;
    }
    .btn-section-cta { background: var(--shaxi-red); }
    .top-header .btn-section-cta:hover, .top-header .btn-section-cta:focus-visible { background: var(--shaxi-red-dark); color: #fff; }
    .header-zone-link { display: none; white-space: nowrap; font-size: 14px; font-weight: 700; color: #0f172a; padding: 8px 10px; border-radius: 10px; }
    .header-zone-link:hover { background: #f1f5f9; color: #0f172a; }
    @media (min-width: 1440px) { .header-zone-link { display: inline-flex; align-items: center; } }
    .top-header-focused { background: #fff; border-bottom: 1px solid #e2e8f0; }
    .focused-header-inner { flex: 1 1 auto; width: 100%; max-width: 1360px; margin: 0 auto; min-height: 64px; display: flex; align-items: center; gap: 18px; padding: 0 20px; }
    .focused-header-title { font-size: 14px; font-weight: 700; color: #475569; white-space: nowrap; }
    .focused-header-back { font-size: 14px; font-weight: 800; color: #0f172a; white-space: nowrap; }
    .header-zone-row { display: flex; gap: 18px; padding: 8px 20px; background: #fff; border-bottom: 1px solid #e2e8f0; overflow-x: auto; scrollbar-width: none; }
    @media (min-width: 1440px) { .header-zone-row { display: none; } }
    /* Spec: the header nav is text-only; icons live in the mobile Apps sheet. Frees ~170px so the zone fits at 1440. */
    @media (min-width: 1024px) { .app-nav-link > svg, .app-nav-dropdown-summary > svg:not(.app-nav-dropdown-caret) { display: none; } }
    /* While More is open the header rises above in-page controls (map buttons use z 65) but stays under modals. */
    .top-header:has(.app-nav-dropdown[open]) { z-index: 70; }
    /* Spec: no search icon in the mobile header — browse pages search from the hero. */
    @media (max-width: 639px) { .header-search-trigger { display: none; } }
    /* Spec: the nav sits left-aligned after the logo and the side zones size to their content.
       Equal-width side zones gave the right cluster ~360px for ~420px of content at 1440,
       so the zone links overlapped "More". */
    @media (min-width: 1024px) {
        .top-header-left { flex: 0 0 auto; }
        .top-header-right { flex: 0 0 auto; margin-left: auto; }
        .app-nav { flex: 1 1 auto; justify-content: flex-start; min-width: max-content; margin-left: 6px; }
    }
    /* The CTA never shrinks below its label; the region pill is what yields on narrow screens. */
    .btn-section-cta { flex-shrink: 0; }
    /* The legacy mobile rule below turns .btn-create into a 44px icon square for the old "+"
       trigger. The section CTA is a text label, so it keeps its width on phones. */
    .top-header .btn-section-cta { width: auto; height: auto; min-height: 42px; padding: 0 14px; border-radius: 10px; }
    /* Spec: the account slot is the avatar alone. The name/"Account" caption returns only when
       the header has room for it alongside the zone links (≥1536). */
    @media (max-width: 1535px) { .top-header .profile-menu-copy { display: none; } }
    /* Phones: the region pill takes the spec's compact "Accra ▾" form (no pin, capped label) so
       menu · logo · region · CTA fit one 64px row; "Post a job" beside a full pill wrapped. */
    @media (max-width: 639px) {
        .header-location-pill .location-pill-pin { display: none; }
        .header-location-pill { padding-left: 10px; }
        .header-location-pill .location-pill-name { max-width: 11ch; }
    }
    .header-location-pill { min-width: 0; }
    .header-location-pill .location-pill-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    @media (min-width: 640px) { .header-location-pill .location-pill-name { max-width: 34vw; } }
    .header-zone-row a { font-size: 13px; font-weight: 800; color: var(--shaxi-blue); white-space: nowrap; }
    .btn-create:hover,
    .btn-create.is-open {
        background: var(--shaxi-blue);
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(13,45,94,0.3);
    }
    .btn-create svg { width: 15px; height: 15px; }

    @media (max-width: 1180px) {
        .header-location-pill {
            flex-basis: 190px;
            max-width: 210px;
            padding-right: 11px;
        }
        .header-search-form {
            flex-basis: 300px;
        }
    }
    @media (max-width: 1024px) {
        .top-header {
            align-items: center;
            padding: 9px 12px;
            gap: 8px;
        }
        .topbar-shaxi-logo {
            height: 34px;
            max-width: 94px;
        }
        .header-location-pill {
            order: 0;
            flex: 1 1 150px;
            max-width: min(44vw, 220px);
            min-height: 40px;
            border-radius: 12px;
        }
        .header-location-pill .location-pill-pin {
            width: 25px;
            height: 25px;
        }
        .header-location-pill .location-pill-caret {
            margin-left: 2px;
        }
        .header-search-form {
            order: 20;
            flex-basis: 100%;
            max-width: none;
        }
        .header-search-submit {
            display: none;
        }
        .marketplace-location-layer {
            top: 78px;
        }
        .marketplace-region-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }
    /* Bottom-sheet pattern for phones. Anchors the panel to the bottom of
       the viewport, slides up from below, uses a drag handle, and tabs
       between regions and districts so the user never sees two scrollable
       columns stacked. */
    @media (max-width: 768px) {
        .marketplace-location-layer {
            top: 0;
            padding: 0;
            align-items: flex-end;
        }
        .marketplace-location-panel {
            width: 100%;
            max-width: 100%;
            max-height: 90vh;
            border-radius: 18px 18px 0 0;
            background: #fff;
            border: 0;
            box-shadow: 0 -12px 40px rgba(15, 23, 42, .25);
            transform-origin: bottom center;
        }
        .marketplace-location-handle { display: flex; }
        .marketplace-location-top {
            padding: 8px 14px 12px;
            gap: 10px;
            position: sticky;
            top: 0;
            background: #fff;
            z-index: 2;
            border-bottom: 1px solid #eef2f7;
        }
        /* Hide the "All Ghana" shortcut on mobile — it's available as the
           first row of the regions list. Saves header width on small screens. */
        .marketplace-location-top > a:first-child { display: none; }
        .marketplace-location-body {
            grid-template-columns: 1fr;
            padding: 14px;
            gap: 0;
            padding-bottom: calc(14px + env(safe-area-inset-bottom));
        }
        .marketplace-region-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }
        .marketplace-message-panel {
            position: fixed;
            top: 64px;
            right: 12px;
            left: 12px;
            width: auto;
            max-height: min(78vh, 560px);
        }
        .marketplace-message-toast {
            top: 72px;
            right: 12px;
            width: calc(100vw - 24px);
        }
        .btn-create {
            width: 44px;
            height: 44px;
            min-height: 44px;
            justify-content: center;
            padding: 0;
            border-radius: 13px;
        }
        .btn-create-label { display: none; }
        .client-page-toast,
        .account-page-toast {
            top: 72px;
            right: 12px;
            width: calc(100vw - 24px);
        }
        .client-header-search-route .client-page-toast,
        .client-header-search-route .account-page-toast {
            top: 120px;
        }
        /* Two-step mobile flow: only one column visible at a time */
        .marketplace-location-panel[data-step="regions"] .marketplace-district-panel { display: none; }
        .marketplace-location-panel[data-step="districts"] .marketplace-location-regions-col { display: none; }
        .marketplace-location-panel[data-step="districts"] .marketplace-location-back { display: inline-flex; }
        /* District panel takes the full body when active */
        .marketplace-location-panel[data-step="districts"] .marketplace-district-panel {
            border: 0;
            background: transparent;
        }
        /* Bigger touch targets for districts on mobile */
        .marketplace-district-link {
            min-height: 48px;
            font-size: 14px;
            padding: 0 14px;
        }
        .marketplace-region-btn {
            min-height: 72px;
            padding: 12px;
        }
        /* Slide-up entry */
        .marketplace-location-layer-enter-start {
            opacity: 0;
            transform: translateY(24px) scale(1);
        }
        .marketplace-location-layer-leave-end {
            opacity: 0;
            transform: translateY(20px) scale(1);
        }
    }
    @media (max-width: 420px) {
        .topbar-shaxi-logo {
            height: 31px;
            max-width: 86px;
        }
        .header-location-pill {
            max-width: calc(100vw - 196px);
            gap: 7px;
            padding: 6px 9px;
        }
        .header-location-pill .location-pill-name {
            font-size: 13px;
        }
        .header-location-pill .location-pill-caret {
            display: none;
        }
    }
    @media (prefers-reduced-motion: reduce) {
        html:not([data-alpine-ready="true"]) .client-page-shell::before {
            animation: none;
        }
        ::view-transition-old(root),
        ::view-transition-new(root),
        ::view-transition-old(shaxi-main),
        ::view-transition-new(shaxi-main),
        ::view-transition-old(shaxi-header),
        ::view-transition-new(shaxi-header) {
            animation: none !important;
        }
        .marketplace-location-layer,
        .marketplace-location-panel {
            transform: none !important;
            transition-duration: 1ms !important;
        }
    }
    @media (prefers-reduced-motion: no-preference) {
        ::view-transition-old(root),
        ::view-transition-new(root) {
            animation-duration: 160ms;
        }
        ::view-transition-old(shaxi-main) {
            animation: shaxi-page-out 120ms ease-in both;
        }
        ::view-transition-new(shaxi-main) {
            animation: shaxi-page-in 180ms ease-out both;
        }
        ::view-transition-old(shaxi-header),
        ::view-transition-new(shaxi-header) {
            animation: none;
            mix-blend-mode: normal;
        }
    }
    @keyframes shaxi-page-out {
        from { opacity: 1; transform: translateY(0); }
        to { opacity: 0; transform: translateY(4px); }
    }
    @keyframes shaxi-page-in {
        from { opacity: 0; transform: translateY(6px); }
        to { opacity: 1; transform: translateY(0); }
    }
