/* 공개 BuildIt Wiki (/wiki, /wiki/board/*) — 작고 편안한 위키/커뮤니티 톤. 자체 팔레트. */
:root {
  --w-ink: #1f2430;
  --w-sub: #5b6472;
  --w-mute: #939bab;
  --w-line: #eceff3;
  --w-line2: #dfe4ea;
  --w-bg: #fbfcfd;
  --w-card: #ffffff;
  --w-accent: #1f9d7a;          /* teal — "함께 발전" */
  --w-accent-soft: #e6f5ef;
  --w-accent-ink: #14705a;
}

* { box-sizing: border-box; }
body.wiki-body {
  margin: 0;
  background: var(--w-bg);
  color: var(--w-ink);
  font-family: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── topbar ── */
.wiki-topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 14px;
  height: 62px; padding: 0 24px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--w-line);
}
.wiki-topbar .brand { text-decoration: none; color: var(--w-ink); font-size: 18px; letter-spacing: -.02em; }
.wiki-topbar .brand b { font-weight: 800; }
.wiki-topbar .brand span { font-weight: 600; color: var(--w-accent-ink); margin-left: 3px; }
.wiki-topbar .brand-tag { margin: 0; font-size: 13px; color: var(--w-mute); }
.wiki-topbar .spacer { flex: 1; }
/* BuildIt 메인 홈(/)으로. Wiki 내부 "← BuildIt Wiki로 돌아가기"(→ /wiki)와는 별개. */
.wiki-home-link {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border: 1px solid var(--w-line2); border-radius: 99px;
  color: var(--w-sub); font-size: 12.5px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.wiki-home-link:hover { border-color: var(--w-accent); color: var(--w-accent-ink); }
.btn-write {
  height: 36px; padding: 0 16px; border: none; border-radius: 99px;
  background: var(--w-ink); color: #fff; font-size: 13.5px; font-weight: 600;
  font-family: inherit; cursor: pointer;
}
.btn-write:hover { background: #000; }

/* ── layout ── */
.wiki-wrap { max-width: 1080px; margin: 0 auto; padding: 30px 24px 72px; }

/* ── intro + grade tabs ── */
.wiki-intro h1 { margin: 0 0 8px; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.wiki-intro > p { margin: 0 0 20px; font-size: 14.5px; color: var(--w-sub); }
.grade-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.grade-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-width: 132px; padding: 12px 18px;
  border: 1px solid var(--w-line2); border-radius: 14px;
  background: var(--w-card); color: var(--w-ink);
  font-size: 16px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.grade-tab small { font-size: 12px; font-weight: 500; color: var(--w-mute); }
.grade-tab:hover { border-color: var(--w-accent); }
.grade-tab.active { border-color: var(--w-accent); background: var(--w-accent-soft); color: var(--w-accent-ink); }
.grade-tab.active small { color: var(--w-accent-ink); }
.grade-note { margin: 14px 0 0; font-size: 13.5px; color: var(--w-sub); line-height: 1.6; }

/* ── blocks ── */
.wiki-block { margin-top: 40px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.block-head h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.more-link { font-size: 13px; color: var(--w-accent-ink); text-decoration: none; white-space: nowrap; }
.more-link:hover { text-decoration: underline; }
.muted { color: var(--w-mute); font-size: 14px; margin: 8px 0; }
.error { color: #c53030; font-size: 14px; margin: 8px 0; }

/* ── originals ── */
.original-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.file-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px; border: 1px solid var(--w-line); border-radius: 14px;
  background: var(--w-card); text-decoration: none; color: var(--w-ink);
}
.file-card:hover { border-color: var(--w-accent); }
.file-badge {
  align-self: flex-start; font-size: 11.5px; font-weight: 600;
  padding: 2px 9px; border-radius: 6px; background: var(--w-accent-soft); color: var(--w-accent-ink);
}
.file-card b { font-size: 14.5px; line-height: 1.4; }
.file-meta { font-size: 12.5px; color: var(--w-mute); }
.file-dl { font-size: 12.5px; font-weight: 600; color: var(--w-accent-ink); }

/* ── analyses ── */
.analysis-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.analysis-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px; border: 1px solid var(--w-line); border-radius: 14px;
  background: var(--w-card); text-decoration: none; color: var(--w-ink);
}
.analysis-card:hover { border-color: var(--w-accent); }
.analysis-card b { font-size: 14.5px; line-height: 1.4; }
.analysis-meta { font-size: 12.5px; color: var(--w-mute); line-height: 1.5; }
.analysis-badge {
  align-self: flex-start; font-size: 11.5px; font-weight: 600;
  padding: 2px 9px; border-radius: 6px; background: #eef1f5; color: var(--w-sub);
}

/* ── board grid (hub) ── */
.board-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.board-col {
  display: flex; flex-direction: column;
  border: 1px solid var(--w-line); border-radius: 16px; background: var(--w-card); padding: 16px;
}
.board-col-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.board-col-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.board-col-list { flex: 1; display: flex; flex-direction: column; }
.post-row { display: block; padding: 9px 0; border-top: 1px solid var(--w-line); text-decoration: none; color: inherit; }
.post-row:first-child { border-top: none; }
.post-title { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-row:hover .post-title { color: var(--w-accent-ink); }
.post-sub { display: block; font-size: 11.5px; color: var(--w-mute); margin-top: 2px; }
.board-write {
  margin-top: 12px; height: 34px; border: 1px dashed var(--w-line2); border-radius: 10px;
  background: transparent; color: var(--w-accent-ink); font-size: 13px; font-weight: 600;
  font-family: inherit; cursor: pointer;
}
.board-write:hover { border-color: var(--w-accent); background: var(--w-accent-soft); }

/* ── foot note (내신 Wiki) ── */
.wiki-foot-note {
  margin-top: 48px; padding: 18px 20px;
  border: 1px solid var(--w-line); border-radius: 14px; background: var(--w-card);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.wiki-foot-note p { margin: 0; font-size: 13.5px; color: var(--w-sub); }
.ghost-link { font-size: 13.5px; font-weight: 600; color: var(--w-accent-ink); text-decoration: none; white-space: nowrap; }
.ghost-link:hover { text-decoration: underline; }

/* ── board page ── */
.wiki-wrap.board-page { max-width: 820px; }
.breadcrumb { font-size: 12.5px; color: var(--w-mute); margin-bottom: 14px; }
.breadcrumb a { color: var(--w-sub); text-decoration: none; }
.breadcrumb span { margin: 0 6px; }
.board-head { border-bottom: 1px solid var(--w-line); padding-bottom: 16px; margin-bottom: 6px; }
.board-head h1 { margin: 0 0 6px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.board-search { display: flex; gap: 8px; margin-top: 12px; }
.board-search input {
  height: 34px; padding: 0 12px; border: 1px solid var(--w-line2); border-radius: 8px;
  font-size: 13px; font-family: inherit; width: 200px;
}
.board-search select { height: 34px; border: 1px solid var(--w-line2); border-radius: 8px; font-size: 13px; padding: 0 8px; font-family: inherit; }
.board-list { border-top: 1px solid var(--w-line); }
.q-card { display: block; padding: 20px 0; border-bottom: 1px solid var(--w-line); text-decoration: none; color: inherit; }
.q-card-meta { font-size: 12px; color: var(--w-mute); margin-bottom: 8px; }
.q-card h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-card:hover h3 { color: var(--w-accent-ink); }
.q-card-stats { display: flex; gap: 16px; font-size: 12.5px; color: var(--w-mute); }
.q-card-stats .answers { color: var(--w-accent-ink); font-weight: 600; }

/* ── block head 우측 액션 (관리자 업로드) ── */
.block-actions { display: flex; align-items: center; gap: 10px; }
.upload-link {
  display: inline-flex; align-items: center; height: 30px; padding: 0 12px;
  border: 1px solid var(--w-accent); border-radius: 99px; background: none; cursor: pointer;
  color: var(--w-accent-ink); font-size: 12.5px; font-weight: 600; font-family: inherit;
  text-decoration: none; white-space: nowrap;
}
.upload-link:hover { background: var(--w-accent-soft); }

/* ── 관리자 인라인 업로드 모달 ── */
.wiki-upload-backdrop {
  position: fixed; inset: 0; z-index: 1000; display: none;
  align-items: flex-start; justify-content: center; padding: 6vh 16px;
  background: rgba(17, 24, 28, 0.5);
}
.wiki-upload-backdrop.open { display: flex; }
.wiki-upload-dialog {
  width: 100%; max-width: 540px; max-height: 88vh; overflow-y: auto;
  background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}
.wiki-upload-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; border-bottom: 1px solid var(--w-line, #e6e8eb);
}
.wiki-upload-head h3 { margin: 0; font-size: 16px; }
.wiki-upload-close { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--w-mute); }
.wiki-upload-form { padding: 20px; }
.uf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.uf { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #3b444d; }
.uf.uf-full { grid-column: 1 / -1; }
.uf input, .uf select {
  font: inherit; font-weight: 400; padding: 9px 10px;
  border: 1px solid var(--w-line, #d7dbe0); border-radius: 8px; background: #fff;
}
.uf .muted { display: inline; margin: 0; font-size: 12px; font-weight: 400; }
.uf-msg { min-height: 18px; margin: 12px 0 0; font-size: 13px; }
.uf-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
@media (max-width: 560px) {
  .uf-grid { grid-template-columns: 1fr; }
}

/* ── 자료 전체보기 페이지 ── */
.wiki-wrap.list-page { max-width: 900px; }
.list-empty { padding: 40px 0; text-align: center; color: var(--w-mute); font-size: 14px; }

/* ── 게시글 상세 (전용 wiki 셸) ── */
.wiki-wrap.detail-page, .wiki-wrap.compose-page { max-width: 820px; }
.back-link {
  display: inline-flex; align-items: center; gap: 4px; margin-bottom: 16px;
  font-size: 13px; color: var(--w-sub); text-decoration: none;
}
.back-link:hover { color: var(--w-accent-ink); }
.detail-title { margin: 6px 0 12px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.35; }
.detail-meta { font-size: 12.5px; color: var(--w-mute); margin-bottom: 16px; }
.cat-badge { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--w-accent-soft); color: var(--w-accent-ink); margin-right: 8px; }
.content-html { font-size: 15px; line-height: 1.8; color: var(--w-ink); word-break: break-word; }
.content-html img { max-width: 100%; border-radius: 8px; }
.content-html p { margin: 0 0 12px; }
.content-html pre { background: #f4f6f8; padding: 12px; border-radius: 8px; overflow-x: auto; }
.content-html blockquote { border-left: 3px solid var(--w-line2); margin: 0 0 12px; padding-left: 12px; color: var(--w-sub); }

.attach-block { margin: 18px 0; }
.attach-block h4 { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: var(--w-sub); }
.attach-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--w-line); border-radius: 10px; background: var(--w-card); margin-bottom: 8px;
}
.attach-row .name { flex: 1; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attach-row .size { font-size: 11.5px; color: var(--w-mute); }
.attach-row a.dl { font-size: 13px; font-weight: 600; color: var(--w-accent-ink); text-decoration: none; white-space: nowrap; }
.attach-row button.rm { border: none; background: none; color: #c53030; font-size: 12px; cursor: pointer; }

.detail-actions { display: flex; align-items: center; gap: 14px; margin: 20px 0; padding-top: 14px; border-top: 1px solid var(--w-line); }
.like-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px;
  border: 1px solid var(--w-line2); border-radius: 99px; background: var(--w-card);
  font-size: 13px; font-family: inherit; cursor: pointer; color: var(--w-sub);
}
.like-btn.liked { border-color: var(--w-accent); background: var(--w-accent-soft); color: var(--w-accent-ink); }
.like-btn:disabled { opacity: .5; cursor: default; }
.txt-btn { border: none; background: none; color: var(--w-sub); font-size: 13px; cursor: pointer; text-decoration: underline; }
.like-closed { font-size: 12px; color: var(--w-mute); }

.answers-section { margin-top: 28px; }
.answers-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.answer-item { padding: 16px 0; border-top: 1px solid var(--w-line); }
.answer-meta { font-size: 12px; color: var(--w-mute); margin-bottom: 8px; }
.answer-actions { margin-top: 6px; display: flex; gap: 10px; }
.login-hint { font-size: 13px; color: var(--w-mute); margin-top: 12px; }
.notice-box { padding: 16px; border: 1px solid var(--w-line2); border-radius: 12px; background: #fff8ef; font-size: 13.5px; color: var(--w-sub); }
.notice-box a { color: var(--w-accent-ink); font-weight: 600; }

/* ── 글쓰기 (전용 wiki 셸) ── */
.compose-page h1 { margin: 6px 0 4px; font-size: 22px; font-weight: 800; }
.compose-page .lead { margin: 0 0 22px; font-size: 13.5px; color: var(--w-sub); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--w-mute); margin: -2px 0 8px; }
.field input[type=text] { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--w-line2); border-radius: 10px; font-size: 15px; font-family: inherit; }
.editor-toolbar { display: flex; gap: 4px; padding: 8px; border: 1px solid var(--w-line2); border-bottom: none; border-radius: 10px 10px 0 0; background: #fafbfc; flex-wrap: wrap; }
.editor-toolbar button { min-width: 30px; height: 30px; border: none; background: none; border-radius: 6px; cursor: pointer; font-size: 13px; color: #3a3f48; }
.editor-toolbar button:hover { background: #eef0f3; }
.editor-box { border: 1px solid var(--w-line2); border-radius: 0 0 10px 10px; min-height: 240px; padding: 14px; font-size: 15px; line-height: 1.75; }
.editor-box .ProseMirror:focus { outline: none; }
.editor-box .ProseMirror p.is-editor-empty:first-child::before { content: attr(data-placeholder); color: var(--w-mute); float: left; pointer-events: none; height: 0; }
.file-picker-row { display: flex; flex-direction: column; gap: 8px; }
.file-pending { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--w-sub); }
.file-pending button { border: none; background: none; color: #c53030; cursor: pointer; font-size: 12px; }
.compose-actions { display: flex; gap: 10px; margin-top: 24px; }
.btn-primary {
  height: 42px; padding: 0 22px; border: none; border-radius: 10px;
  background: var(--w-accent-ink); color: #fff; font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.btn-primary:hover { background: #0f5a48; }
.btn-ghost {
  height: 42px; padding: 0 22px; display: inline-flex; align-items: center;
  border: 1px solid var(--w-line2); border-radius: 10px; background: var(--w-card);
  color: var(--w-sub); font-size: 14px; font-weight: 600; text-decoration: none;
}
.status-msg { margin-top: 12px; font-size: 13px; }

/* ── 모의고사 학습 자료 (회원 업로드) ── */
.learning-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.learning-card {
  display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  border: 1px solid var(--w-line2); border-radius: 12px; background: var(--w-card);
  text-decoration: none; color: var(--w-ink); cursor: pointer; text-align: left; font: inherit;
}
.learning-card:hover { border-color: var(--w-accent); }
.learning-card b { font-size: 14.5px; line-height: 1.4; }
.learning-badge {
  align-self: flex-start; padding: 2px 9px; border-radius: 99px;
  background: var(--w-accent-soft); color: var(--w-accent-ink); font-size: 11.5px; font-weight: 700;
}
.learning-meta { font-size: 12.5px; color: var(--w-mute); }

/* 학습 자료 상세/미리보기 (/wiki/learning/{id}) */
.wl-detail-head { margin-bottom: 18px; }
.wl-detail-head h1 { font-size: 22px; line-height: 1.35; margin: 10px 0 6px; }
.wl-detail-meta { font-size: 13px; color: var(--w-mute); margin: 0; }
.wl-preview-wrap { margin: 8px 0 20px; }
.wl-preview {
  width: 100%; height: 72vh; min-height: 420px;
  border: 1px solid var(--w-line2); border-radius: 12px; background: #fff;
}
.wl-nopreview {
  padding: 32px 20px; text-align: center; font-size: 14px; color: var(--w-sub);
  border: 1px dashed var(--w-line2); border-radius: 12px; background: var(--w-card);
}
.wl-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.wl-detail-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--w-mute); }
@media (max-width: 560px) {
  .wl-preview { height: 60vh; }
  .wl-detail-actions .btn-primary, .wl-detail-actions .btn-ghost { flex: 1; justify-content: center; }
}

/* 자료 종류 선택(세그먼트) — 업로드 모달 */
.wl-type-group { display: flex; flex-wrap: wrap; gap: 8px; }
.wl-type-btn {
  padding: 8px 14px; border: 1px solid var(--w-line2); border-radius: 99px;
  background: #fff; font: inherit; font-size: 13px; font-weight: 600; color: var(--w-sub); cursor: pointer;
}
.wl-type-btn.active { border-color: var(--w-accent); background: var(--w-accent-soft); color: var(--w-accent-ink); }

/* ── hero lead ── */
.wiki-intro .intro-lead {
  margin: 0 0 20px; font-size: 14.5px; color: var(--w-sub); line-height: 1.65; max-width: 640px;
}
.block-note { font-size: 12px; color: var(--w-mute); white-space: nowrap; }

/* ── NEW 최신 업데이트 ── */
.latest-list { display: flex; flex-direction: column; border: 1px solid var(--w-line); border-radius: 14px; background: var(--w-card); overflow: hidden; }
.latest-list > .muted, .latest-list > .error { margin: 0; padding: 14px 16px; }
.update-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 11px 16px; border-top: 1px solid var(--w-line); text-decoration: none; color: var(--w-ink);
}
.update-row:first-child { border-top: none; }
.update-row:hover { background: var(--w-accent-soft); }
.new-badge {
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em; color: #fff; background: var(--w-accent);
  border-radius: 5px; padding: 2px 6px; min-width: 34px; text-align: center;
}
.new-badge.ghost { background: transparent; color: var(--w-mute); font-weight: 400; min-width: 34px; }
.update-title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.update-row.is-new .update-title { font-weight: 700; }
.update-sub { font-size: 11.5px; color: var(--w-mute); white-space: nowrap; }

/* ── 인기 다운로드 TOP 10 ── */
.popular-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--w-line); border-radius: 14px; background: var(--w-card); overflow: hidden; }
.popular-list > .muted { margin: 0; padding: 14px 16px; }
.popular-row {
  display: grid; grid-template-columns: 28px 40px 1fr auto; align-items: center; gap: 10px;
  padding: 10px 16px; border-top: 1px solid var(--w-line);
}
.popular-row:first-child { border-top: none; }
.popular-row.top { background: #fdfaf3; }
.pop-rank { font-size: 13px; font-weight: 800; color: var(--w-sub); font-variant-numeric: tabular-nums; }
.popular-row.top .pop-rank { color: #d98324; }
.pop-trend { font-size: 11px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.pop-trend.up { color: #1f9d7a; }
.pop-trend.down { color: #c0563a; }
.pop-trend.new { color: #d98324; }
.pop-trend.same { color: var(--w-mute); }
.pop-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; text-decoration: none; color: var(--w-ink); }
.pop-cat { font-size: 11px; color: var(--w-mute); }
.pop-title { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-main:hover .pop-title { color: var(--w-accent-ink); }
.pop-count { font-size: 12.5px; font-weight: 700; color: var(--w-sub); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── WIKI THREAD 핵심 기능 ── */
.wiki-thread-feature { border: 1px solid var(--w-line2); border-radius: 16px; background: var(--w-card); padding: 20px; }
.wiki-thread-badge {
  display: inline-block; padding: 3px 10px; margin-right: 8px; border: 1px solid var(--w-accent);
  border-radius: 999px; color: var(--w-accent-ink); font-size: .72em; font-weight: 800; letter-spacing: .02em; vertical-align: 2px;
}
.thread-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.thread-step {
  display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--w-line);
  border-radius: 12px; background: var(--w-bg);
}
.thread-step .step-no { font-size: 11px; font-weight: 800; color: var(--w-accent); }
.thread-step b { font-size: 13.5px; }
.thread-step span:last-child { font-size: 11.5px; color: var(--w-mute); line-height: 1.5; }
.recent-threads-head { margin: 18px 0 8px; font-size: 13px; font-weight: 700; color: var(--w-sub); }
.recent-threads { display: flex; flex-wrap: wrap; gap: 8px; }
.recent-threads > .muted { margin: 0; }
.thread-row {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--w-line2);
  border-radius: 10px; background: var(--w-card); text-decoration: none; color: var(--w-ink);
}
.thread-row:hover { border-color: var(--w-accent); }
.thread-row b { font-size: 13px; }
.thread-row span { font-size: 11px; color: var(--w-mute); }

/* ── WIKI LIVE ── */
.wiki-live { border: 1px solid var(--w-line2); border-radius: 16px; background: var(--w-card); padding: 20px; }
.wiki-live .block-head h2 { display: flex; align-items: center; gap: 8px; }
.live-dot { font-size: 11px; font-weight: 800; color: #c0563a; letter-spacing: .03em; }
.live-members { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding-bottom: 14px; border-bottom: 1px solid var(--w-line); }
.live-members-label { font-size: 12px; font-weight: 700; color: var(--w-sub); }
.live-members-list { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.member-chip { font-size: 12px; color: var(--w-accent-ink); background: var(--w-accent-soft); border-radius: 999px; padding: 2px 10px; }
.live-feed { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; }
.live-feed > .muted { margin: 8px 0; }
.live-row { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; gap: 8px; padding: 7px 0; border-top: 1px solid var(--w-line); }
.live-row:first-child { border-top: none; }
.live-name { font-size: 12.5px; font-weight: 700; color: var(--w-sub); white-space: nowrap; }
.live-text { font-size: 13.5px; color: var(--w-ink); word-break: break-word; }
.live-time { font-size: 11px; color: var(--w-mute); white-space: nowrap; }
.live-more {
  margin-top: 8px; align-self: center; height: 30px; padding: 0 14px; border: 1px solid var(--w-line2);
  border-radius: 999px; background: transparent; color: var(--w-sub); font: inherit; font-size: 12px; cursor: pointer;
}
.live-more:hover { border-color: var(--w-accent); color: var(--w-accent-ink); }
.live-form { display: flex; gap: 8px; margin-top: 14px; }
.live-form input {
  flex: 1; min-width: 0; height: 38px; padding: 0 14px; border: 1px solid var(--w-line2);
  border-radius: 10px; font: inherit; font-size: 13.5px;
}
.live-form input:focus { outline: none; border-color: var(--w-accent); }
.live-form button {
  height: 38px; padding: 0 18px; border: none; border-radius: 10px; background: var(--w-accent-ink);
  color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.live-form button:disabled { opacity: .5; cursor: default; }
.live-hint { min-height: 16px; margin: 8px 0 0; font-size: 12px; color: var(--w-mute); }

/* ── responsive ── */
@media (max-width: 768px) {
  .wiki-topbar { flex-wrap: wrap; height: auto; padding: 10px 16px; gap: 8px 12px; }
  .wiki-topbar .brand-tag { flex-basis: 100%; order: 3; }
  .wiki-wrap { padding: 24px 16px 56px; }
  .board-grid { grid-template-columns: 1fr; }
  .grade-tab { flex: 1; min-width: 0; align-items: center; }
  .thread-steps { grid-template-columns: repeat(2, 1fr); }
  .recent-threads { flex-direction: column; }
  .recent-threads .thread-row { width: 100%; }
}
@media (max-width: 420px) {
  .wiki-intro h1 { font-size: 22px; }
  .original-list, .analysis-list, .learning-list { grid-template-columns: 1fr; }
  .board-search input { width: 100%; }
  .board-search { flex-wrap: wrap; }
  .compose-actions { flex-direction: column; }
  .compose-actions .btn-primary, .compose-actions .btn-ghost { width: 100%; justify-content: center; }
  .thread-steps { grid-template-columns: 1fr; }
  .update-row { grid-template-columns: auto 1fr; grid-template-areas: "badge title" "badge sub"; row-gap: 2px; }
  .update-row .new-badge { grid-area: badge; align-self: start; }
  .update-title { grid-area: title; }
  .update-sub { grid-area: sub; }
  .popular-row { grid-template-columns: 24px 32px 1fr; grid-template-areas: "rank trend main" "rank trend count"; row-gap: 2px; column-gap: 8px; }
  .popular-row .pop-rank { grid-area: rank; }
  .popular-row .pop-trend { grid-area: trend; }
  .popular-row .pop-main { grid-area: main; }
  .popular-row .pop-count { grid-area: count; text-align: left; font-size: 11.5px; }
  .live-row { grid-template-columns: auto 1fr; grid-template-areas: "name time" "text text"; row-gap: 2px; }
  .live-name { grid-area: name; }
  .live-time { grid-area: time; text-align: right; }
  .live-text { grid-area: text; }
}
