/* 고인유품정리 — 웜 베이지 톤, 40~60대 가독성 우선 (본문 18px, 대비 4.5:1 이상) */
:root {
  --bg: #f6f1e7;
  --paper: #fbf8f2;
  --sand: #ede4d3;
  --line: #d9cdb8;
  --ink: #2b2520;
  --body: #3d352d;
  --ink-2: #6b5f52;
  --input: #8c7b66;
  --accent: #7a4e2d;
  --accent-ink: #ffffff;
  --accent-hover: #5e3a20;
  --sage: #55624a;
  --sage-soft: #e3e6da;
  --warn-soft: #f4e3d3;
  --focus: #1f5a7a;
  --ok: #2f6b3a;
  --err: #a3361f;

  --serif: 'Gowun Batang', 'Noto Serif KR', 'Nanum Myeongjo', serif;
  --sans: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;

  --wrap: 1120px;
  --gutter: 20px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.75;
  letter-spacing: -0.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.4; letter-spacing: -0.02em; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(30px, 5vw, 46px); }
h2 { font-size: clamp(25px, 3.4vw, 34px); }
h3 { font-size: 21px; font-family: var(--sans); font-weight: 700; letter-spacing: -0.015em; }
p { margin: 0 0 1em; }
strong { font-weight: 700; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 12px 16px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.eyebrow { font-size: 15px; font-weight: 700; color: var(--sage); letter-spacing: .04em; margin-bottom: .5em; }
.lead { font-size: 20px; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.small { font-size: 16px; }

/* ── 헤더 ── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(246, 241, 231, .96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid var(--accent); color: var(--accent); font-family: var(--serif); font-size: 20px; font-weight: 700; border-radius: 3px; }
.brand-name { font-family: var(--serif); font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.site-nav { display: flex; align-items: center; gap: 22px; }
.site-nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 600; padding: 8px 0; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
.nav-toggle { display: none; }

@media (max-width: 1020px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; font: inherit; font-size: 17px; font-weight: 600; color: var(--ink); min-height: 48px; cursor: pointer; }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 18px; height: 2px; background: var(--ink); position: relative; }
  .nav-toggle-bar::before, .nav-toggle-bar::after { content: ''; position: absolute; left: 0; }
  .nav-toggle-bar::before { top: -6px; }
  .nav-toggle-bar::after { top: 6px; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 20px; gap: 12px; }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a:not(.btn) { display: block; padding: 14px 4px; border-bottom: 1px solid var(--sand); font-size: 19px; }
  .site-nav a:not(.btn)[aria-current] { box-shadow: none; }
}

/* ── 버튼 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 24px; border-radius: var(--radius); font: inherit; font-size: 18px; font-weight: 700; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; transition: background-color .15s; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink-2); }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }
.btn-block { width: 100%; }
.nav-cta { min-height: 46px; padding: 8px 18px; font-size: 17px; }

/* ── 섹션 공통 ── */
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-paper { background: var(--paper); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.crumbs { padding-top: 20px; font-size: 15px; color: var(--ink-2); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: '›'; margin-right: 6px; color: var(--line); }
.crumbs a { color: var(--ink-2); }

/* ── 첫 화면 ── */
.hero { padding: 64px 0 56px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: start; }
.hero h1 { margin-bottom: .45em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-bottom: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 20px; }
.hero-note h2 { font-size: 20px; font-family: var(--sans); font-weight: 700; margin-bottom: 14px; }
.hero-note dl { margin: 0; }
.hero-note dt { font-weight: 700; font-size: 17px; }
.hero-note dd { margin: 0 0 14px; color: var(--ink-2); font-size: 17px; }
.page-hero { padding: 40px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero .lead { max-width: 760px; }
@media (max-width: 860px) {
  .hero { padding: 36px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 52px 0; }
}

/* ── 서비스 목록 (행 형태) ── */
.service-rows { border-top: 2px solid var(--ink); }
.service-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.service-row:hover { background: var(--paper); }
.service-row .num { font-family: var(--serif); font-size: 22px; color: var(--accent); }
.service-row h3 { margin: 0 0 4px; font-size: 23px; }
.service-row p { margin: 0; color: var(--ink-2); }
.service-row .go { font-weight: 700; color: var(--accent); white-space: nowrap; }
@media (max-width: 640px) {
  .service-row { grid-template-columns: 40px 1fr; }
  .service-row .go { grid-column: 2; }
}

/* ── 절차 ── */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 28px 64px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--accent); color: var(--accent); font-weight: 700; display: grid; place-items: center; font-size: 19px; }
.steps > li::after { content: ''; position: absolute; left: 21px; top: 48px; bottom: 6px; width: 1.5px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps h3 { margin: 6px 0 6px; }
.steps p { margin: 0; color: var(--ink-2); }

/* ── 표 ── */
.table-wrap { overflow-x: auto; margin: 0 0 1.5em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 17px; min-width: 520px; font-variant-numeric: tabular-nums; }
caption { text-align: left; padding: 14px 16px 0; font-weight: 700; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--sand); vertical-align: top; }
thead th { background: var(--sand); font-weight: 700; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
td.num, th.num { white-space: nowrap; }

/* ── 안내 박스 ── */
.note { background: var(--paper); border-left: 4px solid var(--sage); padding: 18px 22px; margin: 0 0 1.5em; border-radius: 0 var(--radius) var(--radius) 0; }
.note-warn { border-left-color: var(--accent); background: var(--warn-soft); }
.note > :last-child { margin-bottom: 0; }
.note-title { font-weight: 700; margin-bottom: 6px; }

/* ── 2단 구성 ── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.split-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
@media (max-width: 860px) { .split, .split-3 { grid-template-columns: 1fr; gap: 28px; } }
.plain-list { list-style: none; padding: 0; margin: 0 0 1em; }
.plain-list li { padding: 8px 0 8px 26px; position: relative; border-bottom: 1px dashed var(--line); }
.plain-list li::before { content: ''; position: absolute; left: 4px; top: 20px; width: 10px; height: 2px; background: var(--accent); }
.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { padding: 6px 0 6px 30px; position: relative; }
.check-list li::before { content: ''; position: absolute; left: 4px; top: 14px; width: 12px; height: 7px; border-left: 2.5px solid var(--sage); border-bottom: 2.5px solid var(--sage); transform: rotate(-45deg); }

.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.principles > div { padding: 26px 28px 22px 0; border-bottom: 1px solid var(--line); }
.principles > div:nth-child(odd) { border-right: 1px solid var(--line); }
.principles > div:nth-child(even) { padding-left: 28px; }
.principles h3 { margin-bottom: 8px; }
.principles p { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) {
  .principles { grid-template-columns: 1fr; }
  .principles > div, .principles > div:nth-child(even) { padding: 22px 0; border-right: 0; }
  .principles > div:nth-child(odd) { border-right: 0; }
}

/* ── FAQ ── */
.faq { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 44px 20px 0; position: relative; font-weight: 700; font-size: 19px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 8px; top: 16px; font-size: 26px; font-weight: 400; color: var(--accent); }
.faq details[open] summary::after { content: '−'; }
.faq .answer { padding: 0 0 22px; color: var(--ink-2); }
.faq .answer > :last-child { margin-bottom: 0; }

/* ── 지역 ── */
.region-groups { display: grid; gap: 36px; }
.region-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.region-list a { display: block; padding: 12px 14px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 17px; }
.region-list a:hover { border-color: var(--accent); color: var(--accent); }

/* ── 글 목록 / 본문 ── */
.post-list { list-style: none; padding: 0; margin: 0; border-top: 2px solid var(--ink); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: grid; grid-template-columns: 1fr 220px; gap: 28px; padding: 26px 0; text-decoration: none; color: var(--ink); }
.post-list a:hover h3 { color: var(--accent); }
.post-list h3 { font-family: var(--serif); font-weight: 600; font-size: 23px; margin-bottom: 6px; }
.post-list p { color: var(--ink-2); margin: 0 0 6px; }
.post-list .meta { font-size: 15px; color: var(--ink-2); }
.post-list img { aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 640px) { .post-list a { grid-template-columns: 1fr; gap: 14px; } .post-list img { order: -1; } }

.article { padding: 32px 0 64px; }
.article header { border-bottom: 1px solid var(--line); padding-bottom: 24px; margin-bottom: 32px; }
.article .meta { font-size: 16px; color: var(--ink-2); }
.article .summary { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 32px; }
.article .summary p:last-child { margin: 0; }
.prose h2 { margin-top: 1.8em; font-size: clamp(23px, 3vw, 28px); }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--sage); color: var(--ink-2); }
.prose figure { margin: 1.5em 0; }
.prose figure img { border-radius: var(--radius); }
.prose figcaption { font-size: 15px; color: var(--ink-2); margin-top: 8px; }
.toc { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 32px; background: var(--paper); }
.toc p { font-weight: 700; margin-bottom: 6px; }
.toc ol { margin: 0; padding-left: 1.2em; }
.author-box { margin-top: 48px; padding: 22px 24px; border-top: 2px solid var(--ink); background: var(--paper); }
.author-box p { margin: 0 0 .4em; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 1.5em 0; }
.gallery figure { margin: 0; }
@media (max-width: 560px) { .gallery { grid-template-columns: 1fr; } }

.empty { padding: 40px; text-align: center; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-2); }

/* ── 상담 폼 ── */
.bottom-consult { background: var(--sand); border-top: 1px solid var(--line); padding: 72px 0; }
.bottom-consult-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .bottom-consult { padding: 52px 0; } .bottom-consult-inner { grid-template-columns: 1fr; gap: 28px; } }
.consult-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.form-title { font-size: 26px; }
.form-lead { color: var(--ink-2); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 17px; }
.req { font-weight: 500; color: var(--accent); font-size: 15px; }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 18px; color: var(--ink); background: #fff; border: 1.5px solid var(--input); border-radius: var(--radius); padding: 12px 14px; min-height: 52px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 0; }
.field input[aria-invalid='true'] { border-color: var(--err); }
.field-error { color: var(--err); font-size: 16px; margin-top: 4px; }
.field-more { margin: 4px 0 18px; }
.field-more summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: 8px 0; }
.field-more[open] summary { margin-bottom: 12px; }
.field-check { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; margin-bottom: 20px; font-size: 16px; }
.field-check input { width: 24px; height: 24px; margin: 3px 0 0; accent-color: var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-weight: 600; }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--err); }
.form-done { text-align: center; padding: 20px 0; }
.form-done h3 { font-family: var(--serif); font-size: 24px; }

/* ── 푸터 ── */
.site-footer { background: var(--ink); color: #e8dfd0; padding: 52px 0 96px; font-size: 16px; }
.site-footer a { color: #e3c3a2; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand { font-family: var(--serif); font-size: 22px; font-weight: 700; color: #fff; }
.footer-desc { color: #d7ccbb; }
.footer-h { font-weight: 700; color: #fff; margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 4px 0; }
.footer-legal { border-top: 1px solid #4a4038; margin-top: 32px; padding-top: 20px; color: #c8bba8; font-size: 15px; }
.footer-legal p { margin: 0 0 4px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ── 모바일 하단 고정 상담 버튼 ── */
.mobile-cta { display: none; }
@media (max-width: 860px) {
  .mobile-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: rgba(246, 241, 231, .97); border-top: 1px solid var(--line); }
  .mobile-cta.hidden { display: none; }
}
@media (min-width: 861px) { .site-footer { padding-bottom: 52px; } }

@media print { .site-header, .mobile-cta, .bottom-consult, .site-footer { display: none; } body { background: #fff; } }

/* ── 진행 절차(/process): 단계별 역할 구분 ── */
.steps .step-roles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 28px; margin: 14px 0 0; }
.steps .step-roles > div { border-top: 1px solid var(--line); padding-top: 10px; }
.steps .step-roles dt { font-weight: 700; font-size: 16px; color: var(--ink); }
.steps .step-roles dd { margin: 4px 0 0; color: var(--ink-2); }
.steps .step-time { margin-top: 10px; font-size: 16px; color: var(--sage); font-weight: 600; }
@media (max-width: 640px) { .steps .step-roles { grid-template-columns: 1fr; } }

/* ---- task: contact page (/contact) ---- */
.contact-info h2 { font-size: clamp(21px, 2.6vw, 25px); margin: 1.8em 0 .7em; }
.contact-info h2:first-child { margin-top: 0; }
.contact-form { align-self: start; position: sticky; top: 96px; }
@media (max-width: 860px) {
  .contact-form { position: static; order: -1; }
}

/* ── 지역 페이지 (content/regions.mjs): 구·시·군 항목 ── */
.area-entries { margin-top: 36px; border-top: 2px solid var(--ink); }
.area-entry { padding: 28px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 88px; }
.area-entry h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 10px; }
.area-entry p { max-width: 760px; }
.area-entry .area-src { margin-top: 8px; word-break: keep-all; }
.area-entry .area-src a { color: var(--ink-2); }

/* 표지 이미지가 없는 글 목록은 한 칸으로 */
.post-list a:not(:has(img)) { grid-template-columns: 1fr; }

/* 비용 계산기 */
.estimator-result { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.estimator-result .estimate-main { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--accent); margin-bottom: .4em; }
.estimator-result .btn { margin-top: 8px; }

/* 구·시·군 페이지 방문 동 목록 */
.dong-list { list-style: none; padding: 0; margin: 0 0 1.4em; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.dong-list li { padding: 4px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; font-size: 16px; }
