/* === 🌈 WIAGIL Rainbow Animation === */
@keyframes wtRainbow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes wtRainbowReverse { 0% { background-position: 100% 50%; } 50% { background-position: 0% 50%; } 100% { background-position: 100% 50%; } }

/* ============================================
   WIA GIL — Main Stylesheet
   Extracted from index.html
   ============================================ */

/* === Block 1: Core styles === */
* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        button, a, [onclick] {
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        html, body { max-width: 100%; overflow-x: hidden; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: #1a1a2e;
            height: 100vh;
            overflow: hidden;
            position: relative;
        }

        /* WIA GIL 헤더 */
        .wiagil-header {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            background-image: linear-gradient(270deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff, #5f27cd, #01a3a4, #ff6b6b);
            background-size: 400% 400%;
            animation: wtRainbow 25s ease-in-out infinite;
            backdrop-filter: blur(20px);
            padding: 4px 11px 4px 16px;
            padding-top: max(4px, env(safe-area-inset-top));
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .logo-icon {
            width: 40px;
            height: 40px;
            background: rgba(0,0,0,0.9);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 20px;
            box-shadow: none;
            animation: pulse 2s infinite;
        }

        @keyframes pulse {
            0%, 100% { box-shadow: none; }
            50% { box-shadow: 0 0 30px rgba(102, 126, 234, 0.8); }
        }

        .logo-text {
            font-size: 18px;
            font-weight: 600;
            color: #fff;
            text-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
        }

        /* 검색바 - 트랜스포머 애니메이션 */
        /* ★ 전세계 국가 바 (헤더 내 Nations 버튼 → 펼침 그리드) */
        #countryBarBtn {
            display: flex; /* 모든 뷰에서 항상 표시 */
            align-items: center; gap: 4px;
            background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.4);
            border-radius: 16px; padding: 4px 12px; cursor: pointer;
            color: rgba(255,255,255,0.8); font-size: 11px; user-select: none;
            transition: all 0.3s; white-space: nowrap;
        }
        #countryBarBtn:hover {
            background: rgba(255,255,255,0.25); color: #fff;
            border-color: rgba(255,255,255,0.6);
        }
        #countryBarBtn.active {
            background: rgba(255,255,255,0.3); color: #fff;
        }
        #countryBarBtn .cb-arrow {
            font-size: 8px; transition: transform 0.3s;
        }
        #countryBarBtn.active .cb-arrow { transform: rotate(180deg); }
        /* 고도계 표시 시 Nations 버튼 하단 정렬 */
        body.planes-visible #countryBarBtn { align-self: flex-end; }

        #countryBar {
            position: absolute; top: 48px; left: 0; right: 0; bottom: 0;
            z-index: 10000; background: rgba(5,5,20,0.95); backdrop-filter: blur(16px);
            overflow: hidden; max-height: 0;
            transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
            display: flex; flex-direction: column;
        }
        #countryBar.open {
            max-height: calc(100vh - 48px);
        }
        /* countryBarHeader 제거됨 - 헤더 내 countryBarMeta로 이동 */
        #countryBarGrid {
            display: grid; grid-template-columns: repeat(13, 1fr); gap: 4px;
            padding: 8px 16px 16px; overflow-y: auto; flex: 1;
        }
        #countryBarGrid::-webkit-scrollbar { width: 4px; }
        #countryBarGrid::-webkit-scrollbar-track { background: transparent; }
        #countryBarGrid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

        /* globe-country-card 스타일 준용 */
        #countryBarGrid .globe-country-card {
            display: flex; align-items: center; gap: 5px;
            padding: 6px 8px; background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
            cursor: pointer; transition: all 0.2s;
            color: rgba(255,255,255,0.7); font-size: 12px;
            min-width: 0; min-height: 36px; overflow: hidden;
        }
        #countryBarGrid .globe-country-card:hover {
            background: rgba(102,126,234,0.2); border-color: rgba(102,126,234,0.5);
            color: #fff; transform: scale(1.02);
        }
        #countryBarGrid .globe-country-card .flag { font-size: 14px; flex-shrink: 0; }
        #countryBarGrid .globe-country-card .name {
            flex: 1; white-space: normal; word-break: break-word;
            font-size: 11px; line-height: 1.3;
        }
        #countryBarGrid .globe-country-card.wia-nation {
            border-color: rgba(255,165,0,0.35);
        }
        #countryBarGrid .globe-country-card.wia-nation:hover {
            background: rgba(255,165,0,0.25); border-color: rgba(255,165,0,0.6);
        }
        #countryBarGrid .hotel-badge {
            display: inline-flex; align-items: center; gap: 3px;
            margin-left: auto; white-space: nowrap;
            font-size: 9px; color: rgba(255,255,255,0.4); flex-shrink: 0;
        }
        #countryBarGrid .hotel-dot {
            display: inline-block; width: 8px; height: 8px;
            border-radius: 50%; background: rgba(102,126,234,0.7);
            flex-shrink: 0;
        }
        #countryBarGrid .globe-country-card.wia-nation .hotel-dot {
            background: rgba(255,165,0,0.8);
        }

        @media (max-width: 1200px) {
            #countryBarGrid { grid-template-columns: repeat(9, 1fr); }
        }
        @media (max-width: 768px) {
            #countryBarBtn { padding: 3px 8px; font-size: 10px; min-height: 44px; }
            #countryBar {
                top: auto !important;
                bottom: 56px !important;
                left: 0 !important;
                right: 0 !important;
                max-height: 0 !important;
                border-radius: 20px 20px 0 0 !important;
                border-top: 1px solid rgba(102,126,234,0.3) !important;
            }
            #countryBar.open {
                max-height: 65vh !important;
            }
            #countryBarGrid {
                grid-template-columns: repeat(2, 1fr) !important;
                gap: 5px !important;
                padding: 8px 10px 16px !important;
            }
            #countryBarGrid .globe-country-card {
                min-height: 36px !important;
                padding: 6px 8px !important;
                font-size: 11px !important;
            }
            #countryBarGrid .globe-country-card .flag { font-size: 13px; }
            #countryBarGrid .globe-country-card .name {
                font-size: 10px !important;
                white-space: nowrap !important;
                overflow: hidden !important;
                text-overflow: ellipsis !important;
            }
            #countryBarGrid .hotel-badge { display: none !important; }
        }
        @media (max-width: 360px) {
            #countryBarGrid { grid-template-columns: repeat(2, 1fr) !important; }
        }

        .search-container {
            position: absolute;
            top: 80px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000;
            width: 90%;
            max-width: 600px;
            pointer-events: none;
            transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        /* 헤더에 붙은 상태 — 상하 여백 없이 헤더 콘텐츠 높이에 맞춤 */
        .search-container.docked {
            top: 4px;
            max-width: 500px;
            width: 50%;
        }

        .search-container.docked .search-box {
            height: 40px;
            padding: 0 10px;
            border-radius: 25px;
            border-left: 3px solid #667eea;
            box-sizing: border-box;
        }

        .search-box {
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(102, 126, 234, 0.3);
            border-radius: 30px;
            padding: 6px 12px;
            display: flex;
            gap: 8px;
            align-items: center;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            pointer-events: auto;
        }

        .search-input {
            flex: 1;
            background: rgba(0,0,0,0.9);
            border: none;
            outline: none;
            font-size: 14px;
            color: #fff;
        }

        .search-input::placeholder {
            color: rgba(255, 255, 255, 0.65);
        }

        .search-btn {
            background: rgba(0,0,0,0.9);
            color: white;
            border: none;
            border-radius: 20px;
            padding: 6px 14px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s;
        }


        .search-btn:hover {
            transform: scale(1.05);
            box-shadow: none;
        }

        /* ★ UX: Search autocomplete dropdown */
        .search-suggestions {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            margin-top: 4px;
            background: rgba(0, 0, 0, 0.95);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(102, 126, 234, 0.3);
            border-radius: 15px;
            max-height: 300px;
            overflow-y: auto;
            display: none;
            z-index: 2000;
            pointer-events: auto;
        }
        .search-suggestions.show { display: block; }
        .search-suggestion-item {
            padding: 12px 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            transition: background 0.2s;
        }
        .search-suggestion-item:last-child { border-bottom: none; }
        .search-suggestion-item:hover, .search-suggestion-item.selected {
            background: rgba(255, 255, 255, 0.15);
        }
        .search-suggestion-item .sg-icon { font-size: 16px; opacity: 0.6; }
        .search-suggestion-item .sg-text {
            flex: 1; color: #fff; font-size: 14px;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .search-suggestion-item .sg-type {
            font-size: 11px; color: rgba(255,255,255,0.4);
            white-space: nowrap;
        }
        .search-clear-btn {
            background: none; border: none; color: rgba(255,255,255,0.4);
            cursor: pointer; font-size: 16px; padding: 4px 8px; display: none;
            transition: color 0.2s;
        }
        .search-clear-btn:hover { color: #fff; }
        .search-clear-btn.show { display: block; }


        /* ★ UX: Accessibility — focus styles */
        *:focus-visible {
            outline: 2px solid #667eea;
            outline-offset: 2px;
        }
        button:focus-visible, input:focus-visible {
            outline: 2px solid #667eea;
            outline-offset: 2px;
        }

        /* ★ UX: Skeleton loading */
        .skeleton {
            background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
            border-radius: 4px;
            height: 16px;
            display: inline-block;
            width: 80%;
        }
        @keyframes shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        /* ★ UX: Staggered fade-in */
        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .fade-in-item {
            animation: fadeInUp 0.3s ease forwards;
            opacity: 0;
        }

        /* 지도 컨테이너 - 수정됨 */
        #map {
            position: absolute;
            top: 48px;
            left: 0;
            right: 0;
            bottom: 42px;
            z-index: 1;
            background: transparent;
        }

        /* 3D 지구본 컨테이너 */
        #globe-container {
            position: absolute;
            top: 48px;
            left: 0;
            right: 0;
            bottom: 42px;
            z-index: 1;
            display: none;
            background: radial-gradient(ellipse at center, #1e3c72 0%, #000000 100%);
        }

        #globeCanvas {
            width: 100%;
            height: 100%;
            background: #000;
        }

        /* 좌측 정보 패널 */
        .info-panel {
            position: absolute;
            bottom: 62px;
            left: 10px;
            width: 380px;
            max-width: 90%;
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(102, 126, 234, 0.3);
            border-radius: 20px;
            padding: 20px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
            z-index: 1000;
            transition: transform 0.5s ease, opacity 0.5s ease;
            opacity: 1;
        }

        .info-panel.minimized {
            transform: translateX(-400px);
            opacity: 0;
        }

        .info-panel.genie-shrink {
            transform: scale(0.03) !important;
            transform-origin: bottom left !important;
            opacity: 0 !important;
            border-radius: 50px !important;
            transition: transform 1.2s cubic-bezier(0.4,0,0.2,1), opacity 1s ease, border-radius 1s ease !important;
        }
        .panel-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .panel-title {
            flex: 1;
            text-align: center;
            color: #667eea;
            font-weight: 600;
        }

        .minimize-btn {
            background: none;
            border: none;
            color: #667eea;
            cursor: pointer;
            font-size: 20px;
            transition: transform 0.3s;
        }

        .minimize-btn:hover {
            transform: rotate(-90deg);
        }

        .wia-code-display {
            background: rgba(0,0,0,0.9);
            color: white;
            padding: 15px;
            border-radius: 15px;
            text-align: center;
            margin-bottom: 15px;
            position: relative;
            overflow: hidden;
        }

        .wia-code-display::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
            animation: shine 3s infinite;
        }

        @keyframes shine {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .wia-code {
            font-size: 24px;
            font-weight: bold;
            font-family: 'Courier New', monospace;
            letter-spacing: 2px;
            text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
            position: relative;
        }

        .address-info {
            padding: 15px;
            background: rgba(102, 126, 234, 0.1);
            border-left: 3px solid #667eea;
            margin: 10px 0;
            border-radius: 10px;
        }

        .address-label {
            font-size: 12px;
            color: #999;
            margin-bottom: 5px;
        }

        .address-text {
            color: #fff;
            line-height: 1.5;
        }

        /* 플로팅 토글 버튼 */
        .toggle-panel-btn {
            position: absolute;
            bottom: 62px;
            left: 11px;
            width: 50px;
            height: 50px;
            background: rgba(0,0,0,0.9);
            border-radius: 50%;
            border: 2px solid rgba(102,126,234,0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            font-size: 22px;
            cursor: pointer;
            box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
            z-index: 999;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .toggle-panel-btn.show {
            opacity: 1;
        }

        /* 우측 호텔 패널 */
        .hotel-panel {
            position: absolute;
            top: 67px;
            right: 11px;
            width: 320px;
            max-height: 60vh;
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(102, 126, 234, 0.3);
            border-radius: 20px;
            padding: 20px;
            overflow-y: auto;
            z-index: 999;
            opacity: 0;
            transform: translateY(12px);
            pointer-events: none;
            transition: opacity 0.4s ease, transform 0.4s ease;
        }

        .hotel-panel.show {
            opacity: 1;
            transform: translateY(0);
            pointer-events: auto;
        }

        .hotel-item {
            background: rgba(102, 126, 234, 0.1);
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .hotel-item:hover {
            background: rgba(102, 126, 234, 0.2);
            transform: translateX(-5px);
        }


        /* ★ 비행기 일람표 패널 */
        .flight-panel {
            position: absolute;
            top: 67px;
            right: 11px;
            width: 320px;
            max-height: 60vh;
            background: rgba(0, 5, 20, 0.95);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(0, 150, 255, 0.3);
            border-radius: 16px;
            padding: 0;
            overflow: hidden;
            z-index: 1001;
            display: none;
            box-shadow: 0 8px 32px rgba(0,0,0,0.6);
        }
        .flight-panel.show { display: flex; flex-direction: column; }
        .flight-panel-header {
            padding: 14px 16px;
            border-bottom: 1px solid rgba(0,150,255,0.2);
            display: flex; justify-content: space-between; align-items: center;
            background: rgba(0,20,50,0.8);
        }
        .flight-panel-body {
            overflow-y: auto; flex: 1;
            max-height: calc(60vh - 100px);
        }
        .flight-panel-body::-webkit-scrollbar { width: 4px; }
        .flight-panel-body::-webkit-scrollbar-thumb { background: rgba(0,150,255,0.3); border-radius: 2px; }
        .flight-row {
            display: grid;
            grid-template-columns: 28px 70px 90px 50px 70px 55px;
            gap: 4px;
            align-items: center;
            padding: 8px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            font-size: 11px;
            color: rgba(255,255,255,0.8);
            cursor: pointer;
            transition: background 0.15s;
        }
        .flight-row:hover { background: rgba(0,150,255,0.1); }
        .flight-row-header {
            display: grid;
            grid-template-columns: 28px 70px 90px 50px 70px 55px;
            gap: 4px;
            padding: 6px 12px;
            font-size: 10px;
            font-weight: 600;
            color: rgba(0,150,255,0.7);
            border-bottom: 1px solid rgba(0,150,255,0.2);
            background: rgba(0,20,50,0.5);
            letter-spacing: 0.5px;
        }
        @media (max-width: 768px) {
            .flight-panel {
                position: fixed;
                top: auto;
                bottom: 0;
                left: 0;
                right: 0;
                width: 100%;
                max-height: 55vh;
                border-radius: 20px 20px 0 0;
                border-bottom: none;
            }
            .flight-panel-body { max-height: calc(55vh - 60px); }
        }
        /* ★ Vessel Panel - 선박 일람표 */
        .vessel-panel {
            position: absolute;
            top: 67px;
            right: 11px;
            width: 320px;
            max-height: 60vh;
            background: rgba(0, 5, 20, 0.95);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(0, 128, 200, 0.3);
            border-radius: 16px;
            padding: 0;
            overflow: hidden;
            z-index: 1001;
            display: none;
            box-shadow: 0 8px 32px rgba(0,0,0,0.6);
        }
        .vessel-panel.show { display: flex; flex-direction: column; }
        .vessel-panel-header {
            padding: 14px 16px;
            border-bottom: 1px solid rgba(0,128,200,0.2);
            display: flex; justify-content: space-between; align-items: center;
            background: rgba(0,10,30,0.8);
        }
        .vessel-panel-body {
            overflow-y: auto; flex: 1;
            max-height: calc(60vh - 100px);
        }
        .vessel-panel-body::-webkit-scrollbar { width: 4px; }
        .vessel-panel-body::-webkit-scrollbar-thumb { background: rgba(0,128,200,0.3); border-radius: 2px; }
        .vessel-row {
            display: grid;
            grid-template-columns: 100px 80px 70px 60px 50px;
            gap: 4px;
            align-items: center;
            padding: 8px 12px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            font-size: 11px;
            color: rgba(255,255,255,0.8);
            cursor: pointer;
            transition: background 0.15s;
        }
        .vessel-row:hover { background: rgba(0,128,200,0.1); }
        .vessel-row.cruise-row { border-left: 3px solid rgba(255,215,0,0.6); }
        .vessel-row.passenger-row { border-left: 3px solid rgba(0,188,212,0.6); }
        .vessel-row.tanker-row { border-left: 3px solid rgba(255,152,0,0.4); }
        .vessel-row-header {
            display: grid;
            grid-template-columns: 100px 80px 70px 60px 50px;
            gap: 4px;
            padding: 6px 12px;
            font-size: 10px;
            font-weight: 600;
            color: rgba(0,128,200,0.7);
            border-bottom: 1px solid rgba(0,128,200,0.2);
            background: rgba(0,10,30,0.5);
            letter-spacing: 0.5px;
        }
        @media (max-width: 768px) {
            .vessel-panel {
                position: fixed;
                top: auto;
                bottom: 0;
                left: 0;
                right: 0;
                width: 100%;
                max-height: 55vh;
                border-radius: 20px 20px 0 0;
                border-bottom: none;
            }
            .vessel-panel-body { max-height: calc(55vh - 60px); }
        }
        /* 관광지/교통 패널 */
        .poi-panel {
            position: absolute;
            top: 67px;
            right: 11px;
            width: 320px;
            max-height: 60vh;
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(102, 126, 234, 0.3);
            border-radius: 20px;
            padding: 20px;
            overflow-y: auto;
            z-index: 999;
            display: none;
        }

        .poi-panel.show {
            display: block;
        }

        .poi-item {
            background: rgba(102, 126, 234, 0.1);
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 10px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .poi-item:hover {
            background: rgba(102, 126, 234, 0.2);
            transform: translateX(-5px);
        }

        /* 하단 네비게이션 */
        .bottom-nav {
            /* 🌈 Rainbow bottom nav */
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background-image: linear-gradient(270deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3, #54a0ff, #5f27cd, #01a3a4, #ff6b6b);
            background-size: 400% 400%;
            animation: wtRainbowReverse 25s ease-in-out infinite;
            backdrop-filter: blur(20px);
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            z-index: 1000;
            display: flex;
            justify-content: space-around;
            padding: 0px 0;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            touch-action: manipulation;
            user-select: none;
            -webkit-user-select: none;
        }
        .bottom-nav::-webkit-scrollbar { display: none; }

        .nav-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 0px 2px;
            cursor: pointer;
            transition: all 0.3s;
            color: rgba(255, 255, 255, 0.85);
            position: relative;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            min-height: 56px;
        }
        .nav-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            line-height: 1;
            margin-bottom: 3px;
        }
        .nav-label {
            font-size: 10px;
            line-height: 1.2;
            text-align: center;
        }

        .nav-item:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 8px;
        }

        .nav-item.active {
            color: #fff;
        }

        .nav-item.active::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 30px;
            height: 3px;
            background: #667eea;
            border-radius: 2px;
        }

        /* 통계 오버레이 */
        .stats-overlay {
            position: fixed;
            right: 20px;
            top: 48px;
            background: rgba(0, 0, 0, 0.9);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(102, 126, 234, 0.3);
            border-radius: 15px;
            padding: 15px;
            z-index: 1001;
            width: 250px;
            display: none;
        }

        .stats-overlay.show {
            display: block;
        }

        /* 로딩 */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.9);
            align-items: center;
            justify-content: center;
            z-index: 10000;
            display: none;
        }

        .loading-spinner {
            width: 60px;
            height: 60px;
            border: 3px solid transparent;
            border-top-color: #667eea;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

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

        /* Leaflet 커스텀 스타일 - 중요! */
        .leaflet-container {
            background: transparent !important;
        }
        body.worldtour-active .leaflet-container {
            background: #f2efe9 !important;
        }

        .leaflet-tile-pane {
            opacity: 1 !important;
        }


        

        /* 모바일 헤더 */
        @media (max-width: 768px) {
            .wiagil-header {
                padding: 8px 10px;
            }
            .logo-text {
                font-size: 14px !important;
            }
            .logo-icon {
                width: 32px;
                height: 32px;
            }
            .logo-icon img {
                width: 20px !important;
                height: 20px !important;
            }
            .wiagil-header > div:last-child {
                gap: 6px !important;
            }
            .wiagil-header > div:last-child button span,
            .wiagil-header > div:last-child button i {
                font-size: 18px !important;
            }
            /* 언어 버튼 간소화 */
            .wiagil-header > div:last-child button:last-child {
                padding: 4px 8px !important;
                font-size: 12px !important;
            }
            
            /* 검색창 모바일 - 줌버튼 안 가리게 */
            .search-container {
                top: 62px !important;
                left: 50% !important;
                right: auto !important;
                width: 90% !important;
                max-width: 480px !important;
                transform: translateX(-50%) !important;
            }
            .search-box {
                padding: 8px 10px !important;
                width: 100% !important;
                max-width: none !important;
            }
            .search-input {
                font-size: 14px !important;
                flex: 1 !important;
            }
            .search-btn {
                padding: 6px 10px !important;
                font-size: 12px !important;
            }
            

        }
        
        /* 더 작은 화면 */
        @media (max-width: 480px) {
            .logo-text {
                display: none !important;
            }
            .wiagil-header > div:last-child {
                gap: 4px !important;
            }
/* (replaced by 768px hamburger menu) */
        }

        /* 설정 모달 FAB 버튼 숨기기 (헤더에서 열기) */
        #wia-a11y-fab {
            display: none !important;
        }
        
        /* AI 모달 FAB 버튼도 숨기기 (헤더에서 열기) */
        #ktAiFab, .kt-ai-fab {
            display: none !important;
        }

        /* ============================================
           MOBILE RESPONSIVE REDESIGN
           ============================================ */

        /* --- Hamburger Button --- */
        .hamburger-btn {
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 4px;
            width: 44px;
            height: 44px;
            background: rgba(102,126,234,0.15);
            border: 1px solid rgba(102,126,234,0.3);
            border-radius: 8px;
            cursor: pointer;
            padding: 6px;
        }
        .hamburger-line {
            display: block;
            width: 18px;
            height: 2px;
            background: #667eea;
            border-radius: 2px;
            transition: transform 0.3s, opacity 0.3s;
        }
        .hamburger-btn.active .hamburger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
        .hamburger-btn.active .hamburger-line:nth-child(2) { opacity: 0; }
        .hamburger-btn.active .hamburger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

        /* --- Hamburger Drawer --- */
        .hamburger-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            z-index: 9998;
        }
        .hamburger-overlay.show { display: block; }
        .hamburger-drawer {
            position: fixed;
            top: 0;
            right: -300px;
            width: 280px;
            max-width: 80vw;
            height: 100%;
            background: rgba(10,10,30,0.98);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-left: 1px solid rgba(102,126,234,0.3);
            z-index: 9999;
            transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
            overflow-y: auto;
            overscroll-behavior: contain;
            padding-bottom: env(safe-area-inset-bottom);
        }
        .hamburger-drawer.open { right: 0; }
        .drawer-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            border-bottom: 1px solid rgba(102,126,234,0.2);
        }
        .drawer-title {
            color: #fff;
            font-size: 18px;
            font-weight: 700;
            letter-spacing: 0.5px;
        }
        .drawer-close {
            background: none;
            border: none;
            color: rgba(255,255,255,0.5);
            font-size: 24px;
            cursor: pointer;
            padding: 4px 8px;
            line-height: 1;
        }
        .drawer-section {
            padding: 12px 0;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .drawer-section-label {
            padding: 4px 20px 8px;
            color: rgba(102,126,234,0.8);
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 1.5px;
            text-transform: uppercase;
        }
        .drawer-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 20px;
            color: rgba(255,255,255,0.85);
            font-size: 15px;
            cursor: pointer;
            transition: background 0.2s;
        }
        .drawer-item:active {
            background: rgba(102,126,234,0.15);
        }
        .drawer-item i, .drawer-item span:first-child {
            width: 24px;
            text-align: center;
            color: #667eea;
            font-size: 16px;
        }

        /* --- Mobile Media Query (<=768px) --- */
        @media (max-width: 768px) {
            .hamburger-btn { display: flex; }
            .bottom-nav {
            /* 🌈 Rainbow bottom nav */ display: none !important; }
            #headerBtnAI, #headerBtnStats, #headerBtnFull, #headerBtnSettings { display: none !important; }
            #map, #globe-container { bottom: 0 !important; }
            #altitudeLegendHeader { display: none !important; }
            .logo-text { display: none !important; }
            .wiagil-header > div:last-child { gap: 4px !important; }

            /* Control Bar = Mobile Footer */
            #worldTourControlBar {
                width: 100% !important;
                max-width: 100% !important;
                left: 0 !important;
                right: 0 !important;
                bottom: 0 !important;
                transform: none !important;
                border-radius: 16px 16px 0 0 !important;
                padding-bottom: max(14px, env(safe-area-inset-bottom)) !important;
            }
            #worldTourControlBar button { min-height: 44px !important; min-width: 44px !important; }
        }

        /* --- Netflix Immersive Mode --- */
        body.mobile-immersive .wiagil-header {
            transition: opacity 0.5s ease, transform 0.5s ease;
        }
        body.mobile-immersive.controls-hidden .wiagil-header {
            opacity: 0;
            transform: translateY(-100%);
            pointer-events: none;
        }
        body.mobile-immersive #worldTourControlBar {
            transition: opacity 0.5s ease, transform 0.5s ease;
        }
        body.mobile-immersive.controls-hidden #worldTourControlBar {
            opacity: 0.15;
            transform: translateY(10px);
        }
        body.mobile-immersive #map {
            top: 0 !important;
            bottom: 0 !important;
            border-radius: 0 !important;
        }
        body.mobile-immersive .search-container {
            display: none !important;
        }
        body.mobile-immersive .hamburger-btn {
            display: none !important;
        }

        /* 지구본 국가 카드 — 1줄 flex 레이아웃 */
        .globe-country-card {
            display: flex;
            align-items: center;
            gap: 4px;
            padding: 6px 8px;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            color: rgba(255,255,255,0.7);
            font-size: 11px;
            min-width: 0;
            min-height: 36px;
            overflow: hidden;
        }

        .globe-country-card:hover {
            background: rgba(102,126,234,0.2);
            border-color: rgba(102,126,234,0.5);
            color: #fff;
            transform: scale(1.02);
        }

        .globe-country-card .flag { font-size: 13px; flex-shrink: 0; }
        .globe-country-card .name {
            flex: 1; min-width: 0;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            font-size: 10px; line-height: 1.2;
        }
        .globe-country-card .hotels-count {
            color: rgba(102,126,234,0.8);
            font-size: 9px; white-space: nowrap; flex-shrink: 0;
        }
        .globe-country-card .inet-rate {
            font-size: 9px; font-weight: bold; flex-shrink: 0; white-space: nowrap;
        }

        /* ★ Satellite Explorer 카테고리 버튼 */
        .sat-cat-btn {
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.15);
            color: rgba(255,255,255,0.7);
            border-radius: 6px;
            padding: 6px 8px;
            cursor: pointer;
            font-size: 11px;
            text-align: left;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .sat-cat-btn:hover { background: rgba(255,255,255,0.12); }
        .sat-cat-btn.active { border-color: currentColor; background: rgba(255,255,255,0.15); color: #fff; }
        .sat-cat-btn .sat-cnt { margin-left: auto; font-size: 9px; opacity: 0.5; }
        .sat-cat-btn.active .sat-cnt { opacity: 1; }

        /* 지구본 국가 그리드 스크롤바 — WebKit */
        #globeCountriesLeft::-webkit-scrollbar,
        #globeCountriesRight::-webkit-scrollbar {
            width: 4px;
        }
        #globeCountriesLeft::-webkit-scrollbar-track,
        #globeCountriesRight::-webkit-scrollbar-track {
            background: transparent;
        }
        #globeCountriesLeft::-webkit-scrollbar-thumb,
        #globeCountriesRight::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.2);
            border-radius: 2px;
        }

        /* ★ 국가 패널 접이식 탭 */
        .globe-panel-collapsed .globe-panel-content { display: none !important; }
        .globe-panel-collapsed {
            width: 32px !important;
            overflow: hidden !important;
            cursor: pointer;
            background: rgba(0,5,20,0.6) !important;
            border-radius: 0 12px 12px 0;
            backdrop-filter: blur(8px);
            border: 1px solid rgba(0,200,255,0.0);
            transition: width 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.3s, border-color 0.35s;
        }
        .globe-panel-collapsed.right-panel {
            border-radius: 12px 0 0 12px;
        }
        .globe-panel-expanded {
            transition: width 0.35s cubic-bezier(0.4,0,0.2,1);
        }
        .globe-tab-handle {
            position: absolute; top: 50%; transform: translateY(-50%);
            width: 32px; display: flex; flex-direction: column;
            align-items: center; justify-content: center; gap: 8px;
            font-size: 18px; color: rgba(255,255,255,0.7);
            z-index: 11; cursor: pointer; user-select: none;
            padding: 12px 0;
        }
        .globe-tab-handle span {
            font-size: 10px; writing-mode: vertical-rl;
            text-orientation: mixed; letter-spacing: 1px;
            color: rgba(255,255,255,0.5);
        }
        .globe-tab-arrow {
            font-size: 14px; color: rgba(0,200,255,0.7);
            margin-top: 10px; transition: transform 0.3s;
        }
        /* 접힌 상태 화살표 */
        #globeCountriesLeft.globe-panel-collapsed .globe-tab-arrow::after { content: '›'; }
        #globeCountriesRight.globe-panel-collapsed .globe-tab-arrow::after { content: '‹'; }
        /* 펼친 상태 화살표 */
        #globeCountriesLeft.globe-panel-expanded .globe-tab-arrow::after { content: '‹'; }
        #globeCountriesRight.globe-panel-expanded .globe-tab-arrow::after { content: '›'; }
        #globeCountriesLeft .globe-tab-handle { left: 0; }
        #globeCountriesRight .globe-tab-handle { right: 0; }


        /* ★ 어린왕자 */
        .little-prince {
            position: absolute;
            top: 120px;
            left: 50px;
            width: 120px;
            height: 120px;
            background: url('images/little_prince.png') center/contain no-repeat;
            opacity: 0;
            transition: opacity 0.5s ease;
            z-index: 300;
            pointer-events: none;
        }
        .little-prince.show { opacity: 1; pointer-events: auto; }
        .little-prince-quote {
            position: absolute;
            top: 140px;
            left: 185px;
            background: rgba(255,255,255,0.95);
            color: #333;
            padding: 12px 16px;
            border-radius: 14px;
            font-size: 13px;
            font-weight: 500;
            max-width: 220px;
            line-height: 1.6;
            opacity: 0;
            transition: opacity 0.5s ease;
            z-index: 300;
            box-shadow: 0 4px 16px rgba(0,0,0,0.3);
        }
        .little-prince-quote::before {
            content: '';
            position: absolute;
            left: -10px; top: 50%;
            transform: translateY(-50%);
            border: 10px solid transparent;
            border-right-color: rgba(255,255,255,0.95);
        }
        .little-prince-quote.show { opacity: 1; }

        /* ★ 행성 정보 패널 */
        #planetInfoPanel {
            position:absolute; top:50%; left:50%; transform:translate(-50%,-60%);
            background:rgba(0,5,20,0.92); border:1px solid rgba(0,200,255,0.4);
            border-radius:16px; padding:20px 24px; z-index:300;
            min-width:260px; max-width:340px; display:none;
            backdrop-filter:blur(16px); box-shadow:0 0 30px rgba(0,200,255,0.2);
            color:#e0e8ff; font-size:12px; font-family:-apple-system,monospace;
        }
        #planetInfoPanel .pi-close { position:absolute; top:10px; right:14px; cursor:pointer; color:rgba(255,255,255,0.4); font-size:18px; }
        #planetInfoPanel .pi-close:hover { color:#fff; }
        #planetInfoPanel .pi-emoji { font-size:44px; text-align:center; margin-bottom:6px; }
        #planetInfoPanel .pi-name  { font-size:18px; font-weight:bold; color:#00c8ff; text-align:center; }
        #planetInfoPanel .pi-nameko{ font-size:12px; color:rgba(255,255,255,0.5); text-align:center; margin-bottom:10px; }
        #planetInfoPanel .pi-row   { display:flex; justify-content:space-between; padding:4px 0; border-bottom:1px solid rgba(255,255,255,0.05); }
        #planetInfoPanel .pi-label { color:rgba(255,255,255,0.5); }
        #planetInfoPanel .pi-value { color:#a0e0ff; font-weight:500; }
        #planetInfoPanel .pi-body  { max-height:55vh; overflow-y:auto; padding-right:4px; }
        #planetInfoPanel .pi-about { font-size:11px; color:rgba(255,255,255,0.75); line-height:1.6; margin:8px 0; }
        #planetInfoPanel .pi-feat  { margin:6px 0; padding:6px 8px; background:rgba(0,200,255,0.05); border-left:2px solid rgba(0,200,255,0.4); border-radius:4px; }
        #planetInfoPanel .pi-feat-t{ display:block; font-size:11px; color:#00c8ff; font-weight:bold; margin-bottom:2px; }
        #planetInfoPanel .pi-feat-d{ font-size:11px; color:rgba(255,255,255,0.65); }


        /* ★ 우주 미니맵 */
        #spaceMinimap {
            position:fixed; top:56px; right:50px; z-index:300;
            width:160px; background:rgba(0,3,18,0.88);
            border:1px solid rgba(0,200,255,0.25); border-radius:12px;
            padding:8px 10px 6px; backdrop-filter:blur(8px);
            max-height:calc(100vh - 56px - 90px); overflow:hidden;
            transition:opacity 0.3s;
        }
        #spaceMinimap .sm-title {
            font-size:9px; color:rgba(0,200,255,0.6); text-align:center;
            letter-spacing:1px; margin-bottom:6px; text-transform:uppercase;
            white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
        }
        #spaceMinimap canvas { display:block; width:140px; height:58px; border-radius:6px; }
        #spaceMinimap .sm-info {
            font-size:9px; color:rgba(255,255,255,0.45); text-align:center;
            margin-top:5px; line-height:1.5;
        }
        #spaceMinimap .sm-goto {
            display:none; width:100%; margin-top:4px;
            background:rgba(0,200,255,0.15); border:1px solid rgba(0,200,255,0.4);
            color:#00c8ff; border-radius:6px; padding:4px 0; font-size:10px;
            cursor:pointer; text-align:center;
        }
        #spaceMinimap .sm-goto:hover { background:rgba(0,200,255,0.3); }
        /* ★ 별자리 팝업 */
        #constellationPopup {
            display:none; position:fixed; top:0; left:0; width:100%; height:100%; z-index:500;
            background:rgba(0,2,15,0.92); backdrop-filter:blur(8px);
            flex-direction:column; align-items:center; justify-content:center;
        }
        #constellationPopup.show { display:flex; animation:fadeInPop 0.3s ease; }
        @keyframes fadeInPop { from{opacity:0;transform:scale(0.96)} to{opacity:1;transform:scale(1)} }
        #constellationPopup .cp-header {
            display:flex; justify-content:space-between; align-items:center;
            width:90%; max-width:1100px; margin-bottom:12px;
        }
        #constellationPopup .cp-title { color:#4FC3F7; font-size:20px; font-weight:bold; }
        #constellationPopup .cp-close {
            background:none; border:1px solid rgba(79,195,247,0.4); color:#4FC3F7;
            border-radius:8px; padding:6px 14px; cursor:pointer; font-size:14px;
        }
        #constellationPopup .cp-canvas {
            width:90%; max-width:1100px; height:60vh; max-height:560px;
            border:1px solid rgba(79,195,247,0.2); border-radius:12px;
            background:rgba(0,5,20,0.8); position:relative; overflow:hidden;
        }
        #constellationPopup canvas { width:100%; height:100%; }
        #constellationPopup .cp-list {
            display:grid; grid-template-columns: repeat(6, 1fr);
            gap:8px; width:90%; max-width:1100px; margin-top:12px;
        }
        #constellationPopup .cp-tag {
            background:rgba(79,195,247,0.1); border:1px solid rgba(79,195,247,0.3);
            color:#4FC3F7; border-radius:8px; padding:8px 6px; font-size:12px; cursor:pointer;
            text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
        }
        #constellationPopup .cp-tag:hover { background:rgba(79,195,247,0.3); }
        #constellationPopup .cp-tag.active { background:rgba(79,195,247,0.4); color:#fff; }
        /* ★ ISS 정보 패널 */
        #issInfoPanel {
            position: absolute; top: 152px; right: 50px;
            background: rgba(0,5,20,0.85);
            border: 1px solid rgba(0,200,255,0.3);
            border-radius: 14px; padding: 14px 18px;
            z-index: 200; min-width: 280px; max-width: 340px;
            backdrop-filter: blur(12px);
            box-shadow: 0 0 24px rgba(0,200,255,0.15);
            color: #e0e8ff; font-size: 12px; line-height: 1.6;
            display: none; font-family: -apple-system, BlinkMacSystemFont, monospace;
            transition: opacity 0.3s;
        }
        #issInfoPanel .iss-title {
            font-size: 14px; font-weight: bold; color: #00c8ff;
            margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
        }
        #issInfoPanel .iss-divider {
            border: none; border-top: 1px solid rgba(0,200,255,0.2);
            margin: 6px 0;
        }
        #issInfoPanel .iss-row {
            display: flex; justify-content: space-between; padding: 1px 0;
        }
        #issInfoPanel .iss-label { color: rgba(255,255,255,0.6); }
        #issInfoPanel .iss-value { color: #a0e0ff; font-weight: 500; }
        #issInfoPanel .iss-crew { margin-top: 6px; }
        #issInfoPanel .iss-crew-grid {
            display: grid; gap: 2px 8px; margin-top: 4px;
        }
        #issInfoPanel .iss-crew-grid.cols-2 { grid-template-columns: 1fr 1fr; }
        #issInfoPanel .iss-crew-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
        #issInfoPanel .iss-crew-member {
            padding: 1px 0; color: rgba(255,255,255,0.8);
            font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        #issInfoPanel .starlink-stat {
            margin-top: 8px; padding-top: 6px;
            border-top: 1px solid rgba(0,200,255,0.15);
            color: #4af; font-weight: bold;
        }
        #issInfoPanel .iss-close {
            position: absolute; top: 8px; right: 12px;
            background: none; border: none; color: rgba(255,255,255,0.4);
            cursor: pointer; font-size: 16px;
        }
        #issInfoPanel .iss-close:hover { color: #fff; }

        @media (max-width: 768px) {
            #issInfoPanel {
                top: auto; right: 10px; left: 10px; bottom: 70px;
                transform: none;
                min-width: unset; max-width: unset; font-size: 11px;
                max-height: calc(60vh - 70px);
                overflow-y: auto;
            }
            #issInfoPanel::-webkit-scrollbar {
                width: 3px;
            }
            #issInfoPanel::-webkit-scrollbar-track {
                background: transparent;
            }
            #issInfoPanel::-webkit-scrollbar-thumb {
                background: rgba(255,255,255,0.2);
                border-radius: 2px;
            }
        }

        /* 태블릿 (768px ~ 1024px): 국가 패널 1열/축소 */
        @media (max-width: 1024px) {
            #globeCountriesLeft.globe-panel-expanded, #globeCountriesRight.globe-panel-expanded {
                width: 200px !important;
            }
            #globeCountriesLeftGrid, #globeCountriesRightGrid {
                grid-template-columns: 1fr !important;
            }
            .globe-country-card .name {
                max-width: 80px;
            }
        }

        /* ★ UX: Mobile bottom sheet + drag handle */
        .bottom-sheet-handle {
            display: none;
            width: 40px; height: 4px;
            background: rgba(255,255,255,0.3);
            border-radius: 2px;
            margin: 8px auto 4px;
            cursor: grab;
        }

        /* 모바일에서 국가 패널 → bottom sheet */
        @media (max-width: 768px) {
            #globeCountriesLeft, #globeCountriesRight {
                position: fixed !important;
                top: auto !important;
                left: 0 !important;
                right: 0 !important;
                bottom: 0 !important;
                width: 100% !important;
                max-width: 100% !important;
                height: 50vh !important;
                max-height: 50vh !important;
                border-radius: 20px 20px 0 0 !important;
                background: rgba(0,5,20,0.95) !important;
                backdrop-filter: blur(20px) !important;
                -webkit-backdrop-filter: blur(20px) !important;
                border: none !important;
                border-top: 1px solid rgba(0,200,255,0.3) !important;
                z-index: 5000 !important;
                overflow-y: auto !important;
                transform: translateY(100%);
                transition: transform 0.4s cubic-bezier(0.4,0,0.2,1) !important;
                padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
            }
            #globeCountriesLeft.globe-panel-expanded,
            #globeCountriesRight.globe-panel-expanded {
                transform: translateY(0) !important;
                width: 100% !important;
            }
            #globeCountriesLeft.globe-panel-collapsed,
            #globeCountriesRight.globe-panel-collapsed {
                transform: translateY(100%) !important;
                width: 100% !important;
                overflow: visible !important;
                background: transparent !important;
                border: none !important;
            }
            /* 탭 핸들 모바일 → 하단 고정 토글 버튼 */
            #globeCountriesLeft .globe-tab-handle,
            #globeCountriesRight .globe-tab-handle {
                position: fixed !important;
                top: auto !important;
                bottom: 8px !important;
                left: auto !important;
                right: auto !important;
                transform: none !important;
                width: auto !important;
                flex-direction: row !important;
                background: rgba(0,5,20,0.85) !important;
                backdrop-filter: blur(12px) !important;
                border: 1px solid rgba(0,200,255,0.3) !important;
                border-radius: 24px !important;
                padding: 8px 14px !important;
                gap: 6px !important;
                z-index: 5001 !important;
            }
            #globeCountriesLeft .globe-tab-handle {
                left: 10px !important;
            }
            #globeCountriesRight .globe-tab-handle {
                right: 10px !important;
            }
            #globeCountriesLeft .globe-tab-handle span,
            #globeCountriesRight .globe-tab-handle span {
                writing-mode: horizontal-tb !important;
                text-orientation: mixed !important;
                font-size: 10px !important;
            }
            /* 드래그 핸들 표시 */
            #globeCountriesLeft .globe-panel-content::before,
            #globeCountriesRight .globe-panel-content::before {
                content: '';
                display: block;
                width: 40px;
                height: 4px;
                background: rgba(255,255,255,0.3);
                border-radius: 2px;
                margin: 10px auto 8px;
            }
            #globeCountriesLeft .globe-panel-content,
            #globeCountriesRight .globe-panel-content {
                padding: 0 16px 16px !important;
            }
            #globeCountriesLeftGrid, #globeCountriesRightGrid {
                grid-template-columns: repeat(3, 1fr) !important;
                gap: 6px !important;
            }
            /* 스크롤바 스타일링 */
            #globeCountriesLeft::-webkit-scrollbar,
            #globeCountriesRight::-webkit-scrollbar {
                width: 3px;
            }
            #globeCountriesLeft::-webkit-scrollbar-thumb,
            #globeCountriesRight::-webkit-scrollbar-thumb {
                background: rgba(255,255,255,0.2);
                border-radius: 2px;
            }
            .bottom-sheet-handle { display: block; }
            #infoPanel {
                left: 0 !important;
                right: 0 !important;
                bottom: 60px !important;
                max-width: 100% !important;
                width: 100% !important;
                border-radius: 20px 20px 0 0 !important;
                max-height: 55vh;
                overflow-y: auto;
                transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s ease !important;
            }
            #infoPanel.minimized {
                transform: translateY(100%) !important;
                opacity: 0 !important;
            }
            #infoPanel.collapsed {
                transform: translateY(100%) !important;
                opacity: 0 !important;
            }
            .wia-code {
                font-size: 16px !important;
                letter-spacing: 1px !important;
            }
            #liveTrackBtn {
                bottom: 62px !important;
                right: 10px !important;
                width: 50px !important;
                height: 50px !important;
            }
        }

        /* 초소형 모바일 (360px 이하) */
        @media (max-width: 360px) {
            .wia-code {
                font-size: 14px !important;
            }
            #infoPanel {
                bottom: 42px !important;
            }
        }

        /* 턴바이턴 리스트 스크롤바 */
        #navTurnByTurn::-webkit-scrollbar { width: 4px; }
        #navTurnByTurn::-webkit-scrollbar-track { background: transparent; }
        #navTurnByTurn::-webkit-scrollbar-thumb { background: rgba(102,126,234,0.3); border-radius: 2px; }
        .turn-marker { z-index: 500 !important; }
        @keyframes stepPulse {
            0% { box-shadow: 0 0 0 0 rgba(102,126,234,0.4); }
            70% { box-shadow: 0 0 0 8px rgba(102,126,234,0); }
            100% { box-shadow: 0 0 0 0 rgba(102,126,234,0); }
        }

        /* ★ Phase 3: 주행 모드 HUD */
        @keyframes livePulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(1.3); }
        }

        @keyframes wiaCodeFlash {
            0% { color: #667eea; }
            50% { color: #00b894; }
            100% { color: #667eea; }
        }

        .wia-code-changed {
            animation: wiaCodeFlash 0.5s ease-out;
        }

        .location-arrow {
            transition: transform 0.3s ease-out;
        }

        .location-arrow-container {
            background: none !important;
            border: none !important;
        }

        body.driving-mode .bottom-nav {
            /* 🌈 Rainbow bottom nav */
            display: none !important;
        }

        body.driving-mode #map {
            top: 0 !important;
            bottom: 0 !important;
        }

        body.driving-mode #hudBottom {
            bottom: 0 !important;
        }

        /* HUD 모바일 반응형 */
        @media (max-width: 480px) {
            #hudWiaCode { font-size: 24px !important; letter-spacing: 1px !important; }
            #hudTurnIcon { font-size: 28px !important; }
            #hudTurnDistance { font-size: 17px !important; }
            #hudRemainDist, #hudRemainTime, #hudArrivalTime { font-size: 17px !important; }
            #hudTop { padding: 10px 12px 20px !important; }
            #hudBottom { padding: 18px 12px 10px !important; }
            #hudNextTurn { padding: 8px 10px !important; gap: 10px !important; }
        }

        @media (max-width: 360px) {
            #hudWiaCode { font-size: 20px !important; }
            #hudTurnIcon { font-size: 24px !important; }
            #hudTurnDistance { font-size: 15px !important; }
            #hudTurnText { font-size: 11px !important; }
            #hudRemainDist, #hudRemainTime, #hudArrivalTime { font-size: 15px !important; }
            #hudSpeed, #hudHeading { font-size: 9px !important; }
        }

        /* 세계일주 도시 마커 펄스 */
        @keyframes wtPulse {
            0% { box-shadow: 0 0 0 0 rgba(102,126,234,0.6); }
            70% { box-shadow: 0 0 0 10px rgba(102,126,234,0); }
            100% { box-shadow: 0 0 0 0 rgba(102,126,234,0); }
        }
        .wt-city-label div { animation: wtPulse 2s infinite; border-radius: 10px; }
        .wt-city-label { z-index: 650 !important; }
        .custom-marker.wt-fadeout { opacity: 0 !important; transition: opacity 0.6s ease !important; }
        .wt-city-label.wt-fadein { transition: opacity 0.6s ease !important; }
        .custom-marker { z-index: 600 !important; }
        .wt-path-dot { z-index: 680 !important; }
        .wt-rainbow-dot { position:relative; width:14px; height:14px; }
        .wt-rainbow-dot-ring {
            position:absolute; inset:0; border-radius:50%;
            background: conic-gradient(#ff6b6b, #feca57, #48dbfb, #54a0ff, #5f27cd, #ff9ff3, #01a3a4, #ff6b6b);
            animation: wiaRainbowSpin 3s linear infinite;
            filter: drop-shadow(0 0 8px rgba(255,255,255,0.6)) drop-shadow(0 0 16px rgba(102,126,234,0.4));
        }
        .wt-rainbow-dot-core { position:absolute; inset:3px; border-radius:50%; background:#fff; }
        /* 도시 번호 무지개 테두리 */
        .wt-city-badge { position:relative; width:30px; height:30px; }
        .wt-city-badge-ring {
            position:absolute; inset:0; border-radius:50%;
            background: conic-gradient(#ff6b6b, #feca57, #48dbfb, #54a0ff, #5f27cd, #ff9ff3, #01a3a4, #ff6b6b);
            animation: wiaRainbowSpin 8s linear infinite;
            box-shadow: 0 2px 8px rgba(0,0,0,0.4);
        }
        .wt-city-badge-inner {
            position:absolute; inset:2.5px; border-radius:50%;
            background: rgba(30,30,50,0.92);
            color:#fff; font-size:12px; font-weight:bold;
            display:flex; align-items:center; justify-content:center;
        }

        /* 세계일주 중 bottom-nav 표시 유지 */

        /* 라이브 하늘: 항공기 감지 시에만 표시 (planes-visible) + 세계일주, 지구본 제외 */
        body:not(.worldtour-active):not(.planes-visible) #liveSkyBtn,
        body:not(.worldtour-active):not(.planes-visible) #liveSkyStatus,
        body:not(.worldtour-active):not(.planes-visible) #altitudeLegend,
        body:not(.worldtour-active):not(.planes-visible) #altitudeLegendHeader,
        body.globe-active #liveSkyBtn,
        body.globe-active #altitudeLegendHeader,
        body.globe-active #liveSkyStatus { display: none !important; }

        /* 라이브 오션: 선박 감지 시에만 표시 (vessels-visible) + 세계일주, 지구본 제외 */
        body:not(.worldtour-active):not(.vessels-visible) #liveOceanBtn,
        body:not(.worldtour-active):not(.vessels-visible) #liveOceanStatus,
        body:not(.worldtour-active):not(.vessels-visible) #oceanLegend,
        /* 패널 열리면 선속계 자동 숨김 */
        body:has(.poi-panel.show) #oceanLegend,
        body:has(#hotelPanel.show) #oceanLegend,
        body.globe-active #liveOceanBtn,
        body.globe-active #liveOceanStatus,
        body.globe-active #oceanLegend { display: none !important; }

        /* ★ 지구본(globe) 뷰에서 지도 전용 패널/버튼 숨김 */
        body.globe-active #togglePanelBtn,
        body.globe-active #infoPanel,
        body.globe-active #hotelPanel,
        body.globe-active #flightPanel,
        body.globe-active #vesselPanel,
        body.globe-active #landmarkPanel,
        body.globe-active #transportPanel,
        body.globe-active #altitudeLegend { display: none !important; }

        /* 세계일주 비행기 */
        .wt-plane { z-index: 800 !important; }

        /* 세계일주 컨트롤 바 모바일 대응 */
        /* ★ 세계여행 모달 모바일 반응형 */
        @media (max-width: 768px) {
            #worldTourModal > div {
                max-width: 96% !important;
                padding: 20px 14px 24px !important;
                margin: 10px auto !important;
            }
            #worldTourModal h2 { font-size: 19px !important; }
            #worldTourGrid {
                grid-template-columns: repeat(3, 1fr) !important;
                gap: 8px !important;
            }
            #worldTourGrid > div { padding: 10px 6px !important; }
            #worldTourGrid > div > div:first-child { font-size: 24px !important; }
            #worldTourGrid > div > div:nth-child(2) { font-size: 12px !important; }
            #worldTourGrid > div > div:nth-child(3) { font-size: 10px !important; }
            #worldTourGrid > div > div:nth-child(4) { font-size: 10px !important; }
        }
        @media (max-width: 480px) {
            #worldTourModal > div {
                max-width: 100% !important;
                width: 100% !important;
                padding: 16px 12px 20px !important;
                border-radius: 14px !important;
                margin: 6px auto !important;
            }
            /* 탭 버튼 */
            #worldTourModal #wtTabPlans,
            #worldTourModal #wtTabP2P,
            #worldTourModal #wtTabDIY { padding: 8px 4px !important; font-size: 11px !important; }
            /* 교통수단 상단 3버튼 */
            #wtTransportMode > div:first-child button { padding: 7px 4px !important; font-size: 11px !important; }
            /* 교통수단 하단 5버튼 */
            #wtTransportMode > div:last-child button { padding: 5px 2px !important; font-size: 10px !important; min-width: 42px !important; }
            /* 플랜 그리드 — 3열 유지, 컴팩트 */
            #worldTourGrid {
                grid-template-columns: repeat(3, 1fr) !important;
                gap: 6px !important;
            }
            #worldTourGrid > div { padding: 10px 4px !important; border-radius: 10px !important; }
            #worldTourGrid > div > div:first-child { font-size: 22px !important; margin-bottom: 4px !important; }
            #worldTourGrid > div > div:nth-child(2) { font-size: 11px !important; }
            #worldTourGrid > div > div:nth-child(3) { font-size: 9px !important; }
            #worldTourGrid > div > div:nth-child(4) { font-size: 9px !important; }
            #worldTourGrid > div > div:nth-child(5) { font-size: 8px !important; }
        }
        @media (max-width: 360px) {
            #worldTourModal > div {
                padding: 12px 8px 16px !important;
            }
            #worldTourModal h2 { font-size: 17px !important; }
            #worldTourGrid { grid-template-columns: repeat(2, 1fr) !important; }
            #worldTourGrid > div { padding: 8px 3px !important; }
            #worldTourGrid > div > div:first-child { font-size: 20px !important; }
            #worldTourGrid > div > div:nth-child(2) { font-size: 10px !important; }
            #worldTourGrid > div > div:nth-child(3),
            #worldTourGrid > div > div:nth-child(4) { font-size: 8px !important; }
        }

/* ★ World Tour Mobile Responsive (6-pack) */

        /* B: Control bar button wrap on small screens */
        @media (max-width: 480px) {
            #wtControlBtns {
                flex-wrap: wrap !important;
                gap: 5px !important;
            }
            #wtControlBtns button {
                padding: 6px 5px !important;
                font-size: 12px !important;
            }
            /* 메인 3버튼 (prev/play/next) 첫줄 */
            #wtControlBtns button:nth-child(1),
            #wtControlBtns button:nth-child(2),
            #wtControlBtns button:nth-child(3) {
                flex: 1 1 0 !important;
            }
            /* 나머지 버튼 둘째줄 */
            #wtControlBtns button:nth-child(n+4) {
                flex: 1 1 18% !important;
                font-size: 11px !important;
                padding: 5px 3px !important;
            }
        }

        /* C: wtTravelInfo 위치 조정 */
        @media (max-width: 768px) {
            #wtTravelInfo {
                bottom: 280px !important;
                width: 96% !important;
            }
        }
        @media (max-width: 480px) {
            #wtTravelInfo {
                bottom: 300px !important;
                width: 98% !important;
            }
        }

        /* D: hotel-panel bottom sheet */
        @media (max-width: 768px) {
            .hotel-panel {
                position: fixed !important;
                top: auto !important;
                bottom: 0 !important;
                left: 0 !important;
                right: 0 !important;
                width: 100% !important;
                max-height: 55vh !important;
                border-radius: 20px 20px 0 0 !important;
                border-bottom: none !important;
                padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
            }
        }

        /* E: poi-panel bottom sheet */
        @media (max-width: 768px) {
            .poi-panel {
                position: fixed !important;
                top: auto !important;
                bottom: 0 !important;
                left: 0 !important;
                right: 0 !important;
                width: 100% !important;
                max-height: 55vh !important;
                border-radius: 20px 20px 0 0 !important;
                border-bottom: none !important;
                overflow-y: auto !important;
                padding-bottom: max(16px, env(safe-area-inset-bottom)) !important;
            }
        }

        /* F: flight-row / vessel-row grid 축소 */
        @media (max-width: 768px) {
            .flight-row, .flight-row-header {
                grid-template-columns: 28px 60px 1fr 45px !important;
            }
            /* 5번째(출발지), 6번째(거리) 컬럼 숨김 */
            .flight-row > *:nth-child(5),
            .flight-row > *:nth-child(6),
            .flight-row-header > *:nth-child(5),
            .flight-row-header > *:nth-child(6) {
                display: none !important;
            }
            .vessel-row, .vessel-row-header {
                grid-template-columns: 1fr 70px 60px 50px !important;
            }
            /* 2번째(타입) 컬럼 숨김 */
            .vessel-row > *:nth-child(2),
            .vessel-row-header > *:nth-child(2) {
                display: none !important;
            }
        }

        /* (replaced by 768px mobile footer rule) */

        /* Live Sky 팝업 스타일 */
        .live-sky-popup .leaflet-popup-content-wrapper {
            background: rgba(0,10,30,0.95);
            border: 1px solid rgba(0,150,255,0.3);
            border-radius: 14px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.5);
            backdrop-filter: blur(10px);
            padding: 0;
        }
        .live-sky-popup .leaflet-popup-content { margin: 0 !important; width: auto !important; }
        .live-sky-popup .leaflet-popup-tip {
            background: rgba(0,10,30,0.95);
        }
        .live-sky-icon {
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
        }
        .live-plane svg {
            filter: none;
        }

    
        /* ★ WIA 무지개 마커 */
        .wia-rainbow-marker { position:relative; width:41px; height:41px; }
        .wia-rainbow-ring {
            position:absolute; inset:0; border-radius:50%;
            background: conic-gradient(#ff6b6b, #feca57, #48dbfb, #54a0ff, #5f27cd, #ff9ff3, #01a3a4, #ff6b6b);
            animation: wiaRainbowSpin 6s linear infinite;
            box-shadow: 0 2px 8px rgba(0,0,0,0.3);
        }
        .wia-rainbow-inner {
            position:absolute; inset:3px; border-radius:50%;
            background: rgba(255,255,255,0.92);
            display:flex; align-items:center; justify-content:center;
        }
        @keyframes wiaRainbowSpin { to { transform: rotate(360deg); } }
        /* 모래시계 회전 */
        .wt-hourglass { display:inline-block; animation: wtHourglass 1.2s ease-in-out infinite; }
        @keyframes wtHourglass { 0%{transform:rotate(0deg)} 50%{transform:rotate(180deg)} 100%{transform:rotate(360deg)} }


/* === Block 2: Splash animation === */
@keyframes splashProgress { 0% { width: 0%; } 100% { width: 100%; } }


/* === Block 3: Cockpit + Mobile responsive === */
@keyframes wtDotBounce { 0%,80%,100% { transform: translateY(0); opacity:0.4; } 40% { transform: translateY(-8px); opacity:1; } }
    
    /* ★ JARVIS Cockpit Simulator HUD */
    :root {
      --jc-cyan: #00d4ff;
      --jc-green: #00ff41;
      --jc-amber: #ffaa00;
      --jc-red: #ff3333;
      --jc-panel-bg: rgba(0, 15, 30, 0.75);
      --jc-border: rgba(0, 212, 255, 0.3);
      --jc-glow: 0 0 10px rgba(0, 212, 255, 0.4);
      --jc-font: 'Courier New', 'Consolas', monospace;
    }

    #wtCockpitHUD * { box-sizing: border-box; }

    /* Cockpit ON → hide header/search/bottom-nav/altLegend for full immersion */
    body.jc-immersive .wiagil-header,
    body.jc-immersive .search-container,
    body.jc-immersive .bottom-nav,
    body.jc-immersive #altitudeLegendHeader {
      display: none !important;
      visibility: hidden !important;
      opacity: 0 !important;
      pointer-events: none !important;
    }
    /* Cockpit ON → map fullscreen (remove 48px header gap + 42px footer gap) */
    body.jc-immersive #map {
      top: 0 !important;
      bottom: 0 !important;
    }

    /* ★ Cockpit Bottom Dashboard — 3-column unified bar */
    #jcDashboard {
      display: none; position: fixed; bottom: 0; left: 0; right: 0;
      height: auto; z-index: 5100; pointer-events: auto;
      background: linear-gradient(0deg, rgba(0,6,18,0.98) 0%, rgba(0,10,25,0.96) 70%, rgba(0,14,32,0.90) 100%);
      border-top: 1px solid rgba(0,212,255,0.25);
      box-shadow: 0 -4px 30px rgba(0,212,255,0.08), inset 0 1px 0 rgba(0,212,255,0.1);
      font-family: var(--jc-font);
    }
    /* Top glow line */
    #jcDashboard::before {
      content: ''; position: absolute; top: -1px; left: 5%; right: 5%; height: 1px;
      background: linear-gradient(90deg, transparent, rgba(0,212,255,0.5), transparent);
    }
    /* Subtle scanline overlay */
    #jcDashboard::after {
      content: ''; position: absolute; inset: 0;
      background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,212,255,0.012) 2px, rgba(0,212,255,0.012) 4px);
      pointer-events: none;
    }
    /* Dashboard neon corner brackets */
    .jc-dash-corner {
      position: absolute; width: 28px; height: 28px; z-index: 2;
      border-color: var(--jc-cyan); border-style: solid; border-width: 0;
      filter: drop-shadow(0 0 4px rgba(0,212,255,0.5));
      transition: border-color 0.5s;
    }
    .jc-dash-ctl { top: -1px; left: 8px; border-top-width: 2px; border-left-width: 2px; }
    .jc-dash-ctr { top: -1px; right: 8px; border-top-width: 2px; border-right-width: 2px; }
    .jc-dash-cbl { bottom: 4px; left: 8px; border-bottom-width: 2px; border-left-width: 2px; }
    .jc-dash-cbr { bottom: 4px; right: 8px; border-bottom-width: 2px; border-right-width: 2px; }

    #jcDashGrid {
      display: grid; grid-template-columns: 180px 1fr 180px;
      gap: 0; align-items: stretch; min-height: 100%;
      position: relative; z-index: 1;
    }
    /* Dashboard section base */
    .jc-dash-section {
      padding: 8px 12px; position: relative;
    }
    /* Vertical dividers between sections */
    .jc-dash-section:not(:last-child)::after {
      content: ''; position: absolute; top: 8px; bottom: 8px; right: 0; width: 1px;
      background: linear-gradient(180deg, transparent, rgba(0,212,255,0.2), transparent);
    }
    /* Left: INTEL */
    .jc-dash-left .jc-dash-label { font-size: 8px; letter-spacing: 2px; color: rgba(0,212,255,0.5); margin-bottom: 4px; }
    .jc-dash-left .jc-dash-item { font-size: 10px; color: var(--jc-cyan); margin: 2px 0; text-shadow: var(--jc-glow); }
    /* Center: Controls (cockpit-styled existing control bar content) */
    .jc-dash-center { padding: 6px 16px; }
    /* Right: JOURNEY */
    .jc-dash-right .jc-dash-label { font-size: 8px; letter-spacing: 2px; color: rgba(0,212,255,0.5); margin-bottom: 4px; text-align: right; }
    .jc-dash-right .jc-dash-item { font-size: 10px; color: var(--jc-cyan); margin: 2px 0; text-shadow: var(--jc-glow); text-align: right; }
    .jc-dash-right .jc-dash-big { font-size: 16px; font-weight: bold; color: var(--jc-green); text-shadow: 0 0 10px rgba(0,255,65,0.4); }
    .jc-dash-right .jc-dash-bar { width: 100%; height: 4px; background: rgba(0,212,255,0.15); border-radius: 2px; margin-top: 6px; overflow: hidden; }
    .jc-dash-right .jc-dash-bar-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--jc-cyan), var(--jc-green)); transition: width 0.5s; }

    /* Cockpit style for existing control bar when inside dashboard */
    body.jc-immersive #worldTourControlBar {
      position: static !important; display: block !important;
      width: 100% !important; max-width: 100% !important;
      transform: none !important;
      border-radius: 0 !important; border: none !important;
      background: transparent !important; backdrop-filter: none !important;
      padding: 0 !important; margin: 0 !important;
      box-shadow: none !important;
      z-index: auto !important;
    }
    /* Compact: merge city info + travel info into one tighter row */
    body.jc-immersive #wtCityInfoRow { margin-bottom: 6px !important; gap: 8px !important; }
    body.jc-immersive #wtCityInfoRow #wtCityFlag { font-size: 20px !important; }
    body.jc-immersive #wtCityInfoRow #wtCityName { font-size: 13px !important; }
    body.jc-immersive #wtProgressTrack { margin-bottom: 5px !important; }
    body.jc-immersive #wtCityInfoRow #wtTravelInline { display: block !important; }
    body.jc-immersive #jcInfoTicker { display: block !important; }
    body.jc-immersive #worldTourControlBar * { font-family: var(--jc-font) !important; }
    body.jc-immersive #worldTourControlBar #wtCityProgress,
    body.jc-immersive #worldTourControlBar #wtCityName {
      color: var(--jc-cyan) !important; text-shadow: 0 0 8px rgba(0,212,255,0.4);
    }
    body.jc-immersive #worldTourControlBar #wtRouteInfo {
      color: rgba(0,212,255,0.6) !important; letter-spacing: 1px;
    }
    body.jc-immersive #worldTourControlBar #wtCityCountry {
      color: rgba(0,212,255,0.4) !important;
    }
    body.jc-immersive #worldTourControlBar #wtCityStay {
      color: var(--jc-green) !important;
    }
    body.jc-immersive #worldTourControlBar #wtCityHotels {
      color: rgba(0,255,65,0.5) !important;
    }
    body.jc-immersive #worldTourControlBar #wtProgressBar {
      background: linear-gradient(90deg, var(--jc-cyan), var(--jc-green)) !important;
      box-shadow: 0 0 8px rgba(0,212,255,0.4);
    }
    body.jc-immersive #wtTravelInline button {
      background: rgba(0,212,255,0.08) !important; border-color: rgba(0,212,255,0.2) !important;
    }
    body.jc-immersive #wtTravelSummaryInline { color: rgba(0,212,255,0.7) !important; }
    body.jc-immersive #wtTravelToggleInline { color: var(--jc-cyan) !important; }
    body.jc-immersive #worldTourControlBar button {
      border-radius: 4px !important; transition: all 0.2s !important;
      padding: 4px 6px !important; font-size: 12px !important;
    }

    /* When cockpit ON, hide standalone HUD bottom panels (moved into dashboard) */
    body.jc-immersive #jcTravelPanel,
    body.jc-immersive #jcCompass,
    body.jc-immersive #jcProgressPanel {
      display: none !important;
    }

    /* Dashboard mobile */
    @media (max-width: 768px) {
      #jcDashGrid { grid-template-columns: 1fr; }
      .jc-dash-left, .jc-dash-right { display: none; }
      .jc-dash-section:not(:last-child)::after { display: none; }
    }

    /* Scanline effect */
    #jcScanLine {
      position: absolute; top: 0; left: 0; right: 0; height: 3px;
      background: linear-gradient(90deg, transparent, rgba(0,212,255,0.6), transparent);
      animation: jcScan 4s linear infinite;
      z-index: 10;
    }
    @keyframes jcScan { 0% { top:0; opacity:0; } 10% { opacity:1; } 90% { opacity:1; } 100% { top:100%; opacity:0; } }

    /* Corner brackets */
    .jc-corner {
      position: absolute; width: 40px; height: 40px;
      border-color: var(--jc-cyan); border-style: solid; border-width: 0;
      z-index: 5; transition: border-color 0.5s;
    }
    .jc-tl { top:12px; left:12px; border-top-width:2px; border-left-width:2px; }
    .jc-tr { top:12px; right:12px; border-top-width:2px; border-right-width:2px; }
    .jc-bl { bottom:80px; left:12px; border-bottom-width:2px; border-left-width:2px; }
    .jc-br { bottom:80px; right:12px; border-bottom-width:2px; border-right-width:2px; }

    /* Panels */
    .jc-panel {
      position: absolute; padding: 10px 14px;
      background: var(--jc-panel-bg); backdrop-filter: blur(8px);
      border: 1px solid var(--jc-border); border-radius: 4px;
      font-family: var(--jc-font); color: var(--jc-cyan);
      pointer-events: none; z-index: 6;
      box-shadow: inset 0 0 20px rgba(0,212,255,0.05), var(--jc-glow);
    }
    .jc-panel-tl { top: 20px; left: 20px; min-width: 140px; }
    .jc-panel-tr { top: 20px; right: 20px; min-width: 160px; text-align: right; }
    .jc-panel-bl { bottom: 90px; left: 20px; min-width: 150px; }
    .jc-panel-bc { bottom: 90px; left: 50%; transform: translateX(-50%); }
    .jc-panel-br { bottom: 90px; right: 20px; min-width: 150px; text-align: right; }

    .jc-label {
      font-size: 9px; letter-spacing: 2px; color: rgba(0,212,255,0.6);
      border-bottom: 1px solid rgba(0,212,255,0.2); padding-bottom: 4px; margin-bottom: 6px;
    }
    .jc-value { font-size: 13px; margin: 3px 0; text-shadow: var(--jc-glow); }
    .jc-large { font-size: 18px; font-weight: bold; }
    .jc-small { font-size: 11px; }
    .jc-dim { color: rgba(0,212,255,0.5); }
    .jc-accent { color: var(--jc-green); text-shadow: 0 0 10px rgba(0,255,65,0.4); }
    .jc-flag { font-size: 28px; margin: 2px 0; }

    /* Progress bar */
    .jc-progress {
      width: 100%; height: 6px; background: rgba(0,212,255,0.15);
      border-radius: 3px; margin-top: 6px; overflow: hidden;
    }
    #jcProgressFill {
      height: 100%; width: 0%; border-radius: 3px;
      background: linear-gradient(90deg, var(--jc-cyan), var(--jc-green));
      transition: width 0.5s ease;
    }

    /* City background image */
    #jcCityBg {
      position: absolute; inset: 0; z-index: 1;
      background-size: cover; background-position: center;
      opacity: 0; transform: scale(1) translateY(0);
      transition: opacity 1.5s ease, transform 1.5s ease;
      filter: brightness(0.5) saturate(1.2);
    }
    #jcCityBg.jc-flyaway {
      opacity: 0 !important;
      transform: scale(1.5) translateY(-12%) !important;
      transition: opacity 3s cubic-bezier(0.25, 0.1, 0.25, 1), transform 3.5s cubic-bezier(0.25, 0.1, 0.25, 1) !important;
    }

    /* Status message */
    .jc-status {
      position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
      font-family: var(--jc-font); font-size: 32px; font-weight: bold;
      letter-spacing: 6px; z-index: 8;
      opacity: 0; transition: opacity 0.5s;
    }
    .jc-status-arriving { color: var(--jc-cyan); text-shadow: 0 0 30px rgba(0,212,255,0.8); animation: jcPulse 1.5s ease infinite; }
    .jc-status-arrived { color: var(--jc-green); text-shadow: 0 0 30px rgba(0,255,65,0.8); }
    .jc-status-departing { color: var(--jc-amber); text-shadow: 0 0 30px rgba(255,170,0,0.8); }
    @keyframes jcPulse { 0%,100% { opacity:0.7; } 50% { opacity:1; } }

    /* Typing cursor */
    .jc-cursor { animation: jcBlink 0.8s step-end infinite; }
    @keyframes jcBlink { 0%,100% { opacity:1; } 50% { opacity:0; } }

    /* Cockpit frames — CSS only */
    #jcFrame {
      position: absolute; inset: 0; z-index: 4; pointer-events: none;
    }

    /* Flight frame — trapezoidal windshield */
    .jc-frame-flight {
      border-top: 8px solid rgba(30,40,60,0.9);
      border-left: 6px solid rgba(30,40,60,0.85);
      border-right: 6px solid rgba(30,40,60,0.85);
      border-bottom: 60px solid rgba(20,25,40,0.95);
      border-image: none;
      background: linear-gradient(180deg, transparent 85%, rgba(20,30,50,0.9) 100%);
      -webkit-mask-image: none;
    }
    .jc-frame-flight::before {
      content: ''; position: absolute; bottom: 0; left: 15%; right: 15%; height: 55px;
      background: linear-gradient(0deg, rgba(30,40,60,0.9), transparent);
      border-top: 1px solid rgba(0,212,255,0.15);
    }
    .jc-frame-flight::after {
      content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
      background: linear-gradient(90deg, rgba(20,30,50,0.95) 30%, rgba(0,212,255,0.1) 50%, rgba(20,30,50,0.95) 70%);
    }

    /* Cruise frame — wide bridge window */
    .jc-frame-cruise {
      border-top: 12px solid rgba(0,30,50,0.95);
      border-left: 10px solid rgba(0,30,50,0.9);
      border-right: 10px solid rgba(0,30,50,0.9);
      border-bottom: 65px solid rgba(0,20,40,0.95);
    }
    .jc-frame-cruise::before {
      content: ''; position: absolute; bottom: 0; left: 10%; right: 10%; height: 60px;
      background: linear-gradient(0deg, rgba(0,40,70,0.95), transparent);
      border-top: 2px solid rgba(0,128,200,0.3);
    }
    .jc-frame-cruise::after {
      content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
      width: 40px; height: 3px; background: rgba(0,128,200,0.4); border-radius: 2px;
    }

    /* Car frame — windshield + A-pillars */
    .jc-frame-car {
      border-top: 6px solid rgba(40,40,40,0.9);
      border-left: 20px solid rgba(35,35,35,0.95);
      border-right: 20px solid rgba(35,35,35,0.95);
      border-bottom: 70px solid rgba(30,30,30,0.95);
      border-radius: 8px 8px 0 0;
    }
    .jc-frame-car::before {
      content: ''; position: absolute; bottom: 0; left: 5%; right: 5%; height: 65px;
      background: linear-gradient(0deg, rgba(30,30,30,0.95), transparent);
      border-top: 2px solid rgba(230,126,34,0.25);
    }
    .jc-frame-car::after {
      content: ''; position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%);
      width: 50px; height: 50px; border: 3px solid rgba(230,126,34,0.15);
      border-radius: 50%;
    }

    /* Moto frame — helmet visor */
    .jc-frame-moto {
      border-top: 15px solid rgba(30,30,30,0.95);
      border-left: 8px solid rgba(30,30,30,0.9);
      border-right: 8px solid rgba(30,30,30,0.9);
      border-bottom: 50px solid rgba(25,25,25,0.95);
      border-radius: 50% 50% 0 0 / 20% 20% 0 0;
    }
    .jc-frame-moto::before {
      content: ''; position: absolute; bottom: 0; left: 20%; right: 20%; height: 45px;
      background: linear-gradient(0deg, rgba(40,40,40,0.95), transparent);
    }

    /* Train frame — rectangular cab window */
    .jc-frame-train {
      border-top: 10px solid rgba(25,35,25,0.95);
      border-left: 15px solid rgba(25,35,25,0.95);
      border-right: 15px solid rgba(25,35,25,0.95);
      border-bottom: 55px solid rgba(20,30,20,0.95);
    }
    .jc-frame-train::before {
      content: ''; position: absolute; bottom: 0; left: 8%; right: 8%; height: 50px;
      background: linear-gradient(0deg, rgba(20,35,20,0.95), transparent);
      border-top: 2px solid rgba(46,204,113,0.25);
    }
    .jc-frame-train::after {
      content: ''; position: absolute; bottom: 15px; left: 15%; width: 12px; height: 30px;
      background: rgba(46,204,113,0.15); border-radius: 3px;
      box-shadow: 60px 0 0 rgba(46,204,113,0.15);
    }

    /* Bike frame — minimal, handlebar silhouette */
    .jc-frame-bike {
      border: none;
      border-bottom: 35px solid rgba(20,20,20,0.8);
    }
    .jc-frame-bike::before {
      content: ''; position: absolute; bottom: 5px; left: 30%; right: 30%; height: 3px;
      background: rgba(52,152,219,0.3); border-radius: 2px;
    }

    /* Trek frame — minimal, FPS corners only */
    .jc-frame-trek {
      border: none;
    }

    /* Hybrid uses flight frame */
    .jc-frame-hybrid {
      border-top: 8px solid rgba(30,40,60,0.9);
      border-left: 6px solid rgba(30,40,60,0.85);
      border-right: 6px solid rgba(30,40,60,0.85);
      border-bottom: 60px solid rgba(20,25,40,0.95);
    }
    .jc-frame-hybrid::before {
      content: ''; position: absolute; bottom: 0; left: 15%; right: 15%; height: 55px;
      background: linear-gradient(0deg, rgba(30,40,60,0.9), transparent);
      border-top: 1px solid rgba(138,43,226,0.2);
    }

    /* Mobile responsiveness */
    @media (max-width: 768px) {
      .jc-panel { padding: 6px 8px; }
      .jc-panel-tl, .jc-panel-tr { top: 10px; min-width: 100px; }
      .jc-panel-tl { left: 8px; }
      .jc-panel-tr { right: 8px; }
      .jc-panel-bl, .jc-panel-br { bottom: 60px; min-width: 90px; }
      .jc-panel-bl { left: 8px; }
      .jc-panel-br { right: 8px; }
      .jc-panel-bc { bottom: 60px; }
      .jc-label { font-size: 8px; letter-spacing: 1px; }
      .jc-value { font-size: 11px; }
      .jc-large { font-size: 14px; }
      .jc-small { font-size: 9px; }
      .jc-flag { font-size: 20px; }
      .jc-corner { width: 25px; height: 25px; }
      .jc-status { font-size: 22px; letter-spacing: 3px; }
      #jcCompassCanvas { width: 80px; height: 40px; }
      .jc-frame-flight, .jc-frame-cruise, .jc-frame-car,
      .jc-frame-moto, .jc-frame-train, .jc-frame-hybrid {
        border-bottom-width: 40px !important;
      }
      .jc-frame-flight::before, .jc-frame-cruise::before,
      .jc-frame-car::before, .jc-frame-train::before,
      .jc-frame-hybrid::before { height: 35px; }
      /* Hide INTEL panel on mobile — too cramped */
      #jcTravelPanel { display: none !important; }
      #jcCompass { display: none !important; }
      #jcScanLine { animation-duration: 6s; }
      #jcCityBg { filter: brightness(0.4); }
    }

    /* --- Cockpit HUD: 480px — bottom panels hidden --- */
    @media (max-width: 480px) {
      .jc-panel-bl, .jc-panel-br, .jc-panel-bc { display: none !important; }
      .jc-panel-tl { left: 6px; top: 6px; min-width: 80px; }
      .jc-panel-tr { right: 6px; top: 6px; min-width: 80px; max-width: 45vw; }
      .jc-value { font-size: 10px; }
      .jc-large { font-size: 12px; }
      .jc-corner { width: 18px; height: 18px; }
      .jc-corner.jc-bl, .jc-corner.jc-br { bottom: 50px; }
    }

    /* --- Cockpit HUD: 360px ultra-compact — DEST only --- */
    @media (max-width: 360px) {
      .jc-panel-tl { display: none !important; }
      .jc-panel-tr { right: auto; left: 50%; transform: translateX(-50%); max-width: 80vw; text-align: center; }
    }

/* ============================================
   ★ Nav UX Upgrade — Mods 1-8
   ============================================ */

/* Mod 1: navFormArea fold/expand transition */
#navFormArea {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 2000px;
    overflow: visible;
}

/* Mod 2: Driving mode immersive — hide all chrome */
body.driving-mode .wiagil-header {
    display: none !important;
}
body.driving-mode .search-container {
    display: none !important;
}
body.driving-mode .toggle-panel-btn {
    display: none !important;
}
body.driving-mode .info-panel {
    display: none !important;
}
body.driving-mode #liveSkyBtn,
body.driving-mode #liveOceanBtn,
body.driving-mode #liveTrackBtn,
body.driving-mode #liveSkyStatus,
body.driving-mode #liveOceanStatus {
    display: none !important;
}
body.driving-mode #altitudeLegend,
body.driving-mode #altitudeLegendHeader,
body.driving-mode #oceanLegend {
    display: none !important;
}
body.driving-mode .hamburger-overlay,
body.driving-mode .hamburger-drawer {
    display: none !important;
}

/* Mod 3: SVG route arrow — transparent background */
.route-arrow-svg,
.route-arrow {
    background: none !important;
    border: none !important;
}

/* Mod 4: Turn marker pulse animation */
@keyframes turnPulse {
    0% { box-shadow: 0 0 0 0 rgba(102,126,234,0.6); }
    70% { box-shadow: 0 0 0 15px rgba(102,126,234,0); }
    100% { box-shadow: 0 0 0 0 rgba(102,126,234,0); }
}
.turn-marker-approaching {
    animation: turnPulse 1.5s infinite;
}

/* Mod 5 + Mod 6: navPanel mobile + HUD mobile */
@media (max-width: 768px) {
    /* Mod 5: navPanel bottom sheet */
    #navPanel {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        border-radius: 20px 20px 0 0 !important;
        max-height: 75vh;
        overflow-y: auto;
        padding: 15px !important;
    }
    #navPanel.nav-left {
        left: 0 !important;
        transform: none !important;
    }
    /* Mod 6: HUD optimization */
    body.driving-mode #hudTop {
        padding: 8px 10px 25px !important;
    }
    body.driving-mode #hudNextTurn {
        padding: 15px !important;
    }
    body.driving-mode #hudTurnIcon {
        font-size: 48px !important;
    }
    body.driving-mode #hudTurnDistance {
        font-size: 28px !important;
    }
    body.driving-mode #hudTurnText {
        font-size: 16px !important;
    }
    body.driving-mode #hudRemainDist,
    body.driving-mode #hudRemainTime,
    body.driving-mode #hudArrivalTime {
        font-size: 24px !important;
    }
    body.driving-mode #hudWiaCode {
        font-size: 18px !important;
    }
    body.driving-mode #hudCoords {
        display: none !important;
    }
}

/* ===== RTL 모드 ===== */
body.rtl-mode #navPanel {
    direction: rtl;
    text-align: right;
}
/* navPanel 좌측 이동 시 RTL 미러링은 JS moveNavPanelLeft()에서 처리 */
body.rtl-mode #navStartInput,
body.rtl-mode #navEndInput {
    text-align: right;
    direction: rtl;
}
body.rtl-mode .nav-step {
    flex-direction: row-reverse;
}
body.rtl-mode .nav-step-icon {
    margin-left: 8px;
    margin-right: 0;
    transform: scaleX(-1);
}
body.rtl-mode #hudBottom {
    direction: rtl;
}
body.rtl-mode #hudTopBar {
    flex-direction: row-reverse;
}
body.rtl-mode #poiToggleButtons {
    direction: rtl;
}
body.rtl-mode .search-container input {
    text-align: right;
    padding-left: 10px;
    padding-right: 40px;
}
body.rtl-mode .search-container .search-icon {
    left: auto;
    right: 12px;
}
body.rtl-mode .info-panel {
    text-align: right;
    direction: rtl;
}
body.rtl-mode #liveTrackBtn,
body.rtl-mode #liveSkyBtn,
body.rtl-mode #liveOceanBtn {
    right: auto !important;
    left: 11px !important;
}
body.rtl-mode .toggle-panel-btn {
    left: auto !important;
    right: 11px !important;
}
body.rtl-mode .flight-panel,
body.rtl-mode .vessel-panel {
    right: auto !important;
    left: 11px !important;
}

