/* ═══════════════════════════════════════════════════════════
   낭월 朗月 — 한지 테마 (Production)
   ═══════════════════════════════════════════════════════════ */

/* ═══ 본문 글꼴 — 나눔스퀘어라운드 (네이버 무료 글꼴, 자체 호스팅) ═══ */
@font-face {
  font-family: 'NanumSquareRound';
  font-weight: 300; font-style: normal; font-display: swap;
  src: url('../fonts/NanumSquareRoundL.woff2') format('woff2');
}
@font-face {
  font-family: 'NanumSquareRound';
  font-weight: 400; font-style: normal; font-display: swap;
  src: url('../fonts/NanumSquareRound.woff2') format('woff2');
}
@font-face {
  font-family: 'NanumSquareRound';
  font-weight: 700; font-style: normal; font-display: swap;
  src: url('../fonts/NanumSquareRoundB.woff2') format('woff2');
}
@font-face {
  font-family: 'NanumSquareRound';
  font-weight: 800; font-style: normal; font-display: swap;
  src: url('../fonts/NanumSquareRoundEB.woff2') format('woff2');
}

:root {
  --paper:    #f4ecdb;
  --paper-2:  #ebe1cb;
  --rice:     #fbf6ea;
  --ink:      #1c1a17;
  --ink-2:    #3d362e;
  --ink-3:    #6b6357;
  --ink-mute: #a89e8c;
  --seal:     #a8362b;
  --gold:     #b58e3e;
  --bamboo:   #5a6b3f;

  --dc-1: #2d5e7a;  /* 청 */
  --dc-2: #a8362b;  /* 적 */
  --dc-3: #c69635;  /* 황 */
  --dc-4: #5a6b3f;  /* 녹 */
  --dc-5: #1c1a17;  /* 흑 */

  --max-w: 1280px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'NanumSquareRound', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  font-size: 12pt;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

img { max-width: 100%; display: block; }

/* ═══ 한지 텍스처 ═══ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 30%, rgba(120,90,50,0.05), transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 70%, rgba(80,60,30,0.04), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(60,40,20,0.01) 2px 3px),
    repeating-linear-gradient(90deg, transparent 0 2px, rgba(60,40,20,0.01) 2px 3px);
  pointer-events: none;
  z-index: 0;
}

/* ═══ 산수화 배경 ═══ */
.sansuhwa-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.sansuhwa-bg svg { position: absolute; left: 0; width: 100%; }
.sansuhwa-bg .far { top: 80px; height: 200px; }
.sansuhwa-bg .near { bottom: 80px; height: 320px; }

/* ═══ 단청 띠 ═══ */
.dancheong-stripe {
  display: flex;
  height: 8px;
  width: 100%;
  flex-shrink: 0;
}
.dancheong-stripe span { flex: 1; display: block; }
.dancheong-stripe span:nth-child(5n+1) { background: var(--dc-1); }
.dancheong-stripe span:nth-child(5n+2) { background: var(--dc-2); }
.dancheong-stripe span:nth-child(5n+3) { background: var(--dc-3); }
.dancheong-stripe span:nth-child(5n+4) { background: var(--dc-4); }
.dancheong-stripe span:nth-child(5n+5) { background: var(--dc-5); }
/* 오늘의 글 위·아래 색동줄 — 색 바랜 느낌, 흰색 위주 밝게 */
.today-hero .dancheong-stripe { filter: grayscale(0.75) brightness(1.55) saturate(0.35); opacity: 0.55; }

/* ═══ 페이지 컨테이너 ═══ */
.site {
  max-width: var(--max-w);
  margin: 0 auto;
  background: var(--paper);
  position: relative;
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(0,0,0,0.12);
}

/* ═══ 헤더 ═══ */
.top-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--ink-mute);
  background: var(--paper);
  position: relative;
  z-index: 30;
  gap: 16px;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand .enso { flex-shrink: 0; }
.brand-logo { height: 34px; width: auto; display: block; }
@media (max-width: 720px) { .brand-logo { height: 28px; } }
.brand h1 { margin: 0; font-weight: 900; font-size: 22px; letter-spacing: 0.02em; line-height: 1; white-space: nowrap; }
.brand .tagline { font-size: 11pt; color: var(--ink-3); letter-spacing: 0.3em; margin-top: 4px; }

.top-nav-text { display: flex; gap: 24px; font-size: 12pt; font-weight: 500; }
.top-nav-text .nav-item { position: relative; }
.top-nav-text .nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}
.top-nav-text .nav-item > a:hover,
.top-nav-text .nav-item:hover > a,
.top-nav-text .nav-item > a.active { color: var(--seal); border-bottom-color: var(--seal); }
.top-nav-text .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 170px;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  padding: 6px 0;
  display: none;
}
.top-nav-text .nav-item:hover .sub-menu { display: block; }
.top-nav-text .sub-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 11pt;
  font-weight: 400;
  white-space: nowrap;
  color: var(--ink-2);
}
.top-nav-text .sub-menu a:hover { background: var(--rice); color: var(--seal); }

.search-and-auth { display: flex; align-items: center; gap: 12px; }
.search-box {
  border: 1px solid var(--ink-mute);
  background: var(--rice);
  padding: 6px 12px;
  min-width: 220px;
  font-size: 12pt;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
}
.search-box input {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12pt;
  color: var(--ink);
  flex: 1;
  min-width: 0;
  outline: none;
}
.auth-links { display: flex; gap: 12px; font-size: 12pt; color: var(--ink-2); }
.auth-links a:hover { color: var(--seal); }

/* ═══ 만세력 띠 ═══ */
.manse {
  padding: 14px 32px;
  background: var(--ink);
  color: var(--rice);
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 12pt;
  letter-spacing: 0.1em;
  border-bottom: 3px double var(--gold);
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}
.manse .yinyang { font-size: 18px; color: var(--gold); }
.manse .date { font-family: 'JetBrains Mono', monospace; }
.manse .sep { width: 1px; height: 18px; background: var(--ink-mute); }
.manse .ilji-label { color: var(--ink-mute); }
.manse .ilji-value { font-weight: 900; font-size: 15px; letter-spacing: 0.15em; }
.manse .lunar { color: var(--ink-mute); font-size: 11pt; }
.manse .right { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.manse .right a { border-bottom: 1px solid var(--gold); padding-bottom: 2px; cursor: pointer; }
.manse .right a:hover { color: var(--gold); }

.trigrams { display: flex; gap: 12px; }
.trig { text-align: center; min-width: 32px; }
.trig .sym { font-size: 16px; line-height: 1; color: var(--gold); }
.trig .lbl { font-size: 9px; color: var(--ink-mute); margin-top: 2px; letter-spacing: 0.1em; }

/* ═══ 본문 그리드 ═══ */
.main-wrap {
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  position: relative;
}
.hanja-bg-watermark {
  position: absolute;
  top: 100px;
  right: -40px;
  font-size: 420px;
  font-weight: 900;
  color: var(--ink);
  opacity: 0.035;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* ═══ 좌측 네비게이션 ═══ */
.left-nav {
  position: relative;
  z-index: 1;
  border: 1px solid var(--ink);
  background: var(--paper);
  align-self: start;
}
.nav-mascot {
  display: block;
  line-height: 0;
  background: var(--paper-2);
  border-bottom: 2px solid var(--ink);
}
.nav-mascot img { width: 100%; display: block; }

.nav-author {
  padding: 18px 16px;
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-author .avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  background: radial-gradient(circle at 30% 30%, var(--paper-2), var(--ink-mute) 90%);
  border: 1px solid var(--ink-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--ink);
  font-size: 16px;
}
.nav-author .info { flex: 1; min-width: 0; }
.nav-author .info .name { font-weight: 900; font-size: 17px; letter-spacing: 0.08em; }
.nav-author .info .sub { font-size: 11pt; color: var(--ink-3); letter-spacing: 0.2em; margin-top: 2px; }

.nav-list { padding: 12px 0 16px; }
.nav-home {
  padding: 11px 16px;
  background: var(--ink);
  color: var(--rice);
  font-weight: 700;
  font-size: 12pt;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-home .icon { font-size: 14px; }
.nav-home .now { margin-left: auto; color: var(--gold); font-size: 11pt; }

.nav-group { margin-top: 4px; }
.nav-group .head {
  padding: 10px 16px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 12pt;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--ink-mute);
}
.nav-group .head .hanja { margin-left: auto; font-size: 11pt; color: var(--ink-mute); font-weight: 300; }
.nav-group .items a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 30px;
  font-size: 12pt;
  color: var(--ink-2);
}
.nav-group .items a::before { content: '·'; color: var(--ink-mute); }
.nav-group .items a:hover,
.nav-group .items a.active { color: var(--seal); background: var(--paper-2); }

.nav-single a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 12pt;
  border-bottom: 1px dashed var(--ink-mute);
}
.nav-single a .icon { color: var(--seal); font-size: 14px; width: 16px; text-align: center; }
.nav-single a:hover,
.nav-single a.active { background: var(--paper-2); }

.nav-quote {
  margin-top: 8px;
  padding: 14px 16px;
  background: var(--paper-2);
  border-top: 1px solid var(--ink-mute);
  border-bottom: 1px solid var(--ink-mute);
}
.nav-quote .lbl {
  font-family: 'Gaegu', cursive;
  font-size: 12pt;
  color: var(--seal);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}
.nav-quote .text { font-size: 12pt; line-height: 1.6; color: var(--ink-2); }
.nav-quote .src { font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--ink-3); margin-top: 8px; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--ink-mute); }
.dot.cheong { background: var(--dc-1); }
.dot.jeok   { background: var(--dc-2); }
.dot.hwang  { background: var(--dc-3); }
.dot.nok    { background: var(--dc-4); }
.dot.heuk   { background: var(--dc-5); }

/* ═══ 메인 컨텐츠 컬럼 ═══ */
.main-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
  z-index: 1;
  min-width: 0;
}

/* ═══ 오늘의 글 (히어로) ═══ */
.today-hero { background: var(--paper); border: 1px solid var(--ink); position: relative; }
.today-hero .body {
  padding: 28px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: center;
  position: relative;
}
.today-hero .hero-img-wrap { position: relative; aspect-ratio: 16 / 11; }
.today-hero .hero-img-wrap img,
.img-fill { width: 100%; height: 100%; object-fit: cover; }
.today-hero .seal-overlay { position: absolute; top: 10px; left: 10px; z-index: 2; }
.today-hero .text-area { min-width: 0; }

.img-ph {
  width: 100%; height: 100%;
  background: var(--paper-2);
  border: 1px dashed var(--ink-mute);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-mute);
  font-size: 12pt;
  letter-spacing: 0.15em;
  text-align: center;
  padding: 8px;
}

.tag-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11pt;
  border: 1px solid var(--ink-2);
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--rice);
}
.chip.solid { background: var(--ink); color: var(--rice); border-color: var(--ink); letter-spacing: 0.15em; }
.chip.seal  { background: var(--seal); color: var(--rice); border-color: var(--seal); }
.tag-row .sep { color: var(--ink-mute); }
.tag-row .small-cat { font-size: 12pt; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }

.today-hero h2 {
  margin: 0 0 12px;
  font-weight: 900;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.today-hero h2 a:hover { color: var(--seal); }
.today-hero .summary { font-size: 12pt; line-height: 1.7; color: var(--ink-2); margin: 0 0 14px; }
.today-hero .meta { font-family: 'JetBrains Mono', monospace; font-size: 11pt; color: var(--ink-3); }

/* ═══ 경전 인용 ═══ */
.scripture {
  background: var(--paper-2);
  border: 1px solid var(--ink-2);
  padding: 28px 32px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 28px;
}
.scripture .hanja-bg {
  position: absolute;
  top: -40px; right: -30px;
  font-size: 260px;
  font-weight: 900;
  color: var(--ink);
  opacity: 0.06;
  line-height: 1;
  pointer-events: none;
}
.scripture .lotus { flex-shrink: 0; position: relative; }
.scripture .quote-content { flex: 1; min-width: 0; position: relative; }
.scripture .label {
  font-family: 'Gaegu', cursive;
  font-size: 13px;
  color: var(--seal);
  letter-spacing: 0.2em;
  margin-bottom: 8px;
}
.scripture .text-hanja { font-size: 24px; font-weight: 700; line-height: 1.5; letter-spacing: 0.05em; }
.scripture .text-kor { font-size: 15px; color: var(--ink-2); margin-top: 8px; }
.scripture .source {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11pt;
  color: var(--ink-3);
  margin-top: 10px;
  letter-spacing: 0.15em;
}
.scripture .right-trigrams {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}

/* ═══ 4분할 게시판 ═══ */
.board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.board.wide { grid-column: 1 / -1; }
.board.wide ul.rows { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.board.wide ul.rows li { min-width: 0; }
.board {
  background: var(--paper);
  border: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.board .head {
  background: var(--ink);
  color: var(--rice);
  padding: 11px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.board .head .title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12pt; letter-spacing: 0.15em; }
.board .head .title .hanja { font-size: 11pt; color: var(--ink-mute); font-weight: 300; }
.board .head .title .dot { background: var(--gold); }
.board .head .more { font-size: 12pt; color: var(--ink-mute); }
.board .head .more:hover { color: var(--gold); }

.board ul.rows { list-style: none; margin: 0; padding: 4px 16px 14px; }
.board ul.rows li {
  padding: 9px 0;
  border-bottom: 1px dashed var(--ink-mute);
  font-size: 12pt;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.board ul.rows li:last-child { border-bottom: none; }
.board ul.rows li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.board ul.rows li a:hover { color: var(--seal); }
.board ul.rows li .meta { font-family: 'JetBrains Mono', monospace; font-size: 11pt; color: var(--ink-3); flex-shrink: 0; }
.board .empty-row { padding: 16px; font-size: 12pt; color: var(--ink-3); text-align: center; }

.board.album .album-grid { padding: 14px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.board.album .al-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.board.album .al-img {
  display: block; aspect-ratio: 1; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--paper-2);
}
.board.album .al-item:hover .al-img { border-color: var(--gold); }
.board.album .al-cap {
  font-size: 12pt;
  line-height: 1.45;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.board.album .al-item:hover .al-cap { color: var(--seal); }

.board.books .book-list { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.book-row { display: flex; gap: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--ink-mute); }
.book-row:last-child { border-bottom: none; padding-bottom: 0; }
.book-row .book-cover { width: 48px; height: 68px; flex-shrink: 0; overflow: hidden; background: var(--paper-2); }
.book-row .b-info { flex: 1; min-width: 0; }
.book-row .b-info .b-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.book-row .b-info .b-title { font-weight: 700; font-size: 13px; }
.book-row .b-info .b-title:hover { color: var(--seal); }
.book-row .b-info .b-sub { font-size: 11pt; color: var(--ink-3); margin-bottom: 6px; }
.book-row .b-info p {
  margin: 0; font-size: 11pt; color: var(--ink-2); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ═══ 와이드 갤러리 ═══ */
.gallery { background: var(--paper); border: 1px solid var(--ink); padding: 18px; }
.gallery .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 14px;
}
.gallery .head .title { display: flex; align-items: center; gap: 12px; }
.gallery .head h3 { margin: 0; font-weight: 900; font-size: 17px; letter-spacing: 0.1em; }
.gallery .head .hanja { font-size: 11pt; color: var(--ink-mute); letter-spacing: 0.15em; }
.gallery .head .more { font-size: 12pt; color: var(--ink-3); }
.gallery .head .more:hover { color: var(--seal); }
.gallery .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery .grid .g-item { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.gallery .grid .g-img {
  display: block; aspect-ratio: 4 / 3; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--paper-2);
}
.gallery .grid .g-item:hover .g-img { border-color: var(--gold); }
.gallery .grid .g-cap {
  font-size: 12pt;
  line-height: 1.5;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gallery .grid .g-item:hover .g-cap { color: var(--seal); }

/* ═══ 유튜브 최신 영상 ═══ */
.youtube { background: var(--paper); border: 1px solid var(--ink); padding: 18px; }
.youtube .head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin-bottom: 14px;
}
.youtube .head .title { display: flex; align-items: center; gap: 10px; }
.youtube .head .title h3 { margin: 0; font-weight: 900; font-size: 17px; letter-spacing: 0.1em; }
.youtube .head .yt-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 20px; border-radius: 4px;
  background: var(--seal); color: #fff; font-size: 9px; padding-left: 2px;
}
.youtube .head .more { font-size: 12pt; color: var(--ink-3); }
.youtube .head .more:hover { color: var(--seal); }
.youtube .yt-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.youtube .yt-item { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.youtube .yt-thumb {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--paper-2); border: 1px solid var(--paper-2);
}
.youtube .yt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.youtube .yt-item:hover .yt-thumb { border-color: var(--seal); }
.youtube .yt-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(168, 54, 43, 0.92); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; padding-left: 3px;
}
.youtube .yt-cap {
  font-size: 12pt; line-height: 1.45; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.youtube .yt-item:hover .yt-cap { color: var(--seal); }

/* ═══ 운영자 명언 + 추천 글 ═══ */
.bottom-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
.author-quote {
  position: relative;
  padding: 22px 26px;
  background: var(--paper-2);
  border: 1px solid var(--ink-2);
  overflow: hidden;
}
.author-quote .hanja-bg {
  position: absolute;
  top: -30px; right: -20px;
  font-size: 220px;
  font-weight: 900;
  color: var(--ink);
  opacity: 0.07;
  line-height: 1;
  pointer-events: none;
}
.author-quote .lbl {
  position: relative;
  font-family: 'Gaegu', cursive;
  font-size: 13px;
  color: var(--seal);
  letter-spacing: 0.2em;
  margin-bottom: 10px;
}
.author-quote p { position: relative; margin: 0 0 12px; font-size: 17px; line-height: 1.6; font-weight: 500; }
.author-quote .meta { position: relative; font-family: 'JetBrains Mono', monospace; font-size: 11pt; color: var(--ink-3); }

.recommended { background: var(--paper); border: 1px solid var(--ink); padding: 16px; }
.recommended .head {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.1em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink-mute);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.recommended .head .star { color: var(--seal); }
.recommended ul { list-style: none; margin: 0; padding: 0; }
.recommended ul li { padding: 7px 0; border-bottom: 1px dashed var(--ink-mute); font-size: 12pt; }
.recommended ul li:last-child { border-bottom: none; }
.recommended ul li::before { content: '·'; margin-right: 8px; color: var(--ink-mute); }
.recommended ul li a:hover { color: var(--seal); }

/* ═══ 푸터 ═══ */
.cloud-line { width: 100%; height: 14px; display: block; }
.footer {
  padding: 32px 32px 24px;
  background: var(--paper-2);
  border-top: 1px solid var(--ink-mute);
  position: relative;
  z-index: 2;
}
.footer-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.footer-biz .biz-line { margin: 0 0 5px; font-size: 12pt; color: var(--ink-2); line-height: 1.75; }
.footer-biz .biz-sep { margin: 0 7px; color: var(--ink-mute); }
.footer-biz .biz-copy {
  margin: 14px 0 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12pt;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* 낙관 — 빨간 도장 */
.seal-stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--seal);
  color: var(--rice);
  font-weight: 900;
  font-size: 11pt;
  width: 28px; height: 28px;
  letter-spacing: -0.05em;
  line-height: 1;
  position: relative;
  font-family: 'NanumSquareRound', 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
.seal-stamp::before { content: ''; position: absolute; inset: 2px; border: 1px solid rgba(255,230,210,0.35); }
.seal-stamp.lg { width: 44px; height: 44px; font-size: 17px; }
.seal-stamp.sm { width: 22px; height: 22px; font-size: 9px; }

/* 모바일 백드롭 */
.nav-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99; }
.nav-backdrop.show { display: block; }

/* ═══ 모바일 바 ═══ */
.mobile-bar {
  display: none;
  padding: 14px 16px;
  background: var(--ink);
  color: var(--rice);
  font-size: 12pt;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px double var(--gold);
}
.mobile-bar .left { display: flex; align-items: center; gap: 8px; }
.mobile-bar .yinyang { font-size: 16px; color: var(--gold); }
.mobile-bar .oju-open {
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 3px 11px;
  border-radius: 3px;
  font-size: 11pt;
  white-space: nowrap;
}
.mobile-hamburger { display: none; font-size: 22px; cursor: pointer; background: none; border: none; color: var(--ink); padding: 4px 8px; }

/* ════════════════════════════════════════════════════════════
   콘텐츠 페이지 (목록 / 단일 / 방명록 / 검색)
   ════════════════════════════════════════════════════════════ */

.panel { background: var(--paper); border: 1px solid var(--ink); }

.page-head {
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: 22px 26px;
  position: relative;
  overflow: hidden;
}
.page-head .crumb { font-size: 11pt; color: var(--ink-3); letter-spacing: 0.1em; margin-bottom: 8px; }
.page-head .crumb a:hover { color: var(--seal); }
.page-head h2 {
  margin: 0;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-head .hanja { font-size: 13px; color: var(--ink-mute); font-weight: 300; letter-spacing: 0.15em; }
.page-head .desc { margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.page-head .count { margin-top: 8px; font-family: 'JetBrains Mono', monospace; font-size: 11pt; color: var(--ink-3); }

/* 글 목록 */
.post-list { background: var(--paper); border: 1px solid var(--ink); }
.post-list .item {
  display: flex;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px dashed var(--ink-mute);
}
.post-list .item:last-child { border-bottom: none; }
.post-list .item .thumb {
  width: 130px;
  aspect-ratio: 4 / 3;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--ink-mute);
}
.post-list .item .body { flex: 1; min-width: 0; }
.post-list .item .body h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; line-height: 1.4; }
.post-list .item .body h3 a:hover { color: var(--seal); }
.post-list .item .body .sub { font-size: 12pt; color: var(--ink-3); margin-bottom: 6px; }
.post-list .item .body p {
  margin: 0; font-size: 12pt; color: var(--ink-2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-list .item .body .meta {
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11pt;
  color: var(--ink-3);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 빈 상태 */
.empty-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
}
.empty-state .big { font-size: 36px; opacity: 0.4; margin-bottom: 12px; }

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 6px 0;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  min-width: 34px;
  padding: 7px 10px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12pt;
  border: 1px solid var(--ink-mute);
  background: var(--paper);
  color: var(--ink-2);
}
.pagination a:hover { border-color: var(--seal); color: var(--seal); }
.pagination .current { background: var(--ink); color: var(--rice); border-color: var(--ink); }
.pagination .disabled { opacity: 0.4; }

/* 사진 그리드 (갤러리/카테고리) */
.photo-wall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.photo-wall a { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.photo-wall a .pw-img {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--ink-mute);
}
.photo-wall a:hover .pw-img { border-color: var(--gold); }
.photo-wall a .cap {
  font-size: 11pt;
  line-height: 1.45;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.photo-wall a:hover .cap { color: var(--seal); }

/* 서적 페이지 */
.book-wall { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.book-card {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--paper);
  border: 1px solid var(--ink);
}
.book-card .cover {
  width: 90px; height: 128px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid var(--ink-mute);
}
.book-card .info { flex: 1; min-width: 0; }
.book-card .info .b-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.book-card .info h3 { margin: 0; font-size: 16px; font-weight: 700; }
.book-card .info .sub { font-size: 12pt; color: var(--ink-3); margin-bottom: 8px; }
.book-card .info p { margin: 0; font-size: 12pt; color: var(--ink-2); line-height: 1.6; }

/* 단일 게시물 */
.post-single { background: var(--paper); border: 1px solid var(--ink); }
.post-single .post-head { padding: 28px 32px 20px; border-bottom: 2px solid var(--ink); }
.post-single h1 {
  margin: 10px 0 14px;
  font-weight: 900;
  font-size: 30px;
  line-height: 1.35;
}
.post-single .post-sub { font-size: 15px; color: var(--ink-3); margin-bottom: 12px; }
.post-single .post-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11pt;
  color: var(--ink-3);
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.post-single .post-figure { margin: 0; }
.post-single .post-figure img { width: 100%; height: auto; }
.post-single .post-body {
  padding: 28px 32px;
  font-size: 16px;
  line-height: 1.9;
  color: var(--ink-2);
}
.post-single .post-body p { margin: 0 0 1.1em; }
.post-single .post-body h2,
.post-single .post-body h3 { color: var(--ink); margin: 1.6em 0 0.6em; font-weight: 700; }
.post-single .post-body img { margin: 1.2em auto; }
.post-single .post-body blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  background: var(--paper-2);
  border-left: 3px solid var(--seal);
  color: var(--ink-2);
}
.post-single .post-body a { color: var(--dc-1); border-bottom: 1px solid var(--dc-1); }
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 32px 26px;
  border-top: 1px dashed var(--ink-mute);
  font-size: 13px;
}
.post-nav a { color: var(--ink-2); }
.post-nav a:hover { color: var(--seal); }
.post-nav .nxt { text-align: right; margin-left: auto; }

/* 본문 안 article 카드 (소개/만세력/사주 페이지) */
.prose { padding: 28px 32px; font-size: 12pt; line-height: 1.9; color: var(--ink-2); }
.prose h3 { color: var(--ink); margin: 1.4em 0 0.5em; }
.prose p { margin: 0 0 1em; }

/* 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--ink);
  color: var(--rice);
  border: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 500;
}
.btn:hover { background: var(--seal); border-color: var(--seal); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--paper-2); color: var(--seal); }
.btn.sm { padding: 5px 12px; font-size: 12pt; }

/* 플래시 메시지 */
.flash-wrap { display: flex; flex-direction: column; gap: 8px; }
.flash {
  padding: 11px 16px;
  font-size: 13px;
  border: 1px solid var(--ink-mute);
  background: var(--rice);
}
.flash.ok    { border-color: var(--bamboo); color: var(--bamboo); }
.flash.error { border-color: var(--seal); color: var(--seal); }

/* 검색 결과 */
.search-summary { padding: 16px 22px; font-size: 12pt; color: var(--ink-3); border-bottom: 1px dashed var(--ink-mute); }
.search-summary b { color: var(--seal); }

/* ═══ 반응형 ═══ */
@media (max-width: 1100px) {
  .top-nav-text { display: none; }
  .mobile-hamburger { display: block; }
  .main-wrap { grid-template-columns: 1fr; padding: 20px 18px; gap: 18px; }
  .left-nav {
    position: fixed;
    top: 0; left: -300px;
    width: 280px;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: left 0.25s ease;
    box-shadow: 0 0 30px rgba(0,0,0,0.25);
  }
  .left-nav.open { left: 0; }
  .top-header { padding: 16px 18px; }
  .brand h1 { font-size: 22px; }
  .search-box { display: none; }
  .auth-links { display: none; }
  .photo-wall { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .manse { display: none; }
  .mobile-bar { display: flex; }
  .today-hero .body { grid-template-columns: 1fr; padding: 18px; gap: 18px; }
  .today-hero h2 { font-size: 22px; }
  .scripture { flex-direction: column; align-items: flex-start; padding: 22px; gap: 18px; }
  .scripture .right-trigrams { flex-direction: row; }
  .board-grid { grid-template-columns: 1fr; }
  .youtube .yt-grid { grid-template-columns: 1fr 1fr; }
  .board.wide ul.rows { grid-template-columns: 1fr; }
  .gallery .grid { grid-template-columns: 1fr 1fr; }
  .bottom-row { grid-template-columns: 1fr; }
  .footer-biz .biz-sep { margin: 0 4px; }
  .author-quote p { font-size: 15px; }
  .author-quote .hanja-bg { font-size: 160px; }
  .scripture .hanja-bg { font-size: 200px; }
  .hanja-bg-watermark { font-size: 280px; top: 60px; right: -60px; }
  .brand h1 { font-size: 20px; }
  .brand .tagline { font-size: 10px; }
  .photo-wall { grid-template-columns: repeat(2, 1fr); }
  .book-wall { grid-template-columns: 1fr; }
  .post-list .item { flex-direction: column; gap: 10px; }
  .post-list .item .thumb { width: 100%; aspect-ratio: 16 / 9; }
  .post-single h1 { font-size: 23px; }
  .post-single .post-head, .post-single .post-body { padding-left: 20px; padding-right: 20px; }
}

/* ═══ 게시물 이미지 확대 보기 (라이트박스) ═══ */
.post-body img.zoomable,
.post-figure img.zoomable { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(20, 18, 15, 0.93);
  cursor: zoom-out;
  overscroll-behavior: contain;
  -webkit-tap-highlight-color: transparent;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 96vw;
  max-height: 94vh;
  object-fit: contain;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.55);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}
.lightbox .lb-close {
  position: fixed;
  top: 12px;
  right: 14px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: var(--rice);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.lightbox .lb-close:hover { background: var(--seal); border-color: var(--seal); }

/* ═══ 사이드바 배너존 ═══ */
.banner-zone {
  padding: 14px 14px 18px;
  border-top: 1px solid var(--ink-mute);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.banner-zone > a { display: block; line-height: 0; }
.banner-zone > a img {
  width: 100%;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
  border: 1px solid #c0c0c0;
}
.cus-box {
  border: 1px solid #c0c0c0;
  box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.15);
  background: var(--rice);
  overflow: hidden;
}
.cus-box .cus-title { line-height: 0; }
.cus-box .cus-title img { width: 100%; }
.cus-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  font-size: 12pt;
  line-height: 1.45;
  color: #6d4e3a;
  border-top: 1px solid #ece4d2;
}
.cus-row img { width: 26px; height: 26px; flex-shrink: 0; }
.cus-row strong { color: #6d4e3a; }

/* ═══ 오주괘 모달 팝업 ═══ */
.oju-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
}
.oju-modal.open { display: flex; }
.oju-box {
  position: relative;
  width: 400px;
  height: 280px;
  max-width: 100%;
  max-height: 100%;
  background: #0d1124;
  border: 1px solid #ccc;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.oju-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.oju-close {
  position: absolute;
  bottom: 15px;
  right: 5px;
  width: 114px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
}
