/* ══════════════════════════════════════
   디자인 토큰 (라이트 / 다크)
══════════════════════════════════════ */
:root {
    --bg:              #F7F7F7;
    --surface:         #FFFFFF;
    --surface2:        #F0F0F0;
    --text:            #222222;
    --text-sub:        #717171;
    --text-muted:      #AAAAAA;
    --border:          #DDDDDD;
    --border-light:    #EBEBEB;
    --primary:         #FF6B35;
    --primary-dark:    #E85520;
    --header-bg:       #FFFFFF;
    --shadow-xs:       0 1px 2px rgba(0,0,0,0.06);
    --shadow-sm:       0 2px 8px rgba(0,0,0,0.08);
    --shadow-md:       0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg:       0 8px 32px rgba(0,0,0,0.16);
    --card-shadow:     none;
    --radius:          12px;
    --radius-pill:     40px;
}

[data-theme="dark"] {
    --bg:              #111111;
    --surface:         #1E1E1E;
    --surface2:        #2A2A2A;
    --text:            #F2F2F2;
    --text-sub:        #999999;
    --text-muted:      #555555;
    --border:          #333333;
    --border-light:    #2A2A2A;
    --header-bg:       #1A1A1A;
    --shadow-xs:       0 1px 2px rgba(0,0,0,0.3);
    --shadow-sm:       0 2px 8px rgba(0,0,0,0.35);
    --shadow-md:       0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg:       0 8px 32px rgba(0,0,0,0.5);
    --card-shadow:     0 1px 4px rgba(0,0,0,0.25);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button { font-family: inherit; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════
   Header
══════════════════════════════════════ */
.site-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 200;
    transition: background-color 0.3s;
}

.header-top {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-img {
    height: 34px;
    width: auto;
    flex-shrink: 0;
}

/* 에어비앤비식 검색 pill */
.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    cursor: default;
    transition: box-shadow 0.2s;
}

.header-search:hover {
    box-shadow: var(--shadow-md);
}

.search-icon { font-size: 15px; flex-shrink: 0; }

.search-text {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    flex: 1;
}

.search-main {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.search-sep { color: var(--border); font-size: 12px; flex-shrink: 0; }

.search-sub {
    font-size: 12px;
    color: var(--text-sub);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 테마 토글 */
.header-actions { flex-shrink: 0; }

#theme-toggle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s, background-color 0.3s;
}

#theme-toggle:hover { box-shadow: var(--shadow-sm); }

/* ══════════════════════════════════════
   Month Category Bar (에어비앤비 스타일)
══════════════════════════════════════ */
.month-bar-outer {
    border-top: 1px solid var(--border-light);
}

.month-bar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

.month-bar::-webkit-scrollbar { display: none; }

.month-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 18px 8px;
    flex-shrink: 0;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.15s, border-color 0.15s;
    position: relative;
}

.month-tab .tab-icon { font-size: 22px; line-height: 1; }
.month-tab .tab-label { font-size: 11px; font-weight: 600; white-space: nowrap; }

.month-tab:hover {
    color: var(--text-sub);
}

.month-tab.active {
    color: var(--text);
    border-bottom-color: var(--text);
}

/* ══════════════════════════════════════
   Region Filter (컴팩트, 여기어때 스타일)
══════════════════════════════════════ */
.region-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.province-row,
.city-row {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
}

.province-row::-webkit-scrollbar,
.city-row::-webkit-scrollbar { display: none; }

.prov-divider {
    width: 1px;
    height: 16px;
    background: var(--border);
    flex-shrink: 0;
    margin: 0 2px;
}

.prov-group {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.prov-group-label {
    font-size: 9px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 2px 5px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    white-space: nowrap;
    background: var(--surface2);
}

.prov-btn, .city-btn {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.city-btn { padding: 5px 12px; font-size: 11.5px; }

.prov-btn:hover, .city-btn:hover {
    border-color: var(--text);
    color: var(--text);
}

.prov-btn.active {
    background: var(--text);
    border-color: var(--text);
    color: var(--surface);
}

.city-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.city-breadcrumb {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
    white-space: nowrap;
}

.city-row {
    display: none;
    padding-left: 2px;
}

/* ══════════════════════════════════════
   Results
══════════════════════════════════════ */
.results-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 18px 24px 72px;
}

.results-summary {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sub);
    margin-bottom: 18px;
}

.results-summary span { color: var(--text); }

/* ══════════════════════════════════════
   Cards Grid
══════════════════════════════════════ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ══════════════════════════════════════
   Card (에어비앤비 / 여기어때 스타일)
══════════════════════════════════════ */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

/* 이미지 영역 */
.card-image {
    position: relative;
    height: 176px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Wikipedia 실제 이미지 */
.card-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
}

/* 로드 스켈레톤 shimmer */
.card-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 25%,
        rgba(255,255,255,0.12) 50%,
        transparent 75%);
    background-size: 200% 100%;
    animation: shimmer 1.6s infinite;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.card-image.loading::before { opacity: 1; }

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.card-emoji {
    font-size: 60px;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18));
    position: relative;
    z-index: 1;
    transition: transform 0.3s, opacity 0.5s;
}

.card:hover .card-emoji { transform: scale(1.08); }

/* 저장 버튼 (에어비앤비 하트) */
.card-save {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    z-index: 2;
    transition: transform 0.2s, background-color 0.2s;
    color: #888;
}

.card-save:hover { transform: scale(1.15); background: rgba(255,255,255,0.96); color: var(--primary); }

/* 카드 정보 영역 */
.card-info {
    padding: 12px 14px 14px;
}

.card-location {
    font-size: 11px;
    color: var(--text-sub);
    font-weight: 500;
    margin-bottom: 2px;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 5px;
}

.card-desc-short {
    font-size: 12px;
    color: var(--text-sub);
    line-height: 1.55;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 하이라이트 (아이콘 + 첫 항목) */
.card-highlights {
    border-top: 1px solid var(--border-light);
    padding-top: 9px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hl-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    line-height: 1.4;
    min-width: 0;
}

.hl-icon { font-size: 12px; flex-shrink: 0; }

.hl-key {
    font-weight: 700;
    color: var(--text);
    flex-shrink: 0;
}

.hl-val {
    color: var(--text-sub);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* ══════════════════════════════════════
   Empty State
══════════════════════════════════════ */
.empty-state {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-icon { font-size: 56px; display: block; margin-bottom: 16px; }
.empty-state p { font-size: 16px; color: var(--text-sub); font-weight: 600; }
.empty-sub { font-size: 13px !important; font-weight: 400 !important; margin-top: 6px; color: var(--text-muted) !important; }

/* ══════════════════════════════════════
   Footer
══════════════════════════════════════ */
footer {
    border-top: 1px solid var(--border-light);
    padding: 20px 24px;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    font-size: 13px;
    color: var(--text-sub);
    display: flex;
    gap: 8px;
    align-items: center;
}

.footer-sep { color: var(--border); }

/* ══════════════════════════════════════
   반응형
══════════════════════════════════════ */
@media (max-width: 1100px) {
    .cards-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 780px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .header-top { padding: 12px 16px; gap: 12px; }
    .header-search { max-width: none; }
    .search-sub, .search-sep { display: none; }
    .results-section { padding: 14px 16px 56px; }
    .region-section { padding: 12px 16px 0; }
    .month-bar { padding: 0 10px; }
}

@media (max-width: 520px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .card-image { height: 130px; }
    .card-emoji { font-size: 44px; }
    .card-info { padding: 10px 11px 12px; }
    .card-title { font-size: 13px; }
    .header-search { display: none; }
    .logo-img { height: 28px; }
}
