/* ============================================================
   FULL SCREEN MAP
   ============================================================ */

html,
body {
    height: 100%;
}

body {
    overflow: hidden;
}

.background {
    height: calc(100vh - 68px);
    min-height: 0;
    overflow: hidden;
}

.map-app {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #081019;
    color: #fff;
}


/* ============================================================
   MAP
   ============================================================ */

.map-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    cursor: grab;
    background: #081019;
}

.map-viewport.dragging {
    cursor: grabbing;
}

.map-canvas {
    position: absolute;
    left: 0;
    top: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.map-image {
    display: block;
    max-width: none;
    user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
}

.map-markers {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}


/* ============================================================
   STANDARD MAP MARKERS
   All non-region markers use map-pin.svg
   ============================================================ */

.map-marker {
    position: absolute;
    z-index: 10;
    transform: translate(-50%, -50%);
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    color: #fff;
    pointer-events: auto;
    cursor: pointer;
    font: inherit;
}

.map-marker:not(.map-marker-region) .map-marker-dot {
    display: block;
    position: relative;
    width: 100px;
    height: 100px;
    border: 0;
    border-radius: 0;
    background: transparent url("/static/OtherImages/map-pin.svg") center / contain no-repeat;
    box-shadow: none;
    transform: rotate(0deg);
    transform-origin: center center;
    transition:
        transform .25s ease,
        filter .25s ease;

    filter:
        brightness(0)
        invert(1)
        drop-shadow(0 2px 3px rgba(0, 0, 0, .95))
        drop-shadow(0 0 3px rgba(255, 255, 255, .7));
}

.map-marker:not(.map-marker-region) .map-marker-dot::before,
.map-marker:not(.map-marker-region) .map-marker-dot::after {
    content: none !important;
}

.map-marker-label {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 12px);
    transform: translateX(-50%);
    width: max-content;
    max-width: 360px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 9px;
    background: rgba(5, 8, 13, .94);
    color: #fff;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .45);
    font-size: 50px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity .15s ease,
        transform .15s ease;
}

.map-marker:not(.map-marker-region):hover .map-marker-label,
.map-marker:not(.map-marker-region).active .map-marker-label,
.map-marker:not(.map-marker-region):focus-visible .map-marker-label {
    opacity: 1;
    transform: translate(-50%, -2px);
}

.map-marker:not(.map-marker-region):hover .map-marker-dot,
.map-marker:not(.map-marker-region).active .map-marker-dot,
.map-marker:not(.map-marker-region):focus-visible .map-marker-dot {
    transform: rotate(180deg) scale(1.15);
    filter:
        brightness(0)
        invert(1)
        drop-shadow(0 0 8px rgba(255, 255, 255, 1))
        drop-shadow(0 0 16px rgba(255, 255, 255, .8))
        drop-shadow(0 3px 4px rgba(0, 0, 0, .9));
}


/* ============================================================
   REGION MARKERS
   Existing region navigation marker.
   ============================================================ */

.map-marker-region {
    z-index: 8;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 3px solid #fff;
    border-radius: 50%;
    background: rgba(8, 16, 25, .82);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, .8),
        0 0 0 6px rgba(255, 255, 255, .16);
    transition:
        transform .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.map-marker-region::before {
    content: "";
    position: absolute;
    inset: 7px;
    border: 2px solid rgba(255, 255, 255, .8);
    border-radius: 50%;
}

.map-marker-region .map-marker-label {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 15px);
    transform: translateX(-50%);
    width: max-content;
    max-width: 360px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 9px;
    background: rgba(5, 8, 13, .94);
    color: #fff;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .45);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity .15s ease,
        transform .15s ease;
}

.map-marker-region:hover,
.map-marker-region:focus-visible {
    transform: translate(-50%, -50%) scale(1.12);
    background: rgba(25, 43, 63, .96);
    box-shadow:
        0 5px 18px rgba(0, 0, 0, .85),
        0 0 0 9px rgba(255, 255, 255, .20);
}

.map-marker-region:hover .map-marker-label,
.map-marker-region:focus-visible .map-marker-label {
    opacity: 1;
    transform: translateX(-50%) translateY(-3px);
}

.map-marker-arrow {
    display: none;
}


/* ============================================================
   REGION TERRITORIES
   SVG overlay
   ============================================================ */

.region-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    overflow: visible;
    pointer-events: none;
}

.region-boundary {
    fill: rgba(255, 255, 255, .015);
    stroke: rgba(255, 255, 255, .65);
    stroke-width: 2px;
    stroke-dasharray: 9 7;
    vector-effect: non-scaling-stroke;
    pointer-events: auto;
    cursor: pointer;
    transition:
        fill .18s ease,
        stroke .18s ease;
}

.region-boundary:hover,
.region-boundary.active {
    fill: rgba(255, 255, 255, .10);
    stroke: rgba(255, 255, 255, .95);
}

.region-label {
    position: absolute;
    z-index: 3;
    transform: translate(-50%, -50%);
    padding: 9px 16px;
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 8px;
    background: rgba(8, 14, 22, .88);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .55);
}

.region-label:hover {
    background: rgba(25, 38, 54, .96);
}


/* ============================================================
   TOP LEFT HEADER
   ============================================================ */

.map-overlay-header {
    position: absolute;
    z-index: 30;
    top: 18px;
    left: 22px;
    max-width: min(720px, calc(100vw - 330px));
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 11px;
    background: rgba(4, 8, 13, .74);
    box-shadow: 0 6px 22px rgba(0, 0, 0, .35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.map-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 34px;
    font-size: 1.22rem;
    font-weight: 900;
    line-height: 1.2;
}

.map-breadcrumbs a {
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
}

.map-breadcrumbs a:hover {
    color: #fff;
    text-decoration: underline;
}

.map-breadcrumb-current {
    color: #fff;
}

.map-breadcrumb-separator {
    color: rgba(255, 255, 255, .42);
    font-size: 1.45rem;
    line-height: 1;
}

.map-description {
    margin-top: 4px;
    color: rgba(255, 255, 255, .72);
    font-size: .88rem;
    line-height: 1.4;
}


/* ============================================================
   TOP RIGHT ACTIONS
   ============================================================ */

.map-actions {
    position: absolute;
    z-index: 31;
    top: 18px;
    right: 22px;
    display: flex;
    gap: 8px;
}

.map-actions button,
.map-tools button {
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 9px;
    background: rgba(10, 17, 27, .90);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
    cursor: pointer;
}

.map-actions button {
    padding: 10px 14px;
}

.map-actions button:hover,
.map-tools button:hover {
    background: rgba(30, 42, 58, .96);
}


/* ============================================================
   ZOOM
   ============================================================ */

.map-tools {
    position: absolute;
    z-index: 31;
    left: 22px;
    bottom: 22px;
    display: grid;
    gap: 7px;
}

.map-tools button {
    width: 44px;
    height: 44px;
    font-size: 24px;
    line-height: 1;
}


/* ============================================================
   HINT
   ============================================================ */

.map-hint {
    position: absolute;
    z-index: 20;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(5, 8, 13, .80);
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
    pointer-events: none;
}


/* ============================================================
   DRAWERS
   ============================================================ */

.map-drawer,
.location-panel {
    position: absolute;
    z-index: 100;
    top: 0;
    bottom: 0;
    width: min(430px, 92vw);
    overflow-y: auto;
    background: rgba(8, 14, 23, .985);
    box-shadow: 0 0 55px rgba(0, 0, 0, .75);
    transition: transform .22s ease;
}

.map-drawer {
    right: 0;
    transform: translateX(105%);
}

.location-panel {
    left: 0;
    transform: translateX(-105%);
}

.map-drawer.open,
.location-panel.open {
    transform: translateX(0);
}

.drawer-content {
    padding: 24px 34px 34px;
}

.location-panel-content {
    padding: 24px 24px 34px;
}

.drawer-eyebrow,
.location-panel-content .drawer-eyebrow {
    min-height: 40px;
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, .55);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .18em;
}

.drawer-close {
    position: absolute;
    z-index: 3;
    top: 24px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    font-size: 27px;
    line-height: 35px;
    cursor: pointer;
}

.drawer-close:hover {
    background: rgba(255, 255, 255, .12);
}

.map-drawer h2,
.location-panel h2 {
    margin: 0 0 12px;
    color: #fff;
}

.map-drawer p {
    color: rgba(255, 255, 255, .76);
    line-height: 1.65;
}

#drawerDetails {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.drawer-detail {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 9px;
    background: rgba(255, 255, 255, .035);
}

.drawer-detail strong {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, .96);
}

.drawer-explore {
    display: block;
    margin-top: 20px;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 9px;
    background: rgba(255, 255, 255, .055);
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 900;
}

.drawer-explore:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}


/* ============================================================
   BACKDROP
   ============================================================ */

.map-backdrop {
    display: none;
    position: absolute;
    z-index: 90;
    inset: 0;
    background: rgba(0, 0, 0, .52);
}

.map-backdrop.open {
    display: block;
}


/* ============================================================
   LOCATION INDEX
   ============================================================ */

#locationSearch {
    width: 100%;
    margin: 14px 0 16px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 9px;
    outline: none;
    background: rgba(255, 255, 255, .055);
    color: #fff;
}

#locationSearch::placeholder {
    color: rgba(255, 255, 255, .45);
}

#locationSearch:focus {
    border-color: rgba(255, 255, 255, .42);
}

.location-item {
    position: relative;
    display: block;
    width: 100%;
    margin: 7px 0;
    padding: 12px 58px 12px 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 9px;
    background: rgba(255, 255, 255, .035);
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.location-item:hover {
    background: rgba(255, 255, 255, .09);
}

.location-item strong {
    display: block;
}

.location-item span {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, .54);
    font-size: 12px;
}

.location-item-region {
    border-color: rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .07);
}

.location-item-region strong {
    text-transform: uppercase;
    letter-spacing: .05em;
}

.location-map-badge {
    position: absolute;
    top: 50%;
    right: 11px;
    transform: translateY(-50%);
    padding: 4px 6px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 5px;
    color: rgba(255, 255, 255, .65);
    font-size: 9px;
    font-style: normal;
    font-weight: 900;
    letter-spacing: .08em;
}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.map-marker:focus-visible,
.map-actions button:focus-visible,
.map-tools button:focus-visible,
.location-item:focus-visible,
.drawer-close:focus-visible {
    outline: 3px solid rgba(255, 255, 255, .75);
    outline-offset: 3px;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 700px) {
    .background {
        height: calc(100vh - 68px);
    }

    .map-overlay-header {
        top: 10px;
        left: 10px;
        max-width: calc(100vw - 140px);
        padding: 9px 11px;
    }

    .map-breadcrumbs {
        gap: 6px;
        min-height: 26px;
        font-size: .95rem;
    }

    .map-breadcrumb-separator {
        font-size: 1.1rem;
    }

    .map-description {
        display: none;
    }

    .map-actions {
        top: 10px;
        right: 10px;
        display: grid;
        gap: 5px;
    }

    .map-actions button {
        padding: 7px 9px;
        font-size: 11px;
    }

    .map-tools {
        left: 10px;
        bottom: 14px;
    }

    .map-tools button {
        width: 40px;
        height: 40px;
    }

    .map-hint {
        bottom: 12px;
        max-width: 68%;
        padding: 6px 10px;
        white-space: normal;
        text-align: center;
        font-size: 10px;
    }

    .map-marker:not(.map-marker-region) {
        min-width: 38px;
        min-height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .map-marker:not(.map-marker-region) .map-marker-label {
        bottom: calc(50% + 18px);
    }

    .map-drawer,
    .location-panel {
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 82%;
        border-radius: 18px 18px 0 0;
        transform: translateY(105%);
    }

    .map-drawer.open,
    .location-panel.open {
        transform: translateY(0);
    }

    .drawer-content,
    .location-panel-content {
        padding: 58px 18px 24px;
    }
}


.region-boundary:hover {
    fill: rgba(255, 255, 255, .10);
    stroke: rgba(255, 255, 255, .95);
}

.region-label {
    opacity: 0;
    pointer-events: none;
    transition:
        opacity .18s ease,
        transform .18s ease;
}

.region-label.region-hover {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(-3px);
}

.map-marker-region.region-hover .map-marker-label {
    opacity: 1;
    transform: translateX(-50%) translateY(-3px);
}

.region-boundary {
    fill: transparent;
    stroke: rgba(255, 255, 255, .65);
    stroke-width: 2px;
    stroke-dasharray: 9 7;
    vector-effect: non-scaling-stroke;
    pointer-events: auto;
    cursor: pointer;

    transition:
        fill .2s ease,
        stroke .2s ease,
        filter .2s ease;
}

.region-boundary:hover,
.region-boundary.active {
    fill: color-mix(
        in srgb,
        var(--region-color) 18%,
        transparent
    );

    stroke: var(--region-color);

    filter: drop-shadow(
        0 0 5px var(--region-color)
    );
}

.region-boundary {
    fill: transparent;
    stroke: transparent;
    stroke-width: 2px;
    stroke-dasharray: 9 7;
    vector-effect: non-scaling-stroke;

    pointer-events: auto;
    cursor: pointer;

    transition:
        fill .2s ease,
        stroke .2s ease,
        filter .2s ease;
}

.region-boundary:hover,
.region-boundary.active {
    fill: color-mix(
        in srgb,
        var(--region-color) 18%,
        transparent
    );

    stroke: var(--region-color);

    filter: drop-shadow(0 0 5px var(--region-color));
}

/* Larger interactive labels when using the no-label map */
.map-app.no-map-labels .map-marker-label {
    font-size: 44px;
    padding: 14px 20px;
    max-width: 600px;
}

/* Region labels too */
.map-app.no-map-labels .map-marker-region .map-marker-label {
    font-size: 44px;
}

.map-app.no-map-labels .map-marker-label {
    font-size: 44px;
    padding: 14px 20px;
    max-width: 600px;
}

/* ============================================================
   TERRAGOS CARTOGRAPHER THEME
   Visual layer only — keep at END of map.css
   ============================================================ */

:root {
    --tg-ink: #100d09;
    --tg-deep: #18130d;
    --tg-wood: #2b2116;
    --tg-bronze: #9b7540;
    --tg-gold: #c6a15d;
    --tg-gold-bright: #e0c27c;
    --tg-parchment: #eadbb7;
    --tg-parchment-dim: #b9a77f;
    --tg-line: rgba(198, 161, 93, .52);
    --tg-shadow: rgba(0, 0, 0, .72);
}


/* ============================================================
   CARTOGRAPHER HEADER
   ============================================================ */

.map-overlay-header {
    padding: 13px 18px;

    border: 1px solid var(--tg-line);
    border-radius: 2px;

    background:
        linear-gradient(
            180deg,
            rgba(38, 29, 18, .94),
            rgba(15, 12, 9, .96)
        );

    box-shadow:
        0 7px 22px var(--tg-shadow),
        inset 0 0 18px rgba(198, 161, 93, .07),
        inset 0 1px 0 rgba(238, 211, 151, .15);

    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.map-overlay-header::before,
.map-overlay-header::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: var(--tg-gold);
    opacity: .75;
}

.map-overlay-header::before {
    top: 4px;
    left: 4px;
    border-top: 1px solid;
    border-left: 1px solid;
}

.map-overlay-header::after {
    right: 4px;
    bottom: 4px;
    border-right: 1px solid;
    border-bottom: 1px solid;
}


/* ============================================================
   BREADCRUMBS
   ============================================================ */

.map-breadcrumbs {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.22rem;
    font-weight: 700;
    letter-spacing: .045em;
    color: var(--tg-parchment);
    text-shadow: 0 2px 3px #000;
}

.map-breadcrumbs a {
    color: var(--tg-parchment-dim);
    text-decoration: none;
    transition:
        color .15s ease,
        text-shadow .15s ease;
}

.map-breadcrumbs a:hover {
    color: var(--tg-gold-bright);
    text-decoration: none;
    text-shadow:
        0 0 7px rgba(224, 194, 124, .35),
        0 2px 3px #000;
}

.map-breadcrumb-current {
    color: var(--tg-parchment);
}

.map-breadcrumb-separator {
    color: var(--tg-gold);
    font-size: 0;
}

.map-breadcrumb-separator::after {
    content: "◆";
    font-size: .62rem;
    opacity: .75;
}

.map-description {
    color: rgba(234, 219, 183, .72);
    font-family: Georgia, "Times New Roman", serif;
}


/* ============================================================
   MAIN MAP BUTTONS
   ============================================================ */

.map-actions {
    gap: 7px;
}

.map-actions button,
.map-tools button {
    position: relative;

    border: 1px solid var(--tg-bronze);
    border-radius: 2px;

    background:
        linear-gradient(
            180deg,
            rgba(54, 42, 26, .97),
            rgba(24, 18, 12, .98)
        );

    color: var(--tg-parchment);

    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: .045em;

    text-shadow: 0 2px 2px #000;

    box-shadow:
        0 5px 14px rgba(0, 0, 0, .5),
        inset 0 1px 0 rgba(255, 225, 163, .14),
        inset 0 0 9px rgba(198, 161, 93, .05);

    transition:
        border-color .15s ease,
        color .15s ease,
        background .15s ease,
        box-shadow .15s ease,
        transform .1s ease;
}

.map-actions button {
    padding: 10px 16px;
}

.map-actions button:hover,
.map-tools button:hover {
    border-color: var(--tg-gold-bright);

    background:
        linear-gradient(
            180deg,
            rgba(74, 56, 33, .98),
            rgba(30, 22, 14, .98)
        );

    color: #fff2cf;

    box-shadow:
        0 6px 17px rgba(0, 0, 0, .58),
        0 0 9px rgba(198, 161, 93, .18),
        inset 0 1px 0 rgba(255, 229, 171, .2);
}

.map-actions button:active,
.map-tools button:active {
    transform: translateY(1px);

    background:
        linear-gradient(
            180deg,
            rgba(25, 19, 12, .98),
            rgba(52, 39, 24, .98)
        );
}


/* ============================================================
   ZOOM INSTRUMENT
   ============================================================ */

.map-tools {
    gap: 0;

    padding: 4px;

    border: 1px solid rgba(155, 117, 64, .75);
    border-radius: 2px;

    background: rgba(17, 13, 9, .92);

    box-shadow:
        0 7px 20px rgba(0, 0, 0, .58),
        inset 0 0 12px rgba(198, 161, 93, .07);
}

.map-tools button {
    width: 42px;
    height: 42px;

    border-radius: 0;
    border-color: transparent;

    background: transparent;

    font-family: Georgia, serif;
    color: var(--tg-gold-bright);
}

.map-tools button + button {
    border-top: 1px solid rgba(198, 161, 93, .32);
}


/* ============================================================
   LOCATION / MAP LABEL PLAQUES
   ============================================================ */

.map-marker-label {
    padding: 9px 15px;

    border: 1px solid rgba(198, 161, 93, .82);
    border-radius: 2px;

    background:
        linear-gradient(
            180deg,
            rgba(46, 35, 22, .97),
            rgba(19, 15, 10, .98)
        );

    color: #f0dfb7;

    box-shadow:
        0 6px 16px rgba(0, 0, 0, .68),
        inset 0 0 10px rgba(198, 161, 93, .08),
        inset 0 1px 0 rgba(255, 225, 159, .13);

    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: .035em;

    text-shadow: 0 2px 2px #000;
}


/* Small ornamental diamond under tooltip */
.map-marker:not(.map-marker-region) .map-marker-label::after {
    content: "◆";

    position: absolute;
    left: 50%;
    bottom: -8px;

    transform: translateX(-50%);

    color: var(--tg-gold);
    font-size: 8px;

    text-shadow: 0 2px 3px #000;
}


/* ============================================================
   LARGE MAP LABELS — ALWAYS
   ============================================================ */

.map-marker-label {
    max-width: 650px;
    padding: 14px 22px;
    font-size: 44px;
    letter-spacing: .025em;
}


/* ============================================================
   MAP PIN GLOW
   Keep existing map-pin image and rotation behavior
   ============================================================ */

.map-marker:not(.map-marker-region) .map-marker-dot {
    filter:
        sepia(.16)
        brightness(1.22)
        drop-shadow(0 2px 3px rgba(0, 0, 0, .8));
}

.map-marker:not(.map-marker-region):hover .map-marker-dot,
.map-marker:not(.map-marker-region).active .map-marker-dot,
.map-marker:not(.map-marker-region):focus-visible .map-marker-dot {
    filter:
        sepia(.18)
        brightness(1.5)
        drop-shadow(0 0 6px rgba(232, 201, 132, .9))
        drop-shadow(0 0 15px rgba(198, 161, 93, .55));
}


/* ============================================================
   REGION MARKERS
   Preserve region-specific polygon colors from JS
   ============================================================ */

.map-marker-region {
    border-color: rgba(198, 161, 93, .82);

    background:
        radial-gradient(
            circle,
            rgba(71, 53, 31, .96),
            rgba(21, 16, 11, .98)
        );

    box-shadow:
        0 4px 15px rgba(0, 0, 0, .72),
        0 0 0 4px rgba(198, 161, 93, .10),
        inset 0 0 8px rgba(232, 202, 137, .12);
}

.map-marker-region::before {
    border-color: rgba(224, 194, 124, .72);
}

.map-marker-region:hover,
.map-marker-region:focus-visible,
.map-marker-region.region-hover {
    border-color: var(--tg-gold-bright);

    box-shadow:
        0 5px 18px rgba(0, 0, 0, .8),
        0 0 0 6px rgba(198, 161, 93, .14),
        0 0 15px rgba(198, 161, 93, .22);
}


/* Region's tooltip uses same cartographic plaque */
.map-marker-region .map-marker-label {
    border: 1px solid rgba(198, 161, 93, .82);

    background:
        linear-gradient(
            180deg,
            rgba(46, 35, 22, .97),
            rgba(19, 15, 10, .98)
        );

    color: #f0dfb7;

    box-shadow:
        0 6px 16px rgba(0, 0, 0, .68),
        inset 0 0 10px rgba(198, 161, 93, .08);

    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: .055em;
}


/* ============================================================
   REGION TERRITORIES
   ============================================================ */

/* Invisible until hover, as requested */
.region-boundary {
    fill: transparent;
    stroke: transparent;
    stroke-width: 2px;
    stroke-dasharray: 8 7;

    transition:
        fill .2s ease,
        stroke .2s ease,
        filter .2s ease;
}

/*
   JS can continue applying the region-specific color.
   This simply gives the revealed border a softer atlas feel.
*/
.region-boundary:hover,
.region-boundary.active {
    filter: drop-shadow(0 0 3px rgba(236, 216, 169, .32));
}


/* ============================================================
   DRAWERS / MAP INDEX
   ============================================================ */

.map-drawer,
.location-panel {
    border-color: rgba(155, 117, 64, .65);

    background:
        linear-gradient(
            135deg,
            rgba(36, 27, 17, .985),
            rgba(13, 11, 8, .99)
        );

    color: var(--tg-parchment);

    box-shadow:
        0 0 50px rgba(0, 0, 0, .82),
        inset 0 0 40px rgba(198, 161, 93, .035);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.map-drawer {
    border-left: 1px solid rgba(198, 161, 93, .5);
}

.location-panel {
    border-right: 1px solid rgba(198, 161, 93, .5);
}

.drawer-eyebrow {
    color: var(--tg-gold);

    font-family: Georgia, "Times New Roman", serif;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .2em;
}

.map-drawer h2,
.location-panel h2 {
    color: #f2dfb3;

    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: .035em;

    text-shadow: 0 2px 3px #000;
}

.map-drawer p {
    color: rgba(234, 219, 183, .76);
    font-family: Georgia, "Times New Roman", serif;
}


/* ============================================================
   DRAWER CLOSE
   ============================================================ */

.drawer-close {
    border: 1px solid rgba(155, 117, 64, .72);
    border-radius: 2px;

    background:
        linear-gradient(
            180deg,
            rgba(55, 42, 26, .96),
            rgba(22, 17, 11, .98)
        );

    color: var(--tg-parchment);

    box-shadow:
        inset 0 1px 0 rgba(255, 226, 166, .12),
        0 3px 10px rgba(0, 0, 0, .45);
}

.drawer-close:hover {
    border-color: var(--tg-gold-bright);
    background: rgba(78, 58, 34, .97);
    color: #fff0ca;
}


/* ============================================================
   DRAWER DETAILS
   ============================================================ */

.drawer-detail {
    border: 1px solid rgba(155, 117, 64, .32);
    border-radius: 2px;

    background:
        linear-gradient(
            90deg,
            rgba(198, 161, 93, .045),
            rgba(255, 255, 255, .015)
        );

    color: var(--tg-parchment-dim);
}

.drawer-detail strong {
    color: var(--tg-gold-bright);
    font-family: Georgia, "Times New Roman", serif;
}

.drawer-explore {
    border: 1px solid var(--tg-bronze);
    border-radius: 2px;

    background:
        linear-gradient(
            180deg,
            rgba(62, 47, 28, .94),
            rgba(26, 20, 13, .97)
        );

    color: var(--tg-parchment);

    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: .06em;

    box-shadow:
        inset 0 1px 0 rgba(255, 226, 166, .12),
        0 4px 12px rgba(0, 0, 0, .38);
}

.drawer-explore:hover {
    border-color: var(--tg-gold-bright);
    background:
        linear-gradient(
            180deg,
            rgba(79, 59, 34, .98),
            rgba(33, 25, 15, .98)
        );

    color: #fff0c8;
}


/* ============================================================
   LOCATION SEARCH
   ============================================================ */

#locationSearch {
    border: 1px solid rgba(155, 117, 64, .48);
    border-radius: 2px;

    background: rgba(10, 8, 6, .55);
    color: var(--tg-parchment);

    font-family: Georgia, "Times New Roman", serif;

    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, .38);
}

#locationSearch::placeholder {
    color: rgba(185, 167, 127, .55);
}

#locationSearch:focus {
    border-color: var(--tg-gold);

    box-shadow:
        inset 0 2px 8px rgba(0, 0, 0, .38),
        0 0 0 2px rgba(198, 161, 93, .09);
}


/* ============================================================
   LOCATION INDEX ENTRIES
   ============================================================ */

.location-item {
    border: 1px solid rgba(155, 117, 64, .22);
    border-radius: 2px;

    background:
        linear-gradient(
            90deg,
            rgba(198, 161, 93, .025),
            rgba(255, 255, 255, .012)
        );

    color: var(--tg-parchment);

    font-family: Georgia, "Times New Roman", serif;

    transition:
        background .14s ease,
        border-color .14s ease,
        transform .14s ease;
}

.location-item:hover {
    border-color: rgba(198, 161, 93, .58);

    background:
        linear-gradient(
            90deg,
            rgba(198, 161, 93, .12),
            rgba(198, 161, 93, .025)
        );

    transform: translateX(3px);
}

.location-item strong {
    color: #ead9b1;
    letter-spacing: .025em;
}

.location-item span {
    color: rgba(185, 167, 127, .68);
}

.location-item-region {
    border-color: rgba(198, 161, 93, .42);
    background: rgba(198, 161, 93, .07);
}

.location-map-badge {
    border: 1px solid rgba(198, 161, 93, .48);
    border-radius: 2px;

    color: var(--tg-gold);

    font-family: Georgia, "Times New Roman", serif;
}


/* ============================================================
   MAP HELP
   ============================================================ */

.map-hint {
    border: 1px solid rgba(155, 117, 64, .42);
    border-radius: 2px;

    background: rgba(19, 15, 10, .88);

    color: rgba(234, 219, 183, .75);

    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: .04em;

    box-shadow: 0 4px 12px rgba(0, 0, 0, .42);
}


/* ============================================================
   BACKDROP
   ============================================================ */

.map-backdrop {
    background: rgba(8, 5, 2, .63);
}


/* ============================================================
   ACCESSIBILITY
   ============================================================ */

.map-marker:focus-visible,
.map-actions button:focus-visible,
.map-tools button:focus-visible,
.location-item:focus-visible,
.drawer-close:focus-visible {
    outline: 2px solid var(--tg-gold-bright);
    outline-offset: 3px;
}


/* ============================================================
   MOBILE TWEAKS
   ============================================================ */

@media (max-width: 700px) {

    .map-overlay-header {
        padding: 9px 11px;
    }

    .map-actions button {
        padding: 8px 10px;
        font-size: 11px;
    }

    @media (max-width: 700px) {
        .map-marker-label {
            font-size: 30px;
            padding: 11px 16px;
        }
    }

    .map-drawer,
    .location-panel {
        border-radius: 5px 5px 0 0;
        border-top: 1px solid rgba(198, 161, 93, .55);
    }
}

/* ============================================================
   MAP PIN APPEARANCE
   White normally, bright glow on hover
   ============================================================ */

.map-marker:not(.map-marker-region) .map-marker-dot {
    filter:
        brightness(0)
        invert(1)
        drop-shadow(0 2px 3px rgba(0, 0, 0, .85));
}

.map-marker:not(.map-marker-region):hover .map-marker-dot,
.map-marker:not(.map-marker-region).active .map-marker-dot,
.map-marker:not(.map-marker-region):focus-visible .map-marker-dot {
    filter:
        brightness(0)
        invert(1)
        drop-shadow(0 0 7px rgba(255, 255, 255, .95))
        drop-shadow(0 0 16px rgba(224, 194, 124, .65));
}

/* ============================================================
   BREADCRUMB ALIGNMENT FIX
   ============================================================ */

.map-overlay-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.map-breadcrumbs {
    min-height: 38px;

    display: flex;
    align-items: center;

    line-height: 1;
}

.map-breadcrumb-current,
.map-breadcrumbs a {
    display: inline-flex;
    align-items: center;

    line-height: 1;
}

/* If there is no description, keep the plaque compact */
.map-description:empty {
    display: none;
}

.drawer-episode-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 7px;
}

.drawer-episode-link {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 5px;

    color: inherit;
    text-decoration: none;

    font-size: 0.82rem;
    font-weight: 600;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.drawer-episode-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.drawer-episode-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 7px;
}

.drawer-episode-link {
    display: inline-flex;
    align-items: center;

    padding: 5px 9px;

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 5px;

    color: inherit;
    text-decoration: none;

    font-size: 0.82rem;
    font-weight: 600;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.drawer-episode-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.map-loader {
    position: absolute;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #07111c;

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

.map-loader-content {
    text-align: center;
}

.map-loader-title {
    margin-bottom: 18px;

    font-family: Georgia, serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.map-loader-spinner {
    width: 38px;
    height: 38px;

    margin: 0 auto 16px;

    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: currentColor;
    border-radius: 50%;

    animation: map-loader-spin 0.8s linear infinite;
}

.map-loader-text {
    font-size: 0.9rem;
    opacity: 0.7;
}

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

.map-app:not(.map-loading) .map-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.map-canvas {
    /* keep your existing properties */

    outline: 1px solid rgba(180, 126, 42, 0.75);

    box-shadow:
        0 0 0 4px rgba(32, 22, 12, 0.95),
        0 0 0 5px rgba(180, 126, 42, 0.35),
        0 8px 30px rgba(0, 0, 0, 0.55);
}

.map-viewport {
    background:
        radial-gradient(
            circle at center,
            #12100c 0%,
            #090d11 70%,
            #05080b 100%
        );
}

.map-version-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin-top: 10px;
}

.map-version-selector[hidden] {
    display: none;
}

.map-version-button {
    padding: 6px 12px;

    border: 1px solid rgba(184, 132, 54, 0.55);
    border-radius: 2px;

    background: rgba(20, 14, 8, 0.88);

    color: #d9c59b;

    font-family: Georgia, serif;
    font-size: 0.8rem;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.map-version-button:hover {
    border-color: rgba(218, 170, 82, 0.9);
    background: rgba(47, 32, 14, 0.95);
}

.map-version-button.active {
    border-color: #c9953e;
    background: #39250f;
    color: #f1dfb5;
}

/* ============================================================
   MAP INDEX
   ============================================================ */

.map-index-info {
    margin-top: 8px;
}

.map-index-type {
    margin-bottom: 6px;

    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;

    opacity: 0.65;
}

.map-index-info h2 {
    margin:
        0
        0
        10px;
}

.map-index-description {
    margin:
        10px
        0
        14px;

    line-height: 1.55;
}

.map-index-divider {
    height: 1px;

    margin:
        22px
        0
        18px;

    background:
        rgba(190, 145, 70, 0.35);
}

.map-index-locations-title {
    margin:
        0
        0
        12px;

    font-family: Georgia, serif;
    font-size: 1.15rem;
}

.map-index-versions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;

    margin:
        10px
        0
        14px;
}

.map-index-versions[hidden] {
    display: none;
}

.map-index-version-button {
    padding:
        6px
        11px;

    border:
        1px solid
        rgba(184, 132, 54, 0.55);

    background:
        rgba(20, 14, 8, 0.88);

    color: #d9c59b;

    font-family: Georgia, serif;
    font-weight: 700;
    font-size: 0.78rem;

    cursor: pointer;
}

.map-index-version-button:hover {
    border-color:
        rgba(218, 170, 82, 0.9);

    background:
        rgba(47, 32, 14, 0.95);
}

.map-index-version-button.active {
    border-color: #c9953e;
    background: #39250f;
    color: #f1dfb5;
}

.world-fog {
    position: absolute;
    inset: 0;

    overflow: hidden;

    pointer-events: none;

    opacity: 0;
    visibility: hidden;

    z-index: 1;
}

.world-fog.active {
    opacity: 1;
    visibility: visible;
}

.map-canvas {
    z-index: 2;
}

.world-fog-layer-1 {
    top: -12%;
    left: -25%;

    animation:
        worldFogOne 55s ease-in-out infinite alternate;
}

.world-fog-layer-2 {
    top: 15%;
    right: -35%;

    animation:
        worldFogTwo 75s ease-in-out infinite alternate;
}

.world-fog-layer-3 {
    bottom: -22%;
    left: 10%;
    width: 85%;
    opacity: 0.45;

    animation: none;
}


/* ============================================================
   WORLD MAP FOG
   ============================================================ */

.world-fog {
    position: absolute;
    inset: 0;

    overflow: hidden;
    pointer-events: none;

    opacity: 0;
    visibility: hidden;

    /*
     * Must be ABOVE the map image.
     * Controls/drawers should still have higher z-indexes.
     */
    z-index: 20;
}

.world-fog.active {
    opacity: 1;
    visibility: visible;
}

.world-fog-layer {
    position: absolute;

    width: 120%;
    height: 85%;

    border-radius: 0;

    background:
        radial-gradient(
            ellipse at center,
            rgba(225, 230, 225, 0.22) 0%,
            rgba(195, 205, 200, 0.15) 28%,
            rgba(150, 165, 160, 0.08) 48%,
            rgba(130, 145, 140, 0.04) 62%,
            rgba(120, 135, 130, 0.015) 74%,
            transparent 92%
        );

    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

@keyframes worldFogOne {
    from {
        transform:
            translate3d(-5%, 0, 0)
            scale(1);
    }

    to {
        transform:
            translate3d(15%, 12%, 0)
            scale(1.2);
    }
}


@keyframes worldFogTwo {
    from {
        transform:
            translate3d(5%, 0, 0)
            scale(1.1);
    }

    to {
        transform:
            translate3d(-15%, 15%, 0)
            scale(1.3);
    }
}


@keyframes worldFogThree {
    from {
        transform:
            translate3d(-10%, 5%, 0)
            scale(1.1);
    }

    to {
        transform:
            translate3d(10%, -12%, 0)
            scale(1.3);
    }
}

.map-overlay-header,
.map-actions,
.map-tools,
.map-hint,
.map-drawer,
.location-panel {
    z-index: 30;
}

.world-fog.active {
    opacity: 1;
    visibility: visible;

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

/* ============================================================
   WORLD MAP - LOCALIZED ANIMATED FOG
   ============================================================ */

.world-map-fog {
    position: absolute;
    inset: 0;

    pointer-events: none;

    z-index: 3;
}



/* TOP-RIGHT FOG BANK */


.map-fog-top-right {
    top: -5%;
    right: -5%;
}


/* Individual wisps */

.map-fog-cloud {
    position: absolute;

    border-radius: 50%;

    background:
        radial-gradient(
            ellipse at center,
            rgba(230, 235, 230, 0.30) 0%,
            rgba(205, 215, 210, 0.20) 35%,
            rgba(175, 190, 185, 0.09) 60%,
            transparent 78%
        );

    filter: blur(12px);

    will-change: transform;
}


.map-fog-cloud-1 {
    width: 85%;
    height: 65%;

    top: 5%;
    left: 0;

    animation:
        mapFogSwayOne
        12s
        ease-in-out
        infinite
        alternate;
}


.map-fog-cloud-2 {
    width: 70%;
    height: 55%;

    top: 30%;
    left: 20%;

    opacity: 0.75;

    animation:
        mapFogSwayTwo
        17s
        ease-in-out
        infinite
        alternate;
}


.map-fog-cloud-3 {
    width: 60%;
    height: 45%;

    top: 10%;
    left: 35%;

    opacity: 0.55;

    animation:
        mapFogSwayThree
        21s
        ease-in-out
        infinite
        alternate;
}


/* Gentle localized movement */

@keyframes mapFogSwayOne {

    from {
        transform:
            translate3d(-4%, 0, 0)
            scale(1);
    }

    to {
        transform:
            translate3d(4%, 4%, 0)
            scale(1.08);
    }
}


@keyframes mapFogSwayTwo {

    from {
        transform:
            translate3d(5%, -3%, 0)
            scale(1.05);
    }

    to {
        transform:
            translate3d(-5%, 5%, 0)
            scale(1.12);
    }
}


@keyframes mapFogSwayThree {

    from {
        transform:
            translate3d(-3%, 4%, 0)
            scale(1);
    }

    to {
        transform:
            translate3d(10%, -5%, 0)
            scale(1.1);
    }
}

.world-map-fog {
    display: none;
}

body.world-map-active .world-map-fog {
    display: block;
}

/* ============================================================
   WORLD MAP - LOCALIZED ANIMATED FOG
   TEST VERSION - DELIBERATELY VERY VISIBLE
   ============================================================ */

.world-map-fog {
    position: absolute;
    inset: 0;

    pointer-events: none;
    z-index: 20;
}


/*
 * Large bank in upper-right of actual map.
 */
.map-fog-bank {
    position: absolute;

    width: 60%;
    height: 45%;

    pointer-events: none;
}

.map-fog-top-right {
    top: -5%;
    right: -5%;
}


/* CLOUDS */

.map-fog-cloud {
    position: absolute;

    border-radius: 50%;

    background:
        radial-gradient(
            ellipse at center,
            rgba(255, 255, 255, 0.90) 0%,
            rgba(230, 235, 230, 0.70) 30%,
            rgba(190, 205, 200, 0.45) 55%,
            rgba(150, 170, 165, 0.20) 70%,
            transparent 85%
        );

    filter: blur(18px);

    will-change: transform;
}


/* BIG LEFT CLOUD */

.map-fog-cloud-1 {
    width: 90%;
    height: 75%;

    top: 0;
    left: -10%;

    animation:
        mapFogSwayOne
        6s
        ease-in-out
        infinite
        alternate;
}


/* LOWER CLOUD */

.map-fog-cloud-2 {
    width: 85%;
    height: 70%;

    top: 30%;
    left: 15%;

    opacity: 0.9;

    animation:
        mapFogSwayTwo
        8s
        ease-in-out
        infinite
        alternate;
}


/* RIGHT CLOUD */

.map-fog-cloud-3 {
    width: 75%;
    height: 65%;

    top: 5%;
    left: 40%;

    opacity: 0.8;

    animation:
        mapFogSwayThree
        10s
        ease-in-out
        infinite
        alternate;
}


/* ============================================================
   ANIMATION
   ============================================================ */

.map-fog-cloud {
    position: absolute;

    border-radius: 50%;

    background:
        radial-gradient(
            ellipse at center,
            rgba(235, 240, 235, 0.32) 0%,
            rgba(215, 225, 220, 0.20) 30%,
            rgba(185, 200, 195, 0.10) 55%,
            rgba(150, 170, 165, 0.04) 70%,
            transparent 85%
        );

    filter: blur(24px);

    will-change: transform;
}

.map-fog-cloud-1 {
    width: 90%;
    height: 75%;
    top: 0;
    left: -10%;

    animation:
        mapFogSwayOne
        18s
        ease-in-out
        infinite
        alternate;
}

.map-fog-cloud-2 {
    width: 85%;
    height: 70%;
    top: 30%;
    left: 15%;

    opacity: 0.65;

    animation:
        mapFogSwayTwo
        24s
        ease-in-out
        infinite
        alternate;
}

.map-fog-cloud-3 {
    width: 75%;
    height: 65%;
    top: 5%;
    left: 40%;

    opacity: 0.5;

    animation:
        mapFogSwayThree
        30s
        ease-in-out
        infinite
        alternate;
}

@keyframes mapFogSwayOne {
    from {
        transform:
            translate3d(-4%, -1%, 0)
            scale(1);
    }

    to {
        transform:
            translate3d(8%, 3%, 0)
            scale(1.06);
    }
}

@keyframes mapFogSwayTwo {
    from {
        transform:
            translate3d(5%, -3%, 0)
            scale(1.02);
    }

    to {
        transform:
            translate3d(-7%, 4%, 0)
            scale(1.08);
    }
}

@keyframes mapFogSwayThree {
    from {
        transform:
            translate3d(-4%, 3%, 0)
            scale(1);
    }

    to {
        transform:
            translate3d(7%, -4%, 0)
            scale(1.07);
    }
}

.map-viewport {
    touch-action: none;
    overscroll-behavior: none;
}

.map-viewport.middle-dragging {
    cursor: grabbing;
}

/* ============================================================
   LOCATION AUDIO
   ============================================================ */

.location-audio-section {
    margin-top: 18px;
    padding-top: 14px;

    border-top:
        1px solid rgba(198, 161, 93, 0.28);
}

.location-audio-label {
    margin-bottom: 8px;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.14em;
    text-transform: uppercase;

    color: rgba(198, 161, 93, 0.9);
}

.location-description-audio {
    display: block;

    width: 100%;
    height: 38px;
}

/* ============================================================
   MAP INDEX AUDIO
   ============================================================ */

.map-index-audio {
    margin-top: 18px;
}

.map-audio-item {
    margin-bottom: 18px;
}

.map-audio-item:last-child {
    margin-bottom: 0;
}

.map-audio-label {
    margin-bottom: 8px;

    color: #c6a15d;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.map-audio-player {
    display: block;

    width: 100%;
    max-width: 380px;

    height: 40px;
}

/* ============================================================
   TERRAGOS AUDIO PLAYER
   ============================================================ */

.terragos-audio-controls {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;
    margin-top: 8px;
}

.terragos-audio-play {
    flex: 0 0 36px;

    width: 36px;
    height: 36px;

    padding: 0;

    border: 1px solid rgba(198, 161, 93, 0.65);
    border-radius: 4px;

    background:
        rgba(15, 12, 8, 0.75);

    color: #d6b36a;

    font-size: 13px;

    cursor: pointer;
}

.terragos-audio-play:hover {
    background:
        rgba(198, 161, 93, 0.12);

    border-color: #d6b36a;
}

.terragos-audio-progress {
    flex: 1;

    min-width: 0;
    height: 4px;

    margin: 0;

    accent-color: #c6a15d;

    cursor: pointer;
}

.terragos-audio-time {
    flex: 0 0 38px;

    color:
        rgba(235, 226, 205, 0.75);

    font-size: 12px;
    font-variant-numeric:
        tabular-nums;

    text-align: right;
}

.terragos-audio-volume-icon {
    flex: 0 0 auto;

    font-size: 13px;
    opacity: 0.75;
}

.terragos-audio-volume {
    flex: 0 0 80px;

    width: 80px;
    height: 4px;

    margin: 0;

    accent-color: #c6a15d;

    cursor: pointer;
}

/* ============================================================
   MAP INDEX AUDIO
   ============================================================ */

.map-index-audio {
    margin-top: 18px;
}

.map-audio-item {
    margin-bottom: 18px;
}

.map-audio-item:last-child {
    margin-bottom: 0;
}

.map-audio-label {
    margin-bottom: 8px;

    color: #c6a15d;

    font-size: 11px;
    font-weight: 700;

    letter-spacing: 0.14em;
    text-transform: uppercase;
}


/* ============================================================
   TERRAGOS AUDIO CONTROLS
   ============================================================ */

.terragos-audio-controls {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
}

.terragos-audio-play {
    flex: 0 0 36px;

    width: 36px;
    height: 36px;

    padding: 0;

    border: 1px solid rgba(198, 161, 93, 0.65);
    border-radius: 4px;

    background: rgba(15, 12, 8, 0.75);

    color: #d6b36a;

    font-size: 13px;
    cursor: pointer;
}

.terragos-audio-play:hover {
    background: rgba(198, 161, 93, 0.12);
    border-color: #d6b36a;
}

.terragos-audio-progress {
    flex: 1 1 auto;

    min-width: 60px;
    height: 4px;

    margin: 0;

    accent-color: #c6a15d;
    cursor: pointer;
}

.terragos-audio-time {
    flex: 0 0 38px;

    color: rgba(235, 226, 205, 0.75);

    font-size: 12px;
    font-variant-numeric: tabular-nums;

    text-align: right;
}

.terragos-audio-volume-icon {
    flex: 0 0 auto;

    font-size: 13px;
    opacity: 0.75;
}

.terragos-audio-volume {
    flex: 0 0 70px;

    width: 70px;
    height: 4px;

    margin: 0;

    accent-color: #c6a15d;
    cursor: pointer;
}


/* Smaller screens */

@media (max-width: 600px) {

    .terragos-audio-controls {
        gap: 7px;
    }

    .terragos-audio-volume {
        flex-basis: 55px;
        width: 55px;
    }
}

.map-index-audio {
    margin-bottom: 20px;
}

.terragos-audio-play {
    color: #c6a15d;
}

.terragos-audio-button-icon,
.terragos-audio-volume-icon {
    display: block;

    background-color: #c6a15d;

    -webkit-mask-image: var(--audio-icon);
    mask-image: var(--audio-icon);

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    -webkit-mask-position: center;
    mask-position: center;

    -webkit-mask-size: contain;
    mask-size: contain;
}

.terragos-audio-button-icon {
    width: 18px;
    height: 18px;

    margin: auto;
}

.terragos-audio-volume-icon {
    width: 17px;
    height: 17px;

    flex: 0 0 17px;
}

.map-marker-region {
    z-index: 8;

    width: 100px;
    height: 100px;

    padding: 0;

    border: 6px solid #fff;
    border-radius: 50%;

    background: rgba(8, 16, 25, .82);

    box-shadow:
        0 8px 30px rgba(0, 0, 0, .8),
        0 0 0 12px rgba(255, 255, 255, .16);

    transition:
        transform .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.map-marker-region::before {
    content: "";
    position: absolute;

    inset: 18px;

    border: 4px solid rgba(255, 255, 255, .8);
    border-radius: 50%;
}

.map-marker-region .map-marker-label {
    font-size: 30px;
}

.map-marker:not(.map-marker-region) .map-marker-dot {
    width: 50px;
    height: 50px;
}

/* ============================================================
   FINAL REGION MARKER SIZING
   Must remain at bottom of map.css
   ============================================================ */

/* Small clickable region dot */
.map-marker.map-marker-region {
    width: 40px !important;
    height: 40px !important;

    border-width: 3px !important;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, .72),
        0 0 0 4px rgba(198, 161, 93, .10) !important;
}

/* Inner circle of region dot */
.map-marker.map-marker-region::before {
    inset: 7px !important;
    border-width: 2px !important;
}

/* BIG region tooltip text */
.map-marker.map-marker-region .map-marker-label {
    font-size: 88px !important;
    padding: 20px 32px !important;
    max-width: 1000px !important;

    bottom: calc(100% + 20px) !important;
}

/* ============================================================
   MAP INDEX SWIPE HANDLE
   ============================================================ */

.map-index-handle {
    display: none;
}

@media (max-width: 700px) {

    .map-index-handle {
        position: absolute;
        z-index: 5;

        top: 0;
        left: 0;
        right: 0;

        height: 42px;

        display: flex;
        align-items: center;
        justify-content: center;

        cursor: grab;

        touch-action: none;
    }

    .map-index-handle:active {
        cursor: grabbing;
    }

    .map-index-handle-bar {
        width: 52px;
        height: 5px;

        border-radius: 999px;

        background: rgba(198, 161, 93, .65);
    }

    .location-panel.dragging-sheet {
        transition: none !important;
    }
}


/* ============================================================
   MAP INDEX — DESKTOP POSITION
   ============================================================ */

@media (min-width: 701px) {

    .location-panel {
        position: absolute;

        top: 0;
        right: 0;
        left: auto;

        transform: translateX(100%);
    }

    .location-panel.open {
        transform: translateX(0);
    }
}

/* ============================================================
   MAP INDEX SWIPE HANDLE
   ============================================================ */

.map-index-handle {
    display: none;
}

@media (max-width: 700px) {

    .map-index-handle {
        position: absolute;
        z-index: 5;

        top: 0;
        left: 0;
        right: 0;

        height: 42px;

        display: flex;
        align-items: center;
        justify-content: center;

        cursor: grab;

        touch-action: none;
    }

    .map-index-handle:active {
        cursor: grabbing;
    }

    .map-index-handle-bar {
        width: 52px;
        height: 5px;

        border-radius: 999px;

        background: rgba(198, 161, 93, .65);
    }

    .location-panel.dragging-sheet {
        transition: none !important;
    }

    .location-panel.open {
        transform: translateY(0);
    }
}

@media (max-width: 700px) {

    .map-tools {
        display: none;
    }

}

/* ============================================================
   WORLD MAP FOG
   Static full-screen atmospheric layer
   ============================================================ */

.world-fog {
    position: absolute;
    inset: 0;

    z-index: 20;

    pointer-events: none;

    opacity: 0;
    visibility: hidden;

    /*
     * Soft full-screen haze.
     * No blur and no animation = very cheap to render.
     */
    background:
        radial-gradient(
            ellipse at center,
            rgba(210, 220, 215, 0.08) 0%,
            rgba(190, 202, 196, 0.15) 35%,
            rgba(150, 164, 158, 0.24) 68%,
            rgba(105, 120, 115, 0.40) 100%
        );

    transition:
        opacity 0.20s linear,
        visibility 0.20s linear;
}

.world-fog.active {
    opacity: 1;
    visibility: visible;
}