.community-map-screen {
    position: relative;
    min-height: 100svh;
    padding-top: 80px;
    background: #030706;
}

.community-map-stage {
    position: relative;
    min-height: calc(100svh - 80px);
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 18% 16%, rgba(0, 255, 157, 0.16), transparent 34%),
        radial-gradient(circle at 86% 78%, rgba(0, 184, 255, 0.14), transparent 36%),
        #030706;
}

.community-map-stage .community-map {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    border-radius: 0;
    filter: saturate(1.12) contrast(1.04) brightness(1.12);
}

.community-map .maplibregl-canvas {
    outline: none;
}

.community-map .maplibregl-ctrl-group {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.8rem;
    background: rgba(3, 11, 9, 0.78);
    backdrop-filter: blur(14px);
}

.community-map .maplibregl-ctrl-group button {
    background-color: transparent;
}

.community-map .maplibregl-ctrl-group button:hover {
    background: rgba(0, 255, 157, 0.12);
}

.community-map .maplibregl-ctrl-attrib {
    background: rgba(3, 11, 9, 0.72);
    color: rgba(232, 255, 246, 0.72);
}

.community-map .maplibregl-ctrl-attrib a {
    color: #00ff9d;
}

.community-map .maplibregl-popup-content {
    border-radius: 1rem;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

.community-map .maplibregl-popup-close-button {
    width: 28px;
    height: 28px;
    color: #10201b;
    font-size: 1.2rem;
}

.community-map-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(3, 7, 6, 0.56) 0%, rgba(3, 7, 6, 0.26) 28%, rgba(3, 7, 6, 0.02) 58%, rgba(3, 7, 6, 0.06) 100%),
        linear-gradient(0deg, rgba(3, 7, 6, 0.16) 0%, transparent 24%, transparent 70%, rgba(3, 7, 6, 0.18) 100%);
}

.community-map-stage::before {
    content: "";
    position: absolute;
    inset: -18%;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    background:
        linear-gradient(112deg, transparent 0%, transparent 38%, rgba(0, 255, 157, 0.16) 48%, rgba(255, 255, 255, 0.14) 52%, transparent 64%, transparent 100%);
    mix-blend-mode: screen;
    transform: translate3d(-36%, 0, 0) scale(1.05);
}

.community-map-stage.is-intro-running::before {
    animation: community-map-satellite-sweep 2.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.community-map-stage.is-map-warping::before {
    opacity: 1;
    background:
        radial-gradient(circle at 52% 45%, rgba(255, 255, 255, 0.28), rgba(0, 255, 157, 0.18) 16%, transparent 32%),
        radial-gradient(circle at 52% 45%, transparent 0 26%, rgba(0, 0, 0, 0.38) 52%, rgba(0, 0, 0, 0.74) 100%);
    animation: community-map-warp 1.08s cubic-bezier(0.22, 1, 0.36, 1) both;
    mix-blend-mode: screen;
}

.community-map-stage.is-intro-running .community-map {
    filter: saturate(1.16) contrast(1.06) brightness(1.14);
    transition: filter 0.62s ease;
}

.community-map-stage.is-map-warping .community-map {
    filter: saturate(1.2) contrast(1.08) brightness(1.02) blur(0.7px);
}

.community-map-overlay {
    position: absolute;
    left: clamp(18px, 7vw, 96px);
    top: 50%;
    z-index: 4;
    max-width: min(720px, calc(100vw - 36px));
    color: #fff;
    transform-origin: top left;
    transform: translateY(-50%);
    transition: top 0.62s cubic-bezier(0.22, 1, 0.36, 1), left 0.62s cubic-bezier(0.22, 1, 0.36, 1), transform 0.62s cubic-bezier(0.22, 1, 0.36, 1), max-width 0.62s cubic-bezier(0.22, 1, 0.36, 1), padding 0.62s ease, border-color 0.62s ease, background 0.62s ease, backdrop-filter 0.62s ease;
}

.community-map-overlay::before {
    content: "";
    position: absolute;
    inset: -22px -30px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.78;
    background: radial-gradient(ellipse at left center, rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.22) 48%, transparent 74%);
    filter: blur(18px);
    transition: opacity 0.62s ease, inset 0.62s ease;
}

.community-map-overlay__kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 36px;
    padding: 0.45rem 0.85rem;
    border: 1px solid rgba(0, 255, 157, 0.28);
    border-radius: 999px;
    background: rgba(3, 11, 9, 0.66);
    color: #00ff9d;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(12px);
}

.community-map-overlay h1 {
    margin-top: 0;
    max-width: 780px;
    font-size: clamp(2.7rem, 8vw, 7rem);
    line-height: 0.92;
    font-weight: 900;
    letter-spacing: 0;
    transition: font-size 0.62s cubic-bezier(0.22, 1, 0.36, 1), margin 0.62s ease, line-height 0.62s ease;
    text-shadow: 0 12px 34px rgba(0, 0, 0, 0.58);
}

.community-map-overlay p {
    max-width: 600px;
    margin-top: 1.25rem;
    color: rgba(229, 231, 235, 0.84);
    font-size: clamp(1rem, 2vw, 1.24rem);
    font-weight: 650;
    line-height: 1.55;
    transition: opacity 0.42s ease, transform 0.42s ease, max-height 0.42s ease, margin 0.42s ease;
}

.community-map-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.45rem;
    transition: margin 0.42s ease;
}

.community-map-actions a,
.community-scroll-cue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 46px;
    padding: 0.78rem 1.05rem;
    border-radius: 999px;
    font-weight: 900;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.community-map-actions a:first-child {
    background: #00ff9d;
    color: #03100c;
}

.community-map-actions a:last-child,
.community-scroll-cue {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(3, 11, 9, 0.64);
    color: #fff;
    backdrop-filter: blur(12px);
}

.community-map-actions a:hover,
.community-scroll-cue:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 255, 157, 0.42);
    color: #00ff9d;
}

.community-map-actions a:first-child:hover {
    color: #03100c;
    background: #00cc7e;
}

.community-map-posts-button {
    position: absolute;
    left: 50%;
    bottom: clamp(18px, 4vh, 34px);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.78rem 1.25rem;
    border: 1px solid rgba(0, 255, 157, 0.32);
    border-radius: 999px;
    background: rgba(3, 11, 9, 0.76);
    color: #00ff9d;
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0;
    text-decoration: none;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
    transform: translateX(-50%);
    backdrop-filter: blur(16px);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.community-map-posts-button:hover {
    border-color: rgba(0, 255, 157, 0.72);
    background: rgba(0, 255, 157, 0.92);
    color: #03100c;
    box-shadow: 0 22px 58px rgba(0, 255, 157, 0.22);
    transform: translate(-50%, -2px);
}

.community-map-posts-button:active {
    transform: translate(-50%, 0);
}

.community-place-list--overlay {
    position: absolute;
    right: clamp(14px, 4vw, 58px);
    bottom: clamp(76px, 9vh, 118px);
    z-index: 4;
    width: min(380px, calc(100vw - 28px));
    max-height: min(48vh, 440px);
    padding: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.15rem;
    background: rgba(3, 11, 9, 0.72);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(18px);
}

.community-map-stage .community-place-list--overlay,
.community-map-stage .community-scroll-cue,
.community-map-stage .community-map-intro {
    display: none;
}

.community-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 4;
    transform: translateX(-50%);
    min-height: 42px;
    padding-inline: 0.95rem;
    font-size: 0.82rem;
}

.community-scroll-cue:hover {
    transform: translate(-50%, -1px);
}

.community-map-intro {
    position: absolute;
    left: clamp(18px, 5vw, 72px);
    bottom: 18px;
    z-index: 5;
    display: block;
    pointer-events: none;
    transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.6s ease;
}

.community-map-stage.is-zoomed .community-map-intro {
    opacity: 0.88;
}

.community-map-locator {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    max-width: min(460px, calc(100vw - 36px));
    min-height: 40px;
    padding: 0.7rem 0.95rem;
    border: 1px solid rgba(0, 255, 157, 0.22);
    border-radius: 999px;
    background: rgba(3, 11, 9, 0.72);
    color: rgba(229, 231, 235, 0.86);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

.community-map-locator i {
    color: #00ff9d;
}

.community-map-stage.is-zoomed .community-map,
.community-map-stage.is-overlay-compact .community-map {
    filter: saturate(1.12) contrast(1.02) brightness(1.1);
    transition: filter 1s ease;
}

.community-map-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 2rem;
    background:
        linear-gradient(135deg, rgba(0, 255, 157, 0.12), transparent 38%),
        linear-gradient(315deg, rgba(0, 184, 255, 0.12), transparent 34%),
        #030706;
    color: rgba(229, 231, 235, 0.86);
    text-align: center;
}

.community-map-fallback i {
    color: #00ff9d;
    font-size: 2.25rem;
}

.community-map-fallback strong {
    color: #fff;
    font-size: clamp(1.3rem, 3vw, 2.1rem);
    font-weight: 900;
}

.community-map-fallback span {
    max-width: 520px;
    font-weight: 750;
    line-height: 1.45;
}

.community-map-stage.is-overlay-compact .community-map-overlay {
    left: clamp(14px, 2vw, 22px);
    top: clamp(14px, 2.2vh, 22px);
    max-width: min(360px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    transform: translate3d(0, 0, 0);
}

.community-map-stage.is-overlay-compact .community-map-overlay::before {
    inset: -16px -22px;
    opacity: 0.7;
}

.community-map-stage.is-overlay-compact .community-map-overlay h1 {
    margin-top: 0;
    font-size: clamp(1.45rem, 3vw, 2.1rem);
    line-height: 1;
}

.community-map-stage.is-overlay-compact .community-map-overlay p {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-6px);
}

.community-map-stage.is-overlay-compact .community-map-actions {
    margin-top: 0.75rem;
}

.community-map-stage.is-overlay-compact .community-map-actions a {
    min-height: 38px;
    padding: 0.58rem 0.78rem;
    font-size: 0.82rem;
}

@media (max-width: 900px) {
    .community-map-screen {
        padding-top: 72px;
    }

    .community-map-stage {
        min-height: calc(100svh - 72px);
    }

    .community-map-stage::after {
        background:
            linear-gradient(0deg, rgba(3, 7, 6, 0.3) 0%, transparent 36%, rgba(3, 7, 6, 0.26) 100%),
            linear-gradient(90deg, rgba(3, 7, 6, 0.46), rgba(3, 7, 6, 0.04));
    }

    .community-map-overlay {
        left: 18px;
        top: 42%;
        transform: translateY(-42%);
    }

    .community-map-overlay h1 {
        font-size: clamp(2.35rem, 13vw, 4.4rem);
    }

    .community-place-list--overlay {
        left: 14px;
        right: 14px;
        bottom: 72px;
        width: auto;
        max-height: 30vh;
    }

    .community-map-intro {
        left: 14px;
        right: 14px;
        bottom: 18px;
    }

    .community-map-stage.is-overlay-compact .community-map-overlay {
        left: 12px;
        top: 12px;
        transform: translate3d(0, 0, 0);
    }

    .community-map-posts-button {
        bottom: 14px;
        min-height: 42px;
        padding: 0.68rem 1rem;
        font-size: 0.82rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .community-map-intro {
        transition-duration: 0.2s;
    }

    .community-map-overlay {
        transition-duration: 0.2s;
    }

    .community-map-stage.is-intro-running::before {
        animation: none;
    }
}

@keyframes community-map-satellite-sweep {
    0% {
        opacity: 0;
        transform: translate3d(-42%, 0, 0) scale(1.05);
    }

    24% {
        opacity: 0.92;
    }

    100% {
        opacity: 0;
        transform: translate3d(42%, 0, 0) scale(1.05);
    }
}

@keyframes community-map-warp {
    0% {
        opacity: 0;
        transform: translate3d(-12%, 0, 0) scale(0.82) rotate(-8deg);
    }

    34% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1.02) rotate(0deg);
    }

    100% {
        opacity: 0;
        transform: translate3d(16%, 0, 0) scale(1.24) rotate(8deg);
    }
}
