/* ===== Reset & Variables ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent-violet: #4338ca;
    --accent-gradient: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f4f4f5;
    --text-primary: #1e1b4b;
    --text-secondary: #4c4878;
    --text-tertiary: #94a3b8;
    
    --border: #e2e8f0;
    --shadow-md: 0 4px 16px rgba(79, 70, 229, 0.08);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --transition: 0.2s ease;
    
    --michelin-gold: #f59e0b;
}

/* 블루리본 아이콘 */
.blue-ribbon {
    width: 14px;
    height: 14px;
    background-image: url("blueribbon.svg");
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ===== Header ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.header-center {
    display: flex;
    justify-content: center;
    flex: 1;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.logo-link { text-decoration: none; }

.logo-main {
    font-size: 17px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-divider { color: #d1d5db; margin: 0 4px; }
.logo-sub { color: #64748b; font-weight: 500; font-size: 15px; }

.db-count {
    padding: 4px 10px;
    background: var(--accent-gradient);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
}

.view-tabs { display: flex; gap: 6px; }

.view-tab {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: var(--transition);
}

.view-tab:hover { color: var(--accent-violet); background: #eef2ff; }
.view-tab.active { background: var(--accent-gradient); color: #ffffff; }

/* ===== Main ===== */
.main-container {
    max-width: 1020px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== About Section ===== */
.about-section {
    background: linear-gradient(135deg, #fafafa 0%, #f0f4ff 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}

.about-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.about-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.about-badge {
    padding: 3px 8px;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    border-radius: 10px;
}

.about-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.about-stats {
    display: flex;
    gap: 20px;
}

.about-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

.about-stat-icon { 
    width: 16px; 
    height: 16px; 
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.about-stat-icon.michelin-icon {
    background-image: url("michelin.svg");
}
.about-stat-icon.blueribbon-icon {
    background-image: url("blueribbon.svg");
}
.about-stat-icon.ccw-icon {
    background-image: url("ccw.svg");
}
.about-stat-num { font-size: 14px; font-weight: 600; color: var(--text-secondary); }
.about-stat-label { font-size: 12px; color: var(--text-tertiary); }

.filter-result {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-align: right;
    padding-right: 4px;
}

.filter-result #filteredCount {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
}

/* ===== Stats (이전 버전 호환) ===== */
.stats-bar {
    display: flex;
    gap: 24px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.stat-item { display: flex; align-items: center; gap: 6px; }
.stat-num { font-size: 16px; font-weight: 700; color: var(--accent-violet); }
.stat-label { font-size: 12px; color: var(--text-tertiary); }

/* ===== Filters ===== */
.filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group { display: flex; gap: 6px; flex-wrap: wrap; }

.filter-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.filter-btn:hover { border-color: var(--accent-violet); }
.filter-btn.active { background: var(--accent-gradient); color: #fff; border-color: transparent; }

/* 필터 버튼 내 수상 아이콘 */
.michelin-filter-icon,
.blueribbon-filter-icon,
.ccw-filter-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
.michelin-filter-icon {
    background-image: url("michelin.svg");
}
.blueribbon-filter-icon {
    background-image: url("blueribbon.svg");
}
.ccw-filter-icon {
    background-image: url("ccw.svg");
}

/* active 상태에서 아이콘 흰색으로 */
.filter-btn.active .michelin-filter-icon {
    background-image: url("michelin-white.svg");
}
.filter-btn.active .blueribbon-filter-icon {
    background-image: url("blueribbon-white.svg");
}
.filter-btn.active .ccw-filter-icon {
    background-image: url("ccw.svg");
    filter: brightness(0) invert(1);
}

.filter-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 4px;
}

/* Checkbox Filter */
.checkbox-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.checkbox-filter:hover { border-color: var(--accent-violet); }

.checkbox-filter input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--accent-violet);
    cursor: pointer;
}

.checkbox-filter .checkbox-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.checkbox-filter:has(input:checked) {
    background: #eef2ff;
    border-color: var(--accent-violet);
}

.checkbox-filter:has(input:checked) .checkbox-label {
    color: var(--accent-violet);
}

/* ===== Restaurant Table ===== */
.restaurant-table-wrap {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

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

.restaurant-table thead {
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.restaurant-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.restaurant-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: var(--transition);
}

.restaurant-table tbody tr:last-child { border-bottom: none; }
.restaurant-table tbody tr:hover { background: #f8faff; }

.restaurant-table td {
    padding: 8px 8px;
    vertical-align: middle;
    font-size: 13px;
}

/* Column widths */
.col-rank { width: 36px; text-align: center; }
.col-photo { width: 1%; white-space: nowrap; } /* 콘텐츠(사진) 크기만큼만 */
.col-name { width: 160px; max-width: 160px; }
.col-cuisine { width: 100px; }
.col-location { width: 130px; }
.col-awards { width: 180px; }
.col-rating { width: 60px; text-align: center !important; }
.col-reviews { width: 70px; text-align: center !important; }

/* Cell styles */
.cell-rank {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

.cell-photo {
    width: 70px;
    height: 64px;
    border-radius: 12px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    font-size: 16px;
    overflow: hidden;
    flex-shrink: 0;
    margin: 0px 6px 0px 0px;
}

.cell-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cell-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.cell-cuisine {
    font-size: 13px;
    color: var(--text-secondary);
}

.cell-location {
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.cell-awards {
    display: flex;
    gap: 5px;
    flex-wrap: nowrap;
}

.cell-awards .tag {
    flex-shrink: 0;
}

.cell-rating {
    font-size: 14px;
    font-weight: 500;
    color: var(--michelin-gold);
    text-align: center;
}

.cell-reviews {
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
}

/* ===== Restaurant List (이전 버전 호환) ===== */
.restaurant-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.restaurant-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.restaurant-item:hover { background: #f8faff; }

.item-rank {
    width: 28px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-align: center;
    flex-shrink: 0;
}

.item-main { flex: 1; min-width: 0; }

.item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-tags { display: flex; gap: 4px; flex-shrink: 0; }

.tag {
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    height: 22px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
}

.tag-michelin { 
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.tag-michelin .michelin-flowers {
    display: inline-flex;
    gap: 2px;
}
.tag-michelin .michelin-flower {
    width: 12px;
    height: 12px;
    background-image: url("michelin-white.svg");
    background-size: contain;
    background-repeat: no-repeat;
}
.tag-blueribbon { 
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
    display: inline-flex;
    align-items: center;
    gap: 1px;
}
.tag-blueribbon .blue-ribbon {
    width: 14px;
    height: 14px;
    background-image: url("blueribbon.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    vertical-align: middle;
}
.tag-ccw { 
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); 
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tag-ccw::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("ccw.svg");
    background-size: contain;
    background-repeat: no-repeat;
}
.tag-ccw-baek { 
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); 
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tag-ccw-baek::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("ccw.svg");
    background-size: contain;
    background-repeat: no-repeat;
}
.tag-ccw-heuk { 
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%); 
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tag-ccw-heuk::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("ccw.svg");
    background-size: contain;
    background-repeat: no-repeat;
    filter: brightness(0) invert(1);
}

.item-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.item-cuisine { color: var(--accent-violet); font-weight: 500; }

.item-rating { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rating-score { font-size: 15px; font-weight: 700; color: var(--michelin-gold); }
.rating-count { font-size: 11px; color: var(--text-tertiary); }

/* ===== Map ===== */
.map-container {
    display: none;
    height: calc(100vh - 180px);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.map-container.active { display: block; }
#map { height: 100%; width: 100%; }

/* ===== Modal ===== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
    opacity: 0;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    opacity: 1;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    max-width: 1100px;
    width: 100%;
    margin: 20px auto;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border-bottom: 1px solid var(--border);
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-close {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 22px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #fee2e2;
    color: #dc2626;
}

.modal-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.modal-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
}

.modal-tags { 
    display: flex; 
    gap: 6px; 
    flex-wrap: wrap;
}

.modal-header-right {
    display: none;
}

/* 2 Column Layout */
.modal-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.modal-left {
    width: 400px;
    flex-shrink: 0;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

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

.modal-right {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    min-width: 0;
}

.modal-section { margin-bottom: 35px; }
.modal-section:last-child { margin-bottom: 0; }

/* Summary Section (Left - Intro Box) */
#summarySection {
    margin-bottom: 28px;
}

.intro-box {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 16px 18px;
}

.intro-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0;
    font-weight: 500;
    word-break: keep-all;
}

/* Description Section (Right) */
#descriptionSection {
    margin-bottom: 28px;
}

.restaurant-description {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    word-break: keep-all;
}

.modal-section h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-violet);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-total {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: none;
}

.info-list {
    display: flex;
    flex-direction: column;
}

.info-row {
    display: flex;
    align-items: flex-start;
    padding: 10px 0;
}

.info-row:last-child {
}

.info-label {
    font-size: 13px;
    color: var(--text-tertiary);
    width: 50px;
    flex-shrink: 0;
    padding-top: 1px;
}

.info-value { font-size: 13px; font-weight: 500; color: var(--text-primary); flex: 1; line-height: 1.5; }

/* 운영시간 섹션 */
.hours-section {
    align-items: flex-start !important;
}

.hours-table {
    flex: 1;
}

.hours-grid {
    display: flex;
    gap: 3px;
    background: var(--bg-secondary);
    padding: 0px;
    border-radius: 8px;
    overflow-x: auto;
}

.hours-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3px 1px;
    border-radius: 8px;
    background: var(--bg-primary);
    min-width: 44px;
    gap: 3px;
}

.hours-col.today {
    background: #ecfdf5;
    border: 2px solid #10b981;
}

.hours-col.closed {
    opacity: 0.6;
}

.hours-day {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
}

.hours-col.today .hours-day {
    color: #10b981;
}

.hours-open, .hours-close {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-primary);
}

.hours-divider {
    font-size: 10px;
    color: var(--text-tertiary);
    line-height: 1;
}

.hours-closed {
    font-size: 11px;
    font-weight: 600;
    color: #ef4444;
    margin-top: 4px;
}

.info-value .call-btn {
    margin-left: 8px;
}

.call-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    font-size: 11px;
    color: var(--text-secondary);
    transition: var(--transition);
}

.call-btn:hover {
    border-color: var(--accent-violet);
    color: var(--accent-violet);
    background: #eef2ff;
}

/* Photos Grid */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.photos-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.photos-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.photos-placeholder, .no-data {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
}

.photos-placeholder:not(:has(.photos-grid)), .no-data {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 20px;
}

/* Modal Actions in Left Column */
.modal-left .modal-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
}

.action-btn {
    flex: 1;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.action-btn.primary { background: var(--accent-gradient); color: #fff; }
.action-btn.secondary { background: var(--bg-tertiary); color: var(--text-secondary); }
.action-btn.naver { background: linear-gradient(135deg, #03c75a 0%, #00b843 100%); color: #fff; }

/* Reviews Container */
.reviews-container {
    display: flex;
    flex-direction: column;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-card {
    background: linear-gradient(135deg, #fefefe 0%, #fbfafd 50%, #f8faff 100%);
    padding: 14px;
    border-radius: var(--radius-sm);
    text-align: left;
    border: none;
}

.review-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.review-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.local-guide {
    font-size: 10px;
    color: var(--accent-violet);
    background: #eef2ff;
    padding: 2px 6px;
    border-radius: 4px;
}

.review-rating {
    font-size: 12px;
    color: var(--michelin-gold);
}

.review-date {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-left: auto;
}

.review-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.review-photos {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.review-photos img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

/* Reviews Pagination */
.reviews-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 0;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    border-color: var(--accent-violet);
    color: var(--accent-violet);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-info {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* Mobile: Single Column - Full Screen */
@media (max-width: 768px) {
    .modal-overlay {
        padding: 0;
    }
    
    .modal {
        max-width: 100%;
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        height: 100vh;
    }
    
    .modal-body {
        flex-direction: column;
        max-height: none;
        overflow-y: auto;
    }
    
    .modal-left {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        max-height: none;
        overflow: visible;
    }
    
    .modal-right {
        max-height: none;
        overflow: visible;
        padding-bottom: 40px;
    }
    
    .photos-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .modal-header {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 14px 16px;
    }
    
    .modal-header-right {
        padding-right: 0;
    }
    
    .modal-close {
        position: absolute;
        top: 12px;
        right: 12px;
    }
    
    .modal-section {
        margin-bottom: 24px;
    }
    
    /* 리뷰 아이템 */
    .review-item {
        padding: 14px 0;
    }
}

/* ===== Image Gallery Modal ===== */
.gallery-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.gallery-overlay.active {
    display: flex;
}

.gallery-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-size: 24px;
    transition: var(--transition);
    z-index: 10;
}

.gallery-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    font-size: 32px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.gallery-prev { left: 20px; }
.gallery-next { right: 20px; }

.gallery-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
    padding: 20px;
}

.gallery-content img#galleryImage {
    max-width: 800px;
    max-height: 60vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

.gallery-info {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

#galleryCounter {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

#galleryCaption {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    max-width: 600px;
    padding: 0;
}

.gallery-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition);
    border: 2px solid transparent;
    flex-shrink: 0;
}

.gallery-thumb:hover {
    opacity: 0.8;
}

.gallery-thumb.active {
    opacity: 1;
    border-color: var(--accent-violet);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .header { flex-direction: column; gap: 8px; padding: 10px 16px; }
    .header-left { gap: 8px; }
    .db-count { font-size: 11px; padding: 4px 10px; }
    .filter-divider { display: none; }
    
    /* About 섹션 간격 축소 */
    .about-section { padding: 16px; margin-bottom: 12px; border-radius: 12px; }
    .about-header { margin-bottom: 8px; }
    .about-header h2 { font-size: 15px; }
    .about-badge { font-size: 11px; padding: 3px 8px; }
    .about-desc { font-size: 12px; margin-bottom: 12px; line-height: 1.5; }
    .about-stats { flex-wrap: wrap; gap: 12px; }
    .about-stat { flex: none; min-width: auto; padding: 0; }
    .about-stat-num { font-size: 14px; }
    .about-stat-label { font-size: 11px; }
    
    /* 필터 버튼 축소 */
    .filters-section { margin-bottom: 12px; gap: 8px; }
    .cuisine-filters, .category-filters { gap: 6px; }
    .filter-btn { padding: 6px 12px; font-size: 12px; }
    .filter-checkbox { padding: 5px 10px; font-size: 11px; gap: 4px; }
    .filter-checkbox svg { width: 12px; height: 12px; }
    
    /* 검색결과 */
    .result-count { font-size: 12px; margin-bottom: 8px; }
    
    /* 모바일 테이블 - 컴팩트 레이아웃 */
    .restaurant-table-wrap { 
        overflow-x: hidden; 
        border-radius: 10px;
    }
    .restaurant-table { 
        min-width: auto; 
        width: 100%; 
    }
    
    /* 테이블 헤더 */
    .restaurant-table thead th {
        padding: 10px 8px;
        font-size: 11px;
    }
    
    /* 숨길 컬럼: 위치, 리뷰수만 숨김 (평점은 보임) */
    .restaurant-table th.col-location,
    .restaurant-table td:nth-child(5),
    .restaurant-table th.col-reviews,
    .restaurant-table td:nth-child(8) { display: none; }
    
    /* 컬럼 너비 모바일 조정 */
    .col-rank { width: 36px; }
    .col-photo { width: 1%; white-space: nowrap; }
    .col-name { width: 100px; }
    .col-cuisine { width: 75px; }
    .col-awards { width: 75px; }
    .col-rating { width: 60px; }
    
    /* 테이블 셀 패딩 - 균형있게 */
    .restaurant-table td {
        padding: 7px 4px;
    }
    
    /* 첫 번째 셀(순위) 왼쪽 여백 */
    .restaurant-table td:first-child {
        padding-left: 8px;
    }
    
    /* 마지막 셀 오른쪽 여백 */
    .restaurant-table td:last-child {
        padding-right: 8px;
    }
    
    /* 순위 */
    .cell-rank {
        font-size: 13px;
    }
    
    /* 사진 크기 */
    .cell-photo {
        width: 52px;
        height: 48px;
        border-radius: 8px;
        font-size: 12px;
    }
    
    /* 이름 폰트 */
    .cell-name {
        font-size: 14px;
        font-weight: 600;
        max-width: 100px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 카테고리 */
    .cell-cuisine {
        font-size: 12px;
    }
    
    /* 수상 태그: 첫 번째만 보이기 */
    .cell-awards .tag:not(:first-child) {
        display: none;
    }
    
    .cell-awards .tag {
        font-size: 9px;
        padding: 3px 6px;
    }
    
    /* 평점 - 한 줄로 */
    .cell-rating {
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
    }
    
    .cell-rating .rating-star {
        font-size: 11px;
    }
    
    .cell-rating .rating-num {
        color: var(--michelin-gold);
    }
}

/* 더 작은 화면 (480px 이하) */
@media (max-width: 480px) {
    .main-container { padding: 12px; }
    
    /* 카테고리 컬럼 숨기기 */
    .restaurant-table th.col-cuisine,
    .restaurant-table td:nth-child(4) { display: none; }
    
    /* 컬럼 너비 재조정 */
    .col-rank { width: 32px; }
    .col-photo { width: 1%; white-space: nowrap; }
    .col-name { width: 95px; }
    .col-awards { width: 70px; }
    .col-rating { width: 55px; }
    
    /* 테이블 행 간격 */
    .restaurant-table td {
        padding: 7px 4px;
    }
    
    .restaurant-table td:first-child {
        padding-left: 8px;
    }
    
    .restaurant-table td:last-child {
        padding-right: 8px;
    }
    
    .cell-name {
        font-size: 13px;
        max-width: 95px;
    }
    
    .cell-photo {
        width: 46px;
        height: 42px;
    }
    
    /* 필터 더 작게 */
    .filter-btn { padding: 5px 10px; font-size: 11px; }
}

/* Review Summary & Histogram */
.review-summary-content {
    display: flex;
    gap: 20px;
    align-items: center;
}

.review-score {
    text-align: center;
    flex-shrink: 0;
}

.review-score-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.review-score-stars {
    color: #f5a623;
    font-size: 14px;
    margin: 4px 0;
}

.review-score-count {
    font-size: 12px;
    color: var(--text-tertiary);
}

.review-histogram {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-label {
    font-size: 11px;
    color: var(--text-tertiary);
    width: 24px;
    flex-shrink: 0;
}

.rating-bar-track {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f5a623, #f7b928);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rating-count {
    font-size: 11px;
    color: var(--text-tertiary);
    width: 28px;
    text-align: right;
    flex-shrink: 0;
}

/* ===== Map Popup Styles ===== */
.custom-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0;
    overflow: hidden;
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    width: 240px !important;
}

.custom-popup .leaflet-popup-tip {
    background: #fff;
}

.map-popup {
    font-family: 'Pretendard', sans-serif;
}

.popup-photo {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.popup-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-content {
    padding: 12px 14px 14px;
}

.popup-name {
    font-size: 15px;
    font-weight: 700;
    color: #1e1b4b;
    display: block;
    margin-bottom: 4px;
}

.popup-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.popup-location::before {
    content: '·';
    margin-right: 8px;
}

.popup-tags {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.popup-tag {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
}

.popup-tag.tag-michelin { 
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}
.popup-tag.tag-michelin .michelin-flowers {
    display: inline-flex;
    gap: 2px;
}
.popup-tag.tag-michelin .michelin-flower {
    width: 12px;
    height: 12px;
    background-image: url("michelin-white.svg");
    background-size: contain;
    background-repeat: no-repeat;
}
.popup-tag.tag-blueribbon { 
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
    display: inline-flex;
    align-items: center;
    gap: 1px;
}
.popup-tag.tag-blueribbon .blue-ribbon {
    width: 14px;
    height: 14px;
    background-image: url("blueribbon.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    vertical-align: middle;
}
.popup-tag.tag-ccw { 
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); 
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.popup-tag.tag-ccw::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("ccw.svg");
    background-size: contain;
    background-repeat: no-repeat;
}
.popup-tag.tag-ccw-baek { 
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); 
    color: #374151;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.popup-tag.tag-ccw-baek::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("ccw.svg");
    background-size: contain;
    background-repeat: no-repeat;
}
.popup-tag.tag-ccw-heuk { 
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%); 
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.popup-tag.tag-ccw-heuk::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("ccw.svg");
    background-size: contain;
    background-repeat: no-repeat;
    filter: brightness(0) invert(1);
}

.popup-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.popup-stars {
    font-size: 14px;
    font-weight: 600;
    color: #f59e0b;
}

.popup-reviews {
    font-size: 12px;
    color: #94a3b8;
}

.popup-btn {
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Pretendard', sans-serif;
    transition: all 0.2s ease;
}

.popup-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.3);
}

/* Review Page Info in Title */
.review-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.review-page-info {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
}

/* ===== Google Maps 스타일 ===== */
/* 지도 마커 라벨 스타일 */
.map-label {
    background: rgba(255, 255, 255, 0.95);
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    margin-top: -30px;
    white-space: nowrap;
}

/* InfoWindow 스타일 커스텀 */
.gm-style-iw-c {
    padding: 0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

.gm-style-iw-d {
    overflow: hidden !important;
    padding: 0 !important;
}

.gm-style-iw-tc {
    display: none !important;
}

/* X 버튼 숨기기 - 바깥 클릭으로 닫힘 */
.gm-ui-hover-effect {
    display: none !important;
}

/* InfoWindow 상단 여백 제거 */
.gm-style-iw {
    padding: 0 !important;
}

.gm-style-iw-chr {
    padding-top: 0 !important;
    height: auto !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
}
