/* Abu Dhabi 101 Do's - Styles */

/* Etihad Altis Font Family */
@font-face {
    font-family: 'Etihad Altis';
    src: url('fonts/etihad-altis-light.woff2') format('woff2'),
         url('fonts/etihad-altis-light.woff') format('woff'),
         url('fonts/etihad-altis-light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Etihad Altis';
    src: url('fonts/etihad-altis-book.woff2') format('woff2'),
         url('fonts/etihad-altis-book.woff') format('woff'),
         url('fonts/etihad-altis-book.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Etihad Altis';
    src: url('fonts/etihad-altis-text.woff2') format('woff2'),
         url('fonts/etihad-altis-text.woff') format('woff'),
         url('fonts/etihad-altis-text.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Etihad Altis';
    src: url('fonts/etihad-altis-medium.woff2') format('woff2'),
         url('fonts/etihad-altis-medium.woff') format('woff'),
         url('fonts/etihad-altis-medium.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Etihad Altis';
    src: url('fonts/etihad-altis-medium.woff2') format('woff2'),
         url('fonts/etihad-altis-medium.woff') format('woff'),
         url('fonts/etihad-altis-medium.ttf') format('truetype');
    font-weight: 700 900;
    font-style: normal;
    font-display: swap;
}

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

:root {
    --gold: #d4915d;
    --gold-dark: #c97d3d;
    --gold-light: #e5a875;
    --gold-bg: #fff8f0;
    --accent-gradient: linear-gradient(135deg, #d4915d 0%, #c97d3d 100%);
    --bg-primary: #faf8f3;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f5f1e8;
    --text-primary: #2a2a2a;
    --text-secondary: #4a4a4a;
    --text-tertiary: #8b8b8b;
    --header-bg: #2d4a5a;
    --sidebar-bg: #3d5a6b;
    --border: #e8e8e8;
    --border-light: #f0f0f0;
    --radius-md: 12px;
    --transition: 0.2s ease;
}

body { font-family: 'Etihad Altis', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; font-weight: 500; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; margin: 0; padding: 0; }

/* Header */
.header { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 12px max(20px, calc((100vw - 1200px) / 2 + 20px)); background: var(--header-bg); border-bottom: none; z-index: 100; gap: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.header-left { display: flex; align-items: center; gap: 12px; }
.header-center { display: flex; justify-content: center; flex: 1; }
.header-right { display: flex; justify-content: flex-end; align-items: center; flex: 1; gap: 16px; }
.logo-link { text-decoration: none; display: flex; align-items: center; gap: 4px; }
.about-link { color: rgba(255,255,255,0.9); background: transparent; border: none; font-size: 14px; font-weight: 500; padding: 8px 16px; border-radius: 6px; transition: all 0.2s ease; cursor: pointer; font-family: 'Etihad Altis', 'Inter', sans-serif; }
.about-link:hover { background: rgba(255,255,255,0.1); color: #ffffff; }
.logo-main { font-size: 18px; font-weight: 600; color: #ffffff; letter-spacing: -0.3px; display: flex; align-items: center; gap: 8px; }
.logo-icon { flex-shrink: 0; border-radius: 6px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); transition: transform 0.2s ease; width: 26px; height: 26px; }
.logo-main:hover .logo-icon { transform: scale(1.05); }
.logo-divider { color: rgba(255,255,255,0.3); margin: 0 4px; }
.logo-sub { color: rgba(255,255,255,0.9); font-weight: 400; font-size: 14px; }
.db-count { padding: 5px 12px; background: rgba(212,145,93,0.2); color: var(--gold-light); font-size: 11px; font-weight: 600; border-radius: 20px; border: 1px solid rgba(212,145,93,0.4); }

.view-tabs { display: flex; gap: 0; border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; overflow: hidden; }
.view-tab { padding: 9px 20px; min-width: 70px; background: transparent; border: none; border-radius: 0; border-right: 1px solid rgba(255,255,255,0.15); font-size: 13px; font-weight: 400; color: rgba(255,255,255,0.7); cursor: pointer; transition: var(--transition); text-align: center; }
.view-tab:last-child { border-right: none; }
.view-tab:hover { color: #fff; background: rgba(255,255,255,0.1); }
.view-tab.active { background: var(--gold); color: #fff; }

.lang-selector { display: flex; gap: 0; border: 1px solid rgba(255,255,255,0.2); border-radius: 5px; overflow: hidden; position: relative; z-index: 10; }
.lang-btn { width: 26px; height: 26px; border: none; border-right: 1px solid rgba(255,255,255,0.2); background: transparent; border-radius: 0; font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.7); cursor: pointer; transition: var(--transition); pointer-events: auto; }
.lang-btn:last-child { border-right: none; }
.lang-btn:hover { color: var(--gold); background: rgba(201,169,97,0.1); }
.lang-btn.active { background: var(--gold); color: #fff; }

/* Main */
.main-container { max-width: 1200px; margin: 0 auto; padding: 20px; padding-top: 24px; }

.about-section { background: #eceff1; border: none; border-radius: 12px; padding: 24px 28px; margin-bottom: 24px; box-shadow: none; }
.about-title { font-size: 20px; color: var(--header-bg); font-weight: 500; margin: 0 0 8px 0; line-height: 1.25; }
.about-desc { font-size: 12px; color: var(--header-bg); margin: 0 0 0px 0; line-height: 1.5; font-weight: 500; }
.about-section .about-link { display: inline-flex; align-items: center; gap: 4px; color: #c48530; font-size: 13px; font-weight: 500; text-decoration: none; transition: all 0.2s ease; padding: 4px 8px; margin-left: -8px; border-radius: 4px; }
.about-section .about-link:hover { color: #d4a15a; background: rgba(212, 161, 90, 0.1); }
.about-section .about-link::after { content: ''; display: inline-block; width: 12px; height: 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23c48530' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; }
.about-section .about-link:hover::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23d4a15a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'%3E%3C/path%3E%3Cpolyline points='15 3 21 3 21 9'%3E%3C/polyline%3E%3Cline x1='10' y1='14' x2='21' y2='3'%3E%3C/line%3E%3C/svg%3E"); }
.about-categories { font-size: 14px; color: #4a5568; background: transparent; padding: 0; border-radius: 0; border: none; letter-spacing: 0.2px; font-weight: 500; line-height: 1.6; }

.filter-bar { margin-bottom: 20px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-group.score-filters { margin-top: 18px; }
.filter-btn,
.score-filter-btn { padding: 6px 10px; background: #ffffff; border: 0.5px solid #2d4a5a; border-radius: 24px; font-size: 12px; font-weight: 500; color: #2d4a5a; cursor: pointer; transition: var(--transition); box-shadow: none; }
.filter-btn:hover,
.score-filter-btn:hover { border-color: #3d5a6b; color: #3d5a6b; background: #f8f9fa; }
.filter-btn.active,
.score-filter-btn.active { background: #2d4a5a; color: #ffffff; border-color: #2d4a5a; box-shadow: none; }

.filter-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 0 10px;
}
.sort-options {
    display: flex !important;
    align-items: center;
    gap: 12px;
    visibility: visible !important;
    opacity: 1 !important;
}
.sort-btn {
    display: inline-block !important;
    background: none;
    border: none;
    color: #718096;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    visibility: visible !important;
    opacity: 1 !important;
}
.sort-btn:hover {
    color: #2d3748;
    border-bottom-color: #cbd5e0;
}
.sort-btn.active {
    color: #2d4a5a;
    font-weight: 400;
    border-bottom-color: #2d4a5a;
}
.sort-divider {
    color: #e2e8f0;
    font-size: 12px;
    user-select: none;
}
.result-count {
    font-size: 12px;
    color: #718096;
    white-space: nowrap;
}
.result-count span {
    color: #d4915d;
    font-weight: 600;
}

/* Table */
.landmark-table-wrap { background: var(--bg-secondary); border-radius: var(--radius-md); border: none; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.landmark-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.landmark-table thead { background: linear-gradient(135deg, #2d4a5a 0%, #3d5a6b 100%); }
.landmark-table th { padding: 10px 16px; text-align: left; font-size: 12px; font-weight: 400; color: #ffffff; border-bottom: none; text-transform: uppercase; letter-spacing: 0.5px; }
.landmark-table th.col-rank,
.landmark-table th.col-popularity { text-align: center; }
.landmark-table td { padding: 12px 12px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.landmark-table tr { cursor: pointer; transition: var(--transition); }
@media (hover: hover) {
    .landmark-table tbody tr:hover { background: #f5f5f5; transform: scale(1.001); box-shadow: 0 2px 4px rgba(0,0,0,0.08); }
}

/* 열 패딩 줄이기 */
table td:first-child,
table th:first-child {
  padding-right: 4px;  /* 16px → 8px → 4px */
}

.col-rank { width: 50px; font-weight: 700; color: var(--gold); padding: 12px 4px 12px 12px; text-align: center; }
.col-photo { width: 85px; padding: 11px 10px 11px 3px; }
.list-photo { width: 85px; height: 85px; min-width: 85px; max-width: 85px; min-height: 85px; max-height: 85px; border-radius: 8px; object-fit: cover; display: block; box-sizing: border-box; flex-shrink: 0; }
.col-name { width: 290px; max-width: 290px; word-wrap: break-word; overflow-wrap: break-word; padding: 12px 4px 12px 8px; font-weight: 400; }
.name-cell { display: flex; flex-direction: column; gap: 2px; }
.name-title-row { line-height: 1.3; }
.name-title { font-weight: 600; color: var(--text-primary); line-height: 1.3; display: inline; }
.name-place { font-size: 12px; color: var(--text-tertiary); }
.col-category { width: 120px; }
.category-badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 400; }
.category-badge-inline { display: none; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 400; white-space: nowrap; margin-left: 6px; vertical-align: middle; }
.col-location { color: var(--text-secondary); font-size: 13px; width: 100px; }
.col-duration { color: var(--text-secondary); font-size: 13px; width: 82px; white-space: nowrap; }
.col-popularity { color: var(--gold); font-size: 13px; font-weight: 500; width: 65px; min-width: 65px; white-space: nowrap; text-align: center; }

/* Map */
.map-container { height: 660px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); position: relative; }
#map { width: 100%; height: 100%; }
.map-loader { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #f8f9fa; z-index: 10; }
.map-loader.hidden { display: none; }
.map-spinner { width: 50px; height: 50px; border: 4px solid #e0e0e0; border-top-color: #d4915d; border-radius: 50%; animation: spin 0.8s linear infinite; }
.map-loading-text { margin-top: 16px; color: #5a4a3a; font-size: 14px; font-weight: 400; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Hide all close buttons in info windows */
.gm-ui-hover-effect { display: none !important; }
.gm-style .gm-style-iw-c > button { display: none !important; }
.gm-style .gm-style-iw-ch { display: none !important; }
/* 구글 맵스 닫기 버튼만 숨기기 */
.gm-style-iw-c > button[aria-label] { display: none !important; }
.gm-style > button { opacity: 0 !important; pointer-events: none !important; }
.gm-style-iw-chr button { display: none !important; }

/* 툴팁 내 자세히 보기 버튼은 표시 */
.gm-style-iw button[onclick*="openModal"] {
  display: block !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* InfoWindow 닫기 버튼 영역 완전히 숨기기 */
.gm-style-iw-chr {
  display: none !important;
  height: 0 !important;
}

/* InfoWindow 높이 자동 조절 */
.gm-style-iw-c {
  padding: 0 !important;
  height: auto !important;
  margin: 0 !important;
  box-shadow: 0 2px 7px 1px rgba(0,0,0,0.3) !important;
  border-radius: 8px !important;
  overflow: visible !important;
  max-height: none !important;
  min-height: 0 !important;
}

/* InfoWindow 높이 자동 조절 */
.gm-style .gm-style-iw-d {
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    max-width: none !important;
    max-height: none !important;
    height: auto !important;
}

.gm-style .gm-style-iw-d > div {
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;  /* 240px 고정 제거 */
}

.gm-style .gm-style-iw {
    padding: 0 !important;
    margin: 0 !important;
    max-height: none !important;
}

/* Make the tail/pointer smaller and less visible */
.gm-style .gm-style-iw-t {
    left: 0 !important;
    right: 0 !important;
    margin: auto !important;
}

.gm-style .gm-style-iw-tc {
    filter: opacity(1) !important;
}

/* Hide the close button area completely */
.gm-style .gm-style-iw-ch {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Remove all top spacing from nested elements */
.gm-style .gm-style-iw-d > div > div {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.gm-style .gm-style-iw-d > div > div:first-child {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Ensure content wrapper has no top spacing */
.gm-style-iw-d {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Remove any min-height that might cause spacing */
.gm-style-iw-c,
.gm-style-iw-d,
.gm-style-iw {
    min-height: 0 !important;
}

/* 자세히 보기 버튼 표시 */
.gm-style-iw button,
.map-info-detail-btn {
    display: inline-block !important;
    padding: 4px 8px !important;
    font-size: 11px !important;
    background: #e8a54b !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    margin-top: 8px !important;
}

/* ===== Modal ===== */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 1000; align-items: flex-start; justify-content: center; padding: 15px 20px; overflow-y: auto; }
.modal-overlay.active { display: flex; }

.modal { background: #fff; border-radius: 16px; max-width: 1200px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); max-height: calc(100vh - 30px); display: flex; flex-direction: column; overflow: hidden; isolation: isolate; }

.modal-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 28px; border-bottom: none; background-color: var(--header-bg); background-image: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--header-bg) 100%); border-radius: 16px 16px 0 0; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.15); position: relative; z-index: 2; }
.modal-header-left { flex: 1; }
.modal-name { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.modal-place-row { display: flex; align-items: center; gap: 8px; }
.modal-place-name { font-size: 13px; color: rgba(255,255,255,0.8); font-weight: 500; }
.modal-tag { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 10px; font-size: 10px; background: rgba(212,145,93,0.25); border: none; }
.modal-close,
.close-modal { width: 42px; height: 42px; border: none; background: transparent; border-radius: 0; font-size: 26px; color: rgba(255,255,255,0.95); cursor: pointer; transition: var(--transition); margin-right: -8px; }
.modal-close:hover,
.close-modal:hover { color: rgba(255,255,255,1); }

/* Modal Body 2 Column */
.modal-body { display: flex; flex-direction: column; gap: 36px; }
.modal-body-two-col { display: grid; grid-template-columns: 380px 1fr; gap: 0; flex: 1; overflow-y: auto; margin-top: 0; min-width: 0; }

.modal-col-left,
.modal-col-right {
  display: flex;
  flex-direction: column;
  gap: 42px;
  padding: 28px 28px 80px 28px;
  min-width: 0;
  overflow: visible;
  height: auto;
  max-height: none;
}

.modal-col-left { background: #eceff1; }
.modal-col-right { background: #ffffff; padding-right: 20px; }

.modal-section { margin: 0; }
.modal-col-left .modal-section { margin-bottom: 0; }
.modal-section h3 { font-size: 17px; font-weight: 500; color: var(--header-bg); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: 0.1px; }
.section-icon { display: none; }

/* About Modal specific styles */
#aboutModal .modal { overflow: hidden; }
#aboutModal .modal-body { padding: 32px 28px; gap: 24px; overflow-y: auto; flex: 1; }
#aboutModal .modal-section { margin-bottom: 0; }
#aboutModal .modal-section h3 { font-size: 15px; margin-bottom: 12px; }
#aboutModal .section-icon { display: inline; }

/* Intro Box - No background */
.intro-box { background: transparent; padding: 0; border-radius: 0; }
.intro-summary { font-size: 16px; line-height: 1.6; color: #2d3748; font-weight: 400; }

/* Gallery Grid - 4x3 = 12개 Reduced margins */
#modalGallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr); gap: 4px; padding: 0; margin: 0; overflow: visible; max-height: none; width: 100%; min-width: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; width: 100%; margin: 0; overflow: visible; min-width: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; min-width: 0; }
.photo-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; min-width: 0; }
.gallery-thumb { width: 100%; max-width: 100%; height: 100%; min-height: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; cursor: pointer; transition: transform 0.2s ease; background: #f1f5f9; border: 1px solid #fff; display: block; box-sizing: border-box; min-width: 0; }
@media (hover: hover) {
    .gallery-thumb:hover { transform: scale(1.05); z-index: 1; }
}
.gallery-thumb.placeholder { display: flex; align-items: center; justify-content: center; color: #cbd5e1; font-size: 20px; }

/* Info Grid - No item boxes */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.info-item { display: flex; flex-direction: column; gap: 4px; background: transparent; padding: 0; border-radius: 0; }
.info-item.full-width { grid-column: 1 / -1; }
.info-label { font-size: 11px; color: #5a6c7d; text-transform: uppercase; font-weight: 600; }
.info-value { font-size: 14px; font-weight: 400; color: var(--text-primary); }

/* Address - 단순화 */
.address-box { display: flex; align-items: center; gap: 12px; padding: 0; background: transparent; border-radius: 0; margin-bottom: 12px; }
.address-text { flex: 1; font-size: 14px; color: var(--text-primary); font-weight: 500; }
.copy-btn { display: none; }

.modal-actions { display: flex; gap: 12px; }
.action-btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; text-decoration: none; transition: var(--transition); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.action-btn.google { background: var(--accent-gradient); color: white; }
@media (hover: hover) {
    .action-btn.google:hover { background: linear-gradient(135deg, var(--gold-dark) 0%, #b56d30 100%); transform: translateY(-1px); box-shadow: 0 3px 6px rgba(212,145,93,0.3); }
}
.btn-favicon { width: 16px; height: 16px; }

/* Popularity Section - Etihad style */
.popularity-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.popularity-item { text-align: center; padding: 14px 12px; background: #e8eaed; border-radius: 10px; box-shadow: none; border: none; }
.popularity-item:nth-child(4) { display: none; }
.pop-label { display: block; font-size: 11px; color: var(--text-tertiary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.pop-value { font-size: 22px; font-weight: 700; color: var(--gold); }
.rank-suffix { font-size: 0.7em; font-weight: 300; color: var(--text-tertiary); opacity: 0.6; }
.popularity-highlight { background: #e8eaed !important; border: none !important; box-shadow: none !important; }
.popularity-highlight .pop-label { font-weight: 700; }
.popularity-highlight .pop-value { font-size: 26px; }

/* 6 Metrics Grid (New) - 2 rows × 3 columns Etihad White Card */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 12px;
  min-width: 0;
}
.metric-item {
  text-align: center;
  padding: 16px 14px;
  background: #ffffff;
  border-radius: 10px;
  border: none;
  box-shadow: 0 6px 24px 0 rgba(0,0,0,0.08);
  min-width: 0;
  overflow: hidden;
}
.metric-label {
  display: block;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.metric-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
}
.metric-value.metric-stars {
  font-size: 15px;
  letter-spacing: 0;
  line-height: 1.3;
  max-width: 100%;
  word-break: keep-all;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.rank-denominator {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-tertiary);
  opacity: 0.7;
}

/* Description & Tips Row */
.desc-tips-row { display: flex; flex-direction: column; gap: 24px; margin-bottom: 24px; }
.desc-section, .tips-section { margin-bottom: 0; }
.detail-description { font-size: 14px; color: var(--text-secondary); line-height: 1.8; font-weight: 500; }
.tips-list { list-style: none; padding-left: 0; }
.tips-list li { padding: 0; background: transparent; border-radius: 6px; margin-bottom: 1px; font-size: 14px; color: var(--text-secondary); line-height: 1.5; display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.tips-list li::before { content: "✓"; color: #e8a54b; font-weight: bold; flex-shrink: 0; }

/* Map & Nearby Row */
.map-nearby-row { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; margin-bottom: 0; }
.map-section, .nearby-section { margin-bottom: 0; }
.spot-map-container { border-radius: 8px; overflow: hidden; background: #f8fafc; height: 347px; }
.nearby-list { list-style: none; }
.nearby-list li { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; background: white; border-radius: 6px; margin-bottom: 8px; font-size: 14px; transition: all 0.3s ease; border: 0.5px solid #2d4a5a; cursor: pointer; }
@media (hover: hover) {
    .nearby-list li:hover { background: var(--gold-bg); transform: scale(1.03); box-shadow: 0 2px 8px rgba(212,145,93,0.15); }
}
.nearby-thumbnail { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.nearby-content { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nearby-title { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.nearby-bottom { display: flex; justify-content: space-between; align-items: center; }
.nearby-place { font-size: 12px; color: #94a3b8; }
.nearby-right { position: relative; }
.nearby-distance { font-size: 12px; color: #94a3b8; transition: opacity 0.3s ease; }
.nearby-arrow { font-size: 18px; color: #94a3b8; margin-left: 4px; font-weight: 400; }
.nearby-detail-btn { position: absolute; top: 50%; right: 0; transform: translateY(-50%); background: linear-gradient(135deg, #d4915d 0%, #c97d3d 100%); color: white; border: none; padding: 6px 14px; border-radius: 5px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; opacity: 0; white-space: nowrap; }
@media (hover: hover) {
    .nearby-detail-btn:hover { background: var(--header-bg); color: white; }
    .nearby-item:hover .nearby-distance { opacity: 0; }
    .nearby-item:hover .nearby-detail-btn { opacity: 1; }
}

/* Score Summary Grid - 4x2 Etihad Style */
.score-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 0; min-width: 0; }
.score-item { display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; text-align: center; padding: 10px 6px; background: white; border-radius: 10px; border: 0.5px solid #2d4a5a; box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04); cursor: pointer; transition: all 0.3s ease; position: relative; min-width: 0; }
@media (hover: hover) {
    .score-item:hover { background: var(--gold-bg); transform: scale(1.03); box-shadow: 0 2px 8px rgba(212,145,93,0.15); }
}
.score-item:active { transform: translateY(0); }
.score-icon { display: block; font-size: 24px; margin-bottom: 6px; opacity: 0.9; }
.score-name { display: block; font-size: 11px; color: var(--text-primary); margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.2; white-space: normal; word-break: break-word; max-width: 100%; text-align: center; }
.score-stars { display: block; font-size: 14px; color: #e8a54b; font-weight: 700; line-height: 1; }
.star-filled { color: #e8a54b; }
.star-empty { color: #cbd5e0; }

/* Score Detail Cards - 2열 4행 = 8개 Etihad White Card Style */
.scores-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.score-detail-card { background: #ffffff; border-radius: 12px; padding: 14px; border: none; box-shadow: 0 6px 24px 0 rgba(0,0,0,0.08); }
.score-detail-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; padding-bottom: 0; border-bottom: none; }
.score-detail-title { display: flex; align-items: center; gap: 8px; }
.score-detail-icon { font-size: 22px; opacity: 0.9; }
.score-detail-name { font-size: 14px; color: #2d3748; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.score-detail-stars { color: #e8a54b; font-size: 14px; font-weight: 700; }
.score-detail-stars .star-filled { color: #e8a54b; }
.score-detail-stars .star-empty { color: #cbd5e0; }
.score-detail-reasons { list-style: none; padding-left: 0; margin: 0; }
.score-detail-reasons li { font-size: 13px; color: #4a5568; line-height: 1.6; padding: 4px 0 4px 16px; text-indent: -16px; }
.score-detail-reasons li:last-child { border-bottom: none; }
.score-detail-reasons li::before { content: "•"; color: #e8a54b; margin-right: 8px; font-weight: 700; }

/* Gallery Modal */
.gallery-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.95); z-index: 2000; align-items: center; justify-content: center; }
.gallery-overlay.active { display: flex; }
.gallery-close { position: absolute; top: 20px; right: 20px; width: 40px; height: 40px; background: transparent; border: none; color: white; font-size: 32px; cursor: pointer; transition: opacity 0.2s; }
.gallery-close:hover { opacity: 0.7; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; background: rgba(255,255,255,0.1); border: none; color: white; font-size: 30px; border-radius: 50%; cursor: pointer; }
.gallery-prev { left: 20px; }
.gallery-next { right: 20px; }
.gallery-content { max-width: 90%; max-height: 90%; text-align: center; }
#galleryImage { max-width: 100%; max-height: 60vh; border-radius: 8px; }
.gallery-info { margin-top: 16px; color: white; }
.gallery-thumbnails { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 16px; max-width: 450px; padding: 8px 0; justify-content: center; margin-left: auto; margin-right: auto; }
.gallery-thumbnail { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 3px; cursor: pointer; opacity: 0.6; transition: all 0.2s; border: 2px solid transparent; }
@media (hover: hover) {
    .gallery-thumbnail:hover { opacity: 0.9; }
}
.gallery-thumbnail.active { opacity: 1; border-color: white; }

/* Responsive */
@media (max-width: 950px) {
    .modal-body-two-col { grid-template-columns: 1fr; }
    .modal-col-left { border-right: none; border-bottom: 1px solid var(--border); }
    .modal-col-right { max-height: none; }
    .desc-tips-row, .map-nearby-row { grid-template-columns: 1fr; gap: 36px; }
    .score-summary-grid { grid-template-columns: repeat(4, 1fr); }
    .popularity-grid { grid-template-columns: repeat(2, 1fr); }
    .metrics-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Tablet view: 6 photos per row */
@media (min-width: 651px) and (max-width: 950px) {
    .gallery-grid { grid-template-columns: repeat(6, 1fr); gap: 6px; }
    #modalGallery { grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(2, 1fr); gap: 6px; }
}

/* Medium screens: Hide location and duration columns */
@media (max-width: 900px) {
    .landmark-table th:nth-child(5), .landmark-table td:nth-child(5),
    .landmark-table th:nth-child(6), .landmark-table td:nth-child(6) { display: none; }
    .landmark-table th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Tablet screens: Compact table layout */
@media (max-width: 768px) {
  /* # 열 축소 */
  table td:first-child,
  table th:first-child {
    width: 32px;
    padding: 6px 2px 6px 8px;
  }

  /* 이미지 열 축소 */
  table td:nth-child(2),
  table th:nth-child(2) {
    width: 60px;
    padding: 4px 10px 4px 4px;
  }

  /* 이미지 셀 오른쪽 패딩 늘리기 */
  table td:nth-child(2) {
    padding: 4px 10px 4px 4px;
  }

  table td:nth-child(2) img {
    width: 56px;
    height: 56px;
  }

  /* 이름 셀 왼쪽 패딩도 약간 */
  table td:nth-child(3) {
    max-width: 170px;     /* 194px → 170px */
    padding-left: 8px;    /* 6px → 8px */
  }

  table th:nth-child(3) {
    max-width: 170px;
    padding: 4px 6px;
  }

  /* 매력도 셀 패딩 대폭 축소 */
  table td:last-child {
    padding-left: 4px;    /* 8px → 4px */
    padding-right: 2px;   /* 12px → 2px */
    min-width: 45px;      /* 75px → 45px */
  }

  table th:last-child {
    min-width: 45px;
    padding: 4px 8px;
  }
}

/* Small screens: Hide category column, show inline badge */
@media (max-width: 650px) {
    .main-container { padding: 14px 10px; }

    .header { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
    .header-left { width: 100%; justify-content: flex-start; }
    .header-center { flex: 0 0 auto; justify-content: flex-start; order: 2; }
    .header-right { flex: 0 0 auto; justify-content: flex-end; order: 3; margin-left: auto; }

    /* Mobile filter buttons - smaller font and padding */
    .filter-btn,
    .score-filter-btn { font-size: 11px; padding: 7px 10px; gap: 3px; }
    .filter-group { gap: 4px; }
    .filter-bar { margin-bottom: 16px; }

    /* Mobile about section - smaller fonts and padding */
    .about-section { padding: 16px 20px; margin-top: 8px; }
    .about-title { font-size: 16px; margin-bottom: 6px; }
    .about-desc { font-size: 11px; margin-bottom: 10px; }
    .about-section .about-link { font-size: 12px; }

    .filter-group { justify-content: flex-start; }
    .score-summary-grid { grid-template-columns: repeat(4, 1fr); gap: 6px; }
    .scores-grid-2col { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(4, 1fr); }
    #modalGallery { grid-template-columns: repeat(4, 1fr); }
    .metrics-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }

    /* Hide category column, show inline badge */
    .landmark-table th:nth-child(4), .landmark-table td:nth-child(4) { display: none; }
    .category-badge-inline { display: inline-flex; vertical-align: middle; }

    /* Optimize mobile table */
    .landmark-table th { font-size: 11px; padding: 9px 10px; }
    .landmark-table td { padding: 9px 10px; }

    /* Force fixed table layout on mobile */
    .landmark-table { table-layout: fixed !important; width: 100% !important; }

    /* Column-specific overrides with percentage widths for guaranteed sizing */
    .landmark-table th.col-rank,
    .landmark-table td.col-rank { width: 11% !important; min-width: 0 !important; max-width: 11% !important; font-size: 12px; padding: 8px 3px 8px 4px !important; overflow: hidden; }

    .landmark-table th.col-photo,
    .landmark-table td.col-photo { width: 19% !important; min-width: 0 !important; max-width: 19% !important; padding: 7px 6px 7px 2px !important; overflow: hidden; }
    .list-photo { width: 70px; height: 70px; min-width: 70px; max-width: 70px; min-height: 70px; max-height: 70px; box-sizing: border-box; flex-shrink: 0; }

    .landmark-table th.col-name,
    .landmark-table td.col-name { width: 52% !important; min-width: 0 !important; max-width: 52% !important; font-size: 13px; padding: 8px 4px 8px 6px !important; word-break: break-word; overflow-wrap: break-word; overflow: hidden; }
    .name-title { font-size: 14px; line-height: 1.3; white-space: normal !important; }
    .name-place { font-size: 11px; white-space: normal !important; }

    .landmark-table th.col-popularity,
    .landmark-table td.col-popularity { width: 18% !important; min-width: 0 !important; max-width: 18% !important; font-size: 13px; padding: 8px 6px 8px 6px !important; white-space: nowrap; overflow: visible; text-align: center; }

    /* Modal full screen on mobile */
    .modal-overlay { padding: 0; align-items: stretch; overflow-y: hidden; position: fixed; top: 0; }
    .modal { border-radius: 0; max-width: 100%; height: 100%; max-height: 100%; display: flex; flex-direction: column; overflow-y: auto; }
    .modal-header { border-radius: 0; padding: 14px 20px; flex-shrink: 0; position: sticky; top: 0; z-index: 10; box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
    .modal-name { font-size: 19px; }
    .modal-section h3 { font-size: 16px; }
    .modal-body-two-col { flex: 1; overflow-y: visible; }

    /* About Modal - Stack images and text vertically on mobile */
    #aboutModal .modal-section[style*="flex"] { flex-direction: column !important; gap: 12px !important; }
    #aboutModal .modal-section > div[style*="flex: 1"] { flex: 1 1 auto !important; }
    #aboutModal .modal-section > div[style*="flex: 0 0 280px"] { flex: 1 1 auto !important; max-width: 70% !important; width: 70% !important; margin: 0 auto !important; }
    /* First section: move image to top */
    #aboutModal .modal-body > .modal-section:first-child > div:last-child { order: -1; }

    /* Add bottom padding to prevent Safari bottom bar from covering content */
    .modal-col-left,
    .modal-col-right { padding: 28px 20px 80px 20px; gap: 32px; }

    /* Reduce gap after address section */
    .modal-col-left .modal-section:has(.address-box) { margin-bottom: -18px; }

    /* Add extra gap before popularity section on mobile */
    .modal-col-right .modal-section:first-child { margin-top: 8px; }
}

/* Extra small screens */
@media (max-width: 480px) {
    .name-title-row { gap: 6px; }
    .category-badge-inline { margin-left: 0; padding: 3px 8px; font-size: 10px; }

    /* Further reduce grid columns on very small screens */
    .score-summary-grid { grid-template-columns: repeat(4, 1fr); gap: 5px; }
    .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 3px; }
    #modalGallery { grid-template-columns: repeat(4, 1fr); gap: 3px; }
    .metrics-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }

    /* Reduce modal padding on very small screens */
    .modal-col-left,
    .modal-col-right { padding: 20px 16px 80px 16px; gap: 32px; }

    /* Adjust score items for better fit */
    .score-item { padding: 8px 4px; }
    .score-icon { font-size: 20px; margin-bottom: 4px; }
    .score-name { font-size: 9px; }
    .score-stars { font-size: 12px; }

    /* Adjust metric items */
    .metric-item { padding: 12px 10px; }
    .metric-value { font-size: 18px; }
}

/* Ultra small screens (very narrow phones) */
@media (max-width: 360px) {
    /* Force single column for all grids */
    .score-summary-grid { grid-template-columns: repeat(4, 1fr); gap: 3px; }
    .gallery-grid,
    #modalGallery { grid-template-columns: repeat(4, 1fr); gap: 2px; }

    /* Further reduce padding */
    .modal-col-left,
    .modal-col-right { padding: 16px 12px 80px 12px; gap: 28px; }

    /* Smaller header on ultra-small screens */
    .modal-header { padding: 12px 16px; }
    .modal-name { font-size: 17px; }
    .modal-place-name { font-size: 12px; }

    /* Compact score items */
    .score-item { padding: 6px 2px; }
    .score-icon { font-size: 16px; margin-bottom: 3px; }
    .score-name { font-size: 8px; margin-bottom: 3px; }
    .score-stars { font-size: 10px; }
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(189,154,95,0.4); border-radius: 4px; }
