/* =========================================================
   [1] 글로벌 테마: BLUEDOT Medical Intelligence (Deep Blue + Mint/Coral)
   ========================================================= */
:root {
    --brand-deep: #004085;
    --brand-primary: #004085;
    --brand-dark: #003066;
    --brand-light: #E8F1FA;
    --accent-mint: #2EC4B6;
    --accent-mint-soft: #E6FAF7;
    --accent-coral: #E07A5F;
    --accent-coral-soft: #FFF5F2;
    --brand-fab: #E07A5F;
    
    --bg-main: #FFFFFF;
    --bg-sub: #F8FAFC;
    
    --text-main: #0F172A;
    --text-sub: #64748B;
    --border-color: #E2E8F0;
    
    --c-bg-1: #FEE2E2; --c-bd-1: #EF4444; 
    --c-bg-2: #FAE8FF; --c-bd-2: #D946EF; 
    --c-bg-3: #FEF3C7; --c-bd-3: #F59E0B; 
    --c-bg-4: #DBEAFE; --c-bd-4: #3B82F6; 
    --c-bg-5: #D1FAE5; --c-bd-5: #10B981; 
    --c-bg-6: #E0E7FF; --c-bd-6: #6366F1; 
    --c-bg-7: #FFEDD5; --c-bd-7: #F97316; 
    --c-bg-8: #CCFBF1; --c-bd-8: #14B8A6; 
    --c-bg-9: #FCE7F3; --c-bd-9: #F43F5E; 
    --c-bg-10: #F3E8FF; --c-bd-10: #A855F7; 
    --c-bg-11: #FFE4E6; --c-bd-11: #E11D48; 
    --c-bg-12: #DCFCE7; --c-bd-12: #059669; 

    --shadow-topbar: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-floating: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05); 
    --radius-xl: 28px;
    --topbar-height: 65px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; outline: none; }
body, html { font-family: 'Pretendard', sans-serif; background: var(--bg-main); color: var(--text-main); width: 100%; height: 100%; overflow: hidden; -webkit-font-smoothing: antialiased; }

/* =========================================================
   [2] BLUEDOT 스플래시
   ========================================================= */
#splash-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(160deg, var(--brand-deep) 0%, #002952 100%); z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s;
}
.splash-content { text-align: center; color: white; }
.splash-logo { animation: nodePulse 2s infinite ease-in-out; }
.splash-title { font-size: 34px; font-weight: 900; letter-spacing: 1px; margin-bottom: 4px; }
.splash-sub { font-size: 11px; opacity: 0.85; letter-spacing: 4px; text-transform: uppercase; font-weight: 600; color: var(--accent-mint); }
@keyframes nodePulse { 0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(207, 250, 254, 0.5)); } 50% { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(207, 250, 254, 0.9)); } }

/* =========================================================
   [3] 메인 레이아웃 및 탑바
   ========================================================= */
#app { width: 100%; height: 100%; position: relative; display: flex; flex-direction: column; }

.top-bar { 
    width: 100%; height: var(--topbar-height); background: rgba(255,255,255,0.97); 
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); 
    position: absolute; top: 0; left: 0; z-index: 100; 
    border-bottom: 1px solid rgba(0, 64, 133, 0.08); box-shadow: 0 1px 0 rgba(255,255,255,0.8), var(--shadow-topbar); 
    padding-top: env(safe-area-inset-top, 0px);
}
.top-bar-content { width: 100%; height: 100%; max-width: 600px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }

.app-logo { font-size: 19px; font-weight: 900; color: var(--brand-deep); letter-spacing: -0.03em; }

.region-selector { display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: 14px; cursor: pointer; color: var(--text-main); padding: 8px 14px; border-radius: 14px; transition: 0.2s; background: var(--brand-light); border: 1px solid rgba(0, 64, 133, 0.1); max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.region-selector:active { background: #dce8f4; }
.icon-down { width: 18px; height: 18px; stroke: var(--text-main); fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.top-icons { display: flex; align-items: center; gap: 16px; }
.icon-btn { position: relative; width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-main); }
.icon-btn svg { width: 100%; height: 100%; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.noti-badge { position: absolute; top: 0px; right: 0px; width: 9px; height: 9px; background: #EF4444; border-radius: 50%; border: 1px solid white; }

/* 데이터 연결·정밀도 안내 (API /api/health data_readiness) */
.data-readiness-banner {
    position: absolute;
    top: var(--topbar-height);
    left: 0;
    right: 0;
    z-index: 86;
    background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%);
    border-bottom: 1px solid rgba(180, 83, 9, 0.2);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    font-size: 12px;
    line-height: 1.45;
    color: #78350f;
}
.data-readiness-banner--ok {
    background: linear-gradient(90deg, #ecfdf5 0%, #d1fae5 100%);
    border-bottom-color: rgba(5, 150, 105, 0.25);
    color: #065f46;
}
.data-readiness-banner__row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 14px 8px 12px;
    max-width: 100%;
}
.data-readiness-banner__icon { flex-shrink: 0; font-size: 16px; line-height: 1.2; }
.data-readiness-banner__text { flex: 1; min-width: 0; }
.data-readiness-banner__title { display: block; font-size: 12px; margin-bottom: 2px; }
.data-readiness-banner__lead { margin: 0; font-weight: 600; color: inherit; opacity: 0.95; }
.data-readiness-banner__toggle {
    flex-shrink: 0;
    align-self: center;
    border: 1px solid rgba(120, 53, 15, 0.35);
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    color: #78350f;
}
.data-readiness-banner--ok .data-readiness-banner__toggle {
    border-color: rgba(6, 95, 70, 0.35);
    color: #065f46;
}
.data-readiness-banner__detail {
    padding: 0 14px 10px 38px;
    border-top: 1px solid rgba(180, 83, 9, 0.12);
    max-height: 42vh;
    overflow-y: auto;
}
.data-readiness-banner--ok .data-readiness-banner__detail {
    border-top-color: rgba(5, 150, 105, 0.15);
}
.data-readiness-banner__note {
    margin: 0 0 10px;
    font-size: 11px;
    opacity: 0.92;
}
.data-readiness-banner__gap {
    margin: 0 0 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 8px;
    border: 1px solid rgba(180, 83, 9, 0.15);
}
.data-readiness-banner--ok .data-readiness-banner__gap {
    border-color: rgba(5, 150, 105, 0.12);
}
.data-readiness-banner__gap-title { font-weight: 800; margin: 0 0 4px; font-size: 11px; }
.data-readiness-banner__gap-action { margin: 0; font-size: 11px; opacity: 0.95; }
.data-readiness-banner__sev {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: middle;
}
.data-readiness-banner__sev--high { background: #fee2e2; color: #991b1b; }
.data-readiness-banner__sev--medium { background: #ffedd5; color: #9a3412; }
.data-readiness-banner__sev--low { background: #e0e7ff; color: #3730a3; }

.data-readiness-banner__h4 {
    margin: 12px 0 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0.02em;
    color: inherit;
    opacity: 0.92;
}
.data-readiness-banner__ul {
    margin: 0 0 10px 1em;
    padding: 0;
    font-size: 11px;
    line-height: 1.5;
}
.data-readiness-banner__ul li { margin-bottom: 6px; }
.data-readiness-banner__ul code {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.45);
    padding: 1px 4px;
    border-radius: 4px;
}
.data-readiness-banner__sub {
    display: block;
    margin-top: 2px;
    opacity: 0.88;
    font-size: 10px;
}
.data-readiness-banner__tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
    margin: 0 0 12px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    overflow: hidden;
}
.data-readiness-banner__tbl th,
.data-readiness-banner__tbl td {
    border: 1px solid rgba(120, 53, 15, 0.12);
    padding: 5px 6px;
    text-align: left;
    vertical-align: top;
}
.data-readiness-banner__tbl th { font-weight: 800; background: rgba(255, 255, 255, 0.4); }
.data-readiness-banner--ok .data-readiness-banner__tbl th,
.data-readiness-banner--ok .data-readiness-banner__tbl td {
    border-color: rgba(5, 150, 105, 0.15);
}

/* 배너가 보일 때 AI 검색창·맵 상단 여백 */
.data-readiness-banner:not([hidden]) ~ .ai-search-box {
    top: calc(var(--topbar-height) + 52px);
}

/* =========================================================
   [4] 🚀 NEW: AI 자연어 검색창
   ========================================================= */
.ai-search-box {
    position: absolute;
    top: calc(var(--topbar-height) + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 380px);
    max-width: 380px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(15, 23, 42, 0.1);
    border: 1px solid rgba(15, 23, 42, 0.06);
    display: flex;
    align-items: center;
    padding: 8px 14px;
    z-index: 90;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}
.ai-search-box:focus-within {
    border-color: var(--brand-primary);
    box-shadow: 0 10px 36px rgba(0, 64, 133, 0.14);
}
.ai-sparkle {
    width: 20px; height: 20px;
    stroke: var(--brand-primary);
    fill: none; stroke-width: 2; margin-right: 10px;
}
.ai-search-box input {
    flex: 1; border: none; background: transparent;
    font-size: 14px; font-weight: 700; color: var(--text-main);
    font-family: 'Pretendard', sans-serif;
}
.ai-search-box input::placeholder { color: #9CA3AF; font-weight: 500; }
.ai-submit-btn {
    background: var(--brand-primary); border: none; border-radius: 10px;
    width: 32px; height: 32px; display: flex; justify-content: center; align-items: center;
    cursor: pointer; color: white; transition: transform 0.2s, background 0.2s;
}
.ai-submit-btn:hover { background: var(--brand-dark); }
.ai-submit-btn:active { transform: scale(0.9); }

/* =========================================================
   [5] 지도 및 컨트롤러 & 십자선(Crosshair)
   ========================================================= */
#map { width: 100%; flex: 1; z-index: 1; position: absolute; top: 0; left: 0; height: 100%; }

/* 🚀 NEW: 지도 중앙 십자선 (드래그 주소 연동용) */
.map-crosshair {
    position: absolute;
    top: 50%; left: 50%;
    width: 24px; height: 24px;
    transform: translate(-50%, -50%);
    pointer-events: none; /* 클릭 방해 금지 */
    z-index: 10;
}
.map-crosshair::before { content: ''; position: absolute; top: 11px; left: 0; width: 24px; height: 2px; background: rgba(0,0,0,0.6); }
.map-crosshair::after { content: ''; position: absolute; top: 0; left: 11px; width: 2px; height: 24px; background: rgba(0,0,0,0.6); }

/* 모바일·터치: 중앙 핀(포인터) 아래 2단계 진입 */
.stage2-map-center-cta {
    position: absolute;
    left: 50%;
    top: calc(50% + 18px);
    transform: translateX(-50%);
    z-index: 105;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    font-family: inherit;
    background: linear-gradient(165deg, #004085 0%, #0c4a6e 100%);
    box-shadow: 0 6px 22px rgba(0, 64, 133, 0.38);
    cursor: pointer;
    white-space: nowrap;
    max-width: calc(100vw - 40px);
    -webkit-tap-highlight-color: transparent;
}
.stage2-map-center-cta:active {
    transform: translateX(-50%) scale(0.97);
    box-shadow: 0 4px 14px rgba(0, 64, 133, 0.3);
}
.stage2-map-center-cta.is-visible {
    display: flex;
}

.map-controls { 
    position: absolute; right: 16px; top: calc(var(--topbar-height) + 80px); 
    z-index: 50; display: flex; flex-direction: column; gap: 8px; 
}
.ctrl-btn { 
    width: 44px; height: 44px; background: #FFFFFF; border-radius: 12px; 
    display: flex; justify-content: center; align-items: center; 
    box-shadow: var(--shadow-floating); cursor: pointer; border: 1px solid var(--border-color); 
    font-size: 20px; font-weight: 700; color: var(--text-main); transition: 0.2s; 
}
.ctrl-btn:active { transform: scale(0.96); background: var(--bg-sub); }
.ctrl-btn-naver-land {
    background: linear-gradient(165deg, #03c75a 0%, #02a54a 100%);
    color: #fff !important;
    border-color: rgba(2, 133, 62, 0.35);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.02em;
}
.ctrl-btn-naver-land:active { background: #029e48 !important; }
.my-loc-btn svg { width: 20px; height: 20px; stroke: var(--brand-deep); fill: none; stroke-width: 2.2; }

/* =========================================================
   [6] 하단 분석 패널 — 접힌 독(한 줄) + 탭 시 펼침 (지도 중첩 최소화)
   ========================================================= */
.bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 80;
    background: transparent;
    padding-bottom: env(safe-area-inset-bottom, 12px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.bottom-sheet.analysis-dock > * {
    pointer-events: auto;
}

.bottom-sheet.hidden-mode {
    transform: translateY(120%) !important;
    pointer-events: none !important;
}

/* 접힘: 상단 토글 바만 보임 (지도 대부분 유지) */
.analysis-dock-toggle {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 20px 12px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-bottom: none;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -6px 28px rgba(15, 23, 42, 0.1);
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.analysis-dock-toggle:active {
    background: #f8fafc;
}

.analysis-dock-handle {
    width: 36px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 99px;
}

.analysis-dock-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
}

.analysis-dock-hint {
    flex: 1;
    text-align: left;
    font-size: 13px;
    font-weight: 800;
    color: var(--brand-primary);
    letter-spacing: -0.02em;
    line-height: 1.35;
}

.analysis-dock-chev {
    flex-shrink: 0;
    font-size: 11px;
    color: #64748b;
    font-weight: 900;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.bottom-sheet.analysis-dock.is-open .analysis-dock-chev {
    transform: rotate(180deg);
}

/* 펼침 본문 */
.analysis-dock-body {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-main);
    border-radius: 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    padding: 0 24px;
    transition:
        max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.25s ease,
        padding 0.35s ease;
}

.bottom-sheet.analysis-dock.is-open .analysis-dock-body {
    max-height: min(68vh, 560px);
    opacity: 1;
    padding: 12px 24px 28px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.analysis-panel-lead {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    line-height: 1.45;
    margin: 0 0 8px;
}

.analysis-data-note {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.4;
    margin: 0 0 14px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.sheet-content {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.dept-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
@media screen and (max-width: 380px) { .dept-grid { grid-template-columns: repeat(3, 1fr); } }

.dept-item { 
    background: #fff; border-radius: 18px; padding: 12px 6px 14px; 
    cursor: pointer; transition: border-color 0.2s, background 0.2s, box-shadow 0.2s; 
    border: 2px solid var(--border-color); text-align: center;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.dept-item:active { transform: scale(0.98); }
.dept-item.selected { 
    background: var(--accent-coral-soft); 
    border-color: var(--accent-coral); 
    box-shadow: 0 4px 16px rgba(224, 122, 95, 0.18);
}

.dept-icon { 
    font-size: 26px; margin-bottom: 8px; width: 52px; height: 52px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; transition: 0.2s; 
    border: 1px solid rgba(15, 23, 42, 0.06);
    background: #F8FAFC;
}
.dept-item.selected .dept-icon {
    background: #fff;
    border-color: rgba(224, 122, 95, 0.45);
    box-shadow: inset 0 0 0 1px rgba(224, 122, 95, 0.15);
}
.dept-label { font-size: 11px; font-weight: 800; color: var(--text-main); white-space: nowrap; letter-spacing: -0.04em;}

.dept-1 .dept-icon { background: var(--c-bg-1); } .dept-2 .dept-icon { background: var(--c-bg-2); }
.dept-3 .dept-icon { background: var(--c-bg-3); } .dept-4 .dept-icon { background: var(--c-bg-4); }
.dept-5 .dept-icon { background: var(--c-bg-5); } .dept-6 .dept-icon { background: var(--c-bg-6); }
.dept-7 .dept-icon { background: var(--c-bg-7); } .dept-8 .dept-icon { background: var(--c-bg-8); }
.dept-9 .dept-icon { background: var(--c-bg-9); } .dept-10 .dept-icon { background: var(--c-bg-10); }
.dept-11 .dept-icon { background: var(--c-bg-11); } .dept-12 .dept-icon { background: var(--c-bg-12); }

.dept-grid::-webkit-scrollbar { display: none; }

.analysis-title { font-size: 18px; font-weight: 800; color: var(--text-main); }

.analyze-btn { 
    width: 100%; background: var(--brand-primary); color: white; border: none; 
    padding: 17px; border-radius: 16px; font-size: 16px; font-weight: 800; 
    cursor: pointer; transition: 0.2s; box-shadow: 0 8px 24px rgba(0, 64, 133, 0.35); 
    animation: slideUpIn 0.3s ease;
    letter-spacing: -0.02em;
}
.analyze-btn:hover { background: var(--brand-dark); }
.analyze-btn:active { transform: scale(0.98); background: #002040; }
@keyframes slideUpIn { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* =========================================================
   [7] 모달 공통 (지역, 결제, 리포트)
   ========================================================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); z-index: 2000; display: flex; justify-content: center; align-items: center; }
.modal-body { background: var(--bg-main); width: 90%; max-width: 400px; border-radius: var(--radius-xl); padding: 24px; box-shadow: var(--shadow-floating); animation: popIn 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 18px; font-weight: 800; color: var(--text-main); }
.close-btn { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-sub); }
.input-field { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border-color); background: var(--bg-main); font-size: 14px; outline: none; transition: all 0.2s; color: var(--text-main); }
.input-field:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(0, 64, 133, 0.12); }
.btn-primary { width: 100%; padding: 14px; border-radius: 12px; border: none; background: var(--brand-primary); color: white; font-weight: 700; font-size: 15px; cursor: pointer; transition: transform 0.2s, background 0.2s; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: scale(0.98); }
.search-result-item { padding: 16px 0; border-bottom: 1px solid var(--border-color); cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.search-result-item:active { background: var(--bg-sub); }
.search-result-title { font-size: 15px; font-weight: 800; color: var(--text-main); margin-bottom: 4px; }
.search-result-addr { font-size: 12px; font-weight: 500; color: var(--text-sub); }
.payment-card { border: 2px solid var(--text-main); box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15); }

/* =========================================================
   [8] 지도 마커 & Top 5 랭킹 뱃지 시각화
   ========================================================= */
.custom-marker { width: 32px; height: 32px; background: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 16px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); border: 2px solid; cursor: pointer; transition: transform 0.2s; opacity: 0.8; }
.custom-marker-building { border-radius: 8px !important; }
.custom-marker-building svg { display: block; }
/* BLUEDOT 로고 스타일 경쟁기관 마커 */
.bluedot-dot:hover { transform: scale(1.15); }
.custom-marker:hover { transform: scale(1.2); z-index: 10 !important; opacity: 1; }
.marker-dept-1 { border-color: var(--c-bd-1); } .marker-dept-2 { border-color: var(--c-bd-2); }
.marker-dept-3 { border-color: var(--c-bd-3); } .marker-dept-4 { border-color: var(--c-bd-4); }
.marker-dept-5 { border-color: var(--c-bd-5); } .marker-dept-6 { border-color: var(--c-bd-6); }
.marker-dept-7 { border-color: var(--c-bd-7); } .marker-dept-8 { border-color: var(--c-bd-8); }
.marker-dept-9 { border-color: var(--c-bd-9); } .marker-dept-10 { border-color: var(--c-bd-10); }
.marker-dept-11 { border-color: var(--c-bd-11); } .marker-dept-12 { border-color: var(--c-bd-12); }

.ranking-badge { width: 44px; height: 44px; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; color: white; font-weight: 900; box-shadow: 0 6px 15px rgba(0,0,0,0.3); border: 3px solid white; cursor: pointer; animation: bounceBadge 2s infinite; z-index: 100 !important; }
.ranking-badge .rank-num { font-size: 16px; line-height: 1; }
.ranking-badge .rank-label { font-size: 9px; font-weight: 700; opacity: 0.9; margin-top: 2px; }
@keyframes bounceBadge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* =========================================================
   [9] 🚀 핀셋 수정: 결과 패널 하단 플로팅 (지도 가림 방지)
   ========================================================= */
.results-panel { 
    position: absolute; 
    bottom: 20px; /* 위에서 덮지 않고, 바닥에 띄움 */
    left: 0; 
    width: 100%; 
    z-index: 200; 
    background: transparent; /* 까만 배경 삭제 -> 지도가 보임 */
    padding: 0; 
    pointer-events: none; /* 빈 공간은 지도로 통과 */
    animation: slideUpCard 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; 
}
/* 패널 실제 히트 영역 — 데스크톱에서 마우스 이탈 시 슬라이드 전체 접힘, 하단 핸들만 표시 */
.results-panel-hit {
    pointer-events: auto;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.results-panel-slide {
    overflow-x: hidden;
    transition: max-height 0.28s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.22s ease, margin 0.24s ease;
}
/* 데스크톱 접힘: 펼치기 탭 + 항상 보이는 닫기 */
.results-panel-peekbar {
    display: none;
    width: calc(100% - 32px);
    max-width: 720px;
    margin: 0 auto 4px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    align-self: center;
    pointer-events: auto;
}
.results-panel-peek-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    justify-content: center;
}
.results-peek-chip {
    padding: 8px 11px;
    border-radius: 999px;
    border: 1px solid rgba(46, 196, 182, 0.5);
    background: rgba(15, 61, 102, 0.92);
    color: #cffafe;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}
.results-peek-chip:hover {
    filter: brightness(1.08);
}
.results-panel-peek-close {
    flex-shrink: 0;
    align-self: center;
    padding: 12px 14px;
    border: 2px solid rgba(46, 196, 182, 0.4);
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(180deg, #0c4a6e 0%, #0a3a5c 100%);
    color: #f8fafc;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 -4px 16px rgba(0, 64, 133, 0.22);
}
.results-panel-peek-close:active { transform: scale(0.98); }
.stage2-head-details {
    margin-top: 6px;
    color: #94a3b8;
    font-size: 11px;
}
.stage2-head-details-sum {
    cursor: pointer;
    font-weight: 800;
    color: #5eead4;
    list-style: none;
}
.stage2-head-details-sum::-webkit-details-marker { display: none; }

.results-panel-peektab {
    display: none;
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 12px 16px;
    border: none;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(180deg, #0f3d66 0%, #0a2844 100%);
    color: #e2e8f0;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    box-shadow: 0 -6px 24px rgba(0, 64, 133, 0.28);
    border: 2px solid rgba(46, 196, 182, 0.38);
    border-bottom: none;
    text-align: center;
    align-self: center;
}
.results-panel-peektab strong { color: var(--accent-mint); font-weight: 900; }
.results-panel-peektab-chev {
    display: inline-block;
    margin-right: 6px;
    color: var(--accent-mint);
    font-size: 11px;
    transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}
.results-panel-hit:hover .results-panel-peektab-chev {
    transform: rotate(180deg);
}
.results-panel-peektab-text { vertical-align: middle; }
@media (hover: hover) and (pointer: fine) {
    .results-panel-peekbar {
        display: flex;
    }
    .results-panel-peektab {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    /* 포커스(:focus-within)는 제외 — 버튼 클릭 후 포커스가 남으면 지도로 마우스를 옮겨도 패널이 안 접히는 문제 방지 */
    .results-panel-hit:not(:hover) .results-panel-slide {
        max-height: 0 !important;
        min-height: 0;
        opacity: 0;
        overflow: hidden;
        margin: 0 !important;
        padding: 0 !important;
        pointer-events: none;
    }
    .results-panel-hit:hover .results-panel-slide {
        max-height: min(82vh, 860px);
        opacity: 1;
        pointer-events: auto;
        overflow-x: hidden;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
}
.results-panel-grip {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 16px 4px 16px;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.88);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    cursor: default;
    user-select: none;
    transition: background 0.2s, border-color 0.2s;
    pointer-events: none; /* 장식 — 호버는 부모 hit에만 걸리도록 */
}
.results-panel-hit:hover .results-panel-grip {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(46, 196, 182, 0.45);
}
.results-panel-grip-chev {
    display: inline-block;
    font-size: 10px;
    color: var(--accent-mint);
    transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
}
.results-panel-hit:hover .results-panel-grip-chev {
    transform: rotate(180deg);
}
.results-panel-grip-text {
    text-align: center;
    line-height: 1.35;
}
@keyframes slideUpCard { 
    from { transform: translateY(100%); } 
    to { transform: translateY(0); } 
}
.results-header { 
    pointer-events: auto; /* 닫기 버튼은 클릭되어야 함 */
    display: flex; justify-content: space-between; align-items: flex-start; 
    gap: 12px;
    background: linear-gradient(135deg, #003d7a 0%, var(--brand-deep) 55%, #005a9e 100%);
    backdrop-filter: blur(8px);
    margin: 0 16px 8px 16px; 
    padding: 12px 16px 12px; 
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 64, 133, 0.28);
    position: sticky;
    top: 0;
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.results-header .results-title-main { color: #fff; font-size: 17px; font-weight: 900; letter-spacing: -0.03em; margin: 0; line-height: 1.2; }
.results-header .results-title-sub { color: var(--accent-mint); font-size: 10px; font-weight: 700; margin-top: 4px; letter-spacing: 0.02em; }
.results-header .results-title-hint { color: rgba(255,255,255,0.72); font-size: 10px; font-weight: 600; margin-top: 6px; line-height: 1.35; }
.results-title-hint--compact { margin-top: 4px !important; }
.results-title-details {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 10px;
    line-height: 1.4;
}
.results-title-details-sum {
    cursor: pointer;
    font-weight: 800;
    color: var(--accent-mint);
    list-style: none;
}
.results-title-details-sum::-webkit-details-marker { display: none; }
.results-title-details-body {
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.results-panel--stage1-hidden .results-header,
.results-panel--stage1-hidden .results-panel-grip,
.results-panel--stage1-hidden .results-panel-body {
    display: none !important;
}
#stage2-report-section.is-collapsed {
    display: none !important;
}
.results-phase-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    padding-bottom: 2px;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.35);
}
.results-phase-btn {
    padding: 7px 12px;
    border-radius: 10px;
    border: 1px solid rgba(46, 196, 182, 0.55);
    background: rgba(0, 64, 133, 0.45);
    color: #ecfeff;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
}
.results-phase-btn:hover {
    background: rgba(0, 64, 133, 0.62);
    border-color: rgba(46, 196, 182, 0.75);
}
.results-phase-btn--secondary {
    border-color: rgba(148, 163, 184, 0.45);
    background: rgba(30, 41, 59, 0.55);
    color: #e2e8f0;
}
.results-phase-btn--secondary:hover {
    border-color: rgba(148, 163, 184, 0.65);
    background: rgba(51, 65, 85, 0.65);
}
.results-panel-body {
    pointer-events: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}
@media (hover: hover) and (pointer: fine) {
    .results-panel-body {
        max-height: none;
        overflow-y: visible;
    }
}
/* 낮은 뷰포트 높이: 1단계 카드 하단만 소폭 스크롤 */
@media (hover: hover) and (pointer: fine) and (max-height: 780px) {
    .results-panel-body {
        max-height: min(36vh, 320px);
        overflow-y: auto;
    }
}
@media (max-width: 900px), (hover: none) {
    .results-panel-body {
        max-height: min(48vh, 420px);
        overflow-y: auto;
    }
}
@media (hover: hover) and (pointer: fine) {
    .results-panel-grip {
        display: flex;
    }
}
.results-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex-shrink: 0;
}
.results-close-x {
    color: rgba(255,255,255,0.92);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    transition: background 0.2s;
}
.results-close-x:hover { background: rgba(255,255,255,0.2); }
.stage2-trigger-btn {
    padding: 10px 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-deep) 0%, #003566 100%);
    color: white;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 64, 133, 0.32);
    white-space: nowrap;
}
.stage2-trigger-btn:hover { filter: brightness(1.05); }
.stage2-trigger-btn:active { transform: scale(0.98); }
.results-stage2-strip {
    pointer-events: auto;
    margin: 0 20px 12px 20px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(232, 241, 250, 0.95) 0%, rgba(230, 250, 247, 0.88) 100%);
    border: 1px solid rgba(0, 64, 133, 0.14);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(0, 64, 133, 0.1);
}
.results-stage2-strip-text {
    flex: 1;
    min-width: 200px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
}
.results-stage2-strip-text strong { color: var(--brand-deep); font-size: 13px; margin-right: 6px; }
.results-stage2-strip-text em { font-style: normal; color: #0e7490; font-weight: 800; }
.results-stage2-strip-btn {
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand-deep) 0%, #002952 100%);
    color: white;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 64, 133, 0.3);
}
.results-stage2-strip-btn:hover { filter: brightness(1.05); }
.results-stage2-strip-btn:active { transform: scale(0.98); }

.stage2-report-section {
    pointer-events: auto;
    margin: 0 16px 10px 16px;
    padding: 12px 14px 10px;
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(15, 40, 70, 0.97) 0%, rgba(30, 41, 59, 0.96) 100%);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 28px rgba(0, 64, 133, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(46, 196, 182, 0.22);
}
.stage2-report-head {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.35);
}
.stage2-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.stage2-fs-btn {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(46, 196, 182, 0.45);
    background: rgba(0, 64, 133, 0.35);
    color: #ecfeff;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.stage2-fs-btn:hover {
    background: rgba(0, 64, 133, 0.5);
    border-color: rgba(46, 196, 182, 0.65);
}
.stage2-fs-btn:active { transform: scale(0.99); }
.stage2-toolbar-naver {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(3, 199, 90, 0.55);
    background: linear-gradient(135deg, #03c75a, #02a54a);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: filter 0.2s, transform 0.15s;
}
.stage2-toolbar-naver:hover { filter: brightness(1.06); }
.stage2-toolbar-naver:active { transform: scale(0.99); }
.stage2-compare-scroll {
    width: 100%;
    max-height: min(30vh, 300px);
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -2px;
    padding: 0 2px 4px;
}
@media (max-width: 900px) {
    .stage2-compare-scroll {
        max-height: min(36vh, 340px);
    }
}
.stage2-compare-wrap { min-width: 0; }
.stage2-table-caption {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    margin: 0 0 8px;
    line-height: 1.45;
}
.stage2-compare-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 12px;
}
.stage2-compare-table th,
.stage2-compare-table td {
    padding: 9px 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    vertical-align: middle;
    text-align: left;
    color: #e2e8f0;
}
.stage2-compare-table thead th {
    font-weight: 900;
    color: #cffafe;
    background: rgba(0, 48, 102, 0.55);
    white-space: nowrap;
    border-bottom: 1px solid rgba(46, 196, 182, 0.25);
}
.stage2-compare-table tbody tr.stage2-compare-tr {
    cursor: pointer;
    transition: background 0.15s ease;
}
.stage2-compare-table tbody tr.stage2-compare-tr:hover {
    background: rgba(255, 255, 255, 0.08);
}
.s2c-rank { width: 42px; }
.s2c-badge {
    display: inline-flex;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 13px;
    color: #fff;
}
.s2c-loc { min-width: 140px; max-width: 280px; }
.s2c-loc-main {
    display: block;
    font-weight: 900;
    color: #f8fafc;
    font-size: 12px;
}
.s2c-loc-sub {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.35;
    word-break: keep-all;
}
.s2c-num,
.s2c-score {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.s2c-denom { font-size: 10px; font-weight: 800; color: #94a3b8; margin-left: 2px; }
.s2c-grade { white-space: nowrap; font-weight: 800; }
.s2c-macro {
    max-width: 140px;
    font-size: 11px;
    color: #cbd5e1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.s2c-actions {
    white-space: normal;
    text-align: right;
    min-width: 168px;
    vertical-align: middle;
}
.s2c-btn {
    padding: 5px 9px;
    margin-left: 4px;
    border-radius: 8px;
    border: 1px solid rgba(46, 196, 182, 0.4);
    background: rgba(0, 64, 133, 0.45);
    color: #f0fdfa;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}
.s2c-btn:hover { background: rgba(0, 64, 133, 0.62); }
.s2c-btn-map {
    border-color: rgba(148, 163, 184, 0.45);
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.75);
}
.s2c-btn-map:hover { background: rgba(51, 65, 85, 0.85); }
.s2c-btn-naver {
    border-color: rgba(3, 199, 90, 0.45);
    background: rgba(3, 199, 90, 0.88);
    color: #fff;
}
.s2c-btn-naver:hover { background: rgba(2, 163, 74, 0.95); }
.stage2-table-foot {
    margin: 10px 0 0;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.45;
}
.stage2-fs-overlay {
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(5px);
}
.stage2-fs-panel {
    width: 100%;
    max-width: min(1120px, 100vw);
    max-height: 92vh;
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}
.stage2-fs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0, 64, 133, 0.1);
    background: linear-gradient(180deg, #e8f1fa 0%, #fff 100%);
}
.stage2-fs-title {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
    color: var(--brand-deep);
    letter-spacing: -0.03em;
}
.stage2-fs-body {
    overflow: auto;
    padding: 14px 18px 22px;
    -webkit-overflow-scrolling: touch;
}
.stage2-fs-body .stage2-compare-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}
.stage2-compare-wrap--light .stage2-table-caption { color: #64748b; }
.stage2-compare-wrap--light .stage2-compare-table th,
.stage2-compare-wrap--light .stage2-compare-table td {
    color: #334155;
    border-bottom-color: #e2e8f0;
}
.stage2-compare-wrap--light .stage2-compare-table thead th {
    background: linear-gradient(180deg, #e8f1fa 0%, #f1f5f9 100%);
    color: var(--brand-deep);
    border-bottom-color: rgba(0, 64, 133, 0.12);
}
.stage2-compare-wrap--light .stage2-compare-table tbody tr:hover {
    background: rgba(230, 250, 247, 0.45);
}
.stage2-compare-wrap--light .s2c-loc-main { color: #0f172a; }
.stage2-compare-wrap--light .s2c-loc-sub { color: #64748b; }
.stage2-compare-wrap--light .s2c-btn {
    background: var(--brand-light);
    color: var(--brand-deep);
    border-color: rgba(0, 64, 133, 0.2);
}
.stage2-compare-wrap--light .s2c-btn:hover {
    background: #dce8f4;
}
.stage2-compare-wrap--light .s2c-btn-map {
    background: #f8fafc;
    color: #334155;
    border-color: #cbd5e1;
}
.stage2-compare-wrap--light .s2c-btn-naver {
    background: #03c75a;
    color: #fff;
    border-color: rgba(2, 133, 62, 0.5);
}
.stage2-compare-wrap--light .s2c-btn-naver:hover {
    background: #02a54a;
}
.stage2-compare-wrap--light .stage2-table-foot { color: #64748b; }
.stage2-card-slider {
    padding-top: 4px;
    padding-bottom: 6px;
}
.result-card.stage2-building-card {
    border-top-width: 4px;
    border-top-style: solid;
    border-top-color: var(--accent-coral);
    min-width: 280px;
}
.result-card.stage2-building-card .rc-top {
    align-items: flex-start;
}
.result-card.stage2-building-card .rc-title-col {
    flex: 1;
    min-width: 0;
    text-align: left;
}
.result-card.stage2-building-card .rc-title-main {
    font-size: 15px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.25;
}
.result-card.stage2-building-card .rc-title-sub {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.35;
    word-break: keep-all;
}
.rc-btn-stage2 {
    width: 100%;
    background: linear-gradient(135deg, var(--brand-light) 0%, #fff 100%);
    border: 1px solid rgba(0, 64, 133, 0.2);
    padding: 12px;
    border-radius: 12px;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 900;
    color: var(--brand-deep);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 64, 133, 0.08);
}
.rc-btn-stage2:hover { border-color: rgba(46, 196, 182, 0.5); background: #fff; }
.rc-btn-stage2:active { transform: scale(0.99); }
.rc-stage2-rationale {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.35);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.55;
    color: #e2e8f0;
}
.rc-stage2-rationale-label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 900;
    color: var(--accent-mint);
    letter-spacing: -0.02em;
}
.report-stage2-cta-btn {
    width: 100%;
    max-width: 320px;
    padding: 15px 22px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-deep) 0%, #003066 100%);
    color: white;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 64, 133, 0.35);
    letter-spacing: -0.02em;
}
.report-stage2-cta-btn:hover { filter: brightness(1.06); }
.report-stage2-cta-btn:active { transform: scale(0.99); }
.stage2-inner { color: #e2e8f0; font-size: 12px; }
.stage2-title { font-size: 15px; font-weight: 900; color: #ecfeff; margin-bottom: 8px; letter-spacing: -0.03em; }
.stage2-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 14px;
    margin-right: 8px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--accent-mint), var(--brand-deep));
    vertical-align: -2px;
}
.stage2-note { font-size: 10px; color: #94a3b8; line-height: 1.45; margin-bottom: 10px; font-weight: 600; }
.stage2-note--emphasis { color: #99f6e4 !important; font-weight: 700; }
/* 2단계 API 대기 중 — 지도 위 고정 알림(결과 패널이 접혀 있어도 보임) */
.stage2-search-toast {
    position: fixed;
    bottom: max(100px, calc(18vh + 40px));
    left: 50%;
    transform: translateX(-50%);
    max-width: min(420px, calc(100vw - 32px));
    padding: 12px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(12, 74, 110, 0.97) 0%, rgba(15, 23, 42, 0.96) 100%);
    color: #ecfeff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
    letter-spacing: -0.02em;
    border: 2px solid rgba(45, 212, 191, 0.55);
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    z-index: 215;
    pointer-events: none;
}
.stage2-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.stage2-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(46, 196, 182, 0.35);
    background: rgba(0, 40, 85, 0.4);
    color: #f0fdfa;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}
.stage2-chip:hover { border-color: rgba(46, 196, 182, 0.55); background: rgba(0, 40, 85, 0.55); }
.stage2-chip .s2r {
    display: inline-flex;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-mint), #0d9488);
    color: #0f172a;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 900;
}
.stage2-err { color: #fecaca; font-weight: 700; font-size: 12px; margin: 0; }

/* 2단계 지도 마커: 말풍선 + 펄스로 위치 명확화 */
.stage2-pin-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
    transform: translateY(-4px);
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}
.stage2-pin-pulse {
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    border-radius: 50%;
    background: var(--s2col, var(--accent-coral));
    opacity: 0.35;
    animation: stage2Pulse 2s ease-out infinite;
    pointer-events: none;
}
@keyframes stage2Pulse {
    0% { transform: scale(0.6); opacity: 0.45; }
    70% { transform: scale(2.2); opacity: 0; }
    100% { transform: scale(2.2); opacity: 0; }
}
.stage2-pin-bubble {
    position: relative;
    z-index: 2;
    min-width: 118px;
    max-width: 210px;
    padding: 6px 8px 8px;
    border-radius: 14px;
    background: linear-gradient(165deg, #0f172a 0%, #1e293b 100%);
    border: 3px solid var(--s2col, var(--brand-deep));
    color: #f8fafc;
    text-align: center;
    line-height: 1.25;
}
.stage2-pin-bubble-main {
    cursor: pointer;
    padding: 4px 6px 2px;
    border-radius: 10px;
    transition: background 0.15s;
}
.stage2-pin-bubble-main:hover {
    background: rgba(255, 255, 255, 0.06);
}
.stage2-pin-bubble strong {
    display: block;
    font-size: 13px;
    font-weight: 900;
    color: #5eead4;
    letter-spacing: -0.03em;
}
.stage2-pin-bubble span {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #cbd5e1;
    word-break: keep-all;
}
.stage2-pin-naver-btn {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 5px 8px;
    border: none;
    border-radius: 8px;
    background: #03c75a;
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: -0.02em;
}
.stage2-pin-naver-btn:hover { filter: brightness(1.08); }
.stage2-pin-naver-btn:active { transform: scale(0.98); }
.stage2-pin-arrow {
    position: relative;
    z-index: 2;
    width: 0;
    height: 0;
    margin-top: -2px;
    border-left: 11px solid transparent;
    border-right: 11px solid transparent;
    border-top: 13px solid var(--s2col, var(--accent-coral));
}

/* 2단계 후보 상세 모달 */
.stage2-detail-overlay {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}
@media (min-width: 640px) {
    .stage2-detail-overlay {
        align-items: center;
        padding: 24px;
    }
}
.stage2-detail-sheet {
    width: 100%;
    max-width: 520px;
    max-height: min(88vh, 720px);
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
@media (min-width: 640px) {
    .stage2-detail-sheet {
        border-radius: 20px;
        max-height: min(90vh, 760px);
    }
}
.stage2-detail-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(0, 64, 133, 0.1);
    background: linear-gradient(180deg, #e8f1fa 0%, #fff 100%);
}
.stage2-detail-heading {
    margin: 0;
    font-size: 17px;
    font-weight: 900;
    color: var(--brand-deep);
    line-height: 1.35;
    letter-spacing: -0.03em;
}
.stage2-detail-close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: #f1f5f9;
    color: #475569;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
}
.stage2-detail-close:active { background: #e2e8f0; }
.stage2-detail-body {
    padding: 16px 18px 22px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 14px;
    color: #334155;
}
.stage2-detail-score-pill {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 14px;
    font-weight: 900;
    margin-bottom: 14px;
}
.stage2-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
@media (max-width: 400px) {
    .stage2-detail-grid { grid-template-columns: 1fr; }
}
.stage2-detail-cell {
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.stage2-detail-cell .lbl { font-size: 11px; font-weight: 700; color: #64748b; display: block; margin-bottom: 4px; }
.stage2-detail-cell .val { font-size: 15px; font-weight: 800; color: #0f172a; }
.stage2-detail-section-title {
    font-size: 13px;
    font-weight: 900;
    color: #0f172a;
    margin: 18px 0 8px;
    padding-left: 8px;
    border-left: 4px solid var(--brand-deep);
}
.stage2-detail-formula {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #cbd5e1;
    font-size: 13px;
    font-weight: 600;
}
.stage2-detail-formula-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 8px;
}
.stage2-detail-formula-row:last-child { border-bottom: none; padding-bottom: 0; }
.stage2-detail-rationale {
    padding: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-mint-soft) 0%, #fff 100%);
    border: 1px solid rgba(46, 196, 182, 0.35);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.65;
    color: #134e4a;
}
.stage2-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}
.stage2-detail-actions button {
    flex: 1;
    min-width: 140px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    border: none;
}
.stage2-detail-actions .btn-map {
    background: var(--brand-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 64, 133, 0.25);
}
.stage2-detail-actions .btn-map:hover { background: var(--brand-dark); }
.stage2-detail-actions .btn-rv {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
}
.stage2-detail-actions .btn-naver-land {
    background: linear-gradient(135deg, #03c75a, #02a54a);
    color: #fff;
    box-shadow: 0 4px 12px rgba(3, 199, 90, 0.28);
}
.stage2-detail-actions .btn-naver-land:hover:not(:disabled) {
    filter: brightness(1.05);
}
.stage2-detail-actions .btn-naver-land:disabled {
    background: #cbd5e1;
    color: #64748b;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.85;
}
.stage2-detail-actions .btn-close2 {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
}

/* 로드뷰 모달 */
.stage2-rv-overlay {
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}
.stage2-rv-sheet {
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.stage2-rv-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #0f172a;
    color: #fff;
}
.stage2-rv-title { font-size: 15px; font-weight: 900; }
.stage2-rv-toolbar .stage2-detail-close {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.stage2-rv-hint {
    margin: 0;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background: #f8fafc;
    line-height: 1.5;
}
.stage2-rv-container {
    width: 100%;
    height: min(50vh, 420px);
    min-height: 240px;
    background: #1e293b;
}
.stage2-rv-fallback {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
}
.stage2-rv-future {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
}

/* 지도 우클릭 → 2단계 메뉴 */
.stage2-rclick-menu {
    position: fixed;
    z-index: 8550;
    min-width: 200px;
    padding: 6px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
    border: 1px solid #e2e8f0;
}
.stage2-rclick-menu-btn {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
}
.stage2-rclick-menu-btn:hover {
    filter: brightness(1.06);
}
.stage2-rclick-menu-btn:active {
    transform: scale(0.98);
}

/* 2단계 추천 건물: 로드뷰 + 층 스캔 + 상세 */
.stage2-exp-overlay {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(15, 23, 42, 0.55);
}
.stage2-exp-sheet {
    width: 100%;
    max-width: 720px;
    max-height: min(94vh, 920px);
    overflow: auto;
    background: #f8fafc;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
}
.stage2-exp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 2;
}
.stage2-exp-title {
    margin: 0;
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
}
.stage2-exp-lead {
    margin: 0;
    padding: 12px 18px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.55;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}
.stage2-exp-rv-container {
    width: 100%;
    height: min(42vh, 360px);
    min-height: 220px;
    background: #1e293b;
}
.stage2-exp-body {
    padding: 0 0 24px;
}
.stage2-exp-rise-block {
    margin: 16px 18px 0;
    padding: 18px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}
.stage2-exp-rise-block .retail-rise-scene {
    max-width: 100%;
}
.stage2-exp-detail-wrap {
    padding: 0 18px;
}
.stage2-exp-detail-wrap .stage2-detail-score-pill {
    margin-top: 16px;
}
.stage2-exp-detail-wrap .stage2-detail-actions {
    margin-top: 18px;
}

.results-card-slider { 
    pointer-events: auto; /* 카드는 스와이프/클릭 되어야 함 */
    display: flex; gap: 10px; overflow-x: auto; 
    padding: 0 12px 10px 12px; 
    scroll-snap-type: x mandatory; scrollbar-width: none; 
}
.results-card-slider::-webkit-scrollbar { display: none; }
/* 1단계 Top5: 가로 스크롤이 보이도록(4·5위 발견) */
.results-card-slider--stage1 {
    scroll-padding-inline: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 64, 133, 0.45) rgba(15, 23, 42, 0.06);
}
.results-card-slider--stage1::-webkit-scrollbar {
    display: block;
    height: 8px;
}
.results-card-slider--stage1::-webkit-scrollbar-thumb {
    background: rgba(0, 64, 133, 0.42);
    border-radius: 6px;
}
.results-card-slider--stage1::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 6px;
}
/* 1단계 Top5가 정확히 5개일 때: 패널 가로를 5등분해 카드가 한 줄에 가득 차게 */
.results-card-slider--stage1.results-card-slider--stage1-five {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    overflow-x: visible;
    scroll-snap-type: none;
    padding: 0 10px 10px;
}
.results-card-slider--stage1.results-card-slider--stage1-five::-webkit-scrollbar {
    display: none;
    height: 0;
}
.results-card-slider--stage1.results-card-slider--stage1-five .result-card--compact {
    min-width: 0;
    max-width: none;
    width: 100%;
    scroll-snap-align: unset;
}
@media (max-width: 1024px) {
    .results-card-slider--stage1.results-card-slider--stage1-five {
        grid-template-columns: repeat(5, minmax(120px, 1fr));
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
    .results-card-slider--stage1.results-card-slider--stage1-five .result-card--compact {
        scroll-snap-align: start;
        min-width: 120px;
    }
}
.results-card-scroll-hint {
    margin: 0 12px 6px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(15, 61, 102, 0.12);
    border: 1px solid rgba(0, 64, 133, 0.15);
    font-size: 11px;
    font-weight: 800;
    color: var(--brand-deep);
    text-align: center;
    letter-spacing: -0.02em;
}
.results-card-scroll-hint strong { color: #0e7490; }
.result-card { 
    background: white; border-radius: 20px; padding: 20px; 
    min-width: 290px; flex-shrink: 0; scroll-snap-align: start; 
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1); border: 1px solid var(--border-color); 
}
.results-card-slider--stage1 .result-card--compact {
    min-width: 176px;
    max-width: 204px;
    flex-shrink: 0;
    padding: 10px 12px;
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(0, 64, 133, 0.08);
    border: 1px solid #E8EEF4;
    /* 패널 높이 한정 시 하단 버튼까지: 세로 스크롤(바 숨김) + 드래그 스크롤은 app.js */
    max-height: min(46vh, 420px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
    touch-action: pan-y;
    cursor: grab;
}
.results-card-slider--stage1 .result-card--compact::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}
.results-card-slider--stage1 .result-card--compact.result-card--dragging {
    cursor: grabbing;
    user-select: none;
}
.results-card-slider--stage1 .result-card--compact .rc-top { margin-bottom: 8px; }
.results-card-slider--stage1 .result-card--compact .rc-title { font-size: 13px; }
.results-card-slider--stage1 .result-card--compact .rc-rank { width: 26px; height: 26px; font-size: 12px; }
.results-card-slider--stage1 .result-card--compact .rc-info-row { font-size: 11px; margin-bottom: 4px; }
.results-card-slider--stage1 .result-card--compact .rc-premium-box { padding: 6px 8px; margin-top: 2px; }
.results-card-slider--stage1 .result-card--compact .premium-item { font-size: 10px; }
.results-card-slider--stage1 .result-card--compact .rc-btn { margin-top: 8px; padding: 9px 10px; font-size: 12px; }
.results-card-slider--stage1 .result-card--compact .rc-score-hero {
    margin: 2px 0 8px;
    padding: 8px 10px;
    border-radius: 12px;
}
.results-card-slider--stage1 .result-card--compact .rc-score-hero__value { font-size: 22px; }
.results-card-slider--stage1 .result-card--compact .rc-meta-badge { margin-bottom: 6px; padding: 4px 8px; font-size: 10px; }
.results-card-slider--stage1 .result-card--compact .rc-link-foot { margin-top: 4px; font-size: 10px; }
.rc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.rc-rank { background: var(--text-main); color: white; width: 30px; height: 30px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: 900; font-size: 15px; }
.rc-title { font-size: 18px; font-weight: 800; color: var(--text-main); letter-spacing: -0.5px; }
.rc-info-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; align-items: center; }
.rc-label { color: var(--text-sub); font-weight: 600; }
.rc-value { color: var(--text-main); font-weight: 800; text-align: right; }
.rc-btn { width: 100%; background: var(--brand-primary); border: none; padding: 13px 14px; border-radius: 12px; margin-top: 14px; font-size: 13px; font-weight: 800; color: #fff; cursor: pointer; transition: 0.2s; box-shadow: 0 4px 14px rgba(0, 64, 133, 0.25); letter-spacing: -0.02em; }
.rc-btn:hover { background: var(--brand-dark); }
.rc-btn:active { transform: scale(0.99); }

/* 1단계 결과 카드: 히어로 점수 · 메타 뱃지 · 하단 링크 톤 */
.rc-score-hero {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 4px 0 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-light) 0%, #fff 100%);
    border: 1px solid rgba(0, 64, 133, 0.1);
}
.rc-score-hero__label { font-size: 11px; font-weight: 800; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.04em; }
.rc-score-hero__value { font-size: 28px; font-weight: 900; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.rc-score-hero__suffix { font-size: 14px; font-weight: 800; opacity: 0.85; margin-left: 2px; }
.rc-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    color: var(--brand-deep);
    background: #fff;
    border: 1px solid rgba(0, 64, 133, 0.12);
    padding: 6px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

/* 1단계: SNS·핫플 트렌드 유동성 */
.rc-trend-block {
    margin: 6px 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.rc-trend-block--muted {
    background: #fafbfc;
    border-style: dashed;
}
.rc-trend-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.rc-trend-badge {
    font-size: 11px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.rc-trend-scoreline {
    font-size: 12px;
    font-weight: 900;
    color: #c2410c;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}
.rc-trend-bar {
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}
.rc-trend-bar__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #1e3a8a 0%, #fb7185 100%);
    transition: width 0.35s ease;
}
.rc-trend-foot {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-sub);
    margin-top: 6px;
    text-align: right;
    letter-spacing: -0.02em;
}
.rc-seoul-fp-details {
    margin: 0 0 10px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fefce8;
    border: 1px solid #fde047;
    font-size: 10px;
}
.rc-seoul-fp-summary {
    cursor: pointer;
    font-weight: 800;
    color: #713f12;
    letter-spacing: -0.02em;
}
.rc-seoul-fp-body {
    margin-top: 8px;
    line-height: 1.45;
    color: #422006;
    font-weight: 600;
    word-break: break-word;
}
.rc-trend-empty {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-sub);
    line-height: 1.45;
}
.results-card-slider--stage1 .result-card--compact .rc-trend-block {
    padding: 6px 8px;
    margin: 2px 0 6px;
}
.results-card-slider--stage1 .result-card--compact .rc-trend-head { margin-bottom: 4px; }
.results-card-slider--stage1 .result-card--compact .rc-trend-foot { margin-top: 4px; font-size: 9px; }
.results-card-slider--stage1 .result-card--compact .rc-trend-scoreline { font-size: 10px; }
.results-card-slider--stage1 .result-card--compact .rc-subway-block {
    margin: 0 0 6px;
    padding: 6px 8px;
}
.results-card-slider--stage1 .result-card--compact .rc-subway-lines { font-size: 11px; }
.results-card-slider--stage1 .result-card--compact .rc-subway-lines--sub { font-size: 10px; margin-top: 2px; }
.results-card-slider--stage1 .result-card--compact .rc-subway-foot { margin-top: 4px; font-size: 9px; }
.results-card-slider--stage1 .result-card--compact .rc-vitality-block .rc-subway-lines { font-size: 11px; }

/* 1단계: 지하철 역세권 유동 (ES1007BD) */
.rc-subway-block {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border: 1px solid #bfdbfe;
}
.rc-subway-block--muted {
    background: #fafbfc;
    border: 1px dashed #cbd5e1;
}
.rc-subway-head { margin-bottom: 6px; }
.rc-subway-badge {
    font-size: 11px;
    font-weight: 900;
    color: #1e40af;
    letter-spacing: -0.02em;
}
.rc-subway-lines {
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    letter-spacing: -0.02em;
}
.rc-subway-lines--sub { font-size: 11px; font-weight: 700; color: #334155; margin-top: 4px; }
.rc-subway-foot {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-sub);
    margin-top: 6px;
    text-align: right;
}
.rc-subway-empty { margin: 0; font-size: 11px; font-weight: 600; color: var(--text-sub); line-height: 1.45; }
.rc-subway-bar { margin-top: 8px; }
.rc-subway-bar__fill { background: linear-gradient(90deg, #1d4ed8 0%, #38bdf8 100%); }

.rc-link-foot {
    display: block;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-sub);
    margin-top: 8px;
    letter-spacing: -0.02em;
}

/* AI CFO Phase 1 확장 그리드 */
.cfo-phase1-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 720px) {
    .cfo-phase1-grid { grid-template-columns: 1fr !important; }
    #cfo-walkable-box { grid-column: auto !important; }
}
/* =========================================================
   🚀 [UI 업그레이드] 중앙 타겟 마커 -> 스카이블루 탐색(조사) 핀
   ========================================================= */

.map-crosshair {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 48px !important;
    height: 48px !important;
    transform: translate(-50%, -100%) !important; 
    z-index: 100 !important;
    pointer-events: none !important; 
    
    background: transparent !important;
    border: none !important;
    
    /* 💡 파란 거꾸로 된 원뿔(드롭)만 — 돋보기 제거 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='%23004085' d='M172.268 501.67C26.97 291.031 0 269.413 0 192 0 85.961 85.961 0 192 0s192 85.961 192 192c0 77.413-26.97 99.031-172.268 309.67-9.535 13.774-29.93 13.773-39.464 0z'/%3E%3C/svg%3E") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center bottom !important;
    
    /* 둥둥 뜨는 애니메이션 */
    animation: floatingPin 2s infinite ease-in-out !important;
}

/* 기존 십자가 라인 제거 */
.map-crosshair::before {
    display: none !important;
}

/* 🚀 디테일 끝판왕: 핀 아래에 생기는 그림자도 하늘색 톤으로 맞춤 */
.map-crosshair::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    bottom: -4px !important;
    left: 50% !important;
    width: 18px !important;
    height: 6px !important;
    background: rgba(0, 64, 133, 0.28) !important;
    border-radius: 50% !important;
    filter: blur(2px) !important;
    z-index: -1 !important;
    animation: shadowPulse 2s infinite ease-in-out !important;
}

/* 마커 위아래 바운스 효과 */
@keyframes floatingPin {
    0%, 100% { transform: translate(-50%, -100%) translateY(0); }
    50% { transform: translate(-50%, -100%) translateY(-8px); }
}

/* 그림자 크기 변화 효과 */
@keyframes shadowPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.8; }
    50% { transform: translateX(-50%) scale(0.6); opacity: 0.3; }
}

/* =========================================================
   미시 입지 (클릭 분석)
   ========================================================= */
.ctrl-btn.micro-pick-btn { font-size: 18px; }
.ctrl-btn.micro-active {
    border: 2px solid var(--brand-primary);
    background: rgba(6, 182, 212, 0.12);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.25);
}

.micro-site-hint {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: calc(var(--topbar-height) + 12px);
    z-index: 60;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 14px;
    max-width: calc(100% - 24px);
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: var(--shadow-floating);
}
.micro-site-hint-text strong { color: #5eead4; }
.micro-site-hint-radius { display: flex; align-items: center; gap: 6px; font-weight: 600; color: #cbd5e1; }
.micro-site-radius-select {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #475569;
    background: #1e293b;
    color: #f1f5f9;
    font-weight: 700;
}
.micro-site-hint-cancel {
    padding: 6px 12px;
    border-radius: 8px;
    border: none;
    background: #334155;
    color: #e2e8f0;
    font-weight: 800;
    cursor: pointer;
}

.ctrl-btn.nearest-pick-btn {
    font-size: 14px;
    font-weight: 900;
}
.ctrl-btn.nearest-active {
    border: 2px solid #d97706;
    background: rgba(245, 158, 11, 0.14);
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.25);
}
.nearest-commercial-hint .micro-site-hint-text strong { color: #fbbf24; }

.micro-site-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: 600px;
    margin: 0 auto;
    z-index: 90;
    max-height: min(52vh, 420px);
    background: var(--bg-main);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 12px);
}
.micro-site-panel-drag {
    width: 40px;
    height: 5px;
    border-radius: 99px;
    background: #cbd5e1;
    margin: 10px auto 6px;
}
.micro-site-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 18px 10px;
    border-bottom: 1px solid var(--border-color);
}
.micro-site-panel-title { font-size: 17px; font-weight: 900; color: #0f172a; }
.micro-site-panel-sub { font-size: 11px; color: #64748b; font-weight: 600; margin-top: 4px; }
.micro-site-panel-close {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
    color: #475569;
    font-weight: 800;
}
.micro-site-panel-body {
    overflow-y: auto;
    padding: 14px 18px 18px;
    font-size: 13px;
    line-height: 1.55;
}
.micro-site-loading, .micro-err { margin: 0; color: #64748b; font-weight: 600; }
.micro-err { color: #b91c1c; }

.micro-score-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.micro-grade {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
}
.micro-grade[data-grade="S"] { background: linear-gradient(135deg, #059669, #10b981); }
.micro-grade[data-grade="A"] { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.micro-grade[data-grade="B"] { background: linear-gradient(135deg, #d97706, #f59e0b); }
.micro-grade[data-grade="C"] { background: linear-gradient(135deg, #64748b, #94a3b8); }
.micro-score-val { font-size: 22px; font-weight: 900; color: #0f172a; }
.micro-score-unit { font-size: 13px; color: #64748b; font-weight: 700; }
.micro-grade-ko { font-size: 13px; font-weight: 800; color: var(--brand-dark); margin-left: 6px; }
.micro-narrative { margin: 8px 0 0; color: #334155; font-weight: 600; font-size: 12px; }

.micro-section { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e2e8f0; }
.micro-section-title { font-size: 12px; font-weight: 900; color: #0f172a; margin-bottom: 6px; }
.micro-muted { font-size: 12px; color: #64748b; margin: 4px 0; font-weight: 600; }
.micro-warn { font-size: 11px; color: #b45309; margin-top: 8px; font-weight: 700; }
.micro-list { display: flex; flex-direction: column; gap: 4px; }
.micro-line { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.micro-line-name { font-weight: 700; color: #1e293b; flex: 1; }
.micro-line-meta { color: #94a3b8; font-weight: 600; flex-shrink: 0; }
.micro-disclaimer { margin-top: 14px; font-size: 10px; color: #94a3b8; font-weight: 600; line-height: 1.45; }

/* =========================================================
   [리포트] 에디토리얼 타이포 · 툴바 · 알고리즘 분해 · 체크포인트
   ========================================================= */
#report-modal {
    background: #3d4a5c;
}
.a4-paper.report-editorial {
    color: #1e293b;
    padding: 18mm 20mm 22mm;
    line-height: 1.65;
}
.report-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e2e8f0;
}
.report-toolbar-note {
    font-size: 12px;
    color: var(--text-sub);
    font-weight: 600;
    max-width: 280px;
    line-height: 1.5;
}
.report-toolbar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.btn-report-primary {
    padding: 11px 18px;
    background: var(--brand-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(0, 64, 133, 0.22);
    transition: background 0.2s, transform 0.15s;
}
.btn-report-primary:hover { background: var(--brand-dark); }
.btn-report-primary:active { transform: scale(0.98); }
.btn-report-save {
    padding: 11px 16px;
    background: var(--accent-mint);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}
.btn-report-ghost {
    padding: 11px 16px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}
.report-hero-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-mint);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.report-h1 {
    font-size: 26px;
    font-weight: 900;
    color: var(--brand-deep);
    letter-spacing: -0.04em;
    line-height: 1.2;
    padding-bottom: 14px;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--brand-deep);
}
.report-h3 {
    font-size: 15px;
    font-weight: 900;
    margin: 0 0 14px;
    padding-left: 10px;
    border-left: 4px solid var(--brand-deep);
    color: #0f172a;
    letter-spacing: -0.02em;
}
.report-h3--mint { border-left-color: var(--accent-mint); }

/* 리포트: 요약 · 데이터 근거 · 면책 · 부록 · 푸터 메타 */
.report-exec-summary {
    margin-bottom: 22px;
    padding: 16px 18px;
    border-radius: 14px;
    border: 1px solid #bae6fd;
    background: linear-gradient(135deg, #f0f9ff 0%, #f8fafc 100%);
}
.report-exec-summary__meta {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
}
.report-exec-summary__list {
    margin: 0;
    padding-left: 18px;
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    line-height: 1.55;
}
.report-exec-summary__list li { margin-bottom: 8px; }
.report-exec-summary__k {
    display: inline-block;
    min-width: 7.5em;
    color: #0369a1;
    font-weight: 800;
}

.report-data-trust-lead {
    font-size: 12px;
    color: #475569;
    font-weight: 600;
    margin: 0 0 12px;
    line-height: 1.55;
}
.report-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-bottom: 12px;
}
.report-data-table th,
.report-data-table td {
    border: 1px solid #e2e8f0;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}
.report-data-table thead th {
    background: #f8fafc;
    font-weight: 800;
    color: #0f172a;
}
.report-data-table__ok {
    font-weight: 900;
    color: #047857;
    white-space: nowrap;
    width: 4.5em;
}
.report-trust-rationale {
    margin-top: 4px;
}
.report-trust-rationale__p {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    line-height: 1.55;
}
.report-bep-note__p {
    margin: 0;
    font-size: 10.5px;
    color: #64748b;
    font-weight: 600;
    line-height: 1.5;
}

.report-disclaimer-legal {
    margin: 18px 0 8px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
}
.report-disclaimer-legal__p {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: #78350f;
    line-height: 1.55;
}

.report-appendix {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 2px dashed #cbd5e1;
}
.report-appendix__title {
    border-left-color: #64748b !important;
    color: #334155 !important;
}
.report-appendix__lead {
    font-size: 11.5px;
    color: #475569;
    font-weight: 600;
    line-height: 1.55;
    margin: 0 0 10px;
}
.report-appendix-list {
    margin: 0;
    padding-left: 18px;
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    line-height: 1.6;
}
.report-appendix-list li { margin-bottom: 8px; }
.report-appendix__foot {
    margin: 12px 0 0;
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
}

.report-footer-meta {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}
.report-generated-line {
    font-size: 11px;
    color: #475569;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.55;
}
.report-id-code {
    font-family: ui-monospace, monospace;
    font-size: 10px;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
}
.report-footer-meta__legal {
    font-size: 10.5px;
    color: #64748b;
    font-weight: 600;
    line-height: 1.55;
    margin: 0 0 10px;
}
.report-footer-meta__brand {
    margin: 0;
    font-size: 11px;
    color: #94a3b8;
}

@media print {
    .report-exec-summary,
    .report-data-trust-block,
    .report-disclaimer-legal,
    .report-appendix,
    .report-footer-meta {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .report-data-table { font-size: 9.5px; }
    .report-data-table th,
    .report-data-table td { padding: 5px 6px; }
}

.radar-chart-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 16px 14px;
    background: linear-gradient(180deg, #fafbfc 0%, #fff 100%);
}
.radar-chart-card__title {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #475569;
    text-align: center;
    letter-spacing: -0.02em;
}
.radar-chart-card__canvas {
    height: 260px;
    position: relative;
}
.radar-chart-card__foot {
    font-size: 10px;
    color: #94a3b8;
    text-align: center;
    margin-top: 8px;
    font-weight: 600;
}
.algo-breakdown-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
}
.algo-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}
.algo-row:last-child { border-bottom: none; }
.algo-row__label { flex: 1; line-height: 1.45; }
.algo-row__val {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.algo-row--plus .algo-row__val { color: #059669; }
.algo-row--minus .algo-row__val { color: #dc2626; }
.algo-row--divider-top {
    border-top: 1px dashed #e2e8f0 !important;
    margin-top: 6px;
    padding-top: 14px;
}
.algo-row--sns .algo-row__val { color: #0d9488 !important; }
.algo-row--subway .algo-row__val { color: #1d4ed8 !important; }
.algo-narrative-block--subway {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border-color: #bfdbfe;
}
.algo-row__val--wrap {
    white-space: normal !important;
    text-align: right !important;
    max-width: 56%;
    line-height: 1.45;
    font-size: 12px !important;
    font-weight: 800 !important;
}
.algo-narrative-block {
    margin: 4px 0 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f0fdfa 0%, #f8fafc 100%);
    border: 1px solid #ccfbf1;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.report-section.report-checkpoint {
    border-bottom: none;
    padding-bottom: 8px;
}
.report-checkpoint {
    border: 1px solid #fecaca !important;
    border-radius: 14px !important;
    background: linear-gradient(180deg, #fff5f5 0%, #fef2f2 100%) !important;
    padding: 20px 22px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.report-checkpoint__title {
    font-size: 15px;
    font-weight: 900;
    margin: 0 0 12px;
    color: #991b1b;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}
.report-checkpoint__icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #fee2e2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.report-checkpoint-list {
    margin: 0;
    padding-left: 22px;
    color: #7f1d1d;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.75;
}
.report-checkpoint-list li { margin-bottom: 6px; }
.report-checkpoint-empty {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}

/* 정밀 리포트 모달 내 2단계 CTA 카드 */
.report-stage2-card {
    border: 1px solid rgba(0, 64, 133, 0.16);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand-light) 0%, #fff 55%);
    padding: 20px 22px;
    box-shadow: 0 6px 22px rgba(0, 64, 133, 0.08);
}
.report-stage2-card__title {
    font-size: 16px;
    font-weight: 900;
    margin: 0 0 10px;
    color: var(--brand-deep);
    padding-left: 10px;
    border-left: 4px solid var(--accent-mint);
    letter-spacing: -0.03em;
    line-height: 1.3;
}
.report-stage2-card__lead {
    font-size: 13px;
    color: #334155;
    line-height: 1.65;
    font-weight: 600;
    margin: 0 0 16px;
}
.report-stage2-card__done {
    font-size: 13px;
    font-weight: 700;
    color: #0f766e;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--accent-mint-soft);
    border: 1px solid rgba(46, 196, 182, 0.35);
}

.bep-table-wrap table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}
.bep-table-wrap tr td {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}
.bep-table-wrap tr:last-child td { border-bottom: none; }

/* ---------- DB 상가 매물 레이어 (의사 3D + 상세 시트) ---------- */
.ctrl-btn.retail-db-toggle { font-size: 17px; line-height: 1; }
.ctrl-btn.retail-layer-off {
    opacity: 0.42;
    filter: grayscale(0.35);
}
.retail-building-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    user-select: none;
    filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.35));
}
.retail-3d-prism-wrap {
    perspective: 180px;
    perspective-origin: 50% 100%;
    height: calc(var(--prism-h, 32px) + 8px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.retail-3d-prism {
    width: 34px;
    height: var(--prism-h, 32px);
    background: linear-gradient(135deg, #64748b 0%, #334155 45%, #1e293b 100%);
    transform: rotateX(-52deg) rotateZ(-6deg);
    transform-style: preserve-3d;
    border-radius: 3px 3px 0 0;
    box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.25), 3px 4px 0 rgba(15, 23, 42, 0.35);
}
.retail-3d-caption {
    min-width: 100px;
    max-width: 160px;
    padding: 4px 8px 5px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(6, 182, 212, 0.45);
    text-align: center;
    line-height: 1.2;
}
.retail-3d-caption strong {
    display: block;
    font-size: 10px;
    font-weight: 900;
    color: #5eead4;
}
.retail-3d-caption span {
    font-size: 9px;
    font-weight: 700;
    color: #cbd5e1;
}
.retail-listing-overlay {
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}
@media (min-width: 640px) {
    .retail-listing-overlay {
        align-items: center;
        padding: 20px;
    }
}
.retail-listing-sheet {
    width: 100%;
    max-width: 420px;
    max-height: min(88vh, 640px);
    overflow: auto;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.2);
}
@media (min-width: 640px) {
    .retail-listing-sheet {
        border-radius: 20px;
    }
}
.retail-listing-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.retail-listing-modal-title {
    font-size: 15px;
    font-weight: 900;
    color: var(--brand-deep);
    margin: 0;
}
.retail-listing-body {
    padding: 16px 18px 22px;
    font-size: 13px;
    color: #334155;
}
.retail-d-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.retail-d-3d {
    flex-shrink: 0;
    perspective: 220px;
    perspective-origin: 50% 100%;
    height: calc(var(--big-h, 72px) + 12px);
    display: flex;
    align-items: flex-end;
}
.retail-3d-prism--large {
    width: 52px;
    height: var(--big-h, 72px);
    transform: rotateX(-50deg) rotateZ(-8deg);
}
.retail-d-title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.3;
}
.retail-d-loc {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.5;
}
.retail-d-floor {
    margin: 0;
    font-size: 13px;
    color: #0f172a;
}
.retail-d-notes {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.55;
    margin: 0 0 14px;
}
.retail-d-section-title {
    font-size: 12px;
    font-weight: 900;
    color: var(--brand-deep);
    margin: 0 0 8px;
}
.retail-d-comp-list {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
}
.retail-d-comp-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 12px;
    font-weight: 700;
}
.retail-d-comp-name { color: #0f172a; }
.retail-d-comp-m { color: #059669; font-weight: 800; }
.retail-d-comp-k { color: #94a3b8; font-size: 11px; }
.retail-d-muted { color: #94a3b8; font-weight: 600; }
.retail-d-hint {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.5;
}
.retail-d-hint code {
    font-size: 10px;
    background: #f1f5f9;
    padding: 1px 4px;
    border-radius: 4px;
}

/* ---------- 건물 인사이트: 층 상승 애니메이션 + 데이터 오버레이 ---------- */
.retail-insight-hero {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(0, 1.2fr);
    gap: 14px;
    margin-bottom: 14px;
    align-items: end;
}
@media (max-width: 520px) {
    .retail-insight-hero {
        grid-template-columns: 1fr;
    }
}
.retail-rise-scene {
    position: relative;
    height: 210px;
    border-radius: 16px;
    background: linear-gradient(180deg, #020617 0%, #0f172a 38%, #1e3a5f 72%, #334155 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 14px 0;
    box-shadow:
        inset 0 0 50px rgba(6, 182, 212, 0.14),
        0 12px 28px rgba(15, 23, 42, 0.35);
}
.retail-rise-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 80% 55% at 50% 100%, transparent 30%, rgba(2, 6, 23, 0.65) 100%);
}
.retail-rise-beam {
    position: absolute;
    left: 50%;
    bottom: 18%;
    width: 4px;
    height: 55%;
    margin-left: -2px;
    transform-origin: bottom center;
    background: linear-gradient(180deg, rgba(34, 211, 238, 0), rgba(34, 211, 238, 0.35) 40%, rgba(94, 234, 212, 0.5));
    filter: blur(1px);
    opacity: 0;
    animation: retailRiseBeam 1.1s ease 0.15s forwards;
    border-radius: 99px;
}
@keyframes retailRiseBeam {
    from { opacity: 0; transform: scaleY(0.15); }
    to { opacity: 1; transform: scaleY(1); }
}
.retail-rise-stack {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 3px;
    width: 100%;
    max-height: 172px;
    overflow: hidden;
    padding-bottom: 2px;
}
.retail-rise-slab {
    height: 11px;
    width: var(--rs-w, 52px);
    max-width: 100%;
    border-radius: 3px;
    position: relative;
    opacity: 0;
    transform: translateY(36px) scaleX(0.82);
    animation: retailRiseSlab 0.52s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--rs-delay, 0s);
}
.retail-rise-slab-inner {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #475569 0%, #94a3b8 48%, #cbd5e1 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        2px 3px 5px rgba(0, 0, 0, 0.4);
}
.retail-rise-slab--listing .retail-rise-slab-inner {
    background: linear-gradient(90deg, #0e7490 0%, #22d3ee 55%, #5eead4 100%);
    box-shadow:
        0 0 14px rgba(34, 211, 238, 0.55),
        0 1px 0 rgba(255, 255, 255, 0.35) inset;
}
.retail-rise-pin {
    position: absolute;
    left: 50%;
    top: -16px;
    transform: translateX(-50%);
    font-size: 9px;
    font-style: normal;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #0e7490, #0891b2);
    padding: 3px 7px;
    border-radius: 6px;
    white-space: nowrap;
    letter-spacing: -0.02em;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.45);
    animation: retailPinBob 2.2s ease-in-out 0.6s infinite;
}
@keyframes retailPinBob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-3px); }
}
@keyframes retailRiseSlab {
    to {
        opacity: 1;
        transform: translateY(0) scaleX(1);
    }
}
.retail-rise-ground {
    position: relative;
    z-index: 2;
    height: 12px;
    width: 88%;
    margin-top: 4px;
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.45);
}
.retail-insight-hero-text {
    padding-bottom: 4px;
}
.retail-insight-kicker {
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}
.retail-d-title--tight {
    margin-bottom: 4px;
}
.retail-rise-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 0;
    padding: 0;
}
.retail-rise-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 7px 11px;
    border-radius: 11px;
    background: #f1f5f9;
    font-weight: 700;
    color: #475569;
    border: 1px solid #e2e8f0;
    opacity: 0;
    transform: translateY(10px);
    animation: retailChipIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.retail-rise-chip--floor {
    animation-delay: 0.48s;
}
.retail-rise-chip--rival {
    animation-delay: 0.58s;
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}
.retail-rise-chip strong {
    color: #0f172a;
    font-weight: 900;
}
.retail-rise-chip--rival strong {
    color: #c2410c;
}
@keyframes retailChipIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.retail-d-loc--block {
    margin-bottom: 10px;
}
.retail-d-meta-line {
    margin: 0 0 12px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.45;
}
.retail-d-comp-li-animate {
    opacity: 0;
    transform: translateX(-14px);
    animation: retailCompIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--li-delay, 0s);
}
@keyframes retailCompIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---------- 2단계: 카카오맵 위 8층 건물 상승 + 입지 요약 ---------- */
.s2map-tower-anchor {
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
    filter: drop-shadow(0 18px 28px rgba(15, 23, 42, 0.35));
}
.s2map-tower-card {
    position: relative;
    width: min(92vw, 340px);
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    overflow: hidden;
}
.s2map-tower-x {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 10px;
    background: rgba(248, 250, 252, 0.95);
    color: #64748b;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
}
.s2map-tower-x:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.s2map-tower-grid {
    display: grid;
    grid-template-columns: minmax(118px, 1fr) minmax(0, 1.35fr);
    gap: 0;
    align-items: end;
}
@media (max-width: 380px) {
    .s2map-tower-grid {
        grid-template-columns: 1fr;
    }
}
.s2map-tower-scene {
    position: relative;
    min-height: 200px;
    background: linear-gradient(180deg, #020617 0%, #0f172a 42%, #1e3a5f 78%, #334155 100%);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 10px 0;
    transform-origin: 50% 100%;
    animation: s2mapTowerSceneIn 0.88s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes s2mapTowerSceneIn {
    from {
        opacity: 0;
        transform: perspective(420px) rotateX(22deg) scaleY(0.42) translateY(28px);
    }
    to {
        opacity: 1;
        transform: perspective(420px) rotateX(11deg) scaleY(1) translateY(0);
    }
}
.s2map-tower-vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 85% 60% at 50% 100%, transparent 25%, rgba(2, 6, 23, 0.72) 100%);
}
.s2map-tower-beam {
    position: absolute;
    left: 50%;
    bottom: 20%;
    width: 5px;
    height: 58%;
    margin-left: -2.5px;
    transform-origin: bottom center;
    background: linear-gradient(180deg, rgba(34, 211, 238, 0), rgba(34, 211, 238, 0.4) 42%, rgba(94, 234, 212, 0.55));
    filter: blur(1px);
    opacity: 0;
    animation: retailRiseBeam 1s ease 0.12s forwards;
    border-radius: 99px;
}
.s2map-rise-stack {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 3px;
    width: 100%;
    max-height: 168px;
    overflow: visible;
    padding-bottom: 2px;
}
.s2map-rise-slab {
    height: 13px;
    width: var(--rs-w, 56px);
    max-width: 100%;
    border-radius: 3px;
    position: relative;
    opacity: 0;
    transform: translateY(40px) scaleX(0.78);
    animation: retailRiseSlab 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--rs-delay, 0s);
}
.s2map-rise-slab-inner {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #475569 0%, #94a3b8 48%, #cbd5e1 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.2) inset,
        2px 3px 6px rgba(0, 0, 0, 0.45);
}
.s2map-rise-slab--rec .s2map-rise-slab-inner {
    background: linear-gradient(90deg, #0e7490 0%, #22d3ee 52%, #5eead4 100%);
    box-shadow:
        0 0 16px rgba(34, 211, 238, 0.55),
        0 1px 0 rgba(255, 255, 255, 0.35) inset;
}
.s2map-rise-slab--rival .s2map-rise-slab-inner {
    background: linear-gradient(90deg, #9a3412 0%, #ea580c 50%, #fb923c 100%);
    box-shadow:
        0 0 12px rgba(234, 88, 12, 0.45),
        0 1px 0 rgba(255, 255, 255, 0.2) inset;
}
.s2map-rise-fl {
    position: absolute;
    left: -2px;
    top: 50%;
    transform: translate(-100%, -50%);
    font-size: 8px;
    font-weight: 900;
    color: rgba(226, 232, 240, 0.85);
    letter-spacing: -0.04em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    width: 22px;
    text-align: right;
}
.s2map-rise-tag {
    position: absolute;
    right: -2px;
    top: 50%;
    transform: translate(100%, -50%);
    font-size: 8px;
    font-style: normal;
    font-weight: 900;
    padding: 2px 5px;
    border-radius: 5px;
    white-space: nowrap;
    letter-spacing: -0.03em;
    pointer-events: none;
}
.s2map-rise-tag--rec {
    color: #fff;
    background: linear-gradient(135deg, #0e7490, #0891b2);
    box-shadow: 0 3px 10px rgba(8, 145, 178, 0.5);
}
.s2map-rise-tag--rival {
    color: #fff;
    background: linear-gradient(135deg, #c2410c, #ea580c);
    box-shadow: 0 3px 10px rgba(234, 88, 12, 0.45);
}
.s2map-tower-ground {
    position: relative;
    z-index: 2;
    height: 11px;
    width: 86%;
    margin-top: 4px;
    background: linear-gradient(180deg, #1e293b, #0f172a);
    border-radius: 4px 4px 0 0;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.5);
}
.s2map-tower-info {
    padding: 14px 14px 14px 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 40%);
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
@media (max-width: 380px) {
    .s2map-tower-info {
        border-left: none;
        border-top: 1px solid #e2e8f0;
    }
}
.s2map-tower-kicker {
    margin: 0;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}
.s2map-tower-title {
    margin: 0;
    font-size: 14px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.25;
    padding-right: 28px;
}
.s2map-tower-sub {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.s2map-tower-scoreline {
    margin: 2px 0 0;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
}
.s2map-tower-scoreline span:first-of-type {
    font-size: 14px;
    font-weight: 800;
    opacity: 0.85;
}
.s2map-tower-grade {
    margin-left: 8px;
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
}
.s2map-tower-bullets {
    margin: 4px 0 0;
    padding-left: 16px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    line-height: 1.45;
}
.s2map-tower-bullets b {
    color: #0f172a;
    font-weight: 800;
}
.s2map-tower-hint {
    margin: 4px 0 0;
    font-size: 9px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.4;
}
.s2map-tower-actions {
    margin-top: auto;
    padding-top: 8px;
}
.s2map-tower-btn {
    width: 100%;
    padding: 10px 12px;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 900;
    border: none;
    cursor: pointer;
}
.s2map-tower-btn--primary {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}
.s2map-tower-btn--primary:hover {
    filter: brightness(1.06);
}

@media (prefers-reduced-motion: reduce) {
    .retail-rise-slab,
    .retail-rise-beam,
    .retail-rise-chip,
    .retail-d-comp-li-animate,
    .retail-rise-pin {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .retail-rise-pin {
        transform: translateX(-50%) !important;
    }
    .s2map-tower-scene,
    .s2map-tower-beam,
    .s2map-rise-slab {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    .s2map-tower-scene {
        transform: perspective(420px) rotateX(11deg) !important;
    }
}

.nearest-retail-sub {
    margin: 0;
    padding: 8px 18px 0;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
}
.nearest-retail-lead {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    line-height: 1.5;
}
.nearest-retail-card {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
}
.nearest-retail-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
}
.nearest-retail-meta {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.45;
}
.nearest-retail-foot {
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.5;
}
.nearest-retail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}
.nearest-retail-actions .btn-map,
.nearest-retail-actions .btn-naver-land {
    flex: 1 1 auto;
    min-width: 140px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    border: none;
    cursor: pointer;
}
.nearest-retail-actions .btn-map {
    background: #0f172a;
    color: #f8fafc;
}
.nearest-retail-actions .btn-map:hover { background: #1e293b; }
.nearest-retail-actions .btn-naver-land {
    background: #03c75a;
    color: #fff;
}
.nearest-retail-actions .btn-naver-land:hover { background: #02a64a; }

/* 경쟁 병원 호버 카드 — 코랄 포인트 뱃지 + 미니 레이더 */
.competitor-profile-card {
    padding: 14px 14px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.14);
    min-width: 260px;
    max-width: min(320px, calc(100vw - 48px));
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    color: var(--text-main);
    cursor: default;
    box-sizing: border-box;
}
.competitor-profile-card__title {
    font-weight: 900;
    font-size: 15px;
    color: #0f172a;
    margin: 0 0 8px;
    line-height: 1.35;
}
.competitor-profile-card__fact-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.competitor-profile-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px;
    align-items: center;
}
.competitor-profile-card__badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #c2410c;
    background: linear-gradient(135deg, #fff5f2 0%, #ffe4d6 100%);
    border: 1px solid rgba(224, 122, 95, 0.45);
    box-shadow: 0 1px 2px rgba(224, 122, 95, 0.12);
}
.competitor-profile-card__loading-msg {
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}
.competitor-profile-card__radar {
    position: relative;
    height: 200px;
    margin: 4px 0 12px;
    width: 100%;
}
.competitor-profile-card__radar canvas {
    max-height: 200px;
}
.competitor-profile-card__metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}
.competitor-profile-card__metrics strong {
    color: #0f172a;
    font-weight: 800;
}
.competitor-profile-card__walk-hint {
    font-size: 11px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    line-height: 1.45;
}
.competitor-profile-card__walk-hint--muted {
    color: #94a3b8;
    font-weight: 500;
}
.competitor-profile-card__narr {
    margin: 0 0 6px;
    font-size: 12px;
    line-height: 1.55;
    color: #475569;
    font-weight: 500;
}
.competitor-profile-card__rev {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 800;
    color: #059669;
}
.competitor-profile-card__scenarios {
    margin-top: 10px;
    padding: 10px 10px 8px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.competitor-profile-card__scenarios-title {
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.competitor-profile-card__scenario-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 0;
    border-top: 1px solid #e2e8f0;
    font-size: 11px;
    line-height: 1.4;
}
.competitor-profile-card__scenario-row:first-of-type {
    border-top: none;
    padding-top: 0;
}
.competitor-profile-card__scenario-label {
    font-weight: 700;
    color: #334155;
}
.competitor-profile-card__scenario-band {
    font-weight: 600;
    color: #64748b;
}
.competitor-profile-card__scenarios-foot {
    margin-top: 8px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.45;
}
.competitor-profile-card__err {
    margin: 8px 0 0;
    font-size: 11px;
    font-weight: 600;
    color: #b91c1c;
    line-height: 1.4;
}
.competitor-profile-card__foot {
    margin-top: 10px;
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1.45;
}