/* 다르만 출판사 — "낮은 절간" 테마
   한지 바탕 · 흙벽 · 나무 기둥 · 기와 처마 · 단청을 눌러 쓴 주제색. 높이보다 너비, 세로 카드보다 낮고 넓은 처마. */
:root {
  --paper: #f4eee2; --paper-2: #ebe3d3; --surface: #fbf8f1; --wall: #e6d8bf; --text: #2b2520; --muted: #7a6f63; --border: #d9cdb6;
  --wood: #5a3e2b; --wood-2: #7a5640; --tile: #3a3c3f; --tile-2: #55585c; --lantern: #c98a2b; --link: #6b3d2a;
  --danger: #9a3b2e; --ok: #4f6f52; --warn-bg: #f6ecd2; --ok-bg: #e4ecdf;
  --bg: var(--paper); --primary: var(--wood); --primary-text: #fbf6ea;
  --radius: 10px; --radius-sm: 6px; --shadow: 0 1px 0 rgba(90,62,43,.08), 0 10px 24px -16px rgba(58,44,32,.35);
  --font: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --serif: 'Noto Serif KR', 'Apple Myungjo', 'Nanum Myeongjo', Batang, Georgia, serif;
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.28 0 0 0 0 0.2 0 0 0 .06 0'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
  color-scheme: light;
}
html[data-theme="dark"] {
  --paper: #1b1a1c; --paper-2: #232124; --surface: #26242a; --wall: #2e2b31; --text: #ece4d4; --muted: #a39a8c; --border: #3a373d;
  --wood: #d9b77c; --wood-2: #b8945e; --tile: #0f0f11; --tile-2: #2a2a2e; --lantern: #e2a54a; --link: #e0b57a;
  --warn-bg: #3a3222; --ok-bg: #26332a; --bg: var(--paper); --primary: var(--wood); --primary-text: #1b1a1c;
  --shadow: 0 1px 0 rgba(0,0,0,.4), 0 12px 24px -16px rgba(0,0,0,.8);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.7; color: var(--text); background: var(--bg); word-break: keep-all; overflow-wrap: anywhere; position: relative; }
body::before { content: ''; position: fixed; inset: 0; background-image: var(--grain); pointer-events: none; z-index: 0; opacity: .9; }
body > * { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--wood-2); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, .h2, .h3 { font-family: var(--serif); line-height: 1.3; letter-spacing: -.01em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
.h2, h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.h3, h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .ok-text { color: var(--ok); }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; } .skip:focus { left: 8px; }
.eyebrow { font-family: var(--serif); font-size: .82rem; letter-spacing: .18em; color: var(--muted); margin-bottom: .7em; }
.lead { font-size: 1.08rem; color: var(--muted); line-height: 1.85; }
code { background: var(--paper-2); padding: .1em .4em; border-radius: 4px; font-size: .9em; }

/* 처마·용마루 — 반복 요소 */
.eaves { position: relative; }
.eaves::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 7px; background: radial-gradient(circle at 6px 0, var(--tile) 4.5px, transparent 5.2px) 0 0 / 12px 7px repeat-x; }
.ridge { display: block; width: 100%; height: 18px; margin: 6px 0 18px; color: var(--tile); opacity: .75; }
html[data-theme="dark"] .ridge { color: var(--tile-2); }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border-radius: var(--radius-sm); border: 1px solid transparent; font-weight: 700; font-size: .95rem; cursor: pointer; transition: transform .12s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: default; transform: none; }
.btn-primary { background: var(--wood); color: var(--primary-text); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); }
.btn-primary:hover { background: var(--wood-2); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); } .btn-ghost:hover { background: var(--paper-2); border-color: var(--wood-2); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.sm { padding: 7px 14px; font-size: .85rem; } .btn.lg { padding: 13px 28px; font-size: 1.05rem; }
.icon-btn { background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm); width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); }
.icon-btn:hover { background: var(--paper-2); }
.skin-switch { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; font-size: .78rem; font-weight: 700; }
.skin-switch a { padding: 6px 10px; color: var(--muted); } .skin-switch a.on { background: var(--wood); color: var(--primary-text); } .skin-switch a:hover { text-decoration: none; }
html[data-theme="dark"] .i-sun { display: none; } html:not([data-theme="dark"]) .i-moon { display: none; }

/* 헤더 — 기와 띠 아래 낮은 처마 */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(140%) blur(8px); border-bottom: 1px solid var(--border); border-top: 6px solid var(--tile); }
.site-header::after { content: ''; display: block; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: radial-gradient(circle at 6px 6px, var(--tile) 4.5px, transparent 5.2px) 0 0 / 12px 6px repeat-x; }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 1.18rem; letter-spacing: .02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border-radius: 4px 4px 3px 3px; background: linear-gradient(180deg, var(--tile) 0 35%, var(--wood) 35% 100%); position: relative; }
.brand-mark::after { content: ''; position: absolute; left: 5px; right: 5px; bottom: 4px; height: 8px; background: var(--paper); border-radius: 1px; }
.nav { display: flex; gap: 2px; margin-left: 8px; }
.nav a { padding: 6px 12px; border-radius: var(--radius-sm); font-weight: 600; color: var(--muted); font-family: var(--serif); } .nav a.on, .nav a:hover { color: var(--text); background: var(--paper-2); text-decoration: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search input { width: 150px; padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); outline: none; transition: width .2s; }
.search input:focus { width: 210px; border-color: var(--wood-2); }
.chips-row { display: flex; gap: 8px; padding: 8px 0 12px; overflow-x: auto; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.chip { --chip: var(--wood); flex: 0 0 auto; padding: 5px 13px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); font-size: .88rem; font-weight: 600; border-bottom-width: 2px; }
.chip:hover { text-decoration: none; border-color: var(--chip); } .chip.on { background: var(--chip); border-color: var(--chip); color: #fbf6ea; }
@media (max-width: 760px) { .nav { display: none; } .search { display: none; } .header-inner { min-height: 58px; } }

/* 히어로 — 넓은 마당, 멀리 낮은 지붕선 */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: end; padding: 52px 0 28px; position: relative; }
.hero::after { content: ''; position: absolute; left: -40vw; right: -40vw; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent); }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.25; margin-bottom: .55em; }
.hero-form { display: flex; gap: 8px; max-width: 460px; margin: 20px 0 8px; }
.hero-form input { flex: 1; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); }
.hero-card { --accent: var(--wood); display: flex; flex-direction: column; gap: 10px; padding: 26px 26px 22px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--accent); box-shadow: var(--shadow); position: relative; }
.hero-card::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 7px; background: radial-gradient(circle at 6px 0, var(--accent) 4.5px, transparent 5.2px) 0 0 / 12px 7px repeat-x; }
.hero-card strong { font-family: var(--serif); font-size: 1.35rem; line-height: 1.4; margin-top: 4px; } .hero-card:hover { text-decoration: none; transform: translateY(-2px); transition: transform .15s; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 3px; background: color-mix(in srgb, var(--accent, var(--wood)) 12%, transparent); color: var(--accent, var(--text)); font-size: .78rem; font-weight: 700; }
.tag.soft { background: var(--paper-2); color: var(--muted); margin-right: 6px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 30px; align-items: start; } }

/* 섹션 · 카드 — 낮고 넓게 */
.section { padding: 26px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2, .section-head h1 { position: relative; padding-left: 14px; }
.section-head h2::before, .section-head h1::before { content: ''; position: absolute; left: 0; top: .2em; bottom: .2em; width: 4px; background: var(--wood); border-radius: 2px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { --accent: var(--wood); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-bottom: 3px solid var(--wood-2); position: relative; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-cover { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; position: relative; background: var(--accent); color: #fbf6ea; }
.card-cover::after { content: ''; position: absolute; left: 0; right: 0; bottom: -7px; height: 7px; background: radial-gradient(circle at 6px 0, var(--accent) 4.5px, transparent 5.2px) 0 0 / 12px 7px repeat-x; }
.card-cover::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 2px, transparent 2px 14px); }
/* 대표 이미지 — 카드 커버가 이미지면 띠 대신 사진을 보여준다 */
.card-cover.has-img { height: 168px; padding: 0; align-items: flex-end; background: var(--paper-2); }
.card-cover.has-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-cover.has-img::before { background: linear-gradient(180deg, rgba(0,0,0,0) 45%, rgba(0,0,0,.45) 100%); }
.card-cover.has-img .cover-series { position: relative; margin: 0 0 10px 16px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.card.sm .card-cover.has-img, .card-grid .card.compact .card-cover.has-img { height: 132px; }
.hero-card.has-img { padding-top: 0; }
.hero-card-img { width: calc(100% + 52px); max-width: none; margin: 0 -26px 6px; height: 210px; object-fit: cover; display: block; background: var(--paper-2); }
.post-cover { margin: 22px 0 6px; }
.post-cover img { width: 100%; height: auto; display: block; border: 1px solid var(--border); background: var(--paper-2); }
.post-cover figcaption { margin-top: 8px; font-size: .86rem; color: var(--muted); text-align: center; }
.prose img { max-width: 100%; height: auto; display: block; margin: 18px auto; border: 1px solid var(--border); background: var(--paper-2); }
.cover-emoji { font-size: 1.5rem; line-height: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); z-index: 1; }
.cover-series { z-index: 1; font-family: var(--serif); font-weight: 700; font-size: .74rem; letter-spacing: .04em; opacity: .9; }
.card-body { padding: 22px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title { font-size: 1.15rem; margin: 0; } .card-title a:hover { text-decoration: none; color: var(--accent); }
/* 제목은 위(메타 바로 아래)에, 요약은 카드 아래쪽에 붙여 같은 행의 카드끼리 줄을 맞춘다 */
.card-summary { margin: 0; margin-top: auto; padding-top: 8px; color: var(--muted); font-size: .93rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card.wide { flex-direction: row; } .card.wide .card-cover { width: 120px; height: auto; flex: 0 0 120px; flex-direction: column; justify-content: center; padding: 14px; text-align: center; } .card.wide .card-cover::after { left: auto; right: -7px; top: 0; bottom: 0; height: auto; width: 7px; background: radial-gradient(circle at 0 6px, var(--accent) 4.5px, transparent 5.2px) 0 0 / 7px 12px repeat-y; } .card.wide .card-body { flex: 1; padding: 18px; }
@media (max-width: 560px) { .card.wide { flex-direction: column; } .card.wide .card-cover { width: 100%; height: 56px; flex-direction: row; text-align: left; } .card.wide .card-cover::after { left: 0; right: 0; top: auto; bottom: -7px; height: 7px; width: auto; background: radial-gradient(circle at 6px 0, var(--accent) 4.5px, transparent 5.2px) 0 0 / 12px 7px repeat-x; } }
.daily-items { display: grid; gap: 16px; }
.empty { padding: 48px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; padding: 28px 0 8px; color: var(--muted); font-family: var(--serif); }
.pagination a { font-weight: 700; color: var(--text); }

/* 주제 — 넓게 깔린 낮은 전각들 */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.topic { --accent: var(--wood); background: var(--surface); border: 1px solid var(--border); border-bottom: 3px solid var(--wood-2); padding: 20px 18px 18px; display: flex; flex-direction: column; gap: 12px; position: relative; margin-top: 8px; }
.topic::before { content: ''; position: absolute; left: -1px; right: -1px; top: -8px; height: 8px; background: var(--accent); }
.topic::after { content: ''; position: absolute; left: -1px; right: -1px; top: 0; height: 7px; background: radial-gradient(circle at 6px 0, var(--accent) 4.5px, transparent 5.2px) 0 0 / 12px 7px repeat-x; }
.topic:hover { text-decoration: none; }
/* 주제 설명 길이가 달라도 아래 글 카드가 같은 자리에 오도록 머리말이 남는 공간을 흡수한다 */
.topic-head { display: flex; gap: 12px; align-items: flex-start; margin-top: 4px; flex: 1; } .topic-head:hover { text-decoration: none; }
.topic-head > div, .topic-head > span:last-child { display: flex; flex-direction: column; }
.topic-head strong { font-family: var(--serif); font-size: 1.05rem; }
.topic-emoji { font-size: 1.6rem; line-height: 1; }
.topic-post { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; background: var(--paper-2); border-left: 3px solid var(--accent); } .topic-post:hover { text-decoration: none; background: var(--wall); }
/* 제목은 두 줄로 고정(짧아도 자리를 지킴) + 메타는 아래 정렬 → 카드끼리 높이가 같아 줄이 맞는다 */
.topic-post strong { font-family: var(--serif); line-height: 1.45; min-height: 2.9em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.topic-post-meta { margin-top: auto; }
.subscribe-band { margin: 36px 0 12px; padding: 34px 36px; background: var(--wall); border: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; position: relative; }
.subscribe-band::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 7px; background: radial-gradient(circle at 6px 0, var(--tile) 4.5px, transparent 5.2px) 0 0 / 12px 7px repeat-x; }
.subscribe-band h2 { margin-bottom: .3em; } .subscribe-band p { margin: 0; color: var(--muted); max-width: 560px; }
html[data-theme="dark"] .subscribe-band { background: var(--surface); }

/* 주제 페이지 */
.cat-hero { --accent: var(--wood); display: flex; gap: 22px; align-items: center; padding: 40px 0 10px; flex-wrap: wrap; }
.cat-emoji { font-size: 3rem; width: 92px; height: 92px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.cat-hero > div { flex: 1; min-width: 240px; } .cat-hero .lead { margin-bottom: .4em; }

/* 글 본문 — 한지 위 세로 여백 */
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: var(--lantern); z-index: 60; }
.post { --accent: var(--wood); max-width: 720px; margin: 0 auto; padding: 36px 0 20px; }
.post-head { margin-bottom: 30px; padding-bottom: 22px; border-bottom: 1px solid var(--border); position: relative; }
.post-head::after { content: ''; position: absolute; left: 50%; bottom: -4px; width: 60px; height: 7px; transform: translateX(-50%); background: var(--paper); border: 1px solid var(--border); border-radius: 4px; }
.post-kicker { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
/* 게시번호: 제목보다 작게, 제목 위에 */
.series { font-family: var(--serif); font-weight: 700; color: var(--accent); letter-spacing: .04em; font-size: .8rem; }
.post-no { font-family: var(--serif); font-weight: 700; font-size: .72rem; letter-spacing: .04em; color: var(--muted); margin-bottom: 1px; }
/* 제목 끝에 붙는 문서 번호(BT-2026-0001) — 어떤 크기의 제목 안에서도 작게 */
.doc-no { font-family: var(--font); font-weight: 400; font-size: clamp(.6rem, .5em, .95rem); letter-spacing: .04em; color: var(--muted); white-space: nowrap; vertical-align: .12em; opacity: .85; }
.post-summary { font-size: 1.12rem; color: var(--muted); font-family: var(--serif); }
.prose { font-size: 1.08rem; line-height: 2; }
.prose p { margin: 0 0 1.3em; } .prose h2 { font-size: 1.35rem; margin: 1.8em 0 .6em; padding-left: 12px; border-left: 4px solid var(--accent); } .prose h3 { font-size: 1.12rem; margin: 1.5em 0 .5em; } .prose h4 { margin: 1.3em 0 .4em; }
.prose blockquote { margin: 1.5em 0; padding: 16px 22px; border-left: 3px solid var(--accent); background: var(--surface); font-family: var(--serif); font-size: 1.04em; position: relative; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { padding-left: 1.4em; } .prose li { margin: .3em 0; }
.prose hr { border: 0; height: 12px; margin: 2.2em auto; width: 120px; background: radial-gradient(circle at 6px 6px, var(--border) 3px, transparent 3.5px) 0 0 / 12px 12px repeat-x; }
.prose a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.prose pre { background: var(--paper-2); padding: 14px; overflow-x: auto; font-size: .9em; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95em; } .prose td, .prose th { border: 1px solid var(--border); padding: 7px 10px; } .prose th { background: var(--paper-2); font-family: var(--serif); }
.tags { margin: 24px 0 8px; }
.post-actions { display: flex; gap: 8px; margin: 20px 0; }
.inline-cta { display: flex; flex-direction: column; gap: 6px; padding: 24px; background: var(--wall); border: 1px solid var(--border); margin: 28px 0; align-items: flex-start; }
html[data-theme="dark"] .inline-cta { background: var(--surface); }
.inline-cta strong { font-family: var(--serif); font-size: 1.05rem; } .inline-cta .btn { margin-top: 8px; }
.prev-next { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 30px; }
.prev-next a { display: flex; flex-direction: column; padding: 14px 16px; border: 1px solid var(--border); background: var(--surface); border-bottom-width: 3px; } .prev-next a:hover { text-decoration: none; border-color: var(--accent); }
.prev-next .right { text-align: right; } .prev-next strong { font-family: var(--serif); }
.notice { padding: 12px 16px; margin: 0 0 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-left: 4px solid var(--lantern); }
.notice.warn { background: var(--warn-bg); } .notice.ok { background: var(--ok-bg); border-left-color: var(--ok); }
.prose-page h2 { margin-top: 1.6em; } .prose-page ul { padding-left: 1.3em; } .prose-page li { margin: .4em 0; }
.daily-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.daily-list a { display: flex; justify-content: space-between; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--wood); } .daily-list a:hover { text-decoration: none; border-color: var(--wood-2); }
.daily-list strong { font-family: var(--serif); }

/* 폼 — 문살 느낌의 얇은 선 */
.panel { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--wood); padding: 26px; }
.auth { max-width: 560px; margin: 0 auto; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
.form input[type="text"], .form input[type="email"], .form input[type="password"], .form input[type="number"], .form input[type="search"], .form input[type="datetime-local"], .form select, .form textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--paper); font-weight: 400; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid color-mix(in srgb, var(--lantern) 45%, transparent); border-color: var(--wood-2); }
.form textarea { resize: vertical; line-height: 1.6; font-family: var(--font); }
.form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; } .form legend { font-weight: 700; margin-bottom: 8px; padding: 0; font-family: var(--serif); }
.form .check, .form .radio, .form .switch { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; } .form .radio select { width: auto; padding: 4px 8px; }
.radio-row { display: flex; flex-direction: column; gap: 8px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.check-card { --accent: var(--wood); flex-direction: row !important; align-items: flex-start !important; gap: 10px !important; padding: 12px; border: 1px solid var(--border); border-top: 3px solid var(--accent); cursor: pointer; font-weight: 500 !important; }
.check-card:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.check-card input { margin-top: 4px; } .check-card > span:last-child { display: flex; flex-direction: column; } .check-card strong { font-family: var(--serif); } .check-emoji { font-size: 1.4rem; line-height: 1; }
.form-error { color: var(--danger); font-weight: 600; margin: 0; } .form-ok { color: var(--ok); font-weight: 600; margin: 0; }
.form.inline { flex-direction: row; align-items: flex-end; } .form.inline label { flex: 1; }
.big-icon { font-size: 3rem; margin: 0 0 8px; }
.me-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; align-items: start; } .stack { display: grid; gap: 20px; }
@media (max-width: 860px) { .me-grid { grid-template-columns: 1fr; } }
.plain-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .92rem; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: .75rem; font-weight: 700; background: var(--paper-2); }
.badge.sent, .badge.published, .badge.active { background: var(--ok-bg); color: var(--ok); } .badge.failed, .badge.suspended, .badge.rewrite { background: #f1ded9; color: var(--danger); } .badge.queued, .badge.scheduled, .badge.pending { background: var(--warn-bg); }
/* hidden 속성이 항상 이기도록 (.notice 등 display 지정 요소가 덮어쓰는 것 방지) */
[hidden] { display: none !important; }
html[data-theme="dark"] .badge.failed { background: #3a2220; }
.row-between { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: 8px; }

/* 관리자 */
.admin { display: grid; grid-template-columns: 200px 1fr; gap: 28px; padding: 24px 0; align-items: start; }
.admin-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px; }
.admin-nav nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav nav a { padding: 8px 12px; font-weight: 600; color: var(--muted); border-left: 3px solid transparent; font-family: var(--serif); } .admin-nav nav a.on, .admin-nav nav a:hover { background: var(--surface); color: var(--text); text-decoration: none; border-left-color: var(--wood); }
.admin-main { min-width: 0; }
@media (max-width: 860px) { .admin { grid-template-columns: 1fr; } .admin-nav { position: static; } .admin-nav nav { flex-direction: row; flex-wrap: wrap; } }
.bl-pics { display: flex; flex-wrap: wrap; gap: 6px; } .bl-pic { position: relative; display: inline-block; }
.bl-pic img { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); display: block; }
.bl-pic-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--danger); font-size: 13px; line-height: 16px; padding: 0; cursor: pointer; }
.wm-panel { margin: 16px 0; } .wm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 12px; }
.wm-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); }
.wm-card img { width: 100%; height: 130px; object-fit: cover; border-radius: 4px; display: block; } .wm-card .small { overflow-wrap: anywhere; }
.ins-bar { display: inline-block; height: 8px; background: var(--wood); border-radius: 4px; vertical-align: middle; } .ins-bar-col { width: 40%; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--wood); padding: 14px 16px; } .stat strong { display: block; font-size: 1.6rem; font-weight: 800; font-family: var(--serif); } .stat span { color: var(--muted); font-size: .85rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } @media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.table { width: 100%; border-collapse: collapse; font-size: .88rem; background: var(--surface); border: 1px solid var(--border); }
.table th, .table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; } .table th { font-size: .78rem; color: var(--muted); font-weight: 700; background: var(--paper-2); }
.table tr:last-child td { border-bottom: 0; } .table td.actions { white-space: nowrap; } .table td .btn { margin-right: 4px; }
.table-wrap, #tab-members, #tab-deliveries, #tab-audit, #tab-posts { overflow-x: auto; }
.filters, .inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; } .filters input, .filters select, .inline-form input { padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
/* 페이지 이동 — 번호 버튼 + 직접 입력 */
.pager { flex-wrap: wrap; }
.pager-nums { display: inline-flex; gap: 4px; align-items: center; }
.pager-gap { padding: 0 2px; color: var(--muted); }
.pager .btn.is-current { pointer-events: none; }
.pager-jump { display: inline-flex; gap: 6px; align-items: center; margin-left: 6px; }
.page-jump { width: 5.2em; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; text-align: center; }
.pager .btn[disabled] { opacity: .4; cursor: default; }
/* 목록 헤더 정렬 버튼 */
.col-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; font-weight: 700; white-space: nowrap; }
.col-sort:hover { text-decoration: underline; }
.col-sort.on { color: var(--accent, #5b5fc7); }
/* 목록에서 골라 일괄 처리 */
.col-check { width: 34px; text-align: center; }
.col-check input, .row-check { width: 16px; height: 16px; accent-color: var(--accent, #5b5fc7); cursor: pointer; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.bulk-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.bulk-bar .btn[disabled] { opacity: .45; cursor: default; }
/* 쿠키 동의 띠 — 거부가 동의만큼 쉬워야 한다(GDPR) */
.consent-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border); font-size: .88rem; }
.consent-text { flex: 1; min-width: 240px; line-height: 1.6; }
.consent-actions { display: flex; gap: 8px; margin-left: auto; }
.consent-actions .btn { min-width: 84px; }
/* 관리자 미리보기 띠 — 아직 공개하지 않은 언어 사이트를 볼 때 */
.preview-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 8px 20px; background: #3a2f26; color: #f2e7d8; font-size: .84rem; }
.preview-bar strong { color: #fff; }
.preview-sep { opacity: .9; }
.preview-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.preview-actions a { color: #d9c7ad; text-decoration: none; border-bottom: 1px solid transparent; }
.preview-actions a:hover { border-bottom-color: currentColor; }
.preview-actions a.on { color: #fff; font-weight: 700; border-bottom-color: currentColor; }
/* 배너 · 광고 자리 */
.ad-notice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 9px 20px; background: var(--wall); border-bottom: 1px solid var(--border); color: var(--text); font-size: .9rem; }
.ad-notice-text { flex: 1; min-width: 0; }
.ad-notice-cta { font-weight: 700; white-space: nowrap; }
.ad-notice-x { border: 0; background: none; color: var(--muted); font-size: 1rem; line-height: 1; cursor: pointer; padding: 4px 6px; border-radius: var(--radius-sm); }
.ad-notice-x:hover { background: rgba(0,0,0,.06); color: var(--text); }
/* 제휴 상품 칸 (쿠팡 파트너스) — 본문 아래, 광고처럼 튀지 않게 */
.aff-disclosure { color: var(--muted); margin: 0 0 14px; }
.aff-box { border-top: 1px solid var(--border); margin: 28px 0 8px; padding-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.aff-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.aff-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.aff-item { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--border); color: inherit; text-decoration: none; background: var(--surface); min-width: 0; }
.aff-item:hover, .aff-item:focus-visible { border-color: var(--accent, var(--border)); }
.aff-item strong { overflow-wrap: anywhere; }
.aff-go { color: var(--accent, inherit); }
.aff-foot { margin: 0; }
.ad-slot { max-width: 1120px; margin: 22px auto; padding: 0 20px; position: relative; }
.ad-slot-post_top, .ad-slot-post_bottom { max-width: none; padding: 0; margin: 20px 0; }
.ad-label { display: block; font-size: .66rem; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; margin-bottom: 5px; }
.ad-image { display: block; }
.ad-image img { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper-2); }
.ad-card { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--wood); border-radius: var(--radius); box-shadow: var(--shadow); }
.ad-card-img { width: 104px; height: 104px; object-fit: cover; border-radius: var(--radius-sm); flex: none; background: var(--paper-2); }
.ad-card-body { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 5px; }
.ad-card-title { font-family: var(--serif); font-size: 1.08rem; line-height: 1.4; }
.ad-card-text { color: var(--muted); font-size: .92rem; line-height: 1.6; }
.ad-card-cta { flex: none; }
.adsbygoogle { display: block; min-height: 90px; }
@media (max-width: 560px) { .ad-card { gap: 12px; } .ad-card-img { width: 72px; height: 72px; } .ad-card-cta { width: 100%; text-align: center; } }
/* 관리자 · 사이트 문구 편집 */
.site-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; font-size: .9rem; font-weight: 600; }
.site-field .small { font-weight: 400; }
.site-field input[type=text], .site-field textarea { font-weight: 400; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-family: inherit; font-size: .92rem; resize: vertical; }
.footer-note { margin-top: 6px; }
.admin-locale { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; font-size: .78rem; color: var(--muted); }
.admin-locale select { padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .86rem; }
/* 관리자 이미지함 */
.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 26px 16px; margin: 0 0 16px; border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface); color: var(--muted); transition: border-color .15s, background .15s; }
.dropzone.on { border-color: var(--accent, #5b5fc7); background: var(--paper-2); }
.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.img-item { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.img-item > img { width: 100%; height: 130px; object-fit: contain; background: var(--paper-2); border-radius: var(--radius-sm); }
.img-item figcaption { order: 3; }
.img-alt { width: 100%; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--paper); color: var(--text); font: inherit; font-size: .84rem; }
.img-item.no-rights { border-color: #c9903f; box-shadow: 0 0 0 1px rgba(201,144,63,.25); }
.img-rights { font-size: .8rem; }
.img-rights summary { cursor: pointer; padding: 2px 0; }
.img-rights summary.warn { color: #9a5a17; font-weight: 700; }
.img-rights > * + * { margin-top: 5px; }
.img-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.img-actions .btn { padding: 3px 7px; font-size: .74rem; }
/* 편집기 — 본문 이미지 도구 · 대표 이미지 */
.editor-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -4px 0 14px; }
.editor textarea.drop-on { outline: 2px dashed var(--accent, #5b5fc7); outline-offset: 2px; }
.cover-pick { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 14px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper-2); }
.cover-pick-label { font-size: .88rem; font-weight: 700; }
#cover-preview { width: 100%; max-height: 160px; object-fit: contain; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.cover-pick input[type=text] { padding: 6px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .86rem; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 14px; color: var(--muted); font-size: .9rem; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--wood); color: var(--primary-text); padding: 10px 18px; border-radius: var(--radius-sm); z-index: 80; font-weight: 600; box-shadow: var(--shadow); }
.editor-grid { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; } @media (max-width: 860px) { .editor-grid { grid-template-columns: 1fr; } }
.editor-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 84px; }
.preview { background: var(--surface); padding: 20px; border: 1px solid var(--border); margin-top: 10px; font-size: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .9rem; margin: 0 0 12px; } .dl dt { color: var(--muted); } .dl dd { margin: 0; }
.color-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: middle; }

/* 푸터 — 돌담 */
.site-footer { margin-top: 56px; padding: 34px 0 28px; background: var(--wall); border-top: 1px solid var(--border); position: relative; }
.site-footer::before { content: ''; position: absolute; left: 0; right: 0; top: -9px; height: 9px; background: var(--tile); }
.site-footer::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 7px; background: radial-gradient(circle at 6px 0, var(--tile) 4.5px, transparent 5.2px) 0 0 / 12px 7px repeat-x; }
html[data-theme="dark"] .site-footer { background: var(--paper-2); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 14px; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: .9rem; color: var(--muted); }
.footer-cols { display: flex; gap: 36px; flex-wrap: wrap; font-size: .9rem; }
.footer-col { display: flex; flex-direction: column; gap: 5px; min-width: 130px; } .footer-col strong { margin-bottom: 4px; font-size: .82rem; letter-spacing: .08em; color: var(--muted); } .footer-col a { color: var(--text); } .footer-col a:hover { color: var(--wood); }
@media print { .site-header, .site-footer, .inline-cta, .post-actions, .prev-next, .progress, body::before { display: none; } }

/* ---------- 즐겨찾기 ---------- */
.card-meta-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.bm-btn { flex: 0 0 auto; }
.bm-btn.icon-btn { width: 32px; height: 32px; color: var(--muted); }
.bm-btn .bm-star { transition: fill .15s, stroke .15s; }
.bm-btn[aria-pressed="true"] { color: var(--lantern); }
.bm-btn[aria-pressed="true"] .bm-star { fill: var(--lantern); stroke: var(--lantern); }
.bm-btn[aria-pressed="true"].btn-ghost { border-color: var(--lantern); }
.bm-btn:hover { color: var(--lantern); }
.bm-btn.pop svg { animation: bm-pop .35s ease-out; }
@keyframes bm-pop { 0% { transform: scale(1); } 40% { transform: scale(1.4) rotate(-10deg); } 100% { transform: scale(1); } }
.bm-link.on, .bm-link:hover { color: var(--lantern); border-color: var(--lantern); }
.bm-filter { padding-top: 0; }
.bm-panel { border-top-color: var(--lantern); }
.toast[hidden] { display: none; }

/* ---------- 모바일 메뉴 ---------- */
.menu-btn, .mobile-menu { display: none; }
.menu-btn .i-x { display: none; }
.menu-btn[aria-expanded="true"] .i-bars { display: none; } .menu-btn[aria-expanded="true"] .i-x { display: block; }
.mobile-menu { border-top: 1px solid var(--border); background: var(--surface); }
.mobile-menu-inner { display: flex; flex-direction: column; gap: 14px; padding: 14px 0 16px; }
.mobile-search { display: flex; gap: 8px; } .mobile-search input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--paper); }
.mobile-nav { display: flex; flex-direction: column; }
.mobile-nav a { padding: 12px 6px; border-bottom: 1px solid var(--border); font-family: var(--serif); font-weight: 600; font-size: 1.02rem; } .mobile-nav a:last-child { border-bottom: 0; }
.mobile-nav a.on { color: var(--wood); } .mobile-nav a.strong { color: var(--wood); font-weight: 700; } .mobile-nav a:hover { text-decoration: none; background: var(--paper-2); }
.mobile-menu-foot { display: flex; align-items: center; gap: 10px; }
body.menu-open .chips-row { display: none; }

/* ---------- 반응형 ---------- */
html, body { overflow-x: clip; }
@media (max-width: 760px) {
  .nav, .search, .header-actions > .skin-switch, .auth-actions { display: none; }
  .menu-btn { display: inline-flex; }
  .mobile-menu:not([hidden]) { display: block; }
  .header-inner { gap: 10px; min-height: 56px; }
  .header-actions { gap: 6px; }
  .brand { font-size: 1.05rem; gap: 8px; } .brand-mark { width: 22px; height: 22px; }
  .chips-row { padding: 6px 0 10px; gap: 6px; -webkit-overflow-scrolling: touch; }
  .chip { padding: 5px 11px; font-size: .84rem; }
}
@media (max-width: 600px) {
  .wrap { width: min(1180px, 100% - 28px); }
  h1 { font-size: clamp(1.45rem, 6vw, 1.9rem); }
  .hero { padding: 22px 0 22px; gap: 22px; }
  .hero h1 { font-size: clamp(1.6rem, 7vw, 2.1rem); }
  .lead { font-size: 1rem; }
  .hero-card { padding: 20px 18px 18px; } .hero-card strong { font-size: 1.15rem; }
  .section { padding: 20px 0; }
  .card-grid { grid-template-columns: 1fr; gap: 14px; }
  .card-cover { height: 48px; padding: 0 14px; } .card-body { padding: 18px 16px 16px; }
  .card-title { font-size: 1.08rem; }
  .topic-grid { grid-template-columns: 1fr; }
  .subscribe-band { padding: 24px 20px; margin: 24px 0 8px; } .subscribe-band .btn.lg { width: 100%; }
  .cat-hero { padding: 24px 0 6px; gap: 14px; } .cat-emoji { width: 64px; height: 64px; font-size: 2.1rem; } .cat-hero .btn { width: 100%; }
  .post { padding: 20px 0 12px; } .post-head { margin-bottom: 22px; padding-bottom: 18px; }
  .prose { font-size: 1.02rem; line-height: 1.9; } .prose h2 { font-size: 1.22rem; }
  .prose blockquote { padding: 12px 16px; }
  .post-actions { flex-wrap: wrap; }
  .prev-next { grid-template-columns: 1fr; } .prev-next .right { text-align: left; }
  .inline-cta { padding: 18px; }
  .panel { padding: 20px 16px; }
  .form.inline { flex-direction: column; align-items: stretch; }
  .check-grid { grid-template-columns: 1fr; }
  .row-between { flex-wrap: wrap; }
  .empty { padding: 32px 18px; }
  .daily-list a { flex-wrap: wrap; gap: 4px 10px; }
  .footer-inner { flex-direction: column; gap: 16px; }
  .footer-cols { gap: 20px; } .footer-col { min-width: 40%; }
  .site-footer { margin-top: 40px; padding: 26px 0 22px; }
  .toast { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 32px); text-align: center; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .btn { min-height: 40px; }
}
@media (max-width: 420px) {
  .hero-form { flex-direction: column; } .hero-form .btn { width: 100%; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pagination { gap: 14px; font-size: .95rem; }
}
/* 본문 표 — 화면보다 넓으면 표만 가로 스크롤 */
.prose table { display: block; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.prose pre { max-width: 100%; }

/* 주제별 받는 시간 */
.sched-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.form .sched-row select.sched { width: auto; padding: 4px 8px; font-size: .85rem; background: var(--surface); }
.check-card:has(input:not(:checked)) .sched-row { opacity: .45; }

/* 피드 안내(/feeds) */
.feed-list { display: grid; gap: 14px; margin: 14px 0 6px; }
.feed-row { border: 1px solid var(--border); border-left: 4px solid var(--accent, var(--wood)); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--paper-2); }
.feed-name { margin-bottom: 8px; }
.feed-urls { display: grid; gap: 6px; }
.feed-url { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.feed-url code { flex: 1 1 200px; font-size: .84rem; word-break: break-all; background: transparent; padding: 0; }
.feed-type { display: inline-block; min-width: 46px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.btn-sm { padding: 4px 10px; font-size: .8rem; }
/* 피드 미리보기(/rss.xml 등을 브라우저로 열었을 때) */
.feed-url.is-current .feed-type { color: var(--wood); }
.feed-url.is-current code { font-weight: 700; }
.feed-items { list-style: none; padding: 0; margin: 10px 0 0; }
.feed-items li { padding: 12px 0; border-top: 1px solid var(--border); }
.feed-items li:first-child { border-top: 0; }
.feed-items .feed-item-title { display: block; font-weight: 700; margin: 4px 0 2px; }
.feed-items p { margin: 0; }

/* 약관·정책 페이지 */
.policy-toc { background: var(--paper-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; margin: 18px 0 26px; }
.policy-toc ol { margin: 6px 0 0; padding-left: 1.3em; columns: 2; column-gap: 24px; } .policy-toc li { margin: .25em 0; break-inside: avoid; }
.policy-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 10px 0 18px; }
.policy-table th, .policy-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.policy-table th { background: var(--paper-2); font-weight: 700; }
.policy-meta { color: var(--muted); font-size: .9rem; }
.prose-page h2 { scroll-margin-top: 80px; }
@media (max-width: 600px) { .policy-toc ol { columns: 1; } .policy-table { display: block; overflow-x: auto; } }

/* 글 본문에서 바로 검토(관리자) */
.post-review { position: sticky; top: 8px; z-index: 6; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 20px; padding: 12px 14px; background: var(--paper-2); border: 1px solid var(--border); border-left: 4px solid var(--wood); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.post-review-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.post-review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
@media (max-width: 640px) { .post-review-actions { margin-left: 0; width: 100%; } }

.danger-zone { border-color: var(--danger); border-left: 4px solid var(--danger); }

/* API 가이드 */
.api-hero { background: var(--paper-2); border: 1px solid var(--border); border-left: 4px solid var(--wood); border-radius: var(--radius-sm); padding: 16px 18px; margin: 14px 0 22px; }
.api-hero-links { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.api-guide h2 { scroll-margin-top: 80px; }
.api-guide h3 { scroll-margin-top: 80px; border-top: 1px solid var(--border); padding-top: 22px; margin-top: 30px; }
.api-guide h3:first-of-type { border-top: 0; }
.api-guide h4 { margin-top: 20px; }
.api-guide pre { background: var(--paper-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; }
.api-guide pre code { font-size: .86rem; line-height: 1.6; }
.api-guide table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 10px 0 18px; }
.api-guide th, .api-guide td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.api-guide th { background: var(--paper-2); font-weight: 700; }
.api-guide blockquote { border-left: 4px solid var(--lantern); background: var(--warn-bg); margin: 14px 0; padding: 10px 14px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* API 문서 */
.api-list { display: grid; gap: 8px; margin: 10px 0 18px; }
.api-op { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--paper-2); }
.api-op > summary { cursor: pointer; padding: 10px 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.api-op code { font-size: .9rem; }
.api-method { font-size: .7rem; font-weight: 800; letter-spacing: .04em; padding: 2px 7px; border-radius: 3px; background: var(--paper); border: 1px solid var(--border); }
.api-method.m-get { color: #2f4c6b; } .api-method.m-post { color: #4f6f52; } .api-method.m-patch { color: #b07a1f; } .api-method.m-delete { color: var(--danger); }
.api-body { padding: 0 12px 12px; border-top: 1px solid var(--border); }
.scope-picks { display: flex; gap: 10px; flex-wrap: wrap; }
.check.inline { display: inline-flex; align-items: center; gap: 4px; font-size: .85rem; white-space: nowrap; }

/* 관리자 편집 화면 상단 검토 바 */
.review-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--paper-2); border: 1px solid var(--border); border-left: 4px solid var(--wood); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 16px; }
.review-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.review-bar .notice { flex-basis: 100%; margin: 6px 0 0; }

/* 콘텐츠 검토(컨펌) 화면 */
.review-head { border-bottom: 1px solid var(--border); padding-bottom: 14px; margin-bottom: 16px; }
.review-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--paper-2); border: 1px solid var(--border); border-left: 4px solid var(--wood); border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 22px; position: sticky; top: 8px; z-index: 5; }
.review-actions p { flex-basis: 100%; }
.review-body { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 20px 22px; background: var(--surface); }
.review-meta { margin-top: 22px; }

/* 허니팟(봇 차단) — 화면·스크린리더에서 숨김 */
.hp { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* 2단계 인증(OTP) */
.mfa-box { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin: 16px 0; background: var(--paper-2); }
.mfa-box h3 { margin: 0 0 4px; }
.mfa-box form.inline { align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.mfa-qr { max-width: 220px; margin: 10px 0; }
.mfa-qr svg { width: 100%; height: auto; background: #fff; border-radius: 8px; padding: 6px; box-sizing: border-box; }
.mfa-secret code { font-size: 1rem; letter-spacing: .08em; }
.row.gap { display: flex; gap: 8px; flex-wrap: wrap; }
#cat-grants { margin: 4px 0 0; padding: 10px 12px; background: var(--paper); border: 1px solid var(--border); border-radius: 8px; }
.grant-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.grant-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--card, #fff); border: 1px solid var(--border); border-radius: 6px; padding: 6px 10px; }
.codes { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.codes li { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--paper); border: 1px dashed var(--border); border-radius: 6px; padding: 6px 8px; text-align: center; letter-spacing: .05em; }
