/* ツール箱 共通スタイル ── 和モダンの道具箱 */
:root {
  --bg: #f6f3ec;          /* 生成りの紙色 */
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --text: #1c2430;        /* 墨 */
  --muted: #5b6573;
  --border: #e4ded1;
  --border-strong: #cdc5b4;
  --ai: #23466e;          /* 藍 */
  --ai-hover: #2f5b8c;
  --ai-tint: #e9eef5;
  --ai-tint-2: #dbe4ef;
  --on-ai: #ffffff;
  --shu: #c8553d;         /* 朱（ごく一部のアクセントだけ） */
  --danger: #a8281b;
  --header-bg: rgba(246, 243, 236, .82);
  --footer-bg: #1c2430;
  --footer-text: #c9cfd8;
  --footer-head: #ffffff;
  --footer-mark: #3a6799;
  --shadow-sm: 0 1px 2px rgba(28, 36, 48, .05), 0 1px 3px rgba(28, 36, 48, .05);
  --shadow: 0 1px 2px rgba(28, 36, 48, .04), 0 6px 20px rgba(28, 36, 48, .07);
  --shadow-lift: 0 2px 4px rgba(28, 36, 48, .05), 0 12px 28px rgba(28, 36, 48, .11);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 0 0 0 3px rgba(35, 70, 110, .28);
  --ease: cubic-bezier(.2, .7, .3, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --surface: #1a2029;
    --surface-2: #161b23;
    --text: #e9e6df;
    --muted: #a8b0bb;
    --border: #2b333f;
    --border-strong: #3b4553;
    --ai: #92b6e2;
    --ai-hover: #b0cbec;
    --ai-tint: #1f2a3a;
    --ai-tint-2: #263449;
    --on-ai: #0f1620;
    --shu: #e0806a;
    --danger: #ff9b8c;
    --header-bg: rgba(18, 22, 28, .8);
    --footer-bg: #0b0e12;
    --footer-text: #aeb6c1;
    --footer-head: #e9e6df;
    --footer-mark: #2f5b8c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 14px 32px rgba(0, 0, 0, .4);
    --focus: 0 0 0 3px rgba(146, 182, 226, .35);
  }
}
/* 死亡後の期限・法要ページでは朱を使わない */
.quiet { --shu: var(--muted); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
td, th { overflow-wrap: normal; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ai); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--ai-hover); }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--ai); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { max-width: 800px; margin: 0 auto; padding: 0 16px; }
.wrap.wide { max-width: 1080px; }

/* ───── ヘッダー ───── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.home .site-header .wrap { max-width: 1080px; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: .04em; }
.logo:hover { color: var(--text); }
.logo-mark { flex: none; display: block; }
.logo-mark .m-base { fill: var(--ai); }
.logo-mark .m-line { stroke: var(--on-ai); }
.logo-mark .m-accent { fill: var(--shu); }
@media (prefers-color-scheme: dark) { .logo-mark .m-base { fill: #2f5b8c; } .logo-mark .m-line { stroke: #fff; } }
.nav-link {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  font-size: .9rem; font-weight: 700; color: var(--ai); text-decoration: none;
  border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  transition: background .15s, border-color .15s;
}
.nav-link:hover { background: var(--ai-tint); border-color: var(--ai); color: var(--ai); }

/* ───── 見出し・本文 ───── */
main { padding: 28px 0 56px; }
h1, h2, h3 { letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: 1.75rem; line-height: 1.4; margin: 0 0 10px; }
h2 {
  font-size: 1.3rem; line-height: 1.5; margin: 48px 0 14px;
  padding-left: 14px; border-left: 4px solid var(--ai);
}
h3 { font-size: 1.08rem; margin: 24px 0 6px; }
main p, main li { max-width: 70ch; }
.lead { color: var(--muted); margin: 0 0 24px; font-size: 1.02rem; }
.note { font-size: .875rem; color: var(--muted); }

.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--ai); text-decoration: underline; }

/* ツールページの見出し */
.tool-title { display: flex; align-items: center; gap: 14px; }
.tool-title .ticon { width: 52px; height: 52px; border-radius: 14px; }
.tool-title .ticon svg { width: 28px; height: 28px; }

/* 線画アイコンの地（薄い藍の角丸） */
.ticon {
  flex: none; display: inline-grid; place-items: center;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--ai-tint); color: var(--ai);
}

/* ───── パネル（ツール本体） ───── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 20px 0;
}
.card table th { width: 7em; white-space: nowrap; }

label { display: block; font-weight: 700; font-size: .92rem; margin: 16px 0 6px; }
label.inline { display: inline-flex; align-items: flex-start; gap: 8px; font-weight: 400; font-size: .95rem; margin: 12px 18px 0 0; cursor: pointer; }
input[type="text"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%;
  min-height: 48px;
  font: inherit;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
input[type="date"] { -webkit-appearance: none; appearance: none; }
select { -webkit-appearance: none; appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat; }
input[type="number"] { max-width: 260px; }
textarea { min-height: 220px; resize: vertical; line-height: 1.7; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ai); box-shadow: var(--focus); background: var(--surface); }
input[type="checkbox"], input[type="radio"] { flex: none; width: 18px; height: 18px; margin: .3em 0 0; accent-color: var(--ai); }
.row { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: flex-end; }
.row > div { flex: 1 1 200px; min-width: 0; }
.row input[type="number"] { max-width: none; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px;
  font: inherit; font-weight: 700; font-size: .95rem;
  cursor: pointer;
  border: 1px solid var(--ai);
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  margin-top: 16px;
  background: var(--ai);
  color: var(--on-ai);
  transition: background .15s, border-color .15s, color .15s;
}
button:hover, .btn:hover { background: var(--ai-hover); border-color: var(--ai-hover); }
button.sub { background: var(--surface); color: var(--ai); border-color: var(--border-strong); }
button.sub:hover { background: var(--ai-tint); border-color: var(--ai); color: var(--ai); }

/* タブ：分割ボタン（segmented control） */
.tabs {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px;
  padding: 4px; margin: 0 0 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.tabs button {
  flex: 1 1 auto; margin: 0; min-height: 42px; padding: 6px 12px;
  background: transparent; color: var(--muted); border: 1px solid transparent;
  border-radius: 9px; font-weight: 700; font-size: .92rem; line-height: 1.4;
}
.tabs button:hover { background: var(--ai-tint); color: var(--ai); border-color: transparent; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ai); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
@media (prefers-color-scheme: dark) { .tabs button[aria-selected="true"] { background: var(--ai-tint-2); border-color: var(--ai-tint-2); } }
.panel[hidden] { display: none; }

/* ───── 結果 ───── */
.result {
  position: relative;
  background: var(--ai-tint);
  border: 1px solid var(--ai-tint-2);
  border-radius: 12px;
  padding: 18px 20px;
  margin-top: 20px;
}
.result::before {
  content: "計算結果";
  display: block; margin-bottom: 4px;
  font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: var(--ai);
}
.result:empty { display: none; }
.result > div + div { margin-top: 4px; }
.big {
  font-size: clamp(1.6rem, 6.4vw, 2.4rem);
  font-weight: 700; line-height: 1.3; letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin-bottom: 6px;
}
.result .note { margin-top: 8px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-top: 20px; }
.stat { background: var(--ai-tint); border: 1px solid var(--ai-tint-2); border-radius: 12px; padding: 12px 14px; }
.stat:first-child { background: var(--ai); border-color: var(--ai); }
.stat:first-child .k, .stat:first-child .v { color: var(--on-ai); }
.stat .k { font-size: .8rem; color: var(--muted); display: block; font-weight: 700; }
.stat .v { display: block; font-size: 1.7rem; font-weight: 700; line-height: 1.35; font-variant-numeric: tabular-nums; }
@media (prefers-color-scheme: dark) { .stat:first-child { background: #2f5b8c; border-color: #2f5b8c; } .stat:first-child .k, .stat:first-child .v { color: #fff; } }

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { border-bottom: 1px solid var(--border); padding: 9px 10px; text-align: left; vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; font-size: .88rem; color: var(--muted); }
.table-scroll { overflow: auto; max-height: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); }
.table-scroll thead th { position: sticky; top: 0; z-index: 1; }
.table-scroll tbody tr:hover td { background: var(--ai-tint); }

/* ───── 広告枠（控えめ。ボタンに見せない通常のテキストリンク） ───── */
.pr-slot:empty { display: none; }
.pr-slot {
  position: relative;
  margin: 28px 0;
  padding: 12px 16px 12px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font-size: 1rem;
}
.pr-slot::before {
  content: "【PR】楽天市場の商品紹介（外部サイトへ移動します）";
  display: block; margin-bottom: 4px;
  font-size: .9rem; font-weight: 700; color: var(--muted); line-height: 1.5;
}
.pr-slot ul { margin: 0; padding-left: 1.2em; }
.pr-slot li { margin: 2px 0; }
.pr-slot a { display: inline; background: none; border: 0; padding: 0; font-weight: 400; text-decoration: underline; }

/* ページ上部のプロモーション表記（本文と同じ文字サイズ。小さくしない） */
.pr-notice { display: none; margin: 0 0 14px; padding: 8px 14px; font-size: 1rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: 8px; }
.pr-notice.is-on { display: block; }
body:has(.pr-slot:not(:empty)) .pr-notice { display: block; }

/* ───── トップページ ───── */
.hero {
  position: relative; overflow: hidden;
  margin: 8px 0 8px;
  padding: 48px 48px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}
.hero::after { /* 升を上から見たような同心の四角（控えめな飾り） */
  content: ""; position: absolute; right: 72px; top: 50%; width: 150px; height: 150px; margin-top: -75px;
  border: 22px solid var(--ai-tint); border-radius: 18px;
  outline: 2px solid var(--ai-tint-2); outline-offset: 16px; pointer-events: none;
}
.hero::before {
  content: ""; position: absolute; right: 138px; top: 50%; width: 18px; height: 18px; margin-top: -9px;
  background: var(--shu); border-radius: 4px; pointer-events: none;
}
.hero { padding-right: 300px; }
.hero > * { position: relative; z-index: 1; }
.hero-kicker { font-size: .95rem; color: var(--ai); letter-spacing: .06em; margin: 0 0 10px; }
.hero-catch { font-size: clamp(1.75rem, 5vw, 2.5rem); line-height: 1.35; font-weight: 700; letter-spacing: -.02em; margin: 0 0 16px; max-width: none; }
.hero .lead { max-width: 40em; margin-bottom: 20px; }
.ib { display: inline-block; }
.badges { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 10px; font-size: .88rem; font-weight: 700; color: var(--ai); background: var(--ai-tint); border-radius: 999px; }
.search { position: relative; max-width: 560px; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input[type="search"] { min-height: 54px; padding-left: 48px; border-radius: 12px; font-size: 1rem; background: var(--surface-2); }
.sec-title { margin-top: 44px; }
.search-status { margin: -4px 0 0; color: var(--muted); font-size: .95rem; min-height: 0; }
.search-status:empty { display: none; }
.cat { margin-top: 28px; }
.cat[hidden] { display: none; }
.cat-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 12px; }
.cat-head h3 { margin: 0; font-size: 1.1rem; display: inline-flex; align-items: center; gap: 8px; }
.cat-head h3::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--ai); transform: rotate(45deg); }
.cat-head p { margin: 0; font-size: .88rem; color: var(--muted); }

/* カテゴリの目次（チップ）・人気のツール・件数（build-site.js が生成） */
.cat-chips { margin: 20px 0 0; }
.cat-chips[hidden], .featured[hidden] { display: none; }
.cat-chips-head { margin: 0 0 8px; font-size: .88rem; font-weight: 700; color: var(--muted); }
.cat-chips ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chips li { max-width: none; }
.cat-chips a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 8px 0 14px;
  font-size: .9rem; font-weight: 700; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 999px;
  transition: background .15s, border-color .15s, color .15s;
}
.cat-chips a:hover { background: var(--ai-tint); border-color: var(--ai); color: var(--ai); }
.chip-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; font-size: .78rem; color: var(--ai); background: var(--ai-tint); border-radius: 999px; }
.featured .tool-grid { margin-top: 14px; }
.sec-count { margin-left: 10px; font-size: .9rem; font-weight: 700; color: var(--muted); }
.nf-cats-head { margin: 28px 0 8px; font-weight: 700; }
.nf-cats { list-style: none; padding: 0; margin: 0 0 20px; display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ツールカード */
.tool-grid, .tool-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-grid > li, .tool-list > li { max-width: none; }
.tool-grid > li[hidden] { display: none; }
.tool-card {
  display: flex; align-items: center; gap: 14px; height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 18px 16px 18px 18px;
  color: var(--text); text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
}
.tool-card:hover { color: var(--text); transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--border-strong); }
.tool-card:hover .tc-arrow { color: var(--ai); transform: translateX(3px); }
.tc-body { flex: 1; min-width: 0; }
.tc-body strong { display: block; font-size: 1.05rem; line-height: 1.5; letter-spacing: -.01em; }
.tc-body span { display: block; margin-top: 2px; font-size: .86rem; line-height: 1.6; color: var(--muted); }
.tc-arrow { flex: none; color: var(--border-strong); transition: transform .2s var(--ease), color .2s; }

/* 関連ツール（小さめ） */
.tool-list.related { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.related .tool-card { padding: 12px 12px 12px 14px; gap: 12px; }
.related .ticon { width: 38px; height: 38px; border-radius: 10px; }
.related .ticon svg { width: 20px; height: 20px; }
.related .tc-body strong { font-size: .97rem; }
.related .tc-body span { font-size: .8rem; }

/* ───── FAQ（アコーディオン） ───── */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-sm); }
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 48px 14px 16px;
  font-weight: 700; cursor: pointer; list-style: none; position: relative; border-radius: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 22px; width: 8px; height: 8px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 26px; }
.faq summary:hover .faq-qt { color: var(--ai); }
.faq-q, .faq-al { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; font-size: .85rem; font-weight: 700; line-height: 1; margin-top: 1px; }
.faq-q { background: var(--ai); color: var(--on-ai); }
.faq-al { background: var(--ai-tint); color: var(--ai); }
.faq-a { display: flex; gap: 12px; padding: 0 16px 16px; }
.faq-a p { margin: 0; }

/* ───── フッター ───── */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 44px 0 28px; font-size: .88rem; }
.home .site-footer .wrap { max-width: 1080px; }
.site-footer a { color: var(--footer-text); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer :focus-visible { outline-color: #fff; }
.f-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.f-brand .logo { color: var(--footer-head); }
.f-brand .logo-mark .m-base { fill: var(--footer-mark); }
.f-brand .logo-mark .m-line { stroke: #fff; }
.f-brand p { margin: 12px 0 0; line-height: 1.8; }
.f-tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.f-head { margin: 0 0 8px; color: var(--footer-head); font-weight: 700; font-size: .85rem; letter-spacing: .06em; }
.f-col ul { list-style: none; padding: 0; margin: 0; }
.f-col li { margin: 0 0 6px; line-height: 1.6; }
.f-cats { display: block; }
.f-cats ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 20px; }
.f-cats li { line-height: 1.6; }
.f-bottom { padding-top: 20px; }
.f-links { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.f-bottom p { margin: 4px 0; }

/* ───── 期限一覧・法要日程（ライフイベント系ツール） ───── */
.notice-box { background: var(--surface-2); border: 1px solid var(--border); border-left: 4px solid var(--border-strong); border-radius: 10px; padding: 14px 18px; margin: 16px 0; font-size: .95rem; }
.notice-box p { margin: 4px 0; }
.kigen-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; counter-reset: k; }
.kigen-list > li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: baseline;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--ai);
  border-radius: 10px; padding: 14px 16px; max-width: none;
}
.kigen-list > li > * { grid-column: 1 / -1; }
.kigen-list > li > .kname { grid-column: 1; }
.kigen-list > li > .kdate { grid-column: 2; text-align: right; }
.kigen-list .kname { font-weight: 700; font-size: 1.05rem; }
.kigen-list .kdate { font-size: 1.25rem; font-weight: 700; line-height: 1.4; font-variant-numeric: tabular-nums; }
.kigen-list .krule, .kigen-list .knote { font-size: .9rem; margin: 4px 0 0; max-width: none; }
.kigen-list .krule { padding-top: 8px; margin-top: 8px; border-top: 1px dashed var(--border); }
.kigen-list .knote { color: var(--muted); }
.kigen-list .note { margin: 2px 0 0; text-align: right; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; border: 1px solid var(--border-strong); border-radius: 999px; padding: 0 8px; margin-left: 8px; color: var(--muted); vertical-align: 2px; line-height: 1.7; }
.past { color: var(--danger); font-weight: 700; }
.kigen-list .past { text-align: right; }
.table-wide { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.table-wide table { font-size: .95rem; }
.table-wide tbody tr:last-child td { border-bottom: 0; }
.table-wide tbody tr:nth-child(even) td { background: var(--surface-2); }
.table-wide .nw { white-space: nowrap; }
.table-wide td { vertical-align: top; }
.table-wide td strong { font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .tool-card:hover, .tool-card:hover .tc-arrow { transform: none; }
}

@media print {
  .site-header, .site-footer, .pr-slot, .pr-notice, .tool-list, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .result { border: 0; background: #fff; padding: 0; box-shadow: none; }
  .result::before { display: none; }
  .kigen-list > li { border: 1px solid #999; break-inside: avoid; }
}

/* タブレット */
@media (max-width: 900px) {
  .tool-grid, .tool-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-top { grid-template-columns: 1fr; gap: 24px; }
  .hero { padding-right: 32px; }
  .hero::after, .hero::before { display: none; }
}
/* スマホ */
@media (max-width: 600px) {
  main { padding: 20px 0 44px; }
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.18rem; margin-top: 40px; }
  .tool-title { gap: 12px; }
  .tool-title .ticon { width: 44px; height: 44px; border-radius: 12px; }
  .tool-title .ticon svg { width: 24px; height: 24px; }
  .card { padding: 18px 16px; border-radius: 12px; }
  .hero { padding: 28px 20px 24px; border-radius: 16px; }
  .hero::after, .hero::before { display: none; }
  .hero-catch { font-size: 1.6rem; }
  .tool-grid, .tool-list, .tool-list.related { grid-template-columns: 1fr; }
  .f-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-cats ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  input[type="number"] { max-width: none; }
  .tabs button { font-size: .85rem; padding: 6px 4px; letter-spacing: -.02em; }
  .tabs:has(> :nth-child(4)) { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result .kigen-list > li { padding: 12px; }
  .result:has(.kigen-list), .result:has(.table-wide) { padding: 14px 10px; }
  .result { padding: 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .v { font-size: 1.4rem; }
  /* 期限一覧：スマホではカード状に縦積み */
  .kigen-list > li { grid-template-columns: 1fr; }
  .kigen-list > li > .kname, .kigen-list > li > .kdate { grid-column: 1; text-align: left; }
  .kigen-list .note, .kigen-list .past { text-align: left; }
  /* 法要の表：行ごとのカードにする */
  .table-wide.hoyo-cards { border: 0; background: transparent; overflow: visible; }
  .table-wide.hoyo-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wide.hoyo-cards table, .table-wide.hoyo-cards tbody { display: block; }
  .table-wide.hoyo-cards tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
  .table-wide.hoyo-cards tbody tr:nth-child(even) td { background: transparent; }
  .table-wide.hoyo-cards td { display: block; border: 0; padding: 0; background: transparent; }
  .table-wide.hoyo-cards td:first-child { grid-column: 1 / -1; font-weight: 700; padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px dashed var(--border); }
  .table-wide.hoyo-cards td:nth-child(3)::before { content: "直前の土日（候補）"; display: block; font-size: .75rem; color: var(--muted); font-weight: 700; }
  .table-wide.hoyo-cards td:nth-child(2)::before { content: "日付"; display: block; font-size: .75rem; color: var(--muted); font-weight: 700; }
  .table-wide.hoyo-cards .nw { white-space: normal; }
  .card table th { width: auto; }
}
