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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    height: 100vh;
    overflow: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* 헤더 스타일 */
.header {
    background: #000000;
    color: white;
    padding: 0.6rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
}

.header-left .site-title {
    color: white;
    margin-right: 1rem;
    flex: 0 0 auto;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    margin-left: 0;
    min-width: 220px;
}

/* 연결 상태 표시 - 시인성 강화 */
.header .connection-status {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15)) !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 25px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    min-height: 36px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.3s ease !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

.header .connection-status.connected {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(16, 185, 129, 0.8)) !important;
    border-color: rgba(34, 197, 94, 0.8) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4) !important;
    animation: pulse-connected 2s infinite !important;
}

.header .connection-status.disconnected {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(220, 38, 38, 0.8)) !important;
    border-color: rgba(239, 68, 68, 0.8) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4) !important;
    animation: pulse-disconnected 1.5s infinite !important;
}

/* 연결 상태 애니메이션 */
@keyframes pulse-connected {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(34, 197, 94, 0.6);
        transform: scale(1.02);
    }
}

@keyframes pulse-disconnected {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
        opacity: 1;
    }
    50% {
        box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6);
        opacity: 0.8;
    }
}

.header-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    flex: 0 1 auto;
    min-width: 0;
    flex-wrap: wrap;
}

.header h1 {
    font-size: 1.1rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: keep-all;
}

/* 모드 선택 버튼 (제목 옆에 배치) */
.mode-selector {
    display: flex;
    gap: 0.3rem;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: #34495e;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 0.8rem;
}

.mode-btn:hover {
    background: #4a5f7a;
}

.mode-btn.active {
    background: #3498db;
}

.mode-btn svg {
    width: 16px;
    height: 16px;
}

/* 헤더 버튼 공통 스타일 - 최우선순위로 설정 */
.header .header-calendar-btn,
.header .header-backup-btn {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem 0.8rem !important;
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    position: relative !important;
    overflow: visible !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    white-space: nowrap !important;
    height: auto !important;
    min-height: 36px !important;
    margin-left: 0.3rem !important;
}

.header .header-calendar-btn:hover,
.header .header-backup-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.header .header-calendar-btn svg,
.header .header-backup-btn svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
}

.header .header-calendar-btn span,
.header .header-backup-btn span {
    font-size: 0.85rem !important;
    font-weight: 500 !important;
}

/* 지도 타입 선택 버튼 그룹 */
.header     display: flex !important;
    gap: 0.2rem !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 0.2rem !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    flex-wrap: nowrap;
    min-width: 0;
    white-space: nowrap;
    flex: 0 0 auto;
    margin-left: 1rem;
}

.header .map-type-btn {
    padding: 0.4rem 0.8rem !important;
    background: transparent !important;
    color: rgba(255, 255, 255, 0.8) !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    min-height: 32px !important;
    flex: 0 0 auto;
    min-width: 64px;
}

.header .map-type-btn:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: white !important;
}

.header .map-type-btn.active {
    background: rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}


.mode-switcher-header {
    display: flex;
    gap: 0.4rem;
    flex-wrap: nowrap;
    justify-content: center;
    white-space: nowrap;
}

.mode-switcher-header .mode-button {
    flex: 0 0 auto;
    min-width: 72px;
    text-align: center;
}
/* 지도 위 검색 입력창 (검색 모드 전용) */
.search-input-container {
    position: absolute;
    top: 1.4rem;
    left: calc(var(--sidebar-width-desktop, 350px) + 2rem);
    right: 0.4rem;
    max-width: 720px;
    background: rgba(15, 23, 42, 0.75);
    border-radius: 999px;
    padding: 0.55rem 0.6rem 0.55rem 0.65rem;
    box-shadow: 0 24px 40px -28px rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(148, 163, 184, 0.35);
    z-index: 1100;
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.search-input-container #searchInput {
    flex: 1;
    padding: 0.62rem 1.1rem;
    border: none;
    border-radius: 999px;
    font-size: 0.95rem;
    outline: none;
    background: rgba(248, 250, 252, 0.92);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.28);
    color: rgba(30, 41, 59, 0.92);
}

.search-input-container #searchInput:focus {
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.4), 0 0 0 3px rgba(59, 130, 246, 0.22);
}

.search-input-container #searchBtn {
    padding: 0.62rem 1.6rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(168, 85, 247, 0.88));
    color: #f8fafc;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 16px 36px rgba(79, 70, 229, 0.35);
}

.search-input-container #searchBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.4);
}

.search-mode-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-mode-badge {
    background: #9B59B6;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.clear-search-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.clear-search-btn:hover {
    background: #c0392b;
}

/* 검색 모드일 때 모드 인디케이터 위치 조정 */
.search-only.show ~ .mode-indicator,
.search-input-container:not([style*="display: none"]) ~ .mode-indicator {
    top: 100px; /* 검색창 아래로 이동 */
}

/* 메인 레이아웃 */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 350px;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    padding: 0.3rem 0.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    height: 100%;
}

.map-container {
    flex: 1;
    position: relative;
}

.map-floating-actions {
    position: absolute;
    top: 1.25rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1200;
    pointer-events: auto;
}

.map-floating-actions .floating-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-width: 140px;
    padding: 0.55rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #f8fafc;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.4);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.map-floating-actions .floating-action-btn.critical {
    color: #fee2e2;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.88), rgba(153, 27, 27, 0.92));
    border-color: rgba(248, 113, 113, 0.45);
    text-shadow: 0 1px 3px rgba(127, 29, 29, 0.45);
}

.map-floating-actions .floating-action-btn.pending {
    pointer-events: none;
    filter: grayscale(0.25);
    opacity: 0.9;
}

.map-floating-actions .floating-action-btn:hover {
    transform: translateY(-2px);
    color: #e0f2fe;
    border-color: rgba(148, 163, 184, 0.45);
    box-shadow: 0 12px 26px rgba(37, 99, 235, 0.28);
}

.map-floating-actions .floating-action-btn.critical:hover {
    color: #fef2f2;
    border-color: rgba(248, 113, 113, 0.65);
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.35);
}

.map-floating-actions .floating-action-btn:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.8);
    outline-offset: 3px;
}

@media (max-width: 1024px) {
    .map-floating-actions {
        top: 1rem;
        right: 0.65rem;
        gap: 0.6rem;
    }

    .map-floating-actions .floating-action-btn {
        min-width: 128px;
        padding: 0.5rem 0.85rem;
    }
}

@media (max-width: 768px) {
    .map-floating-actions {
        top: auto;
        bottom: 1.2rem;
        right: 0.65rem;
    }

    .map-floating-actions .floating-action-btn {
        min-width: 120px;
        padding: 0.5rem 0.8rem;
        box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
    }
}

/* 모드별 독립 지도 인스턴스 스타일 */
.map-instance {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    cursor: default !important;
}

.map-instance * {
    cursor: default !important;
}

/* 기존 #map 스타일 호환성 (레거시 지원) */
#map {
    width: 100%;
    height: 100%;
    cursor: default !important;
}

#map * {
    cursor: default !important;
}

/* 손 모드일 때 커서 변경 */
body.mode-hand #map {
    cursor: grab !important;
}

body.mode-hand #map:active {
    cursor: grabbing !important;
}

body.mode-hand #map * {
    cursor: grab !important;
}

/* 손 모드에서도 헤더 버튼들은 반드시 포인터 커서 유지 */
body.mode-hand .header .map-type-btn,
body.mode-hand .header .map-type-btn:hover,
body.mode-hand .header .map-type-btn.active,
body.mode-hand .header .header-calendar-btn,
body.mode-hand .header .header-backup-btn,
body.mode-hand .mode-switcher .mode-button {
    cursor: pointer !important;
}

/* 손 모드에서 모든 헤더 요소들 포인터 커서 강제 적용 */
body.mode-hand .header,
body.mode-hand .header *:not(#map):not(#map *) {
    cursor: pointer !important;
}

/* 손 모드에서도 사이드바 유지 */
body.mode-hand .sidebar {
    display: flex;
}

/* 손 모드에서도 기본 레이아웃 유지 */
body.mode-hand .map-container {
    flex: 1;
}

/* 손 모드에서 검색 입력창 위치 조정 */
body.mode-hand .search-input-container {
    left: 20px; /* 사이드바가 없으므로 왼쪽부터 시작 */
}

/* 거리뷰(파노라마) */
#pano {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* 색상 패널 */
.color-panel {
    background: white;
    border-radius: 8px;
    padding: 0.6rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-panel-content {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.color-panel-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.95rem;
    padding: 1.6rem 1.2rem;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.05);
    text-align: center;
    color: rgba(30, 41, 59, 0.75);
    min-height: 180px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 16px 32px -24px rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(6px);
}

.color-panel-placeholder .placeholder-text {
    font-size: 0.94rem;
    line-height: 1.6;
    letter-spacing: 0.015em;
    color: rgba(15, 23, 42, 0.7);
    max-width: 16ch;
    margin: 0 auto;
}

.btn-switch-mode {
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.58rem 1.65rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.92), rgba(79, 70, 229, 0.85));
    color: #f8fafc;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 14px 35px rgba(79, 70, 229, 0.35);
    position: relative;
}

.btn-switch-mode::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(148, 163, 184, 0.18));
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: -1;
}

.btn-switch-mode:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(79, 70, 229, 0.38);
}

.btn-switch-mode:hover::after {
    opacity: 1;
}

.btn-switch-mode:active {
    transform: translateY(0);
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.28);
}

.color-panel h3 {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: #2c3e50;
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.3rem;
}

.color-item {
    width: 100%;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s;
}

.color-item:hover {
    transform: scale(1.1);
}

.color-item.active {
    box-shadow: 0 0 0 3px #3498db;
}

.current-color {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

#currentColor {
    width: 25px;
    height: 25px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

/* 필지 정보 폼 */
.parcel-info {
    background: white;
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.parcel-info h3 {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: #2c3e50;
}

#parcelForm {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
    gap: 0.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.form-group label {
    font-size: 0.78rem;
    color: #334155;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.45rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.88rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.65);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}


.form-actions {
    margin-top: 1.2rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-actions-primary {
    display: flex;
    gap: 0.6rem;
}

.form-actions-primary button {
    flex: 1;
    min-width: 90px;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #1f2933;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.95), rgba(237, 242, 247, 0.92));
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
}

.form-actions-primary button:hover {
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

/* 필지 정보 버튼 스타일 */
.btn-save, #saveParcelInfoBtn {
    border-color: rgba(16, 185, 129, 0.35);
}
.btn-save:hover, #saveParcelInfoBtn:hover {
    border-color: rgba(16, 185, 129, 0.65);
    color: #0f5132;
}

.btn-delete, #deleteParcelInfoBtn {
    border-color: rgba(239, 68, 68, 0.35);
}
.btn-delete:hover, #deleteParcelInfoBtn:hover {
    border-color: rgba(239, 68, 68, 0.65);
    color: #7f1d1d;
}

.btn-copy, #copyToClipboardBtn {
    border-color: rgba(37, 99, 235, 0.35);
}
.btn-copy:hover, #copyToClipboardBtn:hover {
    border-color: rgba(37, 99, 235, 0.65);
    color: #1d3a8a;
}

#clearBtn {
    background: #95a5a6;
    color: white;
}

#clearBtn:hover {
    background: #7f8c8d;
}

#exportBtn {
    background: #27ae60;
    color: white;
}

#exportBtn:hover {
    background: #229954;
}

/* 필지 목록 */
.parcel-list {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.parcel-list h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

#parcelListContainer {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 0.5rem;
}

.parcel-item {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.parcel-item:hover {
    background: #f1f3f5;
}

.parcel-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.parcel-item-number {
    font-weight: bold;
    color: #2c3e50;
}

.parcel-item-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #dee2e6;
}

.parcel-item-info {
    font-size: 0.75rem;
    color: #6c757d;
}

/* 모달 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* 플로팅 캘린더 버튼 */
.floating-calendar-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1500;
    transition: transform 0.3s, box-shadow 0.3s;
}

.floating-calendar-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

/* 플로팅 캘린더 패널 */
.floating-calendar-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 2000;
    display: none;
    flex-direction: column;
    animation: fadeIn 0.3s ease-in-out;
}

.floating-calendar-panel.show {
    display: flex;
}

.floating-calendar-panel.minimized {
    height: 45px;
    width: 250px;
}

.floating-calendar-panel.maximized {
    width: 90vw;
    height: 90vh;
    max-width: 1200px;
    max-height: 800px;
}

/* 캘린더 헤더 */
.calendar-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.calendar-title {
    font-size: 1.2rem;
    font-weight: bold;
}

.calendar-controls {
    display: flex;
    gap: 0.5rem;
}

.calendar-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
}

.calendar-btn:hover {
    background: rgba(255,255,255,0.3);
}

.calendar-close {
    background: rgba(231, 76, 60, 0.8);
}

.calendar-close:hover {
    background: rgba(231, 76, 60, 1);
}

/* 캘린더 바디 */
.calendar-body {
    flex: 1;
    padding: 1rem;
    overflow: hidden;
}

.floating-calendar-panel.minimized .calendar-body {
    display: none;
}

/* 캘린더 푸터 */
.calendar-footer {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 0.5rem;
}

.floating-calendar-panel.minimized .calendar-footer {
    display: none;
}

.calendar-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.875rem;
}

.calendar-update-btn {
    padding: 0.5rem 1.5rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.calendar-update-btn:hover {
    background: #2980b9;
}

/* 리사이즈 핸들 */
.calendar-resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 50%, #dee2e6 50%);
    border-radius: 0 0 12px 0;
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 스크롤바 숨기기 */
.sidebar {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.sidebar::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* 낮은 해상도 화면 대응 */
@media (max-height: 800px) {
    .color-item {
        height: 28px;
    }
    
    .form-group {
        margin-bottom: 0.3rem;
    }
    
    .color-panel, .parcel-info {
        padding: 0.4rem;
    }
    
    .color-panel h3, .parcel-info h3 {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.25rem;
        font-size: 0.8rem;
    }
}

/* 헤더 반응형 디자인 개선 */
@media (max-width: 1200px) {
    .header {
        padding: 0.5rem 1rem !important;
        gap: 1rem !important;
    }

    .header h1 {
        font-size: 1rem !important;
    }

    .header .map-type-btn {
        padding: 0.3rem 0.6rem !important;
        font-size: 0.75rem !important;
    }

    .header .header-calendar-btn,
    .header .header-backup-btn {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.8rem !important;
    }

    .header .connection-status {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.6rem !important;
    }
}

@media (max-width: 992px) {
    .header {
        flex-direction: column !important;
        gap: 0.5rem !important;
        padding: 0.5rem 1rem !important;
    }

    .header-left,
    .header-center,
    .header-right {
        width: 100% !important;
        justify-content: center !important;
    }

    .header-left {
        order: 1;
    }

    .header-center {
        order: 2;
    }

    .header-right {
        order: 3;
        gap: 0.5rem !important;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 0.9rem !important;
    }

    .header .map-type-btn {
        padding: 0.25rem 0.4rem !important;
        font-size: 0.7rem !important;
    }

    .header .header-calendar-btn span,
    .header .header-backup-btn span {
        display: none !important;
    }

    .header .header-calendar-btn,
    .header .header-backup-btn {
        padding: 0.4rem !important;
        min-width: 36px !important;
    }

    .header-controls {
        flex-direction: column;
        gap: 0.5rem;
    }

    .main-container {
        height: calc(100vh - 120px) !important;
    }

    .sidebar {
        display: none;
        position: absolute;
        z-index: 999;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
    }

    .sidebar.show {
        display: flex;
    }

    .search-container {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0.4rem 0.5rem !important;
    }

    .header h1 {
        font-size: 0.8rem !important;
        text-align: center !important;
    }

    .header         gap: 0.1rem !important;
        padding: 0.1rem !important;
    }

    .header .map-type-btn {
        padding: 0.2rem 0.3rem !important;
        font-size: 0.65rem !important;
        min-height: 28px !important;
    }

    .header .connection-status {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.4rem !important;
    }

    .main-container {
        height: calc(100vh - 110px) !important;
    }
}

/* ==================== 하단 슬라이드 패널 ==================== */
.parcel-list-toggle-btn {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.parcel-list-toggle-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.parcel-list-toggle-btn.panel-open {
    bottom: 320px;
}

.btn-icon {
    font-size: 20px;
}

.btn-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 14px;
}

/* 하단 패널 */
.bottom-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: white;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.bottom-panel.open {
    transform: translateY(0);
}

/* 패널 핸들 */
.panel-handle {
    height: 20px;
    cursor: ns-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.handle-bar {
    width: 50px;
    height: 4px;
    background: #cbd5e0;
    border-radius: 2px;
    transition: background 0.2s;
}

.panel-handle:hover .handle-bar {
    background: #667eea;
}

/* 패널 헤더 */
.panel-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f7f9fc;
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-count {
    color: #718096;
    font-size: 14px;
    font-weight: normal;
}

.panel-controls {
    display: flex;
    gap: 8px;
}

.panel-btn {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.panel-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

/* 패널 본문 */
.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: white;
}

.parcel-list-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

/* 필지 카드 스타일 */
.parcel-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.2s;
    cursor: pointer;
}

.parcel-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #667eea;
}

.parcel-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.parcel-address {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    flex: 1;
}

.parcel-color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.parcel-info {
    font-size: 12px;
    color: #718096;
    line-height: 1.4;
}

.parcel-info div {
    margin: 4px 0;
}

.parcel-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.parcel-action-btn {
    flex: 1;
    padding: 6px;
    background: #f7f9fc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.parcel-action-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.parcel-action-btn.delete {
    color: #f56565;
}

.parcel-action-btn.delete:hover {
    background: #fff5f5;
    border-color: #fc8181;
}

/* 스크롤바 스타일 */
.panel-body::-webkit-scrollbar {
    width: 8px;
}

.panel-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.panel-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.panel-body::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* M 마커 스타일 (메모 있는 필지 표시) */
.memo-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    background: #FF6B35;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Noto Sans KR', sans-serif;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.4);
    border: 2px solid white;
    z-index: 1000;
    cursor: pointer;
    transition: all 0.2s ease;
}

.memo-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.6);
}

.memo-marker.search-parcel {
    background: #9370DB; /* 보라색 (검색 필지용) */
    box-shadow: 0 2px 8px rgba(147, 112, 219, 0.4);
}

.memo-marker.search-parcel:hover {
    box-shadow: 0 4px 12px rgba(147, 112, 219, 0.6);
}

/* 연결 상태 표시 스타일 */
.connection-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-right: 10px;
}

.connection-status.connected {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.connection-status.disconnected {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* 거리뷰 스타일 */
.map-type-btn.active {
    background: #4285F4;
    color: white;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

#pano {
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    z-index: 100;
}

.pano-close-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 1000 !important;
    background: rgba(0,0,0,0.7) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s ease !important;
}

.pano-close-btn:hover {
    background: rgba(0,0,0,0.9) !important;
}

/* 거리뷰 선 스타일 (폴리라인) */
.streetview-line {
    cursor: pointer;
    transition: all 0.2s ease;
}

.streetview-line:hover {
    stroke-width: 4px;
    stroke: #FF6B35;
}
/* 백업 관리 스타일 - 왼쪽 사이드바용 (제거됨)
.backup-management {
    padding: 15px;
    background: white;
    border-radius: 5px;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.backup-management h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
}

.backup-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.btn-backup, .btn-backup-list {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.3s;
}

.btn-backup {
    background-color: #6c757d;
    color: white;
}

.btn-backup:hover {
    background-color: #5a6268;
}

.btn-backup-list {
    background-color: #17a2b8;
    color: white;
}

.btn-backup-list:hover {
    background-color: #138496;
}

.backup-status {
    padding: 5px;
    background: #f8f9fa;
    border-radius: 3px;
    font-size: 11px;
    color: #6c757d;
}
*/

/* 모달 스타일 */
.modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
}

.modal-header {
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.modal-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #000;
}

.backup-table {
    width: 100%;
    border-collapse: collapse;
}

.backup-table thead {
    background-color: #f8f9fa;
}

.backup-table th {
    padding: 10px;
    text-align: left;
    border-bottom: 2px solid #dee2e6;
    font-size: 14px;
}

.backup-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #dee2e6;
    font-size: 13px;
}

.backup-table tbody tr:hover {
    background-color: #f8f9fa;
}

.btn-restore {
    padding: 5px 10px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.btn-restore:hover {
    background-color: #218838;
}


/* 사이드바 하단 버튼들 */
.sidebar-bottom-buttons {
    margin-top: auto;
    padding: 0.4rem 0;
    display: flex;
    flex-direction: row;
    gap: 0.4rem;
}

.sidebar-btn {
    flex: 1;
    min-width: 100px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.calendar-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.calendar-btn:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.backup-btn {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.backup-btn:hover {
    background: linear-gradient(135deg, #e67ee6, #e04e5c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 147, 251, 0.4);
}

.sidebar-btn svg {
    flex-shrink: 0;
}

/* 개선된 사이드바 버튼 스타일 - 강제 통일 */
.sidebar-btn {
    position: relative;
    z-index: 1;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    height: auto !important;
}

.sidebar-btn svg {
    flex-shrink: 0;
    z-index: 2;
    position: relative;
}

.sidebar-btn span {
    z-index: 2;
    position: relative;
}

/* 캘린더 버튼 개선된 스타일 */
.calendar-btn {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    position: relative;
}

.calendar-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
    z-index: 0;
}

.calendar-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4) !important;
}

.calendar-btn:hover::before {
    opacity: 1;
}

.calendar-btn:active {
    transform: translateY(-1px) !important;
}

/* 백업 버튼 개선된 스타일 */
.backup-btn {
    background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%) !important;
    position: relative;
    padding: 12px 16px !important;
    border-radius: 8px !important;
}

.backup-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
    z-index: 0;
}

.backup-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4) !important;
}

.backup-btn:hover::before {
    opacity: 1;
}

.backup-btn:active {
    transform: translateY(-1px) !important;
}

/* 버튼 클릭 시 리플 효과 */
.sidebar-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: 1;
}

.sidebar-btn:active::after {
    width: 300px;
    height: 300px;
}

/* 버튼 완전 통일 강제 적용 */
.sidebar-bottom-buttons .calendar-btn,
.sidebar-bottom-buttons .backup-btn {
    padding: 12px 16px !important;
    border-radius: 8px !important;
    height: auto !important;
    box-sizing: border-box !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.sidebar-bottom-buttons .calendar-btn::before,
.sidebar-bottom-buttons .backup-btn::before {
    border-radius: 8px !important;
}

@media (max-width: 768px) {
    .sidebar-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
        gap: 4px;
    }

    .sidebar-bottom-buttons .calendar-btn,
    .sidebar-bottom-buttons .backup-btn {
        padding: 4px 8px !important;
        font-size: 0.7rem !important;
        gap: 4px !important;
    }
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000000;
    color: white;
    padding: 0.6rem 1rem;
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}


.header__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.map-type-inner {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.mode-inner {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    background: rgba(0,0,0,0.15);
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
}

.header {
    background: #000000;
    color: white;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.header__brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header__brand .site-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.header__controls {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    margin-right: 1.5rem;
}

    display: flex;
    gap: 0.5rem;
}

.mode-switcher-header {
    display: flex;
    gap: 0.5rem;
}

.header__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.map-type-selector {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 1.8rem;
}

@media (min-width: 1200px) {
    .map-type-selector {
        margin-left: 5.5rem;
    }
}

/* 헤더 모드/지도 버튼 리프레시 */
.mode-switcher-header .mode-button,
.header .map-type-btn {
    border-radius: 10px !important;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    background: rgba(255, 255, 255, 0.07) !important;
    color: rgba(248, 250, 252, 0.95) !important;
    padding: 0.52rem 1rem !important;
    min-width: 70px !important;
    min-height: 40px !important;
    border-right: none !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    line-height: 1 !important;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease !important;
    box-shadow: none !important;
}

.mode-switcher-header .mode-button::before,
. {
    content: attr(data-emoji);
    font-size: 1.05rem;
}

.mode-switcher-header .mode-button:hover,
.header .map-type-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--mode-accent-rgb), 0.45) !important;
    background: rgba(var(--mode-accent-rgb), 0.14) !important;
}

.mode-switcher-header .mode-button.active,
.header .map-type-btn.active {
    background: radial-gradient(circle at 20% 20%, rgba(var(--mode-accent-rgb), 0.3), rgba(var(--mode-accent-rgb), 0.08)) !important;
    border-color: rgba(var(--mode-accent-rgb), 0.48) !important;
    color: #f8fafc !important;
    box-shadow: 0 10px 26px rgba(var(--mode-accent-rgb), 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
}

.header .connection-status {
    border-radius: 10px !important;
    border: 1px solid rgba(148, 163, 184, 0.4) !important;
    background: rgba(34, 197, 94, 0.18) !important;
    color: #ecfdf5 !important;
    padding: 0.45rem 0.9rem !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

#logoutBtn.logout-btn {
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    padding: 0.45rem 0.85rem;
    font-weight: 500;
    transition: background 0.18s ease, border-color 0.18s ease;
}

#logoutBtn.logout-btn:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.6);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: max-content;
}

.brand-text .brand-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: rgba(226, 232, 240, 0.8);
    text-transform: uppercase;
}

.brand-text .site-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.header .map-type-btn,
.header .mode-button,
.header .connection-status,
#logoutBtn.logout-btn {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.,
.header .mode-button::before {
    font-size: 1rem;
}

.header .map-type-btn,
.header .mode-button {
    background: rgba(30, 30, 32, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(248, 250, 252, 0.9) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 10px !important;
}

.header .map-type-btn.active,
.header .mode-button.active {
    background: rgba(44, 120, 224, 0.35) !important;
    border-color: rgba(94, 162, 255, 0.6) !important;
    color: #f8fafc !important;
}

#logoutBtn.logout-btn {
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.header .connection-status {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(34, 197, 94, 0.25) !important;
    border: 1px solid rgba(34, 197, 94, 0.4) !important;
}

/* 스크롤 최적화 */
.scrollable {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
}

