/* 시스템 폰트 사용 — 외부 폰트 없음 */

:root {
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --black: #1A1D23;
  --accent: #2563EB;
  --accent-light: #EFF6FF;
  --accent-left: #DC2626;
  --accent-right: #16A34A;
  --accent-mid: #7C3AED;
  --gray-100: #EAECF0;
  --gray-200: #D8DBE3;
  --gray-400: #9DA3AE;
  --gray-600: #6B7280;
  --border: rgba(0,0,0,0.08);
  --font-display: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --r: 10px;
  --r-lg: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--bg); color: var(--black); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }

.nav { position: sticky; top: 0; z-index: 100; background: var(--black); border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; height: 54px; gap: 20px; }
.nav-logo { font-family: var(--font-display); font-size: 19px; color: #fff; white-space: nowrap; letter-spacing: -0.2px; display: flex; align-items: baseline; gap: 1px; }
.nav-logo .dot { color: var(--accent); font-size: 20px; }
.nav-search { flex: 1; max-width: 360px; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.1); border-radius: 8px; padding: 0 12px; height: 33px; border: 1px solid transparent; transition: border-color 0.2s, background 0.2s; }
.nav-search:focus-within { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.2); }
.nav-search input { background: none; border: none; width: 100%; font-size: 13px; color: #fff; outline: none; }
.nav-search input::placeholder { color: rgba(255,255,255,0.4); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.btn-ghost { font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.7); padding: 5px 13px; border-radius: 7px; border: 1px solid rgba(255,255,255,0.15); transition: all 0.15s; }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-primary { font-size: 13px; font-weight: 700; color: #fff; background: var(--accent); padding: 5px 15px; border-radius: 7px; transition: opacity 0.15s, transform 0.1s; }
.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.97); }

.cat-bar { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 32px; display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; height: 42px; }
.cat-bar::-webkit-scrollbar { display: none; }
.cat-btn { flex-shrink: 0; font-size: 13px; color: var(--gray-600); padding: 4px 11px; border-radius: 6px; border: 1px solid transparent; transition: all 0.13s; white-space: nowrap; }
.cat-btn:hover { color: var(--black); background: var(--gray-100); }
.cat-btn.active { color: var(--accent); font-weight: 700; background: var(--accent-light); border-color: rgba(37,99,235,0.15); }

.wrap { max-width: 1040px; margin: 0 auto; padding: 24px 20px; display: grid; grid-template-columns: 1fr 260px; gap: 20px; align-items: start; }

.feed-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.feed-label { font-size: 12px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.07em; }
.sort-group { display: flex; gap: 2px; }
.sort-btn { font-size: 12px; color: var(--gray-600); padding: 4px 9px; border-radius: 5px; border: 1px solid transparent; transition: all 0.13s; }
.sort-btn.active, .sort-btn:hover { color: var(--black); background: var(--surface); border-color: var(--border); }

.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; margin-bottom: 7px; display: flex; gap: 14px; cursor: pointer; transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s; animation: fadeUp 0.28s ease both; }
.post-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.07); transform: translateY(-1px); border-color: var(--gray-200); }
@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.post-card:nth-child(1){animation-delay:.03s} .post-card:nth-child(2){animation-delay:.07s}
.post-card:nth-child(3){animation-delay:.11s} .post-card:nth-child(4){animation-delay:.15s}

.vote-col { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 30px; padding-top: 2px; }
.v-btn { width: 27px; height: 23px; border-radius: 5px; border: 1px solid var(--border); background: var(--bg); color: var(--gray-400); font-size: 10px; display: flex; align-items: center; justify-content: center; transition: all 0.13s; }
.v-btn:hover { background: var(--gray-100); color: var(--black); border-color: var(--gray-200); }
.v-btn.up.on { background: var(--accent-light); border-color: rgba(37,99,235,0.25); color: var(--accent); }
.v-btn.down.on { background: var(--gray-100); border-color: var(--gray-200); color: var(--black); }
.v-num { font-size: 13px; font-weight: 700; color: var(--black); }

.p-body { flex: 1; min-width: 0; }
.p-meta { display: flex; align-items: center; gap: 5px; margin-bottom: 4px; flex-wrap: wrap; }
.badge { font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.b-진보  { background:#EFF6FF; color:#2563EB; }
.b-중도  { background:#F1F5F9; color:#94A3B8; }
.b-보수  { background:#FEF2F2; color:#DC2626; }
.b-경제  { background:#FFF7ED; color:#EA580C; }
.b-외교  { background:#EFF6FF; color:#2563EB; }
.b-사회  { background:#F0FDFA; color:#0D9488; }
.b-환경  { background:#F7FEE7; color:#65A30D; }
.b-교육  { background:#FDF4FF; color:#9333EA; }
.b-법률  { background:#F8FAFC; color:#475569; }
.b-기타  { background:#F8FAFC; color:#475569; }
.b-hot   { background:var(--accent); color:#fff; }
.p-by { font-size: 12px; color: var(--gray-400); }
.p-title { font-size: 15px; font-weight: 700; color: var(--black); margin-bottom: 3px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.p-preview { font-size: 13px; color: var(--gray-600); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 9px; }
.p-thumb { flex-shrink: 0; width: 68px; height: 68px; border-radius: var(--r); background: var(--gray-100); display: flex; align-items: center; justify-content: center; font-size: 24px; align-self: center; overflow: hidden; }
.p-foot { display: flex; gap: 12px; }
.p-stat { display: flex; align-items: center; gap: 3px; font-size: 12px; color: var(--gray-400); }

.sidebar { display: flex; flex-direction: column; gap: 12px; }
.s-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.s-head { padding: 10px 14px; border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.08em; }
.rank-row { display: flex; align-items: center; gap: 9px; padding: 8px 14px; cursor: pointer; transition: background 0.12s; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom: none; }
.rank-row:hover { background: var(--bg); }
.rank-n { font-size: 12px; font-weight: 700; min-width: 14px; text-align: center; }
.rank-n.hi { color: var(--accent); }
.rank-n.lo { color: var(--gray-400); }
.rank-t { flex: 1; font-size: 13px; color: var(--black); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-v { font-size: 11px; color: var(--gray-400); white-space: nowrap; }

.cta-box { background: var(--black); border-radius: var(--r-lg); padding: 18px 16px; text-align: center; }
.cta-title { font-family: var(--font-display); font-size: 15px; color: #fff; margin-bottom: 4px; }
.cta-sub { font-size: 12px; color: var(--gray-400); margin-bottom: 12px; }
.cta-btn { display: inline-block; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; padding: 7px 20px; border-radius: 7px; transition: opacity 0.13s; }
.cta-btn:hover { opacity: 0.85; }

.pager { display: flex; justify-content: center; gap: 3px; margin-top: 18px; }
.pg-btn { min-width: 31px; height: 31px; border-radius: 6px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; color: var(--gray-600); display: flex; align-items: center; justify-content: center; padding: 0 7px; cursor: pointer; transition: all 0.13s; }
.pg-btn:hover { background: var(--gray-100); color: var(--black); }
.pg-btn.on { background: var(--black); color: #fff; border-color: var(--black); }

.fab { display: none; position: fixed; bottom: 20px; right: 16px; width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 18px; box-shadow: 0 4px 14px rgba(37,99,235,0.4); align-items: center; justify-content: center; z-index: 99; transition: transform 0.15s; }
.fab:hover { transform: scale(1.07); }

@media(max-width:760px){
  .wrap { grid-template-columns: 1fr; padding: 10px 0; }
  .sidebar { display: none; }
  .nav { padding: 0 14px; height: 50px; gap: 10px; }
  .nav-search { display: none; }
  .btn-ghost { font-size: 12px; padding: 5px 10px; }
  .btn-primary { font-size: 12px; padding: 5px 12px; }
  .cat-bar { padding: 0 14px; }
  .feed-top { flex-wrap: wrap; gap: 6px; margin-bottom: 8px; padding: 0 12px; }
  .sort-btn { font-size: 11px; padding: 3px 7px; }
  .post-card { padding: 12px 12px; gap: 10px; border-radius: 0; border-left: none; border-right: none; margin-bottom: 1px; }
  .vote-col { min-width: 28px; }
  .v-btn { width: 26px; height: 24px; font-size: 10px; }
  .p-title { font-size: 14px; white-space: normal; line-height: 1.4; }
  .p-preview { font-size: 12px; margin-bottom: 7px; -webkit-line-clamp: 2; }
  .p-thumb { display: none; }
  .fab { display: flex; }
}
