@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css");

/* ===========================================================
   구미의 살림노트 — 디자인 토큰
   paper(차분한 종이색) · pine(짙은 초록) · butter(라벨 테이프)
   =========================================================== */
:root {
  --paper: #F2F3EE;
  --surface: #FFFFFF;
  --surface-2: #F8F9F5;
  --ink: #20231F;
  --ink-2: #454A43;
  --muted: #7C8279;
  --line: #D9DDD2;
  --pine: #1D3A32;
  --pine-2: #2C5246;
  --pine-soft: #DCE6E0;
  --moss: #5B7A69;
  --butter: #F2CC5B;
  --butter-soft: #FBF1CF;
  --danger: #B5483B;

  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 8px;
  --maxw: 1180px;
  --font: "Pretendard", "Pretendard Variable", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; background: var(--pine-soft); color: transparent; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--butter); outline-offset: 2px; border-radius: 6px; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
main { min-height: 60vh; }

/* ---------- 타이포 ---------- */
h1, h2, h3 { letter-spacing: -0.025em; line-height: 1.25; margin: 0; color: var(--pine); }
.display { font-size: clamp(36px, 6vw, 68px); font-weight: 800; letter-spacing: -0.045em; line-height: 1.08; }
.h-section { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; }
.lead { font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); max-width: 34em; }
.page-head { padding: 56px 0 28px; }
.page-head h1 { font-size: clamp(30px, 4.5vw, 46px); font-weight: 800; letter-spacing: -0.04em; }
.page-head p { margin: 10px 0 0; color: var(--ink-2); max-width: 40em; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--pine); background: transparent; color: var(--pine);
  font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, transform .1s;
}
.btn:hover { background: var(--pine-soft); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--pine); color: #fff; }
.btn-primary:hover { background: var(--pine-2); }
.btn-butter { background: var(--butter); border-color: var(--butter); color: var(--pine); }
.btn-butter:hover { background: #EDC244; }
.btn-ghost { border-color: var(--line); color: var(--ink-2); background: var(--surface); }
.btn-ghost:hover { border-color: var(--pine); color: var(--pine); background: var(--surface); }
.btn-danger { border-color: #E5C2BC; color: var(--danger); background: var(--surface); }
.btn-danger:hover { background: #FBEDEA; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242, 243, 238, .92);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 20px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.logo b { display: block; font-size: 17px; font-weight: 800; color: var(--pine); letter-spacing: -0.03em; line-height: 1.2; }
.logo small { display: block; font-size: 12px; color: var(--muted); line-height: 1.2; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: var(--butter); color: var(--pine);
  display: grid; place-items: center; font-weight: 800; font-size: 17px;
}
.nav-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 13px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.nav-links a:hover { color: var(--pine); background: var(--surface); }
.nav-links a.active { color: var(--pine); font-weight: 700; background: var(--pine-soft); }
.nav-mobile-cta { display: none; }
.menu-btn { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; padding: 12px 11px; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 2px; background: var(--pine); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn.open span:nth-child(2) { opacity: 0; }
.menu-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1000px) {
  .menu-btn { display: flex; order: 3; }
  .nav-cta { display: none; }
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; gap: 2px; padding: 10px 16px 18px;
    background: var(--paper); border-bottom: 1px solid var(--line);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: 12px; font-size: 16px; }
  .nav-mobile-cta { display: block; margin-top: 8px; }
  .nav-mobile-cta .btn { width: 100%; color: #fff; }
}

/* ---------- 푸터 ---------- */
.site-footer { margin-top: 96px; background: var(--pine); color: #D5E0D9; padding: 56px 0 28px; }
.site-footer .muted { color: #A9BCB1; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 36px; }
.footer-logo { font-weight: 800; font-size: 20px; color: #fff; margin: 0 0 6px; letter-spacing: -0.03em; }
.footer-h { font-weight: 700; color: #fff; margin: 0 0 10px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.footer-links a:hover { color: var(--butter); }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- 공통 조각 ---------- */
.section { padding: 72px 0 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head p { margin: 6px 0 0; color: var(--ink-2); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-sm); background: var(--pine-soft); color: var(--pine); }
.status { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--r-sm); }
.st-draft { background: #ECEDE8; color: var(--ink-2); }
.st-scheduled { background: var(--butter-soft); color: #7A5A00; }
.st-published { background: var(--pine); color: #fff; }
.label-tape {
  display: inline-block; background: var(--butter); color: var(--pine);
  font-weight: 800; font-size: 14px; padding: 4px 12px; transform: rotate(-1.5deg);
  border-radius: 3px;
}
.empty { text-align: center; padding: 56px 20px; border: 1.5px dashed var(--line); border-radius: var(--r-lg); color: var(--ink-2); background: var(--surface-2); }
.empty p { margin: 0 0 16px; }

/* ---------- 홈: 히어로 ---------- */
.hero { padding: 56px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero .display { margin: 18px 0 18px; }
.hero .btn-row { margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); }
.hero-visual { position: relative; min-height: 480px; }
.hero-photo { position: absolute; inset: 0 0 60px 60px; border-radius: var(--r-lg); overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.draft-card {
  position: absolute; left: 0; bottom: 0; width: min(360px, 88%);
  background: var(--surface); border-radius: 18px; padding: 18px 20px 20px;
  border: 1px solid var(--line); box-shadow: 0 18px 40px rgba(29, 58, 50, .16);
}
.draft-card .dc-top { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.draft-card .dc-top b { color: var(--moss); }
.draft-card .dc-title { font-weight: 800; color: var(--pine); font-size: 17px; line-height: 1.35; min-height: 46px; }
.draft-card .dc-body { font-size: 14px; color: var(--ink-2); margin-top: 8px; min-height: 66px; }
.draft-card .caret { display: inline-block; width: 2px; height: 1em; background: var(--pine); vertical-align: -2px; margin-left: 1px; animation: blink 1s steps(1) infinite; }
.draft-card .dc-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.draft-card .dc-tags span { font-size: 12px; color: var(--moss); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { min-height: 400px; }
  .hero-photo { inset: 0 0 70px 30px; }
}
@media (max-width: 520px) {
  .hero-visual { min-height: 360px; }
  .hero-photo { inset: 0 0 90px 0; }
}

/* 홈: 흐름 */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.flow-step { padding: 26px 22px; border-right: 1px solid var(--line); }
.flow-step:last-child { border-right: 0; }
.flow-step .n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--pine); color: #fff; font-weight: 800; font-size: 14px; }
.flow-step h3 { font-size: 18px; margin: 14px 0 6px; }
.flow-step p { margin: 0; font-size: 15px; color: var(--ink-2); }
@media (max-width: 900px) { .flow { grid-template-columns: 1fr 1fr; } .flow-step:nth-child(2) { border-right: 0; } .flow-step:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 520px) { .flow { grid-template-columns: 1fr; } .flow-step { border-right: 0; border-bottom: 1px solid var(--line); } .flow-step:last-child { border-bottom: 0; } }

/* 홈: 카테고리 */
.cat-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.cat-item { display: block; }
.cat-item .ph { aspect-ratio: 3 / 4; border-radius: var(--r-md); overflow: hidden; }
.cat-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.cat-item:hover img { transform: scale(1.04); }
.cat-item b { display: block; margin-top: 10px; color: var(--pine); font-size: 15px; }
.cat-item span { display: block; font-size: 13px; color: var(--muted); }
@media (max-width: 1000px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* 홈: 숫자 띠 */
.numbers { display: flex; flex-wrap: wrap; gap: 12px 40px; padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: 40px; }
.numbers div { font-size: 15px; color: var(--ink-2); }
.numbers b { font-size: 26px; color: var(--pine); font-weight: 800; margin-right: 6px; letter-spacing: -0.03em; }

/* 홈: 크리에이터 띠 */
.creator-band { display: grid; grid-template-columns: 320px 1fr; gap: 40px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.creator-band .ph { border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; }
.creator-band img { width: 100%; height: 100%; object-fit: cover; }
.creator-band h2 { font-size: 26px; margin: 12px 0 10px; }
.creator-band p { margin: 0 0 16px; color: var(--ink-2); max-width: 36em; }
@media (max-width: 760px) { .creator-band { grid-template-columns: 1fr; gap: 20px; } }

.cta-band { margin-top: 72px; background: var(--butter); border-radius: var(--r-lg); padding: 44px 36px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.cta-band p { margin: 6px 0 0; color: var(--pine-2); }

/* ---------- 글 카드 ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: border-color .15s; }
.post-card:hover { border-color: var(--pine); }
.post-card-img { aspect-ratio: 16 / 10; overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.post-card h3 { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.post-card-meta { margin: auto 0 0; font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.post-card-meta span:first-child { color: #C99A1E; letter-spacing: 1px; }
@media (max-width: 900px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }

/* ---------- 폼 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-weight: 700; font-size: 14px; color: var(--ink); }
.field .hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface);
  font-size: 15px; transition: border-color .15s;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--pine); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .row-2, .row-3 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; flex: none; accent-color: var(--pine); }
.check .hint { display: block; font-size: 13px; color: var(--muted); }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { cursor: pointer; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; background: var(--surface); color: var(--ink-2); }
.seg input:checked + label { background: var(--pine); border-color: var(--pine); color: #fff; }
.seg input:focus-visible + label { outline: 3px solid var(--butter); outline-offset: 2px; }

.tpl-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tpl-pick input { position: absolute; opacity: 0; pointer-events: none; }
.tpl-pick label { display: block; cursor: pointer; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); height: 100%; }
.tpl-pick label b { display: block; font-size: 14px; color: var(--pine); }
.tpl-pick label span { font-size: 12px; color: var(--muted); }
.tpl-pick input:checked + label { border-color: var(--pine); background: var(--pine-soft); box-shadow: inset 0 0 0 1px var(--pine); }
.tpl-pick input:focus-visible + label { outline: 3px solid var(--butter); outline-offset: 2px; }
@media (max-width: 700px) { .tpl-pick { grid-template-columns: 1fr 1fr; } }

.rating-input { display: flex; align-items: center; gap: 12px; }
.rating-input input[type=range] { flex: 1; accent-color: var(--pine); }
.rating-input output { font-weight: 800; color: #C99A1E; min-width: 120px; letter-spacing: 1px; }

/* ---------- 생성기 ---------- */
.gen-layout { display: grid; grid-template-columns: 440px 1fr; gap: 24px; align-items: start; }
.gen-form { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow: auto; }
.gen-form h2 { font-size: 18px; margin-bottom: 16px; }
.form-group { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 4px; }
.form-group > .gh { font-size: 13px; font-weight: 700; color: var(--moss); margin: 0 0 12px; }
.mode-switch { display: flex; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 18px; }
.mode-switch button { flex: 1; min-height: 38px; border: 0; background: transparent; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.mode-switch button[aria-pressed="true"] { background: var(--pine); color: #fff; }
.gen-submit { position: sticky; bottom: -24px; background: var(--surface); padding: 14px 0 0; margin-top: 8px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.gen-submit .btn { flex: 1; }
@media (max-width: 1000px) {
  .gen-layout { grid-template-columns: 1fr; }
  .gen-form { position: static; max-height: none; overflow: visible; }
  .gen-submit { position: static; }
}

.preview-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: flex; gap: 4px; max-width: 100%; overflow-x: auto; background: var(--surface-2); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.tabs button { white-space: nowrap; flex: none; border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--pine); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.title-options { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.title-options button { text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 14px; font-size: 15px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.title-options button[aria-pressed="true"] { border-color: var(--pine); color: var(--pine); background: var(--pine-soft); }
.code-view { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px; max-height: 70vh; overflow: auto; margin: 0; }
.seo-box { display: grid; grid-template-columns: 120px 1fr; gap: 20px; align-items: center; }
.seo-score { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--pine) calc(var(--v) * 1%), var(--pine-soft) 0); }
.seo-score span { width: 84px; height: 84px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 800; font-size: 26px; color: var(--pine); }
.seo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.seo-list li::before { content: "○"; margin-right: 8px; color: var(--muted); }
.seo-list li.ok::before { content: "●"; color: var(--pine); }
@media (max-width: 520px) { .seo-box { grid-template-columns: 1fr; justify-items: start; } }
.loading { display: flex; align-items: center; gap: 12px; color: var(--ink-2); padding: 40px 0; justify-content: center; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--pine-soft); border-top-color: var(--pine); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hashtags { display: flex; flex-wrap: wrap; gap: 6px; }
.hashtags span { font-size: 13px; color: var(--moss); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }

/* ---------- 글 본문 ---------- */
.post-body { font-size: 17px; line-height: 1.85; color: var(--ink); max-width: 720px; }
.post-body h2 { font-size: 23px; margin: 40px 0 12px; padding-left: 12px; border-left: 4px solid var(--butter); }
.post-body h3 { font-size: 18px; margin: 26px 0 8px; color: var(--pine-2); }
.post-body p { margin: 0 0 14px; }
.post-body ul { margin: 0 0 16px; padding-left: 22px; }
.post-body li { margin-bottom: 4px; }
.post-body blockquote { margin: 16px 0 20px; padding: 18px 22px; background: var(--butter-soft); border-radius: var(--r-md); font-weight: 700; color: var(--pine); font-size: 18px; }
.post-body .post-notice { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; font-size: 14px; color: var(--ink-2); }
.post-body .post-faq { border-bottom: 1px solid var(--line); padding: 12px 0; }
.post-body .post-faq .q { font-weight: 700; margin-bottom: 4px; color: var(--pine); }
.post-body .post-faq .a { margin: 0; }
.post-body .post-img { margin: 20px 0 24px; border-radius: var(--r-md); overflow: hidden; }
.post-body .post-img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-body .post-photo { margin: 14px 0 20px; border: 1.5px dashed #BFC6B8; border-radius: var(--r-md); padding: 22px; text-align: center; color: var(--moss); font-weight: 700; font-size: 14px; background: var(--surface-2); }
.post-body .post-photo span { font-weight: 400; color: var(--muted); }
.post-body .post-sign { color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 24px; }
.post-table { overflow-x: auto; margin: 10px 0 14px; border: 1px solid var(--line); border-radius: 12px; }
.post-table table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 420px; }
.post-table th, .post-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
.post-table th { background: var(--pine-soft); color: var(--pine); font-weight: 700; }
.post-table tr:last-child td { border-bottom: 0; }
@media (max-width: 560px) { .post-body { font-size: 16px; } .post-body h2 { font-size: 20px; } }

/* ---------- 보관함 ---------- */
.lib-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: start; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.toolbar .input { flex: 1; min-width: 200px; }
.toolbar .select { width: auto; min-width: 140px; }
.status-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.status-tabs button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.status-tabs button[aria-pressed="true"] { background: var(--pine); border-color: var(--pine); color: #fff; }
.status-tabs em { font-style: normal; opacity: .7; margin-left: 4px; }
.lib-layout .post-grid { grid-template-columns: repeat(2, 1fr); }
.schedule-list { list-style: none; margin: 0; padding: 0; }
.schedule-list li { border-bottom: 1px solid var(--line); padding: 12px 0; }
.schedule-list li:last-child { border-bottom: 0; }
.schedule-list .when { font-size: 13px; font-weight: 700; color: #7A5A00; }
.schedule-list a { display: block; font-weight: 600; font-size: 15px; line-height: 1.4; margin-top: 2px; }
.schedule-list a:hover { color: var(--pine); text-decoration: underline; }
.side-stack { display: grid; gap: 16px; position: sticky; top: 88px; }
.side-stack h2 { font-size: 17px; margin-bottom: 8px; }
.mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-stats div { background: var(--surface-2); border-radius: 12px; padding: 12px; font-size: 13px; color: var(--muted); }
.mini-stats b { display: block; font-size: 22px; color: var(--pine); }
@media (max-width: 1000px) { .lib-layout { grid-template-columns: 1fr; } .side-stack { position: static; } }
@media (max-width: 560px) { .lib-layout .post-grid { grid-template-columns: 1fr; } }

/* ---------- 글 상세 ---------- */
.post-hero { border-radius: var(--r-lg); overflow: hidden; margin: 28px 0 28px; aspect-ratio: 21 / 8; }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }
.post-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.post-title { font-size: clamp(26px, 3.6vw, 38px); font-weight: 800; letter-spacing: -0.035em; margin: 10px 0 12px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.post-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; color: var(--ink-2); font-size: 15px; margin: 18px 0 8px; max-width: 720px; }
.post-side { position: sticky; top: 88px; display: grid; gap: 16px; }
.post-side h2 { font-size: 16px; margin-bottom: 12px; }
.post-side .btn { width: 100%; }
@media (max-width: 1000px) { .post-layout { grid-template-columns: 1fr; } .post-side { position: static; } .post-hero { aspect-ratio: 16 / 9; } }

/* ---------- 템플릿 ---------- */
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tpl-card { display: grid; grid-template-columns: 200px 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tpl-card .ph { min-height: 100%; }
.tpl-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.tpl-card .body { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.tpl-card h3 { font-size: 20px; }
.tpl-card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.tpl-card .ex { font-size: 14px; color: var(--pine); background: var(--butter-soft); padding: 8px 12px; border-radius: 10px; }
.tpl-sections { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; counter-reset: s; }
.tpl-sections li { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; color: var(--ink-2); counter-increment: s; }
.tpl-sections li::before { content: counter(s) " "; color: var(--moss); font-weight: 700; }
.tpl-card .btn { align-self: flex-start; margin-top: auto; }
@media (max-width: 1000px) { .tpl-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .tpl-card { grid-template-columns: 1fr; } .tpl-card .ph { aspect-ratio: 16 / 9; } }

/* ---------- 크리에이터 ---------- */
.about-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 48px 0 0; }
.about-hero .ph { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 5 / 4; }
.about-hero img { width: 100%; height: 100%; object-fit: cover; }
.about-hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -0.045em; margin: 14px 0; }
.channel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.channel-grid .panel b { display: block; color: var(--pine); font-size: 18px; margin: 4px 0; }
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.principles li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px; }
.principles h3 { font-size: 17px; margin-bottom: 6px; }
.principles p { margin: 0; color: var(--ink-2); font-size: 15px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 32px; align-items: start; }
@media (max-width: 900px) {
  .about-hero, .contact-grid { grid-template-columns: 1fr; }
  .channel-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
}

/* ---------- 설정 ---------- */
.settings-wrap { display: grid; gap: 20px; max-width: 760px; }
.settings-wrap .panel h2 { font-size: 19px; margin-bottom: 4px; }
.settings-wrap .panel > p { margin: 0 0 18px; color: var(--ink-2); font-size: 15px; }
.key-row { display: flex; gap: 8px; }
.key-row .input { flex: 1; }

/* ---------- 토스트 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  background: var(--pine); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 15px; opacity: 0; pointer-events: none; z-index: 100;
  transition: opacity .2s, transform .2s; max-width: calc(100% - 40px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* 그리드 자식이 긴 내용 때문에 넓어지지 않도록 */
.gen-layout > *, .post-layout > *, .lib-layout > *, .hero-grid > *, .contact-grid > *, .about-hero > * { min-width: 0; }
