/* ========== 📸 스냅 ========== */
.snap-container { padding: 0; }

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

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

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

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

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

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

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

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

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

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

/* 필터 바 */
.snap-filter {
    display: flex; gap: 8px; padding: 12px 12px 4px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.snap-filter-btn {
    padding: 6px 12px; border-radius: 16px; min-height: 32px;
    border: 1.5px solid var(--border); background: var(--card);
    font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
    color: var(--text); transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.snap-filter-btn:active { transform: scale(0.95); }
.snap-filter-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2); color: white; border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102,126,234,0.3);
    font-weight: 700;
}

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

/* 삭제 버튼 */
/* 스냅 보드 (그리드) 뷰 */
.snap-board { padding: 4px; }
.snap-board-grid {
    display: grid; gap: 3px;
}
.snap-board-grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.snap-board-grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.snap-board-item {
    position: relative; overflow: hidden; border-radius: 4px;
    aspect-ratio: 1; cursor: pointer; background: var(--border);
}
.snap-board-item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.snap-board-item .snap-board-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    padding: 6px 8px; display: flex; flex-direction: column; justify-content: flex-end;
}
.snap-board-item .snap-board-tags {
    display: flex; flex-wrap: wrap; gap: 3px;
}
.snap-board-item .snap-board-tag {
    font-size: 9px; color: white; background: rgba(238,90,36,0.7);
    padding: 1px 6px; border-radius: 8px; font-weight: 600;
}
.snap-board-item .snap-board-time {
    font-size: 9px; color: rgba(255,255,255,0.8); margin-top: 2px;
}
.snap-board-item .snap-board-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; font-size: 28px; background: var(--border); opacity: 0.2;
}

/* 그리드 선택 버튼 */
.snap-grid-selector {
    display: flex; gap: 4px; align-items: center;
}
.snap-grid-btn {
    width: 28px; height: 28px; border-radius: 8px; border: 1.5px solid rgba(255,255,255,0.4);
    background: none; color: white; font-size: 11px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.snap-grid-btn.active {
    background: rgba(255,255,255,0.25); border-color: white;
}

/* 스냅 지도 썸네일 마커 */
.snap-map-thumb { background: none !important; border: none !important; }
.snap-thumb-wrap {
    width: 64px; height: 64px; border-radius: 12px; overflow: hidden;
    border: 3.5px solid #ee5a24; background: var(--card);
    box-shadow: 0 3px 12px rgba(0,0,0,0.35);
    position: relative;
}
.snap-thumb-wrap::after {
    content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
    width: 0; height: 0;
    border-left: 8px solid transparent; border-right: 8px solid transparent;
    border-top: 8px solid #ee5a24;
}
.snap-thumb-placeholder {
    width: 100%; height: 100%; display: flex; align-items: center;
    justify-content: center; font-size: 20px; background: var(--input-bg); opacity: 0.3;
}

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

.snap-view-toggle { background:rgba(255,255,255,0.25); color:white; border:none; border-radius:8px; padding:6px 12px; font-size:12px; font-weight:600; cursor:pointer; white-space:nowrap; backdrop-filter:blur(4px); }
.snap-view-toggle:active { background:rgba(255,255,255,0.4); }
/* ========== 스냅 나눔 뱃지 ========== */
.snap-nanum-badge{position:absolute;top:6px;left:6px;z-index:2;background:linear-gradient(135deg,#ff6b35,#f7931e);color:#fff;font-size:11px;font-weight:700;padding:3px 8px;border-radius:10px;box-shadow:0 1px 4px rgba(0,0,0,0.2)}
.snap-nanum-done-badge{position:absolute;top:6px;left:6px;z-index:2;background:var(--success,#4CAF50);color:#fff;font-size:11px;font-weight:700;padding:3px 8px;border-radius:10px;box-shadow:0 1px 4px rgba(0,0,0,0.2)}

/* ========== Task 3: 스냅 클러스터 목록 ========== */
.snap-cluster-list { padding: 12px; }
.snap-cluster-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--card);
  border-radius: 12px; margin-bottom: 8px;
  cursor: pointer; border: 1px solid var(--border);
}
.snap-cluster-item:active { transform: scale(0.98); }
.snap-cluster-thumb {
  width: 52px; height: 52px; border-radius: 10px;
  object-fit: cover; background: var(--border); flex-shrink: 0;
}
.snap-cluster-info { flex: 1; min-width: 0; }
.snap-cluster-name { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snap-cluster-meta { font-size: 12px; color: var(--text2); margin-top: 2px; }
