﻿* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            display: flex;
            height: 100vh;
            overflow: hidden;
        }
        
        .sidebar {
            width: 400px;
            background: #ffffff;
            display: flex;
            flex-direction: column;
            box-shadow: 2px 0 15px rgba(0,0,0,0.08);
            z-index: 1000;
            overflow: hidden;
        }
        
        .header {
            background: #1e293b;
            color: white;
            padding: 12px 15px;
            border-bottom: 1px solid #334155;
        }
        
        .header h1 {
            font-size: 1.5em;
            margin-bottom: 5px;
        }
        
        .header p {
            opacity: 0.9;
            font-size: 0.9em;
        }
        
        .controls {
            padding: 10px 15px;
            flex: 1;
            background: #ffffff;
            min-height: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        
        .control-group {
            margin-bottom: 8px;
        }
        
        .control-group label {
            display: block;
            font-weight: 600;
            margin-bottom: 8px;
            color: #374151;
        }
        
        input, select {
            width: 100%;
            padding: 8px 10px;
            border: 1px solid #e5e7eb;
            border-radius: 10px;
            font-size: 0.9em;
            transition: all 0.2s ease;
            background: #ffffff;
            color: #1f2937;
        }
        
        input:focus, select:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
        }
        
        input::placeholder {
            color: #9ca3af;
        }
        
        .btn {
            width: 100%;
            padding: 10px;
            background: #1f2937;
            color: white;
            border: none;
            border-radius: 10px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-bottom: 8px;
        }
        
        .btn:hover {
            background: #374151;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        
        .btn-secondary {
            background: #f9fafb;
            color: #6b7280;
            border: 1px solid #e5e7eb;
        }
        
        .btn-secondary:hover {
            background: #f3f4f6;
            color: #374151;
            border-color: #d1d5db;
        }
        
        .search-mode {
            display: flex;
            gap: 10px;
            margin-bottom: 15px;
        }
        
        .mode-btn {
            flex: 1;
            padding: 10px;
            background: #ffffff;
            color: #6b7280;
            border: 1px solid #e5e7eb;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .mode-btn.active {
            background: #1f2937;
            color: white;
            border-color: #1f2937;
        }
        
        .results {
            padding: 10px 0 20px 0;
            background: #ffffff;
            flex: 1;
            overflow-y: auto;
            min-height: 0;
        }
        
        .result-item {
            padding: 12px;
            background: #f9fafb;
            border-radius: 10px;
            margin-bottom: 10px;
            transition: all 0.3s ease;
            box-shadow: 0 1px 3px rgba(0,0,0,0.04);
            border-left: 4px solid transparent;
            cursor: pointer;
        }
        
        .result-item:hover {
            background: #f3f4f6;
            transform: translateX(5px);
            border-left-color: #3b82f6;
        }
        
        .result-item.selected {
            background: #eff6ff;
            border-left: 4px solid #3b82f6;
            transform: translateX(5px);
        }
        
        .result-item.selected .result-name {
            color: #1e40af;
        }
        
        .result-item.selected .result-info {
            color: #6b7280;
        }
        
        .result-name {
            font-weight: 600;
            color: #1f2937;
            margin-bottom: 5px;
        }
        
        .result-info {
            font-size: 0.85em;
            color: #6b7280;
        }
        
        .badge {
            display: inline-block;
            padding: 3px 8px;
            background: #1f2937;
            color: white;
            border-radius: 12px;
            font-size: 0.75em;
            margin-right: 5px;
        }
        
        .map-container {
            flex: 1;
            position: relative;
        }
        
        #map {
            width: 100%;
            height: 100%;
        }
        
        .stats-panel {
            position: absolute;
            top: 20px;
            right: 20px;
            background: white;
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.2);
            width: 525px;
            max-height: 85vh;
            overflow-y: auto;
            z-index: 1000;
        }
        
        .transit-panel {
            position: absolute;
            top: 20px;
            right: 565px;
            background: white;
            padding: 20px;
            border-radius: 12px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.2);
            max-width: 350px;
            max-height: 85vh;
            overflow-y: auto;
            z-index: 1000;
        }
        
        .transit-panel h3 {
            margin-bottom: 15px;
            color: #2d3748;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .station-card {
            background: #f8f9fa;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 15px;
            border-left: 4px solid #312e81;
        }
        
        .station-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        
        .station-name {
            font-weight: 600;
            font-size: 1.1em;
            color: #2d3748;
        }
        
        .station-distance {
            background: #312e81;
            color: white;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.85em;
        }
        
        .station-line {
            display: inline-block;
            background: #48bb78;
            color: white;
            padding: 3px 8px;
            border-radius: 4px;
            font-size: 0.8em;
            margin-bottom: 10px;
        }
        
        .station-stats {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            margin: 10px 0;
        }
        
        .stat-box {
            background: white;
            padding: 10px;
            border-radius: 6px;
            text-align: center;
        }
        
        .stat-box-label {
            font-size: 0.75em;
            color: #718096;
            margin-bottom: 5px;
        }
        
        .stat-box-value {
            font-size: 1.2em;
            font-weight: 600;
            color: #312e81;
        }
        
        .congestion-bar {
            margin-top: 10px;
        }
        
        .congestion-bar-label {
            font-size: 0.85em;
            color: #718096;
            margin-bottom: 5px;
        }
        
        .bar-container {
            background: #e2e8f0;
            height: 8px;
            border-radius: 4px;
            overflow: hidden;
        }
        
        .bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #48bb78, #38a169);
            transition: width 0.3s;
        }
        
        .bar-fill.high {
            background: linear-gradient(90deg, #f56565, #e53e3e);
        }
        
        .bar-fill.medium {
            background: linear-gradient(90deg, #ed8936, #dd6b20);
        }
        
        .analysis-card {
            background: #e6fffa;
            padding: 15px;
            border-radius: 8px;
            margin-top: 15px;
            border-left: 4px solid #38b2ac;
        }
        
        .analysis-score {
            text-align: center;
            margin-bottom: 15px;
        }
        
        .score-circle {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
            color: white;
            font-size: 1.8em;
            font-weight: 600;
            margin: 10px 0;
        }
        
        .analysis-item {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid #b2f5ea;
        }
        
        .analysis-item:last-child {
            border-bottom: none;
        }
        
        .analysis-label {
            color: #2c7a7b;
            font-weight: 500;
        }
        
        .analysis-value {
            font-weight: 600;
            color: #234e52;
        }
        
        .recommendation-box {
            background: #fff5f5;
            padding: 12px;
            border-radius: 6px;
            margin-top: 10px;
            border-left: 3px solid #fc8181;
        }
        
        .recommendation-text {
            color: #742a2a;
            font-size: 0.9em;
            line-height: 1.5;
        }
        
        .business-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-top: 10px;
        }
        
        .business-tag {
            background: #312e81;
            color: white;
            padding: 5px 12px;
            border-radius: 12px;
            font-size: 0.85em;
        }
        
        .stats-panel h3 {
            margin-bottom: 15px;
            color: #2d3748;
        }
        
        .stat-item {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid #e2e8f0;
        }
        
        .stat-label {
            color: #718096;
        }
        
        .stat-value {
            font-weight: 600;
            color: #312e81;
        }
        
        .loading {
            text-align: center;
            padding: 20px;
            color: #718096;
        }
        
        /* 로딩 프로그레스 바 (지도 상단) */
        .analysis-progress-bar {
            position: absolute;
            top: 20px;
            left: 50%;
            transform: translateX(-50%);
            background: white;
            padding: 20px 30px;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
            z-index: 1001;
            min-width: 400px;
            text-align: center;
        }
        
        .progress-spinner {
            width: 40px;
            height: 40px;
            margin: 0 auto 15px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid #312e81;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-8px); }
        }
        
        @keyframes mdNewsBar {
            0% { transform: translateX(-100%); }
            50% { transform: translateX(200%); }
            100% { transform: translateX(-100%); }
        }
        
        @keyframes mdDotsAnim {
            0% { content: ''; }
            33% { content: '.'; }
            66% { content: '..'; }
            100% { content: '...'; }
        }
        
        .md-dots-anim::after {
            content: '';
            animation: mdDotsAnim 1.5s steps(3, end) infinite;
        }
        
        .progress-text {
            font-size: 1.1em;
            font-weight: 600;
            color: #2d3748;
            margin-bottom: 8px;
        }
        
        .progress-subtext {
            font-size: 0.85em;
            color: #718096;
            margin-bottom: 15px;
        }
        
        .progress-bar-container {
            width: 100%;
            height: 6px;
            background: #e2e8f0;
            border-radius: 3px;
            overflow: hidden;
            margin-bottom: 10px;
        }
        
        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #1e1b4b 0%, #312e81 100%);
            border-radius: 3px;
            transition: width 0.3s ease;
            animation: progress-animation 2s ease-in-out infinite;
        }
        
        @keyframes progress-animation {
            0% { width: 0%; }
            50% { width: 70%; }
            100% { width: 100%; }
        }
        
        .progress-steps {
            display: flex;
            justify-content: space-between;
            font-size: 0.75em;
            color: #a0aec0;
            margin-top: 8px;
        }
        
        .progress-step {
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        .progress-step.active {
            color: #312e81;
            font-weight: 600;
        }
        
        .progress-step.completed {
            color: #48bb78;
        }
        
        .chart-container {
            margin-top: 20px;
            height: 200px;
        }
        
        .blog-review-section {
            margin-top: 20px;
            padding: 15px;
            background: #f7fafc;
            border-radius: 8px;
            border-left: 4px solid #48bb78;
        }
        
        .blog-review-title {
            font-weight: 600;
            color: #2d3748;
            margin-bottom: 12px;
            font-size: 0.95em;
        }
        
        .blog-item {
            background: white;
            padding: 12px;
            border-radius: 6px;
            margin-bottom: 10px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }
        
        .blog-item:last-child {
            margin-bottom: 0;
        }
        
        .blog-title {
            font-weight: 600;
            color: #312e81;
            font-size: 0.9em;
            margin-bottom: 6px;
            text-decoration: none;
            display: block;
        }
        
        .blog-title:hover {
            text-decoration: underline;
        }
        
        .blog-desc {
            font-size: 0.85em;
            color: #4a5568;
            line-height: 1.5;
            margin-bottom: 8px;
        }
        
        .blog-image {
            width: 100%;
            height: 150px;
            object-fit: cover;
            border-radius: 6px;
            margin-top: 8px;
        }
        
        .hidden {
            display: none;
        }
        
        .info-box {
            background: #e3f2fd;
            padding: 10px;
            border-radius: 8px;
            margin-bottom: 10px;
            font-size: 0.85em;
            color: #1976d2;
        }
        
        .auto-search-toggle {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px;
            background: #fff3cd;
            border-radius: 8px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s;
            font-size: 0.9em;
        }
        
        .auto-search-toggle:hover {
            background: #ffe69c;
        }
        
        .toggle-switch {
            position: relative;
            width: 50px;
            height: 24px;
            background: #ccc;
            border-radius: 12px;
            transition: background 0.3s;
        }
        
        .toggle-switch.active {
            background: #312e81;
        }
        
        .toggle-slider {
            position: absolute;
            top: 2px;
            left: 2px;
            width: 20px;
            height: 20px;
            background: white;
            border-radius: 50%;
            transition: transform 0.3s;
        }
        
        .toggle-switch.active .toggle-slider {
            transform: translateX(26px);
        }
        
        .click-indicator {
            position: absolute;
            width: 40px;
            height: 40px;
            border: 3px solid #312e81;
            border-radius: 50%;
            pointer-events: none;
            animation: pulse 1s infinite;
            z-index: 10000;
        }
        
        @keyframes pulse {
            0% {
                transform: scale(1);
                opacity: 1;
            }
            100% {
                transform: scale(2);
                opacity: 0;
            }
        }
        
        /* My-Land 돌아가기 버튼 */
        .back-button {
            position: fixed;
            top: 20px;
            left: 420px;
            z-index: 10001;
            padding: 12px 24px;
            background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
            color: white;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            font-size: 14px;
            box-shadow: 0 4px 12px rgba(30, 27, 75, 0.4);
            transition: all 0.3s;
        }
        
        .back-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(30, 27, 75, 0.6);
        }
        
        /* ============================================
         * 주소 검색 섹션 스타일
         * ============================================ */
        .address-search-section {
            background: #f9fafb;
            padding: 12px;
            border-radius: 12px;
            margin-bottom: 10px;
            border: 1px solid #e5e7eb;
        }
        
        .address-input-wrapper {
            display: flex;
            gap: 8px;
        }
        
        .address-input {
            flex: 1;
            padding: 12px 15px;
            border: 1px solid #e5e7eb;
            border-radius: 10px;
            font-size: 1em;
            transition: all 0.3s;
            background: #ffffff;
            color: #1f2937;
        }
        
        .address-input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        
        .address-input::placeholder {
            color: #9ca3af;
        }
        
        .address-search-btn {
            padding: 12px 20px;
            background: #1f2937;
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 1.1em;
            cursor: pointer;
            transition: all 0.3s;
            min-width: 50px;
        }
        
        .address-search-btn:hover {
            background: #374151;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        }
        
        .address-hint {
            font-size: 0.8em;
            color: #9ca3af;
            margin-top: 8px;
            padding-left: 5px;
        }
        
        .location-icon {
            font-style: normal;
            margin-right: 5px;
        }
        
        .divider-or {
            display: flex;
            align-items: center;
            text-align: center;
            margin: 10px 0;
            color: #94a3b8;
            font-size: 0.8em;
        }
        
        .divider-or::before,
        .divider-or::after {
            content: '';
            flex: 1;
            border-bottom: 1px solid #e2e8f0;
        }
        
        .divider-or span {
            padding: 0 15px;
            background: #f8f9fa;
        }
        
        /* ============================================
         * 모바일 반응형 스타일 (전면 개편)
         * ============================================ */
        @media (max-width: 768px) {
            body {
                flex-direction: column;
                overflow: hidden;
            }
            
            /* 데스크탑 전용 요소 숨김 */
            .market-header-bar { display: none !important; }
            .market-tool-cards { display: none !important; }
            .market-upjong-filter { display: none !important; }
            .market-desktop-body {
                display: block !important;
                padding: 0 !important;
                margin: 0 !important;
                max-width: none !important;
                gap: 0 !important;
                min-height: 0 !important;
            }
            .market-main-col {
                display: block !important;
                gap: 0 !important;
            }
            
            /* 사이드바 숨김 → 지도 전체화면 */
            .sidebar {
                display: none !important;
            }
            
            .map-container {
                position: fixed !important;
                top: 50px;
                left: 0;
                right: 0;
                bottom: 60px;
                height: auto !important;
                width: 100% !important;
                order: 1;
            }
            
            #map {
                width: 100% !important;
                height: 100% !important;
            }
            
            .back-button {
                display: none !important;
            }
            
            /* 모바일 하단 네비게이션 */
            .market-mobile-nav {
                display: flex !important;
                position: fixed;
                bottom: 0;
                left: 0;
                right: 0;
                height: 60px;
                background: #fff;
                border-top: 1px solid #e5e7eb;
                z-index: 10001;
                box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
            }
            
            .market-mobile-nav-item {
                flex: 1;
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 3px;
                color: #64748b;
                text-decoration: none;
                font-size: 11px;
                font-weight: 500;
                border: none;
                background: none;
                cursor: pointer;
                padding: 6px 2px;
            }
            
            .market-mobile-nav-item.active {
                color: #10b981;
                font-weight: 700;
            }
            
            .market-mobile-nav-item span:first-child {
                font-size: 20px;
            }
            
            /* 모바일 검색 FAB 버튼 */
            .market-mobile-fab {
                position: fixed;
                bottom: 80px;
                right: 16px;
                width: 56px;
                height: 56px;
                border-radius: 50%;
                border: none;
                color: #fff;
                font-size: 24px;
                cursor: pointer;
                z-index: 10000;
                box-shadow: 0 4px 16px rgba(0,0,0,0.25);
                display: flex !important;
                align-items: center;
                justify-content: center;
            }
            
            .market-mobile-fab.search-fab {
                background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            }
            
            .market-mobile-fab.analysis-fab {
                bottom: 148px;
                background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            }
            
            /* 모바일 검색 바텀시트 */
            .market-mobile-sheet {
                position: fixed;
                left: 0;
                right: 0;
                bottom: 60px;
                background: #fff;
                border-radius: 20px 20px 0 0;
                box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
                z-index: 10002;
                transform: translateY(100%);
                transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
                max-height: calc(100vh - 50px - 60px);
                overflow: hidden;
            }
            
            .market-mobile-sheet.active {
                transform: translateY(0);
            }
            
            .market-sheet-handle {
                width: 40px;
                height: 4px;
                background: #d1d5db;
                border-radius: 2px;
                margin: 12px auto;
            }
            
            .market-sheet-header {
                padding: 0 20px 12px;
                display: flex;
                justify-content: space-between;
                align-items: center;
            }
            
            .market-sheet-title {
                font-size: 17px;
                font-weight: 700;
                color: #1e293b;
            }
            
            .market-sheet-close {
                width: 32px;
                height: 32px;
                border: none;
                border-radius: 50%;
                background: #f1f5f9;
                color: #64748b;
                font-size: 18px;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: center;
            }
            
            .market-sheet-content {
                padding: 0 20px 20px;
                overflow-y: auto;
                max-height: calc(70vh - 80px);
                -webkit-overflow-scrolling: touch;
            }
            
            /* 모바일 분석 버튼 그리드 */
            .market-mobile-analysis-grid {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 10px;
                margin-top: 12px;
            }
            
            .market-mobile-analysis-btn {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 6px;
                padding: 16px 8px;
                border: 1px solid #e5e7eb;
                border-radius: 14px;
                background: #fff;
                cursor: pointer;
                transition: all 0.2s;
                text-align: center;
            }
            
            .market-mobile-analysis-btn:active {
                transform: scale(0.96);
                background: #f8fafc;
            }
            
            .market-mobile-analysis-btn .btn-icon {
                font-size: 28px;
            }
            
            .market-mobile-analysis-btn .btn-label {
                font-size: 12px;
                font-weight: 600;
                color: #1e293b;
            }
            
            /* 패널 위치 조정 (하단 네비 위) */
            .stats-panel {
                position: fixed;
                top: auto;
                bottom: 60px;
                left: 0;
                right: 0;
                width: 100%;
                max-height: 60vh;
                border-radius: 20px 20px 0 0;
                z-index: 2000;
            }
            
            .transit-panel {
                position: fixed;
                top: auto;
                bottom: 60px;
                left: 0;
                right: 0;
                width: 100%;
                max-width: 100%;
                max-height: 50vh;
                border-radius: 20px 20px 0 0;
                z-index: 1999;
            }
            
            .search-mode {
                display: none;
            }
            
            .desktop-only-hint {
                display: none !important;
            }
            
            .desktop-hint {
                display: none !important;
            }
            
            .mobile-hint {
                display: inline !important;
            }
            
            .results {
                max-height: 200px;
            }
            
            .analysis-progress-bar {
                min-width: 90%;
                left: 5%;
                transform: none;
                padding: 15px;
            }
            
            .progress-steps {
                flex-wrap: wrap;
                gap: 5px;
            }
            
            .progress-step {
                font-size: 0.65em;
            }
        }
        
        /* 데스크톱에서 모바일 전용 요소 숨김 */
        @media (min-width: 769px) {
            .market-mobile-nav,
            .market-mobile-fab,
            .market-mobile-sheet {
                display: none !important;
            }
        }
        
        /* Safe Area 대응 (노치 기기) */
        @supports (padding-bottom: env(safe-area-inset-bottom)) {
            @media (max-width: 768px) {
                .market-mobile-nav {
                    padding-bottom: env(safe-area-inset-bottom);
                    height: calc(60px + env(safe-area-inset-bottom));
                }
                .map-container {
                    bottom: calc(60px + env(safe-area-inset-bottom)) !important;
                }
                .market-mobile-sheet {
                    bottom: calc(60px + env(safe-area-inset-bottom));
                }
                .market-mobile-fab.search-fab {
                    bottom: calc(80px + env(safe-area-inset-bottom));
                }
                .market-mobile-fab.analysis-fab {
                    bottom: calc(148px + env(safe-area-inset-bottom));
                }
                .stats-panel {
                    bottom: calc(60px + env(safe-area-inset-bottom));
                }
                .transit-panel {
                    bottom: calc(60px + env(safe-area-inset-bottom));
                }
            }
        }

        /* ============================================ */
        /* 모달 대시보드 (옵션C: 화이트 + 인디고)    */
        /* ============================================ */
        .md-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: transparent;
            z-index: 50000;
            display: none;
            align-items: center;
            justify-content: center;
            pointer-events: none;
        }
        .md-overlay.active { display: flex; }

        @keyframes mdFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        @keyframes mdSlideUp {
            from { opacity: 0; filter: blur(6px); }
            to { opacity: 1; filter: blur(0); }
        }

        .md-modal {
            width: 94vw;
            max-width: 1280px;
            height: 92vh;
            max-height: 920px;
            background: #ffffff;
            border-radius: 20px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            box-shadow: 0 25px 60px rgba(0,0,0,0.3);
            pointer-events: auto;
            position: absolute;
        }

        /* 헤더 */
        .md-header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 14px 24px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-shrink: 0;
            cursor: move;
            user-select: none;
            -webkit-user-select: none;
        }
        .md-header-title {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .md-header-title h2 {
            font-size: 18px;
            font-weight: 800;
            margin: 0;
        }
        .md-header-title .md-subtitle {
            font-size: 11px;
            opacity: 0.85;
            margin: 0;
        }
        .md-header-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .md-header-actions button {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            width: 36px;
            height: 36px;
            border-radius: 10px;
            font-size: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }
        .md-header-actions button:hover {
            background: rgba(255,255,255,0.35);
        }
        .md-print-btn {
            width: auto !important;
            padding: 0 14px !important;
            font-size: 12px !important;
            font-weight: 700;
            gap: 4px;
        }

        /* 탭 바 */
        .md-tabs {
            display: flex;
            background: #f8fafc;
            border-bottom: 1px solid #e2e8f0;
            padding: 0 16px;
            flex-shrink: 0;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }
        .md-tabs::-webkit-scrollbar { display: none; }

        .md-tab {
            padding: 10px 14px;
            font-size: 12px;
            font-weight: 600;
            color: #64748b;
            cursor: pointer;
            border-bottom: 3px solid transparent;
            white-space: nowrap;
            flex-shrink: 0;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 6px;
            user-select: none;
        }
        .md-tab:hover {
            color: #334155;
            background: #f1f5f9;
        }
        .md-tab.active {
            color: #667eea;
            border-bottom-color: #667eea;
            background: white;
        }
        .md-tab .md-tab-icon {
            font-size: 15px;
        }

        /* 탭 컨텐츠 영역 */
        .md-body {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 20px 24px;
            background: #f8fafc;
        }
        .md-tab-content {
            display: none;
        }
        .md-tab-content.active {
            display: block;
            animation: mdContentFade 0.2s ease;
        }
        @keyframes mdContentFade {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        /* KPI 카드 그리드 */
        .md-kpi-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 14px;
            margin-bottom: 20px;
        }
        .md-kpi-card {
            background: white;
            border-radius: 14px;
            padding: 16px;
            border: 1px solid #e2e8f0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            text-align: center;
        }
        .md-kpi-card .md-kpi-label {
            font-size: 11px;
            color: #64748b;
            font-weight: 600;
            margin-bottom: 6px;
        }
        .md-kpi-card .md-kpi-value {
            font-size: 24px;
            font-weight: 800;
            color: #1e293b;
            line-height: 1.2;
        }
        .md-kpi-card .md-kpi-sub {
            font-size: 10px;
            color: #94a3b8;
            margin-top: 4px;
        }

        /* 2열 레이아웃 */
        .md-two-col {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 20px;
        }

        /* 카드 */
        .md-card {
            background: white;
            border-radius: 14px;
            padding: 18px;
            border: 1px solid #e2e8f0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            margin-bottom: 16px;
        }
        .md-card-title {
            font-size: 14px;
            font-weight: 700;
            color: #334155;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* 차트 컨테이너 */
        .md-chart-wrap {
            background: white;
            border-radius: 14px;
            padding: 16px;
            border: 1px solid #e2e8f0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            margin-bottom: 16px;
        }
        .md-chart-wrap canvas {
            max-height: 300px;
        }

        /* 데이터 출처 바 */
        .md-source-bar {
            font-size: 11px;
            color: #64748b;
            padding: 10px 16px;
            background: #f1f5f9;
            border-radius: 10px;
            border: 1px solid #e2e8f0;
            margin-top: 12px;
        }

        /* AI 분석 다크 영역 */
        .md-ai-section {
            background: #1e1b4b;
            color: white;
            border-radius: 14px;
            padding: 20px;
            font-size: 14px;
            line-height: 1.8;
            white-space: pre-wrap;
            margin-bottom: 16px;
        }

        /* 하단 데이터 출처 */
        .md-footer {
            flex-shrink: 0;
            padding: 10px 24px;
            background: #f1f5f9;
            border-top: 1px solid #e2e8f0;
            font-size: 10px;
            color: #94a3b8;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        /* 모달 대시보드 전체화면 */
        .md-modal.md-fullscreen {
            width: 100vw !important;
            max-width: 100vw !important;
            height: 100vh !important;
            max-height: 100vh !important;
            left: 0 !important;
            top: 0 !important;
            transform: none !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            animation: none !important;
        }

        /* 모달 대시보드 최소화 */
        .md-modal.md-minimized {
            position: fixed !important;
            bottom: 16px !important;
            left: 16px !important;
            top: auto !important;
            right: auto !important;
            width: auto !important;
            max-width: 340px !important;
            height: auto !important;
            max-height: none !important;
            min-height: 0 !important;
            transform: none !important;
            border-radius: 14px !important;
            box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
            z-index: 10001;
            overflow: hidden !important;
        }
        .md-modal.md-minimized .md-header {
            border-radius: 14px !important;
            padding: 10px 16px !important;
            flex-direction: row !important;
            align-items: center !important;
            gap: 10px !important;
        }
        .md-modal.md-minimized .md-header-title {
            flex: 1 !important;
            min-width: 0 !important;
        }
        .md-modal.md-minimized .md-header-title > span {
            font-size: 18px !important;
        }
        .md-modal.md-minimized .md-header-title h2 {
            font-size: 13px !important;
            white-space: nowrap !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }
        .md-modal.md-minimized .md-subtitle {
            display: none !important;
        }
        .md-modal.md-minimized .md-header-actions {
            gap: 4px !important;
            flex-shrink: 0 !important;
        }
        .md-modal.md-minimized .md-header-actions .md-print-btn,
        .md-modal.md-minimized .md-header-actions button {
            padding: 4px 8px !important;
            font-size: 11px !important;
        }
        .md-modal.md-minimized .md-tabs,
        .md-modal.md-minimized .md-body,
        .md-modal.md-minimized .md-footer {
            display: none !important;
        }

        /* 모달 대시보드 반응형 */
        @media (max-width: 768px) {
            .md-modal {
                width: 100vw;
                height: 100vh;
                max-width: 100%;
                max-height: 100%;
                border-radius: 0;
            }
            .md-kpi-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }
            .md-two-col {
                grid-template-columns: 1fr;
            }
            .md-header {
                padding: 12px 16px;
            }
            .md-header-title h2 {
                font-size: 15px;
            }
            .md-body {
                padding: 14px 12px;
            }
            .md-tab {
                padding: 10px 12px;
                font-size: 12px;
            }
            
            /* AI 챗봇 모달 모바일 전체화면 */
            #chatbotContainer {
                position: fixed !important;
                top: 0 !important;
                left: 0 !important;
                right: 0 !important;
                bottom: 0 !important;
                width: 100% !important;
                max-width: 100% !important;
                height: 100% !important;
                max-height: 100% !important;
                border-radius: 0 !important;
            }
            #aiComprehensiveModal {
                pointer-events: auto !important;
            }
            
            /* 소상공인365 팝업 모바일 전체화면 */
            #simpleAnalysisWindow {
                border-radius: 0 !important;
            }
        }

        /* 모달 대시보드 인쇄 */
        @media print {
            .md-overlay {
                position: static !important;
                background: none !important;
                backdrop-filter: none !important;
            }
            .md-modal {
                width: 100% !important;
                max-width: 100% !important;
                height: auto !important;
                max-height: none !important;
                border-radius: 0 !important;
                box-shadow: none !important;
            }
            .md-header-actions { display: none !important; }
            .md-tabs { display: none !important; }
            .md-tab-content { display: block !important; page-break-inside: auto; }
            .md-body { overflow: visible !important; height: auto !important; padding: 10px !important; }
            .md-kpi-grid { grid-template-columns: repeat(4, 1fr) !important; }
            .md-two-col { grid-template-columns: 1fr 1fr !important; }
            .md-card, .md-kpi-card, .md-chart-wrap { break-inside: avoid; page-break-inside: avoid; }
            .md-footer { position: static !important; }
            .sidebar, .map-container, .transit-panel, .stats-panel { display: none !important; }
        }

        /* ========== 전체화면 모달 모바일 반응형 ========== */
        @media (max-width: 768px) {
            #marketAnalysisFullscreenModal > div:nth-child(2),
            #marketRoadviewFullscreenModal > div:nth-child(2) {
                grid-template-columns: 1fr !important;
                padding: 12px !important;
                gap: 12px !important;
            }
            #marketAnalysisFullscreenModal > div:first-child,
            #marketRoadviewFullscreenModal > div:first-child {
                padding: 10px 14px !important;
                flex-wrap: wrap;
                gap: 8px;
            }
            #marketAnalysisFullscreenModal > div:first-child > div:first-child > div > div:first-child,
            #marketRoadviewFullscreenModal > div:first-child > div:first-child > div > div:first-child {
                font-size: 16px !important;
            }
        }

        /* 동 단위 분석 안내 메시지 애니메이션 */
        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateX(-50%) translateY(-20px);
            }
            to {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
        }
        
        @keyframes slideUp {
            from {
                opacity: 1;
                transform: translateX(-50%) translateY(0);
            }
            to {
                opacity: 0;
                transform: translateX(-50%) translateY(-20px);
            }
        }
        
        /* 신한카드 실시간 상권 현황 - 모바일 최적화 */
        @media (max-width: 768px) {
            .seoul-realtime-section {
                padding: 12px !important;
                margin-top: 10px !important;
            }
            
            .seoul-realtime-section .stat-card {
                min-width: 100px !important;
                padding: 8px !important;
            }
            
            .seoul-realtime-section .stat-value {
                font-size: 1em !important;
            }
            
            /* 경쟁 강도 분석 - 모바일 최적화 */
            .competition-section {
                padding: 12px !important;
                margin-top: 10px !important;
            }
            
            .competition-section .comp-item {
                padding: 6px !important;
                margin-bottom: 4px !important;
            }
            
            .competition-section .comp-name {
                font-size: 0.85em !important;
            }
            
            .competition-section .comp-count {
                font-size: 0.85em !important;
            }
            
            /* 업종 상세 분류 - 모바일 최적화 */
            .industry-detail-section {
                padding: 12px !important;
            }
            
            .industry-detail-section .hierarchy-item {
                font-size: 0.8em !important;
                padding: 4px 6px !important;
            }
        }
        
        /* ═══════════════════════════════════════════════════════════
           🔥 핫플레이스 리포트 인포그래픽 스타일
           ═══════════════════════════════════════════════════════════ */
        .hp-badge {
            display: inline-block;
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 10px;
            font-weight: 600;
            white-space: nowrap;
        }
        
        .hp-report-wrapper {
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        }
        
        .hp-report-wrapper canvas {
            max-height: 260px;
        }
        
        .hp-report-wrapper table th,
        .hp-report-wrapper table td {
            white-space: nowrap;
        }
        
        .hp-rank-item:active {
            transform: scale(0.98) !important;
        }
        
        @media (max-width: 768px) {
            .hp-report-wrapper {
                border-radius: 10px !important;
                margin-bottom: 8px !important;
            }
            .hp-badge {
                font-size: 9px;
                padding: 2px 7px;
            }
            .hp-report-wrapper canvas {
                max-height: 200px;
            }
        }

        /* 🆕 밀집도 줌 안내 토스트 애니메이션 */
        @keyframes fadeInDown {
            from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
            to { opacity: 1; transform: translateX(-50%) translateY(0); }
        }

        /* #5 밀집도 범례 모바일 위치 조정 */
        @media (max-width: 768px) {
            .heatmap-legend {
                bottom: 70px !important;
                right: 10px !important;
                left: auto !important;
                max-width: 160px !important;
                padding: 8px 10px !important;
                font-size: 10px !important;
            }
        }
