/* sheslab — Country Community (SNS 표준 UX + 매거진 정체성) */
.community-wrap { padding: 18px 0 36px; }
.community-wrap > * { padding-left: 16px; padding-right: 16px; }
@media (min-width: 600px) { .community-wrap > * { padding-left: 24px; padding-right: 24px; } }

.community-head {
    text-align: center;
    padding-top: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(232, 164, 184, 0.22);
    position: relative;
}
.back-link {
    position: absolute;
    top: 18px; left: 16px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: lowercase;
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 10px;
    border-bottom: 1px dotted transparent;
    transition: color 0.2s, border-color 0.2s;
}
.back-link:hover { color: var(--primary-dark); border-bottom-color: var(--primary); }

.community-flag {
    font-size: clamp(3.6rem, 12vw, 5rem);
    line-height: 1;
    margin: 14px 0 8px;
    filter: drop-shadow(0 2px 6px rgba(142, 88, 120, 0.22));
}
.community-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(2rem, 7vw, 3rem);
    letter-spacing: 0.03em;
    line-height: 1.05;
    margin: 0 0 10px;
    text-transform: uppercase;
    background: linear-gradient(180deg, var(--text) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.community-meta {
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--primary-dark);
    margin-bottom: 18px;
}
.community-tabs {
    display: inline-flex;
    gap: 4px;
    background: rgba(254, 252, 250, 0.7);
    border: 1px solid rgba(232, 164, 184, 0.28);
    border-radius: 999px;
    padding: 4px;
}
.ct-tab {
    appearance: none;
    background: transparent;
    border: none;
    padding: 6px 16px;
    border-radius: 999px;
    font-family: 'Pretendard', sans-serif;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.25s, color 0.25s;
}
.ct-tab:hover { color: var(--primary-dark); }
.ct-tab.active {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    color: #FFF;
}

/* ============================================================
 * SNS 스타일 카드 (industry-standard UX + sheslab 정체성)
 * ============================================================ */
.community-feed {
    display: flex;
    flex-direction: column;
    margin-top: 18px;
    background: transparent;
}
.cf-card {
    padding: 14px 0 12px;
    border-bottom: 1px solid rgba(181, 115, 158, 0.16);
    transition: background-color 0.2s ease;
    cursor: pointer;
}
.cf-card:hover { background: rgba(232, 164, 184, 0.04); }
.cf-card:last-child { border-bottom: none; }

/* 글로브 카드 클릭으로 정확히 점프된 글 강조 (deep-link UX) */
.cf-card--highlight {
    animation: cf-pulse 2.4s ease-out;
    border-left: 3px solid var(--secondary);
    padding-left: 12px;
    margin-left: -15px;
}
@keyframes cf-pulse {
    0%   { background: rgba(232, 164, 184, 0.28); }
    40%  { background: rgba(232, 164, 184, 0.18); }
    100% { background: transparent; }
}

/* 카드 헤더 (아바타+닉네임+시간) — 좌측 정렬 SNS 패턴 */
.cf-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.cf-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose-soft), var(--lilac-soft));
    border: 1px solid rgba(232, 164, 184, 0.30);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(142, 88, 120, 0.10);
}
.cf-byline {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 1px;
}
.cf-name-row {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}
.cf-nick {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 600;
    font-size: 1.02rem;
    color: var(--primary-dark);
    line-height: 1.2;
}
.cf-badge { font-size: 0.85rem; line-height: 1; }
.cf-handle {
    font-family: 'Pretendard', sans-serif;
    font-weight: 500;
    font-size: 0.78rem;
    color: var(--text-light);
}
.cf-time-row {
    font-family: 'Pretendard', sans-serif;
    font-size: 0.74rem;
    color: var(--text-muted);
    letter-spacing: 0.01em;
}

/* 본문 — SNS 표준 폰트 사이즈 (15~17px) */
.cf-text {
    font-family: 'Pretendard', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text);
    word-break: keep-all;
    margin: 4px 0 12px;
    white-space: pre-wrap;
}

/* 액션 row — SNS 표준 (좌측 정렬, 큰 클릭 영역) */
.cf-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    margin-left: -8px;
}
.cf-action {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--text-muted);
    font-family: 'Pretendard', sans-serif;
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    user-select: none;
}
.cf-action:hover { background: rgba(232, 164, 184, 0.10); }
.cf-action .cf-icon { font-size: 1rem; line-height: 1; }
.cf-action.comment:hover { color: #6366f1; }
.cf-action.like:hover    { color: var(--secondary); }
.cf-action.share:hover   { color: var(--accent); }
.cf-action.like.liked    { color: var(--secondary); font-weight: 700; }
.cf-action.like.liked .cf-icon { transform: scale(1.1); }

/* 카드 전체 클릭 시 화살표 hint (deeplink) */
.cf-card-arrow {
    margin-left: auto;
    color: var(--text-light);
    font-size: 0.86rem;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
}
.cf-card:hover .cf-card-arrow { opacity: 0.8; transform: translateX(2px); }

.cf-loading, .cf-empty {
    text-align: center;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: var(--text-muted);
    padding: 40px 0;
}
.cf-empty .cf-write-cta {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    color: #FFF;
    border-radius: 999px;
    font-style: italic;
    font-size: 0.94rem;
    text-decoration: none;
}

@media (max-width: 480px) {
    .cf-avatar { width: 36px; height: 36px; font-size: 1.35rem; }
    .cf-nick { font-size: 0.96rem; }
    .cf-text { font-size: 0.96rem; }
}

/* ─────────────────────────────────────────────────────────────────────
 * Phase 5 — 인라인 댓글 패널 (트위터식 펼침)
 * ───────────────────────────────────────────────────────────────────── */
.cf-comments-panel {
    margin-top: 14px;
    padding: 14px 0 4px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    animation: cf-comments-slide-in 220ms ease-out;
}
.cf-comments-loading,
.cf-comments-empty {
    font-size: 0.84rem;
    color: var(--muted, #888);
    padding: 10px 6px;
    text-align: center;
}
/* 비로그인 댓글 게이트 — 작성란 대신 로그인 유도 */
.cf-comment-gate {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 16px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 160ms ease, transform 160ms ease;
}
.cf-comment-gate:hover { opacity: 0.92; transform: translateY(-1px); }
.cf-comment-gate-note {
    margin-top: 8px;
    font-size: 0.74rem;
    color: var(--muted, #999);
    text-align: center;
    line-height: 1.4;
}
/* 번역 버튼 */
.cf-translate-wrap { margin: 2px 0 8px; }
.cf-translate-btn {
    background: none; border: none; color: var(--primary-dark, #8b5cf6);
    font-size: 0.8rem; cursor: pointer; padding: 2px 0; font-weight: 600;
}
.cf-translate-btn:hover { text-decoration: underline; }
.cf-translate-btn:disabled { color: #9ca3af; cursor: default; }
.cf-translated {
    margin-top: 6px; padding: 8px 10px; background: rgba(139,92,246,0.06);
    border-radius: 8px; font-size: 0.9rem; color: #374151; line-height: 1.5;
}
.cf-translated[hidden] { display: none; }
.cf-comments-list {
    margin-bottom: 8px;
}
/* 댓글 — 원글과 시각적 구분: 들여쓰기 + 좌측 보더 + 옅은 배경 */
.cf-comments-list .comment-item {
    padding: 9px 12px;
    margin: 0 0 6px 18px;
    border-left: 3px solid var(--primary, #e8a4b8);
    background: rgba(139, 92, 246, 0.045);
    border-radius: 0 8px 8px 0;
}
/* 답글(1단계) — 한 단계 더 들여쓰기 */
.cf-comments-list .comment-item--reply {
    margin-left: 38px;
    border-left-color: var(--secondary, #c9a0dc);
    background: rgba(139, 92, 246, 0.08);
}
@keyframes cf-comments-slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .cf-comments-panel { animation: none; }
}
