/* ============================================================================
   community.css — 커뮤니티 게시판 전용 스타일

   원칙:
   - 모든 색상·간격 토큰(--ro-*) 사용 → 다크/라이트 자동 대응
   - 반응형: xs(<480) → sm → md → lg → tv(>=1920) 6단
   - 접근성: focus-visible, prefers-reduced-motion 존중
   - 기존 components.css 의 .ro-btn / .ro-card / .ro-chip 재활용
   ============================================================================ */

/* ─────────────────────────────────────────────────────────────────────────
   공통: 페이지 래퍼
   ───────────────────────────────────────────────────────────────────────── */
.ro-community {
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 28px) 80px;
}

.ro-community-header {
    margin-bottom: clamp(24px, 4vw, 40px);
}
.ro-community-header__title {
    font-size: var(--ro-text-2xl);
    font-weight: 800;
    color: var(--ro-text);
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.ro-community-header__desc {
    color: var(--ro-text-sub);
    font-size: var(--ro-text-md);
    margin: 0;
}

/* ─────────────────────────────────────────────────────────────────────────
   허브: 카테고리 카드 그리드
   ───────────────────────────────────────────────────────────────────────── */
.ro-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: clamp(14px, 2.4vw, 22px);
    margin-bottom: 32px;
}

.ro-cat-card {
    display: flex;
    flex-direction: column;
    padding: 22px;
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-lg);
    background: var(--ro-surface);
    text-decoration: none;
    transition: transform 180ms var(--ro-ease-out, ease-out),
                box-shadow 180ms var(--ro-ease-out, ease-out),
                border-color 180ms var(--ro-ease-out, ease-out);
}
.ro-cat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border-color: var(--ro-primary-300);
}
.ro-cat-card:focus-visible {
    outline: 2px solid var(--ro-primary-500);
    outline-offset: 3px;
}

.ro-cat-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.ro-cat-card__icon {
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--ro-radius-md);
    background: var(--ro-primary-50);
    color: var(--ro-primary-600);
}
.ro-cat-card__icon--accent  { background: var(--ro-accent-50);  color: var(--ro-accent-600); }
.ro-cat-card__icon--success { background: var(--ro-success-50); color: var(--ro-success-600); }
.ro-cat-card__icon--warn    { background: var(--ro-warn-50);    color: var(--ro-warn-600); }

.ro-cat-card__title {
    font-size: var(--ro-text-lg);
    font-weight: 700;
    color: var(--ro-text);
    margin: 0;
}
.ro-cat-card__desc {
    color: var(--ro-text-sub);
    font-size: var(--ro-text-sm);
    margin: 0 0 14px;
    line-height: 1.5;
    flex: 1;
}

.ro-cat-card__recent {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px dashed var(--ro-border);
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ro-cat-card__recent li {
    font-size: var(--ro-text-sm);
    color: var(--ro-text-sub);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ro-cat-card__recent .market-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 6px;
    background: var(--ro-warn-50);
    color: var(--ro-warn-700);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}
.ro-cat-card__empty {
    color: var(--ro-text-sub);
    font-size: var(--ro-text-sm);
    opacity: 0.7;
    padding: 8px 0 0;
}

/* ─────────────────────────────────────────────────────────────────────────
   카테고리 목록 페이지
   ───────────────────────────────────────────────────────────────────────── */
.ro-cat-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--ro-surface);
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-md);
}
.ro-cat-toolbar__sort {
    display: flex; gap: 6px; flex-wrap: wrap;
}
.ro-cat-toolbar__search {
    display: flex; gap: 6px; flex: 1;
    max-width: 360px;
}
.ro-cat-toolbar__search input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-md);
    background: var(--ro-bg);
    color: var(--ro-text);
    font-size: var(--ro-text-sm);
}
.ro-cat-toolbar__search input:focus {
    outline: 2px solid var(--ro-primary-300);
    outline-offset: 0;
    border-color: var(--ro-primary-500);
}

.ro-post-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ro-post-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px 18px;
    background: var(--ro-surface);
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-md);
    text-decoration: none;
    color: inherit;
    transition: border-color 160ms ease, transform 160ms ease;
}
.ro-post-row:hover {
    border-color: var(--ro-primary-300);
    transform: translateY(-1px);
}
.ro-post-row__main {
    min-width: 0;
}
.ro-post-row__title {
    font-size: var(--ro-text-md);
    font-weight: 700;
    color: var(--ro-text);
    margin: 0 0 6px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}
.ro-post-row__meta {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    font-size: var(--ro-text-sm);
    color: var(--ro-text-sub);
}
.ro-post-row__meta .author {
    font-weight: 600;
    color: var(--ro-text);
}
.ro-post-row__meta .anon {
    color: var(--ro-text-sub);
    font-style: italic;
}
.ro-post-row__stats {
    display: flex; gap: 12px; align-items: center;
    color: var(--ro-text-sub); font-size: var(--ro-text-sm);
}
.ro-post-row__stats span { display: inline-flex; align-items: center; gap: 4px; }

.ro-post-row__market {
    display: flex; gap: 10px; align-items: center;
    color: var(--ro-warn-700); font-weight: 700;
}
.ro-post-row__market.sold { color: var(--ro-text-sub); text-decoration: line-through; }

.ro-post-row--hidden {
    opacity: 0.55;
}
.ro-post-row--hidden .ro-post-row__title::after {
    content: " · 자동 숨김";
    color: var(--ro-warn-600);
    font-weight: 500;
    font-size: 12px;
}

/* 페이징 */
.ro-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 24px;
}
.ro-pagination a, .ro-pagination span {
    min-width: 36px;
    padding: 6px 10px;
    text-align: center;
    border-radius: var(--ro-radius-sm);
    border: 1px solid var(--ro-border);
    background: var(--ro-surface);
    color: var(--ro-text);
    text-decoration: none;
    font-size: var(--ro-text-sm);
}
.ro-pagination .current {
    background: var(--ro-primary-500);
    border-color: var(--ro-primary-500);
    color: white;
    font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────────────────
   작성 폼
   ───────────────────────────────────────────────────────────────────────── */
.ro-write-card {
    background: var(--ro-surface);
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-lg);
    padding: clamp(20px, 4vw, 32px);
}
.ro-write-card__header {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 18px;
}
.ro-write-card__header h2 {
    margin: 0; font-size: var(--ro-text-xl); font-weight: 800;
}
.ro-write-card__cat-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    background: var(--ro-primary-50);
    color: var(--ro-primary-700);
    border-radius: 999px;
    font-size: 12px; font-weight: 700;
}

.ro-form-group {
    margin-bottom: 16px;
}
.ro-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ro-text);
    font-size: var(--ro-text-sm);
}
.ro-form-input, .ro-form-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-md);
    background: var(--ro-bg);
    color: var(--ro-text);
    font-family: inherit;
    font-size: var(--ro-text-md);
    transition: border-color 160ms;
}
.ro-form-input:focus, .ro-form-textarea:focus {
    border-color: var(--ro-primary-500);
    outline: 2px solid var(--ro-primary-200);
    outline-offset: 0;
}
.ro-form-textarea {
    min-height: 200px;
    resize: vertical;
    line-height: 1.6;
}
.ro-form-helptext {
    color: var(--ro-text-sub);
    font-size: 12px;
    margin-top: 4px;
}
.ro-form-error {
    color: var(--ro-danger-600);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

/* 익명 토글 */
.ro-anon-toggle {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    background: var(--ro-bg);
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-md);
    cursor: pointer;
}
.ro-anon-toggle input { width: 18px; height: 18px; }
.ro-anon-toggle__label {
    flex: 1;
    font-size: var(--ro-text-sm);
}
.ro-anon-toggle__hint {
    font-size: 12px;
    color: var(--ro-text-sub);
    display: block;
    margin-top: 2px;
}

/* 직거래 필드 그리드 */
.ro-market-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 16px;
    border: 1px dashed var(--ro-warn-300);
    border-radius: var(--ro-radius-md);
    background: linear-gradient(135deg, var(--ro-warn-50), transparent 60%);
    margin-bottom: 16px;
}
@media (max-width: 480px) {
    .ro-market-grid { grid-template-columns: 1fr; }
}
.ro-market-grid h3 {
    grid-column: 1 / -1;
    margin: 0;
    font-size: var(--ro-text-md);
    color: var(--ro-warn-800);
}
.ro-market-disclaimer {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--ro-warn-800);
    line-height: 1.5;
    padding: 8px 12px;
    background: var(--ro-warn-100);
    border-radius: var(--ro-radius-sm);
}

/* 폼 액션 영역 */
.ro-form-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 20px;
    border-top: 1px solid var(--ro-border);
    padding-top: 18px;
}
@media (max-width: 480px) {
    .ro-form-actions { flex-direction: column-reverse; }
    .ro-form-actions .ro-btn { width: 100%; }
}

/* ─────────────────────────────────────────────────────────────────────────
   상세 페이지
   ───────────────────────────────────────────────────────────────────────── */
.ro-post-detail {
    background: var(--ro-surface);
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-lg);
    padding: clamp(20px, 4vw, 32px);
    margin-bottom: 24px;
}
.ro-post-detail__breadcrumb {
    font-size: var(--ro-text-sm);
    color: var(--ro-text-sub);
    margin-bottom: 14px;
}
.ro-post-detail__breadcrumb a {
    color: var(--ro-primary-600);
    text-decoration: none;
}
.ro-post-detail__title {
    font-size: var(--ro-text-2xl);
    font-weight: 800;
    margin: 0 0 14px;
    line-height: 1.3;
    color: var(--ro-text);
}
.ro-post-detail__meta {
    display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
    padding-bottom: 18px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--ro-border);
    font-size: var(--ro-text-sm);
    color: var(--ro-text-sub);
}
.ro-post-detail__meta .author {
    font-weight: 600; color: var(--ro-text);
}
.ro-post-detail__meta .anon {
    color: var(--ro-text-sub); font-style: italic;
}
.ro-post-detail__meta .author-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--ro-gray-200);
}
.ro-post-detail__body {
    font-size: var(--ro-text-md);
    line-height: 1.8;
    color: var(--ro-text);
    white-space: pre-wrap;          /* HTML 안 받음, 줄바꿈만 보존 */
    word-break: break-word;
}
.ro-post-detail__images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 20px;
}
.ro-post-detail__images img {
    width: 100%;
    border-radius: var(--ro-radius-md);
    object-fit: cover;
}

/* 직거래 작성/수정 — 세부 카테고리·상태 칩 라디오 */
.ro-market-sub-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--ro-border);
    border-radius: 999px;
    background: var(--ro-surface);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--ro-text);
    transition: all 160ms;
}
.ro-market-sub-chip input {
    width: 0; height: 0; opacity: 0; position: absolute;
}
.ro-market-sub-chip:has(input:checked) {
    background: var(--ro-warn-50);
    border-color: var(--ro-warn-400);
    color: var(--ro-warn-800);
    font-weight: 700;
    box-shadow: 0 0 0 3px var(--ro-warn-100);
}
.ro-market-sub-chip:hover {
    border-color: var(--ro-warn-300);
}

/* 거래 상태 빠른 토글 (상세 페이지) */
.ro-market-status-bar {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    margin: 16px 0;
    background: var(--ro-bg);
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-md);
    align-items: center;
    flex-wrap: wrap;
}
.ro-market-status-bar__label {
    font-size: var(--ro-text-sm);
    font-weight: 700;
    color: var(--ro-text);
}
.ro-market-status-btn {
    padding: 6px 14px;
    border: 1px solid var(--ro-border);
    border-radius: 999px;
    background: var(--ro-surface);
    color: var(--ro-text-sub);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}
.ro-market-status-btn.active {
    background: var(--ro-warn-500);
    color: white;
    border-color: var(--ro-warn-500);
}

/* 판매자 다른 상품 (직거래 상세) */
.ro-seller-other {
    margin-top: 28px;
    padding: 18px;
    background: var(--ro-bg);
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-md);
}
.ro-seller-other h3 {
    margin: 0 0 12px;
    font-size: var(--ro-text-md);
    font-weight: 700;
}
.ro-seller-other__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
    gap: 10px;
}
.ro-seller-other__item {
    display: block;
    background: var(--ro-surface);
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-sm);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform 160ms;
}
.ro-seller-other__item:hover { transform: translateY(-2px); }
.ro-seller-other__thumb {
    width: 100%;
    aspect-ratio: 1;
    background: var(--ro-gray-100) center/cover no-repeat;
}
.ro-seller-other__info {
    padding: 8px 10px;
}
.ro-seller-other__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--ro-text);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0 0 4px;
    min-height: 2.6em;
}
.ro-seller-other__price {
    font-size: 14px;
    font-weight: 700;
    color: var(--ro-warn-700);
}

/* 거래 상태 배지 (목록·상세 공용) */
.ro-market-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 6px;
}
.ro-market-badge--selling  { background: var(--ro-success-50);  color: var(--ro-success-700); }
.ro-market-badge--reserved { background: var(--ro-warn-50);     color: var(--ro-warn-700); }
.ro-market-badge--sold     { background: var(--ro-gray-200);    color: var(--ro-gray-700); }

/* 직거래 카드 (상세 페이지) */
.ro-market-card {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    margin: 20px 0;
    background: linear-gradient(135deg, var(--ro-warn-50), var(--ro-bg));
    border: 1px solid var(--ro-warn-200);
    border-radius: var(--ro-radius-md);
}
.ro-market-card__price {
    font-size: var(--ro-text-xl);
    font-weight: 800;
    color: var(--ro-warn-800);
}
.ro-market-card__region {
    color: var(--ro-text-sub);
    font-size: var(--ro-text-sm);
}
.ro-market-card__sold {
    margin-left: auto;
    padding: 4px 10px;
    background: var(--ro-text);
    color: var(--ro-bg);
    border-radius: 999px;
    font-size: 12px; font-weight: 700;
}

/* 좋아요/공유/신고 액션 바 */
.ro-action-bar {
    display: flex; gap: 8px; align-items: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--ro-border);
}
.ro-like-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    background: var(--ro-bg);
    border: 1px solid var(--ro-border);
    border-radius: 999px;
    color: var(--ro-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 160ms;
}
.ro-like-btn:hover { background: var(--ro-primary-50); border-color: var(--ro-primary-300); }
.ro-like-btn.liked {
    background: var(--ro-primary-500);
    border-color: var(--ro-primary-500);
    color: white;
}
/* 찜 버튼 (런닝구장터) */
.ro-wish-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px;
    background: var(--ro-bg);
    border: 1px solid var(--ro-border);
    border-radius: 999px;
    color: var(--ro-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 160ms;
}
.ro-wish-btn:hover:not(:disabled) { background: var(--ro-warn-50, rgba(234,179,8,0.10)); border-color: var(--ro-warn-300, #fcd34d); }
.ro-wish-btn.wished { background: #f59e0b; border-color: #f59e0b; color: white; }
.ro-wish-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.ro-wish-btn__icon { line-height: 1; }
.ro-report-btn {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--ro-border);
    color: var(--ro-text-sub);
    padding: 6px 12px;
    border-radius: var(--ro-radius-sm);
    font-size: 13px;
    cursor: pointer;
}
.ro-report-btn:hover { color: var(--ro-danger-600); border-color: var(--ro-danger-300); }

/* 자동 숨김 / 운영자 숨김 안내 */
.ro-hidden-notice {
    padding: 14px 16px;
    border-radius: var(--ro-radius-md);
    font-size: var(--ro-text-sm);
    margin: 14px 0;
    line-height: 1.6;
}
.ro-hidden-notice--auto {
    background: var(--ro-warn-50);
    border: 1px solid var(--ro-warn-200);
    color: var(--ro-warn-800);
}
.ro-hidden-notice--admin {
    background: var(--ro-danger-50);
    border: 1px solid var(--ro-danger-200);
    color: var(--ro-danger-700);
}

/* ── Markdown 렌더링 콘텐츠 (게시글 본문 / 매거진 / 코스 설명 공용) ── */
.ro-md-content {
    font-size: var(--ro-text-md);
    line-height: 1.8;
    color: var(--ro-text);
    word-break: break-word;
    overflow-wrap: anywhere;
}
.ro-md-content > *:first-child { margin-top: 0; }
.ro-md-content > *:last-child { margin-bottom: 0; }

.ro-md-content h2 { font-size: 1.4em; font-weight: 800; margin: 1.4em 0 0.6em; line-height: 1.3; }
.ro-md-content h3 { font-size: 1.2em; font-weight: 700; margin: 1.2em 0 0.5em; }
.ro-md-content h4 { font-size: 1.05em; font-weight: 700; margin: 1em 0 0.4em; }
.ro-md-content p { margin: 0.6em 0; }
.ro-md-content strong { font-weight: 700; }
.ro-md-content em { font-style: italic; }
.ro-md-content del { color: var(--ro-text-sub); text-decoration: line-through; }

.ro-md-content a {
    color: var(--ro-primary-600);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ro-md-content a:hover { color: var(--ro-primary-700); }

.ro-md-content ul, .ro-md-content ol {
    margin: 0.6em 0;
    padding-left: 1.6em;
}
.ro-md-content li { margin: 0.2em 0; }
.ro-md-content li input[type=checkbox] { margin-right: 6px; vertical-align: middle; }

.ro-md-content blockquote {
    margin: 0.8em 0;
    padding: 8px 14px;
    border-left: 4px solid var(--ro-primary-300);
    background: var(--ro-bg);
    color: var(--ro-text-sub);
    border-radius: 0 6px 6px 0;
}

.ro-md-content code {
    padding: 2px 6px;
    background: var(--ro-gray-100);
    border-radius: 4px;
    font-size: 0.9em;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.ro-md-content pre {
    margin: 0.8em 0;
    padding: 12px 14px;
    background: var(--ro-gray-900, #0F172A);
    color: #E5EAF0;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.55;
}
.ro-md-content pre code { background: transparent; padding: 0; color: inherit; font-size: inherit; }

.ro-md-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

.ro-md-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.8em 0;
    font-size: 0.95em;
    overflow-x: auto;
    display: block;
}
.ro-md-content thead, .ro-md-content tbody, .ro-md-content tr { display: table-row; }
.ro-md-content th, .ro-md-content td {
    padding: 8px 10px;
    border: 1px solid var(--ro-border);
    text-align: left;
}
.ro-md-content th { background: var(--ro-bg); font-weight: 700; }

.ro-md-content hr {
    border: none;
    border-top: 1px solid var(--ro-border);
    margin: 1.5em 0;
}

/* 신고 처리 라벨 (목록·상세 헤더 배지) */
.ro-report-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}
.ro-report-badge--auto  { background: var(--ro-warn-100);   color: var(--ro-warn-800); }
.ro-report-badge--admin { background: var(--ro-danger-100); color: var(--ro-danger-700); }

/* ─────────────────────────────────────────────────────────────────────────
   댓글
   ───────────────────────────────────────────────────────────────────────── */
.ro-reply-section {
    margin-top: 32px;
}
.ro-reply-section h3 {
    font-size: var(--ro-text-lg);
    font-weight: 700;
    margin: 0 0 14px;
}
.ro-reply-form {
    background: var(--ro-surface);
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-md);
    padding: 14px;
    margin-bottom: 20px;
}
.ro-reply-form textarea {
    width: 100%;
    min-height: 70px;
    padding: 10px 12px;
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-sm);
    background: var(--ro-bg);
    color: var(--ro-text);
    font-family: inherit;
    font-size: var(--ro-text-sm);
    resize: vertical;
}
.ro-reply-form__bottom {
    display: flex; gap: 10px; align-items: center; justify-content: space-between;
    margin-top: 10px;
}
.ro-reply-form__anon {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--ro-text-sub); cursor: pointer;
}
.ro-reply-form__login-prompt {
    text-align: center; padding: 20px;
    color: var(--ro-text-sub); font-size: var(--ro-text-sm);
}
.ro-reply-form__login-prompt a {
    color: var(--ro-primary-600); font-weight: 700; text-decoration: none;
}

.ro-reply-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.ro-reply-item {
    display: flex; gap: 12px;
    padding: 14px 16px;
    background: var(--ro-surface);
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-md);
}
.ro-reply-item--child {
    margin-left: 30px;
    border-left: 3px solid var(--ro-primary-200);
}
.ro-reply-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--ro-gray-100);
    object-fit: cover;
    flex-shrink: 0;
}
.ro-reply-content { flex: 1; min-width: 0; }
.ro-reply-head {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    font-size: 13px; color: var(--ro-text-sub);
    margin-bottom: 6px;
}
.ro-reply-head .author { font-weight: 600; color: var(--ro-text); }
.ro-reply-head .anon { font-style: italic; }
.ro-reply-body {
    font-size: var(--ro-text-sm);
    line-height: 1.65;
    color: var(--ro-text);
    white-space: pre-wrap;
    word-break: break-word;
}
.ro-reply-foot {
    display: flex; gap: 12px; align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: var(--ro-text-sub);
}
.ro-reply-foot button {
    background: none; border: none;
    color: var(--ro-text-sub);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}
.ro-reply-foot button:hover { color: var(--ro-primary-600); background: var(--ro-primary-50); }
.ro-reply-foot .liked { color: var(--ro-primary-600); font-weight: 700; }

.ro-reply-hidden {
    opacity: 0.6;
    font-style: italic;
}

/* 빈 상태 */
.ro-empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--ro-text-sub);
}
.ro-empty-state__icon {
    font-size: 48px;
    opacity: 0.4;
    margin-bottom: 10px;
}

/* ─────────────────────────────────────────────────────────────────────────
   신고 모달
   ───────────────────────────────────────────────────────────────────────── */
.ro-report-modal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center; justify-content: center;
    z-index: 1000;
    padding: 16px;
}
.ro-report-modal.is-open { display: flex; }
.ro-report-modal__inner {
    background: var(--ro-surface);
    border-radius: var(--ro-radius-lg);
    padding: 24px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.ro-report-modal__inner h3 {
    margin: 0 0 12px;
    font-size: var(--ro-text-lg);
}
.ro-report-modal__reasons {
    display: flex; flex-direction: column; gap: 8px;
    margin-bottom: 14px;
}
.ro-report-modal__reasons label {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--ro-border);
    border-radius: var(--ro-radius-sm);
    cursor: pointer;
    font-size: var(--ro-text-sm);
}
.ro-report-modal__reasons label:has(input:checked) {
    border-color: var(--ro-primary-500);
    background: var(--ro-primary-50);
}
.ro-report-modal__actions {
    display: flex; gap: 10px; justify-content: flex-end;
}

/* ─────────────────────────────────────────────────────────────────────────
   모바일 보강 (360px ~ 640px)
   ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    /* 헤더 정렬 */
    .ro-community-header__title { font-size: var(--ro-text-xl); }
    .ro-cat-toolbar { padding: 10px 12px; gap: 8px; }
    .ro-cat-toolbar__search { max-width: none; flex: 1 1 100%; }
    .ro-cat-toolbar__sort { flex: 1 1 100%; overflow-x: auto; }

    /* 게시글 행: 통계는 다음 줄로 */
    .ro-post-row { grid-template-columns: 1fr; gap: 8px; }
    .ro-post-row__stats { justify-content: flex-start; }

    /* 상세 페이지 */
    .ro-post-detail__title { font-size: var(--ro-text-xl); }
    .ro-post-detail__meta { font-size: 12px; gap: 8px; }
    .ro-post-detail__meta .author-avatar { width: 24px; height: 24px; }
    .ro-action-bar { flex-wrap: wrap; }
    .ro-report-btn { margin-left: 0; margin-top: 4px; }

    /* 작성 폼 */
    .ro-write-card { padding: 16px 14px; }
    .ro-write-card__header { flex-wrap: wrap; gap: 6px; }
    .ro-write-card__header h2 { font-size: var(--ro-text-lg); }
    .ro-form-input, .ro-form-textarea { font-size: 16px; }   /* iOS 줌 방지 */
    .ro-form-textarea { min-height: 160px; }

    /* 댓글 */
    .ro-reply-item { padding: 10px 12px; gap: 8px; }
    .ro-reply-item--child { margin-left: 16px; }
    .ro-reply-avatar { width: 28px; height: 28px; }

    /* 직거래 그리드 */
    .ro-market-grid { padding: 14px 12px; gap: 10px; }
    .ro-market-status-bar { flex-direction: column; align-items: stretch; }
    .ro-market-status-bar .ro-market-status-btn { width: 100%; text-align: center; }

    /* 카테고리 허브 카드 */
    .ro-cat-grid { gap: 12px; }
    .ro-cat-card { padding: 16px 14px; }

    /* 신고 모달 */
    .ro-report-modal__inner { padding: 18px 14px; }
}

/* xs (360px 이하 — 갤럭시 폴드 outer 등) */
@media (max-width: 380px) {
    .ro-community { padding: 14px 10px 60px; }
    .ro-post-detail, .ro-write-card { padding: 14px 12px; }
    .ro-market-grid { grid-template-columns: 1fr !important; }
    .ro-route-stats__item strong { font-size: 16px; }
}

/* 첨부 이미지 갤러리는 항상 반응형 */
.ro-post-detail__images { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.ro-route-gallery       { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }

/* ─────────────────────────────────────────────────────────────────────────
   빈 상태 히어로 — 카테고리 0개일 때 (런닝구 마스코트 등장)
   ───────────────────────────────────────────────────────────────────────── */
.ro-empty-hero {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 36px 24px;
    margin: 24px 0;
    background: linear-gradient(135deg, var(--ro-primary-50), var(--ro-accent-50));
    border: 1px dashed var(--ro-primary-200);
    border-radius: 18px;
    text-align: left;
}
.ro-empty-hero__mascot {
    width: 130px;
    height: auto;
    flex-shrink: 0;
}
.ro-empty-hero__body {
    flex: 1;
    min-width: 240px;
    max-width: 480px;
}
.ro-empty-hero__body h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 800;
    color: var(--ro-text);
}
.ro-empty-hero__body p {
    margin: 0 0 14px;
    color: var(--ro-text-sub);
    font-size: 14px;
    line-height: 1.6;
}
.ro-empty-hero__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
@media (max-width: 520px) {
    .ro-empty-hero { padding: 24px 16px; }
    .ro-empty-hero__mascot { width: 96px; }
    .ro-empty-hero__body h2 { font-size: 17px; }
}

/* ─────────────────────────────────────────────────────────────────────────
   접근성 / 모션
   ───────────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .ro-cat-card, .ro-post-row, .ro-like-btn { transition: none !important; }
    .ro-cat-card:hover, .ro-post-row:hover { transform: none; }
}
