
/* ── 토큰 ─────────────────────────────────────────────────────────── */
:root {
  --ink: #121212;
  --ink-soft: #333333;
  --ink-muted: #666666;
  --ink-faint: #8b8b8b;
  --rule: #e2e2e2;
  --rule-strong: #121212;
  --paper: #ffffff;
  --paper-tint: #f7f7f5;
  --paper-alt: #fbfaf8;
  --link: #326891;
  --link-hover: #1a4568;
  --accent: #a81817;
  --ok: #1a7f4b;

  --serif: 'Nanum Myeongjo', 'Noto Serif KR', Georgia, 'Times New Roman', 'Batang', serif;
  --sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Apple SD Gothic Neo',
          'Malgun Gothic', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SFMono-Regular', Consolas, 'D2Coding', 'Courier New', monospace;

  --wrap: 1200px;
  /* 모바일 하단 메뉴바 높이 */
  --mobilebar-h: 58px;
  /* 버튼·입력칸 공통 높이 — 검정 버튼과 흰 버튼, 입력칸이 모두 이 값을 씁니다 */
  --btn-h: 44px;
  --btn-h-sm: 38px;
}

*, *::before, *::after { box-sizing: border-box; }

/* ── 스크롤바 완전 숨김 ───────────────────────────────────────────────
 * 스크롤 기능은 그대로 두고 막대만 감춥니다. 가로로 넘치는 표와
 * 네비게이션에서도 막대가 보이지 않습니다.
 * ------------------------------------------------------------------ */
* {
  scrollbar-width: none;        /* Firefox */
  -ms-overflow-style: none;     /* 구형 Edge/IE */
}
*::-webkit-scrollbar { width: 0; height: 0; display: none; }  /* Chrome, Safari */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* 더블 탭 확대 차단 */
  touch-action: manipulation;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
  touch-action: manipulation;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.25; margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── 마스트헤드 ───────────────────────────────────────────────────── */
.masthead { border-bottom: 1px solid var(--ink); }

/* 계정 링크만 들어가는 상단 유틸리티 줄 */
.masthead__meta {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 12px; padding: 10px 0; font-family: var(--sans);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-muted); border-bottom: 1px solid var(--rule);
}
.masthead__account { display: flex; align-items: center; gap: 14px; }
.masthead__account a { color: var(--ink-soft); }
.masthead__account form { display: inline; }
.masthead__account button {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink-soft);
}
.masthead__account button:hover { text-decoration: underline; }

.masthead__title { text-align: center; padding: 26px 0 18px; }
.masthead__title a { color: var(--ink); display: inline-block; }
.masthead__title a:hover { text-decoration: none; }
.masthead__title h1 {
  font-size: clamp(30px, 6.4vw, 62px);
  letter-spacing: -.015em; font-weight: 700; margin: 0;
}
.masthead__rule {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 10px; font-size: 10.5px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--ink-faint);
}
.masthead__rule::before, .masthead__rule::after {
  content: ''; height: 1px; width: 70px; background: var(--rule);
}

/* ── 네비게이션 ───────────────────────────────────────────────────── */
.nav { border-bottom: 1px solid var(--ink); background: var(--paper); }
.nav__inner {
  display: flex; align-items: stretch; justify-content: center;
  flex-wrap: wrap; gap: 0;
}
.nav a {
  display: block; padding: 11px 15px; color: var(--ink);
  font-size: 13.5px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap;
}
.nav a:hover { background: var(--paper-tint); text-decoration: none; }
.nav a[aria-current='page'] { box-shadow: inset 0 -3px 0 var(--accent); }
.nav a.nav__home { font-family: var(--serif); font-weight: 700; }

/* ── 레이아웃 ─────────────────────────────────────────────────────── */
main { padding: 26px 0 60px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; }
.layout > aside { border-left: 1px solid var(--rule); padding-left: 24px; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; border-bottom: 2px solid var(--ink);
  padding-bottom: 6px; margin-bottom: 16px;
}
.section-head h2 { font-size: 19px; }
.section-head .more { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

.kicker {
  font-family: var(--sans); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--accent);
}

/* ── 1면 리드 기사 ────────────────────────────────────────────────── */
.lead { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 30px; }
.lead__item { padding: 0 22px; border-left: 1px solid var(--rule); }
.lead__item:first-child { padding-left: 0; border-left: 0; }
.lead__item:last-child { padding-right: 0; }
.lead__item--main { grid-column: span 2; }
.lead__item--main h3 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.02em; }
.lead__item h3 { font-size: 21px; margin: 6px 0 8px; }
.lead__item h3 a { color: var(--ink); }
.lead__item p { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.62; }
.lead__byline {
  margin-top: 10px; font-size: 11.5px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-faint);
}

/* ── 카테고리 요약 그리드 ─────────────────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; }
.cat-block { padding: 18px 0; border-top: 1px solid var(--rule); }
.cat-block__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px;
}
.cat-block__head h3 { font-size: 17px; }
.cat-block__head h3 a { color: var(--ink); }
.cat-block__head .count { font-size: 11.5px; color: var(--ink-faint); }
.cat-block__blurb { margin: 0 0 10px; font-size: 13px; color: var(--ink-muted); }
.cat-block ul { list-style: none; margin: 0; padding: 0; }
.cat-block li { padding: 5px 0; border-top: 1px dotted var(--rule); font-size: 14.5px; }
.cat-block li:first-child { border-top: 0; }
.cat-block li a { color: var(--ink); }
.cat-block li .meta { color: var(--ink-faint); font-size: 11.5px; margin-left: 6px; white-space: nowrap; }
.cat-block .empty { font-size: 13px; color: var(--ink-faint); padding: 6px 0; }

/* ── 사이드바 ─────────────────────────────────────────────────────── */
aside h3 {
  font-size: 12px; font-family: var(--sans); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  border-bottom: 1px solid var(--ink); padding-bottom: 6px; margin-bottom: 12px;
}
aside section { margin-bottom: 28px; }
.stats { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.stats li { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px dotted var(--rule); }
.stats li span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { padding: 8px 0; border-bottom: 1px dotted var(--rule); font-size: 13.5px; }
.side-list li a { color: var(--ink); font-weight: 600; }
.side-list .meta { display: block; color: var(--ink-faint); font-size: 11.5px; margin-top: 2px; }

/* ── 게시판 표 (BitcoinTalk 식) ───────────────────────────────────── */
.board-head { border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 0; }
.board-head h2 { font-size: 27px; }
.board-head p { margin: 5px 0 0; color: var(--ink-muted); font-size: 14px; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 0; flex-wrap: wrap;
}
.toolbar .count { font-size: 12.5px; color: var(--ink-muted); }
.toolbar--count { padding-top: 0; border-bottom: 1px solid var(--rule); padding-bottom: 10px; }

/* ── 게시판 내 검색 ───────────────────────────────────────────────── */
/* align-items: stretch — 입력칸과 검색 버튼이 언제나 정확히 같은 높이가 되도록,
   각자의 min-height 에 기대지 않고 서로 맞춰 늘어나게 합니다. */
.search { display: flex; align-items: stretch; gap: 8px; flex: 1 1 280px; max-width: 460px; }
.search input {
  flex: 1 1 auto; min-width: 0; padding: 0 11px; min-height: var(--btn-h-sm);
  border: 1px solid #c9c9c9; border-radius: 2px; background: var(--paper);
  font-family: inherit; font-size: 16px; color: var(--ink);
}
.search input:focus { outline: 2px solid var(--link); outline-offset: -1px; border-color: var(--link); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search button { flex: 0 0 auto; }
.search__reset { flex: 0 0 auto; font-size: 12.5px; color: var(--ink-muted); white-space: nowrap; }

mark {
  background: #fdf3c4; color: inherit; padding: 0 1px; border-radius: 1px;
}

.table-scroll { overflow-x: auto; }

table.board { width: 100%; border-collapse: collapse; font-size: 14px; }
table.board thead th {
  background: var(--paper-tint); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
  padding: 8px 10px; text-align: left; font-size: 11px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-muted); white-space: nowrap;
}
table.board td { border-bottom: 1px solid var(--rule); padding: 10px; vertical-align: top; }
table.board tbody tr:hover { background: var(--paper-alt); }
table.board .col-num { width: 62px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-faint); white-space: nowrap; }
table.board .col-stat { width: 74px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.board .col-author { width: 150px; white-space: nowrap; }
table.board .col-last { width: 170px; white-space: nowrap; color: var(--ink-muted); font-size: 12.5px; }
table.board .subject { font-family: var(--serif); font-size: 17px; font-weight: 700; }
table.board .subject a { color: var(--ink); }
table.board .excerpt { display: block; margin-top: 3px; color: var(--ink-muted); font-size: 12.5px; font-family: var(--sans); font-weight: 400; }

.badge {
  display: inline-block; padding: 1px 6px; border: 1px solid currentColor;
  border-radius: 2px; font-size: 10px; font-weight: 700;
  letter-spacing: .06em; vertical-align: 2px; margin-right: 6px;
}
.badge--pinned { color: var(--accent); }
.badge--locked { color: var(--ink-faint); }
.badge--admin { color: var(--accent); }

.empty-state {
  border: 1px solid var(--rule); background: var(--paper-tint);
  padding: 40px 20px; text-align: center; color: var(--ink-muted); font-size: 14px;
}

/* ── 스레드 보기 ──────────────────────────────────────────────────── */
.breadcrumb { font-size: 12px; color: var(--ink-muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--ink-muted); }

.thread-head { border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 0; }
.thread-head h2 { font-size: clamp(23px, 3.2vw, 33px); letter-spacing: -.015em; }
.thread-head .meta { margin-top: 7px; font-size: 12.5px; color: var(--ink-muted); }

.post { display: grid; grid-template-columns: 190px minmax(0, 1fr); border-bottom: 1px solid var(--rule); }
.post__author {
  padding: 16px 16px 16px 0; border-right: 1px solid var(--rule); background: var(--paper-alt);
  padding-left: 14px;
}
.post__name { font-family: var(--serif); font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.post__name a { color: var(--ink); }
.post__rank { font-size: 11.5px; color: var(--ink-muted); }
.post__stars { color: var(--accent); letter-spacing: 1px; font-size: 10px; }
.post__userstats { margin-top: 8px; font-size: 11px; color: var(--ink-faint); line-height: 1.7; }

.post__main { padding: 16px 0 16px 18px; min-width: 0; }
.post__bar {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding-bottom: 8px;
  border-bottom: 1px dotted var(--rule); margin-bottom: 12px;
  font-size: 12px; color: var(--ink-muted);
}
.post__seq { font-weight: 700; color: var(--ink-faint); }
.post__actions { display: flex; gap: 12px; }
.post__body { font-size: 16px; line-height: 1.75; }
.post__body p { margin: 0 0 1em; }

.bb-quote {
  margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--rule);
  background: var(--paper-tint); font-size: 14.5px; color: var(--ink-soft);
}
.bb-quote cite {
  display: block; font-style: normal; font-weight: 700;
  font-size: 12px; color: var(--ink-muted); margin-bottom: 5px;
}
.bb-code {
  margin: 0 0 12px; padding: 12px 14px; background: var(--paper-tint);
  border: 1px solid var(--rule); font-family: var(--mono); font-size: 13px;
  line-height: 1.55; overflow-x: auto; white-space: pre-wrap;
}

/* ── 운영자 도구 막대 ─────────────────────────────────────────────── */
.modbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px; margin-top: 12px;
  border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  background: var(--paper-tint);
}
.modbar__label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-right: 4px;
}
.modbar__hint { font-size: 12px; color: var(--ink-muted); margin-left: auto; }

/* ── 페이지네이션 ─────────────────────────────────────────────────── */
.pagination { display: flex; gap: 5px; flex-wrap: wrap; padding: 18px 0; align-items: center; }
.pagination a, .pagination span {
  min-width: 32px; text-align: center; padding: 5px 9px;
  border: 1px solid var(--rule); font-size: 13px; color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.pagination a:hover { border-color: var(--ink); text-decoration: none; }
.pagination .current { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.pagination .gap { border: 0; color: var(--ink-faint); }

/* ── 폼 ───────────────────────────────────────────────────────────── */
.panel { border: 1px solid var(--rule); padding: 22px; background: var(--paper); }
.panel--narrow { max-width: 460px; margin: 0 auto; }
.panel h2 { font-size: 23px; margin-bottom: 4px; }
.panel__intro { color: var(--ink-muted); font-size: 13.5px; margin: 0 0 18px; }

.field { margin-bottom: 15px; }
.field label {
  display: block; font-size: 12px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 5px;
}
/* font-size 는 반드시 16px 이상이어야 합니다.
   그보다 작으면 iOS Safari 가 입력란을 누를 때 화면을 강제로 확대합니다. */
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 11px; border: 1px solid #c9c9c9; border-radius: 2px;
  font-family: inherit; font-size: 16px; color: var(--ink); background: var(--paper);
}
/* 한 줄짜리 입력칸은 버튼과 같은 높이로 맞춥니다 */
.field input, .field select { min-height: var(--btn-h); }
.field textarea { min-height: 260px; resize: vertical; line-height: 1.7; font-size: 16px; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--link); outline-offset: -1px; border-color: var(--link);
}
.field .hint { margin-top: 5px; font-size: 12px; color: var(--ink-faint); }

.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }

/* 버튼 규격 통일 —
 * .btn 은 <a> 와 <button> 양쪽에 붙습니다. <button> 은 브라우저 기본 line-height 가
 * normal(약 1.2) 이고 <a> 는 body 의 1.6 을 상속하기 때문에, 같은 padding 을 줘도
 * <button> 쪽이 더 얇게 그려집니다. inline-flex 로 만들고 높이를 변수로 고정해
 * 요소 종류와 상관없이 정확히 같은 크기가 되도록 합니다. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  box-sizing: border-box; min-height: var(--btn-h); padding: 0 20px;
  border: 1px solid var(--ink); border-radius: 2px;
  background: var(--ink); color: #fff;
  font-family: var(--sans); font-size: 14px; font-weight: 700; line-height: 1;
  text-align: center; white-space: nowrap; cursor: pointer;
  margin: 0; vertical-align: middle;
  -webkit-appearance: none; appearance: none;
}
.btn:hover { background: #000; text-decoration: none; color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--paper-tint); color: var(--ink); }
/* 위험한 동작 — 크기는 그대로 두고 색만 바꿉니다. */
.btn--danger { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--danger:hover { background: #fdf3f2; color: var(--accent); }
.btn--small { min-height: var(--btn-h-sm); padding: 0 13px; font-size: 12.5px; }

/* 링크처럼 보이는 버튼 (폼 안에서 써야 할 때) */
.linkbtn {
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: var(--link); cursor: pointer;
}
.linkbtn:hover { text-decoration: underline; }
.linkbtn--danger { color: var(--accent); }

/* 폼을 버튼처럼 한 줄에 끼워 넣을 때 */
.inline-form { display: inline; margin: 0; }

.alert {
  border-left: 3px solid var(--accent); background: #fdf3f2;
  padding: 11px 14px; margin-bottom: 16px; font-size: 13.5px; color: #7d1513;
}
.alert--ok { border-left-color: var(--ok); background: #f0f8f3; color: #14603a; }

/* ── 관리자 ───────────────────────────────────────────────────────── */
table.admin { width: 100%; border-collapse: collapse; font-size: 13px; }
table.admin th {
  background: var(--paper-tint); border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule); padding: 7px 9px; text-align: left;
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted);
}
table.admin td { border-bottom: 1px solid var(--rule); padding: 7px 9px; vertical-align: top; }
table.admin td.ua { color: var(--ink-faint); font-size: 11px; max-width: 320px; }

/* ── 모바일 하단 메뉴바 ───────────────────────────────────────────────
 * 기본은 숨김. 좁은 화면에서만 나타납니다.
 * 시트는 <details> 로 열리며 자바스크립트를 쓰지 않습니다.
 * ------------------------------------------------------------------ */
.mobilebar { display: none; }

.mobilebar svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}

.mbitem > summary::-webkit-details-marker { display: none; }
.mbitem > summary { list-style: none; }

.mbitem > summary,
.mbitem--link {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; height: var(--mobilebar-h); cursor: pointer; color: var(--ink-soft);
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.mbitem--link:hover { text-decoration: none; }
.mbitem[open] > summary { color: var(--accent); }

/* <details name> 배타 동작을 지원하지 않는 구형 브라우저 대비:
   시트가 둘 이상 열려도 마지막 것만 보여 겹쳐 보이지 않게 합니다. */
.mobilebar .mbitem[open]:has(~ .mbitem[open]) .sheet { display: none; }

.mobilebar .sheet {
  position: fixed; left: 0; right: 0; bottom: calc(var(--mobilebar-h) + env(safe-area-inset-bottom, 0px));
  background: var(--paper); border-top: 1px solid var(--ink);
  box-shadow: 0 -14px 30px rgba(0, 0, 0, .1);
  max-height: 62vh; overflow-y: auto;
}
.mobilebar .sheet__head {
  font-family: var(--sans); font-size: 10.5px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
  padding: 12px 20px 8px;
}
.mobilebar .sheet a,
.mobilebar .sheet button {
  display: block; width: 100%; text-align: left;
  padding: 14px 20px; border: 0; border-top: 1px solid var(--rule);
  background: none; color: var(--ink); font-family: var(--serif);
  font-size: 17px; font-weight: 700; cursor: pointer;
}
.mobilebar .sheet a:active,
.mobilebar .sheet button:active { background: var(--paper-tint); text-decoration: none; }
.mobilebar .sheet a:hover { text-decoration: none; }
.mobilebar .sheet form { margin: 0; }
.mobilebar .sheet button { color: var(--accent); }

/* ── 유틸리티 ─────────────────────────────────────────────────────────
 * CSP 를 style-src 'self' 로 조일 수 있도록, 인라인 style 속성 대신 쓰는 클래스들입니다.
 * (인라인 스타일이 하나라도 남으면 'unsafe-inline' 을 허용해야 합니다)
 * ------------------------------------------------------------------ */
.prose { max-width: 44em; }
.prose h3 { font-size: 20px; margin: 22px 0 8px; }
.prose h3:first-child { margin-top: 18px; }

.panel--center { text-align: center; }
.panel--center h2 { margin: 8px 0 10px; }
.form-actions--center { justify-content: center; }

.panel--reply { margin-top: 22px; }
.section-head--spaced { margin-top: 30px; }

.note { font-size: 12.5px; color: var(--ink-muted); margin: 0; }
.faint { color: var(--ink-faint); }
.post--highlight { background: #fffdf0; }

/* ── 푸터 ─────────────────────────────────────────────────────────── */
footer.site {
  border-top: 1px solid var(--ink); padding: 26px 0 44px;
  font-size: 12.5px; color: var(--ink-muted);
}
footer.site .cols { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer.site a { color: var(--ink-muted); }
footer.site .brand { font-family: var(--serif); font-size: 17px; color: var(--ink); font-weight: 700; }

/* ── 반응형 ───────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout > aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--ink); padding-top: 20px; }
  .lead { grid-template-columns: minmax(0, 1fr); }
  .lead__item { padding: 16px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .lead__item:first-child { border-top: 0; padding-top: 0; }
  .lead__item--main { grid-column: auto; }
  .cat-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  body {
    font-size: 15.5px;
    /* 하단 메뉴바에 본문이 가리지 않도록 */
    padding-bottom: calc(var(--mobilebar-h) + env(safe-area-inset-bottom, 0px));
  }

  /* 상단 카테고리 네비게이션과 계정 링크는 하단 메뉴바가 대신합니다.
     계정 링크가 빠지면 상단 유틸리티 줄에는 남는 내용이 없으므로 통째로 감춥니다. */
  .nav { display: none; }
  .masthead__meta { display: none; }
  .masthead__title { padding: 20px 0 14px; }

  .mobilebar {
    display: grid; grid-template-columns: repeat(3, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--paper); border-top: 1px solid var(--ink);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mobilebar .mbitem + .mbitem > summary,
  .mobilebar .mbitem + .mbitem--link { box-shadow: inset 1px 0 0 var(--rule); }

  table.board .col-stat, table.board .col-author, table.board .col-num { display: none; }
  .post { grid-template-columns: minmax(0, 1fr); }
  .post__author {
    border-right: 0; border-bottom: 1px solid var(--rule);
    display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 10px 0 10px 12px;
  }
  .post__userstats { display: none; }
  .post__main { padding: 14px 0; }
}

@media print {
  .nav, aside, .toolbar, .post__actions, footer.site { display: none; }
  body { font-size: 11pt; }
}
