body {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: left;
}

a {
    color: #212529;
    text-decoration: none;
    outline: 0;
}

.sns-login {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 50vh;
    position: relative;
}

.icon {
    width: 36px;
    height: 36px;
    padding: .1rem;
}

.menus {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding-bottom: 100px;
}

.menu {
    display: flex;
    flex-direction: column;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 1rem 1rem;
    border-bottom: 1px solid #e2e3e5;
}

.menu-title {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 1rem 1rem;
    border-bottom: 1px solid #e2e3e5;
}

.menu-body {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    padding: .75rem 1rem;
    background-color: #ffffff;
}

#apt-filter-placeholder, #calculator-placeholder {
    margin-top: 56px;
    padding: 8px;
    position: sticky;
    top: 56px;
    z-index: 1000;
    background-color: white;
}

.apt-search-container {
    position: relative;
    max-width: 500px;
    margin: 20px auto;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none;
}

.autocomplete-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #f8f9fa;
}

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

.autocomplete-text {
    font-size: 14px;
    color: #333;
}

.loading {
    padding: 12px 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.no-results {
    padding: 12px 16px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

#apt-filter-content {
    transition: height 0.3s ease;
    margin: 8px;
}

.range-slider {
    height: 5px;
    position: relative;
    background-color: #e1e9f6;
    border-radius: 2px;
}

.range-selected {
    height: 100%;
    left: 0;
    right: 0;
    position: absolute;
    border-radius: 5px;
    background-color: #1b53c0;
}

.range-input {
    position: relative;
}

.range-input input {
    position: absolute;
    width: 100%;
    height: 5px;
    top: -7px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.range-input input::-webkit-slider-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    border: 3px solid #1b53c0;
    background-color: #fff;
    pointer-events: auto;
    -webkit-appearance: none;
}

.range-input input::-moz-range-thumb {
    height: 15px;
    width: 15px;
    border-radius: 50%;
    border: 3px solid #1b53c0;
    background-color: #fff;
    pointer-events: auto;
    -moz-appearance: none;
}

.range-button {
    margin: min(1vw, 10px) 0;
    width: 100%;
    display: flex;
    /*justify-content: center;*/
    align-items: center;
    flex-wrap: wrap;
}

.range-button button {
    font-size: 0.85rem; /* ✅ 반응형 글꼴 크기 */
    padding: 0.5vw; /* ✅ 버튼 패딩 조정 */
    width: clamp(75px, 10vw, 100px); /* 최소 80px, 최대 120px, 기본적으로 10vw */
}

.range-button label {
    margin-right: 5px;
}

.range-button input {
    width: 40px;
    padding: 5px;
}

.range-button input:first-of-type {
    margin-right: 15px;
}

.filter-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-button-group.show {
    display: flex; /* ✅ 다시 표시 */
    flex-wrap: wrap;
    gap: 8px;
}

.btn.filter-button {
    font-size: clamp(0.85rem, 1vw, 1.2rem); /* 뷰포트 크기에 따라 글자 크기 자동 조정 */
    padding: min(0.8vw, 8px) min(1.2vw, 12px); /* 버튼 내부 패딩도 자동 조정 */
    width: clamp(85px, 15vw, 180px); /* 최소 80px, 최대 120px, 기본적으로 10vw */
margin(0.5 vw, 6 px);
}

.btn.btn-outline-info.active {
    background-color: #007bff;
    color: white;
}

.btn-outline-secondary {
    border-radius: 20px;
    padding: 10px 15px;
    background-color: #f1f1f1;
    border: none;
    margin: 5px;
    cursor: pointer;
}

#region-choice-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    width: 100%;
}

.region-item {
    font-size: clamp(0.85rem, 1vw, 1.2rem);
    padding: 1px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap; /* 텍스트 줄바꿈 방지 */
}

.region-item button {
    margin-left: 4px;
    font-size: 0.8rem;
}

.row {
    display: flex;
    flex-wrap: nowrap; /* 줄바꿈 방지 */
    align-items: stretch; /* 모든 셀 높이를 동일하게 맞춤 */
    padding-bottom: 10px;
}

.content-center {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.apt-name {
    display: inline;
    align-items: center;
    font-size: 0.9em;
    gap: 5px;
}

.apt-info {
    font-size: 0.8em;
    color: gray;
}

.apt-price {
    font-size: 0.9em;
    font-weight: bold;
}

.apt-list-header {
    padding-top: 0.5em;
    padding-bottom: 0.5em;
}

.apt-list-header {
    font-weight: bold;
    font-size: 1.2rem;
    background-color: mediumslateblue;
}

.apt-list-body {
    display: flex;
    flex-direction: column;
    justify-content: center; /* 안의 내용들이 세로 중앙 정렬되도록 */
    width: 100%; /* 셀이 전체 너비를 차지하도록 */
    border-bottom: 1px solid #ddd; /* 가독성을 위해 연한 회색 */
    padding-bottom: 10px; /* 간격 조정 */
}

.apt-price-drop-rate p {
    font-size: 0.9rem;
}

/*!* 🌟 컬럼 크기 통일 *!*/
.apt-list-header:nth-child(1), .apt-list-body:nth-child(1) {
    flex: 1;
}

/* 갭 가격 */
.apt-list-header:nth-child(2), .apt-list-body:nth-child(2) {
    flex: 6;
}

/* 아파트 기본정보 */
.apt-list-header:nth-child(3), .apt-list-body:nth-child(3) {
    flex: 2;
}

/* 기준 전고점 */

div .filter-expand-btn {
    display: none;
}

#apt-list-header-placeholder {
    position: fixed;
    transition: top 0.2s ease-in-out; /* 부드러운 이동 효과 */
}

#apt-list-header-placeholder .container {
    overflow: visible !important;
}

#non-royal-remover {
    display: flex;
    align-items: center;
    gap: 8px;
    /*margin-top: 5px; !* ✅ 필터 버튼과 간격 조정 *!*/
    white-space: nowrap;
}

.apt-price-drop-rate {
    width: 4rem;
    height: 1.8rem;
    border: 2px solid #000000;
    display: flex;
    justify-content: center;
}

#sido-dropdown, #sigungu-dropdown {
    max-height: 20rem;
    overflow-y: auto;
}

.apt-link {
    text-decoration: none;
}

.apt-link:hover {
    text-decoration: underline;
}

.link-icon {
    display: inline-block;
    width: 2vw;
    height: 2vw;
    min-width: 10px;
    min-height: 10px;
    max-width: 20px;
    max-height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 2px;
}

.link-icon.landnaver {
    background-image: url('../images/landnaver.png');
}

.link-icon.naver-map {
    background-image: url('../images/naver_map.png');
}

#members-service-status {
    max-height: 80vh;
    min-width: 80%;
    max-width: 80%;
    overflow-y: auto;
}

#members-service-status table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
}

#members-service-status thead th {
    position: sticky;
    top: 0;
    background: white;
    z-index: 2;
    border: 1px solid #dee2e6;
}

#members-service-status th:nth-child(1),
#members-service-status td:nth-child(1) {
    width: 5%;
}

#members-service-status th:nth-child(2),
#members-service-status td:nth-child(2) {
    width: 50%;
}

#members-service-status th:nth-child(3),
#members-service-status td:nth-child(3) {
    width: 25%;
}

#members-service-status th:nth-child(4),
#members-service-status td:nth-child(4) {
    width: 20%;
}

.region-choice-placeholder {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-right: 0.5rem;
}

.sido-group {
    display: inline-flex;
    flex-direction: column;
    padding: 0.5rem;
    box-sizing: border-box;
    min-width: 20vw; /* ✅ 뷰포트 너비 기준 (화면 1/5) */
}

.sido-header {
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.sigungu-list {
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
    max-height: 25vh; /* ✅ 화면 높이 기준 */
    width: 100%;
    flex: 1 1 auto;
    border: 1px solid #ddd;
}

.sigungu-list.hidden {
    display: none;
}

.sigungu-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    flex-shrink: 0;
}

.sigungu-dropdown-arrow-icon {
    font-size: 0.875rem;
    user-select: none;
}

.sido-checkbox,
.sigungu-checkbox {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
}

/* 🌟 반응형 - 모바일 (576px 이하) */
@media (max-width: 576px) {
    .apt-list-header {
        font-size: 0.7em;
        min-height: 50px;
    }

    .apt-list-body {
        font-size: 0.8em;
    }

    .apt-name {
        font-size: 0.9em;
    }

    .apt-info {
        font-size: 0.7em;
    }

    .range-input input {
        height: 6px; /* 모바일에서 조금 더 두껍게 */
    }

    .range-input input::-webkit-slider-thumb,
    .range-input input::-moz-range-thumb {
        height: min(5vw, 24px);
        width: min(5vw, 24px);
    }

    .filter-button-group {
        display: none; /* ✅ 기본적으로 숨김 */
    }

    /* ✅ 모바일에서 확장 버튼만 표시 */
    div .filter-expand-btn {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 8px;
    }

    #non-royal-remover {
        display: none !important;
    }

    #non-royal-remover.show {
        display: flex !important;
        gap: 8px;
    }

    #apt-filter-content {
        display: none;
        margin: 8px;
    }

    #apt-filter-content.show {
        display: flex;
    }

    #region-choice-container {
        display: none;
    }

    #region-choice-container.show {
        display: flex;
    }

    .region-item, .region-item button {
        font-size: 0.6rem; /* ✅ 글자 크기 더 줄이기 */
    }
}

