/* 내 손안에 복지 — 디자인 시안 B: 따뜻한 생활 매거진형
   레퍼런스: 시니어 리빙 매거진(웜 아이보리+딥 에버그린+세이지), Warm Organic Editorial
   (크림 캔버스 #f0ece2 · 포레스트 그린 #2d4a3e · 테라코타 #c27550 · radius 16–24px ·
   부드러운 웜 섀도), Terracotta Editorial(알라바스터 크림 · 카드 radius 16 · pill 999)
   기능 하한 유지: 본문 18px · 줄간격 1.7 · 버튼 56px · 터치 44px · 대비 4.5:1 · 360px 넘침 0 */

@font-face {
  font-family: "GmarketSans";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansMedium.woff") format("woff");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "GmarketSans";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff") format("woff");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #FAF4E8;             /* 따뜻한 크림 캔버스 */
  --surface: #FFFDF6;        /* 카드·패널 (웜 화이트) */
  --sand: #F3E9D2;           /* 샌드 (표 머리·보조 면) */
  --sage: #E9EFE0;           /* 세이지 틴트 (요약 박스) */
  --sage-line: #CBD8B8;
  --text: #38322A;           /* 웜 잉크 (크림 위 대비 10:1+) */
  --muted: #6E6353;          /* 보조 텍스트 (크림 위 5:1+) */
  --accent: #2F5D46;         /* 딥그린 — 주 포인트 (크림 위 6.4:1) */
  --accent-deep: #234434;    /* 딥그린 진한 톤 (푸터) */
  --terra: #B5502A;          /* 테라코타 — 작은 강조 전용 */
  --border: #E4D8BE;         /* 웜 헤어라인 */
  --font-body: 18px;
  --line-height: 1.7;
  --font-h1: 27px;
  --font-h2: 22px;
  --btn-height: 56px;
  --touch-min: 44px;
  --space: 8px;
  --maxw: 720px;
  --r-lg: 26px;
  --r-md: 20px;
  --shadow: 0 2px 6px rgba(101, 79, 44, .05), 0 14px 32px rgba(101, 79, 44, .09);
  --shadow-sm: 0 1px 3px rgba(101, 79, 44, .05), 0 6px 18px rgba(101, 79, 44, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "SUIT", -apple-system, BlinkMacSystemFont, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-size: var(--font-body);
  line-height: var(--line-height);
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--terra); outline-offset: 2px; border-radius: 6px;
}
img { max-width: 100%; height: auto; }
h1, h2, .site-name, .card-title, .topic-btn .t, .footer-brand {
  font-family: "GmarketSans", "SUIT", sans-serif;
}

/* ---------- 헤더 ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 14px calc(var(--space) * 2);
}
.site-name {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 23px; font-weight: 700; color: var(--text); text-decoration: none; line-height: 1.25;
}
.brand-mark {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 15px;
  background: var(--accent); display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.brand-mark svg { width: 26px; height: 26px; fill: #FBF3DF; }
.brand-text { display: inline-block; }
.brand-tag {
  display: block; font-family: "SUIT", sans-serif; font-size: 13.5px; font-weight: 600;
  color: var(--muted); margin-top: 2px; letter-spacing: .01em;
}

main { max-width: var(--maxw); margin: 0 auto; padding: 14px 14px calc(var(--space) * 3); }
h1 { font-size: var(--font-h1); line-height: 1.38; margin: 12px 0; letter-spacing: -.01em; }
h2 { font-size: var(--font-h2); line-height: 1.45; margin: calc(var(--space) * 4) 0 var(--space); letter-spacing: -.01em; }
p { margin: var(--space) 0; }

/* ---------- 첫 화면 히어로 (매거진 표지) ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(340px 200px at 92% -10%, rgba(181, 80, 42, .16), rgba(181, 80, 42, 0) 70%),
    radial-gradient(420px 260px at -12% 108%, rgba(47, 93, 70, .14), rgba(47, 93, 70, 0) 70%),
    linear-gradient(160deg, #FBF1DC 0%, #F7ECD2 55%, #F3E7CB 100%);
  border: 1px solid var(--border); border-radius: 28px;
  padding: 26px 20px 22px; margin-top: 4px;
  box-shadow: var(--shadow-sm);
}
.hero-kicker {
  display: inline-block; margin: 0 0 10px; padding: 5px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  font-size: 14.5px; font-weight: 800; color: var(--accent);
}
.hero-kicker::before { content: "●"; color: var(--terra); margin-right: 7px; font-size: 11px; vertical-align: 2px; }
.headline { font-size: clamp(26px, 7.2vw, 31px); font-weight: 700; line-height: 1.38; margin: 2px 0 4px; }

/* 첫 화면 3주제 큰 버튼 (세로 1열) */
.topic-buttons { display: flex; flex-direction: column; gap: calc(var(--space) * 1.75); margin: calc(var(--space) * 2.5) 0; }
.topic-btn {
  position: relative; display: block; min-height: var(--btn-height);
  padding: 16px 52px 16px 20px;
  border: 1px solid #EFE3C6; border-radius: var(--r-md);
  color: var(--text); text-decoration: none; background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.topic-btn::after {
  content: "›"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--sage); color: var(--accent);
  font-size: 24px; font-weight: 700; line-height: 32px; text-align: center;
}
.topic-btn .t { display: block; font-size: 21px; font-weight: 700; color: var(--accent); }
.topic-btn .s { display: block; font-size: var(--font-body); margin-top: 3px; color: var(--text); }

/* 검색창 */
.search-box { display: flex; gap: var(--space); margin: calc(var(--space) * 2) 0 4px; }
.search-box input {
  flex: 1; min-width: 0; min-height: var(--btn-height); font-size: var(--font-body);
  padding: 0 20px; border: 1.5px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--text);
}
.search-box input::placeholder { color: var(--muted); }
.search-box button {
  min-height: var(--btn-height); min-width: 76px;
  font-size: var(--font-body); font-weight: 800; font-family: "SUIT", sans-serif;
  background: var(--accent); color: #FFF9EA; border: 0; border-radius: 999px; padding: 0 22px;
  box-shadow: var(--shadow-sm); cursor: pointer;
}

/* ---------- 글 첫머리: 판단 한 줄 (매거진 리드) ---------- */
.judgment {
  font-size: 20px; font-weight: 800; line-height: 1.65;
  background: var(--surface); border-left: 7px solid var(--terra);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 16px 18px; margin: 14px 0; box-shadow: var(--shadow-sm);
}

/* ---------- 요약 박스: 해당 여부 → 오늘 할 일 → 전화·방문처 버튼 ---------- */
.summary-box {
  background: var(--sage); border: 1px solid var(--sage-line); border-radius: var(--r-lg);
  padding: 20px; margin: 14px 0; box-shadow: var(--shadow-sm);
}
.summary-box h2 {
  margin: 20px 0 6px; font-size: var(--font-h2); line-height: 1.4; color: var(--accent-deep);
}
.summary-box h2:first-child { margin-top: 0; }
.summary-box h2::before {
  content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%;
  background: var(--terra); margin-right: 9px; vertical-align: 3px;
}
.summary-box ul, .summary-box ol { margin: 4px 0; padding-left: 24px; }
.summary-box p, .summary-box li { font-size: var(--font-body); }
.official-btn {
  display: block; min-height: var(--btn-height); margin-top: 12px;
  padding: 13px calc(var(--space) * 2);
  background: var(--accent); color: #FFF9EA; border-radius: 999px;
  font-size: 20px; font-weight: 800; line-height: 1.4; text-align: center; text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.official-btn.sub { background: var(--surface); color: var(--accent); border: 2px solid var(--accent); box-shadow: none; }

/* 버튼 주변 여백 24px (광고 오인 클릭 방지, 잠정 시험값) */
.btn-gap { margin-bottom: calc(var(--space) * 3); }

/* ---------- 표 ---------- */
.table-wrap { overflow-x: auto; margin: calc(var(--space) * 2) 0; border-radius: var(--r-md); }
table { border-collapse: collapse; width: 100%; font-size: var(--font-body); background: var(--surface); }
th, td { border: 1px solid #E7DCC2; padding: 10px calc(var(--space) * 1.5); text-align: left; }
th { background: var(--sand); color: #4A4234; font-weight: 800; }
@media (max-width: 480px) {
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr { border: 1px solid #E7DCC2; margin-bottom: var(--space); border-radius: 14px; overflow: hidden; }
  td { border: 0; border-bottom: 1px solid #EFE6CC; }
  td::before { content: attr(data-th); display: block; font-weight: 800; font-size: 16px; color: var(--accent); }
}

/* ---------- 글 목록 (허브) ---------- */
.post-list { list-style: none; padding: 0; margin: calc(var(--space) * 2) 0; }
.post-list li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  margin-bottom: calc(var(--space) * 1.5); box-shadow: var(--shadow-sm); overflow: hidden;
}
.post-list a { display: block; padding: 18px 20px; color: var(--text); text-decoration: none; min-height: var(--touch-min); }
.post-list .pt { font-weight: 700; font-size: 20px; line-height: 1.45; }
.post-list .pd { display: block; color: var(--muted); margin-top: 4px; font-size: 16px; }

/* ---------- 메인 화면 주제별 섹션 + 사진 카드 ---------- */
.home-section { margin-top: calc(var(--space) * 6); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: calc(var(--space) * 2); }
.section-head h2 {
  margin: 0; font-size: 24px; padding-left: 14px;
  border-left: 6px solid var(--terra); border-radius: 3px; line-height: 1.3;
}
.more-link {
  font-weight: 800; white-space: nowrap; min-height: var(--touch-min);
  display: inline-flex; align-items: center; text-decoration: none;
  color: var(--accent); background: var(--surface);
  border: 1.5px solid var(--accent); border-radius: 999px; padding: 4px 16px; font-size: 16px;
}
.card-list { display: flex; flex-direction: column; gap: calc(var(--space) * 2.25); margin-top: calc(var(--space) * 2.5); }
.card {
  border: 1px solid #EFE5CB; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
}
.card a { display: block; color: var(--text); text-decoration: none; }
.card-thumb { position: relative; display: block; overflow: hidden; background: var(--sage); }
.card-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-lg .card-thumb { aspect-ratio: 16 / 10; }
.card-chip {
  position: absolute; left: 14px; bottom: 14px;
  background: rgba(250, 244, 232, .95); color: var(--accent-deep);
  font-size: 13.5px; font-weight: 800; padding: 4px 12px; border-radius: 999px;
}
.card-thumb-none {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space);
  background: linear-gradient(150deg, #EFF3E4 0%, #E2EBD2 100%);
  color: var(--accent); padding: calc(var(--space) * 3);
}
.card-thumb-none svg {
  width: 46px; height: 46px; fill: var(--accent);
  background: rgba(255, 253, 246, .85); border-radius: 50%; padding: 10px; box-sizing: border-box;
}
.card-thumb-none .thumb-topic { font-size: 20px; font-weight: 800; font-family: "GmarketSans", "SUIT", sans-serif; }
.card-body { display: block; padding: 18px 20px 20px; min-width: 0; }
.card-title { display: block; font-weight: 700; font-size: 20.5px; line-height: 1.45; }
.card-desc {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  margin-top: 6px; font-size: var(--font-body); color: #57493B;
}
.card-note { display: block; margin-top: 8px; font-size: 15px; font-weight: 800; color: var(--terra); }
.card-sm { border-radius: var(--r-md); }
.card-sm a { display: flex; align-items: center; gap: 14px; padding: 12px; }
.card-sm .card-thumb { flex: 0 0 118px; width: 118px; height: 118px; border-radius: 16px; align-self: center; }
.card-sm .card-chip { left: 8px; bottom: 8px; font-size: 12px; padding: 2px 9px; }
.card-sm .card-thumb-none { padding: var(--space); }
.card-sm .card-thumb-none svg { width: 30px; height: 30px; padding: 6px; }
.card-sm .card-thumb-none .thumb-topic { font-size: 14.5px; }
.card-sm .card-body { flex: 1; padding: 2px 6px 2px 0; }

/* ---------- 복귀 링크·공유 버튼 ---------- */
.back-link {
  display: inline-flex; align-items: center; min-height: var(--touch-min);
  padding: 4px 16px 4px 12px; font-weight: 800; text-decoration: none;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: 999px; color: var(--accent);
}
.share-btn {
  display: block; width: 100%; min-height: var(--btn-height); font-size: 20px; font-weight: 800;
  font-family: "SUIT", sans-serif;
  background: #FEE500; color: #3A2E1D; border: 0; border-radius: 999px; margin: calc(var(--space) * 3) 0;
  box-shadow: var(--shadow-sm); cursor: pointer;
}

/* ---------- 관련 안내 블록 ---------- */
.related {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: calc(var(--space) * 2.5); margin-top: calc(var(--space) * 4); box-shadow: var(--shadow-sm);
}

/* ---------- 출처·기준일 ---------- */
.sources { margin-top: calc(var(--space) * 4); border-top: 2px dashed var(--border); padding-top: calc(var(--space) * 2); }
.sources a { overflow-wrap: anywhere; word-break: break-all; }
.checked-date { font-weight: 700; margin: 4px 0 6px; color: var(--muted); font-size: 16px; }

/* ---------- 초안 표시 ---------- */
.draft-banner {
  background: #FCEFD2; border: 2px dashed #C08A2D; border-radius: var(--r-md);
  padding: 12px 14px; margin: 12px 0; font-weight: 700; line-height: 1.55; color: #6B4A12;
}
.placeholder-box {
  border: 2px dashed var(--border); border-radius: var(--r-md);
  background: var(--surface);
  padding: calc(var(--space) * 3); text-align: center; margin: calc(var(--space) * 2) 0;
}

/* ---------- 푸터 ---------- */
.site-footer { background: var(--accent-deep); margin-top: calc(var(--space) * 7); padding: calc(var(--space) * 4) calc(var(--space) * 2) calc(var(--space) * 5); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; }
.footer-brand { font-size: 20px; font-weight: 700; color: #FBF3DF; margin: 0 0 6px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px calc(var(--space) * 2.5); }
.site-footer a {
  display: inline-block; min-height: var(--touch-min); padding: var(--space) 0;
  color: #F3ECD9; font-weight: 600; text-decoration: none;
}
.site-footer .fine { color: #C9D6BC; margin: var(--space) 0 0; font-size: 15.5px; line-height: 1.6; }
