#container {
    display: flex;
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    max-height: 600px;
    margin: 0 auto;
    overflow: hidden;
    letter-spacing: 0;
}

#sidebar {
    width: 380px;
    height: 100%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.thumb-scroll-bar {
    display: none;
}

.place-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
    scroll-behavior: smooth;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.place-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.place-item:last-child {
    border-bottom: none;
}

.place-item:hover {
    background-color: #f5f5f5;
}

.place-item .item-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.place-item .list-thumb {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.place-item .item-info {
    flex: 1;
}

.place-item h3 {
    font-size: 16px;
    color: #111;
    margin-bottom: 4px;
    font-weight: 500;
}

.place-item h3 .num {
    display: none !important;
}

.place-item .basic-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.place-item .detail-box {
    display: none;
    margin-top: 16px;
}

.place-item .detail-title {
    display: none;
}

.place-item.active {
    background-color: #fff;
}

.place-item.active .detail-box {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #f0f0f0;
    display: block;
}

.place-item .detail-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 8px;
}

.place-item .detail-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    word-break: keep-all;
    margin-bottom: 16px;
}

.place-item .walk-info {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    word-break: keep-all;
    margin-bottom: 16px;
}

.place-item .walk-info .ico-address {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

.place-item .detail-link {
    display: block;
    font-size: 14px;
    border: 1px solid #999;
    line-height: 2.4;
    margin: 0 auto;
    text-align: center;
    width: 120px;
    transition: all 0.2s ease;
}

.place-item .detail-link:hover {
    color: #fff;
    background-color: #999;
    text-decoration: none;
    transition: all 0.2s ease;
}

#map {
    flex: 1;
    height: 100%;
}

.custom-marker {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px 6px;
    color: #222;
    background: #ffffff;
    border: 2px solid #0079c3;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-marker:hover,
.custom-marker.active {
    background-color: #0079c3;
    color: #fff;
}

.custom-marker .badge {
    width: 20px;
    height: 20px;
    background-color: #0079c3;
    color: white;
    border-radius: 50%;
    display: none !important;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.custom-marker:hover .badge,
.custom-marker.active .badge {
    background-color: #ffffff;
    color: #0079c3;
}

.custom-marker .title {
    font-size: 14px;
    font-weight: 500;
}

.custom-info-card {
    display: none !important;
    position: relative;
    width: 250px;
    background-color: #0079c3;
    color: #ffffff;
    padding: 16px;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    font-size: 13px;
    line-height: 1.5;
    white-space: normal;
    word-break: break-all;
}

.custom-info-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-right: 20px;
}

.custom-info-card .card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-info-card .card-badge {
    width: 22px;
    height: 22px;
    background-color: #ffffff;
    color: #0079c3;
    border-radius: 50%;
    display: none !important;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.custom-info-card h4 {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.2;
}

.custom-info-card .btn-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    color: #fff;
    border: none;
    width: 16px;
    height: 16px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.custom-info-card .card-desc {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.45;
    white-space: normal;
    word-break: break-all;
}

/* ==================================================
   모바일 전용 스타일 (반응형)
   ================================================== */
@media (max-width: 819px) {
    #container {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        height: auto; /* 고정 높이 해제 */
        max-height: none;
        border-radius: 0;
        box-shadow: none;
        overflow-x: hidden; /* 가로 스크롤 방지 */
    }

    #map {
        width: 100%;
        height: 35vh; /* 요청하신 35vh 적용 */
        flex: none;
        order: 1;
    }

    .custom-marker .title {
        font-size: 12px;
    }

    #sidebar {
        width: 100%;
        height: auto; /* 고정 높이 해제하여 내용만큼 늘어남 */
        order: 2;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        background-color: #fff;
    }

    .thumb-scroll-bar {
        display: flex;
        gap: 16px;
        padding: 16px;
        overflow-x: auto;
        white-space: nowrap;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        flex-shrink: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .thumb-scroll-bar::-webkit-scrollbar {
        display: none;
    }

    .thumb-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 56px;
        cursor: pointer;
        opacity: 0.6;
        transition: opacity 0.2s ease, transform 0.2s ease;
        flex-shrink: 0;
    }

    .thumb-item.active {
        opacity: 1;
    }

    .thumb-item .img-wrapper {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        overflow: hidden;
        margin-bottom: 8px;
    }

    .thumb-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .thumb-item span {
        font-size: 12px;
        color: #222;
        font-weight: 500;
        width: 100%;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .place-list {
        flex: none;
        overflow-y: visible; /* 자체 스크롤 제거 */
        padding: 0;
        border-bottom: none;
    }

    .place-item {
        display: none;
        padding: 16px;
        border-bottom: none;
        box-sizing: border-box;
    }

    .place-item.active {
        display: block;
    }

    .place-item .item-header {
        display: none;
    }

    .place-item.active .detail-box {
        display: block !important;
        margin-top: 0;
        border-top: none !important;
        padding-top: 0 !important;
    }

    .place-item .detail-title {
        display: block;
        font-size: 16px;
        font-weight: 500;
        color: #222;
        margin-bottom: 16px;
    }

    .place-item .detail-title .num {
        display: none !important;
    }
}