/* ========== 테마 변수 ========== */
:root { color-scheme: light; --bg:#ffffff; --card:#ffffff; --text:#1a1a1a; --text2:#888888; --border:#e0e0e0; --input-bg:#f5f5f5; }
/* 시스템 다크모드 (data-theme 없을 때 = 시스템 따라감) */
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) { color-scheme: dark; }
html:not([data-theme="light"]) :root, html:not([data-theme="light"]) { --bg:#121212; --card:#1e1e1e; --text:#e0e0e0; --text2:#aaaaaa; --border:#333333; --input-bg:#2a2a2a; }
html:not([data-theme="light"]), html:not([data-theme="light"]) body { background-color: #121212; color: #e0e0e0; }
}
/* 수동 다크모드 */
html[data-theme="dark"] { color-scheme: dark; --bg:#121212; --card:#1e1e1e; --text:#e0e0e0; --text2:#aaaaaa; --border:#333333; --input-bg:#2a2a2a; }
html[data-theme="dark"], html[data-theme="dark"] body { background-color: #121212; color: #e0e0e0; }
/* 수동 라이트모드 */
html[data-theme="light"] { color-scheme: light; }

/* ========== 인기템 탭 v2 ========== */

.trend-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; padding: 24px 16px 16px; text-align: center;
}
.trend-header h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.trend-header p { font-size: 13px; opacity: 0.85; }

/* TOP3 캐러셀 */
.trend-top3 {
    display: flex; gap: 10px; padding: 0 16px 20px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.trend-top3::-webkit-scrollbar { display: none; }
.trend-top-card {
    scroll-snap-align: start;
    min-width: 150px; flex-shrink: 0;
    background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
    border-radius: 16px; padding: 16px 14px; text-align: center;
    cursor: pointer; transition: transform 0.2s; color: white;
    border: 1px solid rgba(255,255,255,0.2);
}
.trend-top-card:active { transform: scale(0.96); }
.trend-top-rank {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(255,255,255,0.3); font-size: 12px; font-weight: 800;
    margin-bottom: 8px;
}
.trend-top-emoji { font-size: 36px; margin-bottom: 6px; }
.trend-top-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.trend-top-meta { font-size: 11px; opacity: 0.8; }

/* 섹션 타이틀 */
.trend-section {
    padding: 20px 16px 8px;
    font-size: 16px; font-weight: 800; color: var(--text);
    display: flex; align-items: center; gap: 6px;
}

/* 리스트 카드 */
.trend-card {
    display: flex; align-items: center;
    padding: 12px 16px; margin: 0 12px 6px;
    background: var(--card); border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    cursor: pointer; transition: all 0.15s;
}
.trend-card:active { transform: scale(0.98); }
.trend-card-rank {
    width: 26px; height: 26px; border-radius: 50%;
    font-size: 13px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    margin-right: 12px; flex-shrink: 0; color: white;
}
.trend-card-rank.r1 { background: linear-gradient(135deg, #FFD700, #FFA500); }
.trend-card-rank.r2 { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); }
.trend-card-rank.r3 { background: linear-gradient(135deg, #CD7F32, #A0522D); }
.trend-card-rank.r4 { background: var(--border); color: var(--text2); }
.trend-card-emoji { font-size: 28px; margin-right: 12px; flex-shrink: 0; }
.trend-card-info { flex: 1; min-width: 0; }
.trend-card-name { font-size: 15px; font-weight: 700; margin-bottom: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-card-desc { font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-card-meta { font-size: 11px; color: #667eea; font-weight: 600; margin-top: 2px; }
.trend-card-arrow { font-size: 20px; color: #ccc; margin-left: 8px; }

.trend-empty {
    text-align: center; padding: 40px; color: var(--text2); font-size: 15px;
}

.trend-report-btn {
    text-align: center; padding: 14px; margin: 16px 12px;
    border-radius: 14px; border: 2px dashed var(--border);
    color: var(--text2); font-size: 14px; cursor: pointer; transition: all 0.2s;
}
.trend-report-btn:active { border-color: #667eea; color: #667eea; }

/* 상세 페이지 */
.trend-back {
    padding: 12px 16px; font-size: 15px;
    color: #667eea; cursor: pointer; font-weight: 600;
}
.trend-detail-header { text-align: center; padding: 8px 16px 16px; }
.trend-detail-emoji { font-size: 48px; }
.trend-detail-header h2 { font-size: 22px; margin: 8px 0 4px; }
.trend-detail-header p { font-size: 14px; color: var(--text2); }
.trend-tags { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.trend-tag { padding: 3px 10px; border-radius: 12px; background: rgba(102,126,234,0.08); color: #667eea; font-size: 12px; }

.trend-map-btn {
    display: block; width: calc(100% - 32px); margin: 0 16px 16px; padding: 12px;
    border-radius: 12px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; border: none; font-size: 15px; font-weight: 600; cursor: pointer;
}
.trend-add-shop-btn {
    display: block; width: calc(100% - 32px); margin: 0 16px 12px; padding: 11px;
    border-radius: 12px; border: 2px dashed #667eea; background: rgba(102,126,234,0.05);
    color: #667eea; font-size: 14px; font-weight: 600; cursor: pointer;
}
.trend-shop-card {
    display: flex; align-items: center; padding: 14px 16px;
    margin: 0 12px 8px; background: var(--card); border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.trend-shop-rank {
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(102,126,234,0.08); color: #667eea;
    font-size: 14px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin-right: 12px; flex-shrink: 0;
}
.trend-shop-info { flex: 1; min-width: 0; }
.trend-shop-name { font-size: 15px; font-weight: 600; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-shop-addr { font-size: 12px; color: var(--text2); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trend-shop-price { font-size: 13px; color: var(--text); font-weight: 600; }
.trend-shop-actions { display: flex; gap: 4px; flex-shrink: 0; }
.trend-action-btn {
    width: 32px; height: 32px; border-radius: 50%;
    border: 1.5px solid var(--border); background: var(--card); cursor: pointer;
    font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.trend-action-btn:active { border-color: #667eea; background: rgba(102,126,234,0.08); }

/* ========== 하단 네비게이션 ========== */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1001;
    background: var(--card); border-top: 1px solid var(--border);
    display: flex; height: 56px; box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}
.nav-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    cursor: pointer; color: var(--text2); font-size: 10px; gap: 2px;
    transition: color 0.2s; border: none; background: none;
    min-height: 44px; -webkit-tap-highlight-color: transparent;
}
.nav-item.active { color: #667eea; }
.nav-icon { font-size: 22px; }
.nav-label { font-weight: 600; }

/* 탭 컨텐츠 */
.tab-content {
    position: fixed; top: 0; left: 0; right: 0; bottom: 56px;
    z-index: 997; background: var(--input-bg); overflow-y: auto; display: none;
}
.tab-content.active { display: block; }

.coming-soon { text-align: center; padding: 80px 20px; color: var(--text2); }
.coming-soon .icon { font-size: 48px; margin-bottom: 12px; }
.coming-soon h3 { font-size: 18px; color: var(--text2); margin-bottom: 8px; }
.coming-soon p { font-size: 14px; }
/* ========== 📸 스냅 ========== */
.snap-container { padding: 0; }

/* 스냅 헤더 */
.snap-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white; padding: 16px; text-align: center; position: relative;
}
.snap-header-title { font-size: 16px; font-weight: 700; }
.snap-header-sub { font-size: 12px; opacity: 0.85; margin-top: 2px; }

/* 스냅 촬영 버튼 */
.snap-capture-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 16px; padding: 16px; border-radius: 16px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white; border: none; font-size: 16px; font-weight: 700;
    cursor: pointer; box-shadow: 0 4px 12px rgba(238,90,36,0.3);
    width: calc(100% - 32px);
}
.snap-capture-btn:active { transform: scale(0.97); }

/* 스냅 피드 */
.snap-feed { padding: 0 12px 12px; }

.snap-card {
    background: var(--card); border-radius: 14px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); margin-bottom: 12px;
}
.snap-card-img {
    width: 100%; height: 220px; object-fit: cover; display: block;
}
.snap-card-body { padding: 12px; }
.snap-card-comment {
    font-size: 14px; color: var(--text); margin-bottom: 8px; line-height: 1.4;
}
.snap-card-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: 11px; color: var(--text2);
}
.snap-card-meta img {
    width: 20px; height: 20px; border-radius: 50%;
}
.snap-card-tags {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
}
.snap-tag {
    padding: 3px 10px; border-radius: 12px;
    background: rgba(238,90,36,0.12); color: #ee5a24;
    font-size: 11px; font-weight: 600;
}

/* 스냅 작성 모달 */
.snap-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 3000;
    display: flex; align-items: flex-end; justify-content: center;
}
.snap-modal {
    background: var(--card); border-radius: 20px 20px 0 0;
    width: 100%; max-width: 500px; max-height: 85vh;
    overflow-y: auto; padding: 20px; animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.snap-preview-img {
    width: 100%; max-height: 300px; object-fit: cover;
    border-radius: 12px; margin-bottom: 16px;
}

/* 태그 선택 */
.snap-tag-grid {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.snap-tag-btn {
    padding: 6px 14px; border-radius: 20px;
    border: 1.5px solid var(--border); background: var(--card);
    font-size: 13px; cursor: pointer; transition: all 0.2s;
}
.snap-tag-btn.selected {
    background: #ee5a24; color: white; border-color: #ee5a24;
}

.snap-comment-input {
    width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
    border-radius: 12px; font-size: 14px; outline: none;
    box-sizing: border-box; margin-bottom: 16px;
}
.snap-comment-input:focus { border-color: #ee5a24; }

.snap-submit-btn {
    width: 100%; padding: 14px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white; font-size: 15px; font-weight: 700; cursor: pointer;
}
.snap-submit-btn:disabled { opacity: 0.5; }

.snap-close-btn {
    position: absolute; top: 16px; right: 16px;
    background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text2);
}

/* 필터 바 */
.snap-filter {
    display: flex; gap: 8px; padding: 12px 12px 4px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.snap-filter-btn {
    padding: 10px 12px; border-radius: 16px; min-height: 44px;
    border: 1.5px solid var(--border); background: var(--card);
    font-size: 12px; cursor: pointer; white-space: nowrap;
}
.snap-filter-btn.active {
    background: #ee5a24; color: white; border-color: #ee5a24;
}

/* 빈 상태 */
.snap-empty {
    text-align: center; padding: 60px 20px; color: var(--text2);
}
.snap-empty-icon { font-size: 48px; margin-bottom: 12px; }
.snap-empty-text { font-size: 14px; line-height: 1.6; }

/* 삭제 버튼 */
.snap-delete-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    margin-left: auto;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.snap-delete-btn:active { opacity: 1; }

.snap-view-toggle { background:rgba(255,255,255,0.25); color:white; border:none; border-radius:8px; padding:6px 12px; font-size:12px; font-weight:600; cursor:pointer; white-space:nowrap; backdrop-filter:blur(4px); }
.snap-view-toggle:active { background:rgba(255,255,255,0.4); }
/* ========== 📅 레슨 예약 ========== */

/* 코치 헤더 */
.lesson-coach-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    padding: 10px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 14px;
    color: #e65100;
}
.lesson-settings-btn {
    background: var(--card);
    border: 1px solid #ffb74d;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    color: #e65100;
    font-weight: 600;
}

/* 통계 */
.lesson-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.stat-item {
    flex: 1;
    text-align: center;
    background: var(--input-bg);
    border-radius: 12px;
    padding: 12px 8px;
}
.stat-item.highlight {
    background: rgba(33,150,243,0.12);
}
.stat-num {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}
.stat-label {
    display: block;
    font-size: 11px;
    color: var(--text2);
    margin-top: 2px;
}

/* 날짜 피커 */
.lesson-date-picker {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 8px;
    -webkit-overflow-scrolling: touch;
}
.lesson-date-picker::-webkit-scrollbar { display: none; }
.lesson-date {
    min-width: 52px;
    text-align: center;
    padding: 8px 6px;
    border-radius: 12px;
    background: var(--input-bg);
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
}
.lesson-date.selected {
    background: #1a1a1a;
    color: #fff;
}
.lesson-date-day {
    display: block;
    font-size: 11px;
    color: var(--text2);
}
.lesson-date.selected .lesson-date-day { color: var(--text2); }
.lesson-date-num {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-top: 2px;
}

.lesson-date-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    padding-left: 4px;
}

/* 슬롯 목록 */
.lesson-slots {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.lesson-slot {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    transition: all 0.2s;
    gap: 8px;
}
.lesson-slot.available {
    cursor: pointer;
    border: 1px solid var(--border);
}
.lesson-slot.available:active {
    background: rgba(102,126,234,0.06);
    border-color: #2196f3;
}
.lesson-slot.mine {
    background: rgba(33,150,243,0.12);
    border-color: #90caf9;
}
.lesson-slot.booked {
    background: var(--input-bg);
    border-color: var(--border);
}
.lesson-slot.locked {
    background: var(--input-bg);
    border-color: #e8e8e8;
    opacity: 0.6;
}
.lesson-slot.locked .slot-time { color: #ccc; }
.lesson-slot.locked .slot-status { color: var(--text2); font-size: 12px; }
.slot-time {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    min-width: 50px;
}
.lesson-slot.booked .slot-time { color: #bbb; }
.slot-status {
    font-size: 12px;
    color: var(--text2);
    flex: 1;
}
.lesson-slot.mine .slot-status {
    color: #1976d2;
    font-weight: 600;
}
.slot-name {
    font-size: 12px;
    color: var(--text2);
}
.slot-book-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.slot-cancel-btn {
    background: none;
    border: 1px solid #ef5350;
    color: #ef5350;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
}
.slot-cancel-btn.coach {
    border-color: #ff9800;
    color: #ff9800;
}

/* 빈 상태 */
.lesson-empty {
    text-align: center;
    padding: 60px 20px;
}
.lesson-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.lesson-empty-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.lesson-empty-desc {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.6;
    margin-bottom: 20px;
}
.lesson-setup-btn {
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

/* 슬롯 액션 */
.slot-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: auto;
}
.slot-swap-btn {
    background: none;
    border: 1px solid #ff9800;
    color: #ff9800;
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
}
.slot-swap-pending {
    font-size: 11px;
    color: #ff9800;
    font-weight: 600;
}

/* 스왑 보드 */
.swap-board {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 1.5px solid #ffb74d;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
}
.swap-board-header {
    font-size: 14px;
    font-weight: 700;
    color: #e65100;
    margin-bottom: 10px;
}
.swap-board-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--card);
    border-radius: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.swap-board-item:last-child { margin-bottom: 0; }
.swap-board-item.mine {
    background: rgba(255,193,7,0.12);
    border: 1px dashed #ffb74d;
}
.swap-board-time {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    min-width: 45px;
}
.swap-board-name {
    font-size: 13px;
    color: var(--text2);
}
.swap-board-label {
    font-size: 12px;
    color: #ff9800;
    font-weight: 600;
    flex: 1;
}
.swap-board-cancel {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 11px;
    color: var(--text2);
    cursor: pointer;
}
.swap-board-offers {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-left: auto;
}
.swap-board-offer {
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.swap-board-offer:active {
    background: #1976d2;
}

/* 코치 탭 */
.lesson-coach-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.lesson-coach-tabs::-webkit-scrollbar { display: none; }
.lesson-coach-tab {
    padding: 8px 18px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    background: var(--card);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    color: var(--text2);
    transition: all 0.2s;
}
.lesson-coach-tab.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

/* 코치 정보 */
.lesson-coach-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 16px;
    background: var(--input-bg);
    border-radius: 12px;
    margin-bottom: 12px;
}
.coach-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.coach-detail {
    font-size: 12px;
    color: var(--text2);
}

/* 레슨 요일 아님 */
.lesson-no-day {
    text-align: center;
    padding: 40px 20px;
    color: var(--text2);
    font-size: 14px;
    line-height: 1.8;
}

/* 설정 모달 — 멀티코치 */
.lesson-settings-modal {
    width: 360px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.lesson-settings-modal .lesson-modal-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.settings-section {
    margin-bottom: 16px;
}
.settings-section > label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.settings-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.coach-add-btn {
    background: #667eea;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.settings-coach-card {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
}
.settings-coach-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.coach-name-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}
.coach-remove-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    padding: 4px 8px;
}
.settings-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.settings-row label {
    font-size: 12px;
    color: var(--text2);
    min-width: 50px;
    margin: 0 !important;
}
.settings-row select {
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    width: auto !important;
}
.day-checks {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.day-check {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: var(--text2);
    min-width: auto !important;
    margin: 0 !important;
}
.day-check input { width: 14px; height: 14px; }
.coach-breaks {
    flex: 1;
    min-width: 120px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
}
.break-hint {
    font-size: 10px;
    color: var(--text2);
}

/* 로딩 */
.lesson-loading {
    text-align: center;
    padding: 40px;
    color: var(--text2);
    font-size: 14px;
}

/* 설정 모달 */
.lesson-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lesson-modal {
    background: var(--card);
    border-radius: 16px;
    width: 320px;
    max-width: 90vw;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.lesson-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    font-size: 16px;
}
.lesson-modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text2);
    padding: 4px 8px;
}
.lesson-modal-body {
    padding: 20px;
}
.lesson-modal-body label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 6px;
    margin-top: 12px;
}
.lesson-modal-body label:first-child { margin-top: 0; }
.lesson-modal-body select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--input-bg);
    -webkit-appearance: none;
}
.lesson-modal-save {
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding: 12px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.swap-board-takeover {
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.swap-board-takeover:active { background: #388e3c; }

/* 레슨 횟수 */
.lesson-quota-info {
    font-size: 12px;
    color: var(--text2);
    text-align: center;
    margin-bottom: 8px;
}
.stat-warning {
    background: rgba(255,152,0,0.12) !important;
}
.stat-warning .stat-num {
    color: #e65100 !important;
}

/* 휴강 배너 */
.lesson-closed-banner {
    text-align: center;
    padding: 32px 20px;
    color: #ef5350;
    font-size: 16px;
    font-weight: 700;
}

.lesson-date.closed {
    opacity: 0.5;
    text-decoration: line-through;
}
/* ===== 📅 통합 캘린더 ===== */
.cal-wrap { padding: 0 4px; }

.cal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 8px 8px;
}
.cal-month { font-size: 18px; font-weight: 800; color: var(--text); }
.cal-nav {
    background: none; border: none; font-size: 18px; color: #667eea;
    cursor: pointer; padding: 8px 12px; border-radius: 8px;
    min-width: 44px; min-height: 44px;
}
.cal-nav:active { background: #f0f2ff; }

.cal-legend {
    display: flex; gap: 16px; justify-content: center;
    padding: 4px 0 12px; font-size: 12px; color: var(--text2);
}
.cal-legend span { display: flex; align-items: center; gap: 4px; }

.cal-weekdays {
    display: grid; grid-template-columns: repeat(7, 1fr);
    text-align: center; font-size: 12px; color: var(--text2); font-weight: 600;
    padding-bottom: 8px;
}
.cal-wk.sun { color: #e74c3c; }
.cal-wk.sat { color: #3498db; }

.cal-grid {
    display: grid; grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.cal-cell {
    text-align: center; padding: 8px 2px 4px; border-radius: 10px;
    cursor: pointer; min-height: 48px; transition: background 0.15s;
}
.cal-cell:active { background: #f0f2ff; }
.cal-cell.empty { cursor: default; }
.cal-cell.today .cal-day {
    background: #667eea; color: white; border-radius: 50%;
    width: 28px; height: 28px; display: inline-flex;
    align-items: center; justify-content: center; font-weight: 700;
}
.cal-cell.selected { background: #f0f2ff; }
.cal-day { font-size: 14px; font-weight: 500; color: var(--text); }

.cal-dots {
    display: flex; gap: 3px; justify-content: center; margin-top: 4px;
    min-height: 6px;
}
.cal-dot {
    width: 6px; height: 6px; border-radius: 50%; display: inline-block;
}
.cal-dot.lesson { background: #e74c3c; }
.cal-dot.meetup { background: #2ecc71; }
.cal-dot.notice { background: #3498db; }

.cal-selected-header {
    font-size: 15px; font-weight: 700; color: var(--text);
    padding: 20px 8px 8px; border-top: 1px solid #f0f0f0; margin-top: 12px;
}

.cal-event-list { padding: 0 4px 16px; }
.cal-no-event {
    text-align: center; padding: 24px; color: #ccc; font-size: 14px;
}
.cal-event-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px; background: var(--input-bg); border-radius: 10px; margin-bottom: 6px;
}
.cal-event-item.lesson { border-left: 3px solid #e74c3c; }
.cal-event-item.meetup { border-left: 3px solid #2ecc71; }
.cal-event-item.notice { border-left: 3px solid #3498db; }
.cal-event-icon { font-size: 16px; }
.cal-event-body { flex: 1; }
.cal-event-type {
    font-size: 11px; font-weight: 600; color: var(--text2);
    display: block; margin-bottom: 2px;
}
.cal-event-title { font-size: 14px; color: var(--text); }
/* ===== 👥 회원정보 관리 ===== */
.mf-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 9500;
    display: flex; align-items: flex-end; justify-content: center;
}
.mf-inner {
    background: var(--card); border-radius: 20px 20px 0 0;
    width: 100%; max-width: 500px; max-height: 85vh;
    overflow-y: auto; padding-bottom: env(safe-area-inset-bottom);
    animation: slideUp 0.3s ease;
}
.mf-header {
    display: flex; align-items: center; gap: 8px;
    padding: 16px 20px; border-bottom: 1px solid #f0f0f0;
    position: sticky; top: 0; background: var(--card); z-index: 1;
}
.mf-header h3 { font-size: 17px; font-weight: 700; }
.mf-back {
    background: none; border: none; font-size: 20px;
    cursor: pointer; min-width: 44px; min-height: 44px;
    display: flex; align-items: center; justify-content: center;
}
.mf-body { padding: 16px 20px; }

.mf-field-card {
    background: var(--input-bg); border-radius: 12px; padding: 12px;
    margin-bottom: 10px;
}
.mf-field-row {
    display: flex; gap: 8px; align-items: center;
}
.mf-input {
    flex: 1; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 14px; outline: none;
    background: var(--card);
}
.mf-input:focus { border-color: #667eea; }
.mf-select {
    padding: 10px 8px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 13px; background: var(--card);
}
.mf-options { margin-top: 8px; font-size: 13px; }
.mf-del-btn {
    background: none; border: none; color: #e74c3c;
    font-size: 18px; cursor: pointer; min-width: 36px; min-height: 36px;
}
.mf-add-btn {
    width: 100%; padding: 12px; border: 2px dashed var(--border);
    border-radius: 10px; background: none; color: #667eea;
    font-size: 14px; font-weight: 600; cursor: pointer;
    margin-top: 8px;
}
.mf-add-btn:active { background: #f0f2ff; }
.mf-save-btn {
    display: block; width: calc(100% - 40px); margin: 16px 20px;
    padding: 14px; border: none; border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white; font-size: 16px; font-weight: 700; cursor: pointer;
}
.mf-save-btn:active { opacity: 0.8; }

.mf-profile-field {
    margin-bottom: 16px;
}
.mf-profile-field label {
    display: block; font-size: 14px; font-weight: 600;
    color: var(--text); margin-bottom: 6px;
}

.mf-member-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-bottom: 1px solid #f5f5f5;
}
.mf-member-name { font-size: 15px; font-weight: 600; color: var(--text); }
.mf-member-info { font-size: 13px; color: var(--text2); }
/* ========== 모임(Meetup) 스타일 ========== */

.meetup-container { padding: 12px 16px; }

/* 모임 생성 버튼 */
.meetup-create-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: 100%; padding: 14px; margin-bottom: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white; border: none; border-radius: 14px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
    transition: transform 0.1s;
}
.meetup-create-btn:active { transform: scale(0.97); }

/* 타입 필터 */
.meetup-type-filter {
    display: flex; gap: 8px; margin-bottom: 14px; overflow-x: auto;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.meetup-type-filter::-webkit-scrollbar { display: none; }
.meetup-type-btn {
    flex-shrink: 0; padding: 10px 16px; border-radius: 20px; min-height: 44px;
    border: 1.5px solid var(--border); background: var(--card);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; white-space: nowrap;
}
.meetup-type-btn.active { color: white; border-color: transparent; }
.meetup-type-btn[data-type="all"].active { background: #333; }
.meetup-type-btn[data-type="class"].active { background: #667eea; border-color: #667eea; }
.meetup-type-btn[data-type="regular"].active { background: #4caf50; border-color: #4caf50; }
.meetup-type-btn[data-type="lightning"].active { background: #ff9800; border-color: #ff9800; }

/* 모임 카드 */
.meetup-card {
    background: var(--card); border-radius: 14px; padding: 16px;
    margin-bottom: 12px; box-shadow: 0 1px 6px rgba(0,0,0,0.07);
    transition: transform 0.1s;
    cursor: pointer;
}
.meetup-card:active { transform: scale(0.98); }

.meetup-card-header {
    display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
}
.meetup-type-badge {
    padding: 3px 10px; border-radius: 10px;
    font-size: 11px; font-weight: 700; color: white;
    flex-shrink: 0;
}
.meetup-type-badge.class { background: #667eea; }
.meetup-type-badge.regular { background: #4caf50; }
.meetup-type-badge.lightning { background: #ff9800; }

.meetup-card-title {
    font-size: 16px; font-weight: 700; color: var(--text);
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.meetup-card-info {
    display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px;
}
.meetup-info-row {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text2);
}
.meetup-info-row .icon { flex-shrink: 0; }

.meetup-card-desc {
    font-size: 13px; color: var(--text2); line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}

.meetup-card-footer {
    display: flex; align-items: center; justify-content: space-between;
}

.meetup-members-info {
    font-size: 13px; color: var(--text2);
    display: flex; align-items: center; gap: 4px;
}
.meetup-members-bar {
    width: 60px; height: 6px; border-radius: 3px; background: var(--input-bg);
    overflow: hidden; display: inline-block; vertical-align: middle;
}
.meetup-members-fill {
    height: 100%; border-radius: 3px; transition: width 0.3s;
}
.meetup-members-fill.low { background: #667eea; }
.meetup-members-fill.mid { background: #ff9800; }
.meetup-members-fill.full { background: #f44336; }

.meetup-join-btn {
    padding: 8px 20px; border-radius: 20px; border: none;
    font-size: 13px; font-weight: 700; cursor: pointer;
    transition: all 0.2s;
}
.meetup-join-btn.join {
    background: #667eea; color: white;
}
.meetup-join-btn.joined {
    background: #4caf50; color: white;
}
.meetup-join-btn.full {
    background: #e0e0e0; color: var(--text2); cursor: default;
}

/* 빈 상태 */
.meetup-empty {
    text-align: center; padding: 40px 20px; color: var(--text2);
}
.meetup-empty-icon { font-size: 48px; margin-bottom: 12px; }
.meetup-empty-title { font-size: 16px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
.meetup-empty-desc { font-size: 13px; }

/* 모임 상세 */
.meetup-detail { padding: 16px; }
.meetup-detail-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
}
.meetup-detail-title { font-size: 20px; font-weight: 800; color: var(--text); }
.meetup-detail-meta {
    background: var(--input-bg); border-radius: 12px; padding: 14px;
    margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px;
}
.meetup-detail-meta .row {
    display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text2);
}
.meetup-detail-desc {
    font-size: 14px; color: var(--text); line-height: 1.7;
    margin-bottom: 20px; white-space: pre-wrap;
}
.meetup-detail-members {
    margin-bottom: 16px;
}
.meetup-detail-members h4 {
    font-size: 14px; font-weight: 700; margin-bottom: 8px;
}
.meetup-member-list {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.meetup-member-chip {
    padding: 6px 12px; background: var(--input-bg); border-radius: 16px;
    font-size: 12px; color: var(--text2);
}
.meetup-member-chip.me {
    background: #667eea20; color: #667eea; font-weight: 600;
}

.meetup-detail-actions {
    display: flex; gap: 10px; margin-bottom: 20px;
}
.meetup-detail-actions button {
    flex: 1; padding: 14px; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 700; cursor: pointer;
}
.meetup-action-join { background: #667eea; color: white; }
.meetup-action-joined { background: #4caf50; color: white; }
.meetup-action-chat { background: var(--input-bg); color: var(--text); }

/* 모임 대화방 */
.meetup-chat {
    display: flex; flex-direction: column; height: calc(100vh - 280px);
    background: #b2c7d9; border-radius: 12px; overflow: hidden;
}
.meetup-chat-messages {
    flex: 1; overflow-y: auto; padding: 12px;
    display: flex; flex-direction: column; gap: 8px;
}
.meetup-chat-input {
    display: flex; gap: 8px; padding: 8px 12px;
    background: var(--card); border-top: 1px solid var(--border);
}
.meetup-chat-input input {
    flex: 1; padding: 10px 14px; border: 1px solid var(--border);
    border-radius: 20px; font-size: 14px; outline: none;
}
.meetup-chat-input button {
    width: 40px; height: 40px; border-radius: 50%; border: none;
    background: #667eea; color: white; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* 생성 모달 */
.meetup-form-group {
    margin-bottom: 14px; text-align: left;
}
.meetup-form-group label {
    display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text);
}
.meetup-form-group input,
.meetup-form-group select,
.meetup-form-group textarea {
    width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
    border-radius: 10px; font-size: 14px; outline: none;
    box-sizing: border-box;
}
.meetup-form-group textarea { resize: vertical; min-height: 80px; }
.meetup-form-group input:focus,
.meetup-form-group select:focus,
.meetup-form-group textarea:focus { border-color: #667eea; }

.meetup-type-select {
    display: flex; gap: 8px;
}
.meetup-type-option {
    flex: 1; padding: 12px 8px; border: 2px solid var(--border); border-radius: 12px;
    text-align: center; cursor: pointer; font-size: 13px; font-weight: 600;
    transition: all 0.2s;
}
.meetup-type-option.selected-class { border-color: #667eea; background: #667eea10; color: #667eea; }
.meetup-type-option.selected-regular { border-color: #4caf50; background: #4caf5010; color: #4caf50; }
.meetup-type-option.selected-lightning { border-color: #ff9800; background: #ff980010; color: #ff9800; }

.meetup-place-results { display:none; position:absolute; left:0; right:0; top:100%; background: var(--card); border:1px solid var(--border); border-radius:0 0 10px 10px; max-height:200px; overflow-y:auto; z-index:100; box-shadow:0 4px 12px rgba(0,0,0,0.1); }
.meetup-place-item:active { background:rgba(102,126,234,0.08); }
/* ========== 커뮤니티 탭 v2 ========== */

.comm-header {
    padding: 20px 16px 8px;
    text-align: center;
}
.comm-header h2 { font-size: 22px; margin-bottom: 4px; }

/* 섹션 타이틀 */
.comm-section-title {
    font-size: 15px;
    font-weight: 700;
    padding: 16px 16px 8px;
    color: var(--text);
}

/* 내 커뮤니티 가로 스크롤 */
.comm-my-scroll {
    display: flex;
    gap: 10px;
    padding: 4px 16px 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.comm-my-scroll::-webkit-scrollbar { display: none; }

.comm-my-card {
    min-width: 110px;
    padding: 14px 12px;
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.comm-my-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}
.comm-my-icon { font-size: 28px; margin-bottom: 4px; }
.comm-my-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.comm-my-sub { font-size: 11px; color: var(--text2); }
.comm-verified-dot {
    display: inline-block;
    color: #667eea;
    font-size: 11px;
    margin-left: 2px;
}

/* 타입 필터 바 */
.comm-type-bar {
    display: flex;
    gap: 6px;
    padding: 4px 16px 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.comm-type-bar::-webkit-scrollbar { display: none; }
.comm-type-btn {
    padding: 10px 14px;
    border-radius: 20px;
    min-height: 44px;
    border: 1.5px solid var(--border);
    background: var(--card);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.comm-type-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 커뮤니티 검색 */
.comm-search-section { padding: 8px 16px 0; }
.comm-search-bar { position: relative; }
.comm-search-bar input { width: 100%; padding: 10px 36px 10px 14px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font-size: 14px; outline: none; box-sizing: border-box; }
.comm-search-bar input:focus { border-color: #667eea; }
.comm-search-bar input::placeholder { color: var(--text2); }
.comm-search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--text2); font-size: 16px; cursor: pointer; padding: 4px; }

/* 둘러보기 카드 */
.comm-browse-card {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    margin: 0 12px 8px;
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.comm-browse-icon { font-size: 32px; margin-right: 12px; flex-shrink: 0; }
.comm-browse-info { flex: 1; }
.comm-browse-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; }
.comm-browse-sub { font-size: 12px; color: var(--text2); }
.comm-browse-action { flex-shrink: 0; margin-left: 8px; }

.comm-join-btn, .comm-enter-btn {
    padding: 8px 14px;
    border-radius: 20px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.comm-join-btn {
    background: rgba(102,126,234,0.08);
    color: #667eea;
}
.comm-join-btn:hover { background: #e0e0ff; }
.comm-enter-btn {
    background: #667eea;
    color: white;
}
.comm-enter-btn:hover { opacity: 0.9; }

.comm-joined-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
    background: rgba(76,175,80,0.12);
    color: #4CAF50;
    margin-left: 4px;
    font-weight: 600;
}

.comm-request-btn {
    text-align: center;
    padding: 14px;
    margin: 12px 12px 24px;
    border-radius: 14px;
    border: 2px dashed var(--border);
    color: var(--text2);
    font-size: 14px;
    cursor: pointer;
}
.comm-request-btn:hover { border-color: #667eea; color: #667eea; }

/* 커뮤니티 스위처 */
.comm-switcher {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    overflow-x: auto;
    background: var(--card);
    border-bottom: 1px solid #f0f0f0;
    -webkit-overflow-scrolling: touch;
}
.comm-switcher::-webkit-scrollbar { display: none; }
.comm-switch-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 20px;
    background: var(--input-bg);
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s;
}
.comm-switch-item.active {
    background: #667eea;
    color: white;
}
.comm-switch-item:hover:not(.active) { background: var(--border); }
.comm-switch-icon { font-size: 15px; }
.comm-switch-label { font-size: 12px; }

/* 커뮤니티 내부 뷰 헤더 */
.comm-view-header {
    padding: 16px 20px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    position: relative;
}
.comm-view-back {
    display: inline;
    font-size: 22px;
    color: #667eea;
    cursor: pointer;
    font-weight: 600;
    margin-right: 4px;
}
.comm-view-title { font-size: 20px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.comm-view-sub { font-size: 13px; color: var(--text2); margin-top: 2px; display: none; }
.comm-header-tabs { display: flex; gap: 4px; }
.comm-htab {
    font-size: 18px;
    padding: 4px 10px;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.15s;
}
.comm-htab.active {
    opacity: 1;
    background: var(--input-bg);
}
.comm-view-join {
    margin-top: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    background: #667eea;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.comm-view-leave {
    margin-top: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text2);
    font-size: 12px;
    cursor: pointer;
}

/* 모드 토글 */
.comm-mode-toggle {
    display: flex;
    margin: 8px 12px;
    background: var(--input-bg);
    border-radius: 12px;
    padding: 3px;
    gap: 3px;
}
.comm-mode-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    color: var(--text2);
}
.comm-mode-btn.active {
    background: var(--card);
    color: #667eea;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* 기존 스타일 유지 */
.comm-tabs {
    display: flex; padding: 8px 12px; gap: 0;
    border-bottom: 1px solid var(--border); background: var(--card);
}
.comm-tab {
    flex: 1; padding: 12px 10px; border: none; background: none;
    font-size: 14px; font-weight: 600; color: var(--text2);
    cursor: pointer; border-bottom: 2px solid transparent;
    min-height: 44px;
}
.comm-tab.active { color: #667eea; border-bottom-color: #667eea; }

.comm-cat-bar {
    display: flex; gap: 6px; padding: 10px 16px;
    overflow-x: auto; background: var(--card);
    -webkit-overflow-scrolling: touch;
}
.comm-cat-bar::-webkit-scrollbar { display: none; }
.comm-cat-btn {
    padding: 10px 12px; border-radius: 16px; min-height: 44px;
    border: 1.5px solid var(--border); background: var(--card);
    font-size: 12px; cursor: pointer; white-space: nowrap;
}
.comm-cat-btn.active { background: #667eea; color: white; border-color: #667eea; }

.comm-write-btn {
    margin: 10px 16px; padding: 12px; border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; text-align: center; font-size: 15px;
    font-weight: 600; cursor: pointer;
}

.comm-post-card {
    margin: 10px 16px; padding: 16px 18px; background: var(--card);
    border-radius: 14px; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    cursor: pointer; transition: all 0.2s;
}
.comm-post-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.12); }
.comm-post-top { display: flex; justify-content: space-between; margin-bottom: 6px; }
.comm-post-cat { font-size: 11px; color: #667eea; font-weight: 600; }
.comm-post-time { font-size: 11px; color: var(--text2); }
.comm-post-title { font-size: 16px; font-weight: 700; margin-bottom: 4px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-post-store { font-size: 13px; margin-bottom: 4px; }
.comm-post-preview { font-size: 13px; color: var(--text2); margin-bottom: 8px; line-height: 1.4; }
.comm-post-footer { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); }
.comm-post-author { font-weight: 600; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.comm-post-stats { margin-left: auto; }
.comm-empty { text-align: center; padding: 40px 20px; color: var(--text2); font-size: 15px; }

/* 글 상세 */
.comm-back { padding: 12px 16px; font-size: 15px; color: #667eea; cursor: pointer; font-weight: 600; }
.comm-detail { padding: 0 16px; }
.comm-detail-cat { font-size: 12px; color: #667eea; font-weight: 600; margin-bottom: 4px; }
.comm-detail-title { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.comm-detail-meta { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.comm-detail-store {
    padding: 10px 14px; background: var(--input-bg); border-radius: 12px;
    margin-bottom: 12px; font-size: 14px; display: flex; align-items: center; gap: 8px;
}
.comm-map-link {
    margin-left: auto; padding: 4px 10px; border-radius: 8px;
    border: 1px solid #667eea; background: var(--card); color: #667eea;
    font-size: 12px; cursor: pointer;
}
.comm-detail-rating { font-size: 18px; margin-bottom: 12px; }
.comm-detail-body { font-size: 15px; line-height: 1.7; color: var(--text); margin-bottom: 16px; }
.comm-detail-actions { display: flex; gap: 8px; padding: 12px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.comm-action { flex: 1; padding: 10px; border: none; background: var(--input-bg); border-radius: 10px; font-size: 14px; cursor: pointer; }
.comm-action:hover { background: var(--border); }
.comm-comments { padding: 0 16px 24px; }
.comm-comments h3 { font-size: 16px; margin-bottom: 12px; }
.comm-comment { padding: 10px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.comm-comment strong { color: var(--text); }
.comm-comment p { color: var(--text2); margin-top: 4px; }
.comm-comment-login { margin-top: 12px; padding: 14px; background: var(--input-bg); border-radius: 12px; text-align: center; font-size: 14px; color: var(--text2); }

/* ===== 📌 공지 카드 ===== */
.comm-post-card.notice-card {
    background: linear-gradient(135deg, #fffde7, #fff9c4);
    border: 1.5px solid #ffeb3b;
    position: relative;
}
.comm-post-card.notice-card .comm-post-title {
    font-weight: 800;
    color: var(--text);
}
.notice-pin {
    font-size: 13px;
}

/* ===== 카테고리 태그 뱃지 ===== */
.comm-post-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    line-height: 1;
}

/* 카테고리 헤더 */
.comm-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 12px 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.comm-cat-more {
    background: none;
    border: none;
    font-size: 12px;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
}

/* Admin bar */
.comm-admin-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 6px 0; }
.comm-admin-btn { background: #f0f2ff; color: #667eea; border: none; border-radius: 6px; padding: 4px 10px; font-size: 11px; cursor: pointer; font-weight: 600; }
.comm-admin-btn:active { background: #e0e4ff; }

/* Link card in post */
.post-link-card { display:flex; align-items:center; gap:12px; padding:12px; background:#f8f9ff; border:1px solid #e8eaf6; border-radius:12px; margin-top:12px; text-decoration:none; color:inherit; transition:background 0.2s; }
.post-link-card:active { background:#eef0ff; }
.post-link-icon { font-size:24px; width:40px; height:40px; background:#e8eaf6; border-radius:10px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.post-link-title { font-size:14px; font-weight:600; color: var(--text); }
.post-link-domain { font-size:11px; color: var(--text2); margin-top:2px; }
.post-link-info { flex:1; overflow:hidden; }
.post-link-arrow { color:#ccc; font-size:20px; }

/* Write toggle section */
.write-toggle-section { border:1.5px solid #e8e8e8; border-radius:12px; margin-bottom:12px; overflow:hidden; }
.write-toggle-header { display:flex; align-items:center; padding:12px 14px; cursor:pointer; gap:8px; }
.write-toggle-header span:first-child { font-size:13px; font-weight:700; }
.write-toggle-hint { font-size:11px; color: var(--text2); flex:1; }
.write-toggle-arrow { font-size:16px; color:#ccc; transition:transform 0.2s; }
.write-toggle-section.open .write-toggle-arrow { transform:rotate(90deg); }
.write-toggle-body { display:none; padding:0 14px 14px; }
.write-toggle-section.open .write-toggle-body { display:block; }

/* Post action sheet (long press menu) */
.post-action-sheet { position:fixed; inset:0; z-index:9999; display:flex; align-items:flex-end; justify-content:center; }
.post-action-backdrop { position:absolute; inset:0; background:rgba(0,0,0,0); transition:background 0.3s; }
.post-action-sheet.open .post-action-backdrop { background:rgba(0,0,0,0.4); }
.post-action-menu { position:relative; z-index:1; width:100%; max-width:420px; background: var(--card); border-radius:16px 16px 0 0; padding:8px 0 env(safe-area-inset-bottom, 16px); transform:translateY(100%); transition:transform 0.3s cubic-bezier(0.32,0.72,0,1); }
.post-action-sheet.open .post-action-menu { transform:translateY(0); }
.post-action-item { display:block; width:100%; padding:16px 20px; border:none; background:none; font-size:16px; text-align:center; cursor:pointer; transition:background 0.15s; }
.post-action-item:active { background: var(--input-bg); }
.post-action-danger { color:#ff4757; }
.post-action-cancel { color: var(--text2); border-top:8px solid #f0f0f0; }
/* ========== 로그인 UI ========== */

/* 로그인 팝업 오버레이 */
.auth-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: authOverlayIn .3s ease forwards;
}
@keyframes authOverlayIn { to { background: rgba(0,0,0,0.5); } }

.auth-modal {
    position: relative;
    background: var(--card);
    border-radius: 20px;
    padding: 32px 24px;
    width: 320px;
    max-width: calc(100vw - 40px);
    text-align: center;
    transform: translateY(30px);
    opacity: 0;
    animation: authModalIn .35s ease forwards;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.auth-modal-icon { font-size: 40px; margin-bottom: 12px; }
.auth-modal h3 {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.4;
}
.auth-modal p {
    font-size: 14px;
    color: var(--text2);
    margin-bottom: 20px;
}

.auth-kakao-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #FEE500;
    color: #191919;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
}
.auth-kakao-btn:hover { background: #F0D800; }

.auth-close-btn {
    display: block;
    width: 100%;
    padding: 10px;
    border: none;
    background: none;
    color: var(--text2);
    font-size: 14px;
    cursor: pointer;
}
.auth-close-btn:hover { color: #667eea; }

/* 프로필 바 */
.auth-profile-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--card);
    border-bottom: 1px solid var(--border);
}
.auth-profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}
.auth-profile-img-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.auth-profile-name {
    font-size: 14px;
    font-weight: 600;
}
.auth-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(76,175,80,0.12);
    color: #2e7d32;
}
.auth-badge-unverified {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--text2);
}
.auth-logout-btn {
    margin-left: auto;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    font-size: 12px;
    color: var(--text2);
    cursor: pointer;
}
.auth-logout-btn:hover { border-color: #e74c3c; color: #e74c3c; }

@keyframes authModalIn { to { transform: translateY(0); opacity: 1; } }
/* ========== 문의하기 ========== */

.inquiry-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inquiry-modal {
    background: var(--card);
    border-radius: 20px;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.inquiry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.inquiry-header h3 { font-size: 18px; margin: 0; }
.inquiry-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text2);
}

.inquiry-body {
    padding: 16px 20px;
}
.inquiry-body > p {
    font-size: 14px;
    color: var(--text2);
    margin-bottom: 16px;
}

.inquiry-field {
    margin-bottom: 14px;
}
.inquiry-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text2);
}
.inquiry-field select,
.inquiry-field input,
.inquiry-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.inquiry-field select:focus,
.inquiry-field input:focus,
.inquiry-field textarea:focus {
    border-color: #667eea;
}
.inquiry-field textarea { resize: vertical; }

.inquiry-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 8px;
}
.inquiry-submit:hover { opacity: 0.9; }
.inquiry-submit:disabled { opacity: 0.5; cursor: default; }

.inquiry-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.inquiry-link-btn {
    display: block;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    background: rgba(102,126,234,0.08);
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.inquiry-link-btn:hover { background: #e0e0ff; }
.inquiry-link-btn.secondary {
    background: var(--input-bg);
    color: var(--text2);
}
.inquiry-link-btn.secondary:hover { background: #eee; }

/* 문의 내역 */
.inquiry-item {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.inquiry-item-cat {
    font-size: 11px;
    color: #667eea;
    font-weight: 600;
}
.inquiry-item-content {
    font-size: 14px;
    margin: 4px 0;
    color: var(--text);
}
.inquiry-item-time {
    font-size: 11px;
    color: #bbb;
}
.inquiry-item-status {
    font-size: 12px;
    margin-top: 4px;
}

/* 답변 */
.inquiry-answer {
    margin-top: 8px;
    padding: 10px 12px;
    background: rgba(102,126,234,0.08);
    border-radius: 10px;
    font-size: 13px;
}
.inquiry-answer strong {
    color: #667eea;
    display: block;
    margin-bottom: 4px;
}
.inquiry-answer p {
    color: var(--text);
    margin: 0;
    line-height: 1.5;
}
.inquiry-answer-time {
    font-size: 11px;
    color: var(--text2);
    display: block;
    margin-top: 4px;
}

/* 문의 버튼 (네비바 옆) */
.inquiry-fab {
    position: fixed;
    bottom: 124px;
    right: 72px;
    z-index: 999;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card);
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.inquiry-fab:hover { background: var(--input-bg); }
/* ========== 아이템 제보 모달 ========== */

.report-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transition: background 0.3s;
}
.report-overlay.show {
    background: rgba(0,0,0,0.5);
}

.report-sheet {
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    background: var(--card);
    border-radius: 20px 20px 0 0;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    padding-bottom: env(safe-area-inset-bottom, 16px);
}
.report-overlay.show .report-sheet {
    transform: translateY(0);
}

.report-header {
    position: sticky;
    top: 0;
    background: var(--card);
    padding: 20px 20px 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    z-index: 1;
}
.report-header h3 {
    font-size: 20px;
    margin: 0 0 4px;
}
.report-header p {
    font-size: 13px;
    color: var(--text2);
    margin: 0;
}
.report-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text2);
    cursor: pointer;
}
.report-close:hover {
    background: #e0e0e0;
}

.report-form {
    padding: 16px 20px 20px;
}

.report-field {
    margin-bottom: 14px;
}
.report-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.report-field .required {
    color: #ff4757;
}

.report-field input[type="text"],
.report-field input[type="number"],
.report-field select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.report-field input:focus,
.report-field select:focus {
    border-color: #667eea;
}
.report-field input::placeholder {
    color: #bbb;
}

.report-field-row {
    display: flex;
    gap: 10px;
}
.report-field.half {
    flex: 1;
}

.report-divider {
    height: 1px;
    background: var(--input-bg);
    margin: 18px 0;
}

.report-section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
}

/* 상품권 라디오 버튼 */
.report-voucher-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.voucher-radio {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}
.voucher-radio:has(input:checked) {
    border-color: #667eea;
    background: rgba(102,126,234,0.08);
}
.voucher-radio.gumi:has(input:checked) {
    border-color: #f0ad4e;
    background: #fef8ec;
}
.voucher-radio.onnuri:has(input:checked) {
    border-color: #5cb85c;
    background: #eef8ee;
}
.voucher-radio input[type="radio"] {
    display: none;
}

/* 제출 버튼 */
.report-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.2s;
}
.report-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.report-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Store autocomplete in report */
.report-store-results { display:none; position:absolute; left:0; right:0; top:100%; background: var(--card); border:1px solid var(--border); border-radius:0 0 10px 10px; max-height:200px; overflow-y:auto; z-index:100; box-shadow:0 4px 12px rgba(0,0,0,0.1); }
.report-store-item { padding:10px 12px; font-size:13px; cursor:pointer; border-bottom:1px solid #f5f5f5; }
.report-store-item:active { background:rgba(102,126,234,0.08); }
/* ========== 리뷰 시스템 ========== */

.review-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.review-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.review-summary .avg-stars {
    color: #f0ad4e;
    font-size: 16px;
    letter-spacing: 1px;
}
.review-summary .avg-score {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.review-summary .review-count {
    font-size: 13px;
    color: var(--text2);
}

.review-write-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border: 1.5px solid #667eea;
    border-radius: 20px;
    background: var(--card);
    color: #667eea;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.review-write-btn:hover {
    background: #667eea;
    color: white;
}

/* 리뷰 목록 */
.review-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    max-height: 260px;
    overflow-y: auto;
}

.review-item {
    background: #f9f9fb;
    border-radius: 12px;
    padding: 12px;
}
.review-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.review-item-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.review-item-time {
    font-size: 11px;
    color: var(--text2);
}
.review-item-stars {
    color: #f0ad4e;
    font-size: 13px;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.review-item-body {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.5;
}
.review-item-photos {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
}
.review-item-photos img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
}
.review-item-voucher {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    background: #FFF3CD;
    color: #856404;
}

/* 리뷰 정렬 */
.review-sort {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}
.review-sort button {
    padding: 4px 10px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--card);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.review-sort button.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* 리뷰 작성 모달 */
.review-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.review-modal {
    background: var(--card);
    border-radius: 16px 16px 0 0;
    padding: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.review-modal h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
}
.review-modal .close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text2);
}

/* 별점 입력 */
.star-input {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 16px;
}
.star-input span {
    font-size: 32px;
    cursor: pointer;
    transition: transform 0.15s;
    color: #ddd;
}
.star-input span.active {
    color: #f0ad4e;
}
.star-input span:hover {
    transform: scale(1.2);
}

/* 폼 필드 */
.review-form-group {
    margin-bottom: 14px;
}
.review-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 6px;
}
.review-form-group textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px 12px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    resize: vertical;
    outline: none;
    font-family: inherit;
}
.review-form-group textarea:focus {
    border-color: #667eea;
}

/* 사진 업로드 */
.review-photo-upload {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.review-photo-upload .photo-add {
    width: 64px;
    height: 64px;
    border: 2px dashed #ccc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #bbb;
    cursor: pointer;
    transition: border-color 0.2s;
}
.review-photo-upload .photo-add:hover {
    border-color: #667eea;
}
.review-photo-preview {
    position: relative;
    width: 64px;
    height: 64px;
}
.review-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}
.review-photo-preview .remove-photo {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff4444;
    color: white;
    border: none;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 상품권 토글 */
.voucher-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #f9f9fb;
    border-radius: 10px;
}
.voucher-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}
.voucher-toggle label {
    font-size: 13px;
    color: var(--text2);
    margin: 0 !important;
}

/* 제출 버튼 */
.review-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s;
}
.review-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* ========== 코인 시스템 스타일 ========== */

/* 코인 잔액 카드 */
.coin-balance-card {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    border-radius: 16px;
    padding: 24px 20px;
    margin-bottom: 20px;
    color: #fff;
    text-align: center;
    box-shadow: 0 4px 16px rgba(247, 151, 30, 0.3);
}
.coin-balance-card .coin-icon { font-size: 36px; margin-bottom: 4px; }
.coin-balance-card .coin-amount { font-size: 36px; font-weight: 800; }
.coin-balance-card .coin-label { font-size: 13px; opacity: 0.9; margin-top: 2px; }
.coin-balance-card .coin-history-btn {
    margin-top: 12px;
    padding: 10px 20px;
    min-height: 44px;
    background: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.coin-balance-card .coin-history-btn:active { background: rgba(255,255,255,0.4); }

/* 코인 히스토리 모달 */
.coin-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.coin-modal {
    background: var(--card);
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.coin-modal-header {
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.coin-modal-header .close-btn {
    background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text2);
}
.coin-modal-body {
    overflow-y: auto;
    padding: 8px 0;
    flex: 1;
}
.coin-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #f8f8f8;
}
.coin-history-item:last-child { border-bottom: none; }
.coin-history-reason { font-size: 14px; font-weight: 500; color: var(--text); }
.coin-history-date { font-size: 11px; color: var(--text2); margin-top: 2px; }
.coin-history-amount { font-size: 16px; font-weight: 700; }
.coin-history-amount.earn { color: #f7971e; }
.coin-history-amount.spend { color: #e74c3c; }
.coin-history-empty {
    text-align: center; padding: 32px 20px; color: var(--text2); font-size: 14px;
}

/* 토스트 알림 */
.coin-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: #fff;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(247, 151, 30, 0.4);
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}
.coin-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
/* ========== 챗봇 UI ========== */

/* 인라인 모드 (탭 내) */
.chat-panel-inline {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--card);
}

/* 챗봇 헤더 */
.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.chat-header-title {
    font-size: 15px;
    font-weight: 700;
}
.chat-header-sub {
    font-size: 11px;
    opacity: 0.8;
}
.chat-close { display: none; }

/* 메시지 영역 */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--input-bg);
}

/* 메시지 버블 */
.chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-line;
    word-break: break-word;
}
.chat-msg.bot {
    background: var(--card);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.chat-msg.user {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* 빠른 버튼 */
.chat-quick-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 4px 0;
}
.chat-quick-btn {
    padding: 10px 14px;
    border-radius: 16px;
    min-height: 44px;
    border: 1.5px solid #667eea;
    background: var(--card);
    color: #667eea;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.chat-quick-btn:hover {
    background: #667eea;
    color: white;
}

/* 입력 영역 */
.chat-input-area {
    display: flex;
    padding: 10px 12px;
    background: var(--card);
    border-top: 1px solid var(--border);
    gap: 8px;
    flex-shrink: 0;
}
.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}
.chat-input:focus {
    border-color: #667eea;
}
.chat-input::placeholder {
    color: #bbb;
}
.chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.chat-send:hover { opacity: 0.9; }
.chat-send:disabled { opacity: 0.5; cursor: default; }

/* 타이핑 인디케이터 */
.typing {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    align-self: flex-start;
}
.typing span {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    animation: typing 1s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-4px); }
}
/* ========== 장터 (중고거래) 스타일 ========== */

/* 장터 필터 바 */
.market-filter-bar {
    display: flex; gap: 8px; padding: 8px 12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.market-filter-bar::-webkit-scrollbar { display: none; }
.market-filter-btn {
    flex-shrink: 0; padding: 10px 14px; border-radius: 20px; min-height: 44px;
    border: 1.5px solid var(--border); background: var(--card);
    font-size: 13px; cursor: pointer; white-space: nowrap;
    transition: all 0.2s;
}
.market-filter-btn.active {
    background: #4caf50; color: white; border-color: #4caf50;
}

/* 장터 카드 그리드 */
.market-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 10px; padding: 8px 12px;
}

/* 장터 카드 */
.market-card {
    background: var(--card); border-radius: 14px; overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08); cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.market-card:active {
    transform: scale(0.97);
}

.market-card-thumb {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    background: var(--input-bg); display: block;
}
.market-card-thumb-empty {
    width: 100%; aspect-ratio: 1;
    background: var(--input-bg); display: flex;
    align-items: center; justify-content: center;
    font-size: 40px; color: #ccc;
}

.market-card-body {
    padding: 10px 12px;
}

.market-card-title {
    font-size: 14px; font-weight: 600; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    margin-bottom: 4px;
}

.market-card-price {
    font-size: 17px; font-weight: 800; color: var(--text);
    margin-bottom: 6px;
}

.market-card-meta {
    display: flex; align-items: center; gap: 6px;
    font-size: 11px; color: var(--text2);
}

/* 거래 상태 뱃지 */
.market-status {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 700;
}
.market-status-selling {
    background: rgba(76,175,80,0.12); color: #2e7d32;
}
.market-status-reserved {
    background: rgba(255,193,7,0.12); color: #f57f17;
}
.market-status-sold {
    background: var(--input-bg); color: var(--text2);
}

/* 장터 상세 */
.market-detail {
    padding: 0 16px 16px;
}
.market-detail-photos {
    display: flex; gap: 8px; overflow-x: auto; padding: 12px 0;
    -webkit-overflow-scrolling: touch;
}
.market-detail-photos::-webkit-scrollbar { display: none; }
.market-detail-photos img {
    height: 240px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
}
.market-detail-title {
    font-size: 20px; font-weight: 800; margin-bottom: 8px;
}
.market-detail-price {
    font-size: 24px; font-weight: 900; color: var(--text); margin-bottom: 12px;
}
.market-detail-info {
    font-size: 13px; color: var(--text2); line-height: 1.8; margin-bottom: 16px;
}
.market-detail-desc {
    font-size: 14px; line-height: 1.7; color: var(--text); margin-bottom: 20px;
    white-space: pre-wrap;
}
.market-detail-actions {
    display: flex; gap: 10px;
}
.market-detail-actions button {
    flex: 1; padding: 14px; border: none; border-radius: 12px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    transition: transform 0.1s;
}
.market-detail-actions button:active { transform: scale(0.97); }

.market-chat-btn {
    background: #667eea; color: white;
}
.market-status-btn {
    background: var(--input-bg); color: var(--text);
}

/* 장터 글쓰기 모달 추가 */
.market-photo-upload {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
}
.market-photo-upload .photo-slot {
    width: 80px; height: 80px; border-radius: 10px;
    border: 2px dashed var(--border); display: flex;
    align-items: center; justify-content: center;
    font-size: 24px; color: #ccc; cursor: pointer;
    overflow: hidden; position: relative;
}
.market-photo-upload .photo-slot img {
    width: 100%; height: 100%; object-fit: cover;
}
.market-photo-upload .photo-slot .remove-photo {
    position: absolute; top: 2px; right: 2px;
    width: 20px; height: 20px; border-radius: 50%;
    background: rgba(0,0,0,0.6); color: white;
    font-size: 12px; display: flex; align-items: center;
    justify-content: center; cursor: pointer;
}

/* 장터 카드 sold 상태 */
.market-card.sold {
    opacity: 0.6;
}
.market-card.sold .market-card-thumb {
    filter: grayscale(0.5);
}
/* ========== 💼 구인구직 시스템 ========== */

.job-container { padding: 12px 16px; }

/* 필터 바 */
.job-filter-bar {
    display: flex; gap: 8px; margin-bottom: 12px; overflow-x: auto;
    padding-bottom: 4px;
}
.job-filter-btn {
    padding: 10px 14px; border-radius: 16px; border: 1.5px solid var(--border); min-height: 44px;
    background: var(--card); font-size: 13px; cursor: pointer; white-space: nowrap;
    transition: all 0.2s;
}
.job-filter-btn.active { background: #795548; color: white; border-color: #795548; }

/* 글쓰기 + 지도보기 버튼 */
.job-action-bar {
    display: flex; gap: 8px; margin-bottom: 12px;
}
.job-write-btn {
    flex: 1; padding: 12px; border-radius: 12px; border: none;
    background: #1a1a1a; color: white; font-size: 14px; font-weight: 700;
    cursor: pointer; text-align: center;
}
.job-map-btn {
    padding: 12px 16px; border-radius: 12px; border: 1.5px solid #795548;
    background: var(--card); color: #795548; font-size: 14px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
}

/* 카드 */
.job-card {
    background: var(--card); border-radius: 14px; padding: 14px 16px;
    margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    cursor: pointer; transition: transform 0.1s;
}
.job-card:active { transform: scale(0.98); }
.job-card.closed { opacity: 0.5; }

.job-card-top {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.job-badge {
    display: inline-block; padding: 3px 10px; border-radius: 10px;
    font-size: 12px; font-weight: 700;
}
.job-badge.hiring { background: rgba(244,67,54,0.12); color: #c62828; }
.job-badge.seeking { background: rgba(33,150,243,0.12); color: #1565c0; }
.job-badge-closed {
    display: inline-block; padding: 3px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 600; background: #e0e0e0; color: var(--text2);
}

.job-card-title {
    font-size: 15px; font-weight: 700; color: var(--text);
    margin-bottom: 6px; line-height: 1.3;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.job-card-info {
    display: flex; flex-wrap: wrap; gap: 6px 12px;
    font-size: 12px; color: var(--text2); margin-bottom: 6px;
}
.job-card-info span { display: flex; align-items: center; gap: 3px; }

.job-card-footer {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11px; color: var(--text2);
}

/* 상세 모달 */
.job-detail { padding: 16px; }
.job-detail-header { margin-bottom: 16px; }
.job-detail-title { font-size: 18px; font-weight: 700; margin: 8px 0; }
.job-detail-meta { font-size: 13px; color: var(--text2); margin-bottom: 12px; }
.job-detail-section {
    background: var(--input-bg); border-radius: 12px; padding: 14px;
    margin-bottom: 12px;
}
.job-detail-section h4 {
    font-size: 13px; color: #795548; margin-bottom: 8px;
}
.job-detail-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 6px 0; font-size: 14px; border-bottom: 1px solid #f0f0f0;
}
.job-detail-row:last-child { border-bottom: none; }
.job-detail-row .label { color: var(--text2); font-size: 13px; }
.job-detail-row .value { font-weight: 600; color: var(--text); }

.job-detail-desc {
    font-size: 14px; line-height: 1.6; color: var(--text);
    padding: 14px; background: var(--card); border-radius: 12px;
    border: 1px solid #f0f0f0; margin-bottom: 12px;
    white-space: pre-wrap;
}

.job-detail-contact {
    background: #667eea; color: white; border-radius: 12px;
    padding: 14px; text-align: center; font-size: 15px; font-weight: 700;
    cursor: pointer;
}

.job-close-btn {
    display: block; width: 100%; padding: 12px; margin-top: 8px;
    border: none; background: var(--input-bg); border-radius: 12px;
    font-size: 14px; color: var(--text2); cursor: pointer; font-weight: 600;
}

/* 글쓰기 폼 */
.job-form-group { margin-bottom: 14px; }
.job-form-group label {
    display: block; font-size: 13px; font-weight: 600;
    margin-bottom: 6px; color: var(--text);
}
.job-form-group input,
.job-form-group select,
.job-form-group textarea {
    width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
    border-radius: 10px; font-size: 14px; outline: none;
    box-sizing: border-box;
}
.job-form-group textarea { resize: vertical; min-height: 80px; }
.job-form-group input:focus,
.job-form-group select:focus,
.job-form-group textarea:focus { border-color: #795548; }

.job-form-inline {
    display: flex; gap: 8px; align-items: center;
}
.job-form-inline select { flex: 0 0 auto; width: auto; }
.job-form-inline input { flex: 1; }

/* 요일 선택 */
.job-day-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.job-day-btn {
    width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--border);
    background: var(--card); font-size: 13px; cursor: pointer; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.job-day-btn.active { background: #795548; color: white; border-color: #795548; }

/* 자동완성 */
.job-autocomplete {
    position: absolute; top: 100%; left: 0; right: 0;
    max-height: 180px; overflow-y: auto; background: var(--card);
    border: 1px solid var(--border); border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 100;
    display: none;
}
.job-autocomplete-item {
    padding: 10px 12px; cursor: pointer; font-size: 13px;
    border-bottom: 1px solid #f5f5f5;
}
.job-autocomplete-item:hover { background: var(--input-bg); }
.job-autocomplete-item .addr { font-size: 11px; color: var(--text2); }

.job-empty {
    text-align: center; padding: 40px 20px; color: var(--text2);
}
.job-empty-icon { font-size: 48px; margin-bottom: 12px; }
.job-empty-title { font-size: 16px; font-weight: 700; color: var(--text2); margin-bottom: 6px; }
.job-empty-desc { font-size: 13px; }
/* ========== DM (1:1 메시지) 스타일 ========== */

/* DM 목록 */
.dm-list {
    padding: 8px 12px;
}
.dm-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 12px; background: var(--card); border-radius: 14px;
    margin-bottom: 8px; cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: background 0.15s;
}
.dm-item:active { background: #f8f8f8; }

.dm-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: #667eea; color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 700; flex-shrink: 0;
}

.dm-info { flex: 1; min-width: 0; }
.dm-name {
    font-size: 15px; font-weight: 600; color: var(--text);
    margin-bottom: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dm-preview {
    font-size: 13px; color: var(--text2);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.dm-meta {
    text-align: right; flex-shrink: 0;
}
.dm-time {
    font-size: 11px; color: var(--text2); margin-bottom: 4px;
}
.dm-unread {
    display: inline-block; min-width: 20px; height: 20px;
    border-radius: 10px; background: #f44336; color: white;
    font-size: 11px; font-weight: 700; text-align: center;
    line-height: 20px; padding: 0 5px;
}

/* DM 채팅 화면 */
.dm-chat-container {
    display: flex; flex-direction: column;
    height: calc(100vh - 112px);
    background: #b2c7d9;
}
.dm-chat-header {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px; background: var(--card);
    border-bottom: 1px solid var(--border);
}
.dm-chat-back {
    font-size: 20px; cursor: pointer; padding: 4px;
}
.dm-chat-name {
    font-size: 16px; font-weight: 700;
}
.dm-chat-messages {
    flex: 1; overflow-y: auto; padding: 12px;
    display: flex; flex-direction: column; gap: 8px;
}
.dm-chat-input-area {
    display: flex; gap: 8px; padding: 8px 12px;
    background: var(--card); border-top: 1px solid var(--border);
}
.dm-chat-input {
    flex: 1; padding: 10px 14px;
    border: 1px solid var(--border); border-radius: 20px;
    font-size: 14px; outline: none;
}
.dm-chat-send {
    width: 40px; height: 40px; border-radius: 50%;
    border: none; background: #667eea; color: white;
    font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* DM 빈 상태 */
.dm-empty {
    text-align: center; padding: 40px 20px; color: var(--text2);
}
.dm-empty-icon { font-size: 48px; margin-bottom: 12px; }

/* MY 페이지 DM 뱃지 */
.dm-badge {
    display: inline-block; min-width: 18px; height: 18px;
    border-radius: 9px; background: #f44336; color: white;
    font-size: 10px; font-weight: 700; text-align: center;
    line-height: 18px; padding: 0 4px; margin-left: 6px;
    vertical-align: middle;
}

/* 장터 게시글 내 채팅 버튼 */
.market-dm-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 20px; background: #667eea; color: white;
    border: none; border-radius: 12px; font-size: 14px;
    font-weight: 700; cursor: pointer; transition: transform 0.1s;
}
.market-dm-btn:active { transform: scale(0.96); }
/* ========== 알림 시스템 v2 ========== */

/* 헤더 벨 아이콘 */
.notif-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.3);
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-left: 6px;
}
.notif-bell:active { background: rgba(255,255,255,.35); }

.notif-badge {
    position: absolute; top: -4px; right: -4px;
    min-width: 18px; height: 18px;
    border-radius: 9px;
    background: #f44336; color: white;
    font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(244,67,54,.4);
}
.notif-badge:empty, .notif-badge[data-count="0"] { display: none; }

/* 하단 네비 빨간 점 */
.nav-notif-dot {
    position: absolute; top: 4px; right: 14px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #f44336;
    display: none;
}
.nav-notif-dot.show { display: block; }

/* 오버레이 */
.notif-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.3);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.notif-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

/* 알림 패널 (슬라이드 다운) */
.notif-panel {
    position: fixed;
    top: 0; left: 0; right: 0;
    max-height: 70vh;
    background: var(--input-bg);
    border-radius: 0 0 20px 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,.15);
    z-index: 9999;
    transform: translateY(-100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: env(safe-area-inset-top, 0);
}
.notif-panel.open {
    transform: translateY(0);
}

.notif-panel-body {
    padding-bottom: 16px;
}

/* 알림 헤더 */
.notif-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 16px 8px;
    position: sticky; top: 0;
    background: var(--input-bg);
    z-index: 1;
}
.notif-header h3 { margin: 0; font-size: 17px; font-weight: 700; }
.notif-mark-all {
    background: none; border: none;
    color: #667eea; font-size: 13px;
    cursor: pointer; font-weight: 600;
    padding: 4px 8px;
}

/* 알림 목록 */
.notif-list {
    padding: 0 12px 12px;
}

.notif-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 12px;
    background: var(--card);
    border-radius: 14px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s, transform 0.1s;
}
.notif-item:active {
    background: var(--input-bg);
    transform: scale(0.98);
}
.notif-item.read { opacity: 0.5; }

.notif-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.notif-body { flex: 1; min-width: 0; }
.notif-msg {
    font-size: 14px; color: var(--text); line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.notif-time { font-size: 11px; color: var(--text2); margin-top: 3px; }

.notif-unread-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #667eea;
    flex-shrink: 0;
    margin-top: 8px;
}
.notif-unread-dot.read { display: none; }

.notif-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text2);
    font-size: 14px;
}
/* ========== 초대장 생성기 스타일 ========== */
.invite-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--input-bg); z-index: 9000;
    display: flex; flex-direction: column;
    animation: invSlideUp .25s ease;
}
@keyframes invSlideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.invite-header {
    display: flex; align-items: center; padding: 14px 16px;
    background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    position: sticky; top: 0; z-index: 10;
}
.invite-header .inv-back { font-size: 22px; cursor: pointer; margin-right: 8px; color: var(--text); background: none; border: none; padding: 8px 12px; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 20; -webkit-tap-highlight-color: rgba(0,0,0,0.1); }
.invite-header .inv-title { font-size: 16px; font-weight: 700; flex: 1; }
.invite-header .inv-step { font-size: 12px; color: var(--text2); }

.invite-body { flex: 1; overflow-y: auto; padding: 20px 16px; }

/* 카테고리 카드 */
.inv-cat-grid { display: flex; flex-direction: column; gap: 10px; }
.inv-cat-card {
    display: flex; align-items: center; gap: 14px;
    padding: 16px; background: var(--card); border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); cursor: pointer;
    transition: transform .1s;
}
.inv-cat-card:active { transform: scale(0.97); }
.inv-cat-card .cat-emoji { font-size: 28px; }
.inv-cat-card .cat-info { flex: 1; }
.inv-cat-card .cat-name { font-size: 15px; font-weight: 600; }
.inv-cat-card .cat-desc { font-size: 12px; color: var(--text2); margin-top: 2px; }
.inv-cat-card .cat-arrow { color: #ccc; font-size: 18px; }

/* 커뮤니티 목록 */
.inv-comm-list { display: flex; flex-direction: column; gap: 8px; }
.inv-comm-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px; background: var(--card); border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); cursor: pointer;
    transition: transform .1s;
}
.inv-comm-item:active { transform: scale(0.97); }
.inv-comm-item .comm-icon { font-size: 24px; }
.inv-comm-item .comm-name { font-size: 14px; font-weight: 600; }
.inv-comm-item .comm-sub { font-size: 11px; color: var(--text2); }

/* 커스텀 입력 */
.inv-form { display: flex; flex-direction: column; gap: 20px; }
.inv-form label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 4px; display: block; }
.inv-form input[type="text"] {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px;
    font-size: 14px; outline: none; transition: border-color .2s;
}
.inv-form input[type="text"]:focus { border-color: #667eea; }

.inv-theme-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.inv-theme-btn {
    width: 52px; height: 52px; border-radius: 14px; border: 3px solid transparent;
    cursor: pointer; transition: border-color .2s, transform .1s;
}
.inv-theme-btn.active { border-color: #333; transform: scale(1.1); }
.inv-theme-btn:active { transform: scale(0.95); }

.inv-next-btn {
    width: 100%; padding: 14px; border: none; border-radius: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white; font-size: 15px; font-weight: 700; cursor: pointer;
    margin-top: 12px; transition: opacity .2s;
}
.inv-next-btn:disabled { opacity: 0.4; cursor: default; }

/* 미리보기 */
.inv-preview-wrap {
    display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.inv-preview-canvas {
    border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-width: 100%; height: auto;
}

/* 공유 버튼 */
.inv-share-row { display: flex; gap: 10px; width: 100%; }
.inv-share-btn {
    flex: 1; padding: 12px; border: none; border-radius: 12px;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: transform .1s;
}
.inv-share-btn:active { transform: scale(0.96); }
.inv-share-btn.link { background: #e8eaf6; color: #3949ab; }
.inv-share-btn.save { background: rgba(76,175,80,0.12); color: #2e7d32; }
.inv-share-btn.kakao { background: #FEE500; color: #3c1e1e; }

/* Custom community create */
.cust-type-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.cust-type-btn { padding: 8px 14px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--card); font-size: 13px; cursor: pointer; transition: all 0.2s; }
.cust-type-btn.active { border-color: #667eea; background: #eef0ff; color: #667eea; font-weight: 600; }
.inv-cat-card[data-id="custom"] { border: 1.5px dashed #667eea; background: linear-gradient(135deg, #f8f9ff, #eef0ff); }
.inv-cat-card[data-id="custom"] .cat-name { color: #667eea; }
.inv-cat-card[data-id="custom"] .cat-desc { color: var(--text2); }
/* ========== 홈 피드 ========== */
.hf-wrap {
    padding: 0 0 20px;
    min-height: 100%;
    background: var(--input-bg);
}
.hf-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 32px 20px 24px;
    border-radius: 0 0 24px 24px;
}
.hf-greeting {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
}
.hf-region {
    font-size: 14px;
    opacity: 0.85;
}
.hf-banner {
    margin: -12px 16px 0;
    position: relative;
    z-index: 1;
}
.hf-banner-inner {
    background: var(--card);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 13px;
    color: var(--text2);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    line-height: 1.5;
}
.hf-section {
    margin-top: 20px;
    padding: 0 16px;
}
.hf-section-title {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text);
}
.hf-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.hf-scroll::-webkit-scrollbar { display: none; }
.hf-card {
    flex-shrink: 0;
    width: 140px;
    background: var(--card);
    border-radius: 14px;
    padding: 16px 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.hf-card:active {
    transform: scale(0.97);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.hf-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}
.hf-card-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}
.hf-card-sub {
    font-size: 12px;
    color: var(--text2);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hf-post {
    background: var(--card);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    cursor: pointer;
    transition: transform 0.2s;
}
.hf-post:active { transform: scale(0.99); }
.hf-post-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hf-post-meta {
    font-size: 12px;
    color: var(--text2);
    margin-top: 4px;
}
.hf-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.hf-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--card);
    border: 1.5px solid #667eea;
    color: #667eea;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.hf-tag:active {
    background: #667eea;
    color: white;
}
.hf-empty {
    text-align: center;
    color: var(--text2);
    font-size: 14px;
    padding: 20px 0;
}
/* Skeleton */
.hf-skeleton-title {
    width: 120px; height: 20px;
    background: var(--border); border-radius: 8px;
    margin-bottom: 12px;
    animation: hf-pulse 1.2s infinite;
}
.hf-skeleton-card {
    flex-shrink: 0;
    width: 140px; height: 100px;
    background: var(--border); border-radius: 14px;
    animation: hf-pulse 1.2s infinite;
}
.hf-skeleton-post {
    height: 56px;
    background: var(--border); border-radius: 12px;
    margin-bottom: 8px;
    animation: hf-pulse 1.2s infinite;
}
@keyframes hf-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== 공연/축제 피드 ===== */
.pf-scroll {
    display: flex; gap: 12px; overflow-x: auto; padding: 4px 0 8px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.pf-scroll::-webkit-scrollbar { display: none; }
.pf-card {
    flex-shrink: 0; width: 160px; scroll-snap-align: start;
    background: var(--card); border: 1px solid var(--border); border-radius: 14px;
    overflow: hidden; cursor: pointer; transition: transform 0.15s;
}
.pf-card:active { transform: scale(0.97); }
.pf-poster-wrap {
    position: relative; width: 100%; height: 200px; background: var(--input-bg);
    display: flex; align-items: center; justify-content: center;
}
.pf-poster { width: 100%; height: 100%; object-fit: cover; }
.pf-poster-fallback {
    font-size: 48px; display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%; color: var(--text2);
}
.pf-state {
    position: absolute; top: 8px; left: 8px; padding: 3px 8px;
    border-radius: 8px; font-size: 11px; font-weight: 700;
}
.pf-state-active { background: #e74c3c; color: #fff; }
.pf-state-upcoming { background: #3498db; color: #fff; }
.pf-info { padding: 10px; }
.pf-name {
    font-size: 13px; font-weight: 700; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    margin-bottom: 4px;
}
.pf-meta { font-size: 11px; color: var(--text2); margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-genre {
    display: inline-block; margin-top: 4px; padding: 2px 6px;
    background: var(--input-bg); border-radius: 6px;
    font-size: 10px; color: var(--text2);
}
.pf-skeleton-card {
    flex-shrink: 0; width: 160px; height: 280px;
    background: var(--border); border-radius: 14px;
    animation: hf-pulse 1.2s infinite;
}

/* ===== 열차 시간표 피드 ===== */
.tf-tabs {
    display: flex; gap: 8px; margin-bottom: 8px; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tf-tabs::-webkit-scrollbar { display: none; }
.tf-tab {
    flex-shrink: 0; padding: 6px 14px; border-radius: 20px;
    border: 1px solid var(--border); background: var(--card);
    color: var(--text2); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all 0.15s;
}
.tf-tab-active {
    background: var(--accent, #667eea); color: #fff;
    border-color: var(--accent, #667eea);
}
.tf-scroll {
    display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 8px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.tf-scroll::-webkit-scrollbar { display: none; }
.tf-card {
    flex-shrink: 0; width: 150px; padding: 14px 12px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 14px; scroll-snap-align: start;
    transition: transform 0.15s;
}
.tf-card-past { opacity: 0.45; }
.tf-card-next {
    border-color: var(--accent, #667eea);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent, #667eea) 25%, transparent);
}
.tf-train-type { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.tf-time { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.tf-route { font-size: 11px; color: var(--text2); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-price { font-size: 12px; color: var(--accent, #667eea); font-weight: 700; }
.tf-skeleton-card {
    flex-shrink: 0; width: 150px; height: 110px;
    background: var(--border); border-radius: 14px;
    animation: hf-pulse 1.2s infinite;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { font-family: -apple-system, 'Noto Sans KR', sans-serif; overscroll-behavior: none; overflow: hidden; height: 100%; touch-action: pan-x pan-y; }

.header { position: relative;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white; padding: 12px 16px;
position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
display: flex; align-items: center; justify-content: space-between;
}
.header h1 { font-size: 18px; }
.header .stats { font-size: 12px; opacity: 0.9; }

.filter-bar {
position: fixed; left: 0; right: 0; z-index: 999;
background: var(--card); padding: 8px 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
display: flex; gap: 8px; flex-wrap: nowrap; align-items: center;
}
.filter-bar input[type="text"] {
flex: 1 1 0; min-width: 0; padding: 8px 12px;
border: 2px solid var(--border); border-radius: 20px;
font-size: 14px; outline: none;
}
.filter-bar input:focus { border-color: #667eea; }

.filter-btn {
padding: 8px 14px; border-radius: 16px;
border: 1.5px solid var(--border); background: var(--card);
font-size: 13px; cursor: pointer; white-space: nowrap;
transition: all 0.2s; min-height: 44px;
}
.filter-btn.active { background: #667eea; color: white; border-color: #667eea; }
.filter-btn:hover { border-color: #667eea; }
.filter-btn.filter-icon { padding: 8px; min-width: 36px; min-height: 36px; font-size: 16px; text-align: center; flex-shrink: 0; }

.coupon-badge {
display: inline-block; padding: 2px 8px; border-radius: 10px;
font-size: 11px; font-weight: bold;
}
.badge-gumi { background: #FFF3CD; color: #856404; }
.badge-permit { background: #D4EDDA; color: #155724; }
.badge-onnuri { background: #D4EDDA; color: #155724; }

#map { position: fixed; top: 128px; left: 0; right: 0; bottom: 56px; z-index: 1; } /* top overridden by JS */

.my-location {
position: fixed; bottom: 68px; right: 16px; z-index: 999;
width: 48px; height: 48px; border-radius: 50%;
background: var(--card); border: none; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
cursor: pointer; font-size: 20px;
display: flex; align-items: center; justify-content: center;
}
.my-location:hover { background: var(--input-bg); }

.info-panel {
position: fixed; bottom: 0; left: 0; right: 0; z-index: 1001;
background: var(--card); border-radius: 16px 16px 0 0;
box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
transform: translateY(100%);
transition: transform 0.35s cubic-bezier(.4,0,.2,1);
height: 55vh; max-height: 90vh;
display: flex; flex-direction: column;
will-change: transform;
}
.info-panel.show { transform: translateY(0); }
.info-panel.fullscreen { height: 92vh; border-radius: 0; }
.info-panel .panel-drag-handle {
width: 36px; height: 4px; background: #ddd; border-radius: 2px;
margin: 10px auto 0; flex-shrink: 0;
}
.info-panel .panel-header {
display: flex; align-items: center; justify-content: space-between;
padding: 8px 16px 0; flex-shrink: 0; gap: 4px;
}
.info-panel .panel-header button {
background: none; border: none; font-size: 15px; cursor: pointer;
color: var(--text2); padding: 8px; min-width: 44px; min-height: 44px;
display: flex; align-items: center; justify-content: center;
white-space: nowrap; flex-shrink: 0;
}
.info-panel .panel-body {
flex: 1; overflow-y: auto; padding: 0 16px 24px;
-webkit-overflow-scrolling: touch;
}
.info-panel .name { font-size: 20px; font-weight: 800; margin-bottom: 6px; color: var(--text); }
.info-panel .addr {
font-size: 14px; color: #667eea; margin-bottom: 8px; cursor: pointer;
display: flex; align-items: center; gap: 4px;
}
.info-panel .addr:active { opacity: 0.6; }
.info-panel .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.info-panel .tag {
padding: 4px 10px; border-radius: 12px;
font-size: 12px; background: var(--input-bg); color: var(--text2);
}
.info-panel .distance { font-size: 13px; color: #667eea; font-weight: 600; margin-bottom: 16px; }

.detail-actions {
display: flex; gap: 0; border-top: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
margin: 12px -16px; padding: 0;
}
.detail-action-btn {
flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
padding: 14px 8px; background: none; border: none; border-right: 1px solid #f0f0f0;
cursor: pointer; font-size: 12px; color: var(--text); font-weight: 500;
min-height: 44px; transition: background 0.15s;
}
.detail-action-btn:last-child { border-right: none; }
.detail-action-btn:active { background: #f8f8f8; }
.detail-action-btn .action-icon { font-size: 20px; }
.detail-action-btn.disabled { opacity: 0.35; pointer-events: none; }
.detail-action-btn.fav-active { color: #f59e0b; }

/* ===== 상세 패널 카드 스타일 ===== */
.panel-card {
background: var(--card); border-radius: 14px;
box-shadow: 0 1px 4px rgba(0,0,0,0.07);
padding: 14px 16px; margin-bottom: 12px;
border: 1px solid #f0f0f0;
}
.panel-card-title {
font-size: 14px; font-weight: 700; color: var(--text);
margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.panel-quick-actions {
display: flex; gap: 8px; margin-bottom: 12px;
}
.panel-quick-actions button {
flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
padding: 10px 4px; border-radius: 12px; border: 1px solid #f0f0f0;
background: var(--input-bg); cursor: pointer; font-size: 11px; color: var(--text); font-weight: 500;
transition: all 0.15s;
}
.panel-quick-actions button:active { background: var(--input-bg); transform: scale(0.97); }
.panel-quick-actions button .qa-icon { font-size: 20px; }
.panel-quick-actions button.disabled { opacity: 0.3; pointer-events: none; }
.panel-quick-actions button.fav-active { border-color: #f59e0b; background: #fffbeb; color: #b45309; }
.panel-quick-actions button.dangol-active { border-color: #667eea; background: #f0f4ff; color: #4a5aba; }

.review-summary-bar {
display: flex; align-items: center; gap: 12px; margin-bottom: 4px;
}
.review-summary-bar .bar-label { font-size: 13px; min-width: 28px; text-align: center; }
.review-summary-bar .bar-track {
flex: 1; height: 8px; border-radius: 4px; background: var(--input-bg); overflow: hidden;
}
.review-summary-bar .bar-fill {
height: 100%; border-radius: 4px; transition: width 0.4s ease;
}
.review-summary-bar .bar-pct { font-size: 13px; font-weight: 700; min-width: 40px; text-align: right; }
.bar-fill.taste { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.bar-fill.revisit { background: linear-gradient(90deg, #f472b6, #ec4899); }
.review-summary-total { font-size: 12px; color: var(--text2); text-align: right; margin-top: 4px; }

.price-info-item {
display: flex; justify-content: space-between; align-items: center;
padding: 8px 0; border-bottom: 1px solid #f8f8f8;
}
.price-info-item:last-child { border-bottom: none; }
.price-info-name { font-size: 14px; color: var(--text); }
.price-info-right { text-align: right; }
.price-info-val { font-size: 15px; font-weight: 700; color: var(--text); }
.price-info-count { font-size: 11px; color: var(--text2); }

.no-data-hint { font-size: 13px; color: #bbb; text-align: center; padding: 8px 0; }

/* 다크모드 카드 */
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .panel-card { background: #1e1e1e; border-color: #333; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
html:not([data-theme="light"]) .panel-card-title { color: #e0e0e0; }
html:not([data-theme="light"]) .panel-quick-actions button { background: #2a2a2a; border-color: var(--text); color: #ccc; }
html:not([data-theme="light"]) .panel-quick-actions button:active { background: #333; }
html:not([data-theme="light"]) .panel-quick-actions button.fav-active { background: #3d2e00; border-color: #f59e0b; color: #fbbf24; }
html:not([data-theme="light"]) .panel-quick-actions button.dangol-active { background: #1e2240; border-color: #667eea; color: #8b9cf7; }
html:not([data-theme="light"]) .review-summary-bar .bar-track { background: #333; }
html:not([data-theme="light"]) .price-info-item { border-bottom-color: #333; }
html:not([data-theme="light"]) .price-info-name { color: #ccc; }
html:not([data-theme="light"]) .price-info-val { color: #eee; }
html:not([data-theme="light"]) .info-panel { background: #121212; }
html:not([data-theme="light"]) .info-panel .name { color: #e0e0e0; }
html:not([data-theme="light"]) .info-panel .panel-header button { color: var(--text2); }
html:not([data-theme="light"]) .detail-actions { border-color: #333; }
html:not([data-theme="light"]) .detail-action-btn { color: #ccc; }
html:not([data-theme="light"]) .detail-action-btn:active { background: #2a2a2a; }
}

.detail-section-title {
font-size: 15px; font-weight: 700; margin: 20px 0 10px; color: var(--text);
display: flex; align-items: center; gap: 6px;
}
.facility-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.facility-tag {
padding: 6px 12px; border-radius: 16px; font-size: 12px;
background: #f0f4ff; color: #4a5aba; border: 1px solid #e0e5f5;
display: inline-flex; align-items: center; gap: 4px;
}
.facility-tag .tag-count { font-size: 10px; color: var(--text2); }
.tag-report-btn {
padding: 6px 14px; border-radius: 16px; font-size: 12px;
background: var(--card); color: #667eea; border: 1.5px dashed #667eea;
cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
}

/* ===== 가게 태그 시스템 ===== */
.tag-filter-bar {
position: fixed; left: 0; right: 0; z-index: 998;
background: rgba(255,255,255,0.95); padding: 6px 12px;
display: flex; gap: 6px; overflow-x: auto;
-webkit-overflow-scrolling: touch; scrollbar-width: none;
backdrop-filter: blur(8px);
}
.tag-filter-bar::-webkit-scrollbar { display: none; }
.tag-filter-chip {
flex-shrink: 0; padding: 6px 12px; border-radius: 16px;
font-size: 12px; font-weight: 500; cursor: pointer;
background: #f1f3f5; color: #495057; border: 1.5px solid transparent;
transition: all 0.2s; white-space: nowrap; min-height: 32px;
display: inline-flex; align-items: center; gap: 3px;
}
.tag-filter-chip.active { background: #667eea; color: white; border-color: #667eea; }
.tag-filter-chip:active { transform: scale(0.95); }

.merchant-tags-section { margin: 12px 0; }
.merchant-tags-title {
font-size: 14px; font-weight: 700; color: var(--text);
margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.merchant-tags-list { display: flex; flex-wrap: wrap; gap: 6px; }
.merchant-tag-chip {
padding: 6px 12px; border-radius: 16px; font-size: 12px;
background: #f0f4ff; color: #4a5aba; border: 1.5px solid #e0e5f5;
cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
transition: all 0.15s; min-height: 32px;
}
.merchant-tag-chip:active { transform: scale(0.95); }
.merchant-tag-chip.voted { background: #667eea; color: white; border-color: #667eea; }
.merchant-tag-chip .mtag-count { font-size: 10px; opacity: 0.7; }
.merchant-tag-add {
padding: 6px 12px; border-radius: 16px; font-size: 12px;
background: var(--card); color: #667eea; border: 1.5px dashed #667eea;
cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
min-height: 32px;
}
.merchant-tag-add:active { background: #f0f4ff; }

.mtag-modal-overlay {
position: fixed; inset: 0; z-index: 1100;
display: flex; align-items: flex-end; justify-content: center;
}
.mtag-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.mtag-modal-panel {
position: relative; z-index: 1; width: 100%; max-width: 420px;
background: var(--card); border-radius: 16px 16px 0 0; padding: 20px;
max-height: 70vh; overflow-y: auto; animation: slideUp 0.3s ease;
}
.mtag-category { margin-bottom: 14px; }
.mtag-category-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.mtag-category-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mtag-option {
padding: 8px 14px; border-radius: 16px; border: 1.5px solid var(--border);
background: var(--card); cursor: pointer; font-size: 13px; transition: all 0.15s;
}
.mtag-option.selected { border-color: #667eea; background: #f0f4ff; color: #667eea; font-weight: 600; }
.mtag-option:active { transform: scale(0.95); }

@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .tag-filter-bar { background: rgba(30,30,46,0.95); }
html:not([data-theme="light"]) .tag-filter-chip { background: var(--border); color: var(--text2); }
html:not([data-theme="light"]) .tag-filter-chip.active { background: #667eea; color: white; }
html:not([data-theme="light"]) .merchant-tags-title { color: var(--text); }
html:not([data-theme="light"]) .merchant-tag-chip { background: var(--border); color: var(--text); border-color: var(--border); }
html:not([data-theme="light"]) .merchant-tag-chip.voted { background: #667eea; color: white; }
html:not([data-theme="light"]) .merchant-tag-add { background: var(--card); color: #667eea; border-color: #667eea; }
html:not([data-theme="light"]) .mtag-modal-panel { background: var(--card); color: var(--text); }
html:not([data-theme="light"]) .mtag-category-title { color: var(--text); }
html:not([data-theme="light"]) .mtag-option { background: var(--card); border-color: var(--border); color: var(--text); }
html:not([data-theme="light"]) .mtag-option.selected { background: var(--input-bg); border-color: #667eea; color: #667eea; }
}
.tag-report-btn:active { background: #f0f4ff; }
.tag-picker-overlay {
position: fixed; inset: 0; z-index: 1100; display: flex;
align-items: flex-end; justify-content: center;
}
.tag-picker-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.tag-picker-panel {
position: relative; z-index: 1; width: 100%; max-width: 420px;
background: var(--card); border-radius: 16px 16px 0 0; padding: 20px;
animation: slideUp 0.3s ease;
}
.tag-picker-grid {
display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px;
}
.tag-picker-item {
padding: 10px 6px; border-radius: 12px; border: 1.5px solid var(--border);
background: var(--card); cursor: pointer; text-align: center; font-size: 13px;
transition: all 0.15s;
}
.tag-picker-item.selected { border-color: #667eea; background: #f0f4ff; }
.tag-picker-item:active { transform: scale(0.95); }

.store-toast {
position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
padding: 10px 20px; background: #333; color: white; border-radius: 20px;
font-size: 13px; z-index: 9999; opacity: 0; transition: opacity 0.3s;
pointer-events: none;
}
.store-toast.show { opacity: 1; }

/* ===== 단골방 ===== */
.dangol-panel {
position:fixed;inset:0;z-index:1100;background: var(--card);
transform:translateX(100%);transition:transform .3s ease;
display:flex;flex-direction:column;
}
.dangol-panel.show { transform:translateX(0); }
.dangol-header {
display:flex;align-items:center;gap:8px;padding:12px 16px;
background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;
min-height:56px;
}
.dangol-back { background:none;border:none;color:#fff;font-size:16px;cursor:pointer;padding:8px;min-width:44px;min-height:44px; }
.dangol-title { flex:1;font-size:17px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.dangol-follow-btn {
padding:6px 14px;border-radius:20px;border:1.5px solid rgba(255,255,255,.5);
background:rgba(255,255,255,.15);color:#fff;font-size:13px;font-weight:600;
cursor:pointer;white-space:nowrap;min-height:36px;
}
.dangol-follow-btn.following { background:rgba(255,255,255,.9);color:#667eea; }
.dangol-follower-count { text-align:center;font-size:12px;color: var(--text2);padding:6px 0;background:var(--input-bg); }
.dangol-tabs {
display:flex;border-bottom:2px solid #f0f0f0;background: var(--card);flex-shrink:0;
}
.dangol-tab {
flex:1;padding:12px;text-align:center;background:none;border:none;
font-size:14px;font-weight:600;color: var(--text2);cursor:pointer;
border-bottom:2px solid transparent;margin-bottom:-2px;min-height:44px;
}
.dangol-tab.active { color:#667eea;border-bottom-color:#667eea; }
.dangol-content { flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:0; }
.dangol-fab {
position:absolute;bottom:24px;right:20px;width:56px;height:56px;border-radius:50%;
background:#667eea;color:#fff;border:none;font-size:22px;
box-shadow:0 4px 12px rgba(102,126,234,.4);cursor:pointer;z-index:10;
}
.dangol-fab:active { transform:scale(.9); }

/* 소식 글 목록 */
.dangol-post {
padding:16px;border-bottom:1px solid #f0f0f0;cursor:pointer;
}
.dangol-post:active { background:var(--input-bg); }
.dangol-post-cat { display:inline-block;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:600;margin-bottom:6px; }
.dangol-post-title { font-size:15px;font-weight:700;margin-bottom:4px;color: var(--text); }
.dangol-post-body { font-size:13px;color: var(--text2);margin-bottom:8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.dangol-post-meta { font-size:11px;color: var(--text2);display:flex;gap:12px; }
.dangol-post-like { cursor:pointer; }
.dangol-post-like:active { opacity:.6; }
.dangol-empty { text-align:center;padding:60px 20px;color: var(--text2);font-size:14px; }

/* 단골톡 채팅 */
.dangol-chat-wrap { display:flex;flex-direction:column;height:100%; }
.dangol-chat-msgs { flex:1;overflow-y:auto;padding:12px 16px;display:flex;flex-direction:column;gap:8px; }
.dangol-chat-msg { display:flex;gap:8px;align-items:flex-start; }
.dangol-chat-avatar { width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-size:14px;font-weight:700;flex-shrink:0; }
.dangol-chat-bubble { background:#f0f4ff;padding:8px 12px;border-radius:12px;font-size:13px;max-width:75%;color:#1a1a1a; }
.dangol-chat-msg.is-mine { flex-direction:row-reverse; }
.dangol-chat-msg.is-mine .dangol-chat-bubble { background:#667eea;color:#fff; }
.dangol-chat-msg.is-mine .dangol-chat-time { text-align:right; }
.dangol-chat-name { font-size:11px;font-weight:600;color:#667eea;margin-bottom:2px; }
.dangol-chat-time { font-size:10px;color:#bbb;margin-top:2px; }
.dangol-chat-input-bar {
display:flex;gap:8px;padding:10px 16px;border-top:1px solid #f0f0f0;background: var(--card);flex-shrink:0;
}
.dangol-chat-input {
flex:1;padding:10px 14px;border: 1.5px solid var(--border);border-radius:20px;
font-size:14px;outline:none;min-height:42px;
}
.dangol-chat-input:focus { border-color:#667eea; }
.dangol-chat-send { padding:0 16px;background:#667eea;color:#fff;border:none;border-radius:20px;font-size:14px;font-weight:600;cursor:pointer;min-height:42px; }

/* 글쓰기 모달 */
.dangol-write-overlay {
position:fixed;inset:0;z-index:1200;background: var(--card);
transform:translateY(100%);transition:transform .3s ease;
}
.dangol-write-overlay.show { transform:translateY(0); }
.dangol-write-header {
display:flex;align-items:center;justify-content:space-between;padding:12px 16px;
border-bottom:1px solid #f0f0f0;
}
.dangol-write-header button { background:none;border:none;font-size:18px;cursor:pointer;padding:8px;min-width:44px;min-height:44px; }
.dangol-write-cats { display:flex;gap:8px;padding:12px 16px;overflow-x:auto;flex-wrap:nowrap; }
.dangol-write-cat {
padding:6px 14px;border-radius:16px;border: 1.5px solid var(--border);background: var(--card);
font-size:13px;cursor:pointer;white-space:nowrap;min-height:36px;
}
.dangol-write-cat.active { background:#667eea;color:#fff;border-color:#667eea; }
.dangol-write-input {
display:block;width:calc(100% - 32px);margin:0 16px;padding:12px;
border:none;border-bottom:1px solid #f0f0f0;font-size:16px;font-weight:600;outline:none;
}
.dangol-write-textarea {
display:block;width:calc(100% - 32px);margin:0 16px;padding:12px;
border:none;font-size:14px;outline:none;resize:none;height:200px;
}

.list-toggle {
position: fixed; bottom: 68px; left: 16px; z-index: 999;
padding: 10px 16px; border-radius: 24px;
background: #667eea; color: white; border: none;
font-size: 14px; cursor: pointer; font-weight: 600;
box-shadow: 0 2px 8px rgba(102,126,234,0.4);
}

.list-view {
position: fixed; top: 128px; left: 0; right: 0; bottom: 56px;
background: var(--input-bg); z-index: 998; overflow-y: auto;
display: none; padding: 8px; /* top overridden by JS */
}
.list-view.show { display: block; }
.list-item {
background: var(--card); border-radius: 12px; padding: 14px;
margin-bottom: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
cursor: pointer;
}
.list-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.list-item .li-name { font-size: 16px; font-weight: 600; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .li-addr { font-size: 13px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .li-dist { font-size: 13px; color: #667eea; font-weight: 600; float: right; }
.list-item .li-cat { font-size: 12px; color: var(--text2); }

.loading {
position: fixed; inset: 0; z-index: 2000;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
display: flex; flex-direction: column; align-items: center; justify-content: center;
gap: 0; transition: opacity 0.4s; color: #fff; overflow: hidden;
}
.loading.fade-out { opacity: 0; pointer-events: none; }
.loading-intro { text-align: center; padding: 0 32px; }
.loading-logo { font-size: 56px; margin-bottom: 8px; }
.loading-title { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.loading-sub { font-size: 14px; opacity: .85; margin-bottom: 24px; }
.loading-slides { display: flex; flex-direction: column; gap: 12px; width: 85%; max-width: 320px; }
.loading-slide { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.15); border-radius: 14px; padding: 14px 16px; backdrop-filter: blur(4px); opacity: 0; transform: translateY(16px); animation: slideUp .5s ease forwards; }
.loading-slide:nth-child(1){animation-delay:.2s}
.loading-slide:nth-child(2){animation-delay:.6s}
.loading-slide:nth-child(3){animation-delay:1s}
.loading-slide:nth-child(4){animation-delay:1.4s}
.slide-icon { font-size: 28px; flex-shrink: 0; }
.slide-text { font-size: 13px; font-weight: 600; line-height: 1.4; }
.slide-text small { display: block; font-size: 11px; font-weight: 400; opacity: .8; margin-top: 2px; }
.slide-hint { font-size: 10px; opacity: .6; margin-top: 2px; transition: opacity .2s; }
.loading-progress { margin-top: 28px; text-align: center; }
.loading-bar { width: 120px; height: 3px; background: rgba(255,255,255,.2); border-radius: 3px; overflow: hidden; margin: 0 auto 8px; }
.loading-bar-fill { height: 100%; background: var(--card); border-radius: 3px; animation: loadBar 3s ease-in-out forwards; }
.loading-status { font-size: 11px; opacity: .7; }
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }
@keyframes loadBar { 0%{width:0} 30%{width:40%} 60%{width:70%} 90%{width:85%} 100%{width:95%} }

/* 검색 드롭다운 */
.search-wrap { position: relative; flex: 1; }
.search-dropdown {
display: none; position: absolute; top: 100%; left: 0; right: 0;
background: var(--card); border-radius: 0 0 12px 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
z-index: 5000; max-height: 420px; overflow-y: auto;
}
.search-dropdown.show { display: block; }
.sd-section { padding: 8px 12px 4px; font-size: 11px; color: var(--text2); font-weight: 600; }
.sd-item {
padding: 10px 14px; cursor: pointer; font-size: 14px;
display: flex; align-items: center; gap: 8px;
border-bottom: 1px solid #f5f5f5;
}
.sd-item:hover, .sd-item:active { background: var(--input-bg); }
.sd-item .sd-icon { font-size: 16px; flex-shrink: 0; }
.sd-item .sd-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-item .sd-sub { font-size: 11px; color: var(--text2); margin-left: auto; flex-shrink: 0; }
.sd-clear { padding: 8px 14px; font-size: 12px; color: #e74c3c; cursor: pointer; text-align: right; }

/* 통합검색 탭 */
.sd-tabs { display: flex; border-bottom: 2px solid #f0f0f0; padding: 0; }
.sd-tab { flex: 1; padding: 10px 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--text2); cursor: pointer; border: none; background: none; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.sd-tab.active { color: #667eea; border-bottom-color: #667eea; }
.sd-tab .sd-tab-count { font-size: 11px; color: #bbb; margin-left: 2px; }
.sd-tab.active .sd-tab-count { color: #667eea; }

/* 인기 검색어 */
.sd-popular { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 12px 12px; }
.sd-popular-chip { padding: 6px 14px; background: #f5f6ff; border: 1px solid #e0e3ff; border-radius: 20px; font-size: 13px; color: #667eea; cursor: pointer; white-space: nowrap; transition: all 0.2s; }
.sd-popular-chip:active { background: #667eea; color: #fff; }

/* 커뮤니티 검색 결과 */
.sd-item .sd-comm-badge { font-size: 10px; background: #f0f3ff; color: #667eea; padding: 2px 6px; border-radius: 8px; margin-left: 4px; white-space: nowrap; }
.sd-item .sd-body-preview { font-size: 11px; color: var(--text2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.sd-no-result { padding: 24px 16px; text-align: center; color: var(--text2); font-size: 13px; }

.cat-chips {
display: flex; gap: 6px; padding: 4px 0 4px; overflow-x: auto;
-webkit-overflow-scrolling: touch; scrollbar-width: none;
width: 100%; flex-shrink: 0;
}
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
flex-shrink: 0; padding: 10px 14px; border-radius: 20px;
font-size: 12px; font-weight: 500; cursor: pointer;
background: #f1f3f5; color: #495057; border: 1.5px solid transparent;
transition: all 0.2s; white-space: nowrap; min-height: 44px;
display: inline-flex; align-items: center;
}
.cat-chip:hover { background: #e9ecef; }
.cat-chip.active { background: #667eea; color: white; border-color: #667eea; }
.cat-chip .chip-count { font-size: 10px; opacity: 0.7; margin-left: 3px; }

/* 바텀시트 */
.bottom-sheet-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.3); z-index:1050; }
.bottom-sheet-overlay.show { display:block; }
.bottom-sheet {
position:fixed; bottom:0; left:0; right:0; z-index:1051;
background: var(--card); border-radius:16px 16px 0 0; padding:12px 20px 24px;
box-shadow:0 -4px 20px rgba(0,0,0,0.15);
transform:translateY(100%); transition:transform 0.3s cubic-bezier(.4,0,.2,1);
}
.bottom-sheet.show { transform:translateY(0); }
.bs-handle { width:36px;height:4px;background:#ddd;border-radius:2px;margin:0 auto 12px; }
.bs-name { font-size:18px;font-weight:800;margin-bottom:4px; }
.bs-addr { font-size:13px;color: var(--text2);margin-bottom:4px; }
.bs-cat { font-size:12px;color:#667eea;margin-bottom:14px; }
.bs-actions { display:flex;gap:0;border-top:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0;margin:0 -20px;padding:0; }
.bs-btn { flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;padding:12px 4px;
background:none;border:none;border-right:1px solid #f0f0f0;cursor:pointer;
font-size:11px;color: var(--text);text-decoration:none;font-weight:500;min-height:44px; }
.bs-btn:last-child { border-right:none; }
.bs-btn:active { background:#f8f8f8; }
.bs-btn span { font-size:18px; }
.bs-btn.fav-on { color:#f59e0b; }
.bs-detail-btn { width:100%;margin-top:12px;padding:12px;background:#667eea;color:white;border:none;border-radius:10px;font-size:14px;font-weight:600;cursor:pointer; }

@keyframes spin { from{transform:rotate(0)} to{transform:rotate(360deg)} }

/* Leaflet 클러스터 커스텀 */
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large {
background: rgba(102,126,234,0.3) !important;
}
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
background: linear-gradient(135deg, #667eea, #764ba2) !important;
color: white !important; font-weight: bold;
}
/* 클러스터 목록 패널 */
.cluster-list-overlay { position:fixed; inset:0; z-index:9000; display:flex; align-items:flex-end; justify-content:center; }
.cluster-list-backdrop { position:absolute; inset:0; background:rgba(0,0,0,0.4); }
.cluster-list-panel { position:relative; z-index:1; width:100%; max-width:420px; max-height:60vh; background: var(--card); border-radius:16px 16px 0 0; display:flex; flex-direction:column; animation:clSlideUp .3s ease; }
@keyframes clSlideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
.cluster-list-header { display:flex; align-items:center; padding:16px; border-bottom:1px solid #f0f0f0; }
.cluster-list-header h3 { flex:1; margin:0; font-size:16px; }
.cluster-list-close { background:none; border:none; font-size:20px; color: var(--text2); cursor:pointer; padding:4px 8px; }
.cluster-list-body { overflow-y:auto; flex:1; }
.cluster-list-item { display:flex; align-items:center; gap:12px; padding:14px 16px; border-bottom:1px solid #f5f5f5; cursor:pointer; transition:background .15s; }
.cluster-list-item:active { background:#f8f8f8; }
.cluster-list-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.cluster-list-info { flex:1; min-width:0; }
.cluster-list-name { font-size:14px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cluster-list-addr { font-size:12px; color: var(--text2); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cluster-list-badge { font-size:11px; flex-shrink:0; }

.my-menu-item {
padding: 14px 16px; font-size: 14px; cursor: pointer;
border-bottom: 1px solid #f0f0f0; transition: background 0.2s;
min-height: 44px; display: flex; align-items: center;
}
.my-menu-item:last-child { border-bottom: none; }
.my-menu-item:active { background: var(--input-bg); }

/* ===== 이모지 리뷰 + 가격 제보 ===== */
.emoji-review { padding: 14px 0; }
.emoji-review-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.emoji-review-stats { font-size: 13px; color: var(--text2); margin-bottom: 12px; line-height: 1.6; }
.emoji-review-stats .stat-highlight { font-weight: 700; color: var(--text); }
.emoji-row { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.emoji-row-label { font-size: 13px; font-weight: 600; color: var(--text2); min-width: 48px; }
.emoji-btn {
min-width: 44px; min-height: 44px; padding: 6px 12px;
border-radius: 22px; border: 2px solid var(--border); background: var(--card);
font-size: 14px; cursor: pointer; transition: all 0.15s;
display: inline-flex; align-items: center; gap: 4px;
}
.emoji-btn:active { transform: scale(0.95); }
.emoji-btn.selected { border-color: #667eea; background: #f0f4ff; box-shadow: 0 0 0 2px rgba(102,126,234,0.2); }
.emoji-btn.disabled { opacity: 0.5; pointer-events: none; }
.emoji-login-hint { font-size: 12px; color: var(--text2); padding: 6px 0; }

.price-report-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.price-report-form input {
padding: 8px 10px; border: 1.5px solid var(--border); border-radius: 10px;
font-size: 13px; outline: none; min-height: 44px;
}
.price-report-form input:focus { border-color: #667eea; }
.price-report-form input[name="menu"] { flex: 1; min-width: 80px; }
.price-report-form input[name="price"] { width: 90px; }
.price-report-submit {
min-width: 44px; min-height: 44px; padding: 8px 14px;
background: #667eea; color: #fff; border: none; border-radius: 10px;
font-size: 13px; font-weight: 600; cursor: pointer;
}
.price-report-submit:active { opacity: 0.8; }
.price-list { margin-top: 8px; font-size: 13px; color: var(--text2); line-height: 1.7; }
.price-list .price-item { display: inline; }
.price-list .price-item + .price-item::before { content: ' | '; color: #ccc; }

@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .emoji-review-stats { color: var(--text2); }
html:not([data-theme="light"]) .emoji-review-stats .stat-highlight { color: var(--text); }
html:not([data-theme="light"]) .emoji-row-label { color: var(--text2); }
html:not([data-theme="light"]) .emoji-btn { background: var(--card); border-color: var(--border); color: var(--text); }
html:not([data-theme="light"]) .emoji-btn.selected { background: var(--input-bg); border-color: #667eea; }
html:not([data-theme="light"]) .price-report-form input { background: var(--input-bg); border-color: var(--border); color: var(--text); }
html:not([data-theme="light"]) .price-list { color: var(--text2); }
}
@keyframes slideUp { from { transform:translateY(100px);opacity:0 } to { transform:translateY(0);opacity:1 } }

/* ===== 다크모드 ===== */
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) { --bg:#1a1a2e; --card:#16213e; --text:#e0e0e0; --text2:#aaa; --border:#2a2a4a; --input-bg:#0f3460; }
html:not([data-theme="light"]) body { background:var(--bg); color:var(--text); }
html:not([data-theme="light"]) .header { background:linear-gradient(135deg,#1a1a3e 0%,#2d1b4e 100%); }
html:not([data-theme="light"]) .filter-bar { background:var(--card); box-shadow:0 2px 8px rgba(0,0,0,0.3); }
html:not([data-theme="light"]) .filter-bar input[type="text"] { background:var(--input-bg); border-color:var(--border); color:var(--text); }
html:not([data-theme="light"]) .filter-bar input::placeholder { color: var(--text2); }
html:not([data-theme="light"]) .filter-btn { background:var(--card); color:var(--text); border-color:var(--border); }
html:not([data-theme="light"]) .filter-btn.active { background:#667eea; color:white; border-color:#667eea; }
html:not([data-theme="light"]) .cat-chip { background:var(--border); color:var(--text2); }
html:not([data-theme="light"]) .cat-chip.active { background:#667eea; color:white; }
html:not([data-theme="light"]) .search-dropdown { background:var(--card); box-shadow:0 4px 16px rgba(0,0,0,0.4); }
html:not([data-theme="light"]) .sd-item { border-bottom-color:var(--border); color:var(--text); }
html:not([data-theme="light"]) .sd-item:hover, .sd-item:active { background:var(--input-bg); }
html:not([data-theme="light"]) .info-panel { background:var(--card); }
html:not([data-theme="light"]) .info-panel .name { color:var(--text); }
html:not([data-theme="light"]) .detail-actions { border-color:var(--border); }
html:not([data-theme="light"]) .detail-action-btn { color:var(--text); border-color:var(--border); }
html:not([data-theme="light"]) .detail-action-btn:active { background:var(--border); }
html:not([data-theme="light"]) .bottom-sheet { background:var(--card); }
html:not([data-theme="light"]) .bs-name { color:var(--text); }
html:not([data-theme="light"]) .bs-addr, .bs-cat { color:var(--text2); }
html:not([data-theme="light"]) .bs-actions { border-color:var(--border); }
html:not([data-theme="light"]) .bs-btn { color:var(--text); border-color:var(--border); }
html:not([data-theme="light"]) .bs-btn:active { background:var(--border); }
html:not([data-theme="light"]) .dangol-panel { background:var(--bg); }
html:not([data-theme="light"]) .dangol-follower-count { background:var(--card);color:var(--text2); }
html:not([data-theme="light"]) .dangol-tabs { background:var(--card);border-color:var(--border); }
html:not([data-theme="light"]) .dangol-tab { color:var(--text2); }
html:not([data-theme="light"]) .dangol-tab.active { color:#667eea; }
html:not([data-theme="light"]) .dangol-content { background:var(--bg); }
html:not([data-theme="light"]) .dangol-post { border-color:var(--border); }
html:not([data-theme="light"]) .dangol-post:active { background:var(--card); }
html:not([data-theme="light"]) .dangol-post-title { color:var(--text); }
html:not([data-theme="light"]) .dangol-post-body { color:var(--text2); }
html:not([data-theme="light"]) .dangol-post-meta { color:var(--text2); }
html[data-theme="dark"] .dangol-chat-bubble { background:#2a2a3e;color:#e0e0e0; }
html[data-theme="dark"] .dangol-chat-msg.is-mine .dangol-chat-bubble { background:#4a5abf;color:#fff; }
html[data-theme="dark"] .dangol-chat-input-bar { background:var(--card);border-color:var(--border); }
html[data-theme="dark"] .dangol-chat-input { background:var(--input-bg);border-color:var(--border);color:var(--text); }
html:not([data-theme="light"]) .dangol-write-overlay { background:var(--bg); }
html:not([data-theme="light"]) .dangol-write-header { border-color:var(--border); }
html:not([data-theme="light"]) .dangol-write-header button { color:var(--text); }
html:not([data-theme="light"]) .dangol-write-cat { background:var(--card);color:var(--text);border-color:var(--border); }
html:not([data-theme="light"]) .dangol-write-input { background:transparent;color:var(--text);border-color:var(--border); }
html:not([data-theme="light"]) .dangol-write-textarea { background:transparent;color:var(--text); }
html:not([data-theme="light"]) .dangol-empty { color:var(--text2); }
html:not([data-theme="light"]) .list-view { background:var(--bg); }
html:not([data-theme="light"]) .list-item { background:var(--card); color:var(--text); box-shadow:0 1px 4px rgba(0,0,0,0.2); }
html:not([data-theme="light"]) .list-item .li-addr { color:var(--text2); }
html:not([data-theme="light"]) .loading { background:var(--card); color:var(--text); box-shadow:0 4px 20px rgba(0,0,0,0.4); }
html:not([data-theme="light"]) .cluster-list-panel { background:var(--card); }
html:not([data-theme="light"]) .cluster-list-header { border-bottom-color:var(--border); color:var(--text); }
html:not([data-theme="light"]) .cluster-list-item { border-bottom-color:var(--border); color:var(--text); }
html:not([data-theme="light"]) .cluster-list-addr { color:var(--text2); }
html:not([data-theme="light"]) #regionModal > div { background:var(--card); color:var(--text); }
html:not([data-theme="light"]) #regionModal input { background:var(--input-bg); border-color:var(--border); color:var(--text); }
html:not([data-theme="light"]) #regionModal button { color:var(--text); }
html:not([data-theme="light"]) .tag { background:var(--border); color:var(--text2); }
html:not([data-theme="light"]) .facility-tag { background:var(--border); color:var(--text); border-color:var(--border); }
html:not([data-theme="light"]) .tag-picker-panel { background:var(--card); color:var(--text); }
html:not([data-theme="light"]) .tag-picker-item { background:var(--card); border-color:var(--border); color:var(--text); }
html:not([data-theme="light"]) .tag-picker-item.selected { background:var(--input-bg); border-color:#667eea; }
html:not([data-theme="light"]) .bottom-nav { background:var(--card); border-top-color:var(--border); }
html:not([data-theme="light"]) .nav-item { color:var(--text2); }
html:not([data-theme="light"]) .nav-item.active { color:#667eea; }
html:not([data-theme="light"]) .my-menu-item { color:var(--text); border-bottom-color:var(--border); }
html:not([data-theme="light"]) .my-menu-item:active { background:var(--border); }
html:not([data-theme="light"]) .store-toast { background:#e0e0e0; color: var(--text); }
}

/* ========== Level & Badge System ========== */
.level-card { background: var(--card); border-radius: 16px; padding: 16px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.level-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.level-icon { font-size: 36px; width: 48px; text-align: center; }
.level-info { flex: 1; }
.level-name { font-size: 16px; font-weight: 800; color: var(--text); }
.level-score { font-size: 12px; color: var(--text2); margin-top: 2px; }
.level-bar-wrap { height: 8px; background: var(--input-bg); border-radius: 4px; overflow: hidden; margin-bottom: 10px; }
.level-bar { height: 100%; background: linear-gradient(90deg, #667eea, #764ba2); border-radius: 4px; transition: width 0.6s ease; }
.level-stats { display: flex; gap: 12px; font-size: 11px; color: var(--text2); flex-wrap: wrap; }
.level-stats span { background: var(--input-bg); padding: 3px 8px; border-radius: 6px; }

.badge-section { margin-bottom: 20px; }
.badge-section-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.badge-item { background: var(--card); border-radius: 12px; padding: 14px 8px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,0.06); transition: transform 0.2s; }
.badge-item.earned { border: 2px solid #667eea; }
.badge-item.locked { opacity: 0.35; filter: grayscale(0.8); }
.badge-icon { font-size: 28px; margin-bottom: 4px; }
.badge-name { font-size: 12px; font-weight: 700; color: var(--text); }
.badge-desc { font-size: 10px; color: var(--text2); margin-top: 2px; }

.badge-toast { position: fixed; top: -60px; left: 50%; transform: translateX(-50%); background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 12px 20px; border-radius: 12px; font-size: 14px; z-index: 10000; box-shadow: 0 4px 16px rgba(102,126,234,0.4); transition: top 0.3s ease; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.badge-toast.show { top: 20px; }

/* 트렌딩 지역 필터 */
.trend-region-filter { display: flex; gap: 6px; padding: 8px 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.trend-region-filter::-webkit-scrollbar { display: none; }
.trend-region-chip {
    padding: 6px 14px; border-radius: 16px; font-size: 13px;
    background: var(--input-bg); color: var(--text2); cursor: pointer; white-space: nowrap;
    border: 1.5px solid transparent; transition: all 0.2s;
}
.trend-region-chip.active { background: #667eea; color: white; border-color: #667eea; }

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .trend-region-chip { background: #2a2a2a; color: #ccc; }
    html:not([data-theme="light"]) .trend-region-chip.active { background: #667eea; color: white; }
}

/* ========== 다크모드: 트렌딩/커뮤니티/MY ========== */
@media (prefers-color-scheme: dark) {
/* 트렌딩 */
html:not([data-theme="light"]) .trend-card { background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
html:not([data-theme="light"]) .trend-card-name { color: var(--text); }
html:not([data-theme="light"]) .trend-card-desc { color: var(--text2); }
html:not([data-theme="light"]) .trend-card-arrow { color: var(--text2); }
html:not([data-theme="light"]) .trend-card-rank.r4 { background: #333; color: var(--text2); }
html:not([data-theme="light"]) .trend-section { color: var(--text); }
html:not([data-theme="light"]) .trend-empty { color: var(--text2); }
html:not([data-theme="light"]) .trend-back { color: var(--text); }
html:not([data-theme="light"]) .trend-detail-header { color: var(--text); }
html:not([data-theme="light"]) .trend-shop-card { background: var(--card); border-color: var(--border); }
html:not([data-theme="light"]) .trend-shop-name { color: var(--text); }
html:not([data-theme="light"]) .trend-shop-addr { color: var(--text2); }
html:not([data-theme="light"]) .trend-shop-price { color: var(--text); }
html:not([data-theme="light"]) .trend-tag { background: var(--input-bg); color: var(--text2); }
html:not([data-theme="light"]) .trend-map-btn { background: var(--input-bg); color: var(--text); }
html:not([data-theme="light"]) .trend-add-shop-btn { background: var(--card); color: #667eea; border-color: #667eea; }

/* 커뮤니티 */
html:not([data-theme="light"]) .comm-my-name { color: var(--text); }
html:not([data-theme="light"]) .comm-browse-name { color: var(--text); }
html:not([data-theme="light"]) .comm-browse-desc { color: var(--text2); }
html:not([data-theme="light"]) .comm-browse-meta { color: var(--text2); }
html:not([data-theme="light"]) .comm-browse-card { background: var(--card); border-color: var(--border); }
html:not([data-theme="light"]) .comm-my-card { background: var(--card); border-color: var(--border); }
html:not([data-theme="light"]) .comm-section-title { color: var(--text); }
html:not([data-theme="light"]) .comm-join-btn { background: #667eea; color: white; }
html:not([data-theme="light"]) .post-card { background: var(--card); border-color: var(--border); }
html:not([data-theme="light"]) .post-title { color: var(--text); }
html:not([data-theme="light"]) .post-body { color: var(--text2); }
html:not([data-theme="light"]) .post-meta { color: var(--text2); }

/* MY 탭 */
html:not([data-theme="light"]) .my-section { background: var(--card); }
html:not([data-theme="light"]) .my-section-title { color: var(--text); }
html:not([data-theme="light"]) .my-item { border-color: var(--border); }
html:not([data-theme="light"]) .my-item-label { color: var(--text2); }
html:not([data-theme="light"]) .my-item-value { color: var(--text); }

/* 홈 피드 */
html:not([data-theme="light"]) .hf-post { background: var(--card); border-color: var(--border); }
html:not([data-theme="light"]) .hf-post-title { color: var(--text); }
html:not([data-theme="light"]) .hf-post-meta { color: var(--text2); }
html:not([data-theme="light"]) .hf-card { background: var(--card); border-color: var(--border); }
html:not([data-theme="light"]) .hf-card-name { color: var(--text); }
html:not([data-theme="light"]) .hf-card-sub { color: var(--text2); }
html:not([data-theme="light"]) .hf-section-title { color: var(--text); }
html:not([data-theme="light"]) .hf-empty { color: var(--text2); }
html:not([data-theme="light"]) .hf-tag { background: var(--input-bg); color: var(--text); }

/* 공연/축제 피드 */
html:not([data-theme="light"]) .pf-card { background: var(--card); border-color: var(--border); }
html:not([data-theme="light"]) .pf-name { color: var(--text); }
html:not([data-theme="light"]) .pf-meta { color: var(--text2); }
html:not([data-theme="light"]) .pf-genre { background: var(--input-bg); color: var(--text2); }
html:not([data-theme="light"]) .pf-poster-wrap { background: var(--input-bg); }
}


/* ========== Manual dark theme overrides ========== */
html[data-theme="dark"] .panel-card { background: #1e1e1e; border-color: #333; box-shadow: 0 1px 4px rgba(0,0,0,0.3); }
html[data-theme="dark"] .tag-filter-bar { background: rgba(30,30,46,0.95); }
html[data-theme="dark"] .emoji-review-stats { color: var(--text2); }
html[data-theme="dark"] .trend-region-chip { background: #2a2a2a; color: #ccc; }
/* 트렌딩 */
html[data-theme="dark"] .trend-card { background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,0.3); }

/* ========== 다크모드 배너 톤다운 ========== */
html[data-theme="dark"] .hf-header { background: linear-gradient(135deg, #3a4a8a 0%, #4a2d6a 100%); }
html[data-theme="dark"] .snap-header,
html[data-theme="dark"] .snap-submit-btn { background: linear-gradient(135deg, #a84040 0%, #8a3518 100%); }
html[data-theme="dark"] .trend-header,
html[data-theme="dark"] .trend-top-area { background: linear-gradient(135deg, #3a4a8a 0%, #4a2d6a 100%); }
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .hf-header { background: linear-gradient(135deg, #3a4a8a 0%, #4a2d6a 100%); }
    html:not([data-theme="light"]) .snap-header,
    html:not([data-theme="light"]) .snap-submit-btn { background: linear-gradient(135deg, #a84040 0%, #8a3518 100%); }
    html:not([data-theme="light"]) .trend-header,
    html:not([data-theme="light"]) .trend-top-area { background: linear-gradient(135deg, #3a4a8a 0%, #4a2d6a 100%); }
}

/* ========== 다크모드 전체 그라데이션 톤다운 ========== */
html[data-theme="dark"] .snap-header,
html[data-theme="dark"] .snap-submit-btn,
html[data-theme="dark"] .snap-map-btn { background: linear-gradient(135deg, #8a3030 0%, #6a2010 100%) !important; }

html[data-theme="dark"] .trend-header,
html[data-theme="dark"] .trend-top-area,
html[data-theme="dark"] .trend-detail-hero,
html[data-theme="dark"] .hf-header,
html[data-theme="dark"] .comm-header,
html[data-theme="dark"] .comm-card-header,
html[data-theme="dark"] .auth-modal .welcome-header,
html[data-theme="dark"] .chat-header,
html[data-theme="dark"] .lesson-header { background: linear-gradient(135deg, #2d3a6a 0%, #3a2060 100%) !important; }

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) .snap-header,
    html:not([data-theme="light"]) .snap-submit-btn,
    html:not([data-theme="light"]) .snap-map-btn { background: linear-gradient(135deg, #8a3030 0%, #6a2010 100%) !important; }

    html:not([data-theme="light"]) .trend-header,
    html:not([data-theme="light"]) .trend-top-area,
    html:not([data-theme="light"]) .trend-detail-hero,
    html:not([data-theme="light"]) .hf-header,
    html:not([data-theme="light"]) .comm-header,
    html:not([data-theme="light"]) .comm-card-header,
    html:not([data-theme="light"]) .auth-modal .welcome-header,
    html:not([data-theme="light"]) .chat-header,
    html:not([data-theme="light"]) .lesson-header { background: linear-gradient(135deg, #2d3a6a 0%, #3a2060 100%) !important; }
}

/* 즐겨찾기 목록 */
.fav-list-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.fav-list-item:hover { background: var(--input-bg); }
.fav-list-item:last-child { border-bottom: none; }

/* ========== 교통 조회 모달 ========== */
.tp-modal{position:fixed;top:0;left:0;right:0;bottom:0;z-index:10000;background:var(--bg,#111);transform:translateY(100%);transition:transform .3s ease}
.tp-modal.tp-open{transform:translateY(0)}
.tp-modal-inner{height:100%;display:flex;flex-direction:column;max-width:480px;margin:0 auto}
.tp-modal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border)}
.tp-modal-title{font-size:17px;font-weight:700;color:var(--text)}
.tp-close{background:none;border:none;font-size:22px;color:var(--text2);cursor:pointer;padding:4px 8px}
.tp-tabs{display:flex;border-bottom:1px solid var(--border)}
.tp-tab{flex:1;padding:12px;text-align:center;font-size:14px;font-weight:600;background:none;border:none;color:var(--text2);cursor:pointer;border-bottom:2px solid transparent;transition:all .2s}
.tp-tab-active{color:var(--primary,#667eea);border-bottom-color:var(--primary,#667eea)}
.tp-body{flex:1;overflow-y:auto;padding:16px 20px}

/* 열차 폼 */
.tp-form{display:flex;align-items:center;gap:8px;margin-bottom:12px}
.tp-field{flex:1}
.tp-field label{display:block;font-size:11px;color:var(--text2);margin-bottom:4px}
.tp-station-btn{width:100%;padding:10px 12px;background:var(--card);border:1px solid var(--border);border-radius:10px;font-size:14px;font-weight:600;color:var(--text);cursor:pointer;text-align:left}
.tp-swap{background:none;border:none;font-size:20px;cursor:pointer;padding:8px;margin-top:12px;color:var(--text2)}
.tp-date-row{display:flex;gap:8px;margin-bottom:12px}
.tp-date-input{flex:1;padding:10px 12px;background:var(--card);border:1px solid var(--border);border-radius:10px;font-size:14px;color:var(--text);color-scheme:dark}
[data-theme="light"] .tp-date-input{color-scheme:light}
.tp-search-btn{padding:10px 20px;background:var(--primary,#667eea);color:#fff;border:none;border-radius:10px;font-size:14px;font-weight:600;cursor:pointer}
.tp-quick{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:16px}
.tp-quick-tag{padding:6px 12px;background:var(--card);border:1px solid var(--border);border-radius:20px;font-size:12px;color:var(--text);cursor:pointer;transition:background .2s}
.tp-quick-tag:active{background:var(--border)}
.tp-quick-fav{border-color:var(--primary,#667eea);color:var(--primary,#667eea)}

/* 열차 결과 카드 */
.tp-train-card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:14px;margin-bottom:10px}
.tp-train-top{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.tp-badge{padding:3px 10px;border-radius:6px;font-size:11px;font-weight:700;color:#fff}
.tp-train-no{font-size:12px;color:var(--text2)}
.tp-train-time{display:flex;align-items:baseline;gap:8px;font-size:18px;font-weight:700;color:var(--text)}
.tp-time-arrow{font-size:14px;color:var(--text2)}
.tp-duration{font-size:12px;font-weight:400;color:var(--text2);margin-left:auto}
.tp-train-price{font-size:13px;color:var(--primary,#667eea);margin-top:6px;font-weight:600}

/* 역 선택 */
.tp-picker{animation:tpSlide .2s ease}
@keyframes tpSlide{from{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}
.tp-picker-header{display:flex;align-items:center;gap:12px;margin-bottom:16px;font-size:15px;font-weight:600;color:var(--text)}
.tp-back,.tp-back-small{background:none;border:none;color:var(--primary,#667eea);font-size:14px;cursor:pointer;padding:4px}
.tp-back-small{font-size:12px;float:right}
.tp-quick-section,.tp-city-section{margin-bottom:16px}
.tp-quick-title{font-size:12px;font-weight:600;color:var(--text2);margin-bottom:8px}
.tp-quick-list{display:flex;flex-wrap:wrap;gap:6px}
.tp-city-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.tp-city-btn{padding:10px 4px;background:var(--card);border:1px solid var(--border);border-radius:8px;font-size:12px;color:var(--text);cursor:pointer;text-align:center}
.tp-city-btn:active{background:var(--border)}
.tp-station-list{max-height:50vh;overflow-y:auto}
.tp-station-item{display:flex;align-items:center;justify-content:space-between;padding:12px 8px;border-bottom:1px solid var(--border);cursor:pointer}
.tp-station-item span{flex:1;font-size:14px;color:var(--text)}
.tp-fav-btn{background:none;border:none;font-size:18px;color:var(--border);cursor:pointer}
.tp-fav-btn.tp-fav-active{color:#f1c40f}

/* 버스 */
.tp-bus-search{display:flex;gap:8px;margin-bottom:12px}
.tp-bus-input{flex:1;padding:10px 12px;background:var(--card);border:1px solid var(--border);border-radius:10px;font-size:14px;color:var(--text)}
.tp-bus-stop-item{padding:14px 12px;background:var(--card);border:1px solid var(--border);border-radius:10px;margin-bottom:8px;cursor:pointer}
.tp-bus-stop-item:active{background:var(--border)}
.tp-bus-stop-name{font-size:14px;font-weight:600;color:var(--text)}
.tp-bus-stop-no{font-size:12px;color:var(--text2);margin-top:2px}
.tp-bus-stop-header{display:flex;align-items:center;gap:10px;margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid var(--border)}
.tp-bus-stop-header span{flex:1;font-size:15px;font-weight:600;color:var(--text)}
.tp-bus-refresh{cursor:pointer;font-size:18px}
.tp-bus-arr-card{display:flex;align-items:center;justify-content:space-between;padding:14px;background:var(--card);border:1px solid var(--border);border-radius:12px;margin-bottom:8px}
.tp-bus-route{font-size:16px;font-weight:700;color:var(--text);min-width:60px}
.tp-bus-arr-info{text-align:right}
.tp-bus-arr-time{font-size:16px;font-weight:700}
.tp-bus-arr-stops{display:block;font-size:12px;color:var(--text2);margin-top:2px}

/* 홈 카드 */
.tp-home-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.tp-home-card{background:var(--card);border:1px solid var(--border);border-radius:14px;padding:18px 14px;text-align:center;cursor:pointer;transition:transform .15s}
.tp-home-card:active{transform:scale(0.97)}
.tp-home-icon{font-size:28px;margin-bottom:6px}
.tp-home-label{font-size:14px;font-weight:700;color:var(--text)}
.tp-home-sub{font-size:11px;color:var(--text2);margin-top:2px}

/* 공통 */
.tp-loading{text-align:center;padding:32px 0;color:var(--text2);font-size:14px}
.tp-spinner{display:inline-block;width:20px;height:20px;border:2px solid var(--border);border-top-color:var(--primary,#667eea);border-radius:50%;animation:tpSpin .6s linear infinite;vertical-align:middle;margin-right:8px}
@keyframes tpSpin{to{transform:rotate(360deg)}}
.tp-empty{text-align:center;padding:32px 0;color:var(--text2);font-size:14px}
.tp-toast{position:fixed;bottom:100px;left:50%;transform:translateX(-50%) translateY(20px);background:var(--card);color:var(--text);padding:10px 20px;border-radius:12px;font-size:13px;box-shadow:0 4px 16px rgba(0,0,0,0.3);opacity:0;transition:all .3s;z-index:10001}
.tp-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* 요금 비교 */
.tp-fare-section{margin-top:20px;padding:16px;background:var(--card);border:1px solid var(--border);border-radius:14px}
.tp-fare-title{font-size:15px;font-weight:700;color:var(--text);margin-bottom:2px}
.tp-fare-desc{font-size:11px;color:var(--text2);margin-bottom:14px}
.tp-fare-row{margin-bottom:12px}
.tp-fare-label{font-size:13px;font-weight:700;margin-bottom:4px}
.tp-fare-bar-wrap{background:var(--border);border-radius:6px;overflow:hidden;height:28px}
.tp-fare-bar{height:100%;border-radius:6px;display:flex;align-items:center;justify-content:flex-end;padding:0 8px;min-width:40px;transition:width .4s ease}
.tp-fare-value{font-size:12px;font-weight:700;color:#fff;white-space:nowrap}
.tp-fare-meta{font-size:11px;color:var(--text2);margin-top:2px}

/* ========== 인사이트 ========== */
.insight-container{padding:0 0 16px}
.insight-section-title{font-size:14px;font-weight:700;margin:16px 0 10px;color:var(--text)}
.insight-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.insight-card{background:var(--card-bg);border-radius:14px;padding:16px 14px;text-align:center;transition:transform .2s}
[data-theme="dark"] .insight-card{background:var(--card-bg-dark)}
@media(prefers-color-scheme:dark){:not([data-theme="light"]) .insight-card{background:var(--card-bg-dark)}}
.insight-card:active{transform:scale(0.97)}
.insight-emoji{font-size:28px;margin-bottom:6px}
.insight-value{font-size:28px;font-weight:800;color:var(--text);line-height:1.2}
.insight-label{font-size:12px;color:var(--text2);margin-top:4px}
.insight-top5{background:var(--card);border-radius:14px;padding:14px 16px;margin-top:4px;box-shadow:0 1px 4px rgba(0,0,0,0.06)}
.insight-top5-item{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px solid var(--border)}
.insight-top5-item:last-child{border-bottom:none}
.insight-rank{width:22px;height:22px;border-radius:50%;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.insight-store-name{flex:1;font-size:13px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.insight-view-count{font-size:12px;color:var(--text2);flex-shrink:0}
.insight-loading{text-align:center;padding:40px 0}
.insight-loading-spinner{width:28px;height:28px;border:3px solid var(--border);border-top-color:var(--primary,#667eea);border-radius:50%;animation:tpSpin .6s linear infinite;margin:0 auto}

/* ========== 🗺️ 버스 노선도 ========== */
.tp-route-map-btn{background:none;border:none;font-size:16px;cursor:pointer;padding:2px 6px;margin-left:4px;border-radius:6px;vertical-align:middle;opacity:.7;transition:opacity .2s}
.tp-route-map-btn:hover{opacity:1;background:rgba(33,150,243,.1)}
.br-loading{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10001;background:var(--card);padding:20px 32px;border-radius:16px;box-shadow:0 8px 32px rgba(0,0,0,.3);display:flex;align-items:center;gap:12px;font-size:14px;color:var(--text)}
.br-panel{position:fixed;left:0;bottom:0;width:100%;max-width:360px;max-height:50vh;z-index:9999;background:var(--card);border-top-left-radius:16px;border-top-right-radius:16px;box-shadow:0 -4px 24px rgba(0,0,0,.15);transform:translateY(100%);transition:transform .3s ease;display:flex;flex-direction:column;overflow:hidden}
.br-panel-open{transform:translateY(0)}
.br-panel-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--border);flex-shrink:0}
.br-panel-title{font-size:15px;font-weight:700;color:var(--text)}
.br-panel-title small{font-weight:400;font-size:12px;color:var(--text2);margin-left:6px}
.br-panel-close{background:none;border:none;font-size:20px;color:var(--text2);cursor:pointer;padding:4px 8px;border-radius:8px}
.br-panel-close:hover{background:var(--border)}
.br-station-list{overflow-y:auto;flex:1;padding:0 12px 16px}
.br-station-item{display:flex;align-items:center;gap:10px;padding:8px 6px;cursor:pointer;border-radius:8px;transition:background .15s}
.br-station-item:hover{background:rgba(33,150,243,.06)}
.br-station-item.br-active{background:rgba(233,30,99,.08)}
.br-line-col{display:flex;flex-direction:column;align-items:center;width:20px;flex-shrink:0;position:relative}
.br-dot{width:10px;height:10px;border-radius:50%;background:#fff;border:2px solid #2196F3;flex-shrink:0;z-index:1}
.br-dot-start{background:#27ae60;border-color:#27ae60;width:14px;height:14px}
.br-dot-end{background:#e74c3c;border-color:#e74c3c;width:14px;height:14px}
.br-dot-current{background:#e74c3c;border-color:#fff;box-shadow:0 0 0 3px rgba(233,30,99,.4);animation:brPulse 1.5s ease infinite}
.br-line-seg{position:absolute;top:12px;width:2px;height:calc(100% + 8px);background:#2196F3;opacity:.5}
.br-station-name{flex:1;font-size:13px;color:var(--text);font-weight:500}
.br-station-ord{font-size:11px;color:var(--text2);min-width:24px;text-align:right}
.br-tooltip{font-size:11px!important;padding:3px 8px!important;border-radius:6px!important;background:var(--card)!important;color:var(--text)!important;border:1px solid var(--border)!important;box-shadow:0 2px 8px rgba(0,0,0,.15)!important}
.br-stop-marker{transition:fill-opacity .2s}
@keyframes brPulse{0%,100%{box-shadow:0 0 0 3px rgba(233,30,99,.4)}50%{box-shadow:0 0 0 8px rgba(233,30,99,.1)}}
[data-theme="dark"] .br-dot{border-color:#64B5F6;background:var(--card)}
[data-theme="dark"] .br-line-seg{background:#64B5F6}
[data-theme="dark"] .br-station-item:hover{background:rgba(100,181,246,.1)}
[data-theme="dark"] .br-station-item.br-active{background:rgba(244,67,54,.15)}
@media(min-width:768px){.br-panel{left:16px;bottom:16px;border-radius:16px;max-height:60vh}}

/* 로그인 안내 배너 */
.login-banner{display:flex;align-items:center;justify-content:center;gap:8px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;padding:8px 12px;font-size:13px;font-weight:600;text-align:center;cursor:pointer;position:relative;z-index:100}
.login-banner-text{flex:1;cursor:pointer}
.login-banner-close{background:none;border:none;color:rgba(255,255,255,.8);font-size:16px;cursor:pointer;padding:2px 6px;line-height:1;flex-shrink:0}
.login-banner-close:hover{color:#fff}
[data-theme="dark"] .login-banner{background:linear-gradient(135deg,#4a5568,#553c9a)}
