/* ═══════════════════════════════════════════════════════════════
   nomodick.com
   모바일 퍼스트다. 기본 규칙이 좁은 화면의 레이아웃이고,
   넓어지면 @media (min-width: ...)가 얹힌다.
   화면 폭은 어느 페이지나 --wrap 하나로 같다.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #0f1011;
  --panel: #16171a;
  --text: #e8e8ea;
  --muted: #7a7c80;
  /* 강조는 색이 아니라 흰색이다. 색을 쓰면 금세 커뮤니티 배너처럼 보인다. */
  --accent: #ffffff;
  --accent2: #e8e8ea;
  --border: #232426;
  /* 의미가 있는 곳에만 색을 쓴다 — 투표와 위험 동작. */
  --up: #4ade80;
  --danger: #f87171;

  /* 글자색 팔레트. editor-schema.ts의 COLORS와 키가 1:1이다.
     본문 HTML에는 클래스만 나가고 실제 색은 여기서만 정해진다. */
  --c-red: #ff6b6b;
  --c-orange: #ffa94d;
  --c-green: #69db7c;
  --c-blue: #4dabf7;
  --c-purple: #b197fc;
  --c-gray: #909296;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 system-ui, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

code { font-size: 12px; color: var(--muted); }

/* 목록도 글도 같은 폭을 쓴다. 페이지마다 폭이 달라지면
   옮겨 다닐 때마다 화면이 들썩거려서 같은 사이트로 안 보인다. */
main { max-width: 900px; margin: 0 auto; padding: 0 12px 40px; }

footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

/* ── 헤더 ───────────────────────────────────────────────────
   홈에는 명예의 전당만 있으므로 게시판으로 가는 길이 여기 하나뿐이다.
   회색 작은 글씨로 두면 길이 안 보인다 — 탭으로 세운다. */
.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.logo { display: inline-flex; align-items: center; flex: 0 0 auto; color: var(--accent); }
.logo:hover { text-decoration: none; filter: brightness(1.12); }
.logo-mark { height: 16px; width: auto; display: block; }

/* 좁으면 탭이 가로로 스크롤된다. 줄바꿈시키면 머리말 높이가 들쭉날쭉해진다. */
.site-header nav {
  display: flex;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-header nav::-webkit-scrollbar { display: none; }
.site-header nav a {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  height: 44px;
  padding: 0 11px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.site-header nav a:hover { color: var(--text); text-decoration: none; }
.site-header nav a.on { color: var(--text); border-bottom-color: var(--text); }

@media (min-width: 641px) {
  .site-header { gap: 24px; padding: 0 16px; }
  .logo-mark { height: 18px; }
  .site-header nav { gap: 4px; }
  .site-header nav a { height: 48px; padding: 0 14px; font-size: 14.5px; }
}

/* ── 입력 요소 공통 ───────────────────────────────────────── */
form input,
form textarea {
  width: 100%;
  margin: 4px 0;
  padding: 9px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font: inherit;
}
form input:focus,
form textarea:focus { outline: none; border-color: var(--accent); }
form input[type='checkbox'] { width: auto; }
form textarea { min-height: 120px; resize: vertical; }

form button {
  padding: 9px 20px;
  margin-top: 8px;
  background: var(--accent);
  color: #0f1011;
  border: 0;
  border-radius: 4px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
form button:hover { filter: brightness(1.08); }

form.inline { display: inline; }
form.inline input, form.inline button { width: auto; }
form.inline button { padding: 4px 10px; margin-top: 0; font-size: 12px; }

/* 쓰기·댓글 두 버튼은 같은 줄에 안 있지만 위아래로 가까이 놓이므로
   폭이 다르면 어긋난다. 글자 수가 달라도 같은 폭을 갖게 min-width를 맞춘다. */
.btn.write, .cf-row button {
  min-width: 72px;
  text-align: center;
}
.btn.write {
  display: inline-block;
  margin: 0 0 10px;
  padding: 8px 18px;
  background: var(--accent);
  color: #0f1011;
  border-radius: 4px;
  font-weight: 700;
}
.btn.write:hover { text-decoration: none; filter: brightness(1.08); }

.btn.ghost {
  display: inline-block;
  padding: 8px 18px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.btn.ghost:hover { border-color: var(--accent); text-decoration: none; }

.notice {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid var(--danger);
  border-radius: 4px;
  padding: 9px 12px;
  color: #e8a0a0;
  font-size: 13px;
}

/* 캡차는 interaction-only라 평소엔 빈 채로 있다. 빌 때는 자리를 안 준다. */
.cf-turnstile:empty { display: none; }
.cf-turnstile { margin: 4px 0 12px; }

/* ── 섹션 머리 ────────────────────────────────────────────── */
.sec { margin: 16px 0 24px; }
.sec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sec-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.sec-title a { color: var(--text); }
.sec-desc { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.sec-head .btn.write { flex: 0 0 auto; margin: 0; }

/* ── 목록 판 ──────────────────────────────────────────────── */
.board {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 12px 0;
  padding: 14px;
}
.board h2 { margin: 0 0 6px; font-size: 16px; }
.board ul, .board ol { margin: 0; padding: 0; list-style: none; }
/* 목록은 어디 안에 있든 본문과 같은 왼쪽 끝에서 시작해야 한다.
   브라우저 기본 padding-inline-start 40px이 남아 목록만 들여쓰기되고 있었다. */
/* .post-row의 좌우 4px을 상쇄해서 글자 시작선을 본문과 정확히 맞춘다.
   (호버 배경은 그 4px까지 덮어야 줄로 보인다) */
.plist { margin: 0 -4px; padding: 0; list-style: none; }
.desc { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.empty { color: var(--muted); font-size: 13px; padding: 8px 0; }

@media (min-width: 641px) {
  .board { margin: 16px 0; padding: 16px 18px; }
}

/* ── 글 한 줄 ─────────────────────────────────────────────────
   좁은 화면: 제목이 한 줄을 다 쓰고 메타가 아랫줄에 깔린다.
   행·열을 전부 명시한다 — 자동 배치에 맡기면 날짜가 제목 위로 올라간다. */
.post-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 3px 10px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.post-row:last-child { border-bottom: 0; }

.post-row .num { display: none; color: var(--muted); font-size: 12px; text-align: center; }
.post-row .vc { display: none; }
.post-row .title { grid-column: 1 / -1; grid-row: 1; }
.post-row .who { grid-column: 1; grid-row: 2; text-align: left; }
.post-row .sc { grid-column: 2; grid-row: 2; }
.post-row .dt { grid-column: 3; grid-row: 2; }

.post-row .title { display: flex; align-items: center; gap: 5px; min-width: 0; }
.post-row .title a {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 댓글 수는 제목을 거들 뿐이다. 파란색이면 제목보다 튄다. */
.post-row .cc { flex-shrink: 0; color: var(--muted); font-size: 11px; }
.post-row .cc::before { content: '['; }
.post-row .cc::after { content: ']'; }

.post-row .who,
.post-row .sc,
.post-row .vc,
.post-row .dt {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-row .sc, .post-row .vc, .post-row .dt { text-align: right; }

/* 칼럼 이름은 한 줄 배치일 때만 뜻이 있다 */
.post-row.phead { display: none; }

/* 순위는 좁은 화면에서도 남긴다 — 등수가 빠지면 TOP 10이 그냥 목록이다. */
.post-row.ranked { grid-template-columns: 2.2rem minmax(0, 1fr) auto auto; }
.post-row.ranked .num {
  display: block;
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
}
.post-row.ranked .title { grid-column: 2 / -1; grid-row: 1; }
.post-row.ranked .who { grid-column: 2; grid-row: 2; }
.post-row.ranked .sc { grid-column: 3; grid-row: 2; }
.post-row.ranked .dt { grid-column: 4; grid-row: 2; }

/* 랭킹 보드는 1~3위만 색을 준다 */
.ranking li:nth-child(1) .num, .hall-list li:nth-child(1) .num { color: #ffd700; font-weight: 700; }
.ranking li:nth-child(2) .num, .hall-list li:nth-child(2) .num { color: #c0c0c0; font-weight: 700; }
.ranking li:nth-child(3) .num, .hall-list li:nth-child(3) .num { color: #cd7f32; font-weight: 700; }

/* 넓어지면 한 줄짜리 게시판 표가 된다. 칼럼 폭이 고정이라 세로로 스캔이 된다. */
@media (min-width: 641px) {
  .post-row,
  .post-row.ranked {
    grid-template-columns: 3.2rem minmax(0, 1fr) 6.5rem 4.5rem 3.5rem 3rem;
    gap: 8px;
    padding: 8px 4px;
  }
  .post-row .num,
  .post-row.ranked .num { display: block; grid-column: auto; grid-row: auto; }
  .post-row .vc { display: block; }
  .post-row .title,
  .post-row .who,
  .post-row .sc,
  .post-row .dt,
  .post-row.ranked .title,
  .post-row.ranked .who,
  .post-row.ranked .sc,
  .post-row.ranked .dt { grid-column: auto; grid-row: auto; }
  .post-row .who { text-align: left; }
  .post-row:hover { background: rgba(255, 255, 255, 0.025); }

  /* 칼럼 이름. 없으면 인정 16 / 654 중 뭐가 조회수인지 알 길이 없다. */
  .post-row.phead {
    display: grid;
    padding: 6px 4px;
    color: var(--muted);
    font-size: 12px;
  }
  .post-row.phead:hover { background: none; }
}

/* ── 페이지 번호 ──────────────────────────────────────────── */
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  padding: 14px 0 2px;
  color: var(--muted);
}
.pg {
  min-width: 34px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 4px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
a.pg:hover { border-color: var(--border); color: var(--text); text-decoration: none; }
.pg.cur { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.pg.gap { min-width: 16px; padding: 7px 2px; }
.pg.off { opacity: 0.3; pointer-events: none; }

/* ── 글 상세 ──────────────────────────────────────────────────
   글이 주인공이고 댓글은 딸린 것이다. 판을 똑같이 생기게 두면
   어디가 글이고 어디가 댓글인지 안 보인다. */
.crumb { padding: 12px 0 0; font-size: 13px; color: var(--muted); }
.crumb a { color: var(--muted); }
.crumb-now::before { content: '·'; margin: 0 6px; }

/* 글은 판 안에 넣지 않는다. 테두리를 두르면 읽는 화면이 아니라
   게시판 칸이 된다. 아래에 선 하나로만 닫는다. */
.post {
  margin: 8px 0 0;
  padding: 4px 0 20px;
  border-bottom: 1px solid var(--border);
}
.post h2 { margin: 0 0 8px; font-size: 21px; line-height: 1.35; }
.post .meta {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.post .body {
  font-size: 16px;
  line-height: 1.85;
  word-break: break-word;
  margin: 0 0 22px;
  min-height: 70px;
}
/* 평문 본문은 줄바꿈을 그대로 살린다. 서식 본문은 태그가 이미 나눠져 있다. */
.post .body:not(.rich) { white-space: pre-wrap; }
.post img { max-width: 100%; border-radius: 4px; margin: 8px 0; display: block; }



@media (min-width: 641px) {
  .post { padding: 8px 0 26px; }
  .post h2 { font-size: 24px; }
  .post .body { font-size: 16.5px; margin: 0 0 26px; min-height: 80px; }
}

/* 투표함. 내용만큼만 차지한다 — 폭을 다 쓰면 가운데 정렬한 버튼 양옆에
   큰 빈 띠가 생겨서 바로 밑의 왼쪽 링크들과 축이 어긋나 보인다. */
/* 투표함은 본문 끝에 가운데로 둔다. 버튼 자체가 이미 테두리가 있어
   바깥에 상자를 한 겹 더 잔 필요가 없다. */
.vote-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 4px 0 18px;
}
/* 두 버튼을 색으로만 나누면 색약자에게는 같은 버튼 둘이다.
   화살표 방향(위/아래)까지 다르게 주고, 테두리 색으로 한 번 더 나눈다. */
.vote {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 96px;
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.vote svg { width: 17px; height: 17px; flex: 0 0 auto; }
.vote .vlabel { font-weight: 700; letter-spacing: 0.02em; }
.vote .vn { font-size: 15px; font-weight: 700; margin-left: auto; color: var(--text); }

.vote.up { border-color: rgba(74, 222, 128, 0.3); }
.vote.up:hover, .vote.up.done { border-color: var(--c-green); color: var(--up); background: rgba(74, 222, 128, 0.1); }
.vote.down { border-color: rgba(248, 113, 113, 0.3); }
.vote.down:hover, .vote.down.done { border-color: var(--danger); color: var(--danger); background: rgba(248, 113, 113, 0.12); }
.vote.done .vn, .vote:hover .vn { color: inherit; }

.score { font-size: 20px; font-weight: 700; min-width: 2.4em; text-align: center; }

@media (min-width: 641px) {
  .vote-box { gap: 16px; margin-bottom: 22px; }
  .vote { min-width: 96px; padding: 8px 20px; }
}

.actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}
.actions a { color: var(--muted); }
.actions button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font: inherit; }
.actions a:hover, .actions button:hover { color: var(--text); }



/* ── 댓글 ─────────────────────────────────────────────────────
   글에 딸린 것이므로 테두리 없이 한 단계 눌러 놓는다. */
.comments {
  padding: 0;
  margin: 18px 0 14px;
  font-size: 13px;
}
.comments h3 {
  margin: 0 0 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.comments ul { margin: 0; padding: 0; list-style: none; }

.comment { padding: 10px 0; border-bottom: 1px solid var(--border); word-break: break-word; }
.comment:last-child { border-bottom: 0; }
.comment.reply {
  padding-left: 14px;
  margin-left: 4px;
  border-left: 2px solid var(--border);
}
.chead { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.chead .nick { font-weight: 700; font-size: 12.5px; color: var(--text); }
.chead .cmeta { color: var(--muted); font-size: 11px; }
.cbody { white-space: pre-wrap; word-break: break-word; line-height: 1.6; margin-bottom: 5px; }

.cact { display: flex; align-items: center; gap: 12px; }
.cact a, .cact button, .cact summary { color: var(--muted); font-size: 12px; }
.cact button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.cact a:hover, .cact button:hover, .cact summary:hover { color: var(--text); }

/* 삭제는 접어둔다. 매 댓글마다 비번칸을 펼쳐두면
   거의 안 쓰는 기능이 댓글 본문보다 자리를 더 먹는다. */
.cdel summary { cursor: pointer; list-style: none; }
.cdel summary::-webkit-details-marker { display: none; }
.cdel form { display: flex; gap: 6px; margin-top: 8px; }
.cdel input { width: 130px; margin: 0; padding: 5px 8px; font-size: 12px; }
.cdel button { margin: 0; padding: 5px 12px; font-size: 12px; background: var(--danger); color: #fff; border-radius: 4px; }

.replying {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  margin: 0 0 6px;
}

@media (min-width: 641px) {
  .comment { padding: 12px 0; }
}

/* ── 댓글 입력 ────────────────────────────────────────────────
   전에는 닉네임·비번·본문·버튼이 각자 한 줄씩 네 줄을 먹었다.
   좁으면 두 줄([닉][비번] / [본문][올린다]), 넓으면 한 줄이다. */
.comment-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.cf-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; }
.cf-row input, .cf-row textarea { margin: 0; padding: 7px 9px; font-size: 13px; }
.cf-row .cf-nick, .cf-row .cf-pw { flex: 1 1 0; min-width: 0; }
.cf-row .cf-body {
  flex: 1 1 100%;
  order: 3;
  min-height: 0;
  height: 36px;
  max-height: 160px;
  line-height: 1.5;
  resize: none;
  overflow-y: hidden;
}
.cf-row button { order: 4; flex: 0 0 auto; margin: 0; padding: 8px 18px; font-size: 13px; }
.comment-form .cf-turnstile { margin: 8px 0 0; }

@media (min-width: 641px) {
  .cf-row { flex-wrap: nowrap; }
  .cf-row .cf-nick { flex: 0 0 110px; }
  .cf-row .cf-pw { flex: 0 0 90px; }
  .cf-row .cf-body { flex: 1 1 auto; order: 0; }
  .cf-row button { order: 0; padding: 7px 16px; }
}

/* ── 글쓰기 폼 ────────────────────────────────────────────── */
.post-form { padding: 4px 0 0; margin: 8px 0 16px; }
.form-title { margin: 0 0 12px; font-size: 18px; }
.post-form .notice { margin: 0 0 14px; }
.post-form input, .post-form textarea { margin: 0 0 10px; }

/* 제목 + 본문을 한 장의 문서로 묶는다.
   전에는 닉네임·비번·제목이 똑같이 생긴 칸으로 위에 쌓여 있어서
   글을 쓰러 온 화면인데 서류부터 채우는 것처럼 보였다. */
.doc {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
/* 툴바는 JS가 떠야 채워진다. 비면 자리를 안 준다. */
.toolbar-slot:empty { display: none; }
.doc .toolbar { border-bottom: 1px solid var(--border); }
.doc .editor { margin: 0; border: 0; border-radius: 0; }
/* 제목 바로 밑이라 위쪽 여백은 줄인다 */
.doc .editor-surface { padding: 4px 14px 14px; }
.doc textarea[name='body'] { border: 0; border-radius: 0; margin: 0; }

.doc-title {
  margin: 0;
  padding: 16px 14px 6px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--text);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
}
.doc-title::placeholder { color: var(--muted); font-weight: 700; }
.post-form .doc-title { margin: 0; }
.post-form .doc-title:focus { border: 0; outline: none; }

/* 누가 쓰는지는 메일 보낼 때의 '보내는 사람' 칸처럼 문서 위에 붙인다.
   본문 밑에 입력칸으로 두면 댓글 폼과 똑같이 생겼다. */
.who-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.wf { display: flex; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; }
.wf > span { flex: 0 0 auto; color: var(--muted); font-size: 12px; }
.wf input { flex: 1 1 0; min-width: 0; margin: 0; padding: 6px 9px; font-size: 13px; }

@media (min-width: 641px) {
  .doc-title { padding: 20px 18px 8px; font-size: 24px; }
  .doc .editor-surface { padding: 4px 18px 16px; }
  .who-bar { justify-content: flex-end; margin-bottom: 10px; }
  .wf { flex: 0 0 auto; }
  .wf input { flex: 0 0 170px; }
}
.del-target {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-weight: 700;
  word-break: break-word;
}

/* 제출 줄. 좁으면 버튼이 폭을 반씩 나눠 갖고, 넓으면 오른쪽에 붙는다. */
.form-foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.form-foot .cf-turnstile { margin: 0; }
.foot-btns { display: flex; align-items: center; gap: 10px; }
.foot-btns .btn.ghost, .foot-btns button { flex: 1 1 0; text-align: center; margin: 0; }
.foot-btns button.danger { background: var(--danger); color: #fff; }

@media (min-width: 641px) {
  .post-form { padding: 4px 0 0; }
  .form-foot { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .foot-btns { margin-left: auto; }
  .foot-btns .btn.ghost, .foot-btns button { flex: 0 0 auto; }
}

/* ── 사진 넣기(폼 바깥 업로더) ────────────────────────────── */
.uploader { margin: 8px 0; }

/* JS가 살아있으면 원래 파일 입력은 감춘다(.drop이 대신 연다).
   JS가 죽으면 이 규칙이 안 걸려서 평범한 파일 선택 버튼이 그대로 보인다. */
.uploader.has-drop > input[type='file'] { display: none; }

.uploader .drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 12px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.12s, background 0.12s;
}
.uploader .drop:hover { border-color: var(--accent); }
.uploader.dragging .drop { border-color: var(--accent); background: rgba(255, 255, 255, 0.06); }
.uploader .drop b { font-size: 15px; color: var(--text); }
.uploader .drop span { font-size: 12px; color: var(--muted); }
.uploader .drop .count { font-weight: 700; color: var(--accent); }

.uploader .thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.uploader .thumbs li {
  position: relative;
  width: 88px;
  height: 88px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg);
}
.uploader .thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }
.uploader .thumbs .rm {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}
.uploader .thumbs .rm:hover { background: var(--danger); }
.uploader .thumbs li .no {
  position: absolute;
  bottom: 2px;
  left: 4px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 0 3px #000, 0 0 3px #000;
  pointer-events: none;
}

.uploader .note:empty { display: none; }
.uploader .note { margin: 6px 0 0; font-size: 13px; color: var(--accent); }
.uploader .hint { margin: 6px 0 0; font-size: 11px; color: var(--muted); }
.uploader .hint code {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 4px;
  color: var(--accent);
}

/* 에디터가 뜨면 밖의 업로더 상자는 접는다 — 본문에 업로드 자리가 생기므로 중복이다.
   파일 입력과 오류 메시지 줄만 남긴다. */
.post-form.has-editor .uploader .drop,
.post-form.has-editor .uploader .thumbs,
.post-form.has-editor .uploader .hint { display: none; }
.post-form.has-editor .uploader { margin: 0; }
.post-form.has-editor .uploader .note { margin: 0 0 8px; }

/* ── 글쓰기 에디터 ─────────────────────────────────────────
   TipTap simple 템플릿 결: 아이콘 버튼, 그룹 구분선, 중립적인 최소 스타일.
   툴바 안의 버튼은 전부 같은 옷을 입는다 — 하나만 색이 다르면
   툴바가 아니라 광고처럼 보인다. */

/* JS가 뜨면 평문 textarea를 감춘다. 안 뜨면 이 클래스가 안 붙어서 그대로 보인다. */
textarea.replaced { display: none; }

.editor:empty { display: none; }
.editor { margin: 4px 0 10px; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }

/* 폭 예산 (PC, main 900px 기준 툴바 안쪽 가용 폭 820px):
     되돌리기 61 + 문단 177 + 글자 185 + 블록 154 + 넣기 155 = 732
     + 구분선 4개 x 13 = 52 + 묶음 사이 간격 4 x 2 = 8  →  792 / 820
   버튼을 더 넣으려면 이 숫자를 다시 계산해라. 넘으면 줄이 갈라진다. */
.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  /* 좌우 6px. 8px면 360px 화면에서 마지막 줄이 딱 1px 모자라 줄이 하나 더 생긴다. */
  padding: 6px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
/* 묶음은 절대 안 쪼개진다(nowrap). 좁아지면 묶음 단위로만 줄이 바뀌므로
   버튼이 한 줄씩 흘러내리지 않고 덩어리로 떨어진다.
   덩어리 폭을 맞춰놔서 360px에서도 정확히 3줄이 된다:
     [되돌리기 문단] / [글자] / [블록 넣기] */
.tb-group { display: flex; align-items: center; flex-wrap: nowrap; gap: 0; }
.tb-spacer { display: none; }

.tb-btn,
.tb-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 5px;
  font: inherit;
  cursor: pointer;
}
.tb-btn { width: 28px; }
.tb-btn svg, .tb-add svg { width: 17px; height: 17px; }
.tb-btn:hover:not(:disabled),
.tb-add:hover { background: rgba(255, 255, 255, 0.07); }
.tb-btn.on { background: var(--accent); color: #0f1011; }
.tb-btn:disabled { opacity: 0.3; cursor: default; }

/* 사진·영상은 툴바의 다른 버튼과 같은 옷을 입되 글자가 붙어서 조금 넓다.
   전에는 혼자 노란 덩어리라 툴바에서 튀었다. */
.tb-add {
  padding: 0 8px;
  margin-left: 2px;
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}
.tb-add:hover { color: var(--text); border-color: var(--accent); }
.tb-add svg { width: 15px; height: 15px; }

.tb-select {
  height: 30px;
  width: auto;
  margin: 0;
  padding: 0 6px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

/* 글자색 버튼: 'A' 아래 막대가 지금 걸린 색이다. */
.tb-pop-wrap { position: relative; display: inline-flex; }
.tb-colorbtn { flex-direction: column; gap: 0; }
.tb-colorbtn svg { width: 15px; height: 15px; margin-top: 1px; }
/* 색 없음과 회색(tc-gray #909296)을 둘 다 회색 막대로 그리면
   대비가 1.04:1이라 구분이 안 된다.
   색이 없을 때는 빈 테두리, 있을 때만 꽉 채운다. */
.tb-colorbtn .cbar {
  width: 15px;
  height: 4px;
  margin-top: 1px;
  border: 1px solid var(--muted);
  border-radius: 1px;
  background: transparent;
}
.tb-colorbtn .cbar[class*='tc-'] { border-color: transparent; background: currentColor; }

/* 색 목록. 방울 격자가 아니라 평범한 드롭다운 줄이다 —
   이름은 보통 글자색으로 읽고 색은 앞의 작은 칩으로만 보여준다. */
.tb-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  min-width: 128px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.tb-mi {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  margin: 0;
  background: none;
  border: 0;
  border-radius: 4px;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.tb-mi:hover, .tb-mi:focus-visible { background: rgba(255, 255, 255, 0.07); outline: none; }
/* 칩만 그 색이다. 이름까지 물들이면 결국 알록달록한 목록이 된다. */
.tb-mi .chip {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: currentColor;
}
.tb-mi.on::after { content: '✓'; margin-left: auto; padding-left: 8px; color: var(--accent); font-size: 11px; }
/* 색 지우기는 목록이 아니라 마무리 동작이라 선 하나로 떼어놓는다 */
.tb-mi-none {
  margin-top: 4px;
  padding-top: 9px;
  padding-left: 29px;
  border-top: 1px solid var(--border);
  border-radius: 0 0 3px 3px;
  color: var(--muted);
}
.tb-mi-none:hover { color: var(--text); }


.editor-surface { background: var(--bg); padding: 12px 14px; min-height: 260px; }
.editor-surface.dragging { background: rgba(255, 255, 255, 0.04); }
.editor-surface .tiptap { outline: none; min-height: 236px; }

/* Placeholder 확장이 data-placeholder를 붙여준다.
   빈 본문이 아무 글자 없는 큰 상자로 남아 있어서 어디에 쓰는지 안 보였다. */
.editor-surface .tiptap p.is-editor-empty:first-child::before,
.editor-surface .tiptap h2.is-empty::before,
.editor-surface .tiptap h3.is-empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
  float: left;
  height: 0;
  pointer-events: none;
}

/* 넓어지면 스페이서가 살아나 사진·영상이 오른쪽 끝으로 가고, 그룹 구분선이 붙는다.
   좁을 때 구분선을 켜면 줄바꿈마다 선이 줄 머리에 동동 뜬다. */
/* 넓어지면 한 줄로 붙고 묶음 사이에 구분선이 들어간다.
   좁을 때 구분선을 켜면 줄바꿈마다 선이 줄 머리에 동동 뜬다. */
@media (min-width: 900px) {
  .toolbar { gap: 2px; padding: 6px 8px; flex-wrap: nowrap; }
  .tb-group { gap: 1px; }
  .tb-btn { width: 30px; }
  .tb-add { padding: 0 10px; margin-left: 4px; font-size: 12px; }
  .tb-group + .tb-group::before {
    content: '';
    width: 1px;
    height: 18px;
    background: var(--border);
    margin: 0 6px;
  }
}

/* ── 서식 본문 ────────────────────────────────────────────────
   에디터 안(.tiptap)과 저장된 글(.body.rich)이 똑같이 보여야 한다.
   쓸 때와 올린 뒤가 다르면 서식을 믿고 쓸 수가 없다. */
.editor-surface .tiptap,
.post .body.rich { word-break: break-word; }

.editor-surface .tiptap p,
.post .body.rich p { margin: 0 0 0.9em; }
.editor-surface .tiptap > *:last-child,
.post .body.rich > *:last-child { margin-bottom: 0; }

.editor-surface .tiptap h2,
.post .body.rich h2 { margin: 1.2em 0 0.5em; font-size: 1.35em; line-height: 1.35; }
.editor-surface .tiptap h3,
.post .body.rich h3 { margin: 1.1em 0 0.4em; font-size: 1.15em; line-height: 1.4; }
.editor-surface .tiptap > h2:first-child,
.editor-surface .tiptap > h3:first-child,
.post .body.rich > h2:first-child,
.post .body.rich > h3:first-child { margin-top: 0; }

.editor-surface .tiptap ul,
.editor-surface .tiptap ol,
.post .body.rich ul,
.post .body.rich ol { margin: 0 0 0.9em; padding-left: 1.5em; }
.editor-surface .tiptap li,
.post .body.rich li { margin: 0.2em 0; }
.editor-surface .tiptap ul,
.post .body.rich ul { list-style: disc; }
.editor-surface .tiptap ol,
.post .body.rich ol { list-style: decimal; }

.editor-surface .tiptap blockquote,
.post .body.rich blockquote {
  margin: 0 0 0.9em;
  padding: 2px 0 2px 14px;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}

.editor-surface .tiptap pre,
.post .body.rich pre {
  margin: 0 0 0.9em;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
}
.editor-surface .tiptap pre code,
.post .body.rich pre code { padding: 0; background: none; color: var(--text); font-size: inherit; }
.editor-surface .tiptap code,
.post .body.rich code {
  padding: 1px 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  color: var(--accent);
  font-size: 0.9em;
}

.editor-surface .tiptap hr,
.post .body.rich hr { margin: 1.2em 0; border: 0; border-top: 1px solid var(--border); }

.editor-surface .tiptap a,
.post .body.rich a { color: var(--accent2); text-decoration: underline; }

.editor-surface .tiptap mark,
.post .body.rich mark { background: rgba(255, 235, 130, 0.28); color: inherit; border-radius: 2px; padding: 0 2px; }

/* 표는 좁은 화면에서 넘칠 수 있다. 판 밖으로 새지 않게 가둔다. */
.editor-surface .tiptap table,
.post .body.rich table {
  width: 100%;
  margin: 0 0 0.9em;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.95em;
}
.editor-surface .tiptap th,
.editor-surface .tiptap td,
.post .body.rich th,
.post .body.rich td {
  position: relative;
  border: 1px solid var(--border);
  padding: 6px 8px;
  vertical-align: top;
  word-break: break-word;
}
.editor-surface .tiptap th,
.post .body.rich th { background: rgba(255, 255, 255, 0.04); font-weight: 700; text-align: left; }
/* 에디터에서 표 칸을 고르면 어디를 잡았는지 보여야 한다 */
.editor-surface .tiptap .selectedCell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.14);
  pointer-events: none;
}

/* 글자색. editor-schema.ts의 COLORS와 키가 같아야 한다.
   본문 HTML에는 이 클래스만 나가고 인라인 style은 하나도 없다. */
.tc-red { color: var(--c-red); }
.tc-orange { color: var(--c-orange); }
.tc-green { color: var(--c-green); }
.tc-blue { color: var(--c-blue); }
.tc-purple { color: var(--c-purple); }
.tc-gray { color: var(--c-gray); }

/* 첨부가 사라진 자리 */
.photo-missing { color: var(--muted); font-size: 12px; }

/* ── 본문 속 첨부 ─────────────────────────────────────────── */
.photo-node { position: relative; display: block; margin: 10px 0; }
.photo-node img, .photo-node video { max-width: 100%; border-radius: 4px; display: block; }

/* 클릭하면 ProseMirror가 이 클래스를 붙인다.
   selectNode를 직접 정의하면 이게 안 붙으므로 nodeView에서 건드리지 않는다. */
.photo-node.selected {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.photo-node .grip {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border: 2px solid #16181d;
  border-radius: 50%;
  display: none;
  z-index: 2;
}
.photo-node.selected .grip { display: block; }
.photo-node .grip.tl { top: -6px; left: -6px; cursor: nwse-resize; }
.photo-node .grip.tr { top: -6px; right: -6px; cursor: nesw-resize; }
.photo-node .grip.bl { bottom: -6px; left: -6px; cursor: nesw-resize; }
.photo-node .grip.br { bottom: -6px; right: -6px; cursor: nwse-resize; }

.photo-node .wlabel {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 11px;
  border-radius: 3px;
  display: none;
  z-index: 3;
}
.photo-node.resizing .wlabel { display: block; }
.photo-node.resizing { user-select: none; }

/* 폭은 감싸는 .photo-node에 준다. 미디어에 주면 wrap이 계속 100%라
   외곽선과 그립이 줄어든 미디어를 안 따라온다.
   폭이 지정된(.sized) 동안은 .pw-N이 이겨야 하므로 :not()으로 비켜준다. */
.photo-node:not(.sized) { width: fit-content; max-width: 100%; }
.photo-node.sized { max-width: 100%; }
.photo-node.sized > img,
.photo-node.sized > video { width: 100%; }
.upload-slot { width: auto; }

/* 아직 파일이 없는 자리 — 사진·영상을 누르면 본문에 이게 깔린다 */
.upload-slot .slot-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 16px;
  border: 2px dashed var(--border);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.12s, background 0.12s;
}
.upload-slot .slot-inner:hover { border-color: var(--accent); }
.upload-slot.over .slot-inner { border-color: var(--accent); background: rgba(255, 255, 255, 0.06); }
.upload-slot .slot-icon { color: var(--accent); }
.upload-slot .slot-icon svg { width: 26px; height: 26px; }
.upload-slot .slot-main { font-size: 13px; color: var(--text); }
.upload-slot .slot-main b { color: var(--accent); text-decoration: underline; }
.upload-slot .slot-sub { font-size: 11px; color: var(--muted); }

/* 첨부 폭. 5% 단위 고정 클래스라 본문에 style 속성이 필요 없다. */
.pw-10 { width: 10%; }
.pw-15 { width: 15%; }
.pw-20 { width: 20%; }
.pw-25 { width: 25%; }
.pw-30 { width: 30%; }
.pw-35 { width: 35%; }
.pw-40 { width: 40%; }
.pw-45 { width: 45%; }
.pw-50 { width: 50%; }
.pw-55 { width: 55%; }
.pw-60 { width: 60%; }
.pw-65 { width: 65%; }
.pw-70 { width: 70%; }
.pw-75 { width: 75%; }
.pw-80 { width: 80%; }
.pw-85 { width: 85%; }
.pw-90 { width: 90%; }
.pw-95 { width: 95%; }
.pw-100 { width: 100%; }

/* 저장된 글 안의 사진·영상도 지정한 폭을 지킨다 */
.post .body.rich img,
.post .body.rich video { max-width: 100%; border-radius: 4px; margin: 10px 0; display: block; }

/* ── 댓글 인정/GAY ─────────────────────────────────────────
   댓글 줄에 들어가므로 글 투표보다 훨씬 작다.
   여기서도 방향(위/아래) + 색으로 두 번 구분한다. */
.cvote { display: inline-flex; align-items: center; gap: 4px; margin-right: 4px; }
/* .cact button 규칙(border:0, padding:0)이 특이도로 이겨서 알약 모양이 죽는다.
   같은 특이도로 맞춰야 한다. */
.cact .cv {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.cact .cv svg { width: 12px; height: 12px; }
.cact .cv .vn { font-weight: 700; }
.cact .cv.up:hover, .cact .cv.up.done { border-color: var(--c-green); color: var(--up); background: rgba(74, 222, 128, 0.1); }
.cact .cv.down:hover, .cact .cv.down.done { border-color: var(--danger); color: var(--danger); background: rgba(248, 113, 113, 0.12); }


/* ── 푸터 ─────────────────────────────────────────────────── */
footer .copy { margin: 0 0 6px; letter-spacing: 0.02em; }
footer .flinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; margin: 0; }
footer .flinks a { color: var(--muted); }
footer .flinks a:hover { color: var(--text); }

/* ── 약관·방침 ────────────────────────────────────────────── */
.legal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 16px 0;
  padding: 20px 18px;
  font-size: 14px;
  line-height: 1.85;
  word-break: break-word;
}
.legal h1 { margin: 0 0 4px; font-size: 22px; }
.legal-meta { margin: 0 0 20px; color: var(--muted); font-size: 12px; }
.legal h2 {
  margin: 26px 0 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--accent);
}
.legal p { margin: 0 0 12px; }
.legal ol { margin: 0 0 12px; padding-left: 1.4em; }
.legal li { margin: 4px 0; }
.legal table {
  width: 100%;
  margin: 0 0 14px;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}
.legal th, .legal td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
}
.legal th { background: rgba(255, 255, 255, 0.04); color: var(--text); font-weight: 700; }
.legal td { color: var(--muted); }
.legal-foot {
  margin: 24px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

@media (min-width: 641px) {
  .legal { padding: 28px 30px; }
  .legal h1 { font-size: 26px; }
}

/* 글 아래에 붙는 게시판 목록. 댓글 입력칸 바로 밑에 목록이 그냥 이어져서
   어디까지가 이 글이고 어디부터가 목록인지 끊기지 않았다.
   위아래 여백을 크게 벌리고, 화면 폭을 다 쓰는 선 하나로 자른다. */
.sec.below {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
/* main 안쪽 여백만큼 좌우로 더 뻗어서 진짜 '구간이 바뀐다'로 읽히게 한다 */
.sec.below::before {
  content: '';
  display: block;
  height: 1px;
  margin: -27px -12px 26px;
  background: var(--border);
}
.sec.below { border-top: 0; padding-top: 26px; }

@media (min-width: 641px) {
  .sec.below { margin-top: 44px; padding-top: 32px; }
  .sec.below::before { margin: -33px -12px 32px; }
}

/* ── 게시판 목록 ─────────────────────────────────────────────
   글 목록(.post-row)과 같은 그리드 리듬을 쓰되 칼럼이 다르다. */
.blist { margin: 0 -4px; }
.board-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 2px 10px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.board-row:last-child { border-bottom: 0; }
.board-row .bname { grid-column: 1; grid-row: 1; font-size: 14px; font-weight: 600; min-width: 0; }
.board-row .bname a { color: var(--text); }
.board-row .bdesc {
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-row .bn, .board-row .bwhen {
  grid-row: 1;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.board-row .bn { grid-column: 2; }
.board-row .bwhen { grid-column: 3; }
.board-row.bhead { display: none; }

@media (min-width: 641px) {
  .board-row {
    grid-template-columns: 9rem minmax(0, 1fr) 4rem 4rem;
    gap: 10px;
    padding: 9px 4px;
  }
  .board-row .bname { grid-column: 1; grid-row: auto; }
  .board-row .bdesc { grid-column: 2; grid-row: auto; }
  .board-row .bn { grid-column: 3; grid-row: auto; }
  .board-row .bwhen { grid-column: 4; grid-row: auto; }
  .board-row:hover { background: rgba(255, 255, 255, 0.025); }
  .board-row.bhead {
    display: grid;
    padding: 6px 4px;
    color: var(--muted);
    font-size: 12px;
  }
  .board-row.bhead .bname { font-size: 12px; font-weight: 400; }
  .board-row.bhead:hover { background: none; }
}

/* 라벨이 붙는 입력 줄 (게시판 만들기) */
.field { margin: 0 0 14px; }
.field label { display: block; margin: 0 0 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.field input { margin: 0; }
.field .hint { margin: 5px 0 0; color: var(--muted); font-size: 11.5px; }
.field .hint b { color: var(--text); }
.post-form input:disabled { opacity: 0.45; cursor: not-allowed; }
.post-form button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }

/* ── 인정글 / 게이글 전환 ─────────────────────────────────────
   두 순위를 오갈 수 있어야 '나눠서 본다'가 성립한다.
   머리말 탭과 모양을 맞춰서 같은 성격의 컨트롤로 읽히게 한다. */
.switch { display: flex; gap: 4px; margin: 0 0 4px; }
.switch a {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.switch a:hover { color: var(--text); text-decoration: none; }
.switch a.on { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ── 대분류 안의 게시판 줄 ─────────────────────────────────
   머리말 탭은 대분류까지만 보여준다. 그 안에 들어오면 여기서 형제를 펼친다.
   머리말 탭과 구분되게 알약 모양으로, 한 단계 작게 둔다. */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 14px 0 0;
  padding-bottom: 2px;
}
.subnav a {
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12.5px;
}
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a.on { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; }

/* 게시판 목록에서 대분류마다 한 덩어리 */
.sec.cat { margin: 26px 0 0; }
.sec.cat + .sec.cat { padding-top: 22px; border-top: 1px solid var(--border); }

/* 게시판 만들기의 대분류 고르기 */
.field select {
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font: inherit;
}
.field select:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── 관리자: 유저 게시판 ─────────────────────────────────── */
.admin-board { padding: 12px 0; border-bottom: 1px solid var(--border); }
.admin-board:last-child { border-bottom: 0; }
.ab-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ab-head a { color: var(--text); font-weight: 700; }
.ab-meta { color: var(--muted); font-size: 12px; }
.ab-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ab-form input { flex: 1 1 160px; margin: 0; padding: 6px 9px; font-size: 13px; }
.ab-form button { margin: 0; padding: 6px 14px; font-size: 13px; }
.ab-del { margin-top: 8px; }
.ab-del summary { cursor: pointer; color: var(--muted); font-size: 12px; list-style: none; }
.ab-del summary::-webkit-details-marker { display: none; }
.ab-del summary:hover { color: var(--danger); }
.ab-del .notice { margin: 8px 0; }
.ab-del label { display: block; margin: 0 0 8px; font-size: 13px; }
.ab-del button.danger { background: var(--danger); color: #fff; margin: 0; }
