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

/* Screen reader only content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 16px;
}

.upload-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.upload-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin-bottom: 20px;
}

.file-input-wrapper input[type='file'] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: inline-block;
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.file-input-label:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.cache-delete-btn {
    padding: 10px 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cache-delete-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* 위험 구역 스타일 */
.danger-zone {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 2px solid #feb2b2;
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(254, 178, 178, 0.3);
}

.danger-zone h3 {
    color: #c53030;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 700;
}

.danger-warning {
    color: #742a2a;
    font-size: 0.95em;
    margin-bottom: 20px;
    line-height: 1.5;
    font-weight: 500;
}

.danger-btn {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-weight: 700;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(197, 48, 48, 0.4);
}

.danger-btn:hover {
    background: linear-gradient(135deg, #c53030 0%, #9c2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(197, 48, 48, 0.6);
}

.danger-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(197, 48, 48, 0.4);
}

.category-filter-wrapper {
    position: relative;
}

.category-toggle-btn {
    padding: 8px 16px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.category-toggle-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
}

.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 8px;
    min-width: 160px;
    max-width: 200px;
    z-index: 1000;
    margin-top: 5px;
    max-height: 280px;
    overflow-y: auto;
    width: max-content;
}

.category-option {
    display: flex;
    align-items: center;
    padding: 3px 4px;
    cursor: pointer;
    border-radius: 3px;
    white-space: nowrap;
    min-height: 24px;
}

.category-option:hover {
    background: #f0f4ff;
}

.category-option input[type='checkbox'] {
    margin-right: 6px;
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.category-option span {
    font-size: 13px;
    line-height: 1.2;
}

.status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
}

.status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.stores-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: none;
    flex: 1;
}

.search-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-row > * {
    flex: 1;
    min-width: 120px;
}

.action-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.button-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.button-row button {
    flex: 1;
    min-width: 120px;
}

.primary-btn {
    background: #667eea !important;
    color: white !important;
    font-weight: 600;
}

.primary-btn:hover {
    background: #764ba2 !important;
}

.secondary-btn {
    background: #28a745 !important;
    color: white !important;
}

.secondary-btn:hover {
    background: #218838 !important;
}

.secondary-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.search-controls input {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.search-controls input:focus {
    outline: none;
    border-color: #667eea;
}

.search-controls select {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.search-controls select:focus {
    outline: none;
    border-color: #667eea;
}

.search-controls button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-controls button:hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.search-controls button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.stores-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.stores-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.stores-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.stores-table th.sortable:hover {
    background: #e9ecef;
}

.stores-table th.sortable::after {
    content: '⇅';
    position: absolute;
    right: 10px;
    opacity: 0.3;
}

.stores-table th.sortable.asc::after {
    content: '↑';
    opacity: 1;
    color: #667eea;
}

.stores-table th.sortable.desc::after {
    content: '↓';
    opacity: 1;
    color: #667eea;
}

.stores-table td {
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
}

.stores-table tr:hover {
    background: #f8f9fa;
}

.stores-table .clickable {
    cursor: pointer;
    transition: background 0.3s ease;
}

.stores-table .clickable:hover {
    background: #e8f0fe;
}

.store-name {
    color: #667eea;
    font-weight: 500;
}

.dong-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.searching {
    background: #fff3cd;
    color: #856404;
}

.status-badge.found {
    background: #d4edda;
    color: #155724;
}

.status-badge.not-found {
    background: #f8d7da;
    color: #721c24;
}

tr.nearby-match {
    background: #f3f9ff !important;
    border-left: 3px solid #667eea;
}

.map-container {
    margin-bottom: 20px;
}

.main-content {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.map-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 0;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.map-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

#map {
    width: 100%;
    height: 600px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    display: none;
    position: relative;
}

@media screen and (min-width: 769px) {
    .map-container {
        margin-bottom: 20px;
    }

    #map {
        height: 600px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .map-actions {
        margin-top: -2px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-left-radius: 15px;
        border-bottom-right-radius: 15px;
    }

    .main-content {
        flex-direction: row;
    }

    .stores-section {
        flex: 1;
        min-width: 400px;
        max-height: 500px;
        overflow-y: auto;
    }

    /* 데스크톱에서는 통계를 4x1로 표시 */
    .stats {
        grid-template-columns: repeat(4, 1fr);
        grid-template-rows: 1fr;
    }
}

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.map-control-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.map-control-btn:hover {
    background: #f8f9fa;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.map-control-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.current-location-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    border: 3px solid white;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
    position: relative;
}

.current-location-marker::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.2);
    transform: translate(-50%, -50%);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.info {
    margin-top: 20px;
    padding: 20px;
    background: #e3f2fd;
    border-radius: 10px;
    border-left: 4px solid #2196f3;
}

.info h3 {
    color: #1976d2;
    margin-bottom: 10px;
}

.info ul {
    list-style: none;
    padding-left: 0;
}

.info li {
    padding: 5px 0;
    color: #424242;
}

.info ol {
    padding-left: 20px;
}

.info ol li {
    margin-bottom: 12px;
}

.info strong {
    color: #1976d2;
}

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

.warning-info {
    background: #fff3cd !important;
    border-color: #ffc107 !important;
    margin-top: 10px;
}

.warning-info h3,
.warning-info p {
    color: #856404 !important;
}

.progress {
    margin-top: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
    display: none;
}

.progress-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-card h4 {
    color: #667eea;
    font-size: 24px;
    margin-bottom: 5px;
}

.stat-card p {
    color: #666;
    font-size: 14px;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-size-selector select {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.pagination {
    display: flex;
    gap: 5px;
}

.pagination button {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pagination button:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.grouped-stores-popup {
    position: absolute;
    background: white;
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    max-height: 400px;
    overflow: hidden;
    z-index: 10000;
}

.grouped-stores-header {
    background: #667eea;
    color: white;
    padding: 10px 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grouped-stores-list {
    max-height: 340px;
    overflow-y: auto;
}

.grouped-store-item {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.grouped-store-item:hover {
    background: #f5f5f5;
}

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

.grouped-store-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.grouped-store-info {
    font-size: 13px;
    color: #666;
}

.close-popup {
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close-popup:hover {
    opacity: 1;
}

.grouped-marker-overlay {
    background: #667eea;
    color: white;
    font-weight: bold;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    min-width: 20px;
    text-align: center;
}

/* 모바일 스타일 */
@media screen and (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 12px;
        margin-bottom: 8px;
    }

    .header h1 {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .header p {
        font-size: 12px;
    }

    .upload-section {
        padding: 12px;
        margin-bottom: 8px;
    }

    .upload-buttons {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    /* 지도와 검색 결과를 세로 배치 */
    .map-container {
        margin-bottom: 15px;
    }

    .main-content {
        display: block; /* flex 대신 block 사용 */
        margin-bottom: 15px;
    }

    /* 지도를 뷰포트 기준으로 크게 표시 */
    #map {
        height: calc(100vh - 300px); /* 헤더, 업로드섹션, 액션버튼 등을 제외한 높이 */
        min-height: 350px;
        max-height: 600px;
        width: 100%;
        margin-bottom: 15px;
        position: static;
        display: block !important;
        clear: both;
        border: 1px solid #e0e0e0; /* 경계 표시로 디버깅 */
    }

    .stores-section {
        padding: 12px;
        max-height: 300px;
        overflow-y: auto;
        position: static;
        display: block !important;
        clear: both;
        margin-top: 0;
        background: white;
        border: 1px solid #e0e0e0; /* 경계 표시로 디버깅 */
    }

    .stores-section h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    /* 모바일에서 검색 컨트롤 */
    .search-controls {
        position: relative; /* sticky 대신 relative 사용 */
        background: white;
        z-index: 10;
        padding: 10px;
        margin-bottom: 15px;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
        border-radius: 8px;
    }

    .filter-row {
        flex-direction: column;
        gap: 8px;
    }

    .filter-row > * {
        width: 100%;
        min-width: auto;
    }

    .action-row {
        flex-direction: column;
        gap: 8px;
    }

    .button-row {
        flex-direction: column;
        gap: 8px;
    }

    .button-row button {
        width: 100%;
        min-width: auto;
        margin: 0;
    }

    .search-controls input,
    .search-controls select {
        font-size: 16px; /* iOS 자동 확대 방지 */
        padding: 12px;
    }

    .search-controls button {
        padding: 12px 16px;
        font-size: 14px;
    }

    .category-filter-wrapper {
        width: 100%;
    }

    .category-toggle-btn {
        width: 100%;
        text-align: left;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .category-dropdown {
        left: 0;
        right: auto;
        width: auto;
        max-width: 280px;
        min-width: 180px;
    }

    /* 테이블 컴팩트 */
    .stores-section {
        overflow-x: hidden;
    }

    .stores-table th,
    .stores-table td {
        padding: 4px 6px;
        font-size: 11px;
        line-height: 1.2;
    }

    /* 통계 카드 2x2 그리드 */
    .stats {
        gap: 8px;
        margin-bottom: 10px;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
    }

    .stat-card {
        padding: 8px;
    }

    .stat-card h4 {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .stat-card p {
        font-size: 11px;
    }

    /* 지도 액션 버튼 2x1 그리드 */
    .map-actions {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin: 10px 0;
        padding: 8px;
    }

    .map-actions button {
        padding: 10px 6px;
        font-size: 12px;
    }

    /* 페이지네이션 모바일 최적화 */
    .pagination-container {
        flex-direction: column;
        gap: 6px;
        align-items: stretch;
        margin-top: 8px;
        padding: 8px 0;
    }

    .pagination-controls {
        flex-direction: column;
        gap: 6px;
    }

    .pagination button {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .pagination-info {
        font-size: 11px;
    }

    /* 안내 섹션 - 축약 */
    .info {
        padding: 10px;
        font-size: 12px;
        margin-top: 8px;
    }

    .info h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .info li {
        font-size: 11px;
        margin-bottom: 4px;
    }

    .info small {
        font-size: 10px;
    }

    /* 팝업 위치 조정 */
    .grouped-stores-popup {
        left: 10px;
        right: 10px;
        max-height: 70vh;
    }

    /* 정렬 가능한 헤더 스타일 */
    .sortable {
        position: relative;
        padding-right: 20px;
    }

    .sortable .sort-icon::after {
        content: '↕';
        position: absolute;
        right: 5px;
        opacity: 0.3;
    }

    .sortable.asc .sort-icon::after {
        content: '↑';
        opacity: 1;
        color: #667eea;
    }

    .sortable.desc .sort-icon::after {
        content: '↓';
        opacity: 1;
        color: #667eea;
    }

    /* 지도 전체화면 모드 */
    #map.fullscreen {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 9999;
        margin: 0;
        max-height: none;
        border: none;
    }

    /* 전체화면 토글 버튼 */
    .fullscreen-toggle {
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 1001;
        width: 40px;
        height: 40px;
        background: white;
        border: 2px solid #667eea;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .fullscreen-toggle:hover {
        background: #f0f4ff;
    }

    /* 터치 영역 확대 */
    .map-control-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
        border-radius: 8px;
    }

    /* 테이블 로우 터치 영역 */
    .stores-table tr {
        height: 36px;
    }

    .stores-table .clickable {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
        tap-highlight-color: rgba(102, 126, 234, 0.2);
    }

    /* 인풋 테두리 제거 */
    input,
    select,
    button,
    textarea {
        -webkit-appearance: none;
        -webkit-border-radius: 0;
    }

    /* iOS 자동 확대 방지 */
    input[type='text'],
    input[type='search'],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* 스크롤 개선 */
    .stores-section {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }

    .file-input-label,
    .cache-delete-btn {
        width: 100%;
        text-align: center;
    }

    /* 표 내용 최적화 */
    .stores-table {
        font-size: 12px;
        width: 100%;
        table-layout: fixed;
    }

    .stores-table thead th:nth-child(1),
    .stores-table tbody td:nth-child(1) {
        width: 80px; /* 행정동 */
    }

    .stores-table thead th:nth-child(2),
    .stores-table tbody td:nth-child(2) {
        width: auto; /* 상호 */
        min-width: 120px;
    }

    .stores-table thead th:nth-child(3),
    .stores-table tbody td:nth-child(3),
    .stores-table thead th:nth-child(4),
    .stores-table tbody td:nth-child(4) {
        display: none; /* 모바일에서 카테고리와 상세주소 숨김 */
    }

    .stores-table thead th:nth-child(5),
    .stores-table tbody td:nth-child(5) {
        width: 70px; /* 검색상태 */
    }

    /* 테이블 컴팩트 버전 */
    .store-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dong-badge {
        font-size: 10px;
        padding: 2px 6px;
    }

    /* 모바일 위험 구역 스타일 */
    .danger-zone {
        padding: 15px;
        margin-top: 15px;
    }

    .danger-zone h3 {
        font-size: 1.1em;
        margin-bottom: 10px;
    }

    .danger-warning {
        font-size: 0.85em;
        margin-bottom: 15px;
    }

    .danger-btn {
        padding: 12px 20px;
        font-size: 0.9em;
        width: 100%;
    }
}

/* 더 작은 화면 (480px 이하) */
@media screen and (max-width: 480px) {
    .header {
        padding: 15px;
    }

    .header h1 {
        font-size: 18px;
    }

    #map {
        height: calc(100vh - 280px); /* 더 작은 화면에서도 뷰포트 기준 */
        min-height: 300px;
        max-height: 500px;
        margin-bottom: 12px;
    }

    .stores-section {
        max-height: 250px;
    }

    .main-content {
        margin-bottom: 10px;
    }

    .search-controls button {
        padding: 10px 12px;
        font-size: 13px;
    }

    .stats {
        gap: 6px;
    }

    .stat-card {
        padding: 6px;
    }

    .stat-card h4 {
        font-size: 14px;
    }

    .stat-card p {
        font-size: 10px;
    }

    .map-actions {
        margin: 8px 0;
        padding: 6px;
        gap: 4px;
    }

    .map-actions button {
        padding: 8px 4px;
        font-size: 11px;
    }
}
