/* 事務カルク 共通スタイル */
:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #f0eee8;
  --text: #1f2328;
  --muted: #5b616b;
  --line: #e2dfd6;
  --accent: #1d6b57;
  --accent-ink: #ffffff;
  --accent-soft: #e3f1ec;
  --warn: #9a5b00;
  --warn-soft: #fff4e0;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  --num: ui-monospace, "SFMono-Regular", "Roboto Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a; --surface: #1d2024; --surface-2: #24282d; --text: #e8e6e1; --muted: #a3a8b0;
    --line: #33383f; --accent: #5cc4a6; --accent-ink: #0d1f1a; --accent-soft: #1e3530;
    --warn: #f0b860; --warn-soft: #3a2d17;
    --shadow: none;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.75; font-size: 16px; }
a { color: var(--accent); }
a:hover { text-decoration: none; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }

/* header / footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-size: .9rem; }
.site-nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: .9rem; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }
.site-footer { margin-top: 64px; padding: 32px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.site-footer nav { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.site-footer a { color: var(--muted); }

/* page heading */
.breadcrumb { font-size: .8rem; color: var(--muted); margin: 20px 0 0; }
.breadcrumb a { color: var(--muted); }
h1 { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.35; margin: 12px 0 8px; letter-spacing: .01em; }
.lead { color: var(--muted); margin: 0 0 24px; }
h2 { font-size: 1.3rem; margin: 48px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
h3 { font-size: 1.05rem; margin: 28px 0 8px; }

/* calculator card */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.tabs { display: flex; gap: 6px; margin: 0 0 16px; background: var(--surface-2); padding: 4px; border-radius: 10px; }
.tabs button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 10px 8px; border-radius: 8px; font: inherit; font-size: .92rem; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow); }
.field { margin: 0 0 16px; }
.field > label, .field > .label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.hint { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; margin-top: 4px; }
.input-yen { position: relative; }
.input-yen input { padding-right: 2.6em; }
.input-yen::after { content: "円"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-pct { position: relative; }
.input-pct input { padding-right: 2.2em; }
.input-pct::after { content: "%"; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
input[type="text"], input[type="number"], select {
  width: 100%; font: inherit; font-size: 1.15rem; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); font-family: var(--num); -moz-appearance: textfield;
}
select { font-family: var(--font); font-size: 1rem; }
input:focus, select:focus, button:focus-visible { outline: 3px solid var(--accent-soft); border-color: var(--accent); outline-offset: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9rem; cursor: pointer; background: var(--bg); }
.choices input { accent-color: var(--accent); }
.choices label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .grid-2 { grid-template-columns: 1fr; } }

/* result */
.result { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 16px; }
.result-main { background: var(--accent-soft); border-radius: 10px; padding: 14px 16px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.result-main .k { font-weight: 700; }
.result-main .v { font-family: var(--num); font-size: clamp(1.6rem, 6vw, 2.1rem); font-weight: 700; color: var(--accent); }
.result-table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .95rem; }
.result-table th, .result-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: left; }
.result-table td.num, .result-table th.num { text-align: right; font-family: var(--num); white-space: nowrap; }
.result-table tr.total td { font-weight: 700; }
.note { font-size: .82rem; color: var(--muted); margin: 10px 0 0; }
.alert { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: 10px 14px; font-size: .88rem; margin-top: 12px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn { font: inherit; font-size: .9rem; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* invoice lines */
.lines { width: 100%; border-collapse: collapse; }
.lines td { padding: 4px 4px 4px 0; vertical-align: middle; }
.lines td:first-child { width: 60%; }
.lines select { font-size: .95rem; padding: 12px 8px; }
.lines .del { border: 0; background: transparent; color: var(--muted); font-size: 1.3rem; cursor: pointer; padding: 4px 8px; }

/* article */
.article p, .article li { color: var(--text); }
.article ul, .article ol { padding-left: 1.4em; }
.formula { background: var(--surface-2); border-radius: 10px; padding: 12px 16px; font-family: var(--num); font-size: .92rem; overflow-x: auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { font-weight: 700; cursor: pointer; }
.faq details p { margin: 8px 0 0; }
.sources { font-size: .85rem; color: var(--muted); }
.disclaimer { font-size: .82rem; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 12px 16px; margin-top: 32px; }

/* related / tool cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); transition: border-color .15s; }
.card:hover { border-color: var(--accent); }
.card .t { font-weight: 700; margin: 0 0 4px; color: var(--accent); }
.card .d { font-size: .88rem; color: var(--muted); margin: 0; }

/* home hero */
.hero { padding: 40px 0 8px; }
.hero h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; padding: 0; list-style: none; }
.badges li { font-size: .8rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--muted); }

/* 収益枠(将来のアフィリエイト・有料版の案内用) */
.promo { border: 1px solid var(--line); border-left: 4px solid var(--accent); background: var(--surface); border-radius: 10px; padding: 14px 16px; margin-top: 24px; font-size: .92rem; }
.promo .pr { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; margin-right: 6px; }

@media print {
  .site-header, .site-footer, .tabs, .btn-row, .promo, .faq, .cards { display: none !important; }
  body { background: #fff; }
}

/* スマホではナビを横スクロールに */
@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: nowrap; flex-direction: column; align-items: flex-start; gap: 0; padding-top: 10px; }
  .site-nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding: 6px 0 10px; gap: 16px; white-space: nowrap; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
}

/* スマホ用 結果バー */
.resultbar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); border-radius: 12px; padding: 12px 16px; font: inherit;
  box-shadow: 0 6px 24px rgba(0,0,0,.2); transform: translateY(160%); transition: transform .2s ease; }
.resultbar.show { transform: none; }
.resultbar .k { font-size: .85rem; font-weight: 700; text-align: left; }
.resultbar .v { font-family: var(--num); font-size: 1.35rem; font-weight: 700; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .resultbar { transition: none; } }
@media print { .resultbar { display: none !important; } }

/* スマホではヒーロー見出しの強制改行を外す */
@media (max-width: 560px) { .hero h1 br { display: none; } }

/* 日付・年月の入力欄 */
input[type="date"], input[type="month"] {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); color: var(--text); min-height: 50px;
}
details.field > summary { list-style-position: inside; padding: 4px 0; }

/* 家事按分の明細 */
.anbun-lines td:first-child { width: 34%; }
.anbun-lines td:nth-child(3) { width: 22%; }
@media (max-width: 560px) {
  .anbun-lines thead { display: none; }
  .anbun-lines tr { display: grid; grid-template-columns: 1fr 34% auto; gap: 6px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
  .anbun-lines td { padding: 0; width: auto !important; }
  .anbun-lines td:first-child { grid-column: 1 / -1; }
}
/* 結果表が狭い画面ではみ出す場合は横スクロール */
.result { overflow-x: auto; }

/* 列の多い結果表(スマホ) */
.result-table.wide td, .result-table.wide th { white-space: nowrap; }
@media (max-width: 560px) {
  .result-table.wide { font-size: .78rem; }
  .result-table.wide td, .result-table.wide th { padding: 7px 3px; }
}

/* 入力エラー */
.field-error { display: block; color: #b42318; font-size: .82rem; margin-top: 4px; }
.field-error:empty { display: none; }
input[aria-invalid="true"] { border-color: #b42318; }
@media (prefers-color-scheme: dark) { .field-error { color: #ff8a80; } input[aria-invalid="true"] { border-color: #ff8a80; } }

/* 明細の削除ボタン(タップしやすく44px以上) */
.lines .del { min-width: 44px; min-height: 44px; border-radius: 8px; }
.lines .del:hover { background: var(--surface-2); color: var(--text); }
/* 家事按分:スマホでは各欄の上に欄名を出す */
.mini-label { display: none; }
.anbun-lines thead th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 400; padding-bottom: 4px; }
.anbun-lines .nm { font-family: var(--font); font-size: 1rem; }
@media (max-width: 560px) {
  .mini-label { display: block; font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
  .anbun-lines tr { grid-template-columns: 1fr 34% 44px; align-items: end; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#r-rows .btn.use { padding: 8px 10px; font-size: .82rem; min-height: 40px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* 広告表示 */
.ad-notice { font-size: .75rem; color: var(--muted); margin: 10px 0 0; }
.promo { margin: 20px 0 8px; }
.promo p { margin: 6px 0; }
.promo .promo-head { display: flex; align-items: center; gap: 6px; margin-top: 0; }
.promo .pr { flex: none; }
.promo-link { display: inline-block; font-weight: 700; padding: 10px 14px; border: 1px solid var(--accent); border-radius: 8px; text-decoration: none; }
.promo-link:hover { background: var(--accent-soft); }
.promo img { position: absolute; }

/* 広告枠(サイト本体の部品と見分けがつくデザイン) */
.promo { border: 1px dashed var(--muted); border-left: 1px dashed var(--muted); background: var(--surface-2); border-radius: 10px; padding: 0 16px 14px; overflow: hidden; }
.promo .promo-label { margin: 0 -16px 10px; padding: 6px 16px; background: var(--line); color: var(--text); font-size: .9rem; font-weight: 700; letter-spacing: .05em; }
.promo .promo-title { font-weight: 700; margin: 0 0 4px; }
.promo-items { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 10px; }
.promo-items li { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.promo-items .promo-name { font-weight: 700; margin: 0 0 2px; }
.promo-items .promo-desc { font-size: .88rem; color: var(--muted); margin: 0 0 8px; }
.promo-link { display: block; text-align: center; font-weight: 700; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 8px; text-decoration: none; min-height: 44px; }
.promo-note { font-size: .78rem; color: var(--muted); margin: 10px 0 0; }
.promo img { position: absolute; width: 1px; height: 1px; }
.promo .promo-label { font-size: 1rem; }
.promo .promo-lead { font-size: .9rem; margin: 0; }
.promo-items { gap: 8px; }
.promo-items li { padding: 10px 12px; }
.promo-items .promo-desc { margin-bottom: 6px; }
.choices-col { flex-direction: column; align-items: flex-start; }
.choices-col label { border-radius: 10px; }
.small { font-size: .8rem; color: var(--muted); }
.small strong { color: var(--accent); }
.muted { color: var(--warn); font-weight: 700; }
.result-table s { color: var(--muted); }
.methods { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.methods li { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--bg); }
.methods li.best { border-color: var(--accent); background: var(--accent-soft); }
.methods li.na { opacity: .7; }
.methods li.na .m-amt { text-decoration: line-through; color: var(--muted); }
.m-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.m-name { font-weight: 700; font-size: .92rem; }
.m-amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-why { margin: 4px 0 0; font-size: .8rem; color: var(--muted); }
.tag { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; margin-right: 6px; }
.tag-best { background: var(--accent); color: #fff; }
.tag-na { background: var(--warn-soft); color: var(--warn); }
.result-table.cmp th, .result-table.cmp td { padding: 8px 4px; }
.result-table.cmp thead th { white-space: normal; line-height: 1.3; font-size: .8rem; }
@media (max-width: 560px) { .result-table.cmp { font-size: .82rem; } .result-table.cmp tbody th { font-size: .78rem; } }
.filled { color: var(--accent); font-weight: 700; font-size: .85rem; margin-left: 6px; }
.cat-title { font-size: 1rem; margin: 24px 0 10px; padding-left: 10px; border-left: 4px solid var(--accent); }
.more-link { margin: 12px 0 0; font-size: .9rem; }
.methods .tag:not(.tag-best):not(.tag-na) { background: var(--line); color: var(--text); }
.resultbar:not(.show) { visibility: hidden; transition: transform .2s, visibility 0s .2s; }
.resultbar.show { visibility: visible; }
.site-nav { gap: 4px 14px; font-size: .86rem; }
@media (max-width: 760px) {
  .site-nav { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .site-nav a { padding: 8px 0; }
}
.cat-jump { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 8px; }
.cat-jump a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: .85rem; }
.check-inline { display: flex; gap: 6px; align-items: flex-start; margin-top: 8px; font-size: .82rem; color: var(--muted); font-weight: 400; }

/* =====================================================================
   デザイン v2(2026-11-08)「事務机」
   藍の墨と紙、朱の印鑑。結果は電卓の液晶のように見せる。
   ===================================================================== */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --text: #1b2740;
  --muted: #56607a;
  --line: #dbe2ec;
  --accent: #2a4f8f;
  --accent-ink: #ffffff;
  --accent-soft: #e8eef8;
  --shu: #c43b28;
  --lcd: #cfd8c4;
  --lcd-edge: #b5c0a8;
  --lcd-ink: #1d2a17;
  --radius: 10px;
  --shadow: 0 1px 0 rgba(27,39,64,.04);
  --font: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  --num: "BIZ UDGothic", "BIZ UDPGothic", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161f; --surface: #182030; --surface-2: #1f293b; --text: #e6e9ef; --muted: #a6afc2;
    --line: #2c374b; --accent: #8fb0e8; --accent-ink: #0f1726; --accent-soft: #1f2d47;
    --shu: #f07a63; --lcd: #2b3526; --lcd-edge: #3c4a35; --lcd-ink: #d9efc6;
  }
}

h1, h2, h3 { color: var(--text); letter-spacing: .02em; }
h2 { border-bottom: 1px solid var(--line); position: relative; padding-bottom: 8px; }
h2::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 48px; height: 3px; background: var(--accent); border-radius: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }

/* ヘッダー:1段目=ロゴ、2段目=ツール一覧(横スクロール) */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: block; min-height: 0; padding-top: 10px; }
.brand { font-size: 1.15rem; letter-spacing: .04em; gap: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; background: transparent; border: 2.5px solid var(--shu); color: var(--shu); transform: rotate(-8deg); font-size: 1rem; font-weight: 700; }
.site-nav { flex-wrap: nowrap; overflow-x: auto; gap: 2px; margin: 8px -16px 0; padding: 0 16px; scrollbar-width: none; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%); }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { padding: 8px 10px 10px; border-bottom: 2px solid transparent; font-size: .88rem; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }
.ad-notice { margin-top: 10px; }

/* トップ:方眼紙の上に、文章とイラスト */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 8px 28px; align-items: center; margin-top: 16px; padding: 32px 28px;
  background-color: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  background-image: linear-gradient(var(--surface-2) 1px, transparent 1px), linear-gradient(90deg, var(--surface-2) 1px, transparent 1px);
  background-size: 22px 22px; background-position: -1px -1px; }
.hero h1 { margin-top: 0; font-size: clamp(1.6rem, 4.4vw, 2.35rem); line-height: 1.4; }
.hero .lead { color: var(--muted); }
.hero-art { width: 100%; height: auto; max-width: 340px; justify-self: end; }
.badges { gap: 6px 16px; margin-top: 16px; }
.badges li { background: none; border: 0; border-radius: 0; padding: 0 0 0 22px; font-size: .86rem; color: var(--text); position: relative; }
.badges li::before { content: ""; position: absolute; left: 0; top: .32em; width: 15px; height: 15px; border-radius: 50%; background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent); }
.badges li::after { content: ""; position: absolute; left: 4.5px; top: calc(.32em + 4px); width: 5px; height: 3px; border-left: 1.8px solid var(--accent); border-bottom: 1.8px solid var(--accent); transform: rotate(-45deg); }
@media (max-width: 680px) {
  .hero { grid-template-columns: 1fr; padding: 22px 18px; }
  .hero-art { max-width: 220px; justify-self: center; order: -1; margin-bottom: 4px; }
}
/* イラストの色 */
.a-paper { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.a-rule { stroke: var(--line); stroke-width: 1.5; }
.a-rule path:last-child { stroke: color-mix(in srgb, var(--shu) 45%, transparent); }
.a-ink { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; opacity: .55; }
.a-calc { fill: var(--accent); }
.a-lcd { fill: var(--lcd); }
.a-digits { font-family: var(--num); font-size: 22px; font-weight: 700; fill: var(--lcd-ink); }
.a-keys rect { fill: color-mix(in srgb, var(--surface) 88%, var(--accent)); }
.a-keys .a-key-op { fill: color-mix(in srgb, var(--surface) 70%, var(--accent)); }
.a-keys .a-key-eq { fill: var(--shu); }
.a-stamp { fill: none; stroke: var(--shu); stroke-width: 3.5; opacity: .9; }
.a-stamp-in { fill: none; stroke: var(--shu); stroke-width: 1.2; opacity: .6; }
.a-stamp-t { font-size: 24px; font-weight: 700; fill: var(--shu); font-family: var(--font); opacity: .9; }

/* 分類の見出し:書類のインデックスタブ */
.cat-jump a { border-radius: 6px; }
.cat-title { display: inline-block; border-left: 0; margin: 28px 0 0; padding: 6px 14px 5px; background: var(--accent); color: var(--accent-ink); border-radius: 8px 8px 0 0; font-size: .92rem; letter-spacing: .04em; }
.cat-title + .cards { margin-top: 0; padding-top: 12px; border-top: 2px solid var(--accent); }

/* ツールのカード:アイコン+名前+説明 */
.cards { gap: 10px; }
.card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius); box-shadow: none; }
.card .ico { flex: none; width: 42px; height: 42px; padding: 9px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.card-body { display: block; min-width: 0; }
.card .t { display: block; color: var(--text); font-weight: 700; margin: 0 0 4px; line-height: 1.5; }
.card .d { display: block; font-size: .86rem; color: var(--muted); line-height: 1.7; }
.card:hover { border-color: var(--accent); }
.card:hover .t { color: var(--accent); }
.card-wide { grid-column: 1 / -1; }

/* 計算欄 */
.calc { border-radius: 14px; box-shadow: 0 1px 0 rgba(27,39,64,.04), 0 10px 30px -18px rgba(27,39,64,.25); }
.tabs button[aria-selected="true"] { color: var(--accent); }
.btn-primary:hover { filter: brightness(1.08); }

/* 結果:電卓の液晶 */
.result-main { background: var(--lcd); border: 1px solid var(--lcd-edge); border-radius: 10px; padding: 14px 18px 12px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,.12), inset 0 -1px 0 rgba(255,255,255,.35); color: var(--lcd-ink); }
.result-main .k { color: var(--lcd-ink); font-size: .9rem; opacity: .85; }
.result-main .v { color: var(--lcd-ink); font-family: var(--num); letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.resultbar { background: var(--lcd); color: var(--lcd-ink); border: 1px solid var(--lcd-edge); }

/* 広告枠と脚注 */
.promo .promo-label { background: var(--surface); border-bottom: 1px dashed var(--muted); }
.site-footer { background: var(--surface); }
@media print {
  .hero { background: none; border: 0; padding: 0; display: block; }
  .hero-art { display: none; }
  .result-main { box-shadow: none; background: none; border: 1px solid #999; }
}
/* 長い数式・数字の列が画面幅を超えないように */
main { overflow-wrap: break-word; }
.hero { grid-template-columns: minmax(0, 1.5fr) minmax(0, .7fr); }
.hero h1 { font-size: clamp(1.55rem, 3.6vw, 2.15rem); text-wrap: balance; }
@media (max-width: 680px) {
  .hero { grid-template-columns: 1fr; padding: 22px 18px; }
  .hero-art { max-width: 210px; justify-self: center; order: -1; }
}

/* ---- レビュー反映(2026-11-08) ---- */
:root { color-scheme: light dark;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  --head: "BIZ UDPGothic", var(--font);
  --lcd: #d6e3c3; --lcd-edge: #a9b98f; }
@media (prefers-color-scheme: dark) { :root { --lcd: #2b3526; --lcd-edge: #3c4a35; } }
h1, h2, h3, .brand, .card .t, .cat-title { font-family: var(--head); }
.result-main .k { opacity: 1; }
.tag-best { color: var(--accent-ink); }
/* 表と入力欄の数字は本文の書体で(液晶だけ数字用の書体) */
.result-table td.num, .result-table td, input[type="text"], input[type="number"], input[inputmode] { font-family: var(--font); font-variant-numeric: tabular-nums; }
.result-table tr.total td, .result-table tr.total th { font-size: 1.05em; border-top: 2px solid var(--text); }
input::placeholder { font-weight: 400; color: var(--muted); }
/* PCではメニューを折り返して全部見せる */
@media (min-width: 761px) {
  .site-nav { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; margin: 8px -10px 0; padding: 0; }
  .site-nav a { padding: 6px 10px 8px; }
}
/* フォーカス表示 */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-nav a:focus-visible { outline-offset: -2px; border-radius: 4px; }
/* スマホのトップ:ツールを早く見せる */
@media (max-width: 680px) {
  .hero-art { display: none; }
  .hero { padding: 18px 16px; margin-top: 8px; }
  .badges { margin-top: 10px; }
}
.hero h1 { word-break: auto-phrase; }
/* タップ領域 */
.cat-jump a { padding: 10px 14px; }
.choices label { min-height: 44px; }
.site-footer nav a { display: inline-block; padding: 10px 0; }
.breadcrumb a { display: inline-block; padding: 8px 0; }
/* 印刷:ダークモードでも黒字・白地に */
@media print {
  :root { --bg:#fff; --surface:#fff; --surface-2:#f2f2f2; --text:#000; --muted:#333; --line:#bbb; --accent:#1a3a6e; --lcd-ink:#000; color-scheme: light; }
  .calc { box-shadow: none; }
}
.formula { font-family: var(--font); font-variant-numeric: tabular-nums; }
