.adventure-map-page {
    --adventure-map-campsite-icon: url("https://cdn.jsdelivr.net/npm/lucide-static@1.27.0/icons/flame-kindling.svg");
    --adventure-map-header-offset: 3.5625rem;
    --adventure-map-viewport-height: 100vh;
    height: calc(var(--adventure-map-viewport-height) - var(--adventure-map-header-offset));
    min-height: 32rem;
    background: #e8e1cf;
}

@supports (height: 100dvh) {
    .adventure-map-page {
        --adventure-map-viewport-height: 100dvh;
    }
}

.adventure-map-shell {
    width: 100%;
    height: 100%;
}

.adventure-map {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #e8e1cf;
}

.adventure-map.has-error {
    display: grid;
    place-items: center;
}

.adventure-map-loading,
.adventure-map-message {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    color: #5d6048;
    background: #e8e1cf;
    font-size: 0.95rem;
}

.adventure-map.is-ready .adventure-map-loading {
    display: none;
}

.adventure-map-title {
    position: absolute;
    top: 0.75rem;
    left: 50%;
    z-index: 500;
    display: grid;
    max-width: min(34rem, calc(100% - 9rem));
    padding: 0.55rem 0.8rem;
    color: #2f3328;
    text-align: center;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(91, 82, 55, 0.16);
    border-radius: 0.42rem;
    box-shadow: 0 0.45rem 1.2rem rgba(47, 51, 40, 0.12);
    pointer-events: none;
    transform: translateX(-50%);
}

.adventure-map-title strong {
    overflow: hidden;
    font-size: 0.95rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adventure-map-title span {
    color: #5d6048;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
}

.adventure-map-popup {
    display: grid;
    min-width: 13.5rem;
    gap: 0.35rem;
    color: #2f3328;
}

.adventure-map-popup strong {
    color: #2f3328;
    font-size: 0.96rem;
    line-height: 1.2;
}

.adventure-map-popup-detail {
    color: #676b5b;
    font-size: 0.8rem;
    line-height: 1.3;
}

.adventure-map-popup-notes-button {
    justify-self: start;
    padding: 0.32rem 0.55rem;
    color: #3f4632;
    background: #f6f1e4;
    border: 1px solid rgba(91, 82, 55, 0.16);
    border-radius: 0.28rem;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
}

.adventure-map-popup-notes-button:hover,
.adventure-map-popup-notes-button:focus-visible {
    background: #efe6d4;
    outline: none;
}

.adventure-map-popup-activities {
    display: grid;
    gap: 0.3rem;
    margin-top: 0.2rem;
}

.adventure-map-popup-activity-list {
    display: grid;
    gap: 0.32rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.adventure-map-popup-activity-item {
    --activity-accent: #7a7f68;
    margin: 0;
    color: #2f3328;
    background: #faf6eb;
    border: 1px solid rgba(91, 82, 55, 0.11);
    border-left: 0.18rem solid var(--activity-accent);
    border-radius: 0.28rem;
}

.adventure-map-popup-activity-item.is-hike {
    --activity-accent: #b98a2f;
}

.adventure-map-popup-activity-item.is-camp {
    --activity-accent: #5a3a24;
}

.adventure-map-popup-activity-item.is-climb {
    --activity-accent: #5a6f78;
}

.adventure-map-popup-activity-button {
    display: block;
    width: 100%;
    padding: 0;
    color: inherit;
    background: transparent;
    border: 0;
    border-radius: 0 0.25rem 0.25rem 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.adventure-map-popup-activity-button:hover,
.adventure-map-popup-activity-button:focus-visible {
    background: rgba(91, 82, 55, 0.06);
    outline: none;
}

.adventure-map-popup-activity-item.is-open .adventure-map-popup-activity-button {
    background: rgba(91, 82, 55, 0.08);
}

.adventure-map-popup-activity-button.is-active {
    background: rgba(185, 138, 47, 0.12);
}

.adventure-map-popup-activity-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.18rem 0.45rem;
    align-items: center;
    padding: 0.38rem 0.5rem;
}

.adventure-map-popup-activity-type {
    display: inline-grid;
    align-items: center;
    min-width: 2.75rem;
    color: var(--activity-accent);
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.adventure-map-popup-activity-label {
    min-width: 0;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.adventure-map-popup-activity-meta {
    grid-column: 2;
    color: #676b5b;
    font-size: 0.74rem;
    line-height: 1.25;
}

.adventure-map-zoom-display,
.adventure-map-extent-display {
    padding: 0.35rem 0.55rem;
    color: #3f4632;
    background: rgba(248, 244, 233, 0.95);
    border: 1px solid rgba(91, 82, 55, 0.18);
    border-radius: 0.25rem;
    box-shadow: 0 0.35rem 1rem rgba(49, 42, 28, 0.12);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.adventure-map-zoom-display.is-hidden,
.adventure-map-extent-display.is-hidden {
    display: none;
}

.adventure-map-home-extent {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: #fff;
    border: 0;
    cursor: pointer;
}

.adventure-map-home-extent-icon {
    display: block;
    width: 1rem;
    height: 1rem;
    background:
        linear-gradient(#3f4632, #3f4632) left top / 0.45rem 0.125rem no-repeat,
        linear-gradient(#3f4632, #3f4632) left top / 0.125rem 0.45rem no-repeat,
        linear-gradient(#3f4632, #3f4632) right top / 0.45rem 0.125rem no-repeat,
        linear-gradient(#3f4632, #3f4632) right top / 0.125rem 0.45rem no-repeat,
        linear-gradient(#3f4632, #3f4632) left bottom / 0.45rem 0.125rem no-repeat,
        linear-gradient(#3f4632, #3f4632) left bottom / 0.125rem 0.45rem no-repeat,
        linear-gradient(#3f4632, #3f4632) right bottom / 0.45rem 0.125rem no-repeat,
        linear-gradient(#3f4632, #3f4632) right bottom / 0.125rem 0.45rem no-repeat;
}

.adventure-map-home-extent:hover,
.adventure-map-home-extent:focus-visible {
    background: #f4f4f4;
    outline: none;
}

.adventure-map-navigation-toggle {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    background: #fff;
    border: 0;
    cursor: pointer;
}

.adventure-map-navigation-toggle:hover,
.adventure-map-navigation-toggle:focus-visible {
    background: #f4f4f4;
    outline: none;
}

.adventure-map-navigation-toggle-icon {
    width: 1rem;
    height: 1rem;
    background: #3f4632;
    -webkit-mask: url("https://cdn.jsdelivr.net/npm/lucide-static@1.27.0/icons/map.svg") center / contain no-repeat;
    mask: url("https://cdn.jsdelivr.net/npm/lucide-static@1.27.0/icons/map.svg") center / contain no-repeat;
}

.adventure-map-info-toggle {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    color: #3f4632;
    background: #fff;
    border: 0;
    font: inherit;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.adventure-map-info-toggle:hover,
.adventure-map-info-toggle:focus-visible {
    background: #f4f4f4;
    outline: none;
}

.adventure-map-info-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1110;
    display: none;
    background: rgba(47, 51, 40, 0.2);
    border: 0;
}

.adventure-map-info-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1111;
    display: none;
    width: min(28rem, calc(100% - 2rem));
    max-height: min(34rem, calc(100% - 2rem));
    overflow-y: auto;
    color: #2f3328;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(91, 82, 55, 0.16);
    border-radius: 0.48rem;
    box-shadow: 0 1rem 2.75rem rgba(15, 23, 42, 0.2);
    transform: translate(-50%, -50%);
}

.adventure-map.has-map-info-open .adventure-map-info-backdrop,
.adventure-map.has-map-info-open .adventure-map-info-dialog {
    display: block;
}

.adventure-map-info-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(91, 82, 55, 0.14);
}

.adventure-map-info-header strong {
    font-size: 0.92rem;
    line-height: 1.2;
    text-transform: uppercase;
}

.adventure-map-info-close {
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    color: #3f4632;
    background: #f8fafc;
    border: 1px solid rgba(31, 41, 55, 0.14);
    border-radius: 0.4rem;
    cursor: pointer;
}

.adventure-map-info-close:hover,
.adventure-map-info-close:focus-visible {
    background: #eef2f7;
    outline: none;
}

.adventure-map-info-body {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    color: #3f4632;
    font-size: 0.9rem;
    line-height: 1.45;
}

.adventure-map-info-body p,
.adventure-map-info-body ul {
    margin: 0;
}

.adventure-map-info-body ul {
    display: grid;
    gap: 0.45rem;
    padding-left: 1.2rem;
}

.adventure-map-navigation-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1099;
    display: none;
    background: rgba(47, 51, 40, 0.18);
    border: 0;
}

.adventure-map-navigation-panel {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1100;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(23rem, calc(100% - 2rem));
    height: 100%;
    color: #2f3328;
    background: rgba(255, 255, 255, 0.96);
    border-left: 1px solid rgba(31, 41, 55, 0.14);
    box-shadow: -1rem 0 2rem rgba(15, 23, 42, 0.16);
    transform: translateX(100%);
    transition: transform 180ms ease-in-out;
}

.adventure-map.has-adventure-navigation-open .adventure-map-navigation-backdrop {
    display: block;
}

.adventure-map.has-adventure-navigation-open .adventure-map-navigation-panel {
    transform: translateX(0);
}

.adventure-map-navigation-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(31, 41, 55, 0.12);
}

.adventure-map-navigation-header strong {
    font-size: 0.9rem;
    line-height: 1.2;
    text-transform: uppercase;
}

.adventure-map-navigation-close {
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    color: #3f4632;
    background: #f8fafc;
    border: 1px solid rgba(31, 41, 55, 0.14);
    border-radius: 0.4rem;
    cursor: pointer;
}

.adventure-map-navigation-close:hover,
.adventure-map-navigation-close:focus-visible {
    background: #eef2f7;
    outline: none;
}

.adventure-map-navigation-list {
    display: grid;
    align-content: start;
    gap: 0.55rem;
    padding: 0.8rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.adventure-map-navigation-link {
    display: grid;
    gap: 0.2rem;
    padding: 0.7rem 0.75rem;
    color: #2f3328;
    background: #ffffff;
    border: 1px solid rgba(91, 82, 55, 0.16);
    border-radius: 0.42rem;
    text-decoration: none;
    transition:
        background-color 140ms ease,
        border-color 140ms ease,
        box-shadow 140ms ease;
}

.adventure-map-navigation-link:hover,
.adventure-map-navigation-link:focus-visible {
    border-color: rgba(72, 111, 134, 0.42);
    background: #f6f8f3;
    box-shadow: 0 0.35rem 0.9rem rgba(47, 51, 40, 0.08);
    outline: none;
}

.adventure-map-navigation-link.is-active {
    border-color: rgba(72, 111, 134, 0.68);
    background: #e8f0ec;
    box-shadow: inset 0.22rem 0 0 #486f86;
}

.adventure-map-navigation-link.is-active:hover,
.adventure-map-navigation-link.is-active:focus-visible {
    background: #e1ebe7;
}

.adventure-map-navigation-link.is-explore-all {
    margin-bottom: 0.25rem;
}

.adventure-map-navigation-link-title {
    color: #2f3328;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.2;
}

.adventure-map-navigation-link-meta {
    color: #5d6048;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.25;
}

.adventure-map-navigation-link.is-active .adventure-map-navigation-link-title {
    color: #244f61;
}

.adventure-map-navigation-link.is-active .adventure-map-navigation-link-meta {
    color: #486f86;
}

.adventure-map-extent-display {
    display: block;
    max-width: min(32rem, 62vw);
    margin-top: 0.35rem;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: copy;
}

.adventure-map-notes-dialog {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(47, 51, 40, 0.28);
}

.adventure-map-notes-dialog-panel {
    display: grid;
    width: min(24rem, 100%);
    max-height: min(28rem, 82vh);
    gap: 0.55rem;
    padding: 0.85rem;
    overflow: auto;
    color: #2f3328;
    background: #faf6eb;
    border: 1px solid rgba(91, 82, 55, 0.18);
    border-radius: 0.45rem;
    box-shadow: 0 1rem 2.5rem rgba(49, 42, 28, 0.24);
}

.adventure-map-notes-dialog-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.adventure-map-notes-dialog-header strong {
    font-size: 0.9rem;
    line-height: 1.2;
}

.adventure-map-notes-dialog-close {
    display: inline-grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    color: #4f5144;
    background: #f1eadb;
    border: 1px solid rgba(91, 82, 55, 0.16);
    border-radius: 50%;
    cursor: pointer;
}

.adventure-map-notes-dialog-meta {
    color: #676b5b;
    font-size: 0.75rem;
    line-height: 1.3;
}

.adventure-map-notes-dialog-body {
    margin: 0;
    color: #3d4036;
    font-size: 0.84rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.adventure-map-marker {
    display: grid;
    place-items: center;
    overflow: visible;
}

.adventure-map-marker-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    background: var(--marker-fill);
    border: 2px solid var(--marker-color);
    border-radius: 0.42rem;
    box-shadow: 0 0.2rem 0.55rem rgba(49, 42, 28, 0.22);
}

.adventure-map-marker-icon::before {
    display: block;
    width: 1.18rem;
    height: 1.18rem;
    background: var(--marker-color);
    content: "";
    -webkit-mask: var(--marker-icon, var(--adventure-map-campsite-icon)) center / contain no-repeat;
    mask: var(--marker-icon, var(--adventure-map-campsite-icon)) center / contain no-repeat;
}

.adventure-map-marker-badge {
    position: absolute;
    top: -0.3rem;
    right: -0.35rem;
    display: grid;
    place-items: center;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.18rem;
    color: #2f3328;
    background: #fefefe;
    border: 2px solid #2f3328;
    border-radius: 999px;
    box-shadow: 0 0.16rem 0.45rem rgba(49, 42, 28, 0.22);
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
}

.adventure-map-legend {
    display: grid;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(31, 41, 55, 0.14);
    box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.14);
    transition:
        background-color 180ms ease-in-out,
        box-shadow 180ms ease-in-out,
        transform 180ms ease-in-out;
}

.adventure-map-legend-toggle {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-left: auto;
    color: #3f4632;
    background: transparent;
    border: 0;
}

.adventure-map-legend-toggle-icon {
    width: 1.25rem;
    height: 1.25rem;
    background: currentColor;
    content: "";
    mask: url("https://cdn.jsdelivr.net/npm/lucide-static@1.27.0/icons/minus.svg") center / contain no-repeat;
}

.adventure-map-legend.is-collapsed {
    display: block;
}

.adventure-map-legend.is-collapsed .adventure-map-legend-panel {
    display: block;
    max-height: 2.5rem;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    transform: translateY(0.15rem);
}

.adventure-map-legend.is-collapsed .adventure-map-legend-header {
    display: block;
}

.adventure-map-legend.is-collapsed .adventure-map-legend-title,
.adventure-map-legend.is-collapsed .adventure-map-legend-empty,
.adventure-map-legend.is-collapsed .adventure-map-legend-section,
.adventure-map-legend.is-collapsed .adventure-map-legend-item {
    display: none;
}

.adventure-map-legend.is-collapsed .adventure-map-legend-toggle {
    width: 2.5rem;
    height: 2.5rem;
}

.adventure-map-legend.is-collapsed .adventure-map-legend-toggle-icon {
    mask-image: url("https://cdn.jsdelivr.net/npm/lucide-static@1.27.0/icons/layers.svg");
}

.adventure-map-legend-panel {
    display: grid;
    gap: 0.35rem;
    max-height: min(42rem, calc(100vh - 8rem));
    min-width: 11.5rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0.75rem;
    opacity: 1;
    transform: translateY(0);
    transition:
        max-height 220ms ease-in-out,
        min-width 220ms ease-in-out,
        opacity 180ms ease-in-out,
        padding 220ms ease-in-out,
        transform 220ms ease-in-out;
}

.adventure-map-legend-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
}

.adventure-map-legend-title {
    color: #3f4632;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.adventure-map-legend-section {
    display: grid;
    gap: 0.25rem;
}

.adventure-map-legend-section + .adventure-map-legend-section {
    margin-top: 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(31, 41, 55, 0.12);
}

.adventure-map-legend-section-title {
    color: #746b52;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.adventure-map-legend-empty {
    color: #746b52;
    font-size: 0.85rem;
}

.adventure-map-legend-item {
    display: grid;
    grid-template-columns: 1.55rem minmax(0, 1fr);
    gap: 0.5rem;
    align-items: center;
    width: 100%;
    padding: 0.35rem 0;
    color: #3f4632;
    background: transparent;
    border: 0;
    font: inherit;
    font-size: 0.9rem;
    text-align: left;
}

.adventure-map-legend-item[aria-pressed="false"] {
    color: #8a846f;
}

.adventure-map-legend-item[aria-pressed="false"] .adventure-map-legend-swatch {
    opacity: 0.35;
}

.adventure-map-legend-swatch {
    --legend-color: #5f6f3a;
    --legend-fill: #d9d0b5;
    --legend-line-width: 2px;
    display: block;
    width: 1.3rem;
    height: 1rem;
    justify-self: center;
}

.adventure-map-legend-swatch.is-polygon {
    width: 1rem;
    height: 1rem;
    background: var(--legend-fill);
    border: 2px solid var(--legend-color);
}

.adventure-map-legend-swatch.is-line {
    height: var(--legend-line-width);
    background: var(--legend-dash-image, var(--legend-color));
    border-radius: 999px;
    align-self: center;
}

.adventure-map-legend-swatch.is-point {
    width: 0.85rem;
    height: 0.85rem;
    margin-left: 0.075rem;
    background: var(--legend-fill);
    border: 2px solid var(--legend-color);
    border-radius: 50%;
}

.adventure-map-legend-swatch.is-icon {
    display: grid;
    place-items: center;
    width: 1.55rem;
    height: 1.55rem;
    background: var(--legend-fill);
    border: 2px solid var(--legend-color);
    border-radius: 0.42rem;
}

.adventure-map-legend-swatch.is-icon::before {
    display: block;
    width: 1.08rem;
    height: 1.08rem;
    background: var(--legend-color);
    content: "";
    -webkit-mask: var(--legend-icon, var(--adventure-map-campsite-icon)) center / contain no-repeat;
    mask: var(--legend-icon, var(--adventure-map-campsite-icon)) center / contain no-repeat;
}

@media (max-width: 48rem) {
    .adventure-map-page {
        --adventure-map-header-offset: 3.5rem;
        min-height: 0;
    }

    .adventure-map-title {
        top: 0.6rem;
        max-width: min(18rem, calc(100% - 7.5rem));
        padding: 0.45rem 0.65rem;
    }

    .adventure-map-title strong {
        font-size: 0.86rem;
    }
}

.adventure-map-page ~ .site-footer {
    display: none;
}
