/* css/style.css */
:root {
    /* Color Palette (Modern, Rich Aesthetics) */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-main: #ffffff;
    --bg-muted: #f1f5f9;
    --border-color: #e2e8f0;
    --danger-color: #ef4444;
    --success-color: #22c55e;
    
    /* Layout */
    --max-width: 1200px;
    --header-height: 70px;
    
    /* Shadows & Radii */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* 지도 페이지 푸터 높이 추정치 */
    --map-footer-height: 85px;

    /* Transition */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SUITE', 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-top: var(--header-height);
    padding-bottom: 60px; /* 푸터 고정 스타일로 인한 바닥 여백 확보 */
}

/* 지도 페이지 및 메인 페이지는 바닥 여백 및 스크롤 제외 */
body.map-page,
body.home-page {
    padding-bottom: 0;
    overflow: hidden;
    height: 100dvh;
    position: relative; /* 자식 fixed 요소의 안정성을 위해 추가 */
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

/* Layout Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Landing Page Hero */
.landing-main {
    height: calc(100dvh - var(--header-height));
    overflow: hidden;
}

.hero-section {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/bg.webp') no-repeat bottom center/cover;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    z-index: 1; /* 푸터보다 낮게 설정 */
}

.hero-content {
    max-width: 800px;
    animation: fadeInUp 0.8s ease-out forwards;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-symbol {
    margin-top: auto;
    padding-top: 2rem;
    padding-bottom: 80px; /* 푸터에 가리지 않도록 하단 여백 추가 */
    animation: fadeInUp 1s ease-out 0.3s both;
}

.symbol-img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    opacity: 0.8;
    transition: var(--transition);
    filter: brightness(0) invert(1);
}

.symbol-img:hover {
    opacity: 1;
    transform: translateY(-5px);
}

.hero-title {
    font-size: clamp(1.5rem, 5vw, 3rem);
    color: white;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    padding: 0 0px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    padding: 0 0px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.hero-actions .btn-outline {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    backdrop-filter: blur(4px);
}

.hero-actions .btn-outline:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--primary-color);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* css/pages/search.css */
/* 지도 검색 화면 전용 스타일 */

/* ────────────────────────────────────────
   페이지 레이아웃: 헤더 제외 전체 뷰포트
──────────────────────────────────────── */

/* 지도 페이지는 body 스크롤을 막아야 함 */
body.map-page {
    overflow: hidden;
}

/* 지도 페이지 푸터 플로팅 스타일 - components.css에서 공통으로 처리됨 */
body.map-page #footer-container {
    z-index: 400;
}

/* 지도 페이지 하단 컨트롤과 푸터 겹침 방지 */
body.map-page .map-controls {
    bottom: calc(var(--map-footer-height) + 10px); /* 푸터 높이 + 여백 */
}

#map-container {
    position: relative;
    width: 100%;
    height: calc(100vh - var(--header-height));
    top: 0;
    left: 0;
}

/* ────────────────────────────────────────
   검색바 오버레이 (지도 위)
──────────────────────────────────────── */
.search-bar-wrapper {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    width: min(520px, calc(100% - 32px));
    display: flex;
    flex-direction: column;
    gap: 0;
}

.search-input-row {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
    /* overflow: hidden; */ /* 제거: 사파리에서 버튼 우측이 잘리는 현상 방지 */
    border: 2px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    /* isolation: isolate; */ /* 제거: overflow: hidden 제거 시 불필요 */
}

.search-input-row:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.18);
}

.search-input-icon {
    padding: 0 12px 0 16px;
    color: var(--text-muted);
    font-size: 1.1rem;
    flex-shrink: 0;
}

#search-input {
    flex: 1;
    min-width: 0; /* 추가: 모바일에서 버튼이 밀리지 않도록 입력창 축소 허용 */
    border: none;
    outline: none;
    padding: 14px 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    background: transparent;
}

#search-input::placeholder {
    color: var(--text-muted);
}

#btn-search-clear {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 10px;
    color: var(--text-muted);
    font-size: 1.1rem;
    display: none;
    transition: color 0.15s;
}

#btn-search-clear:hover {
    color: var(--text-main);
}

#btn-search-clear.visible {
    display: flex;
    align-items: center;
}

#btn-search-submit {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    padding: 0 20px;
    min-width: 80px; /* 추가: 버튼의 크기를 고정하여 텍스트 가독성 확보 */
    height: 52px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600; /* 추가: 버튼 텍스트 시인성 강화 */
    transition: background 0.2s;
    flex-shrink: 0; /* 버튼이 절대 줄어들지 않도록 고정 */
    -webkit-font-smoothing: antialiased;
    /* 버튼 자체에 우측 라운드 적용 (부모의 overflow 없이도 형태 유지) */
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

#btn-search-submit:hover {
    background: var(--primary-hover);
}

/* 자동완성 드롭다운 */
#search-autocomplete {
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    margin-top: 6px;
    overflow: hidden;
    display: none;
}

#search-autocomplete.open {
    display: block;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    transition: background 0.12s;
}

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

.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--bg-muted);
}

.autocomplete-item i {
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

.autocomplete-item-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.autocomplete-item-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ────────────────────────────────────────
   지도 컨트롤 버튼들 (우측 하단 영역)
──────────────────────────────────────── */
.map-controls {
    position: absolute;
    bottom: 32px;
    right: 16px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-wait-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(2px);
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.map-wait-overlay.active {
    opacity: 1;
    visibility: visible;
}

.map-wait-card {
    min-width: 160px;
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.24);
    text-align: center;
}

.map-wait-illustration {
    width: 70px;
    height: 70px;
    margin: 0 auto 8px;
    border-radius: 999px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(14, 165, 233, 0.15));
}

.map-wait-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    border: 2px solid rgba(37, 99, 235, 0.28);
    animation: mapWaitPulse 1.2s ease-out infinite;
}

.map-wait-illustration i {
    font-size: 1.9rem;
    color: var(--primary-color);
    animation: mapWaitFloat 0.9s ease-in-out infinite alternate;
}

.map-wait-card p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-main);
}

@keyframes mapWaitPulse {
    0% {
        transform: scale(0.75);
        opacity: 0.9;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

@keyframes mapWaitFloat {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-5px);
    }
}

.map-ctrl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-main);
    transition: var(--transition);
    white-space: nowrap;
}

.map-ctrl-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.map-ctrl-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.map-ctrl-btn i {
    font-size: 1rem;
}

/* ────────────────────────────────────────
   좌측 슬라이딩 패널
──────────────────────────────────────── */
#map-panel {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 390px;
    height: calc(100vh - var(--header-height) - var(--map-footer-height));
    background: #ffffff;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 500; /* 푸터(400)보다 위에 오도록 조정 */
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#map-panel.open {
    transform: translateX(0);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    position: relative;
}

.panel-header-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    position: absolute;
    top: 16px;
    right: 20px;
    bottom: 12px;
    min-width: max-content;
}

.panel-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title i {
    color: var(--primary-color);
}

.panel-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    transition: color 0.15s;
    padding: 4px;
    border-radius: 6px;
}

.panel-close-btn:hover {
    color: var(--text-main);
    background: var(--bg-muted);
}

.panel-body {
    flex: 1;
    overflow: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.panel-body::-webkit-scrollbar {
    width: 4px;
}

.panel-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* 탭 콘텐츠 스크롤 영역 */
.panel-tab-scroll-area {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-bottom: 20px; /* 기존 */
}

@media (max-width: 768px) {
    .panel-tab-scroll-area {
        padding-bottom: 200px; /* 패널 내부 하단 고정 버튼(약 180px)에 가려지는 것 방지 */
    }
}

.panel-tab-scroll-area::-webkit-scrollbar {
    width: 4px;
}

.panel-tab-scroll-area::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* 패널 하단 고정 푸터 */
.panel-footer {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    flex-shrink: 0;
}

.panel-footer-btn {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    width: auto;
    flex: 1;
    white-space: nowrap;
}

.panel-footer-btn:hover {
    background: var(--bg-muted);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.panel-footer-btn i {
    font-size: 1rem;
    flex-shrink: 0;
}

/* 패널 주소 섹션 */
.panel-address-section {
    width: 100%;
    min-width: 0;
}

.panel-address-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.08);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    margin-bottom: 6px;
}

.panel-address-main {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: anywhere;
}

.panel-address-content-row {
    display: flex;
    align-items: flex-start;
}

.panel-address-content-main {
    min-width: 0;
    flex: 1;
}

.panel-address-metrics {
    flex-shrink: 0;
    text-align: right;
    padding-top: 4px;
}

.panel-address-metrics-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.panel-address-metrics-label {
    margin-top: 4px;
    font-size: 0.56rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.panel-ai-response {
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    color: var(--text-main);
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: normal;
}

.panel-ai-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.panel-ai-credit-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    width: 100%;
}

.panel-ai-credit-help {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: #ffffff;
    color: var(--text-muted);
    cursor: help;
    padding: 0;
}

.panel-ai-credit-help i {
    font-size: 0.78rem;
    line-height: 1;
}

.panel-ai-credit-help-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    width: min(260px, calc(100% - 8px));
    max-width: calc(100% - 8px);
    background: #111827;
    color: #ffffff;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.74rem;
    line-height: 1.45;
    text-align: left;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-2px);
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
    pointer-events: none;
    z-index: 30;
    white-space: normal;
    overflow-wrap: anywhere;
}

.panel-ai-credit-help:hover .panel-ai-credit-help-tooltip,
.panel-ai-credit-help:focus-visible .panel-ai-credit-help-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.panel-ai-request-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 0.86rem;
    font-weight: 600;
    color: #ffffff;
    background: var(--primary-color);
    cursor: pointer;
}

.panel-ai-request-btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.panel-ai-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.panel-ai-loading-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: panel-ai-spin 0.8s linear infinite;
}

@keyframes panel-ai-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.panel-ai-response h3,
.panel-ai-response h4,
.panel-ai-response h5,
.panel-ai-response h6 {
    margin: 14px 0 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.panel-ai-response p {
    margin: 0 0 8px;
}

.panel-ai-response ul {
    margin: 0 0 8px 18px;
    padding: 0;
}

.panel-ai-response li {
    margin-bottom: 4px;
}

.panel-ai-response code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    background: var(--bg-muted);
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 0.85em;
}

.panel-ai-response a {
    color: var(--primary-color);
    text-decoration: underline;
}

.panel-address-sub {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 공공데이터 정보 섹션 */
.panel-section {
    margin-bottom: 16px;
}

.panel-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.panel-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.panel-info-card {
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    padding: 12px;
}

.panel-info-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.panel-info-card-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.panel-info-card-value.highlight {
    color: var(--primary-color);
}

/* 매물 상세 패널 */
.panel-property-images {
    width: calc(100% + 40px);
    margin: -20px -20px 16px;
    height: 200px;
    background: var(--bg-muted);
    overflow: hidden;
    position: relative;
}

.panel-property-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.panel-property-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.panel-property-price-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.panel-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.panel-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--bg-muted);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.panel-tag.primary {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
    border-color: rgba(37, 99, 235, 0.2);
}

.panel-description {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* 예약 버튼 */
.panel-cta {
    padding: 0 20px 24px;
    flex-shrink: 0;
}

.btn-reserve {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.btn-reserve:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* 로딩 상태 */
.panel-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: var(--text-muted);
    gap: 12px;
}

.panel-loading i {
    font-size: 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 패널 로딩 스피너 */
.panel-loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* 패널 탭 */
.panel-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    padding: 4px;
    flex-shrink: 0;
}

.panel-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: calc(var(--radius-md) - 2px);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}

.panel-tab:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.7);
}

.panel-tab.active {
    background: #ffffff;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.panel-tab-content {
    animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 패널 정보 리스트 (행 형태) */
.panel-info-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.panel-info-row {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
}

.panel-info-row:last-child {
    border-bottom: none;
}

.panel-info-row-label {
    width: 90px;
    flex-shrink: 0;
    color: var(--text-muted);
    font-weight: 500;
}

.panel-info-row-value {
    flex: 1;
    color: var(--text-main);
    font-weight: 600;
    text-align: right;
}

/* 용도지역 항목 (세로 2칸) */
.panel-zone-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.panel-zone-name {
    font-weight: 700;
    color: var(--text-main);
}

.panel-zone-note {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* 공시지가 목록 */
.panel-price-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.panel-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.panel-price-row:last-child {
    border-bottom: none;
}

.panel-price-year {
    color: var(--text-muted);
    font-weight: 500;
}

.panel-price-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* 빈 메시지 */
.panel-empty-msg {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 24px 0;
}

/* 층별현황 목록 */
.panel-floor-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel-floor-item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.panel-floor-no {
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
}

.panel-floor-purps {
    color: var(--text-main);
}

.panel-floor-area {
    color: var(--text-muted);
    white-space: nowrap;
}

/* 상가 목록 */
.panel-store-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel-store-item {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 8px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.panel-store-nm {
    grid-column: 1;
    font-weight: 700;
    color: var(--text-main);
}

.panel-store-loc {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    white-space: nowrap;
}

.panel-store-cate {
    grid-column: 1;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* 클릭 마커 */
.click-marker {
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.5);
    border: 2px solid #ffffff;
}

.click-marker i {
    transform: rotate(45deg);
    color: #ffffff;
    font-size: 0.9rem;
}

/* 패널 열렸을 때 지도 컨트롤 위치 조정 */
#map-panel.open ~ .map-controls,
body.panel-open .map-controls {
    right: calc(16px);
}

/* ────────────────────────────────────────
   우측 컨설팅 매물 패널
──────────────────────────────────────── */
#consulting-panel {
    position: fixed;
    top: var(--header-height);
    right: 0;
    width: 380px;
    height: calc(100vh - var(--header-height) - var(--map-footer-height));
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 500; /* 푸터(400)보다 위에 오도록 조정 */
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#consulting-panel.open {
    transform: translateX(0);
}

.cp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: #fff;
}

.cp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fde8e8;
    color: #c0392b;
    border: 1px solid #f5b7b1;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

.cp-body {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-bottom: 60px; /* 푸터 영역 확보 */
}

@media (max-width: 768px) {
    .cp-body {
        padding-bottom: 120px; /* 모바일 푸터 및 여유 여백 */
    }
}

.cp-body::-webkit-scrollbar {
    width: 4px;
}

.cp-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

/* 이미지 영역 */
.cp-images {
    width: 100%;
    display: flex;
    height: 200px;
    background: var(--bg-muted);
    flex-shrink: 0;
}

.cp-image-box {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.cp-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-image-box + .cp-image-box {
    border-left: 2px solid #fff;
}

.cp-image-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.cp-image-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2.5rem;
    background: var(--bg-muted);
}

/* 제목/가격 섹션 */
.cp-title-section {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border-color);
}

.cp-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 4px;
    line-height: 1.2;
}

.cp-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.cp-address {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.cp-address i {
    color: var(--primary-color);
}

/* 액션 버튼 */
.cp-actions {
    display: flex;
    gap: 8px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
}

.cp-actions .btn {
    font-size: 0.85rem;
    padding: 0.55rem 0.8rem;
}

/* 섹션 */
.cp-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.cp-section:last-child {
    border-bottom: none;
}

.cp-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cp-section-title i {
    color: var(--primary-color);
}

.cp-description {
    font-size: 0.9rem;
    line-height: 1.75;
    color: var(--text-main);
    white-space: pre-line;
}

.cp-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cp-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-main);
}

.cp-checklist li i {
    color: var(--primary-color);
    margin-top: 2px;
    flex-shrink: 0;
}

/* ────────────────────────────────────────
   커스텀 마커
──────────────────────────────────────── */
.custom-marker {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.custom-marker-bubble {
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Montserrat', 'SUITE', sans-serif;
    padding: 5px 10px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
    transition: transform 0.15s, box-shadow 0.15s;
}

.custom-marker-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.5);
}

.custom-marker-tail {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid var(--primary-color);
}

/* ────────────────────────────────────────
   모바일 반응형
──────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --map-footer-height: 120px; /* 모바일 safe-area 대응 높이 */
    }

    /* 메인 페이지 (index.html) 모바일 대응 */
    .hero-title {
        white-space: normal;
        font-size: 1.8rem;
        line-height: 1.3;
        word-break: keep-all;
        padding: 0 0px;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        word-break: keep-all;
        padding: 0 0px;
        line-height: 1.5;
    }

    .hero-symbol {
        padding-bottom: 90px; /* 여백 소폭 조정 */
    }

    .symbol-img {
        width: 100px;
        height: 100px;
    }

    #map-panel {
        width: 100vw;
        height: calc(100vh - var(--header-height) - var(--map-footer-height));
    }

    #consulting-panel {
        width: 100vw;
        height: calc(100vh - var(--header-height) - var(--map-footer-height));
    }

    .search-bar-wrapper {
        width: calc(100% - 24px);
        top: 10px;
    }

    .map-controls {
        bottom: calc(var(--map-footer-height) + 10px);
        right: 10px;
    }

    .map-ctrl-btn span {
        display: none;
    }

    .panel-info-grid {
        grid-template-columns: 1fr;
    }
}
