@charset "UTF-8";

/* =========================================
   서브 페이지 전용 스타일 (sub.css)
   (list.html, school.html, news.html)
   ========================================= */

/* --- 1. 공통 타이틀 & 설명 --- */
.page-title {
    font-size: 28px;
    font-weight: 800;
    color: #212529;
    margin-bottom: 24px;
    text-align: center;
}

.service-description {
    text-align: center;
    margin-bottom: 16px;
    padding: 0 16px;
}
.service-description h2 {
    font-weight: 800;
    color: #212529;
    font-size: 20px;
    margin: 0 0 4px 0;
}
.service-description p {
    font-size: 13px;
    color: #868e96;
    margin: 0;
    white-space: nowrap;
}
@media screen and (max-width: 480px) {
    /* 좁은 화면에서 서브텍스트가 2줄로 꺾여 영역을 많이 차지하는 문제 — 폰트를
       살짝 더 줄이고 줄바꿈을 막는다(본문도 한 줄에 들어가게 짧게 다듬어 둠). */
    .service-description { margin-bottom: 14px; }
    .service-description h2 { font-size: 18px; }
    .service-description p { font-size: 11.5px; }
}


/* --- 2. 최근 본 내역 (list.html) --- */
.recent-view {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
}
.recent-view ul { list-style: none; margin: 0; padding: 0; }
.recent-view li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid #f1f3f5;
}
.recent-view li:last-child { border-bottom: none; }
.recent-view .region-name { font-weight: 600; font-size: 15px; color: #343a40; }
.recent-view .date { font-size: 14px; color: #868e96; }


/* --- 3. 퀵 네비게이션 (list.html) --- */
/* --- 퀵 네비게이션 (Segmented Tabs) --- */
.quick-nav {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6px !important;
    margin-bottom: 32px !important;
    background-color: #f1f3f5 !important;
    padding: 5px !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
}
.quick-nav-btn {
    height: 42px !important;
    border: none !important;
    border-radius: 10px !important;
    background-color: transparent !important;
    color: #868e96 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    letter-spacing: -0.02em !important;
    font-family: inherit !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.quick-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.6) !important;
    color: #1a73e8 !important;
    transform: none !important;
    box-shadow: none !important;
}
.quick-nav-btn:active {
    transform: scale(0.96) !important;
}
.quick-nav-btn.active {
    background: linear-gradient(135deg, #1a73e8, #1557b0) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3) !important;
    transform: none !important;
}


/* --- 3-1. 오늘 등록 현황 요약 바 (지역/날짜 행 아래 별도 줄) --- */
.national-summary-card {
    display: flex;
    width: 100%;
    margin: 12px 0 0 0;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 16px 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    align-items: center;
    justify-content: center;
    gap: 28px;
    box-sizing: border-box;
}
@media screen and (min-width: 769px) {
    .national-summary-card {
        width: fit-content;
        margin-left: auto;
        justify-content: flex-start;
    }
}
.summary-stat {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.summary-stat-label {
    font-size: 14px;
    font-weight: 700;
    color: #495057;
}
.summary-stat.shingoga .summary-stat-label {
    color: #e03131;
}
.summary-stat-value {
    font-size: 22px;
    font-weight: 900;
    color: #212529;
    letter-spacing: -0.02em;
}

/* 신고가 심플 토글 칩 버튼 */
.shingoga-only-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    color: #495057;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.shingoga-only-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
}
.shingoga-only-btn.active {
    background: #0f172a !important;
    border-color: #0f172a !important;
    color: #ffffff !important;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.25) !important;
}

.summary-stat-value {
    font-size: 23px;
    font-weight: 800;
    color: #212529;
    letter-spacing: -0.02em;
    line-height: 1;
}
.summary-stat.shingoga .summary-stat-value {
    color: #e03131;
}
.summary-stat-unit {
    font-size: 13px;
    font-weight: 600;
    color: #868e96;
}
.summary-stat-note {
    font-size: 11px;
    color: #868e96;
    font-weight: 500;
    margin-left: 2px;
}
.summary-divider {
    width: 1px;
    height: 26px;
    background: #e9ecef;
}
@media screen and (max-width: 768px) {
    .national-summary-card {
        gap: 20px;
        padding: 14px 16px;
    }
    .summary-stat-value {
        font-size: 20px;
    }
}

/* --- 4. 지역/날짜 필터 --- */
.filter-container { margin-bottom: 24px; }
.region-step { margin-bottom: 24px; min-width: 0; }
.region-step h4 {
    margin: 0 0 14px 0;
    font-size: 12.5px;
    font-weight: 800;
    color: #1a73e8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.region-btn {
    height: 40px; border: 1px solid #ced4da; border-radius: 6px;
    background-color: #fff; color: #495057; font-weight: 600; font-size: 15px;
    font-family: 'Noto Sans KR', sans-serif; cursor: pointer; transition: all 0.2s ease;
    user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
    -webkit-user-drag: none; touch-action: manipulation;
}
.region-btn:hover { background-color: #f8f9fa; border-color: #495057; }
.region-btn.active { background-color: #343a40; color: white; border-color: #343a40; font-weight: 700; }

.date-filter {
    margin-bottom: 24px; border-bottom: 1px solid #f1f3f5; padding-bottom: 24px;
}
.filter-controls {
    display: flex; justify-content: center; align-items: center; gap: 8px; margin-bottom: 12px;
}
.date-selector {
    width: 220px; padding: 0 12px; height: 42px;
    border: 1px solid #ced4da; border-radius: 6px;
    font-family: 'Noto Sans KR', sans-serif; font-size: 15px;
}
.filter-controls button {
    height: 42px; border: 1px solid #343a40; border-radius: 6px;
    background-color: #343a40; color: white; padding: 0 24px;
    font-weight: 600; cursor: pointer;
}
.filter-info { text-align: center; font-size: 13px; color: #868e96; margin: 0; }


/* --- 5. 차트 컨테이너 --- */
.chart-container {
    margin-bottom: 24px;
}
.content-title {
    font-size: 18px; font-weight: 700; color: #212529; margin: 0 0 16px 0;
}


/* --- 6. 일일 실거래 테이블 (구형, 필요시 삭제 가능) --- */
.table-container { overflow-x: auto; margin-bottom: 24px; }


/* ----------------------------------------------------
   [최종 수정 v13] 실거래 카드 리스트 (라인 정렬 & 겹침 방지)
   - sub.css 파일의 '.real-price-card-list' 이후 내용을 이걸로 덮어쓰세요.
---------------------------------------------------- */

.content-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.real-price-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
}

/* PC 화면 카드 그리드 레이아웃 추가 */
#listContainer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-items: stretch;
}

/* 카드 아이템 전체 */
.rp-card-item {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px; /* 너무 둥글지 않도록 8px로 조절 */
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: transform 0.25s cubic-bezier(0.1, 0.8, 0.2, 1), box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    min-height: 195px; /* PC 기본 카드 최소 높이 통일 (넘침 방지) */
    min-width: 0; /* CSS Grid 아이템의 기본값(min-width:auto) 때문에, 카드 안 ApexChart가 렌더링
                     시점에 자기 폭을 px로 확정지으면 그 값이 그리드 트랙 너비를 밀어 올려서
                     "자세히" 펼칠 때 옆 카드까지 넓어져 보이는 문제가 생긴다 — 0으로 눌러서
                     내용이 트랙 너비에 맞춰 줄어들 수 있게(overflow:hidden으로 잘리게) 한다. */
}
.rp-card-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

/* 신고가 카드에 특별한 테두리와 은은한 배경색 추가 */
.rp-card-item.shingoga-card {
    border: 1px solid #ffc9c9;
    box-shadow: 0 4px 16px rgba(224, 49, 49, 0.04);
}

/* 최고가 동일(타이) 카드 스타일 */
.rp-card-item.tie-card {
    border: 1px solid #ffe8cc;
    box-shadow: 0 4px 16px rgba(253, 126, 20, 0.04);
}

/* 최초거래(과거 실거래 이력이 없는 첫 등록) 카드 스타일 */
.rp-card-item.firstdeal-card {
    border: 1px solid #d0bfff;
    box-shadow: 0 4px 16px rgba(112, 72, 232, 0.04);
}

/* 상단 헤더 바 */
.rp-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    color: #ffffff;
}
.rp-card-header.rise {
    background: linear-gradient(135deg, #ff6b6b, #e03131);
}
.rp-card-header.tie {
    background: linear-gradient(135deg, #ff922b, #fd7e14);
}
.rp-card-header.firstdeal {
    background: linear-gradient(135deg, #9775fa, #7048e8);
}
.rp-card-header.fall {
    background: #f8f9fa;
    color: #212529;
    border-bottom: 1px solid #e9ecef;
}
.rp-card-header.fall .rp-change {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    color: #495057;
}

/* 헤더 왼쪽: 금액 및 층수 */
.rp-card-header .header-left {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.rp-card-header .rp-price {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.rp-card-header .rp-floor {
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
}

/* 헤더 오른쪽: 변동액 & 신고가 배지 */
.rp-card-header .header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 변동액 배지 (헤더 바 내부용) */
.rp-card-header .rp-change {
    font-size: 11px;
    font-weight: 700;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* 신고가 배지 (헤더 바 내부용) */
.rp-card-header .badge-shingoga {
    font-size: 10px;
    font-weight: 800;
    background-color: #ffffff;
    color: #e03131;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    border: 1px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* 최고가 동일 배지 (헤더 바 내부용) */
.rp-card-header .badge-tie {
    font-size: 10px;
    font-weight: 800;
    background-color: #ffffff;
    color: #fd7e14;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    border: 1px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* 최초거래(과거 실거래 이력 없음) 배지 (헤더 바 내부용) */
.rp-card-header .badge-firstdeal {
    font-size: 10px;
    font-weight: 800;
    background-color: #ffffff;
    color: #7048e8;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    border: 1px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* 하단 바디 영역 */
.rp-card-body {
    padding: 18px 20px 16px 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background-color: #ffffff;
    flex-grow: 1;
}

/* 아파트 이름 */
.rp-apt-name {
    font-size: 19px;
    font-weight: 700;
    color: #212529;
    line-height: 1.3;
    max-width: calc(100% - 40px); /* 캡쳐 버튼과의 겹침 방지 */
    white-space: normal;
    word-break: keep-all;
}

/* 주소 및 준공일 */
.rp-sub-text.location {
    font-size: 13px;
    color: #868e96;
    max-width: 100%;
    white-space: normal;
    word-break: keep-all;
}

/* 캡쳐 버튼 */
.btn-capture {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    background-color: #f1f3f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #495057;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.btn-capture:hover {
    background-color: #e9ecef;
    color: #212529;
    transform: scale(1.05);
}
.btn-capture svg {
    width: 16px;
    height: 16px;
}

/* 배경 차트 */
.rp-bg-chart {
    position: absolute;
    top: 22px;
    right: 20px;
    width: 42%;
    max-width: 190px;
    min-width: 120px;
    height: 104px;
    opacity: 0.35;
    z-index: 5;
    pointer-events: auto;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.rp-bg-chart:hover {
    opacity: 0.85;
    transform: scale(1.05);
}
.bg-chart-label {
    font-size: 8px;
    font-weight: 700;
    color: #868e96;
    text-align: right;
    margin-bottom: 2px;
    transition: color 0.2s ease;
    font-family: 'Noto Sans KR', sans-serif;
    pointer-events: none;
}
.rp-bg-chart:hover .bg-chart-label {
    color: #1a73e8;
}

/* 차트 내부 상세보기 CTA 버튼 */
.btn-chart-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 320px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    color: #1a73e8;
    background-color: #f1f3f5;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Noto Sans KR', sans-serif;
}
.btn-chart-cta:hover {
    background-color: #1a73e8;
    color: #ffffff;
    border-color: #1a73e8;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.2);
}
.rp-chart-svg path {
    fill: none;
    stroke: #adb5bd;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.rp-chart-svg.rise path {
    stroke: #ff8787;
}
.rp-chart-svg.fall path {
    stroke: #74c0fc;
}

/* 메타 정보 행 */
.info-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 4px 0;
    z-index: 1;
}
.info-meta-item {
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}
.info-meta-item.area {
    background-color: #fff9db;
    border-color: #ffe066;
    color: #f08c00;
}
.info-meta-item.trade-type {
    background-color: #f1f3f5;
    color: #495057;
}

/* 최고가, 최근전세 정보 */
.rp-detail-text {
    font-size: 13px;
    color: #868e96;
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
    z-index: 1;
}
.rp-detail-text b {
    color: #495057;
    font-weight: 700;
}
.rp-detail-text .divider {
    color: #dee2e6;
    font-size: 10px;
}
/* 해제(취소)된 거래 카드 표시 */
.rp-card-item.cancelled-card {
    opacity: 0.72;
    border: 1px solid #ffc9c9 !important;
}
.rp-card-item.cancelled-card .rp-card-header {
    background: repeating-linear-gradient(135deg, #f8f9fa, #f8f9fa 8px, #ffe3e3 8px, #ffe3e3 16px) !important;
    color: #495057 !important;
    border-bottom: 1px solid #ffc9c9;
}
.rp-card-item.cancelled-card .rp-price {
    text-decoration: line-through;
    text-decoration-color: #e03131;
    text-decoration-thickness: 2px;
}
.badge-cancelled {
    background-color: #e03131;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    height: 24px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid #ffffff;
    box-shadow: 0 2px 4px rgba(224, 49, 49, 0.35);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
}
.badge-relisted {
    background-color: #e7f5ff;
    color: #1971c2;
    font-size: 11px;
    font-weight: 700;
    height: 24px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid #a5d8ff;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
    cursor: help;
}
.badge-renew {
    display: inline-block;
    background-color: #ffe3e3;
    color: #c92a2a;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid #ffc9c9;
    vertical-align: middle;
    line-height: 1.2;
    white-space: nowrap;
}

/* [모바일 반응형] */
@media screen and (max-width: 768px) {
    .content-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 0;
    }
    .content-header-row div {
        width: 100%;
        display: flex;
        gap: 8px;
        align-items: center;
    }
    .content-header-row input#sSearch {
        flex-grow: 1;
        width: 0;
    }

    #listContainer {
        display: flex;
        flex-direction: column;
        align-items: stretch; /* 모바일에서 모든 카드가 가로로 꽉 차도록(동일 너비) stretch 설정 */
        gap: 16px;
    }

    .real-price-card-list {
        padding: 0 16px;
    }

    .rp-card-item {
        border-radius: 8px;
        min-height: 165px; /* 모바일 기본 카드 최소 높이 통일 (넘침 방지) */
    }
    
    .rp-card-header {
        padding: 10px 14px;
    }
    
    .rp-card-header .rp-price {
        font-size: 20px;
    }
    
    .rp-card-header .rp-floor {
        font-size: 13px;
    }
    
    .rp-card-body {
        padding: 16px 16px 12px 16px;
        gap: 6px;
    }
    
    .rp-apt-name {
        font-size: 18px;
        white-space: normal !important;
        word-break: keep-all;
        max-width: calc(100% - 36px) !important;
        line-height: 1.4;
    }
    
    .rp-sub-text.location {
        font-size: 13px;
        white-space: normal !important;
        word-break: keep-all;
        max-width: 100% !important;
    }
    
    .btn-capture {
        top: 16px;
        right: 16px;
        width: 30px;
        height: 30px;
    }
    
    .rp-bg-chart {
        width: 40%;
        max-width: 130px;
        min-width: 90px;
        height: 84px;
        right: 16px;
        top: 16px;
        bottom: auto;
    }
    
    .info-meta-row {
        gap: 6px;
    }
    
    .info-meta-item {
        font-size: 11px;
        padding: 2px 6px;
    }
    
    .rp-detail-text {
        font-size: 13px;
        flex-wrap: wrap;
        gap: 6px;
    }
}

/* 모바일 리스트 패딩 추가 */
@media screen and (max-width: 768px) {
    .real-price-card-list {
        padding: 0 16px;
    }
}


/* --- 7. 뉴스 페이지 스타일 (news.html) --- */
.news-header { text-align: center; margin-bottom: 24px; }
.news-page-title { font-size: 28px; font-weight: 800; color: #212529; margin: 0; }
.news-page-subtitle { font-size: 15px; color: #868e96; margin: 8px 0 0 0; }
.news-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 24px; }
.news-region-select { height: 42px; padding: 0 16px; border: 1px solid #ced4da; border-radius: 6px; font-size: 15px; font-weight: 600; width: 200px; background-color: #fff; }
.news-date-picker { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.news-date-picker input { height: 42px; border: 1px solid #ced4da; border-radius: 6px; padding: 0 12px; font-size: 15px; }
.news-search-btn { height: 42px; border: none; border-radius: 6px; background-color: #343a40; color: white; padding: 0 20px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 24px; }
.region-news-card { padding: 0; }
.region-news-card .region-title { font-size: 20px; font-weight: 700; color: #212529; padding: 20px 24px 16px; margin: 0; border-bottom: 2px solid #dee2e6; }
.news-list-scrollable { list-style: none; padding: 0 24px 16px; margin: 0; max-height: 340px; overflow-y: auto; }
.news-item { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 4px; border-bottom: 1px solid #f1f3f5; }
.news-title { font-size: 16px; color: #343a40; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-date { font-size: 14px; color: #868e96; flex-shrink: 0; }


/* --- 8. 학군 페이지 스타일 (school.html) --- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}
.filter-select {
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    background-color: #fff;
    cursor: pointer;
    min-width: 140px;
    flex-grow: 1;
}
.school-search-btn {
    height: 42px;
    background-color: #1a73e8;
    color: #fff;
    border: 1px solid #1a73e8;
    border-radius: 6px;
    padding: 0 20px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.school-search-btn:hover {
    background-color: #155cb4;
    border-color: #155cb4;
}

/* --- 학군 상세 모달 --- */
.school-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.school-modal-content {
    width: 90%;
    max-width: 700px;
    background-color: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    position: relative;
    animation: modalFadeIn 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 12px;
}
.modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #212529;
    margin: 0;
}
.modal-close-btn {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: 700;
    color: #adb5bd;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}
.modal-close-btn:hover {
    color: #495057;
}
.school-location-info {
    font-size: 14px;
    color: #868e96;
    font-weight: 500;
    margin-bottom: 16px;
}
.school-detail-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 13px !important;
    border-top: 1px solid #dee2e6 !important;
    border-bottom: 1px solid #dee2e6 !important;
    border-left: none !important;
    border-right: none !important;
}
.school-detail-table th {
    background-color: #fff !important;
    color: #495057 !important;
    font-weight: 700 !important;
    padding: 12px 6px !important;
    border-bottom: 2px solid #dee2e6 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    text-align: center !important;
    vertical-align: middle !important;
}
.school-detail-table td {
    padding: 12px 6px !important;
    border-bottom: 1px solid #f1f3f5 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    text-align: center !important;
    vertical-align: middle !important;
    color: #343a40 !important;
}
.school-detail-table tr:hover td {
    background-color: #f8f9fa !important;
}

/* 모바일 최적화 테이블 스타일 */
/* 모바일 최적화 테이블 스타일 */
.school-rank-table {
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 13px !important;
    border-top: 1px solid #dee2e6 !important;
    border-bottom: 1px solid #dee2e6 !important;
    border-left: none !important;
    border-right: none !important;
}
.school-rank-table thead {
    background-color: #fff !important;
}
.school-rank-table th {
    background-color: #fff !important;
    color: #495057 !important;
    font-weight: 700 !important;
    padding: 14px 12px !important;
    border-bottom: 2px solid #dee2e6 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    text-align: center !important;
    vertical-align: middle !important;
}
.school-rank-table td {
    padding: 16px 12px !important;
    border-bottom: 1px solid #f1f3f5 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    text-align: center !important;
    vertical-align: middle !important;
    color: #343a40 !important;
}
.school-rank-table tr:hover td {
    background-color: #f8f9fa !important;
}

/* 1위, 2위, 3위 랭킹 색상 커스텀 */
.school-rank-table td.rank-1 {
    color: #e03131 !important;
    font-weight: 800 !important;
    font-size: 16px !important;
}
.school-rank-table td.rank-2 {
    color: #f76707 !important;
    font-weight: 800 !important;
    font-size: 16px !important;
}
.school-rank-table td.rank-3 {
    color: #1c7ed6 !important;
    font-weight: 800 !important;
    font-size: 16px !important;
}
.school-rank-table td.rank-other {
    color: #868e96 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
}

/* 진학 상세 태그 배지 스타일 */
.school-tag {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    margin: 2px 3px !important;
    border: 1px solid transparent !important;
}
.tag-science {
    background-color: #fff5f5 !important;
    color: #e03131 !important;
    border-color: #ffc9c9 !important;
}
.tag-foreign {
    background-color: #e7f5ff !important;
    color: #1c7ed6 !important;
    border-color: #a5d8ff !important;
}
.tag-private {
    background-color: #ebfbee !important;
    color: #2b8a3e !important;
    border-color: #b2f2bb !important;
}
.tag-etc {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    border-color: #e9ecef !important;
}
.filter-select {
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    font-family: 'Noto Sans KR', sans-serif !important;
    font-size: 15px !important;
    background-color: #fff !important;
    cursor: pointer !important;
    min-width: 140px !important;
    flex-grow: 1 !important;
    transition: all 0.2s ease !important;
}
.filter-select:hover {
    border-color: #1c7ed6 !important;
    box-shadow: 0 0 0 3px rgba(28, 126, 214, 0.1) !important;
}

/* --- 9. 반응형 공통 --- */
@media screen and (max-width: 768px) {
    .filter-select { width: 100%; flex-basis: 100%; }
    .school-rank-table td { padding: 10px 4px; font-size: 12px; }
    .school-name { font-size: 13px; }
    /* 모바일에서 상세항목 숫자 정렬 유지 */
    .detail-item span { min-width: 26px; }
}

@media screen and (max-width: 768px) {
    .service-description { padding: 0 16px; }
    .quick-nav { padding: 0 16px; }
    .filter-controls { flex-direction: column; }
    .date-selector, .filter-controls button { width: 100%; }

    .filter-select { width: 100%; flex-basis: 100%; }

    /* 테이블 모바일 폰트 조정 */
    .school-rank-table td { padding: 10px 4px; font-size: 12px; }
    .school-name { font-size: 13px; }
}



@media screen and (max-width: 768px) {
    .service-description { padding: 0 16px; }
    .quick-nav { padding: 0 16px; }
    .filter-controls { flex-direction: column; }
    .date-selector, .filter-controls button { width: 100%; }

    /* 뉴스 */
    .news-filter-bar { flex-direction: column; align-items: stretch; }
    .news-region-select { width: 100%; }
    .news-date-picker { margin-left: 0; justify-content: space-between; }
    .news-date-picker input { flex-grow: 1; }
    .news-search-btn { justify-content: center; }


    /* 학군 */
    .filter-select { width: 100%; flex-basis: 100%; }
    .school-rank-table { font-size: 14px; }
    .school-rank-table td, .school-rank-table th { padding: 12px 8px; }
    .school-rank-table .school-name { font-size: 15px; }
}

/* 기존 테이블 스타일 유지 (필요 시) */
.responsive-table { width: 100%; border-collapse: collapse; }
.responsive-table thead { border-bottom: 1px solid #dee2e6; }
.responsive-table th { padding: 12px 16px; text-align: left; font-size: 13px; color: #6c757d; font-weight: 600; }
.responsive-table td { padding: 16px; border-bottom: 1px solid #f1f3f5; vertical-align: middle; }
.responsive-table tbody tr:hover { background-color: #f8f9fa; }


/* =========================================
   [추가] 통계 페이지 전용 스타일 (statistics.html)
   ========================================= */

/* 1. 통계 메뉴 그리드 (아이콘형 버튼) */
.stats-menu-grid {
    display: grid;
    /* 항목이 5개로 고정돼 있으니 화면 폭과 무관하게 항상 5열로 고정한다.
       (예전엔 auto-fill이라 폭에 따라 4/5열을 오갔고, 768px 이하에서만 4열을
       강제하는 규칙까지 겹쳐서 페이지마다/폭마다 줄바꿈이 들쭉날쭉해 보였다.) */
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 10px 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.stats-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    border-color: #ced4da;
    background-color: #f8f9fa;
}

/* 아이콘 박스 (원형 배경) — 경쟁사(아실)처럼 좀 더 작고 촘촘하게 */
.stats-icon-box {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 6px;
    color: #fff; /* 아이콘 자체는 흰색 */
}
.stats-icon-box svg { width: 17px; height: 17px; }

/* 색상별 스타일 */
.stats-icon-box.blue { background-color: #339af0; }   /* 하락 */
.stats-icon-box.rose { background-color: #ff3b30; }   /* 신고가·최고가 (신설) */
.stats-icon-box.red { background-color: #ff6b6b; }    /* 최고가 */
.stats-icon-box.green { background-color: #51cf66; }  /* 거래량 */
.stats-icon-box.purple { background-color: #845ef7; } /* 갭투자 */
.stats-icon-box.gray { background-color: #868e96; }   /* 인구 */
.stats-icon-box.yellow { background-color: #fcc419; } /* 학군 */
.stats-icon-box.orange { background-color: #ff922b; } /* 매물 */
.stats-icon-box.teal { background-color: #20c997; }   /* 분양 */

/* 메뉴 텍스트 */
.stats-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #495057;
    text-align: center;
    letter-spacing: -0.3px;
}

.stats-item.active {
    border-color: #1a73e8;
    background-color: #f8f9fa;
    box-shadow: 0 4px 8px rgba(26, 115, 232, 0.08);
}
.stats-item.active .stats-label {
    color: #1a73e8;
    font-weight: 700;
}


/* 2. 통계 테이블 (깔끔한 리스트형) */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.stats-table th {
    padding: 12px 0;
    border-bottom: 1px solid #dee2e6;
    font-size: 13px; color: #868e96; font-weight: 600;
    text-align: center;
}
.stats-table td {
    padding: 16px 0;
    border-bottom: 1px solid #f1f3f5;
    text-align: center;
    vertical-align: middle;
}
.stats-table tr:last-child td { border-bottom: none; }
.stats-table tr:hover { background-color: #f8f9fa; }

/* 테이블 내부 요소 */
.stats-table .rank { font-weight: 700; color: #868e96; font-size: 14px; }
.stats-table .rank.top { color: #d9480f; font-size: 16px; } /* 1~3위 강조 */

.stats-table .region {
    text-align: left;
    padding-left: 10px;
    font-weight: 600;
    color: #212529;
    font-size: 15px;
}
.stats-table .count {
    font-weight: 700;
    color: #495057;
    font-size: 14px;
}

/* 등락 화살표 */
.stats-table .trend { font-size: 10px; margin-left: 4px; }
.stats-table .trend.up { color: #d9480f; }
.stats-table .trend.down { color: #339af0; }


/* [모바일 반응형] */
@media screen and (max-width: 768px) {
    /* 모바일에서도 5열 유지 (항목이 5개 고정이라 화면 폭 따라 줄 수가 달라지면
       페이지마다 들쭉날쭉해 보임) — 대신 칸 자체를 더 촘촘하게 줄인다 */
    .stats-menu-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    .stats-item { padding: 8px 2px; border-radius: 8px; }
    .stats-icon-box { width: 28px; height: 28px; margin-bottom: 4px; }
    .stats-icon-box svg { width: 14px; height: 14px; }
    .stats-label { font-size: 9.5px; }
}

/* ────────────────────────────────────────────────────────────
   5년 실거래 트렌드 차트 상세 스타일
──────────────────────────────────────────────────────────── */
.rp-chart-detail-wrapper {
    margin-top: 16px;
    border-top: 1px dashed #dee2e6;
    padding-top: 16px;
    background-color: #f8f9fa;
    border-radius: 6px;
    padding-left: 10px;
    padding-right: 10px;
}
.rp-chart-container {
    width: 100%;
    min-height: 180px;
    position: relative;
}
.chart-loading, .chart-no-data, .chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    font-size: 13px;
    color: #868e96;
    font-weight: 600;
}
.chart-loading {
    color: #1a73e8;
}
.chart-error {
    color: #e03131;
}

/* ────────────────────────────────────────────────────────────
   지역 선택 아코디언 스타일 (모바일 스크롤 최적화)
──────────────────────────────────────────────────────────── */
.region-summary-bar {
    position: sticky;
    top: 60px; /* 헤더 높이만큼 띄워 sticky 고정하여 스크롤 시 상단 밀착 */
    z-index: 99;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(26, 115, 232, 0.16);
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.06);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    user-select: none;
    margin-bottom: 20px;
}
.region-summary-bar:hover {
    background-color: #ffffff;
    border-color: #1a73e8;
    box-shadow: 0 12px 28px rgba(26, 115, 232, 0.12);
    transform: translateY(-1px);
}
.region-summary-bar.active {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-color: rgba(26, 115, 232, 0.3);
    border-bottom: 1px solid #f1f3f5;
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.02);
    margin-bottom: 0;
}
.region-summary-bar.active:hover {
    border-color: rgba(26, 115, 232, 0.3);
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.02);
    transform: none;
}
#regionSelector {
    display: none;
    background: #ffffff;
    border: 1px solid rgba(26, 115, 232, 0.3);
    border-top: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 20px 20px 4px 20px;
    margin-bottom: 20px;
    box-shadow: 0 12px 28px rgba(26, 115, 232, 0.04);
}
.summary-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: #343a40;
}
.summary-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: rgba(26, 115, 232, 0.1);
    border-radius: 50%;
    font-size: 13px;
    color: #1a73e8;
}
.summary-label {
    font-weight: 500;
    color: #868e96;
    font-size: 13px;
}
.summary-value {
    font-weight: 800;
    color: #1a73e8;
    letter-spacing: -0.3px;
}
.btn-toggle-region {
    background: rgba(241, 243, 245, 0.8);
    border: none;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 12px;
    font-weight: 800;
    color: #495057;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.2s ease;
}
.region-summary-bar:hover .btn-toggle-region {
    background-color: #1a73e8;
    color: #ffffff;
}
.btn-back-sido {
    background: none;
    border: none;
    color: #1a73e8;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}
.btn-back-sido:hover {
    background-color: #e9ecef;
}

/* =========================================
   7. 부동산 뉴스 페이지 전용 스타일
   ========================================= */
.news-header {
    text-align: center;
    margin-bottom: 24px;
    padding: 0 16px;
}

.news-page-title {
    font-weight: 800;
    color: #212529;
    font-size: 22px;
    margin: 0 0 8px 0;
}

.news-page-subtitle {
    font-size: 14px;
    color: #868e96;
    margin: 0;
}

.news-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.news-region-select {
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 15px;
    background-color: #fff;
    min-width: 150px;
    cursor: pointer;
}

.news-date-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-date-picker input[type="date"] {
    height: 42px;
    padding: 0 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
}

.news-date-picker span {
    color: #868e96;
    font-weight: 600;
}

.news-search-btn {
    height: 42px;
    background-color: #1a73e8;
    color: #fff;
    border: 1px solid #1a73e8;
    border-radius: 6px;
    padding: 0 20px;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.news-search-btn:hover {
    background-color: #155cb4;
    border-color: #155cb4;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.region-news-card {
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e9ecef;
    padding: 20px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    height: 380px; /* 고정 높이로 스크롤 영역 통일 */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.region-news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.region-title {
    font-size: 16px;
    font-weight: 800;
    color: #212529;
    margin: 0 0 16px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #1a73e8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.region-title::before {
    display: none !important;
    content: none !important;
}

.news-list-scrollable {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden; /* 가로 스크롤 영구 제거 */
    flex-grow: 1;
    padding-right: 4px;
}

/* 개별 스크롤바 디자인 */
.news-list-scrollable::-webkit-scrollbar {
    width: 4px;
}
.news-list-scrollable::-webkit-scrollbar-track {
    background: transparent;
}
.news-list-scrollable::-webkit-scrollbar-thumb {
    background: #e9ecef;
    border-radius: 2px;
}
.news-list-scrollable::-webkit-scrollbar-thumb:hover {
    background: #ced4da;
}

.news-item {
    padding: 12px 4px;
    border-bottom: 1px solid #f1f3f5;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* 상단 정렬 */
    gap: 12px;
    transition: background-color 0.2s ease;
}

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

.news-item:hover {
    background-color: #f8f9fa;
    border-radius: 4px;
}

.news-item a.news-title {
    font-size: 14px;
    font-weight: 500;
    color: #343a40;
    text-decoration: none;
    line-height: 1.45;
    white-space: normal; /* 줄바꿈 허용 */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 최대 2줄 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    min-width: 0;
    transition: color 0.2s ease;
}

.news-item:hover a.news-title {
    color: #1a73e8;
}

.news-date {
    font-size: 11px;
    color: #adb5bd;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 3px; /* 첫 줄 텍스트와 라인 맞추기 */
}

/* 모바일 뷰 튜닝 */
@media screen and (max-width: 768px) {
    .news-filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .news-region-select, 
    .news-date-picker input[type="date"],
    .news-search-btn {
        width: 100%;
        height: 40px;
    }
    .news-date-picker {
        justify-content: space-between;
    }
    .news-date-picker input[type="date"] {
        flex-grow: 1;
    }
    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .region-news-card {
        height: 340px;
    }
}

/* ──────────────── 학군 비교 분석 차트 스타일 ──────────────── */
.chart-card {
    background-color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #e9ecef !important;
}

.chart-add-controls select {
    background-color: #fff !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    color: #495057 !important;
    outline: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.chart-add-controls select:hover,
.chart-add-controls select:focus {
    border-color: #1a73e8 !important;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1) !important;
}

.chart-add-controls button:hover {
    background-color: #155cb4 !important;
    transform: translateY(-1px) !important;
}

/* 차트 비교 칩스 배지 */
.chart-toggle-pill {
    display: inline-flex !important;
    align-items: center !important;
    padding: 6px 14px !important;
    border-radius: 20px !important;
    font-size: 13px !important;
    border: 1px solid #dee2e6 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
    background-color: #fff !important;
}

.chart-toggle-pill.inactive {
    background-color: #f8f9fa !important;
    color: #495057 !important;
    border-color: #e9ecef !important;
}

.chart-toggle-pill:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06) !important;
}

.chart-toggle-pill.inactive:hover {
    background-color: #e9ecef !important;
    border-color: #ced4da !important;
}

.chart-toggle-pill .remove-btn {
    transition: color 0.15s ease, opacity 0.15s ease !important;
}

.chart-toggle-pill .remove-btn:hover {
    opacity: 1 !important;
    color: #fa5252 !important;
}

/* 반응형 튜닝 */
@media screen and (max-width: 768px) {
    .chart-header-row {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .chart-add-controls {
        width: 100% !important;
        margin-top: 8px !important;
    }
    .chart-add-controls select,
    .chart-add-controls button {
        flex-grow: 1 !important;
        width: 100% !important;
    }
}

/* ──────────────── 진학 상세 누적 막대 그래프 스타일 ──────────────── */
.stacked-bar-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 2px 0;
}

.stacked-bar {
    height: 28px;
    display: flex;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f1f3f5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.06);
}

.stacked-bar:hover {
    transform: scaleY(1.1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.bar-segment {
    height: 100%;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
    text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

.seg-science {
    background-color: #fa5252 !important; /* 과학고 - Red */
}

.seg-foreign {
    background-color: #228be6 !important; /* 외고/국제고 - Blue */
}

.seg-private {
    background-color: #40c057 !important; /* 자사고 - Green */
}

.seg-etc {
    background-color: #868e96 !important; /* 기타영재고 - Gray */
}

.bar-labels {
    display: flex;
    gap: 8px;
    font-size: 11px;
    color: #868e96;
}

.bar-labels span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* ──────────────── 학군 카드형 랭킹 리스트 스타일 ──────────────── */
.school-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.school-card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 18px 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.school-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #1a73e8;
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.card-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.rank-badge.badge-1 {
    background: linear-gradient(135deg, #ff6b6b, #fa5252);
    color: #ffffff;
}

.rank-badge.badge-2 {
    background: linear-gradient(135deg, #fcc419, #fab005);
    color: #ffffff;
}

.rank-badge.badge-3 {
    background: linear-gradient(135deg, #4dabf7, #228be6);
    color: #ffffff;
}

.rank-badge.badge-other {
    background-color: #e9ecef;
    color: #495057;
}

.school-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.school-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #212529;
}

.school-addr {
    margin: 0;
    font-size: 12px;
    color: #868e96;
}

.card-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.rate-value {
    font-size: 18px;
    font-weight: 800;
    color: #e8590c;
}

.rate-counts {
    font-size: 11px;
    color: #868e96;
}

.card-body-row {
    width: 100%;
}

/* ---------------- 모바일 풀 사이즈 (Edge-to-Edge) 오버라이드 ---------------- */
@media screen and (max-width: 768px) {
    .service-description {
        padding: 20px 10px 8px 10px !important;
    }
    .quick-nav {
        padding: 12px 10px !important;
        margin-bottom: 20px !important;
    }
    /* 지역 선택 바 및 지역 선택기 플랫화 */
    .region-summary-bar {
        padding: 12px 10px !important;
    }
    .region-summary-bar.active {
        border-left: none !important;
        border-right: none !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }
    #regionSelector {
        border-left: none !important;
        border-right: none !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        padding: 16px 10px 4px 10px !important;
    }
    /* 실거래 목록 컨테이너: 카드가 또다른 카드 안에 갇혀 보이지 않도록 배경/패딩 제거, 개별 카드만 카드로 보이게 */
    .real-price-card-list {
        background-color: transparent !important;
        padding: 0 !important;
        border-bottom: none !important;
        margin-bottom: 12px !important;
    }
    .rp-card-item {
        border-radius: 8px !important;
        border: 1px solid #e9ecef !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* 지역 선택 모달용 헤더 숨김 (데스크톱 기본) */
#regionSelector .modal-header {
    display: none;
}

/* ────────────────────────────────────────────────────────────
   커스텀 날짜 셀렉터 드롭다운 디자인 (돈보 블루 테마 및 모바일 바텀시트)
──────────────────────────────────────────────────────────── */
.custom-dropdown-container {
    position: relative;
    display: inline-block;
}

/* 기존 .filter-controls button 스타일 누수 차단을 위한 고선명 override */
.custom-dropdown-container button.custom-date-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 40px !important;
    padding: 0 14px !important;
    border-radius: 8px !important;
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #495057 !important;
    cursor: pointer !important;
    width: 100% !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
    box-sizing: border-box !important;
}

.custom-dropdown-container button.custom-date-btn:hover {
    background-color: #e9ecef !important;
    border-color: #ced4da !important;
}

.custom-dropdown-container button.custom-date-btn.active {
    background-color: #e9ecef !important;
    border-color: #1a73e8 !important; /* 돈보 블루 테마 */
}

.custom-dropdown-container button.custom-date-btn svg {
    transition: transform 0.2s ease !important;
}

.custom-dropdown-container button.custom-date-btn.active svg {
    transform: rotate(180deg) !important;
}

/* 모바일용 백드롭 */
.custom-dropdown-backdrop {
    display: none;
}

.custom-date-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 220px;
    max-height: 280px;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 6px;
    display: none;
    flex-direction: column;
}

.custom-date-dropdown .modal-header {
    display: none;
}

.options-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    max-height: 260px;
}

/* 스크롤바 커스텀 */
.options-wrapper::-webkit-scrollbar {
    width: 6px;
}
.options-wrapper::-webkit-scrollbar-track {
    background: transparent;
}
.options-wrapper::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 4px;
}
.options-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ced4da;
}

.custom-date-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-date-option:hover {
    background-color: #f1f3f5;
    color: #212529;
    transform: translateX(2px);
}

.custom-date-option.selected {
    background: linear-gradient(135deg, #1a73e8, #1557b0); /* 돈보 블루 테마 적용 */
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.25);
    transform: none;
}

.custom-date-option .option-count {
    font-size: 11px;
    font-weight: 700;
    background: #f1f3f5;
    padding: 3px 9px;
    border-radius: 20px;
    color: #868e96;
}

.custom-date-option.selected .option-count {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
}

/* 모바일 768px 이하 바텀시트 리팩토링 */
@media screen and (max-width: 768px) {
    .custom-dropdown-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.55);
        z-index: 10000;
        display: none;
        backdrop-filter: blur(1.5px);
        -webkit-backdrop-filter: blur(1.5px);
    }
    
    .custom-date-dropdown {
        position: fixed;
        bottom: 0;
        left: 0;
        top: auto;
        width: 100%;
        max-width: 100%;
        max-height: 80vh;
        background-color: #ffffff;
        border: none;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
        z-index: 10001;
        padding: 20px 16px 34px 16px;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
        display: flex;
        flex-direction: column;
    }
    
    .custom-date-dropdown.open {
        transform: translateY(0);
        display: flex !important;
    }
    
    /* 모바일 모달 헤더 및 정렬 정규화 */
    .custom-date-dropdown .modal-header {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-bottom: 16px !important;
        border-bottom: none !important;
        padding-bottom: 0 !important;
        position: relative !important;
        width: 100% !important;
    }
    
    .custom-date-dropdown .modal-header h3 {
        margin: 0 !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        color: #212529 !important;
        text-align: center !important;
        white-space: nowrap !important; /* 모바일 한줄 유지 */
    }
    
    /* 모바일 닫기 버튼 스타일 누수 완전 차단 */
    .custom-dropdown-container button.modal-close-btn {
        position: absolute !important;
        right: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 32px !important;
        height: 32px !important;
        background: none !important;
        border: none !important;
        padding: 0 !important;
        cursor: pointer !important;
        color: #495057 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        transition: background-color 0.2s ease !important;
        margin: 0 !important;
        box-shadow: none !important;
    }
    
    .custom-dropdown-container button.modal-close-btn:hover {
        background-color: #f1f3f5 !important;
    }
    
    .options-wrapper {
        max-height: 50vh;
        gap: 6px;
    }
    
    .custom-date-option {
        padding: 12px 16px;
        font-size: 14.5px;
        background-color: #f8f9fa; /* 모바일 리스트 가시성 극대화 */
    }
    
    /* 모바일 지역 선택 바텀시트 변환 */
    #regionSelector {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 85vh !important;
        background-color: #ffffff !important;
        border: none !important;
        border-top-left-radius: 20px !important;
        border-top-right-radius: 20px !important;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15) !important;
        z-index: 10001 !important;
        padding: 20px 16px 34px 16px !important;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
        display: none; /* JS에서 block/flex 토글 */
        flex-direction: column;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    
    #regionSelector.open {
        transform: translateY(0) !important;
        display: flex !important;
    }
    
    #regionSelector .modal-header {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-bottom: 16px !important;
        border-bottom: none !important;
        padding-bottom: 0 !important;
        position: relative !important;
        width: 100% !important;
        flex-shrink: 0 !important;
    }
    
    #regionSelector .modal-header h3 {
        margin: 0 !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        color: #212529 !important;
        text-align: center !important;
        white-space: nowrap !important;
    }
    
    /* 모바일 지역선택 닫기 버튼 절대 배치 */
    #regionSelector button.modal-close-btn {
        position: absolute !important;
        right: 0 !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 32px !important;
        height: 32px !important;
        background: none !important;
        border: none !important;
        padding: 0 !important;
        cursor: pointer !important;
        color: #495057 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        transition: background-color 0.2s ease !important;
        margin: 0 !important;
        box-shadow: none !important;
    }
    
    #regionSelector button.modal-close-btn:hover {
        background-color: #f1f3f5 !important;
    }
    
    .region-selector-inner {
        overflow-y: auto !important;
        max-height: 60vh !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }
}

/* date-summary-bar styling */
.date-summary-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(26, 115, 232, 0.16);
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.06);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    user-select: none;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    text-align: left;
}
.date-summary-bar:hover {
    border-color: rgba(26, 115, 232, 0.3);
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.1);
    transform: translateY(-1px);
}
.date-summary-bar:active {
    transform: scale(0.995);
}
.date-summary-bar.active .arrow {
    transform: rotate(180deg);
}
.date-summary-bar .arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}
@media screen and (max-width: 768px) {
    .date-summary-bar {
        padding: 12px 10px !important;
    }
}

/* Specific override to prevent date-summary-bar from becoming black */
.date-filter button.date-summary-bar,
button.date-summary-bar {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 18px !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(26, 115, 232, 0.16) !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.06) !important;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    user-select: none;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    text-align: left !important;
    color: inherit !important;
}

.date-filter button.date-summary-bar:hover,
button.date-summary-bar:hover {
    background: rgba(255, 255, 255, 1) !important;
    border-color: rgba(26, 115, 232, 0.3) !important;
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.1) !important;
    transform: translateY(-1px) !important;
}

.date-filter button.date-summary-bar:active,
button.date-summary-bar:active {
    transform: scale(0.995) !important;
}

.date-filter button.date-summary-bar.active .arrow,
button.date-summary-bar.active .arrow {
    transform: rotate(180deg) !important;
}

/* ==========================================================================
   더보기 버튼 및 광고 영역 프리미엄 스타일
   ========================================================================== */
.btn-list-more {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 480px;
    height: 50px;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background-color: #ffffff;
    color: #495057;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-sizing: border-box;
    font-family: inherit;
    margin: 0 auto;
}

.btn-list-more:hover {
    border-color: #1a73e8;
    color: #1a73e8;
    background-color: #f8faff;
    transform: translateY(-1.5px);
    box-shadow: 0 6px 16px rgba(26, 115, 232, 0.08);
}

.btn-list-more:active {
    transform: scale(0.985);
}

.btn-list-more:disabled {
    background-color: #f1f3f5;
    border-color: #e9ecef;
    color: #adb5bd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ad-placeholder {
    transition: all 0.3s ease;
}
.ad-placeholder:hover {
    border-color: #1a73e8 !important;
    background-color: #f1f3f5 !important;
}

/* 목록형 뷰 액티브 상태 */
#listContainer.list-view-active {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background-color: #ffffff;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.rp-list-row {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    cursor: pointer !important;
    background-color: #ffffff !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 0 !important;
    height: auto !important;
    border: none !important;
    border-bottom: 1px solid #f1f3f5 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    margin: 0 !important;
    transition: background-color 0.2s ease !important;
}

.rp-list-row:hover {
    transform: none !important;
    box-shadow: none !important;
    background-color: #f8f9fa !important; /* 깔끔한 라이트 그레이 호버 */
}

.rp-list-row:last-child {
    border-bottom: none !important;
}



.list-badge-item {
    display: inline-block;
    padding: 3px 7px;
    background-color: #f1f3f5;
    color: #495057;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}


/* ==========================================================================
   통합 지역 및 날짜 선택 필터 스타일 (Side-by-Side)
   ========================================================================== */
.filters-row-container {
    margin-bottom: 16px !important;
    position: relative;
    width: 100%;
}
.filters-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}
@media screen and (min-width: 769px) {
    .filters-row {
        flex-wrap: nowrap !important;
    }
    .filters-row .region-summary-bar {
        flex: 1 1 auto !important;
    }
    .filters-row .custom-dropdown-container {
        flex: 0 0 auto !important;
    }
}

/* Region summary bar override */
.region-summary-bar {
    position: static !important;
    flex: 1 !important;
    height: 42px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 11px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-sizing: border-box !important;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    cursor: pointer !important;
}
.region-summary-bar:hover {
    border-color: #1a73e8 !important;
    box-shadow: 0 4px 10px rgba(26, 115, 232, 0.1) !important;
    transform: translateY(-1px) !important;
}
.region-summary-bar.active {
    border-radius: 11px !important;
    border-color: rgba(26, 115, 232, 0.3) !important;
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.05) !important;
    margin-bottom: 0 !important;
}
.region-summary-bar .summary-text {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    color: #495057 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
}
.region-summary-bar #selectedRegionText {
    color: #1a73e8 !important;
    font-weight: 700 !important;
}
.region-summary-bar .arrow,
.region-summary-bar .btn-toggle-region {
    display: none !important;
}
.region-summary-bar::after {
    content: '▼';
    font-size: 8px;
    color: #868e96;
    margin-left: auto;
}

/* Date summary bar override */
.custom-dropdown-container {
    flex: 1 !important;
}
.custom-date-btn {
    width: 100% !important;
    height: 40px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    background: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-sizing: border-box !important;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #495057 !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
}
.custom-date-btn span {
    white-space: nowrap !important;
    word-break: keep-all !important;
}
.custom-date-btn:hover {
    border-color: #1a73e8 !important;
    box-shadow: 0 4px 10px rgba(26, 115, 232, 0.1) !important;
    transform: translateY(-1px) !important;
}
.custom-date-btn.active {
    border-radius: 11px !important;
    border-color: rgba(26, 115, 232, 0.3) !important;
}


/* Modal Region Selector Dropdown positioning on PC */
@media screen and (min-width: 769px) {
    #regionSelector {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) scale(0.95) !important;
        width: 90% !important;
        max-width: 760px !important;
        max-height: 80vh !important;
        z-index: 10001 !important;
        background: #ffffff !important;
        border: 1px solid #dee2e6 !important;
        border-radius: 22px !important;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16) !important;
        box-sizing: border-box !important;
        padding: 30px !important;
        display: none;
        flex-direction: column !important;
        transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease !important;
        opacity: 0;
    }
    #regionSelector.open {
        transform: translate(-50%, -50%) scale(1) !important;
        opacity: 1 !important;
        display: flex !important;
    }
    #regionSelector .modal-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 20px !important;
        border-bottom: 1px solid #f1f3f5 !important;
        padding-bottom: 12px !important;
    }
    #regionSelector .modal-header h3 {
        margin: 0 !important;
        font-size: 22px !important;
        font-weight: 800 !important;
        color: #212529 !important;
    }
    #regionSelector .modal-header button.modal-close-btn {
        background: none !important;
        border: none !important;
        padding: 0 !important;
        cursor: pointer !important;
        color: #868e96 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        transition: background-color 0.2s ease !important;
    }
    #regionSelector .modal-header button.modal-close-btn:hover {
        background-color: #f1f3f5 !important;
        color: #212529 !important;
    }
    #regionSelector .region-selector-inner {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        max-height: 55vh !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
        min-width: 0 !important;
    }

    /* 날짜 선택 드롭다운도 PC에서 지역 선택과 동일한 중앙 모달 스타일 적용 */
    .custom-date-dropdown {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) scale(0.95) !important;
        width: 90% !important;
        max-width: 420px !important;
        max-height: 70vh !important;
        z-index: 10001 !important;
        background: #ffffff !important;
        border: 1px solid #dee2e6 !important;
        border-radius: 22px !important;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.16) !important;
        box-sizing: border-box !important;
        padding: 26px !important;
        display: none;
        flex-direction: column !important;
        transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease !important;
        opacity: 0;
    }
    .custom-date-dropdown.open {
        transform: translate(-50%, -50%) scale(1) !important;
        opacity: 1 !important;
        display: flex !important;
    }
    .custom-date-dropdown .modal-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: 16px !important;
        border-bottom: 1px solid #f1f3f5 !important;
        padding-bottom: 12px !important;
    }
    .custom-date-dropdown .modal-header h3 {
        margin: 0 !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        color: #212529 !important;
    }
    .custom-date-dropdown .options-wrapper {
        max-height: 50vh !important;
    }
}

/* Backdrop Blur styling globally */
.custom-dropdown-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 10000 !important;
    display: none;
}

/* 🎛️ Unified Standard Segmented Control Design System */
.segmented-control,
.toggle-segment,
.view-toggle-group,
.type-toggle-group,
.type-toggle-3,
.type-toggle-4 {
    display: inline-flex !important;
    background: #f1f5f9 !important;
    padding: 4px !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    gap: 3px !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

.segmented-control .toggle-btn,
.segmented-control button,
.toggle-segment .toggle-btn,
.view-toggle-group .toggle-btn,
.view-toggle-group button,
.type-toggle-group button,
.type-toggle-3 .toggle-btn,
.type-toggle-4 .toggle-btn {
    flex: 1 !important;
    padding: 7px 14px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
    outline: none !important;
    box-shadow: none !important;
}

.segmented-control .toggle-btn:hover:not(.active),
.segmented-control button:hover:not(.active),
.toggle-segment .toggle-btn:hover:not(.active),
.view-toggle-group .toggle-btn:hover:not(.active),
.view-toggle-group button:hover:not(.active),
.type-toggle-group button:hover:not(.active),
.type-toggle-3 .toggle-btn:hover:not(.active),
.type-toggle-4 .toggle-btn:hover:not(.active) {
    color: #0f172a !important;
}

.segmented-control .toggle-btn.active,
.segmented-control button.active,
.toggle-segment .toggle-btn.active,
.view-toggle-group .toggle-btn.active,
.view-toggle-group button.active,
.type-toggle-group button.active,
.type-toggle-3 .toggle-btn.active,
.type-toggle-4 .toggle-btn.active {
    background: #ffffff !important;
    color: #2563eb !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
}

/* 🚀 필터바 모바일 반응형 2-Item 레이아웃 원복 */
@media screen and (max-width: 768px) {
    .filters-row {
        display: flex !important;
        flex-direction: row !important;
        gap: 8px !important;
        align-items: center !important;
        width: 100% !important;
    }
    .region-summary-bar {
        flex: 1 1 50% !important;
        min-width: 0 !important;
    }
    .custom-dropdown-container {
        flex: 1 1 50% !important;
        width: auto !important;
    }
}

/* ────────────────────────────────────────────────────────────
   ✨ 돈보 전역 공통 프리미엄 [더보기] 버튼 통일 디자인 System
──────────────────────────────────────────────────────────── */
.btn-load-more, .load-more-btn, .btn-panel-more {
    /* display는 !important를 주지 않는다 — JS가 데이터를 다 불러온 뒤
       style.display='none'으로 숨기는데, 여기서 !important를 걸면 그 인라인
       스타일을 이길 수 없어서 버튼이 절대 안 숨겨지는 버그가 난다. */
    display: inline-flex;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 12px 32px !important;
    background: #ffffff !important;
    color: #1e293b !important;
    border: 1.5px solid #cbd5e1 !important;
    border-radius: 30px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    font-family: inherit !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin: 0 auto !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    line-height: 1.4 !important;
}
.btn-load-more:hover, .load-more-btn:hover, .btn-panel-more:hover {
    background: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25) !important;
    transform: translateY(-2px) !important;
}
.btn-load-more:active, .load-more-btn:active, .btn-panel-more:active {
    transform: translateY(0) !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2) !important;
}
.btn-load-more:disabled, .load-more-btn:disabled, .btn-panel-more:disabled {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
    border-color: #e2e8f0 !important;
    transform: none !important;
    box-shadow: none !important;
}


