/* 親の家と墓のこと：生成りの紙に墨の文字。落ち着いて読める、やわらかいトーン */
:root {
  --paper: #f6f1e7;      /* 生成り */
  --paper-2: #efe8da;    /* 一段濃い生成り */
  --ink: #2a2723;        /* 墨 */
  --ink-2: #5d574e;      /* 薄墨 */
  --line: #ddd3c1;
  --accent: #3f5b6e;     /* 藍鼠 */
  --accent-2: #8a6a4a;   /* 枯茶（PR表記など） */
  --mincho: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --gothic: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--gothic);
       font-size: 17px; line-height: 1.95; letter-spacing: .02em; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { opacity: .8; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--line); padding: 22px 0 10px; }
.site-name { font-family: var(--mincho); font-size: 24px; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: .08em; }
.site-tagline { margin: 2px 0 10px; font-family: var(--mincho); color: var(--ink-2); font-size: 14px; letter-spacing: .12em; }
.global-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.global-nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 1px solid transparent; }
.global-nav a:hover { border-bottom-color: var(--ink); }

main { padding: 28px 0 56px; }
h1, h2, h3 { font-family: var(--mincho); font-weight: 600; line-height: 1.5; letter-spacing: .04em; }
h1 { font-size: 27px; margin: 8px 0 12px; }
article h2 { font-size: 22px; margin: 48px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
article h3 { font-size: 18.5px; margin: 32px 0 8px; padding-left: 12px; border-left: 3px solid var(--accent); }
p { margin: 0 0 1.1em; }

.breadcrumb { font-size: 13px; color: var(--ink-2); }
.breadcrumb a { color: var(--ink-2); }
.meta { font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.pr-note { font-size: 13px; color: var(--accent-2); background: var(--paper-2); padding: 8px 12px; border-radius: 4px; }
.lead { color: var(--ink-2); }

/* 目次 */
.toc { background: #fbf8f2; border: 1px solid var(--line); border-radius: 6px; padding: 14px 18px; margin: 20px 0 8px; font-size: 15px; }
.toc-title { font-family: var(--mincho); font-weight: 600; margin: 0 0 4px; }
.toc ol { margin: 0; padding-left: 1.4em; }

/* 表 */
table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 15px; background: #fbf8f2; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
th { background: var(--paper-2); font-weight: 600; }
.table-scroll { overflow-x: auto; }

blockquote { margin: 20px 0; padding: 12px 16px; border-left: 3px solid var(--accent-2); background: #fbf8f2; color: var(--ink-2); }
.pr-link::after { content: "【PR】"; font-size: 11px; color: var(--accent-2); margin-left: 2px; }

/* 次に考えること・編集のお知らせ */
.next { margin: 40px 0 0; padding: 18px 20px; background: var(--paper-2); border-radius: 6px; }
.next-title { font-size: 18px; margin: 0 0 6px; }
.next ul { margin: 0; padding-left: 1.2em; }
.editor-box { margin-top: 28px; font-size: 13.5px; color: var(--ink-2); border-top: 1px solid var(--line); padding-top: 14px; }

/* 一覧 */
.post-list { list-style: none; padding: 0; margin: 20px 0; }
.post-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.post-list li > a { font-family: var(--mincho); font-weight: 600; font-size: 18px; text-decoration: none; color: var(--ink); }
.post-list .desc { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); }
.post-list .soon { color: var(--ink-2); }

/* トップ */
.hero { text-align: center; padding: 28px 0 20px; }
.hero-copy { font-family: var(--mincho); font-size: clamp(24px, 7.2vw, 38px); letter-spacing: .14em; margin: 0 0 14px; white-space: nowrap; }
.hero-lead { color: var(--ink-2); text-align: left; max-width: 34em; margin: 0 auto; }
.doors { display: grid; gap: 12px; margin: 24px 0 36px; }
.door { display: block; background: #fbf8f2; border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px; text-decoration: none; color: var(--ink); }
.door:hover { border-color: var(--ink-2); }
.door-q { display: block; font-family: var(--mincho); font-size: 20px; font-weight: 600; }
.door-a { display: block; font-size: 14px; color: var(--ink-2); }
.flow-box, .promise { margin: 32px 0; }
.flow-box h2, .promise h2 { font-size: 21px; border-bottom: 1px solid var(--ink); padding-bottom: 6px; }
.flow { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.flow a { display: flex; align-items: center; gap: 8px; padding: 10px; background: var(--paper-2); border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 15px; }
.step { display: inline-flex; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--paper); font-size: 12px; align-items: center; justify-content: center; flex: none; }
.promise ul { padding-left: 1.2em; }
.back { margin-top: 24px; }

/* フッター */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; color: var(--ink-2); }
.footer-message { font-family: var(--mincho); font-size: 16px; color: var(--ink); letter-spacing: .14em; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 12px; }
.site-footer nav a { color: var(--ink-2); }
.small { font-size: 12px; }

@media (min-width: 640px) {
  .doors { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 23px; }
  .flow { grid-template-columns: repeat(2, 1fr); }
}

/* tools */
.tool{background:#fffdf8;border:1px solid #e3dccd;border-radius:10px;padding:16px;margin:20px 0}
.tool fieldset{border:0;margin:0 0 16px;padding:0}
.tool legend{font-weight:700;margin-bottom:8px}
.tool label{display:block;padding:10px 12px;margin:6px 0;border:1px solid #e3dccd;border-radius:8px;background:#fff;cursor:pointer}
.tool label:has(input:checked){border-color:var(--accent);background:#eef3f6}
.tool input[type=radio]{margin-right:8px}
.tool button{display:block;width:100%;padding:14px;border:0;border-radius:8px;background:var(--accent);color:#fff;font-size:16px;font-weight:700;cursor:pointer}
.tool-result:not(:empty){margin-top:20px;padding-top:12px;border-top:1px dashed #cfc6b4}
.tool-result table{width:100%}
.tool-result .note{font-size:13px;color:#6b655c}
.tool fieldset.missing legend{color:#a33}
.tool fieldset.missing legend::after{content:"（未回答）";font-weight:400}
.tool-result:focus{outline:none}

/* 列の多い表はスマホで横スクロール */
article table{display:block;overflow-x:auto;-webkit-overflow-scrolling:touch;max-width:100%}
article table th,article table td{min-width:6.5em}
article table th:first-child,article table td:first-child{min-width:5em}
.tool-result table{display:table}
