.gpx-collection-wrapper {
    padding-top: 24px;
    padding-bottom: 40px;
    min-height: calc(100vh - 80px);
}

.gpx-collection-inner {
    width: 100%;
    max-width: 1360px;
    padding: 0 40px;
}

.gpx-collection-inner > .row {
    margin-left: 0;
    margin-right: 0;
    flex-wrap: nowrap;
}

.gpx-title-box {
    flex: 1;
    padding: 0;
}

.gpx-title-box .category {
    margin-bottom: 6px;
    font-family: "Outfit", "NotoSansKR-Regular", sans-serif;
    font-weight: 500;
    color: #6D6C6A !important;
}

.gpx-title-box .article-title {
    font-family: "Outfit", "NotoSansKR-Bold", sans-serif;
    font-weight: 700;
    font-size: 2.25rem;
    letter-spacing: -0.9px;
    color: #1A1918;
    margin: 0;
}

.gpx-top-side {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    width: auto;
    flex-shrink: 0;
}

.gpx-top-side .view-mode-control .btn {
    padding: 6px 12px;
}

.gpx-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px;
    width: 100%;
}

.gpx-filter-row:last-of-type {
    margin-bottom: 16px;
}

.gpx-filter-label {
    flex: 0 0 72px;
    font-family: "Outfit", "NotoSansKR-Regular", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #6D6C6A;
    text-transform: uppercase;
}

.gpx-distance-chips,
.gpx-country-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.gpx-country-chips:empty {
    display: none;
}

.gpx-filter-chips {
    display: flex;
    align-items: center;
    gap: 6px;
}

.gpx-chip {
    height: 32px;
    padding: 0 14px;
    background-color: #FFFFFF;
    border: 1px solid #E5E4E1;
    border-radius: 6px;
    font-family: "Outfit", "NotoSansKR-Regular", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #6D6C6A;
    cursor: pointer;
    transition: all 0.15s;
}

.gpx-chip:hover {
    background-color: var(--www-background-green-opacity-70);
    border-color: var(--www-background-green-opacity-70);
    color: #FFFFFF;
}

.gpx-chip.active {
    background-color: var(--www-background-green-opacity-80);
    border-color: #6c757d;
    color: #FFFFFF;
}

.gpx-chip:disabled,
.gpx-chip.disabled {
    background-color: #F5F4F1;
    border-color: #EAE9E6;
    color: #C4C3C1;
    cursor: not-allowed;
    opacity: 0.6;
}

.gpx-chip:disabled:hover,
.gpx-chip.disabled:hover {
    background-color: #F5F4F1;
    border-color: #EAE9E6;
    color: #C4C3C1;
}

.gpx-fit-btn,
.gpx-reset-btn {
    height: 32px;
}

/* Content area */
.gpx-content-row {
    gap: 16px;
    align-items: stretch;
    height: calc(100vh - 320px);
    min-height: 560px;
}

.gpx-map-area {
    flex: 1;
    min-width: 0;
    border-radius: 12px;
    overflow: hidden;
    background-color: #E8EBE5;
    border: 1px solid #E5E4E1;
    position: relative;
}

#gpxMap {
    position: absolute;
    inset: 0;
}

.gpx-map-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    display: flex;
    gap: 6px;
}

.gpx-map-controls .btn {
    background-color: #FFFFFF;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.gpx-map-controls .btn:hover {
    background-color: var(--www-background-green-opacity-70);
}

.gpx-sidebar {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: #FFFFFF;
    border: 1px solid #E5E4E1;
    border-radius: 12px;
    overflow: hidden;
}

.gpx-sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid #F0EFEC;
}

.gpx-sidebar-overline {
    display: block;
    font-family: "Outfit", "NotoSansKR-Regular", sans-serif;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: #9C9B99;
    text-transform: none;
    margin-bottom: 4px;
}

.gpx-sidebar-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gpx-sidebar-title {
    font-family: "Outfit", "NotoSansKR-Bold", sans-serif;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #1A1918;
}

.gpx-sidebar-count {
    font-family: "Outfit", "NotoSansKR-Regular", sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: var(--www-background-green);
    padding: 2px 8px;
    border: 1px solid transparent;
    border-radius: 50%;
}

.gpx-sidebar-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #FBFAF7;
    border-bottom: 1px solid #F0EFEC;
}

.gpx-sidebar-sort-label {
    font-family: "Outfit", "NotoSansKR-Regular", sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #1A1918;
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.gpx-sidebar-sort-label .bi {
    color: #6D6C6A;
    margin-right: 4px;
}

.gpx-sidebar-sort-select {
    flex: 1;
    height: 30px;
    font-size: 12px;
    padding: 2px 24px 2px 8px;
    background-color: #FFFFFF;
    border: 1px solid #E5E4E1;
    border-radius: 6px;
    color: #1A1918;
    cursor: pointer;
}

.gpx-sidebar-sort-select:focus {
    border-color: #1A1918;
    box-shadow: none;
}

.gpx-sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.gpx-sidebar-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #F0EFEC;
    cursor: pointer;
    transition: background-color 0.15s;
}

.gpx-sidebar-item:last-child {
    border-bottom: none;
}

.gpx-sidebar-item:hover {
    background-color: #FBFAF7;
}

.gpx-sidebar-item.active {
    background-color: #F5F4F1;
    border-left: 3px solid #1A1918;
    padding-left: 17px;
}

.gpx-sidebar-dot {
    width: 24px;
    height: 24px;
    border-radius: 12px;
    background-color: #FFFFFF;
    border: 1px solid #E5E4E1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: "Outfit", sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #1A1918;
}

.gpx-sidebar-item.active .gpx-sidebar-dot {
    background-color: #1A1918;
    border-color: #1A1918;
    color: #FFFFFF;
}

.gpx-sidebar-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.gpx-sidebar-info-category {
    font-family: "Outfit", sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: #9C9B99;
    letter-spacing: 0.3px;
}

.gpx-sidebar-info-title {
    font-family: "Outfit", "NotoSansKR-Bold", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1A1918;
    line-height: 1.4;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-all;
}

.gpx-sidebar-info-article a {
    font-family: "Outfit", "NotoSansKR-Regular", sans-serif;
    font-size: 12px;
    color: #3D8A5A;
    text-decoration: none;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gpx-sidebar-info-article a:hover {
    text-decoration: underline;
    text-decoration-style: wavy;
}

.gpx-sidebar-info-meta {
    font-family: "Outfit", sans-serif;
    font-size: 12px;
    color: #6D6C6A;
}

.gpx-sidebar-elevation {
    flex: 0 0 auto;
    width: 88px;
    height: 44px;
    align-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpx-sidebar-elevation .gpx-elevation-svg {
    display: block;
    width: 100%;
    height: 100%;
}

.gpx-sidebar-empty {
    display: none;
    padding: 40px 16px;
    text-align: center;
    color: #9C9B99;
    font-size: 13px;
}

.gpx-sidebar-empty.visible {
    display: block;
}

/* Skeleton loading */
.gpx-sidebar-skeleton {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #F0EFEC;
}

.gpx-sidebar-skeleton:last-of-type {
    border-bottom: none;
}

.gpx-skeleton-dot {
    width: 24px;
    height: 24px;
    border-radius: 12px;
    background: #F0EFEC;
    flex-shrink: 0;
    background: linear-gradient(90deg, #F0EFEC 0%, #F8F7F4 50%, #F0EFEC 100%);
    background-size: 200% 100%;
    animation: gpxShimmer 1.4s infinite linear;
}

.gpx-skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gpx-skeleton-line {
    height: 12px;
    border-radius: 4px;
    background: #F0EFEC;
    background: linear-gradient(90deg, #F0EFEC 0%, #F8F7F4 50%, #F0EFEC 100%);
    background-size: 200% 100%;
    animation: gpxShimmer 1.4s infinite linear;
}

.gpx-skeleton-line.short {
    width: 40%;
}

@keyframes gpxShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Custom InfoWindow overlay — black 80% bubble */
.gpx-overlay-card {
    position: absolute;
    transform: translate(-50%, calc(-100% - 12px));
    background: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 14px 36px 14px 16px;
    pointer-events: auto;
    z-index: 10;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    cursor: move;
    touch-action: none;
    user-select: none;
}

.gpx-overlay-card.is-dragging {
    cursor: grabbing;
}

.gpx-overlay-card a,
.gpx-overlay-card button {
    cursor: pointer;
}

.gpx-overlay-card::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(0, 0, 0, 0.8);
}

.gpx-overlay-card.is-dragged::after {
    display: none;
}

.gpx-overlay-content {
    position: relative;
}

.gpx-overlay-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    z-index: 1;
}

.gpx-overlay-close:hover {
    color: #FFFFFF;
}

.gpx-infowindow {
    font-family: "Outfit", "NotoSansKR-Regular", sans-serif;
    min-width: 220px;
    display: flex;
    flex-direction: column;
}

.gpx-infowindow.has-elevation {
    flex-direction: row;
    align-items: stretch;
    gap: 14px;
    min-width: 380px;
}

.gpx-infowindow-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.gpx-infowindow-elevation {
    flex: 0 0 auto;
    width: 140px;
    align-self: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px;
}

.gpx-infowindow-elevation .gpx-elevation-svg {
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
}

.gpx-infowindow-category {
    font-family: "Outfit", sans-serif;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.3px;
}

.gpx-infowindow-title {
    font-family: "Outfit", "NotoSansKR-Bold", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    line-height: 1.4;
    word-break: break-all;
}

.gpx-infowindow-article a {
    font-family: "Outfit", "NotoSansKR-Regular", sans-serif;
    font-size: 12px;
    color: #6FCB8E;
    text-decoration: none;
    line-height: 1.4;
}

.gpx-infowindow-article a:hover {
    text-decoration: underline;
    text-decoration-style: wavy;
}

.gpx-infowindow-meta {
    font-family: "Outfit", sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

.gpx-infowindow-download {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    font-size: 13px;
    color: #6FCB8E;
    text-decoration: none;
    cursor: pointer;
    font-weight: 500;
}

.gpx-infowindow-download:hover {
    text-decoration: underline;
}

/* Wide view mode */
.gpx-collection-wrapper.wide-view .gpx-collection-inner {
    max-width: none;
    padding: 0 24px;
}

.gpx-collection-wrapper.wide-view .gpx-content-row {
    height: calc(100vh - 240px);
}

/* Responsive */
@media (max-width: 992px) {
    .gpx-collection-inner {
        padding: 0 20px;
    }

    .gpx-filter-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .gpx-filter-label {
        flex: 0 0 100%;
        font-size: 11px;
        margin-bottom: 2px;
    }

    .gpx-filter-chips,
    .gpx-distance-chips,
    .gpx-country-chips {
        flex-basis: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 6px;
    }

    .gpx-filter-chips::-webkit-scrollbar,
    .gpx-distance-chips::-webkit-scrollbar,
    .gpx-country-chips::-webkit-scrollbar {
        display: none;
    }

    .gpx-filter-chips .gpx-chip,
    .gpx-distance-chips .gpx-chip,
    .gpx-country-chips .gpx-chip {
        flex: 0 0 auto;
    }

    .gpx-content-row {
        flex-direction: column;
        height: auto;
        min-height: 0;
    }

    .gpx-map-area {
        flex: none;
        width: 100%;
        height: 60vh;
        min-height: 360px;
    }

    .gpx-sidebar {
        flex: none;
        width: 100%;
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    .gpx-map-area {
        height: 65vh;
    }
}

@media (max-width: 576px) {
    .gpx-collection-inner > .row {
        flex-wrap: wrap;
    }

    .gpx-top-side {
        margin-top: 12px;
    }

    .gpx-title-box .article-title {
        font-size: 1.75rem;
    }
}
