/* 相続のしおり */
:root {
  --paper: #F8F7F3; --paper-2: #EFEDE6; --surface: #FFFFFF; --ink: #1E2A2F; --body: #3B474C; --sub: #5F6C71; --muted: #8A9599;
  --line: #E2DFD6; --line-2: #D3CFC3;
  --accent: #5B4F7E; --accent-2: #463C66; --accent-soft: #ECE8F3; --tassel: #B7863B; --tassel-soft: #F6EEDF;
  --warn: #93461C; --warn-bg: #FFF4E8; --warn-line: #EBC9A5;
  --serif: 'BIZ UDPMincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --sans: system-ui, -apple-system, 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic UI', 'Meiryo', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.85; }
a { color: var(--accent); }
a:hover { color: var(--accent-2); }
button, select, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.container { max-width: 700px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; top: 8px; }
.note { font-size: 12.5px; color: var(--sub); }
.small { font-size: 13px; color: var(--sub); }
[hidden] { display: none !important; }

/* ヘッダー */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 8px; }
.logo { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.logo-name { font-family: var(--serif); font-weight: 700; font-size: 21px; letter-spacing: .08em; }
.ad-flag { flex-shrink: 0; font-size: 12px; line-height: 1.5; color: var(--sub); text-decoration: none; border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 9px; white-space: nowrap; }
.ad-flag:hover { color: var(--ink); border-color: var(--sub); }
.nav-inner { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav-inner::-webkit-scrollbar { display: none; }
.nav a { flex-shrink: 0; padding: 8px 10px 9px; font-size: 14px; color: var(--body); text-decoration: none; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }
@media (max-width: 360px) { .logo-name { font-size: 18px; } }

/* 見出し */
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; color: var(--accent); }
.sec { padding-top: 36px; }
.sec-title { font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1.5; margin: 2px 0 14px; }
.sec-lead { color: var(--body); margin: -6px 0 16px; font-size: 15px; }
.crumb { font-size: 12.5px; color: var(--sub); display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 8px; }
.crumb a { color: var(--sub); }
.page-head { padding-top: 4px; }
.page-title { font-family: var(--serif); font-weight: 700; font-size: 26px; line-height: 1.5; margin: 4px 0 10px; }
.page-title small { display: block; font-size: 16px; color: var(--sub); margin-top: 4px; }
.lead { color: var(--body); font-size: 15.5px; margin: 0 0 14px; }
.updated { display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--accent-2); background: var(--accent-soft); border-radius: 999px; padding: 2px 12px; margin: 0 0 18px; }
.cta { margin-top: 18px; }

/* ヒーロー */
.hero { padding-top: 28px; }
.hero-title { font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1.55; margin: 6px 0 12px; letter-spacing: .02em; }
.hero-lead { color: var(--body); font-size: 15px; margin: 0; }

/* カード・ツール一覧 */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool-card { display: grid; gap: 2px; align-content: start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.tool-card:hover { border-color: var(--accent); color: var(--ink); }
.tool-card .ico { color: var(--accent); margin-bottom: 4px; }
.tool-name { font-weight: 700; font-size: 15.5px; line-height: 1.5; }
.tool-desc { font-size: 12.5px; color: var(--sub); line-height: 1.6; }
.tool-grid .tool-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.list li + li { border-top: 1px solid var(--line); }
.list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 16px; text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 700; }
.list a::after { content: '›'; color: var(--muted); font-size: 20px; line-height: 1; font-weight: 400; }
.list small { display: block; color: var(--sub); font-size: 12.5px; font-weight: 400; }

/* 流れ（トップ） */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 8px; }
.steps li { counter-increment: s; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 12px 52px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.steps b { display: block; font-size: 15.5px; }
.steps span { display: block; font-size: 14px; color: var(--body); line-height: 1.7; }
.steps a { margin-left: 4px; }

/* フォーム */
.calc { display: grid; gap: 16px; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend, .field > .label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; padding: 0; }
.hint { font-size: 12.5px; color: var(--sub); margin: 6px 0 0; line-height: 1.7; }
.input-unit { display: flex; align-items: center; gap: 8px; }
.input-unit input { flex: 1; min-width: 0; }
.input-unit span { font-size: 14px; color: var(--sub); flex-shrink: 0; }
.input-unit.short { max-width: 200px; }
input[type="text"], input.date, select { width: 100%; height: 48px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); font-size: 16px; }
input.date { max-width: 240px; }
select { appearance: auto; }
.ym { display: flex; gap: 8px; flex-wrap: wrap; }
.ym select { width: auto; min-width: 110px; }
.ym .input-unit { flex: 1; min-width: 130px; }
.invalid { border-color: var(--warn) !important; box-shadow: 0 0 0 2px var(--warn-bg); }
.choices { display: grid; gap: 8px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); margin: 0; accent-color: var(--accent); width: 18px; height: 18px; }
.choice span { display: block; padding: 11px 14px 11px 42px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); font-size: 14.5px; line-height: 1.6; cursor: pointer; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14.5px; line-height: 1.6; cursor: pointer; }
.check input { margin: 4px 0 0; width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 18px; border: 0; border-radius: 12px; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; text-align: center; }
.btn-main { background: var(--accent); color: #fff; }
.btn-main:hover { background: var(--accent-2); color: #fff; }
.btn-line { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.btn-line:hover { border-color: var(--accent); color: var(--ink); }
.form-note { font-size: 12.5px; color: var(--sub); margin: -8px 0 0; text-align: center; }
.form-error { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--warn); }

/* 計算結果 */
.result { margin-top: 14px; background: var(--surface); border: 2px solid var(--accent); border-radius: 16px; padding: 18px; outline: none; }
.res-head { display: grid; gap: 2px; text-align: center; padding-bottom: 14px; border-bottom: 1px dashed var(--line-2); margin-bottom: 12px; }
.res-label { font-size: 13.5px; font-weight: 700; color: var(--accent-2); }
.res-big { font-size: 34px; line-height: 1.3; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.res-big small { font-size: 17px; margin-left: 2px; }
.res-sub { font-size: 13.5px; color: var(--sub); }
.res-rows { margin: 0; display: grid; }
.res-rows > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.res-rows > div:last-child { border-bottom: 0; }
.res-rows dt { font-size: 14px; color: var(--body); }
.res-rows dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.res-rows dd small { display: block; font-size: 11.5px; color: var(--sub); font-weight: 400; }
.res-flow { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 4px; padding: 0; font-size: 13px; }
.res-flow li { background: var(--accent-soft); color: var(--accent-2); border-radius: 999px; padding: 3px 10px; font-weight: 700; }
.res-flow li + li::before { content: '→ '; color: var(--muted); }
.res-note { font-size: 13.5px; color: var(--body); margin: 12px 0 0; line-height: 1.75; }
.res-note.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn); border-radius: 10px; padding: 10px 12px; }
.res-h { font-size: 15px; margin: 16px 0 6px; }
.res-timeline { list-style: none; margin: 4px 0 0; padding: 0 0 0 18px; border-left: 2px solid var(--line-2); display: grid; gap: 12px; }
.res-timeline li { position: relative; }
.res-timeline li::before { content: ''; position: absolute; left: -25px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); }
.res-timeline li.key::before { background: var(--accent); border-color: var(--accent); }
.res-timeline .d { display: block; font-size: 13px; font-weight: 700; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.res-timeline b { display: block; font-size: 15.5px; }
.res-timeline small { display: block; font-size: 13px; color: var(--sub); line-height: 1.65; }
.res-timeline em { font-style: normal; margin-left: 6px; font-size: 12px; background: var(--tassel-soft); color: #7A5A22; border-radius: 999px; padding: 1px 8px; }
.res-timeline em.past { background: var(--warn-bg); color: var(--warn); }
.res-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.res-check b { display: block; }
.res-check small { display: block; font-size: 13.5px; color: var(--body); }
.res-more { margin-top: 14px; font-size: 14px; }
.res-more summary { cursor: pointer; font-weight: 700; color: var(--accent-2); }
.daylist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; font-variant-numeric: tabular-nums; }
.daylist small { color: var(--tassel); }

/* 目次・本文 */
.toc { margin-top: 28px; }
.toc b { font-size: 13px; color: var(--sub); }
.toc ol { margin: 4px 0 0; padding: 12px 16px 12px 34px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; font-size: 14.5px; }
.prose h2 { font-family: var(--serif); font-size: 21px; margin: 0 0 12px; line-height: 1.5; }
.prose h3 { font-size: 16px; margin: 18px 0 8px; }
.prose p { color: var(--body); margin: 0 0 12px; }
.prose ul, .prose ol { color: var(--body); padding-left: 1.3em; margin: 0 0 12px; }
.prose li { margin: 4px 0; }
.formula { list-style: none; padding: 14px 16px !important; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; counter-reset: f; }
.formula li { counter-increment: f; }
.formula li::before { content: counter(f) '. '; color: var(--accent); font-weight: 700; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 20px; border-left: 2px solid var(--accent-soft); display: grid; gap: 14px; }
.timeline li { position: relative; }
.timeline li::before { content: ''; position: absolute; left: -27px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.timeline b { display: block; font-size: 15.5px; color: var(--ink); }
.timeline span { display: block; font-size: 14.5px; color: var(--body); line-height: 1.75; }
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 0 0 10px; }
.quote b { font-size: 12.5px; color: var(--accent-2); }
.quote p { margin: 2px 0 0; color: var(--ink); }
.checklist { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 6px; }
.checklist li { position: relative; padding-left: 26px; }
.checklist li::before { content: ''; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border: 1.5px solid var(--accent); border-radius: 4px; background: var(--surface); }
.checklist small { display: block; font-size: 12.5px; color: var(--sub); }
.card-list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px !important; }
.two-lists { display: grid; gap: 14px; }
@media (min-width: 640px) { .two-lists { grid-template-columns: 1fr 1fr; } }
.two-lists h3 { margin-top: 0; }
.plain { padding-left: 1.2em; color: var(--body); }

/* 表 */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table-wrap th, .table-wrap td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.6; }
.table-wrap tr:last-child th, .table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap thead th { background: var(--paper-2); font-weight: 700; font-size: 13px; }
.table-wrap tbody th { font-weight: 700; min-width: 6em; }
table.num tbody th, table.days tbody th { white-space: nowrap; }
.table-wrap small { display: block; font-size: 11px; color: var(--sub); font-weight: 400; }
table.num td, table.days td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.num thead th, table.days thead th { text-align: right; }
table.num thead th:first-child, table.days thead th:first-child { text-align: left; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.faq details + details { margin-top: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq p { margin: 8px 0 0; color: var(--body); font-size: 15px; }

/* 広告（PR） */
.pr { background: var(--surface); border: 1px solid var(--tassel); border-radius: 16px; padding: 18px; }
.pr + .pr { margin-top: 14px; }
.pr.soft { border-color: var(--line); background: linear-gradient(160deg, var(--surface) 0%, var(--accent-soft) 160%); }
.pr-tag { display: inline-block; font-size: 11px; font-weight: 700; color: var(--sub); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 6px; background: #fff; }
.pr-title { font-family: var(--serif); font-weight: 700; font-size: 18.5px; line-height: 1.55; margin: 8px 0 6px; }
.pr.soft .pr-title { margin-top: 0; }
.pr p { margin: 0 0 12px; font-size: 14.5px; color: var(--body); }
.svc { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.svc li { display: grid; gap: 6px; background: var(--tassel-soft); border-radius: 12px; padding: 12px 14px; }
.svc-label { font-size: 12px; font-weight: 700; color: var(--sub); }
.a8 { font-weight: 700; font-size: 15px; line-height: 1.6; }
.pr-guide { font-size: 12.5px; color: var(--sub); }

/* 運営者情報など */
.legal dl { display: grid; grid-template-columns: 7em 1fr; gap: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin: 0 0 24px; }
.legal dt { font-weight: 700; } .legal dd { margin: 0; overflow-wrap: anywhere; }
.legal h2 { font-size: 19px; margin-top: 26px; }
.legal ul { padding-left: 1.3em; color: var(--body); }

/* フッター */
.site-footer { margin-top: 56px; padding: 30px 0 40px; border-top: 1px solid var(--line); background: var(--paper-2); text-align: center; }
.footer-logo { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: .08em; }
.footer-tag { font-size: 12.5px; color: var(--sub); }
.footer-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0 0; font-size: 13.5px; }
.footer-nav a { color: var(--body); }
.footer-nav.sub { margin-top: 14px; font-size: 12.5px; }
.footer-nav.sub a { color: var(--sub); }
.site-footer .note { max-width: 34em; margin: 10px auto 0; }

@media (min-width: 720px) {
  .hero-title { font-size: 36px; }
  .page-title { font-size: 29px; }
  /* 5つのツールを 3つ＋2つ で空きなく並べる */
  .tool-grid { grid-template-columns: repeat(6, 1fr); }
  .tool-grid .tool-card { grid-column: span 2; }
  .tool-grid .tool-card:nth-child(n+4), .tool-grid .tool-card:last-child:nth-child(odd) { grid-column: span 3; }
  .card, .result { padding: 22px 24px; }
}

/* 相続のしおり：追加 */
.choices.row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.checks.col { flex-direction: column; gap: 10px; }
.field.dim { opacity: .45; }
.res-timeline .rk { font-style: normal; font-weight: 700; margin-left: 8px; font-size: 12px; color: var(--sub); background: var(--paper-2); border-radius: 4px; padding: 0 6px; }

/* 姉妹サイト（しおりシリーズ） */
.sister { display: flex; gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); transition: border-color .15s; }
.sister:hover { border-color: var(--accent); color: var(--ink); }
.sister-swatch { width: 52px; height: 52px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--paper); border: 1px solid var(--line); }
.sister-label { display: block; font-size: 11px; font-weight: 700; color: var(--accent); }
.sister-title { display: block; font-family: var(--serif); font-size: 16px; font-weight: 700; }
.sister-desc { display: block; font-size: 12.5px; line-height: 1.6; color: var(--sub); }
