/* ========== 📅 레슨 예약 ========== */

/* 코치 헤더 */
.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: var(--text2); }
.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-detail {
    font-size: 12px;
    color: var(--text2);
    margin-bottom: 12px;
    padding: 0 2px;
}

/* 레슨 요일 아님 */
.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: var(--input-bg); }

.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: var(--input-bg); }
.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: var(--input-bg); }
.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: var(--text2); 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: min(92vw, 720px); 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: var(--input-bg); }
.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 14px;
    text-align: center;
    background: var(--card);
    border-bottom: none;
}
.comm-header h2 { font-size: 22px; font-weight: 800; margin-bottom: 2px; color: var(--text); }

/* 섹션 타이틀 */
.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.06);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.comm-my-card:hover, .comm-my-card:active {
    box-shadow: 0 3px 12px rgba(102,126,234,0.15);
    transform: translateY(-1px);
    border-color: #667eea;
}
.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 4px; }
.comm-search-bar { position: relative; }
.comm-search-bar input { width: 100%; padding: 12px 40px 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--input-bg); color: var(--text); font-size: 14px; font-weight: 500; outline: none; box-sizing: border-box; box-shadow: none; transition: all 0.2s; }
.comm-search-bar input:focus { border-color: #667eea; background: var(--card); box-shadow: 0 2px 8px rgba(102,126,234,0.1); }
.comm-search-bar input::placeholder { color: var(--text2); font-weight: 400; }
.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; }

/* 커뮤니티 탭 하단 여백 (마지막 줄 짤림 방지) */
#tabCommunity { padding-bottom: 24px; }

/* 둘러보기 카드 */
.comm-browse-card {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    margin: 4px 16px;
    background: var(--card);
    border-radius: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    border: 1px solid var(--border);
    transition: transform 0.15s, box-shadow 0.15s;
}
.comm-browse-card:active {
    transform: scale(0.98);
    box-shadow: 0 0 0 rgba(0,0,0,0);
}
.comm-browse-icon { font-size: 28px; margin-right: 12px; flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--input-bg); border-radius: 12px; }
.comm-browse-info { flex: 1; min-width: 0; overflow: hidden; }
.comm-browse-name { font-size: 15px; font-weight: 700; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-browse-sub { font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comm-browse-meta { font-size: 11px; color: var(--text2); margin-top: 3px; }
.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: linear-gradient(135deg, rgba(102,126,234,0.12), rgba(118,75,162,0.08));
    color: #667eea;
    font-weight: 700;
    border: 1.5px solid rgba(102,126,234,0.3);
}
.comm-join-btn:hover, .comm-join-btn:active { background: linear-gradient(135deg, #667eea, #764ba2); color: white; }
.comm-enter-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}
.comm-enter-btn:hover, .comm-enter-btn:active { 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 16px 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 삭제됨 */

/* 커뮤니티 내부 뷰 헤더 */
.comm-view-header {
    padding: 10px 16px;
    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-tab-bar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 6px 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.comm-tab-bar::-webkit-scrollbar { display: none; }
.comm-header-tabs { display: flex; gap: 4px; }
.comm-htab {
    font-size: 18px;
    padding: 6px 12px;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.4;
    transition: all 0.15s;
}
.comm-htab.active {
    opacity: 1;
    background: var(--input-bg);
}
.comm-region-select {
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    color: var(--text);
}
.comm-region-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 100;
    min-width: 120px;
    overflow: hidden;
    margin-top: 4px;
}
.comm-region-option {
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.comm-region-option:active { background: var(--input-bg); }
.comm-region-option.active { color: #667eea; font-weight: 600; }
.comm-view-join-compact {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.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 16px;
    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: 8px; padding: 12px 16px;
    overflow-x: auto; background: transparent;
    -webkit-overflow-scrolling: touch;
}
.comm-cat-bar::-webkit-scrollbar { display: none; }
.comm-cat-btn {
    padding: 8px 14px; border-radius: 20px; min-height: 36px;
    border: 1.5px solid var(--border); background: var(--card);
    font-size: 13px; cursor: pointer; white-space: nowrap;
    font-weight: 500; color: var(--text2);
    transition: all 0.2s;
}
.comm-cat-btn:active { transform: scale(0.95); }
.comm-cat-btn.active { background: #667eea; color: white; border-color: #667eea; font-weight: 600; }

.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: 8px 16px; padding: 16px; background: var(--card);
    border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
    cursor: pointer; transition: all 0.2s;
}
.comm-post-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.comm-post-card:active { transform: scale(0.98); }
.comm-post-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.comm-post-cat { font-size: 11px; color: #667eea; font-weight: 600; }
.comm-post-time { font-size: 11px; color: var(--text2); letter-spacing: -0.2px; }
.comm-post-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.4; }
.comm-post-store { font-size: 13px; margin-bottom: 6px; color: var(--text2); }
.comm-post-preview { font-size: 13px; color: var(--text2); margin-bottom: 10px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.comm-post-footer { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); padding-top: 8px; border-top: 1px solid var(--border); }
.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; white-space: nowrap; }
.comm-empty {
    text-align: center; padding: 60px 20px; color: var(--text2); font-size: 15px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}

/* 글 상세 */
.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 #fdd835;
    position: relative;
}
.comm-post-card.notice-card .comm-post-footer {
    border-top-color: #fdd83540;
}
.comm-post-card.notice-card .comm-post-title {
    font-weight: 800;
    color: var(--text);
}
.notice-pin {
    font-size: 13px;
}

/* ===== 카테고리 태그 뱃지 ===== */
.comm-post-tag {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 10px;
    line-height: 1;
    letter-spacing: -0.2px;
}

/* 카테고리 헤더 */
.comm-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    background: var(--card);
    border-radius: 0;
    box-shadow: none;
    transition: background 0.2s;
}
.comm-cat-header:active {
    background: var(--bg2, #f0f0f0);
}
.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: var(--input-bg); 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:var(--input-bg); border:1px solid var(--border); 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:var(--text2); 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:var(--text2); 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; }
/* ========== 리뷰 시스템 ========== */

.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: var(--input-bg);
    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: min(92vw, 640px);
    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: var(--input-bg);
    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;
}
/* ========== 장터 (중고거래) 스타일 ========== */

/* 장터 필터 바 */
.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: repeat(auto-fill, minmax(140px, 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: var(--text2);
}

.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: var(--text2); 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: var(--input-bg); }

.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); }
/* ========== 초대장 생성기 스타일 ========== */
.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: var(--text2); 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: var(--border); 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); }
/* ===== 가게 태그 시스템 ===== */
.tag-filter-bar, .tag-filter-row {
padding: 4px 12px;
display: flex; gap: 6px; overflow-x: auto;
-webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.tag-filter-bar.visible, .tag-filter-row { opacity: 1; }
.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: 10002;
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); }

.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(auto-fill, minmax(90px, 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: 72px; 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;
width: 100%; flex-shrink: 0;
flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
-webkit-overflow-scrolling: touch;
position: relative; scroll-behavior: smooth;
min-height: 34px; /* 레이아웃 시프트 방지 — 칩 로딩 전에도 자리 확보 */
}
.cat-chips.expanded { /* no-op for scroll mode */ }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
flex-shrink: 0; padding: 6px 12px; border-radius: 16px;
font-size: 11px; font-weight: 500; cursor: pointer;
background: #f1f3f5; color: #495057; border: 1.5px solid transparent;
transition: all 0.2s; white-space: nowrap; min-height: 34px;
display: inline-flex; align-items: center;
}
.cat-toggle-btn {
position: absolute; right: 0; top: 4px;
padding: 6px 10px; border-radius: 16px;
font-size: 11px; cursor: pointer; background: var(--card, #fff);
color: var(--text2); border: 1px dashed var(--border);
min-height: 34px; display: inline-flex; align-items: center;
z-index: 2; box-shadow: -8px 0 8px var(--card, #fff);
}
.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:var(--input-bg); }
.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)} }

/* ===== 이모지 리뷰 + 가격 제보 ===== */
.emoji-review { padding: 8px 0; }
.emoji-review-title { font-size: 13px; font-weight: 700; margin-bottom: 6px; display: flex; align-items: center; gap: 4px; }
.emoji-review-stats { font-size: 12px; color: var(--text2); margin-bottom: 8px; line-height: 1.5; }
.emoji-review-stats .stat-highlight { font-weight: 700; color: var(--text); }
.emoji-row { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; flex-wrap: nowrap; }
.emoji-row-label { font-size: 12px; font-weight: 600; color: var(--text2); min-width: 40px; flex-shrink: 0; }
.emoji-btn {
min-width: 0; min-height: 32px; padding: 4px 8px;
border-radius: 16px; border: 1.5px solid var(--border); background: var(--card);
font-size: 12px; cursor: pointer; transition: all 0.15s;
display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; flex-shrink: 0;
}
.emoji-btn:active { transform: scale(0.95); }
.emoji-btn.selected { border-color: #667eea; background: #f0f4ff; box-shadow: 0 0 0 1.5px 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: 4px 0; }

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

@keyframes slideUp { from { transform:translateY(100px);opacity:0 } to { transform:translateY(0);opacity:1 } }

/* ========== 커뮤니티 기능 바로가기 ========== */
.comm-feature-shortcuts{display:flex;gap:8px;padding:8px 16px;overflow-x:auto;-webkit-overflow-scrolling:touch}
.comm-feature-shortcuts::-webkit-scrollbar{display:none}
.comm-feature-btn{padding:8px 14px;border-radius:20px;border:1.5px solid var(--border);background:var(--card);color:var(--text);font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap;transition:all .2s;flex-shrink:0}
.comm-feature-btn:active{transform:scale(0.95);background:var(--accent,#667eea);color:#fff;border-color:var(--accent,#667eea)}

/* ========== 캘린더 이벤트 목록 (월) ========== */
.mycal-event-list{margin-top:12px;border-top:1px solid var(--border);padding-top:12px}
.mycal-event-list-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;padding:0 4px}
.mycal-event-list-header span{font-size:14px;font-weight:700;color:var(--text)}
.mycal-add-fab{padding:6px 14px;border:none;border-radius:20px;background:var(--accent,#667eea);color:#fff;font-size:12px;font-weight:600;cursor:pointer}
.mycal-evlist-date{font-size:12px;font-weight:700;color:var(--accent,#667eea);padding:8px 4px 4px;border-top:1px solid var(--border);margin-top:4px}
.mycal-evlist-date.today{color:#e74c3c}
.mycal-evlist-item{display:flex;align-items:center;gap:8px;padding:8px;border-radius:8px;cursor:pointer;transition:background .15s}
.mycal-evlist-item:active{background:var(--border)}
.mycal-evlist-icon{font-size:16px;flex-shrink:0}
.mycal-evlist-info{flex:1;min-width:0}
.mycal-evlist-title{font-size:13px;font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mycal-evlist-type{font-size:11px;color:var(--text2)}

/* ========== 캘린더 설정 버튼 ========== */
.mycal-settings-btn{position:absolute;right:32px;top:4px;background:none;border:none;font-size:16px;cursor:pointer;padding:6px;color:var(--text2)}

/* 다크모드 */

/* ===== 주사위 애니메이션 ===== */
@keyframes diceRoll {
  0% { transform: rotate(0deg) scale(1); }
  15% { transform: rotate(90deg) scale(1.15); }
  30% { transform: rotate(180deg) scale(0.9); }
  45% { transform: rotate(270deg) scale(1.2); }
  60% { transform: rotate(360deg) scale(0.85); }
  75% { transform: rotate(450deg) scale(1.1); }
  90% { transform: rotate(540deg) scale(0.95); }
  100% { transform: rotate(630deg) scale(1.05); }
}
@keyframes diceLand {
  0% { transform: scale(1.05) rotate(630deg); }
  40% { transform: scale(1.4) rotate(640deg); }
  70% { transform: scale(0.95) rotate(640deg); }
  100% { transform: scale(1) rotate(640deg); }
}
.dice-rolling { animation: diceRoll 0.8s ease-in-out infinite; }
.dice-landed { animation: diceLand 0.5s ease-out forwards; }

/* ===== 단골방 사장님 관리 패널 ===== */
.dangol-admin-panel {
  background: linear-gradient(135deg, #fff8e1, #fff3e0);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid #ffe0b2;
}
.dangol-admin-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
}
.dangol-admin-btn:active { background: var(--input-bg); }

/* 다크모드 — 단골방 어드민 */
/* ========== 🎮 미니게임 ========== */
.floating-game {
    position: fixed; bottom: 200px; 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; display: flex; align-items: center; justify-content: center;
}
.mg-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.5); display: flex;
    align-items: flex-end; justify-content: center;
    opacity: 0; transition: opacity 0.3s;
}
.mg-overlay.show { opacity: 1; }
.mg-sheet {
    background: var(--card); border-radius: 20px 20px 0 0;
    width: 100%; max-width: min(92vw, 640px); max-height: 95vh; min-height: 80vh;
    overflow-y: auto; padding: 20px 16px 32px;
    display: flex; flex-direction: column;
    transform: translateY(100%); transition: transform 0.3s;
}
.mg-overlay.show .mg-sheet { transform: translateY(0); }
.mg-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.mg-close {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--border); border: none; color: var(--text);
    font-size: 16px; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
}
.mg-menu {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px;
}
.mg-menu-btn {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 8px; padding: 20px 12px;
    border-radius: 16px; border: 1px solid var(--border);
    background: var(--bg); color: var(--text); cursor: pointer;
    transition: all 0.15s;
}
.mg-menu-btn:active { transform: scale(0.95); }
.mg-menu-icon { font-size: 36px; }
.mg-menu-label { font-size: 14px; font-weight: 700; }
.mg-back {
    font-size: 13px; color: var(--text2); cursor: pointer;
    margin-bottom: 8px; font-weight: 600;
}
.mg-big-btn {
    padding: 14px 28px; border-radius: 14px; border: none;
    background: #667eea; color: #fff; font-size: 16px;
    font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.mg-big-btn:active { transform: scale(0.95); }
.mg-share-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 8px 16px; font-size: 13px; display: inline-flex; align-items: center; gap: 4px;
    vertical-align: middle; margin-left: 4px;
}
.mg-rps-btn {
    width: 80px; height: 80px; font-size: 32px;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; padding: 8px;
}
/* 게임 메뉴 카드 설명 */
.mg-menu-desc {
    font-size: 11px; color: var(--text2); font-weight: 400;
}

/* 뒤로가기 버튼 */
.mg-back-btn {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 14px; color: #667eea; cursor: pointer;
    margin-bottom: 8px; font-weight: 600; padding: 4px 0;
}

/* 숫자 맞추기 인풋 */
.mg-num-input {
    width: 100px; padding: 12px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--card);
    color: var(--text); font-size: 18px; text-align: center;
}

/* 숫자 화살표 애니메이션 */
.mg-num-arrow { display: inline-block; font-size: 24px; }
.mg-num-up { animation: mgBounceUp 0.6s ease; }
.mg-num-down { animation: mgBounceDown 0.6s ease; }
@keyframes mgBounceUp { 0%{transform:translateY(20px);opacity:0} 50%{transform:translateY(-8px)} 100%{transform:translateY(0);opacity:1} }
@keyframes mgBounceDown { 0%{transform:translateY(-20px);opacity:0} 50%{transform:translateY(8px)} 100%{transform:translateY(0);opacity:1} }

/* 끝말잇기 칩 */
.mg-word-chip {
    display: inline-block; padding: 4px 10px; border-radius: 16px;
    margin: 2px; font-size: 13px;
}
.mg-word-chip.cpu { background: var(--border); color: var(--text); }
.mg-word-chip.player { background: #667eea; color: #fff; }
.mg-word-input {
    width: 140px; padding: 12px; border-radius: 12px;
    border: 1px solid var(--border); background: var(--card);
    color: var(--text); font-size: 16px; text-align: center;
}

/* ===== 윷놀이 보드 (전통 윷판) ===== */
.mg-yut-board {
    position: relative; width: 280px; height: 280px;
    margin: 12px auto; border-radius: 16px;
    background: var(--input-bg);
}
.mg-yut-cell {
    position: absolute; width: 28px; height: 28px;
    border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
    font-size: 13px; transform: translate(-50%, -50%);
    background: var(--card); border: 2px solid var(--border);
    z-index: 1; transition: all 0.3s;
}
.mg-yut-corner { width: 34px; height: 34px; font-size: 14px; border-color: #667eea; font-weight: 700; }
.mg-yut-center { width: 36px; height: 36px; font-size: 15px; border-color: #ff9800; font-weight: 700; }
.mg-yut-start { border-color: #27ae60; background: #e8f5e9; }
.mg-yut-goal { border-color: #e74c3c; background: #ffeaea; font-size: 16px; width: 36px; height: 36px; }
.mg-yut-label {
    position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
    font-size: 9px; color: var(--text2); white-space: nowrap; margin-top: 2px;
}

/* 윷 던지기 스틱 */
.mg-yut-sticks {
    display: flex; gap: 12px; justify-content: center;
    margin: 12px 0; min-height: 60px; align-items: center;
}
.mg-yut-stick {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--card); border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; transition: all 0.3s;
}
.mg-yut-throwing {
    animation: mgYutSpin 0.3s linear infinite;
}
.mg-yut-landed {
    animation: mgYutLand 0.4s ease;
    border-color: #667eea; background: var(--input-bg);
}
@keyframes mgYutSpin {
    0% { transform: rotateY(0deg) scale(1); }
    50% { transform: rotateY(180deg) scale(1.1); }
    100% { transform: rotateY(360deg) scale(1); }
}
@keyframes mgYutLand {
    0% { transform: translateY(-20px) scale(1.2); opacity: 0.5; }
    60% { transform: translateY(4px) scale(0.95); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* 윷 결과 애니메이션 */
.mg-yut-result-anim {
    display: inline-block;
    animation: mgPopIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes mgPopIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* ===== 가위바위보 ===== */
.mg-rps-hands {
    display: flex; gap: 20px; align-items: center;
    justify-content: center; font-size: 48px;
}
.mg-rps-hand { display: inline-block; }
.mg-rps-shake {
    animation: mgRpsShake 0.4s ease-in-out 3;
}
.mg-rps-reveal {
    animation: mgPopIn 0.4s ease;
}
.mg-rps-countdown {
    font-size: 20px; font-weight: 700; color: var(--text);
    margin-top: 8px; animation: mgPopIn 0.3s ease;
}
.mg-rps-streak {
    text-align: center; font-size: 18px; font-weight: 700;
    color: #ff6b6b; margin: 4px 0;
    animation: mgPulse 0.6s ease infinite alternate;
}
@keyframes mgRpsShake {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-16px); }
}
@keyframes mgPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* ===== 컨페티 ===== */
.mg-confetti {
    position: absolute; width: 8px; height: 8px;
    border-radius: 2px; top: 0; z-index: 10;
    animation: mgConfettiFall 2s ease forwards;
    pointer-events: none;
}
@keyframes mgConfettiFall {
    0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
    100% { transform: translateY(200px) rotate(720deg) scale(0.3); opacity: 0; }
}

/* 다크모드 */
/* ========== 숫자맞추기 개선 UI ========== */
.mg-num-difficulty { padding: 12px; }
.mg-num-diff-title { font-size: 16px; font-weight: 700; text-align: center; margin-bottom: 16px; color: var(--text); }
.mg-num-diff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.mg-num-diff-btn {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 18px 12px; border: 2px solid var(--border); border-radius: 16px;
    background: var(--card); cursor: pointer; transition: all 0.2s;
}
.mg-num-diff-btn:active { transform: scale(0.95); }
.mg-num-diff-easy { border-color: #6bcb77; }
.mg-num-diff-easy:hover { background: #6bcb7715; }
.mg-num-diff-hard { border-color: #ff6b6b; }
.mg-num-diff-hard:hover { background: #ff6b6b15; }
.mg-num-diff-timer { border-color: #4d96ff; }
.mg-num-diff-timer:hover { background: #4d96ff15; }
.mg-num-diff-extreme { border-color: #ff9800; }
.mg-num-diff-extreme:hover { background: #ff980015; }
.mg-num-diff-icon { font-size: 32px; }
.mg-num-diff-label { font-size: 15px; font-weight: 700; color: var(--text); }
.mg-num-diff-desc { font-size: 12px; color: var(--text2); }

/* 타이머 */
.mg-num-timer-wrap { display: flex; align-items: center; gap: 10px; padding: 8px 12px; margin: 8px 0; }
.mg-num-timer-bar-bg { flex: 1; height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.mg-num-timer-bar-fill { height: 100%; border-radius: 4px; transition: width 1s linear, background 0.3s; }
.mg-num-timer-text { font-size: 18px; font-weight: 800; min-width: 40px; text-align: right; }
.mg-num-timer-pulse { animation: mgTimerPulse 0.5s infinite alternate; }
@keyframes mgTimerPulse { from { transform: scale(1); } to { transform: scale(1.15); } }

/* 슬롯머신 */
.mg-num-slot-wrap {
    display: flex; justify-content: center; margin: 16px 0;
}
.mg-num-slot {
    width: 120px; height: 80px; border-radius: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(102,126,234,0.4);
    overflow: hidden; position: relative;
}
.mg-num-slot-value {
    font-size: 36px; font-weight: 900; color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.mg-num-slot-placeholder { font-size: 36px; color: rgba(255,255,255,0.5); }
.mg-num-slot-spin .mg-num-slot-value { animation: mgSlotSpin 0.1s infinite; }
@keyframes mgSlotSpin {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

/* 범위 게이지바 */
.mg-num-range-wrap { padding: 0 16px; margin: 12px 0; }
.mg-num-range-labels { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.mg-num-range-bar {
    height: 12px; background: var(--border); border-radius: 6px;
    position: relative; overflow: visible; margin-bottom: 4px;
}
.mg-num-range-fill {
    position: absolute; top: 0; height: 100%; border-radius: 6px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: left 0.3s, width 0.3s;
}
.mg-num-range-indicator {
    position: absolute; top: -2px; width: 4px; height: 16px;
    background: #e74c3c; border-radius: 2px; transform: translateX(-50%);
    transition: left 0.3s;
}
.mg-num-range-info { text-align: center; font-size: 12px; color: var(--text2); }

/* 메시지/힌트 */
.mg-num-msg { text-align: center; font-size: 22px; font-weight: 700; margin: 8px 0; }
.mg-num-hint { text-align: center; font-size: 16px; margin: 4px 0; }
.mg-num-history { text-align: center; margin: 4px 0; font-size: 12px; color: var(--text2); }
.mg-num-guess-btn { background: linear-gradient(135deg, #667eea, #764ba2) !important; }

/* 풀스크린 축하 */
.mg-fullscreen-celebrate {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999; pointer-events: none;
    display: flex; align-items: center; justify-content: center;
    animation: mgCelFade 3s forwards;
}
@keyframes mgCelFade { 0%,70% { opacity: 1; } 100% { opacity: 0; } }
.mg-cel-text {
    font-size: 48px; font-weight: 900; color: #fff;
    text-shadow: 0 0 20px rgba(255,215,0,0.8), 0 4px 8px rgba(0,0,0,0.3);
    animation: mgCelBounce 0.6s ease;
}
@keyframes mgCelBounce { 0% { transform: scale(0); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
.mg-firework {
    position: absolute; border-radius: 50%;
    animation: mgFirework 1.5s ease-out forwards;
    pointer-events: none; line-height: 1;
}
@keyframes mgFirework {
    0% { transform: scale(0) translateY(0); opacity: 1; }
    50% { transform: scale(1.5) translateY(-40px); opacity: 0.8; }
    100% { transform: scale(0) translateY(-80px); opacity: 0; }
}

/* ========== 장소 정하기 ========== */
.mg-place-tabs { display: flex; gap: 4px; margin-bottom: 12px; padding: 0 4px; }
.mg-place-tab {
    flex: 1; padding: 10px 8px; border: 1.5px solid var(--border);
    border-radius: 10px; background: var(--card); font-size: 13px;
    font-weight: 600; cursor: pointer; text-align: center; color: var(--text2);
    transition: all 0.2s;
}
.mg-place-tab.active { background: #667eea; color: white; border-color: #667eea; }

.mg-place-input-wrap { display: flex; gap: 8px; margin-bottom: 12px; padding: 0 4px; }
.mg-place-input {
    flex: 1; padding: 10px 14px; border: 1.5px solid var(--border);
    border-radius: 10px; font-size: 14px; outline: none; background: var(--card); color: var(--text);
}
.mg-place-input:focus { border-color: #667eea; }

.mg-place-list { display: flex; flex-direction: column; gap: 6px; padding: 0 4px; }
.mg-place-item {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px;
    background: var(--card); border-radius: 12px; border: 1px solid var(--border);
}
.mg-place-item-emoji { font-size: 20px; }
.mg-place-item-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); }
.mg-place-item-del {
    background: none; border: none; color: var(--text2); font-size: 16px;
    cursor: pointer; padding: 4px 8px;
}

/* 룰렛 */
.mg-roulette-wrap {
    position: relative; width: 260px; height: 260px; margin: 16px auto;
}
.mg-roulette-pointer {
    position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
    font-size: 24px; z-index: 2; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    color: #e74c3c;
}
.mg-roulette-wheel {
    width: 100%; height: 100%; border-radius: 50%; position: relative;
    border: 4px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    overflow: hidden; background: var(--card);
}
.mg-roulette-seg {
    position: absolute; width: 50%; height: 50%; top: 0; left: 50%;
    transform-origin: 0% 100%; overflow: hidden;
}
.mg-roulette-seg::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 200%; height: 200%;
    background: var(--seg-color);
    transform-origin: 0% 100%;
    transform: rotate(calc(-1 * var(--seg-angle)));
    border-right: 1px solid rgba(255,255,255,0.3);
}
.mg-roulette-seg-text {
    position: absolute; left: 20px; top: 8px;
    font-size: 11px; font-weight: 700; color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    transform-origin: 0% 100%; white-space: nowrap;
}
.mg-roulette-result {
    text-align: center; font-size: 20px; font-weight: 800;
    color: var(--text); margin: 12px 0; padding: 12px;
    background: linear-gradient(135deg, #ffd93d20, #ff6b6b20);
    border-radius: 12px; position: relative;
}
.mg-roulette-spin-btn:disabled { opacity: 0.7; }

/* 투표 */
.mg-vote-list { display: flex; flex-direction: column; gap: 10px; padding: 0 4px; }
.mg-vote-item { background: var(--card); border-radius: 12px; padding: 12px 14px; border: 1px solid var(--border); }
.mg-vote-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.mg-vote-count { font-size: 13px; color: #667eea; font-weight: 700; }
.mg-vote-bar-bg { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.mg-vote-bar-fill { height: 100%; background: linear-gradient(90deg, #667eea, #764ba2); border-radius: 4px; transition: width 0.3s; }
.mg-vote-btn {
    padding: 6px 16px; border: 1.5px solid #667eea; border-radius: 20px;
    background: rgba(102,126,234,0.08); color: #667eea; font-size: 13px;
    font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.mg-vote-btn:active { background: #667eea; color: white; }

/* ========== 랜덤 추첨 ========== */
.raffle-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9500;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.6);padding:20px}
.raffle-modal{background:var(--card,#fff);border-radius:20px;width:100%;max-width:min(92vw, 720px);padding:24px;text-align:center;max-height:80vh;overflow-y:auto}
.raffle-slot{display:flex;justify-content:center;gap:8px;margin:20px 0;flex-wrap:wrap}
.raffle-slot-item{width:80px;height:80px;border-radius:16px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:14px;font-weight:700;animation:raffleSlotSpin .3s ease-in-out}
@keyframes raffleSlotSpin{0%{transform:rotateX(0)}50%{transform:rotateX(180deg)}100%{transform:rotateX(360deg)}}
.raffle-slot-item .raffle-avatar{font-size:28px;margin-bottom:2px}

/* ===== 커뮤니티 다크모드 ===== */
/* ========== 커뮤니티 마커 ==========  */
.community-marker { background: none !important; border: none !important; }
.community-marker-inner {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--card, #fff); border: 2.5px solid #667eea;
    box-shadow: 0 2px 10px rgba(102,126,234,0.35);
    display: flex; align-items: center; justify-content: center;
    position: relative; transition: transform .15s;
}
.community-marker-inner:hover { transform: scale(1.12); }
.community-marker-icon { font-size: 20px; line-height: 1; }
.community-marker-badge {
    position: absolute; top: -4px; right: -6px;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; background: #e74c3c; color: #fff;
    font-size: 10px; font-weight: 700; line-height: 18px;
    text-align: center;
}

/* (PC 바텀시트 규칙 → 위 768px 블록에 통합됨) */

/* ========== 동네 제보 시스템 ========== */
.lr-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:flex-end;justify-content:center}
.lr-form-panel{position:relative;z-index:1;background:var(--bg);border-radius:20px 20px 0 0;width:100%;max-width:min(92vw, 720px);padding:24px 20px 32px;box-shadow:0 -4px 24px rgba(0,0,0,0.2);max-height:85vh;overflow-y:auto}
.lr-cat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(70px,1fr));gap:8px;margin-bottom:16px}
.lr-cat-btn{background:var(--card);border:2px solid var(--border);border-radius:12px;padding:10px 4px;text-align:center;cursor:pointer;transition:all .2s}
.lr-cat-btn.active{border-color:var(--cat-color,#667eea);background:color-mix(in srgb,var(--cat-color,#667eea) 8%,var(--card))}
.lr-cat-btn:active{transform:scale(0.95)}
.lr-field{margin-bottom:12px}
.lr-field label{font-size:12px;font-weight:700;color:var(--text2);display:block;margin-bottom:4px}
.lr-field input,.lr-field textarea{width:100%;padding:10px 14px;border:1.5px solid var(--border);border-radius:12px;background:var(--card);color:var(--text);font-size:14px;outline:none;box-sizing:border-box;font-family:inherit}
.lr-field input:focus,.lr-field textarea:focus{border-color:#667eea}
.lr-submit-btn{width:100%;padding:14px;border:none;border-radius:14px;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:15px;font-weight:700;cursor:pointer;margin-top:8px}
.lr-list{display:flex;flex-direction:column;gap:8px}
.lr-card{background:var(--card);border-radius:12px;padding:12px 14px;cursor:pointer;transition:transform .1s}
.lr-card:active{transform:scale(0.98)}
.lr-card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.lr-cat{font-size:11px;font-weight:700;padding:3px 10px;border-radius:8px}
.lr-time{font-size:11px;color:var(--text2)}
.lr-title{font-size:14px;font-weight:700;color:var(--text);margin-bottom:4px}
.lr-loc,.lr-date,.lr-discount{font-size:12px;color:var(--text2);margin-bottom:2px}
.lr-discount{color:var(--accent,#667eea);font-weight:600}
.lr-footer{display:flex;justify-content:space-between;font-size:11px;color:var(--text2);margin-top:6px}

/* ===== Profile Tab (unified with feed/market card style) ===== */
.cp-section-title {
    font-size: 15px; font-weight: 800; margin: 12px 16px 8px; color: var(--text);
}
.cp-card {
    margin: 8px 16px; padding: 16px; background: var(--card);
    border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
}
.cp-inline-editor.cp-card { margin: 8px 16px; }
.cp-card-name { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.cp-card-region { font-size: 13px; color: var(--text2); margin-bottom: 4px; }
.cp-card-rating { font-size: 14px; font-weight: 700; color: #3B82F6; margin-bottom: 4px; }
.cp-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.cp-card-tag {
    display: inline-block; padding: 3px 10px; border-radius: 8px;
    font-size: 11px; font-weight: 600;
    background: rgba(59,130,246,0.1); color: #3B82F6; border: 1px solid rgba(59,130,246,0.2);
}
.cp-card-bio { font-size: 13px; color: var(--text2); margin-bottom: 4px; }
.cp-card-edit { margin-top: 10px; text-align: right; }
.cp-card-edit button {
    background: rgba(59,130,246,0.08); color: #3B82F6; border: 1px solid #BFDBFE;
    padding: 6px 16px; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.cp-empty-card {
    margin: 8px 16px; padding: 24px 16px; background: var(--card);
    border-radius: 16px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid var(--border); text-align: center;
}
.cp-empty-card .cp-empty-icon { font-size: 36px; margin-bottom: 8px; }
.cp-empty-card .cp-empty-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.cp-empty-card .cp-empty-desc { font-size: 12px; color: var(--text2); margin-bottom: 12px; }
.cp-empty-card button {
    background: linear-gradient(135deg,#3B82F6,#1E40AF); color: #fff; border: none;
    padding: 10px 24px; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
}
.cp-member-section {
    margin: 16px 16px 0; padding-top: 16px; border-top: 1px solid var(--border);
}
.cp-member-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.cp-member-header .cp-member-count { font-size: 15px; font-weight: 800; }
.cp-member-stats { display: flex; gap: 6px; font-size: 12px; }
.cp-member-stats .stat-owner { background: #667eea15; color: #667eea; padding: 3px 8px; border-radius: 8px; }
.cp-member-stats .stat-admin { background: #ff980015; color: #ff9800; padding: 3px 8px; border-radius: 8px; }
.cp-member-stats .stat-member { background: var(--border); padding: 3px 8px; border-radius: 8px; }
.cp-member-search {
    width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px;
    font-size: 13px; background: var(--bg); color: var(--text); outline: none;
    box-sizing: border-box; margin-bottom: 10px;
}
.cp-member-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.cp-member-avatar {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
}
.cp-member-avatar-placeholder {
    width: 40px; height: 40px; border-radius: 50%; background: var(--border);
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.cp-member-info { flex: 1; min-width: 0; }
.cp-member-nick {
    font-weight: 600; font-size: 14px; overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; max-width: 140px;
}
.cp-member-date { font-size: 11px; color: var(--text2); margin-top: 2px; }
.cp-role-badge {
    font-size: 10px; color: #fff; padding: 1px 6px; border-radius: 8px; font-weight: 600;
}
.cp-role-badge.owner { background: #667eea; }
.cp-role-badge.admin { background: #ff9800; }
.cp-profile-badge {
    font-size: 10px; color: #3B82F6; background: rgba(59,130,246,0.08);
    padding: 1px 6px; border-radius: 8px;
}
.cp-me-badge {
    font-size: 11px; color: #667eea; background: #667eea15;
    padding: 2px 8px; border-radius: 10px;
}
.cp-member-more {
    background: none; border: none; font-size: 16px; cursor: pointer; padding: 4px 8px;
}
