/* 뱅기노자 — 한국 여행·역사·문화 커뮤니티 */
@import url('https://cdn.jsdelivr.net/gh/wanteddev/wanted-sans@v1.0.1/packages/wanted-sans/fonts/webfonts/variable/split/WantedSansVariable.min.css');

@font-face {
  font-family: 'ChosunIlboMyungjo';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_one@1.0/Chosunilbo_myungjo.woff') format('woff');
  font-weight: normal;
  font-display: swap;
}

/* KBL 점프 Regular */
@font-face {
  font-family: 'KblJump';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2601-5@1.0/KBLJump_RTTF.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
/* KBL 점프 Bold */
@font-face {
  font-family: 'KblJump';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2601-5@1.0/KBLJump_BTTF.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
/* KBL 점프 ExtraBold Extended — 히어로·대제목 */
@font-face {
  font-family: 'KblJumpExtended';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2601-5@1.0/KBLJump_EB_ExtendedTTF.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}
/* KBL 점프 ExtraBold Condensed — 서브제목·배지 */
@font-face {
  font-family: 'KblJumpCondensed';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2601-5@1.0/KBLJump_EB_CondensedTTF.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}
/* KBL Court ExtraBold — 섹션 아이원레터·강조 */
@font-face {
  font-family: 'KblCourt';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2601-5@1.0/KBLCourt_EBTTF.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

:root {
  /* 뱅기노자 — 블루 여행 팔레트 / 순백 배경
     Altitude system (고도감)
     High Altitude : #1E40AF  — deep, authority
     Mid Sky       : #3B82F6  — action rest state
     Low Sky       : #93C5FD  — decorative / soft
     CTA temperature: rest #3B82F6 → hover #2563EB → active #1D4ED8 */

  --bg: #FFFFFF;              /* 순백 */
  --bg-2: #EFF6FF;            /* Background Sky */
  --bg-3: #DBEAFE;            /* 연한 블루 */
  --line: #BFDBFE;            /* 라인 */
  --line-2: #93C5FD;          /* Low Sky — 진한 라인 */

  --gold: #3B82F6;            /* Mid Sky — Action Blue (rest) */
  --gold-2: #2563EB;          /* Primary Blue — Hover state */
  --gold-dim: #93C5FD;        /* Low Sky — decorative borders */
  --gold-ink: #1E3A8A;        /* Deep Blue — text emphasis / High Altitude */

  --ink: #0F172A;             /* 짙은 네이비 블랙 */
  --ink-2: #1E3A8A;           /* Deep Blue — 본문 텍스트 */
  --ink-3: #64748B;           /* Slate — 보조 텍스트 */

  --danger: #DC2626;
  --focus: #1D4ED8;           /* Active Blue — focus ring */

  /* CTA 인터랙션 토큰 */
  --cta-rest:   #3B82F6;
  --cta-hover:  #2563EB;
  --cta-active: #1D4ED8;

  --gold-strength: 1;
  /* KBL 폰트 계층 */
  --font-display: 'KblJumpExtended', 'KblJump', "Wanted Sans Variable", sans-serif; /* 대제목·히어로 */
  --font-title:   'KblJump', 'KblJumpExtended', "Wanted Sans Variable", sans-serif; /* 소제목·카드 타이틀 */
  --font-hero:    'KblJumpExtended', "Wanted Sans Variable", sans-serif;
  --font-serif:   'KblJump', "Noto Serif KR", serif;
  --font-sans:    "Wanted Sans Variable", "Wanted Sans", "Noto Sans KR", -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", "D2 Coding", monospace;
  --font-reading: var(--font-sans);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-weight: 300; letter-spacing: -0.01em; }
body { min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

/* WCAG 3.0 — Visible focus appearance: 2px solid ring + offset, non-color cue */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link — keyboard users land here first */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 20px;
  background: var(--bg);
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  z-index: 1000;
}
.skip-link:focus-visible { left: 16px; top: 16px; }

/* Visually hidden but announced by screen readers */
.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;
}

/* Minimum touch target — WCAG 3.0 Gold recommends ≥ 24×24, ideal 44×44 */
button, [role="button"], a.nav-link, .nav-link, .footer li button {
  min-height: 24px;
}

/* Reduced motion — WCAG 3.0 "Support different ways to interact" */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Forced-colors (Windows High Contrast) safety */
@media (forced-colors: active) {
  .btn, .card, .nav-link.active { border: 1px solid CanvasText; }
  :focus-visible { outline-color: Highlight; }
}

/* === Reading font modes ========================================
   고딕(sans)이 기본. 토글 시 명조(ChosunIlboMyungjo)로 전환.
   적용 범위: <main> 안의 읽기 컨텐츠만 — nav/footer는 건드리지 않음.
   각 블록은 --font-reading/--font-display 변수를 바라본다. */
.app.reading-myungjo {
  --font-reading: 'ChosunIlboMyungjo', 'Noto Serif KR', serif;
  --font-display: 'ChosunIlboMyungjo', 'Noto Serif KR', serif;
}

main h1, main .section-title {
  font-family: var(--font-display);
  font-weight: 900;
}
main h2, main h3, main h4,
main .card-title, main .ko-serif {
  font-family: var(--font-title);
  font-weight: 700;
}
main p,
main article,
main .field-input,
main textarea,
main select,
main li,
main dd,
main td,
main .row-title {
  font-family: var(--font-reading);
}
/* mono/badge/meta는 어느 모드든 모노스페이스 유지 */
main .mono, main .badge, main .pill, main .card-meta,
main .row-num, main .row-meta, main code, main pre,
main time, main .section-eyebrow {
  font-family: var(--font-mono) !important;
}

/* Toggle in header */
.read-toggle {
  display: inline-flex;
  border: 1px solid var(--line-2);
  border-radius: 2px;
  overflow: hidden;
}
.read-toggle button {
  padding: 6px 10px;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  background: transparent;
  min-height: 32px;
}
.read-toggle button[aria-pressed="true"] {
  background: rgba(212,175,55,0.08);
  color: var(--gold);
}
.read-toggle button + button { border-left: 1px solid var(--line-2); }
.read-toggle button:hover { color: var(--gold); }

/* === Post reading typography ============================================
   Measure (reading line length): 55–75ch (WCAG 3.0 Readable outcome). */
.post-read-container {
  max-width: 920px;
}
.post-body {
  font-family: var(--font-reading);
  font-size: 18px;
  line-height: 1.95;
  color: var(--ink);
  max-width: 68ch;
  margin: 0 auto;
  hyphens: auto;
  word-break: keep-all;         /* 한글 어절 단위 줄바꿈 */
  text-wrap: pretty;
}
.app.reading-myungjo .post-body {
  font-size: 19px;
  line-height: 2;
}
.post-body > * + * { margin-top: 1.2em; }
.post-body p {
  margin-bottom: 0;
  text-indent: 0;
}
.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 2em;
  margin-bottom: 0.6em;
  line-height: 1.35;
}
.post-body h1 { font-size: 1.7em; }
.post-body h2 { font-size: 1.4em; }
.post-body h3 { font-size: 1.2em; }
.post-body blockquote {
  border-left: 2px solid var(--gold);
  padding: 4px 0 4px 24px;
  margin: 2em 0;
  color: var(--gold-ink);
  font-style: italic;
}
.post-body blockquote cite {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  font-style: normal;
  margin-top: 10px;
}
.post-body ul, .post-body ol { padding-left: 1.5em; }
.post-body li + li { margin-top: 0.4em; }
.post-body a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: var(--gold-dim);
  text-underline-offset: 3px;
}
.post-body a:hover { text-decoration-color: var(--gold); }
.post-body code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 2px 6px;
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.post-body pre {
  background: var(--bg-3);
  border: 1px solid var(--line);
  padding: 16px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
}
.post-body img { margin: 1.5em auto; border: 1px solid var(--line); }
.post-body hr {
  border: none;
  border-top: 1px solid var(--line-2);
  margin: 2.5em auto;
  width: 40%;
}

/* === Tiptap editor ======================================================= */
.tiptap-wrap {
  border: 1px solid var(--line-2);
  background: var(--bg-2);
}
.tiptap-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px;
  background: var(--bg-3);
  border-bottom: 1px solid var(--line-2);
  align-items: center;
}
.tt-group { display: flex; gap: 2px; }
.tt-divider { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }
.tt-btn {
  min-width: 34px;
  min-height: 30px;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.15s;
}
.tt-btn:hover:not(:disabled) { color: var(--gold); background: rgba(212,175,55,0.08); }
.tt-btn.on { color: var(--gold); background: rgba(212,175,55,0.12); border-color: var(--gold-dim); }
.tt-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.tt-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

.tiptap-host { padding: 16px 20px; min-height: 320px; }
.tiptap-editor {
  min-height: 300px;
  outline: none;
  color: var(--ink);
  font-family: var(--font-reading);
  font-size: 16px;
  line-height: 1.85;
  word-break: keep-all;
}
.tiptap-editor > * + * { margin-top: 0.9em; }
.tiptap-editor h1 { font-family: var(--font-display); font-size: 1.8em; line-height: 1.3; margin-top: 1.2em; font-weight: 500; }
.tiptap-editor h2 { font-family: var(--font-display); font-size: 1.4em; line-height: 1.35; margin-top: 1.2em; font-weight: 500; }
.tiptap-editor h3 { font-family: var(--font-display); font-size: 1.15em; line-height: 1.4; margin-top: 1em; font-weight: 500; }
.tiptap-editor blockquote {
  border-left: 2px solid var(--gold);
  padding-left: 16px;
  color: var(--gold-ink);
  font-style: italic;
}
.tiptap-editor ul, .tiptap-editor ol { padding-left: 1.4em; }
.tiptap-editor code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 1px 6px;
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.tiptap-editor a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: var(--gold-dim);
  text-underline-offset: 3px;
}
.tiptap-editor hr {
  border: none;
  border-top: 1px solid var(--line-2);
  margin: 1.5em 0;
}
.tiptap-editor p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  float: left;
  color: var(--ink-3);
  pointer-events: none;
  height: 0;
}
/* Inline image (column preset) */
.tiptap-editor img, .tiptap-img {
  max-width: 100%;
  border: 1px solid var(--line-2);
  cursor: move;               /* move handle for drag */
  display: block;
  margin: 0.6em auto;
}
.ProseMirror-selectednode { outline: 2px solid var(--gold); }

/* === Hashtag chips input ================================================ */
.tag-input-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  min-height: 48px;
}
.tag-input-wrap:focus-within { border-color: var(--gold); }
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  background: rgba(212,175,55,0.1);
  border: 1px solid var(--gold-dim);
  color: var(--gold);
}
.tag-chip button {
  color: var(--gold);
  font-size: 10px;
  padding: 0 2px;
  min-height: 0;
  line-height: 1;
  background: none; border: none;
  cursor: pointer;
}
.tag-chip button:hover { color: var(--danger); }
.tag-input-wrap input {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-size: 13px;
  padding: 4px 0;
}

/* === Image slider (community post attachments) ========================== */
.img-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 480px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.img-slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.img-slider-slide {
  flex: 0 0 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: var(--bg-3);
}
.img-slider-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.img-slider-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.img-slider-dots button {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  padding: 0;
  min-height: 0;
  cursor: pointer;
  transition: all 0.2s;
}
.img-slider-dots button[aria-current="true"] {
  background: var(--gold);
  width: 24px;
  border-radius: 4px;
}
.img-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--line-2);
  color: var(--ink);
  display: grid; place-items: center;
  cursor: pointer;
}
.img-slider-nav.prev { left: 12px; }
.img-slider-nav.next { right: 12px; }
.img-slider-nav:hover { background: rgba(0,0,0,0.7); color: var(--gold); }
.img-slider-caption {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-2);
  background: rgba(0,0,0,0.5);
  padding: 4px 8px;
  letter-spacing: 0.15em;
}

/* Thumbnail strip (editor-side image manager) */
.img-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.img-thumb {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  overflow: hidden;
}
.img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.img-thumb-remove {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(0,0,0,0.7);
  color: var(--ink);
  border: none;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
}
.img-thumb-remove:hover { background: var(--danger); color: white; }
.img-thumb-order {
  position: absolute;
  bottom: 4px; left: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold);
  background: rgba(0,0,0,0.6);
  padding: 1px 5px;
  letter-spacing: 0.1em;
}

/* === Grade badge ========================================================= */
.grade-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  border: 1px solid currentColor;
}
.grade-badge::before {
  content: "";
  width: 6px; height: 6px;
  background: currentColor;
  border-radius: 50%;
}

/* ---- Typography utilities ---- */
.ko-serif { font-family: var(--font-serif); }
.ko-sans { font-family: var(--font-sans); }
.mono { font-family: var(--font-mono); }

.gold { color: var(--gold); }
.gold-2 { color: var(--gold-2); }
.dim { color: var(--ink-2); }
.dim-2 { color: var(--ink-3); }

/* ---- Layout ---- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid var(--gold);
  position: relative;
  display: grid;
  place-items: center;
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: 0.15em;
  font-weight: 500;
  color: var(--ink);
}
.brand-name .sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-top: 2px;
}
.nav-menu {
  display: flex;
  gap: 36px;
  align-items: center;
}
.nav-link {
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  padding: 10px 4px;
  position: relative;
  cursor: pointer;
  transition: color .2s;
  background: none;
  border: none;
  font-family: inherit;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active, .nav-link[aria-current="page"] { color: var(--gold); }
.nav-link.active::after, .nav-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: 4px; height: 4px;
  background: var(--gold);
  transform: translate(-50%, 0) rotate(45deg);
}
.nav-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 13px;
  letter-spacing: 0.12em;
  border: 1px solid var(--line-2);
  color: var(--ink);
  cursor: pointer;
  transition: all .25s;
  background: transparent;
  text-transform: uppercase;
}
.btn:hover { border-color: var(--gold); color: var(--gold); }
.btn-gold {
  border-color: var(--cta-rest);
  color: #fff;
  background: var(--cta-rest);
}
.btn-gold:hover  { background: var(--cta-hover);  border-color: var(--cta-hover);  color: #fff; }
.btn-gold:active { background: var(--cta-active); border-color: var(--cta-active); color: #fff; }
.btn-ghost { border-color: transparent; color: var(--ink-2); padding: 8px 0; }
.btn-ghost:hover { color: var(--gold); border-color: transparent; }
.btn-small { padding: 8px 16px; font-size: 11px; }
.btn-block { width: 100%; }

/* ---- Section header ---- */
.section {
  padding: 120px 0;
  position: relative;
}
.section-tight { padding: 80px 0; }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-eyebrow::before {
  content: "";
  width: 32px; height: 1px;
  background: var(--gold);
}
.section-title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 16px;
}
.section-title .accent { color: var(--gold); font-style: italic; font-weight: 400; }
.section-subtitle {
  font-size: 15px;
  color: var(--ink-2);
  max-width: 640px;
  line-height: 1.7;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
  gap: 40px;
  flex-wrap: wrap;
}

/* ---- Card ---- */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 32px;
  transition: border-color .3s, transform .3s;
}
.card:hover { border-color: var(--gold-dim); }
.card-gold {
  border-color: var(--gold-dim);
  background: linear-gradient(180deg, rgba(212,175,55,0.04), transparent);
}
.card-title {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--ink);
}
.card-meta {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
}

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  text-transform: uppercase;
}
.badge-gold {
  border-color: var(--gold);
  color: var(--gold);
}
.badge-dot::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--gold);
  margin-right: 8px;
  border-radius: 50%;
  box-shadow: 0 0 8px var(--gold);
}

/* ---- Form ---- */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  text-transform: uppercase;
}
.field-input {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--ink);
  transition: border-color .2s;
  width: 100%;
}
.field-input:focus {
  outline: none;
  border-color: var(--gold);
}
.field-hint { font-size: 12px; color: var(--ink-3); }

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
  margin: 80px 0;
}
.divider-gold {
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

/* ---- Ornament ---- */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--gold);
}
.ornament::before, .ornament::after {
  content: "";
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--line);
  padding: 64px 0 40px;
  margin-top: auto;
  background: var(--bg-2);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 20px;
  text-transform: uppercase;
}
.footer li { list-style: none; font-size: 13px; margin-bottom: 10px; }
.footer li button, .footer li a, .footer li span {
  color: var(--ink-2);
  background: none; border: none;
  padding: 4px 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.footer li button:hover, .footer li a:hover, .footer li span:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}
.footer-bottom span { display: inline-block; }

/* ---- Grid helpers ---- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-title { font-size: 36px; }
  .section { padding: 80px 0; }
  .nav-menu { display: none; }
}

/* ---- Tweaks panel ---- */
.tweaks {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  background: var(--bg-2);
  border: 1px solid var(--gold-dim);
  padding: 20px;
  width: 280px;
  font-family: var(--font-mono);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.tweaks h3 {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.tweaks-row { margin-bottom: 16px; }
.tweaks-label { font-size: 10px; color: var(--ink-3); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.15em; }
.tweaks-options { display: flex; gap: 4px; }
.tweaks-options button {
  flex: 1;
  padding: 8px 4px;
  font-size: 10px;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  letter-spacing: 0.1em;
  transition: all .2s;
}
.tweaks-options button.on {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212,175,55,0.08);
}
.tweaks-slider {
  width: 100%;
  accent-color: var(--gold);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ---- Animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes goldShimmer {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}
.fade-up { animation: fadeUp .8s ease-out backwards; }

/* --- Tag/pill for content --- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  background: rgba(212,175,55,0.08);
  color: var(--gold);
  border: 1px solid var(--gold-dim);
}

/* List row */
.row {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .2s;
}
.row:hover { background: rgba(212,175,55,0.03); }
.row-num { font-family: var(--font-mono); font-size: 12px; color: var(--gold); letter-spacing: 0.1em; }
.row-title { font-family: var(--font-serif); font-size: 17px; color: var(--ink); }
.row-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.1em; }

/* Placeholder image */
.placeholder {
  background:
    repeating-linear-gradient(45deg, rgba(212,175,55,0.04) 0 8px, transparent 8px 16px),
    var(--bg-3);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  aspect-ratio: 4/3;
}

/* === KMS 기능정의서 — TOC layout === */
.kms-fdef-layout {
  /* desktop: 본문 + 240px TOC */
}
@media (max-width: 960px) {
  .kms-fdef-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .kms-fdef-toc {
    position: static !important;
    order: -1;
  }
}
.kms-fdef-toc button:hover {
  background: rgba(212,175,55,0.06) !important;
  color: var(--gold) !important;
}

/* === Navigation mega menu (커뮤니티 hover) === */
.nav-has-mega:hover .nav-mega,
.nav-has-mega:focus-within .nav-mega {
  visibility: visible !important;
  opacity: 1 !important;
}

/* === 전역 본문 폰트 토글 (고딕 / 명조) ============================
   .app(루트)에서 --font-serif / --font-sans / --font-display / --font-reading
   네 변수를 한 번에 명조로 바꿔, 인라인 style={{fontFamily:"var(--font-serif)"}}
   까지 모두 따라오게 만든다. nav/footer/모노는 여전히 모노/명조 가독성 유지. */
.app.reading-myungjo {
  --font-serif: 'Nanum Myeongjo', 'ChosunIlboMyungjo', 'Noto Serif KR', serif;
  --font-sans: 'Nanum Myeongjo', 'ChosunIlboMyungjo', 'Noto Serif KR', serif;
  --font-display: 'Nanum Myeongjo', 'ChosunIlboMyungjo', 'Noto Serif KR', serif;
  --font-reading: 'Nanum Myeongjo', 'ChosunIlboMyungjo', 'Noto Serif KR', serif;
}
/* 직접 font-family를 잡아둔 곳까지 보장하기 위한 보조 규칙 — nav/footer 포함 */
.app.reading-myungjo .nav,
.app.reading-myungjo .nav-link,
.app.reading-myungjo .footer,
.app.reading-myungjo .card,
.app.reading-myungjo p,
.app.reading-myungjo li,
.app.reading-myungjo dd,
.app.reading-myungjo dt,
.app.reading-myungjo .field-input,
.app.reading-myungjo .ko-serif {
  font-family: var(--font-serif) !important;
}
/* 모노 라벨 / 브랜드 / 명조 토글 자체는 유지 */
.app.reading-myungjo .mono,
.app.reading-myungjo .brand,
.app.reading-myungjo .read-toggle button {
  font-family: var(--font-mono) !important;
}
.app.reading-myungjo .read-toggle button[style*="ChosunIlboMyungjo"] {
  font-family: 'ChosunIlboMyungjo', serif !important;
}
