:root {
  --bg-color: #f8fafc;
  --card-bg-color: #ffffff;
  --text-color: #1e293b;
  --muted-text-color: #64748b;
  --border-color: #e2e8f0;
  --primary-color: #3b82f6;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg-color);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  min-height: 100vh;
  padding: 20px 16px 60px;
}
.wrap { max-width: 720px; margin: 0 auto; }

/* 인기급상승 토픽 바 스타일은 /assets/trending-bar.css 참고 (index.php와 공유) */

.breadcrumb { font-size: 13px; color: var(--muted-text-color); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted-text-color); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-color); }

.header { margin-bottom: 20px; }
.header h1 { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.header .subtitle { font-size: 14px; color: var(--muted-text-color); margin-bottom: 14px; }

.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: var(--card-bg-color); border: 1px solid var(--border-color); color: var(--text-color);
}
.badge.trending { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

.section { margin-top: 28px; }
.section-title { font-size: 15px; font-weight: 800; margin-bottom: 10px; }

.panel { background: var(--card-bg-color); border: 1px solid var(--border-color); border-radius: 14px; overflow: hidden; }

.community-tag { flex-shrink: 0; padding: 3px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; }

/* 커뮤니티별 인기글 */
.community-card { padding: 14px; border-bottom: 1px solid var(--border-color); }
.community-card:last-child { border-bottom: none; }
.community-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.community-card-head .community-tag { font-size: 12px; }
.community-card-head .stats { font-size: 12px; color: var(--muted-text-color); }
.community-card ul { list-style: none; }
.community-card li { font-size: 13px; padding: 3px 0; }
.community-card li a { color: var(--text-color); text-decoration: none; }
.community-card li a:hover { color: var(--primary-color); }
.more-btn {
  margin-top: 8px; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
  background: var(--bg-color); border: 1px solid var(--border-color); color: var(--muted-text-color); cursor: pointer;
}
.more-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* 타임라인 */
.timeline { position: relative; padding-left: 34px; }
.timeline-item { position: relative; padding: 10px 14px 10px 14px; margin-bottom: 4px; }
.timeline-item::before {
  content: ''; position: absolute; left: -20px; top: 16px;
  width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1;
}
.timeline-item.current::before { background: var(--primary-color); box-shadow: 0 0 0 4px rgba(59,130,246,.2); }
.timeline-item::after {
  content: ''; position: absolute; left: -16px; top: 25px; bottom: -4px;
  width: 1px; background: var(--border-color);
}
.timeline-item:last-child::after { display: none; }
.timeline-date { font-size: 12px; color: var(--muted-text-color); font-weight: 700; margin-bottom: 2px; }
.timeline-title { font-size: 14px; font-weight: 600; }
.timeline-title a { color: var(--text-color); text-decoration: none; }
.timeline-title a:hover { color: var(--primary-color); }
.timeline-count { font-size: 12px; color: var(--muted-text-color); margin-top: 2px; }
.timeline-posts { list-style: none; margin-top: 8px; }
.timeline-posts li { font-size: 12.5px; padding: 3px 0; display: flex; align-items: center; gap: 6px; }
.timeline-posts li a { color: var(--text-color); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timeline-posts li a:hover { color: var(--primary-color); }
.timeline-item .more-btn { margin-top: 8px; }

.empty-state { padding: 20px 14px; color: var(--muted-text-color); font-size: 13px; text-align: center; }

.footer { margin-top: 30px; font-size: 12px; color: var(--muted-text-color); text-align: center; }
.footer a { color: var(--muted-text-color); }
