:root {
    --brand: #156b59;
    --ink: #203b35;
    --paper: #f5f7f3;
    --border: #dce5dd;
    --nav-deep: #083d5b;
    --nav-mid: #0b6974;
    --nav-green: #14745f;
    --nav-text: #f7fffd;
}


html {
    font-size: 18px;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: system-ui,sans-serif;
    font-weight: 700;
}

/* Site-wide typography: all visible text is intentionally bold. */
button, input, select, textarea, option {
    font: inherit;
    font-weight: 700;
}

::placeholder {
    font-weight: 700;
}

a {
    color: var(--brand);
    text-underline-offset: 3px;
}

.site-header {
    background: linear-gradient(105deg, var(--nav-deep) 0%, var(--nav-mid) 52%, var(--nav-green) 100%);
    border-bottom: 1px solid rgba(255,255,255,.22);
    box-shadow: 0 8px 24px rgba(8,61,91,.16);
}

.site-header .navbar-brand,
.site-header .nav-link,
.site-header a {
    color: var(--nav-text) !important;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus,
.site-header a:hover,
.site-header a:focus {
    color: #d7fff5 !important;
}

.site-header .language-form .form-select {
    color: #123f47;
    background-color: rgba(255,255,255,.94);
    border-color: rgba(255,255,255,.72);
}

/* Mobile hamburger: square, centered, and kept fully inside its border. */
.site-header .navbar-toggler {
    position: relative;
    display: inline-grid;
    place-items: center;
    box-sizing: border-box;
    padding: 0;
    border: 1px solid rgba(255,255,255,.58);
    border-radius: 10px;
    background: rgba(255,255,255,.035);
    line-height: 1;
    overflow: visible;
    transform: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.site-header .navbar-toggler:focus {
    box-shadow: 0 0 0 .18rem rgba(142,240,212,.22);
}

.site-header .navbar-toggler-icon {
    width: 24px;
    height: 24px;
    margin: 0;
    background-size: 24px 24px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Small green runner that travels clockwise around the hamburger border. */
.site-header .navbar-toggler-runner {
    position: absolute;
    z-index: 2;
    top: -2px;
    left: 8px;
    width: 10px;
    height: 4px;
    border-radius: 999px;
    background: #59f0ad;
    box-shadow: 0 0 7px rgba(89,240,173,.95), 0 0 12px rgba(89,240,173,.45);
    pointer-events: none;
    transform: translate(-50%,-50%);
    animation: navbar-toggler-runner-clockwise 7s linear infinite;
}

@keyframes navbar-toggler-runner-clockwise {
    0% {
        top: -2px;
        left: 8px;
        transform: translate(-50%,-50%) rotate(0deg);
    }
    24% {
        top: -2px;
        left: calc(100% - 8px);
        transform: translate(-50%,-50%) rotate(0deg);
    }
    25% {
        top: 8px;
        left: calc(100% + 2px);
        transform: translate(-50%,-50%) rotate(90deg);
    }
    49% {
        top: calc(100% - 8px);
        left: calc(100% + 2px);
        transform: translate(-50%,-50%) rotate(90deg);
    }
    50% {
        top: calc(100% + 2px);
        left: calc(100% - 8px);
        transform: translate(-50%,-50%) rotate(180deg);
    }
    74% {
        top: calc(100% + 2px);
        left: 8px;
        transform: translate(-50%,-50%) rotate(180deg);
    }
    75% {
        top: calc(100% - 8px);
        left: -2px;
        transform: translate(-50%,-50%) rotate(270deg);
    }
    99% {
        top: 8px;
        left: -2px;
        transform: translate(-50%,-50%) rotate(270deg);
    }
    100% {
        top: -2px;
        left: 8px;
        transform: translate(-50%,-50%) rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header .navbar-toggler-runner {
        animation: none;
    }
}

.navbar {
    max-width: 1440px;
    margin: auto;
    padding: 1rem;
}
.logo-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}

.navbar-brand {
    color: var(--nav-text);
    font-size: 1.05rem;
}

    .navbar-brand strong {
        color: #8ef0d4;
    }

    .navbar-brand small {
        display: block;
        font-size: .7rem;
        color: rgba(247,255,253,.82);
        margin-top: .2rem;
    }

.site-main {
    max-width: 1320px;
    padding: 2.5rem 1.5rem;
    margin: auto;
    min-height: 75vh;
}

.site-footer {
    max-width: 1320px;
    margin: auto;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    gap: 1rem;
}

h1 {
    font-size: clamp(2rem,4vw,3rem);
    letter-spacing: -.035em;
    font-weight: 800;
}

h2 {
    font-size: 1.4rem;
}

.eyebrow {
    color: #536c60;
    font-size: .78rem;
    letter-spacing: .08em;
    font-weight: 800;
}

.community-card {
    padding: 1.6rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: white;
    margin: 1rem 0;
    overflow-wrap: anywhere;
}

/* Homepage hero: transparent frosted-glass frame around the artwork. */
.hero-glass-frame {
    position: relative;
    margin: 1.35rem 0 .25rem;
    padding: .8rem;
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,.62);
    background: linear-gradient(135deg, rgba(255,255,255,.48), rgba(220,244,242,.22));
    box-shadow:
        0 18px 46px rgba(8,61,91,.14),
        inset 0 1px 0 rgba(255,255,255,.80);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    backdrop-filter: blur(18px) saturate(135%);
    overflow: hidden;
}

.hero-glass-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, rgba(255,255,255,.24), transparent 38%, rgba(21,107,89,.08));
}

.hero-glass-frame img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(7,52,79,.14);
}

.section-heading, .action-row, .pager {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-heading {
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding: 1rem 0;
}

    .filter-bar .form-control {
        flex: 2;
        min-width: 150px;
    }

    .filter-bar .form-select {
        flex: 1;
        min-width: 150px;
    }

.btn {
    min-height: 44px;
    padding: .55rem 1rem;
    border-radius: 9px;
    font-weight: 700;
}

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
}

.btn-outline-primary {
    color: var(--brand);
    border-color: var(--brand);
}

.btn:hover {
    filter: brightness(.94);
}

.editor {
    max-width: 800px;
    display: grid;
    gap: .8rem;
    margin: 1.5rem 0;
}

    .editor label {
        font-weight: 700;
    }

    .editor .btn {
        justify-self: start;
    }

.form-control, .form-select {
    min-height: 44px;
}

.post-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.empty-state {
    border: 1px dashed #9cb3a7;
    padding: 2rem;
    border-radius: 12px;
}

.language-form {
    display: flex;
    gap: .35rem;
    padding: .5rem;
    align-items: center;
    margin-left: auto;
}

    .language-form select {
        width: auto;
        min-width: 138px;
        max-width: 180px;
        font-size: .86rem;
    }

.navbar-collapse {
    flex-wrap: wrap;
    row-gap: .35rem;
}

.navbar-nav {
    flex-wrap: wrap;
    row-gap: .15rem;
}

.navbar .nav-link {
    font-size: .88rem;
    white-space: nowrap;
}

time {
    color: #536c60;
    font-size: .85rem;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 10;
    background: white;
    padding: 1rem;
}

    .skip-link:focus {
        top: 1rem;
    }

:focus-visible {
    outline: 3px solid #b76619;
    outline-offset: 3px;
}

@media(max-width:700px) {
    .site-main {
        padding: 1.4rem 1rem;
    }

    .community-card {
        padding: 1.1rem;
    }

    .language-form {
        padding: .5rem 0;
    }

    .site-footer {
        flex-wrap: wrap;
    }
}

/* Phase 8: mobile-first navigation and resilient responsive layout. */
.mobile-bottom-nav {
    display: none;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

img, svg {
    max-width: 100%;
}

input, select, textarea, button {
    max-width: 100%;
}

@media(max-width:991.98px) {
    .navbar {
        padding: .75rem 1rem;
    }

    .navbar-collapse {
        padding-top: .75rem;
    }

    .navbar-nav {
        gap: .1rem;
    }

    .navbar .nav-link {
        padding: .65rem .25rem;
    }

    .language-form {
        margin-left: 0;
        width: 100%;
        padding: .5rem 0;
    }

        .language-form select {
            width: 100%;
            max-width: none;
        }
}

@media(max-width:700px) {
    body {
        padding-bottom: 74px;
    }

    .site-main {
        padding: 1.4rem 1rem;
    }

    .community-card {
        padding: 1.1rem;
        border-radius: 12px;
    }

    .hero-glass-frame {
        padding: .5rem;
        border-radius: 18px;
    }

    .hero-glass-frame img {
        border-radius: 13px;
    }

    .site-footer {
        flex-wrap: wrap;
        padding-bottom: 1.25rem;
    }

    .section-heading {
        align-items: flex-start;
    }

    .filter-bar > * {
        width: 100%;
    }

    .filter-bar .form-control, .filter-bar .form-select {
        min-width: 0;
    }

    .btn {
        white-space: normal;
    }

    .mobile-bottom-nav {
        position: fixed;
        z-index: 1040;
        left: 0;
        right: 0;
        bottom: 0;
        display: grid;
        grid-template-columns: repeat(5,minmax(0,1fr));
        min-height: 64px;
        padding: 5px max(6px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));
        background: #fff;
        border-top: 1px solid var(--border);
        box-shadow: 0 -4px 18px rgba(25,45,39,.08);
    }

        .mobile-bottom-nav a {
            min-width: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 2px;
            padding: 4px 2px;
            color: var(--ink);
            text-decoration: none;
            font-size: .66rem;
            line-height: 1.1;
            text-align: center;
        }

            .mobile-bottom-nav a span:first-child {
                color: var(--brand);
                font-size: 1.15rem;
                line-height: 1;
            }

            .mobile-bottom-nav a span:last-child {
                overflow: hidden;
                text-overflow: ellipsis;
                width: 100%;
            }
}


/* Clickable header logo + large-logo glass modal. */
.logo-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: zoom-in;
    line-height: 0;
}

.logo-trigger .logo-img {
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.logo-trigger:hover .logo-img,
.logo-trigger:focus-visible .logo-img {
    transform: scale(1.06);
    box-shadow: 0 0 0 4px rgba(255,255,255,.20), 0 8px 22px rgba(0,0,0,.22);
    filter: brightness(1.05);
}

.logo-trigger:focus-visible {
    outline: 3px solid rgba(255,255,255,.95);
    outline-offset: 4px;
}

.logo-modal .modal-dialog {
    width: min(92vw, 680px);
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
}

.logo-modal-content {
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.38);
    border-radius: 30px;
    background:
        linear-gradient(145deg, rgba(8,61,91,.88), rgba(11,105,116,.78) 52%, rgba(20,116,95,.82));
    box-shadow: 0 28px 80px rgba(0,0,0,.38);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
    backdrop-filter: blur(22px) saturate(145%);
}

.logo-modal-content .modal-body {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    padding: 2.4rem;
}

.logo-modal-image {
    display: block;
    width: min(74vw, 520px);
    max-height: 72vh;
    object-fit: contain;
    border-radius: 50%;
    filter: drop-shadow(0 18px 34px rgba(0,0,0,.32));
}

.logo-modal-close {
    position: absolute;
    z-index: 2;
    top: 1rem;
    right: 1rem;
    opacity: .95;
}

.logo-modal-close:hover,
.logo-modal-close:focus {
    opacity: 1;
}

@media (max-width: 700px) {
    .logo-modal .modal-dialog {
        width: calc(100vw - 1.5rem);
        margin: .75rem auto;
    }

    .logo-modal-content {
        border-radius: 22px;
    }

    .logo-modal-content .modal-body {
        min-height: 280px;
        padding: 2rem 1rem;
    }

    .logo-modal-image {
        width: min(82vw, 460px);
        max-height: 68vh;
    }
}


/* Mobile header: keep logo/brand and hamburger on one top row.
   Logo stays at the upper-left; hamburger stays at the upper-right.
   The expanded navigation always opens on a full-width row below. */
@media (max-width: 991.98px) {
    .site-header .navbar > .container-fluid {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "logo brand toggle"
            "menu menu menu";
        align-items: center;
        column-gap: .65rem;
        row-gap: 0;
        flex-wrap: nowrap;
    }

    .site-header .logo-trigger {
        grid-area: logo;
        align-self: center;
        justify-self: start;
    }

    .site-header .navbar-brand {
        grid-area: brand;
        min-width: 0;
        margin: 0;
        line-height: 1.12;
        overflow: hidden;
    }

    .site-header .navbar-brand small {
        line-height: 1.15;
    }

    .site-header .navbar-toggler {
        grid-area: toggle;
        justify-self: end;
        align-self: center;
        width: 48px;
        height: 48px;
        margin: 0;
        padding: 0;
        flex: 0 0 auto;
    }

    .site-header .navbar-collapse {
        grid-area: menu;
        width: 100%;
        min-width: 0;
        padding-top: .75rem;
    }
}

/* Keep the first mobile row compact on phone-size screens. */
@media (max-width: 575.98px) {
    .site-header .navbar {
        padding: .65rem .8rem;
    }

    .site-header .logo-img {
        width: 58px;
        height: 58px;
    }

    .site-header .navbar-brand {
        font-size: .92rem;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .site-header .navbar-brand small {
        margin-top: .16rem;
        font-size: .62rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .site-header .navbar-toggler {
        width: 46px;
        height: 46px;
    }
}

/* Extra narrow phones: preserve the one-row layout without wrapping. */
@media (max-width: 390px) {
    .site-header .navbar > .container-fluid {
        column-gap: .45rem;
    }

    .site-header .logo-img {
        width: 52px;
        height: 52px;
    }

    .site-header .navbar-brand {
        font-size: .82rem;
    }

    .site-header .navbar-brand small {
        font-size: .56rem;
    }

    .site-header .navbar-toggler {
        width: 44px;
        height: 44px;
        padding: 0;
    }
}

/* Community Alliance V2.0 */
.site-header-v2 .navbar { max-width: 1540px; padding: .7rem 1rem; }
.brand-v2 { display:flex; align-items:center; gap:.65rem; text-decoration:none; color:#fff !important; font-size:1.05rem; font-weight:800; white-space:nowrap; margin-right:1rem; }
.brand-v2 .logo-img { width:58px; height:58px; }
.top-nav-v2 { gap:.08rem; }
.top-nav-v2 .nav-link { border-radius:10px; padding:.55rem .62rem !important; font-size:.9rem; white-space:nowrap; }
.top-nav-v2 .nav-link:hover { background:rgba(255,255,255,.10); }
.need-help-link { background:rgba(255,255,255,.13); }
.top-nav-actions { display:flex; align-items:center; gap:.5rem; margin-left:auto; }
.top-nav-actions .language-form { min-width:135px; }
.top-nav-actions .form-select { min-height:40px; font-size:.84rem; }
.nav-auth-link { color:#fff !important; text-decoration:none; padding:.53rem .72rem; border:1px solid rgba(255,255,255,.42); border-radius:10px; font-size:.86rem; white-space:nowrap; }
.nav-auth-primary { background:#fff; color:#114f55 !important; border-color:#fff; }
.site-main-v2 { max-width:1540px; padding:1.4rem 1.25rem 2.5rem; }
.home-v2-heading { margin:.25rem 0 .8rem; }
.home-v2-heading h1 { margin:.12rem 0 .3rem; }
.metro-map-shell { position:relative; border:1px solid rgba(255,255,255,.7); border-radius:28px; padding:.65rem; background:rgba(255,255,255,.48); box-shadow:0 18px 46px rgba(8,61,91,.13); backdrop-filter:blur(18px) saturate(135%); overflow:hidden; }
.metro-community-map { width:100%; height:min(62vh,650px); min-height:420px; border-radius:20px; overflow:hidden; background:#dfece9; }
.metro-community-map.map-load-failed { background:linear-gradient(135deg,#dfece9,#e9f2f8); }
.map-config-message { position:absolute; inset:50% auto auto 50%; transform:translate(-50%,-50%); width:min(560px,calc(100% - 3rem)); padding:1.15rem 1.3rem; border-radius:16px; background:rgba(255,255,255,.94); box-shadow:0 12px 34px rgba(8,61,91,.18); display:grid; gap:.35rem; text-align:center; }
.map-info-card { max-width:360px; color:#203b35; font:600 14px/1.45 system-ui,sans-serif; }
.map-info-card h3 { font-size:18px; margin:0 0 8px; }
.map-info-card p { margin:0 0 8px; }
.map-info-card dl { display:grid; grid-template-columns:max-content 1fr; gap:4px 9px; margin:8px 0 12px; }
.map-info-card dt { font-weight:800; }
.map-info-card dd { margin:0; overflow-wrap:anywhere; }
.map-current-badge { display:inline-block; margin-left:6px; padding:2px 6px; border-radius:999px; background:#0b6f5c; color:#fff; font-size:11px; }
.map-detail-button { display:inline-flex; padding:7px 11px; border-radius:9px; background:#156b59; color:#fff !important; text-decoration:none; }
.app-launcher { margin:1.35rem 0; padding:1.2rem; border:1px solid rgba(255,255,255,.68); border-radius:28px; background:linear-gradient(135deg,rgba(255,255,255,.60),rgba(210,239,235,.28)); box-shadow:0 18px 46px rgba(8,61,91,.10); backdrop-filter:blur(20px) saturate(145%); }
.app-launcher-title-row h2 { margin:0; }
.app-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(112px,1fr)); gap:.85rem; margin-top:1rem; }
.app-tile { min-height:116px; aspect-ratio:1/1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:.55rem; padding:.8rem; border:1px solid rgba(255,255,255,.8); border-radius:24px; background:rgba(255,255,255,.50); color:#173f3a; text-decoration:none; box-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 8px 24px rgba(8,61,91,.08); transition:transform .15s ease,box-shadow .15s ease,background .15s ease; }
.app-tile:hover,.app-tile:focus { transform:translateY(-3px); background:rgba(255,255,255,.80); box-shadow:0 12px 28px rgba(8,61,91,.14); color:#0c5f52; }
.app-icon { width:46px; height:46px; display:grid; place-items:center; border-radius:15px; background:linear-gradient(145deg,#0d7280,#166b59); color:#fff; font-size:1.45rem; box-shadow:0 7px 18px rgba(14,95,96,.24); }
.home-hero-bottom { margin-top:1.4rem; padding:1.25rem; border-radius:24px; border:1px solid var(--border); background:#fff; }
.hero-copy { margin-bottom:.4rem; }
.community-detail-v2,.content-page-v2,.voice-page-v2 { max-width:1120px; margin:0 auto; }
.back-link { display:inline-block; margin:.2rem 0 1rem; }
.community-detail-hero { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; padding:1.35rem; border-radius:22px; background:#fff; border:1px solid var(--border); }
.member-count-card { min-width:150px; padding:1rem; border-radius:18px; background:linear-gradient(145deg,#0d7280,#166b59); color:#fff; text-align:center; }
.member-count-card span,.member-count-card strong { display:block; }
.member-count-card strong { font-size:2.1rem; }
.detail-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; margin-top:1rem; }
.detail-panel,.content-page-v2,.voice-card { padding:1.25rem; border-radius:22px; background:#fff; border:1px solid var(--border); }
.detail-list-item { display:flex; justify-content:space-between; gap:1rem; padding:.72rem 0; border-bottom:1px solid var(--border); text-decoration:none; }
.detail-list-item:last-child { border-bottom:0; }
.detail-list-item small { color:#657a74; white-space:nowrap; }
.empty-state.compact { padding:1rem; }
.content-page-v2 { margin-top:.8rem; }
.voice-card { display:grid; gap:.8rem; margin-top:1rem; }
.voice-status { min-height:1.5rem; margin:0; }
.site-footer-v2 { max-width:1540px; align-items:center; }
.site-footer-v2 nav { display:flex; gap:.55rem; align-items:center; flex-wrap:wrap; }
@media (max-width:1199.98px) { .top-nav-actions { align-items:stretch; flex-wrap:wrap; margin:.65rem 0 0; } .top-nav-actions .language-form { flex:1 1 180px; } .nav-auth-link { text-align:center; } }
@media (max-width:767.98px) { .site-main-v2 { padding:1rem .75rem 1.8rem; } .metro-community-map { min-height:360px; height:55vh; } .app-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:.6rem; } .app-tile { min-height:96px; border-radius:20px; font-size:.76rem; padding:.55rem; } .app-icon { width:40px; height:40px; border-radius:13px; } .detail-summary-grid { grid-template-columns:1fr; } .community-detail-hero { flex-direction:column; } .member-count-card { width:100%; } .site-footer-v2 { flex-direction:column; align-items:flex-start; } }
@media (max-width:420px) { .app-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.app-tile-form { margin:0; }
.app-tile-button { width:100%; border:1px solid rgba(255,255,255,.8); font:inherit; }
.home-v2-heading-after-map { margin-top:1rem; }

/* V2.3 home-map search and temporary tester login */
.tester-login-form { margin:0; }
.tester-login-button { background:rgba(255,255,255,.10); cursor:pointer; font:inherit; }
.tester-login-button:hover,.tester-login-button:focus { background:rgba(255,255,255,.18); }
.map-search-panel { margin:0 0 .75rem; padding:.8rem; border:1px solid rgba(255,255,255,.72); border-radius:22px; background:rgba(255,255,255,.62); box-shadow:0 12px 32px rgba(8,61,91,.10); backdrop-filter:blur(16px) saturate(130%); }
.map-search-form { display:grid; grid-template-columns:minmax(280px,1fr) minmax(170px,230px) auto; gap:.65rem; align-items:center; }
.map-search-input { min-width:0; min-height:44px; border-radius:12px; }
.map-search-scope { min-height:44px; border-radius:12px; }
.map-search-button { min-height:44px; min-width:92px; border-radius:12px; white-space:nowrap; }
.map-search-results { margin-top:.75rem; border-top:1px solid rgba(14,95,96,.13); padding-top:.65rem; }
.map-search-results-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; color:#173f3a; }
.map-search-result-list { display:grid; gap:.45rem; margin-top:.5rem; max-height:260px; overflow:auto; padding-right:.2rem; }
.map-search-result-item { display:grid; gap:.12rem; padding:.58rem .72rem; border:1px solid rgba(14,95,96,.12); border-radius:12px; background:rgba(255,255,255,.75); }
.map-search-result-item a { font-weight:800; color:#0b675b; text-decoration:none; }
.map-search-result-item a:hover,.map-search-result-item a:focus { text-decoration:underline; }
.map-search-result-item span { color:#385e57; font-size:.86rem; }
.map-search-result-item small { color:#6a7d78; overflow-wrap:anywhere; }
.map-search-empty { margin:.55rem 0 0; color:#61736e; }
.map-marker-status { display:flex; justify-content:flex-end; align-items:center; gap:.35rem; margin:0 .35rem .4rem; color:#55716a; font-size:.82rem; }
.map-marker-status strong { color:#0b675b; }
@media (max-width:767.98px) {
    .map-search-form { grid-template-columns:1fr; }
    .map-search-button { width:100%; }
    .map-search-result-list { max-height:220px; }
}


/* Classified Ads module imported from MaxAI AD V5 */

.category-card span {
    font-size: 2rem;
}

.category-card small {
    color: #6c757d;
}

.ad-card {
    overflow: hidden;
}

.ad-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.ad-card a {
    text-decoration: none;
    color: #173a62;
}

.ad-detail-img {
    max-height: 620px;
    object-fit: contain;
    background: #111;
}

.form-control,
.form-select {
    border-radius: 10px;
}

footer {
        animation: none;
        opacity: .42;
        transform: translate(-50%, -50%) scale(1.18);
    }
}

/* ===================== V5 广告编辑、删除与AI辅助 ===================== */
.ad-editor-shell,.my-ads-shell,.ad-delete-shell{width:min(1450px,calc(100% - 18px));margin:0 auto;padding:clamp(16px,2.5vw,34px);border:1px solid rgba(255,255,255,.8);border-radius:28px;background:rgba(255,255,255,.46);box-shadow:0 24px 70px rgba(25,61,94,.18);backdrop-filter:blur(22px) saturate(145%);-webkit-backdrop-filter:blur(22px) saturate(145%)}
.ad-editor-heading,.my-ads-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}.ad-editor-heading span,.my-ads-heading span{font-weight:850;letter-spacing:.08em;color:#85501d}.ad-editor-heading h1,.my-ads-heading h1{margin:.15rem 0;font-size:clamp(2rem,4vw,3.5rem);color:#153e67}.ad-editor-heading p,.my-ads-heading p{margin:0;color:#536b7e}
.ad-editor-card{padding:clamp(18px,2.5vw,34px);border:1px solid rgba(255,255,255,.82);border-radius:22px;background:rgba(255,255,255,.67);box-shadow:0 13px 35px rgba(25,60,93,.11)}.ad-editor-card label{font-weight:800;color:#24465f}.ad-editor-card .form-control,.ad-editor-card .form-select{min-height:46px;background:rgba(255,255,255,.9)}.ad-editor-card textarea.form-control{min-height:260px;line-height:1.7}
.description-toolbar{display:flex;justify-content:space-between;align-items:end;gap:15px;margin-bottom:8px}.description-toolbar small{display:block;color:#62778a}.btn-ai-draft{border:0;border-radius:13px;padding:11px 18px;background:linear-gradient(135deg,#ffd84d,#e8a72f);color:#4f2d0d;font-weight:900;box-shadow:0 10px 25px rgba(111,67,31,.25);white-space:nowrap}.btn-ai-draft:hover{transform:translateY(-1px)}.btn-ai-draft:disabled{opacity:.62;cursor:wait}.ai-draft-status{min-height:28px;padding-top:7px;font-weight:700}.ai-draft-status.working{color:#806016}.ai-draft-status.success{color:#197044}.ai-draft-status.error{color:#b02a24}
.existing-image-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px}.existing-image-card{overflow:hidden;border:1px solid rgba(80,110,135,.2);border-radius:14px;background:#fff;cursor:pointer}.existing-image-card img{display:block;width:100%;height:145px;object-fit:cover}.existing-image-card span{display:flex;align-items:center;gap:7px;padding:9px;color:#8f2721;font-weight:700}
.my-ad-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:16px}.my-ad-card{overflow:hidden;border:1px solid rgba(255,255,255,.82);border-radius:20px;background:rgba(255,255,255,.69);box-shadow:0 12px 30px rgba(24,59,91,.11)}.my-ad-card>img{width:100%;height:210px;object-fit:cover}.my-ad-card-body{padding:17px}.my-ad-card-body h2{font-size:1.28rem}.my-ad-card-body h2 a{color:#145f91;text-decoration:none}.my-ad-status-row{display:flex;justify-content:space-between;align-items:center;color:#667988}.ad-status{padding:4px 9px;border-radius:999px;background:#eef3f6;font-weight:800}.status-1{background:#fff0c8;color:#7d5a00}.status-2{background:#dbf3e4;color:#176840}.status-3{background:#ffe1df;color:#9c2b25}.my-ad-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.ad-delete-shell{display:grid;place-items:center;min-height:62vh}.ad-delete-card{max-width:720px;padding:clamp(24px,4vw,50px);text-align:center;border:1px solid rgba(255,255,255,.84);border-radius:25px;background:rgba(255,255,255,.76);box-shadow:0 16px 45px rgba(60,34,18,.16)}.delete-warning-icon{font-size:3.4rem}.ad-delete-card h1{color:#8f2e25}.ad-delete-card h2{color:#174f7c}.delete-preview{max-width:100%;max-height:300px;border-radius:16px;object-fit:contain}
@media(max-width:760px){.ad-editor-heading,.my-ads-heading,.description-toolbar{align-items:stretch;flex-direction:column}.ad-editor-shell,.my-ads-shell,.ad-delete-shell{width:100%;padding:13px;border-radius:19px}.btn-ai-draft{width:100%}.my-ad-grid{grid-template-columns:1fr}}

/* ===================== Classified Ads category launcher + results ===================== */
.ads-category-launcher{padding:clamp(18px,2.4vw,32px);border:1px solid rgba(255,255,255,.78);border-radius:30px;background:linear-gradient(135deg,rgba(255,255,255,.56),rgba(219,241,246,.24));box-shadow:0 18px 46px rgba(8,61,91,.12);backdrop-filter:blur(22px) saturate(145%);-webkit-backdrop-filter:blur(22px) saturate(145%)}
.ads-category-launcher-header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem}.ads-category-kicker{display:inline-block;margin-bottom:.4rem;font-weight:800;letter-spacing:.08em;color:#8c5d21}.ads-category-launcher h2{margin:0 0 .35rem;color:#153e67}.ads-category-launcher p{max-width:980px;color:#4f6779}
.ads-category-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:1rem}
.ads-category-card{display:flex;flex-direction:column;gap:.7rem;align-self:start}.ads-category-trigger{width:100%;min-height:132px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.62rem;padding:1rem .75rem;border:1px solid rgba(255,255,255,.85);border-radius:24px;background:rgba(255,255,255,.54);color:#173f3a;box-shadow:inset 0 1px 0 rgba(255,255,255,.96),0 8px 24px rgba(8,61,91,.09);transition:transform .15s ease,box-shadow .15s ease,background .15s ease;cursor:pointer}.ads-category-trigger:hover,.ads-category-trigger:focus{transform:translateY(-3px);background:rgba(255,255,255,.82);box-shadow:0 12px 28px rgba(8,61,91,.14)}
.ads-category-card.is-open .ads-category-trigger{background:rgba(255,255,255,.88);border-color:rgba(21,95,145,.20);box-shadow:0 12px 28px rgba(8,61,91,.15)}
.ads-category-icon{width:56px;height:56px;display:grid;place-items:center;border-radius:18px;background:linear-gradient(145deg,#5f8af4,#51b79c);color:#fff;font-size:1.8rem;box-shadow:0 9px 22px rgba(58,104,181,.25)}
.ads-category-label{font-weight:800;line-height:1.35;text-align:center;word-break:break-word}
.ads-subcategory-panel{padding:1rem;border:1px solid rgba(255,255,255,.82);border-radius:20px;background:rgba(255,255,255,.72);box-shadow:0 10px 28px rgba(8,61,91,.08)}
.ads-subcategory-caption{margin-bottom:.7rem;font-size:.93rem;font-weight:800;color:#6d4c1d}.ads-subcategory-list{display:flex;flex-wrap:wrap;gap:.55rem}.ads-subcategory-chip{display:inline-flex;align-items:center;justify-content:center;padding:.55rem .9rem;border-radius:999px;border:1px solid rgba(21,95,145,.15);background:rgba(255,255,255,.94);color:#115f91;text-decoration:none;font-weight:700;line-height:1.25;transition:all .15s ease}.ads-subcategory-chip:hover,.ads-subcategory-chip:focus{background:#115f91;color:#fff;transform:translateY(-1px)}

.ads-results-shell{width:min(1180px,calc(100% - 18px));margin:0 auto;padding:clamp(18px,2.6vw,34px);border:1px solid rgba(255,255,255,.82);border-radius:28px;background:rgba(255,255,255,.56);box-shadow:0 20px 54px rgba(8,61,91,.12);backdrop-filter:blur(20px) saturate(140%);-webkit-backdrop-filter:blur(20px) saturate(140%)}
.ads-results-header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem}.ads-results-backlink{display:inline-block;margin-bottom:.35rem;color:#156b59;text-decoration:none;font-weight:700}.ads-results-backlink:hover,.ads-results-backlink:focus{text-decoration:underline}.ads-results-breadcrumb{margin-bottom:.4rem;color:#6e7f91;font-size:.92rem}.ads-results-header h1{margin:0 0 .3rem;color:#153e67}
.ads-results-list{display:grid;gap:.9rem}.ads-result-item{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.1rem;border:1px solid rgba(255,255,255,.84);border-radius:18px;background:rgba(255,255,255,.82);box-shadow:0 10px 26px rgba(8,61,91,.07);text-decoration:none;color:#173f3a;transition:transform .15s ease,box-shadow .15s ease,background .15s ease}.ads-result-item:hover,.ads-result-item:focus{transform:translateY(-2px);background:#fff;box-shadow:0 14px 30px rgba(8,61,91,.11)}
.ads-result-item-main{display:grid;gap:.35rem;min-width:0;flex:1}.ads-result-title-row{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}.ads-result-title-row h2{margin:0;font-size:1.16rem;color:#15537f}.ads-result-meta{display:flex;flex-wrap:wrap;gap:.9rem;color:#5f7484;font-size:.93rem}.ads-result-arrow{font-size:2rem;line-height:1;color:#7d96aa}

@media (max-width:991.98px){.ads-category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.ads-results-header{flex-direction:column;align-items:stretch}}
@media (max-width:767.98px){.ads-category-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}.ads-category-trigger{min-height:118px;border-radius:20px}.ads-category-icon{width:48px;height:48px;font-size:1.55rem;border-radius:15px}.ads-subcategory-panel{padding:.85rem}.ads-result-item{padding:.9rem;align-items:flex-start}.ads-result-title-row h2{font-size:1.03rem}.ads-result-meta{gap:.45rem;flex-direction:column}.ads-result-arrow{display:none}}
@media (max-width:420px){.ads-category-grid{grid-template-columns:1fr}}

/* FIX03: category interaction, richer icon palette, result thumbnails */
.ads-category-trigger{position:relative;overflow:hidden}
.ads-category-trigger::before{content:"";position:absolute;inset:-45% auto auto -35%;width:90px;height:90px;border-radius:50%;background:rgba(255,255,255,.34);filter:blur(2px);pointer-events:none}
.ads-category-icon{position:relative;isolation:isolate;width:58px;height:58px;border-radius:19px;font-size:1.78rem;border:1px solid rgba(255,255,255,.66);box-shadow:inset 0 1px 0 rgba(255,255,255,.75),0 10px 24px rgba(30,76,120,.20)}
.ads-category-icon::after{content:"";position:absolute;inset:5px;border-radius:14px;background:linear-gradient(145deg,rgba(255,255,255,.22),rgba(255,255,255,0));z-index:-1}
.icon-tone-1{background:linear-gradient(145deg,#ff7b72,#ffad66)}
.icon-tone-2{background:linear-gradient(145deg,#5b8ff9,#61d9a8)}
.icon-tone-3{background:linear-gradient(145deg,#9966e8,#e56ab3)}
.icon-tone-4{background:linear-gradient(145deg,#28b7c8,#65d38e)}
.icon-tone-5{background:linear-gradient(145deg,#ff6680,#ffb03a)}
.icon-tone-6{background:linear-gradient(145deg,#4f86f7,#7d6cf2)}
.icon-tone-7{background:linear-gradient(145deg,#19a7a7,#4fc3f7)}
.icon-tone-8{background:linear-gradient(145deg,#ef6c8f,#b36ae2)}
.icon-tone-9{background:linear-gradient(145deg,#e8a12b,#f4d35e)}
.icon-tone-10{background:linear-gradient(145deg,#3b82f6,#22c1c3)}
.icon-tone-11{background:linear-gradient(145deg,#2dac73,#77cf61)}
.icon-tone-12{background:linear-gradient(145deg,#ec6f66,#d95f9d)}
.ads-category-chevron{position:absolute;right:12px;bottom:8px;color:#7b8d91;font-size:1rem;transition:transform .18s ease}
.ads-category-card.is-open .ads-category-chevron{transform:rotate(180deg);color:#156b59}
.ads-category-card.is-open .ads-subcategory-panel{animation:adsSubcategoryReveal .17s ease-out}
@keyframes adsSubcategoryReveal{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}

.ads-result-item{display:grid;grid-template-columns:132px minmax(0,1fr) auto;align-items:center}
.ads-result-thumb-wrap{width:132px;height:96px;border-radius:14px;overflow:hidden;background:#edf4f3;border:1px solid rgba(14,95,96,.10)}
.ads-result-thumb{width:100%;height:100%;object-fit:cover;display:block}
.ads-result-thumb-empty{display:grid;place-items:center;font-size:2.15rem;background:linear-gradient(145deg,#e9f4f3,#e9eff9)}
.ads-result-price-row{margin-top:.15rem}.ads-result-price-row strong{font-size:1.08rem;color:#a26010}
.ads-result-city{font-weight:700;color:#365f58}
@media(max-width:767.98px){.ads-result-item{grid-template-columns:92px minmax(0,1fr)}.ads-result-thumb-wrap{width:92px;height:78px}.ads-result-arrow{display:none}}
@media(max-width:480px){.ads-result-item{grid-template-columns:1fr}.ads-result-thumb-wrap{width:100%;height:170px}}
/* Make the selected category reveal a full-width row of subcategory text buttons. */
.ads-category-card{display:contents}
.ads-subcategory-panel{grid-column:1/-1;width:100%}
