/* 게시판 — 사이트 토큰(styles.css :root) 위에 nckorean 「한인정보마당」 배치(표 목록·알약 탭·쪽 번호·920px 글 보기) */
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.b-main { padding-block: clamp(28px, 5vw, 56px) 80px; min-height: 70vh; }
.b-main .wrap { max-width: 1000px; }
.b-muted { color: var(--muted); }
.small { font-size: 13px; }

/* 머리 — 제목과 로그인 줄 */
.b-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; padding-bottom: 20px; }
.b-eyebrow { font-size: 13px; font-weight: 600; color: var(--live-deep); }
.b-head h1 { margin-top: 4px; font-size: clamp(34px, 5vw, 48px); font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.b-head h1 a { text-decoration: none; }
.b-head h1:focus, .b-ptitle:focus { outline: none; }   /* 화면을 바꿀 때 코드로 옮긴 초점 */
.b-head .b-muted { margin-top: 8px; font-size: 15px; }
.b-auth { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; }
.b-links { display: inline-flex; flex-wrap: wrap; gap: 0 12px; }
.b-gbtn { min-height: 44px; display: flex; align-items: center; }
.b-warn { color: #b3261e; font-size: 14px; }
.b-warn.box { margin-bottom: 16px; padding: 10px 14px; border-radius: 8px; background: #fdecea; }

/* 단추 — 누를 자리 40px 이상 */
.b-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink);
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.b-btn:hover { background: var(--bg-2); }
.b-btn:disabled { opacity: .5; cursor: default; }
.b-btn.primary { border-color: var(--live); background: var(--live); }
.b-btn.primary:hover { background: var(--live-hover); }
.b-btn.danger { color: #b3261e; }
.b-btn.link, .b-link {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0; border: 0; background: none; color: var(--ink-2);
  font: inherit; font-size: 13px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.b-btn.link.danger { color: #b3261e; }
.b-btn:focus-visible, .b-link:focus-visible, .b-tab:focus-visible, .b-page:focus-visible { outline: 2px solid var(--live-deep); outline-offset: 2px; }
.b-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.b-row.between { justify-content: space-between; }
.b-row.end { justify-content: flex-end; }

/* 분류 탭·검색 */
.b-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 4px 16px; border-top: 1px solid var(--line); padding-top: 18px; }
.b-tab { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); font-size: 14px; font-weight: 600; text-decoration: none; }
.b-tab:hover { color: var(--ink); }
.b-tab[aria-current="page"] { background: var(--ink); color: #fff; }
.b-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding-bottom: 12px; font-size: 14px; }
.b-search { display: flex; gap: 6px; }
.b-search input { width: min(240px, 52vw); }

input[type="text"], input[type="search"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink); font: inherit; font-size: 16px;   /* 16px 아래면 iOS 가 확대한다 */
}
textarea { line-height: 1.7; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--live-deep); outline-offset: 0; border-color: transparent; }

/* 목록 표 */
.b-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); font-size: 15px; table-layout: fixed; }
.b-table th { padding: 12px 10px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }
.b-table td { padding: 14px 10px; border-bottom: 1px solid var(--line); text-align: center; color: var(--ink-2); vertical-align: middle; }
.b-table .b-no { width: 72px; font-variant-numeric: tabular-nums; }
.b-table .b-cat { width: 104px; font-size: 14px; }
.b-table .b-author { width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-table .b-date { width: 104px; font-size: 14px; font-variant-numeric: tabular-nums; }
.b-table th.b-title { text-align: left; }
.b-table td.b-title { text-align: left; color: var(--ink); }
.b-table td.b-title a { text-decoration: none; overflow-wrap: anywhere; }
.b-table td.b-title a:hover { text-decoration: underline; }
.b-table tr.notice td { background: var(--bg-2); }
.b-table tr.notice td.b-title a { font-weight: 700; }
.b-count { margin-left: 6px; color: var(--live-deep); font-size: 13px; font-weight: 700; }
.b-icon { margin-left: 6px; font-size: 13px; }
.b-new { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 6px; border-radius: 4px; background: #c2410c; color: #fff; font-size: 10px; font-weight: 800; vertical-align: 1px; }
.b-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; background: var(--live); color: var(--ink); font-size: 12px; font-weight: 700; }
.b-tag { display: inline-flex; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: var(--bg-2); color: var(--ink-2); font-size: 11px; font-weight: 700; vertical-align: 1px; }
.b-tag.warn { margin: 0 6px 0 0; background: #fdecea; color: #b3261e; }
.b-mmeta { display: none; }
.b-empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* 쪽 번호 */
.b-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding-top: 28px; }
.b-page { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); font-size: 14px; text-decoration: none; }
.b-page:hover { background: var(--bg-2); }
.b-page[aria-current="page"] { background: var(--ink); color: #fff; font-weight: 700; }
.b-gap { display: inline-grid; place-items: center; min-height: 44px; color: var(--dim); }

/* 글 보기 */
.b-post, .b-csec, .b-compose { max-width: 920px; }
.b-crumb { font-size: 14px; color: var(--muted); }
.b-crumb a { color: var(--ink-2); text-decoration: none; }
.b-crumb a:hover { text-decoration: underline; }
.b-ptitle { margin-top: 10px; font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.25; overflow-wrap: anywhere; }
.b-ptitle .b-badge { margin-right: 10px; vertical-align: .35em; }
.b-pmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding-block: 14px 18px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.b-pmeta strong { color: var(--ink); }
.b-sep { color: var(--line); }
.b-body { padding-block: 28px; font-size: 17px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.b-body a, .b-cbody a { color: var(--live-deep); }
.b-images { display: grid; gap: 14px; padding-bottom: 24px; }
.b-images img { border-radius: 8px; border: 1px solid var(--line); }
.b-post > .b-row { padding-block: 16px 8px; border-top: 1px solid var(--line); }

/* 댓글 */
.b-csec { margin-top: 36px; }
.b-csec h3 { font-size: 18px; font-weight: 700; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.b-comments { list-style: none; margin: 0; padding: 0; }
.b-comments li { padding-block: 16px 8px; border-bottom: 1px solid var(--line); }
.b-comments li.hidden { opacity: .65; }
.b-cmeta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; color: var(--muted); }
.b-cmeta strong { color: var(--ink); }
.b-cbody { margin-top: 6px; font-size: 15.5px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.b-cform { display: grid; gap: 10px; padding-block: 20px; }
.b-login-cta { display: grid; justify-items: start; gap: 12px; padding-block: 20px; }
.b-post + .b-csec + p { margin-top: 28px; }

/* 글쓰기 — nckorean 배치: 왼쪽 이름표 + 칸, 테두리 안 도구막대(굵게·밑줄·취소선 | 목록 둘 | 링크·사진·영상 … 사진 n/10) */
.b-compose { display: grid; gap: 14px; margin-top: 18px; }
.b-crow { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 12px; }
.b-label { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.b-compose select { width: auto; min-width: 200px; justify-self: start; }
.b-btn.b-ghost { border-color: transparent; }
.b-editor { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.b-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.b-tbtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 34px; height: 34px; padding: 0 8px;
  border: 0; border-radius: 6px; background: none; color: var(--ink-2); font: inherit; font-size: 15px; cursor: pointer;
}
.b-tbtn:hover { background: var(--line); color: var(--ink); }
.b-tbtn[aria-pressed="true"] { background: var(--ink); color: #fff; }
.b-tbtn:focus-visible { outline: 2px solid var(--live-deep); outline-offset: 1px; }
.b-tbtn > span:not(.b-ico) { font-size: 13px; }
.b-ico { display: inline-flex; }
.b-tdiv { width: 1px; height: 18px; margin: 0 4px; background: var(--dim); opacity: .6; }
.b-usage { margin-left: auto; padding-right: 4px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.b-pop { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; border-bottom: 1px solid var(--line); }
.b-pop[hidden], .b-editor-err[hidden] { display: none; }
.b-pop-input { flex: 1 1 240px; width: auto; }
.b-editor-err { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 8px 6px 12px; background: #fdecea; color: #b3261e; font-size: 14px; }
.b-editor-err span { flex: 1; }
.b-editor-err button { min-width: 32px; min-height: 32px; border: 0; background: none; color: inherit; font-size: 18px; cursor: pointer; }
.b-editor-area { min-height: 320px; padding: 16px 18px; outline: none; font-size: 16px; }
.b-editor-area p.is-editor-empty:first-child::before { content: attr(data-placeholder); float: left; height: 0; color: var(--dim); pointer-events: none; }
.b-editor-area img { margin: .5em 0; }
.b-editor-area img.ProseMirror-selectednode,
.b-editor-area .b-video-block.ProseMirror-selectednode { outline: 2px solid var(--live-deep); outline-offset: 2px; }
.b-video-block { position: relative; width: 100%; max-width: 480px; aspect-ratio: 16 / 9; margin: .5em 0; border-radius: 8px; background: #000 center / cover no-repeat; }
.b-video-block::before { content: "▶"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 34px; text-shadow: 0 2px 12px rgba(0, 0, 0, .55); }

/* 본문(글 보기·편집기 공용) — 허용한 노드만 온다(renderDoc) */
.b-content { font-size: 17px; line-height: 1.85; overflow-wrap: anywhere; }
.b-content > :first-child { margin-top: 0; }
.b-content p { margin: 0 0 .9em; }
.b-content ul, .b-content ol { margin: 0 0 .9em; padding-left: 1.5em; }
.b-content ul { list-style: disc; }
.b-content ol { list-style: decimal; }
.b-content li > p { margin: 0; }
.b-content strong { font-weight: 800; }
.b-content a { color: var(--live-deep); text-decoration: underline; text-underline-offset: 3px; }
.b-content blockquote { margin: 0 0 .9em; padding: 4px 0 4px 16px; border-left: 3px solid var(--line); color: var(--muted); }
.b-content img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.b-figure { margin: 1em 0; }
.b-video { width: 100%; max-width: 720px; aspect-ratio: 16 / 9; margin: 1em 0; }
.b-video iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; }
.b-post > .b-content { padding-block: 28px; }

/* 관리 */
.b-msec { margin-top: 28px; }
.b-msec h3 { font-size: 17px; font-weight: 700; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.b-mlist { list-style: none; margin: 0; padding: 0; }
.b-mlist li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
.b-mlist a { color: var(--ink); overflow-wrap: anywhere; }

/* 창(닉네임·신고) */
.b-dialog { width: min(440px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); color: var(--ink); }
.b-dialog::backdrop { background: rgba(0, 0, 0, .4); }
.b-dialog form { display: grid; gap: 12px; }
.b-dialog h2 { font-size: 20px; font-weight: 800; }
.b-dialog .b-muted { font-size: 14px; line-height: 1.6; }
.b-err { min-height: 1em; color: #b3261e; font-size: 14px; }
.b-err:empty { display: none; }
.b-kinds { display: grid; gap: 4px; }
.b-radio { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 15px; }

.b-toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 8px 30px rgba(0, 0, 0, .2); }
.b-toast.bad { background: #b3261e; }

/* 하단 — 사이트 하단 모양과 따로(다른 작업이 .foot 안을 바꾸는 중이라 기대지 않는다) */
.b-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; font-size: 12px; color: var(--muted); }
.b-foot nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.b-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); text-decoration: none; }
.b-foot a:hover { text-decoration: underline; }

@media (max-width: 1023px) {
  .b-table .b-cat { display: none; }
}
@media (max-width: 767px) {
  /* 표 → 두 줄 카드: 제목 아래 분류·작성자·날짜 */
  .b-table thead, .b-table .b-no, .b-table .b-author, .b-table .b-date { display: none; }
  .b-table td.b-title { padding: 14px 2px; }
  .b-table td.b-title a { font-size: 16px; }
  .b-mmeta { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
  .b-page.far { display: none; }   /* 휴대폰은 앞뒤 1쪽만 */
  .b-body { font-size: 16px; }
  .b-content { font-size: 16px; }
  .b-crow { grid-template-columns: 1fr; gap: 6px; }
  .b-search { flex: 1; }
  .b-search input { width: 100%; }
}

/* 개인정보처리방침·이용 규칙 문서 */
.b-doc { max-width: 760px; font-size: 16px; line-height: 1.75; }
.b-doc h1 { margin-top: 4px; font-size: clamp(30px, 4vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.b-doc h2 { margin-top: 32px; font-size: 19px; font-weight: 700; }
.b-doc p, .b-doc ul { margin-top: 10px; }
.b-doc ul { padding-left: 1.2em; }
.b-doc li + li { margin-top: 4px; }
.b-doc a { color: var(--live-deep); }
