/*
 * 画面共通のスタイル。見本は design/proposal.html（トークン・ヘッダー・手順・診断結果の組み方）。
 * ビルド工程なし。文字サイズは rem で指定し、上部の帯の「文字サイズ 標準｜大」で html の font-size を切り替える。
 */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #1b2430;
  --sub: #4a5563;
  --rule: #cfd6de;
  --navy: #1f4e79;
  --navy-deep: #173b5c;
  --navy-soft: #e6eef6;
  --seal: #b33a2b;
  --seal-soft: #f8e7e3;
  --on-navy: #ffffff;
  --ok: #2f6d4a;  --ok-soft: #e4f1e9;
  --warn: #8a5a00; --warn-soft: #f6eed9;
  --key1: #ecc94b; --key2: #7fbf95; --key3: #86afd6; --key4: #e5a46e; --key-line: #1f2f45;
  --f-ui: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --wrap: 1040px;
  --gutter: 20px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #12171d; --surface: #1a2129; --ink: #e7ecf1; --sub: #a3aeba; --rule: #2e3742;
  --navy: #8fb7de; --navy-deep: #b5d0ea; --navy-soft: #1d2b3a; --seal: #f08d7e; --seal-soft: #3a2320;
  --ok: #86c9a2; --ok-soft: #1c2f25; --warn: #e2b660; --warn-soft: #33291a; --on-navy: #10161c; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #12171d; --surface: #1a2129; --ink: #e7ecf1; --sub: #a3aeba; --rule: #2e3742;
  --navy: #8fb7de; --navy-deep: #b5d0ea; --navy-soft: #1d2b3a; --seal: #f08d7e; --seal-soft: #3a2320;
  --ok: #86c9a2; --ok-soft: #1c2f25; --warn: #e2b660; --warn-soft: #33291a; --on-navy: #10161c; color-scheme: dark; }

/* 文字サイズ「大」 */
html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html[data-fs="l"] { font-size: 118.75%; }

[hidden] { display: none !important; }  /* .btn などの display 指定より hidden を優先 */
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-ui); font-size: 1rem; line-height: 1.85; overflow-wrap: anywhere; }
img, svg, embed { max-width: 100%; }
a { color: var(--navy); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--seal); outline-offset: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; line-height: 1.4; font-weight: 700; }
h1 { font-size: clamp(1.625rem, 1.1rem + 2.2vw, 2.25rem); }
h2 { font-size: 1.5rem; padding-bottom: 8px; border-bottom: 2px solid var(--navy); }
h3 { font-size: 1.0625rem; }
p { margin: 0; }
ul, ol { margin: 0; padding-left: 1.4em; }
.num { font-variant-numeric: tabular-nums; }
.small { font-size: .875rem; }
.muted { color: var(--sub); }
.lead { color: var(--sub); font-size: 1.0625rem; max-width: 42em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -100px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { top: 8px; }

.inner { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gutter); }
@media (max-width: 560px) { :root { --gutter: 16px; } }

/* 上部の帯 */
.util { background: var(--navy); color: var(--on-navy); font-size: .8125rem; }
.util .inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; padding-block: 6px; }
.util .fs { display: flex; align-items: center; gap: 6px; }
.util .fs button { font: inherit; font-weight: 700; color: var(--on-navy); background: transparent; border: 1px solid currentColor; border-radius: 4px; padding: 2px 10px; min-height: 28px; cursor: pointer; opacity: .85; }
.util .fs button[aria-pressed="true"] { background: var(--on-navy); color: var(--navy); opacity: 1; }
.util .fs button:focus-visible { outline-color: var(--key1); }

/* ヘッダー */
.site-head { background: var(--surface); border-bottom: 1px solid var(--rule); }
.site-head .inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding-block: 14px; }
.lockup { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.lockup img { width: 44px; height: 44px; flex: none; }
.lockup .wm { display: grid; line-height: 1.25; }
.lockup .wm b { font-size: 1.25rem; letter-spacing: .04em; }
.lockup .wm small { font-size: .75rem; color: var(--sub); letter-spacing: .04em; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: .9375rem; }
.site-nav a { color: var(--navy); text-decoration: none; font-weight: 700; padding-block: 6px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: .3em; }
.site-nav form { margin: 0; }
.linkbtn { font: inherit; font-weight: 700; color: var(--navy); background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: none; }
.linkbtn:hover { text-decoration: underline; }
.admin-mark { font-size: .8125rem; font-weight: 700; padding: 0 8px; border-radius: 3px; background: var(--warn-soft); color: var(--warn); }

/* 注意書きの帯 */
.notice { background: var(--navy-soft); font-size: .875rem; }
.notice .inner { padding-block: 10px; }

/* 本文 */
.main { padding-block: 28px 64px; display: grid; gap: 28px; }
.main > * { min-width: 0; }
.crumbs { font-size: .875rem; color: var(--sub); }
.crumbs ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0 4px; }
.crumbs li + li::before { content: "＞"; margin-right: 4px; }
.page-head { display: grid; gap: 12px; }
.section { display: grid; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--rule); padding: 20px; display: grid; gap: 14px; min-width: 0; }
@media (max-width: 560px) { .panel { padding: 16px; } }
.panel.narrow { max-width: 560px; }
.list { display: grid; gap: 6px; }
.prose { display: grid; gap: 12px; max-width: 44em; }

/* ヒーロー */
.hero { background: var(--surface); border: 1px solid var(--rule); padding: 36px 28px 30px; display: grid; gap: 16px; }
.hero p { font-size: 1.0625rem; max-width: 40em; }
@media (max-width: 560px) { .hero { padding: 24px 16px; } }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; justify-self: start; font: inherit; font-weight: 700; font-size: 1.0625rem; line-height: 1.4; padding: 12px 22px; min-height: 52px; border-radius: 6px; background: var(--navy); color: var(--on-navy); border: 2px solid var(--navy); text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.ghost:hover { background: var(--navy-soft); }
.btn.sm { font-size: .9375rem; padding: 6px 14px; min-height: 40px; }
.btn.danger { background: var(--seal); border-color: var(--seal); }
@media (max-width: 560px) { .btn.block-sp { width: 100%; justify-self: stretch; } }
.actions { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }

/* 手順1〜4 */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); counter-reset: s; background: var(--surface); border-left: 1px solid var(--rule); }
.steps li { counter-increment: s; padding: 16px 20px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); border-top: 4px solid var(--k, var(--key1)); display: grid; gap: 4px; align-content: start; }
.steps .step-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.steps .step-ico { font-size: 1.5rem; width: 1.6em; text-align: center; color: var(--ink); flex: none; }
.steps .step-top em { font-style: normal; font-size: .8125rem; font-weight: 700; color: var(--ink); }
.steps li:nth-child(4n+1) { --k: var(--key1); } .steps li:nth-child(4n+2) { --k: var(--key2); } .steps li:nth-child(4n+3) { --k: var(--key3); } .steps li:nth-child(4n+4) { --k: var(--key4); }
.steps b { font-size: 1rem; }
.steps span { font-size: .875rem; color: var(--sub); }
.steps li[aria-current="step"] { background: var(--navy-soft); }
.steps li[aria-current="step"] b::after { content: "（いまここ）"; font-size: .8125rem; color: var(--navy); margin-left: 4px; }
.steps.compact li { padding: 10px 14px; }
.steps.compact .step-ico { font-size: 1.1rem; }
@media (max-width: 560px) { .steps.compact { grid-template-columns: repeat(2, 1fr); } .steps.compact span { display: none; } }

/* カテゴリの枠 */
.cats { display: grid; gap: 12px; }
.cat { background: var(--surface); border: 2px solid var(--navy); padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; align-items: center; }
.cat h3 a { color: var(--ink); text-decoration: none; }
.cat h3 a:hover { text-decoration: underline; }
.cat p { font-size: .9375rem; color: var(--sub); }
@media (max-width: 560px) { .cat { grid-template-columns: 1fr; } .cat .btn { width: 100%; } }

/* フッター */
.foot { background: var(--surface); border-top: 1px solid var(--rule); font-size: .8125rem; color: var(--sub); }
.foot .inner { padding-block: 20px 28px; display: grid; gap: 6px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .875rem; }
.foot b { color: var(--ink); }

/* お知らせ・エラー */
.alert { border: 1px solid var(--rule); border-left: 6px solid var(--navy); background: var(--surface); padding: 12px 16px; display: grid; gap: 4px; }
.alert.ok { border-left-color: var(--ok); background: var(--ok-soft); }
.alert.err { border-left-color: var(--seal); background: var(--seal-soft); color: var(--ink); }
.alert.err strong { color: var(--seal); }
.alert.warn { border-left-color: var(--warn); background: var(--warn-soft); }

/* フォーム */
.field { display: grid; gap: 6px; }
.field > label, .label { font-weight: 700; }
.hint { font-size: .875rem; color: var(--sub); font-weight: 400; }
.req, .opt { display: inline-block; font-size: .75rem; font-weight: 700; padding: 0 8px; border-radius: 3px; margin-left: 6px; vertical-align: 2px; line-height: 1.7; }
.req { background: var(--seal-soft); color: var(--seal); }
.opt { background: var(--bg); color: var(--sub); border: 1px solid var(--rule); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=search], input[type=password], input[type=url], textarea, select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--rule); border-radius: 6px; padding: 10px 12px; min-height: 52px;
}
textarea { min-height: 0; line-height: 1.7; }
input:focus, textarea:focus, select:focus { border-color: var(--navy); outline: 3px solid var(--navy-soft); outline-offset: 0; }
input[type=file] { font: inherit; font-size: .9375rem; max-width: 100%; width: 100%; padding: 12px; border: 2px dashed var(--rule); border-radius: 6px; background: var(--bg); }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; margin-right: 12px; padding: 8px 14px; border-radius: 6px; border: 2px solid var(--navy); background: var(--surface); color: var(--navy); cursor: pointer; }
.upload { background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--k, var(--key1)); padding: 16px 20px; display: grid; gap: 8px; }
.check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--rule); background: var(--bg); cursor: pointer; }
.check input { width: 24px; height: 24px; margin: 3px 0 0; accent-color: var(--navy); }

/* 表（帳票のような罫線） */
.scroll { overflow-x: auto; min-width: 0; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; background: var(--surface); }
th, td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
thead th { background: var(--navy-soft); font-weight: 700; }
tbody th { font-weight: 400; background: var(--surface); }
td.c, td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
td.num { text-align: right; }
td.none { background: var(--seal-soft); color: var(--seal); font-weight: 700; }
td.incl { color: var(--sub); }
tfoot th, tfoot td { font-weight: 700; }
tfoot tr:first-child th, tfoot tr:first-child td { border-top: 2px solid var(--ink); }
.cmp { min-width: 560px; }
.cmp thead th small, .cmp td small { display: block; font-weight: 400; color: var(--sub); font-size: .8125rem; }
.cmp td.none small { color: var(--seal); }
.diff { display: block; font-size: .8125rem; font-weight: 700; color: var(--warn); }

/* 指摘カード */
.find { background: var(--surface); border: 1px solid var(--rule); border-left: 6px solid var(--seal); padding: 12px 16px; display: grid; gap: 8px; }
.find.mid { border-left-color: var(--warn); }
.find.low { border-left-color: var(--rule); }
.badge { display: inline-block; font-size: .8125rem; font-weight: 700; padding: 0 8px; margin-right: 8px; border-radius: 3px; background: var(--seal-soft); color: var(--seal); white-space: nowrap; }
.mid .badge, .badge.mid { background: var(--warn-soft); color: var(--warn); }
.low .badge, .badge.low { background: var(--bg); color: var(--sub); border: 1px solid var(--rule); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.navy { background: var(--navy-soft); color: var(--navy); }
.tag { display: inline-block; font-size: .75rem; color: var(--sub); border: 1px solid var(--rule); border-radius: 3px; padding: 0 6px; margin-right: 6px; white-space: nowrap; vertical-align: 1px; }
.find-head b { font-size: 1.0625rem; }
.find .meta { font-size: .875rem; color: var(--sub); }
.findings { display: grid; gap: 12px; }

/* 業者に送る質問 */
.ask { background: var(--bg); border: 1px dashed var(--sub); padding: 10px 12px; display: grid; gap: 6px; font-size: .9375rem; }
.ask-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ask-top small { color: var(--sub); font-size: .8125rem; font-weight: 700; }
.ask-text { white-space: pre-wrap; }
.copy { font: inherit; font-size: .8125rem; font-weight: 700; color: var(--navy); background: var(--surface); border: 1px solid var(--navy); border-radius: 4px; padding: 4px 12px; min-height: 36px; cursor: pointer; white-space: nowrap; }
.copy:hover { background: var(--navy-soft); }
.copy[data-done] { color: var(--ok); border-color: var(--ok); }
.copy-msg { font-size: .8125rem; color: var(--sub); }
.copy-msg:empty { display: none; }

.note { font-size: .875rem; color: var(--sub); }

/* マイページの一覧 */
.case-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.case-list a.case { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; background: var(--surface); border: 1px solid var(--rule); border-left: 6px solid var(--navy); padding: 14px 18px; color: var(--ink); text-decoration: none; }
.case-list a.case:hover { background: var(--navy-soft); }
.case-list a.case b { color: var(--navy); text-decoration: underline; text-underline-offset: .2em; }

/* 待ち画面 */
.wait-bar { height: 6px; background: var(--navy-soft); overflow: hidden; position: relative; }
.wait-bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 35%; background: var(--navy); animation: wait 1.6s ease-in-out infinite; }
@keyframes wait { 0% { transform: translateX(-100%); } 100% { transform: translateX(290%); } }
@media (prefers-reduced-motion: reduce) { .wait-bar::after { animation: none; width: 100%; opacity: .4; } }

/* ページ送り（pagination::default） */
.pagination { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pagination li > * { display: inline-block; min-width: 40px; text-align: center; padding: 6px 10px; border: 1px solid var(--rule); background: var(--surface); text-decoration: none; }
.pagination li.active > * { background: var(--navy); color: var(--on-navy); border-color: var(--navy); font-weight: 700; }
.pagination li.disabled > * { color: var(--sub); }

/* 管理画面（密度高め） */
body.admin { --wrap: 1440px; }
body.admin .main { padding-block: 20px 48px; gap: 18px; }
body.admin h1 { font-size: 1.5rem; }
body.admin h2 { font-size: 1.1875rem; }
body.admin .panel { padding: 14px 16px; gap: 10px; }
body.admin table { font-size: .875rem; }
body.admin th, body.admin td { padding: 5px 7px; }
body.admin input[type=text], body.admin input[type=number], body.admin input[type=password], body.admin input[type=url], body.admin textarea { min-height: 0; padding: 4px 6px; border-width: 1px; border-radius: 4px; font-size: .875rem; }
body.admin .btn { font-size: .9375rem; padding: 6px 14px; min-height: 40px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .9375rem; }
.tabs a, .tabs strong { padding: 4px 12px; border: 1px solid var(--rule); background: var(--surface); text-decoration: none; }
.tabs strong { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.kv { display: flex; flex-wrap: wrap; gap: 2px 20px; font-size: .9375rem; }
.kv span b { font-weight: 700; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
tr.illegible td { background: var(--warn-soft); }
.st { display: inline-block; font-size: .8125rem; font-weight: 700; padding: 0 8px; border-radius: 3px; background: var(--bg); border: 1px solid var(--rule); white-space: nowrap; }
.st-review { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.st-published { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.st-failed { background: var(--seal-soft); color: var(--seal); border-color: transparent; }
.sev-high { color: var(--seal); font-weight: 700; } .sev-mid { color: var(--warn); font-weight: 700; } .sev-low { color: var(--sub); }
.pages { display: grid; gap: 8px; }
.pages img { border: 1px solid var(--rule); }

/* エラー画面 */
.err-code { font-size: .9375rem; font-weight: 700; color: var(--sub); letter-spacing: .08em; }

/* 比較表：スマホで横に送っても項目名が見えるように、左の列を固定 */
.cmp tbody th, .cmp tfoot th, .cmp thead th:first-child { position: sticky; left: 0; z-index: 1; }
.cmp thead th:first-child { background: var(--navy-soft); }
.cmp tbody th, .cmp tfoot th { background: var(--surface); }
@media (max-width: 560px) { .cmp tbody th, .cmp tfoot th, .cmp thead th:first-child { max-width: 9em; } }

/* 管理：明細の編集表 */
table.lines { min-width: 780px; }
table.lines td:nth-child(2) { min-width: 200px; }
table.lines td:nth-child(7) { min-width: 140px; }
table.lines td:first-child { min-width: 7em; }  /* # と工事の区分（解体工事など）を1文字ずつ縦に並べない */
table.lines td input + input { margin-top: 4px; }

/* ---- トップ：診断の仕組み・安心・よくある質問 / 外構：チェック項目の一覧 ---- */
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.how li { background: var(--surface); border: 1px solid var(--rule); padding: 20px; display: grid; gap: 8px; align-content: start; }
.how .how-ico { font-size: 1.75rem; color: var(--navy); }
.how b { font-size: 1.0625rem; }
.how span { font-size: .9375rem; color: var(--sub); }
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.trust .panel { align-content: start; gap: 8px; }
.trust h3 { font-size: 1.0625rem; margin: 0; }
.trust h3 i { color: var(--navy); margin-right: 4px; }
.trust p { font-size: .9375rem; color: var(--sub); margin: 0; }
.faq { display: grid; gap: 0; background: var(--surface); border: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:last-child { border-bottom: none; }
.faq summary { cursor: pointer; padding: 14px 20px; font-weight: 700; list-style-position: inside; }
.faq summary:focus-visible { outline: 3px solid var(--navy); outline-offset: -3px; }
.faq details p { margin: 0; padding: 0 20px 16px; color: var(--sub); }
/* 分類ごとに項目数が大きく違うので、段組みで上から詰めて並べる */
.checks { columns: 3 300px; column-gap: 16px; }
.checks .check-group { break-inside: avoid; margin-bottom: 16px; display: grid; }
.check-group { gap: 8px; }
.check-group h3 { margin: 0; font-size: 1.0625rem; border-bottom: 2px solid var(--navy); padding-bottom: 6px; }
.check-group .count { font-size: .8125rem; font-weight: 400; color: var(--sub); margin-left: 6px; }
.check-group ul { list-style: none; margin: 0; padding: 0; display: grid; }
.check-group li { border-bottom: 1px dashed var(--rule); }
.check-group li:last-child { border-bottom: none; }
.check-group summary { cursor: pointer; padding: 8px 0; font-size: .9375rem; }
.check-group summary .tag { margin-left: 6px; }
.check-group details p { margin: 0 0 10px; font-size: .875rem; color: var(--sub); }
.cta { justify-items: start; }

.trust.four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }

/* ヘッダー：見積ドック ｜ 外構・エクステリア */
.brand { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0; }
.brand-cat { display: inline-flex; align-items: center; gap: 14px; font-size: 1.125rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand-cat::before { content: ""; width: 1px; height: 1.6em; background: var(--rule); }
.brand-cat:hover { color: var(--navy); }
/* アップロード：業者を追加 */
.uploads { display: grid; gap: 16px; }
.upload-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.link-btn { background: none; border: none; padding: 0; font: inherit; font-size: .875rem; color: var(--seal); text-decoration: underline; cursor: pointer; }
.add-quote { justify-self: start; }

/* ---- 提携企業（D社）：提案・表示・申込（2026-10-02） ---- */
/* 「提携企業（紹介料をいただいています）」の表示。景品表示法のステマ規制のため、提携企業の名前の近くに必ず出す */
.pr-tag { display: inline-block; font-size: .75rem; font-weight: 700; line-height: 1.6; padding: 0 8px; border-radius: 3px; background: var(--warn-soft); color: var(--warn); border: 1px solid currentColor; white-space: nowrap; vertical-align: 1px; }
.pr-line { font-size: .875rem; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.cmp th.partner-col { background: var(--warn-soft); }
.cmp th .pr-tag { display: block; width: max-content; margin-top: 4px; font-weight: 700; }
.offer-box { background: var(--surface); border: 2px solid var(--navy); border-top-width: 6px; padding: 20px; display: grid; gap: 14px; }
.offer-box h2 { border-bottom: none; padding-bottom: 0; font-size: 1.375rem; }
.offer-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 24px; align-items: start; }
@media (max-width: 720px) { .offer-body { grid-template-columns: 1fr; } }
.offer-name { font-size: 1.25rem; font-weight: 700; }
@media (max-width: 560px) { .offer-box { padding: 16px; } }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form input, .inline-form select { flex: 1 1 220px; width: auto; }
.inline-form .btn { flex: none; }
.h-plain { border-bottom: none; padding-bottom: 0; font-size: 1.1875rem; }
.small-h { font-size: 1.0625rem; }
.mail-form { gap: 10px; }
.read-tag { display: inline-block; font-size: .75rem; font-weight: 400; padding: 0 8px; margin-left: 6px; border-radius: 3px; background: var(--ok-soft); color: var(--ok); vertical-align: 2px; line-height: 1.7; }
.form-narrow { max-width: 720px; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.field legend { padding: 0; margin-bottom: 6px; }
.radios { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.radios label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.radios input { width: 22px; height: 22px; accent-color: var(--navy); margin: 0; }
.give { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--rule); font-size: .875rem; }
.give > div { padding: 10px 14px; }
.give > div + div { border-left: 1px solid var(--rule); background: var(--bg); }
.give ul { margin-top: 4px; }
@media (max-width: 560px) { .give { grid-template-columns: 1fr; } .give > div + div { border-left: 0; border-top: 1px solid var(--rule); } }
/* 申込の進み具合 */
.progress { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: p; }
.progress li { counter-increment: p; font-size: .8125rem; font-weight: 700; text-align: center; padding: 30px 2px 0; position: relative; color: var(--sub); }
.progress li::before { content: counter(p); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 24px; height: 24px; line-height: 24px; border-radius: 50%; background: var(--bg); border: 2px solid var(--rule); font-size: .75rem; color: var(--sub); z-index: 1; }
.progress li + li::after { content: ""; position: absolute; top: 12px; right: 50%; width: 100%; height: 2px; background: var(--rule); }
.progress li.done { color: var(--ink); }
.progress li.done::before { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.progress li.done + li.done::after { background: var(--navy); }
.referral { border-left: 6px solid var(--navy); }
/* 待機ページ */
.wait-steps { display: grid; gap: 4px; padding-left: 1.6em; }
.wait-steps li { color: var(--sub); }
.wait-steps li.now { color: var(--ink); font-weight: 700; }
.wait-steps li.done { color: var(--ok); }
.wait-steps li.done::marker { content: "✓ "; }
/* 選定基準 */
.criteria { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.crit { align-content: start; gap: 8px; }
.crit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.crit-head h3 { font-size: 1.0625rem; }
.crit-head .req, .crit-head .opt { margin-left: 0; }
/* 提携企業の画面 */
.partner-mark { background: var(--navy-soft); color: var(--navy); }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.dl dt { font-weight: 700; color: var(--sub); font-size: .9375rem; }
.dl dd { margin: 0; min-width: 0; }
.status-form { display: grid; gap: 10px; }
.st-ref-sent { background: var(--seal-soft); color: var(--seal); border-color: transparent; }
.st-ref-contacted, .st-ref-quoted { background: var(--navy-soft); color: var(--navy); border-color: transparent; }
.st-ref-contracted { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.st-ref-lost { color: var(--sub); }
/* 管理画面：絞り込み・フォーム */
.filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; font-size: .9375rem; }
.filters label { display: inline-flex; gap: 6px; align-items: center; }
body.admin select, body.admin input[type=date], body.admin input[type=month], body.admin input[type=email], body.admin input[type=tel] { min-height: 0; padding: 4px 6px; border-width: 1px; border-radius: 4px; font-size: .875rem; width: auto; max-width: 100%; }
body.admin .field input[type=email], body.admin .field input[type=tel], body.admin .field select, body.admin .field input[type=date] { width: 100%; }
input[type=date], input[type=month] { font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--rule); border-radius: 6px; padding: 8px 10px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px 16px; align-items: start; }
.form-grid > h3, .form-grid > .actions, .form-grid > .wide { grid-column: 1 / -1; }
.check-form { border-top: 1px dashed var(--rule); padding-top: 12px; }
.row-form { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.narrow-table { width: auto; min-width: 480px; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, var(--f-ui); font-size: .875rem; }
.mail-preview { border: 1px solid var(--rule); background: var(--surface); padding: 16px; font-size: .9375rem; line-height: 1.8; overflow-wrap: anywhere; }
code { font-size: .875em; background: var(--bg); padding: 0 4px; border-radius: 3px; }
.grid2 > .panel, .grid2 > div > .panel { align-content: start; }

/* =====================================================================================
 * メッセージ（提携企業 ⇔ お客様。マイページ・提携企業の画面・管理画面で共通）。設計書 §9.9
 * ===================================================================================== */
.chat { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.chat-log { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; padding: 4px 2px; overscroll-behavior: contain; }
.chat-log:focus-visible { outline-offset: -3px; }
.chat-empty { text-align: center; color: var(--sub); font-size: .875rem; padding: 12px 0; }
.msg-sys { text-align: center; }
.msg-sys > span { display: inline-block; font-size: .8125rem; color: var(--sub); background: var(--bg); border: 1px solid var(--rule); border-radius: 999px; padding: 2px 14px; line-height: 1.7; }
.msg { display: grid; gap: 2px; max-width: 86%; min-width: 0; }
.msg-theirs { align-self: flex-start; }
.msg-mine { align-self: flex-end; justify-items: end; }
.msg-bubble { padding: 10px 14px; border-radius: 14px 14px 14px 4px; background: var(--surface); border: 1px solid var(--rule); line-height: 1.7; overflow-wrap: anywhere; }
.msg-mine .msg-bubble { background: var(--navy); color: var(--on-navy); border-color: var(--navy); border-radius: 14px 14px 4px 14px; }
.msg-meta { font-size: .75rem; color: var(--sub); }
.chat-form { display: grid; gap: 10px; }
.chat-form textarea { width: 100%; resize: vertical; min-height: 96px; }
.chat-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.chat-err { color: var(--seal); font-size: .875rem; font-weight: 700; }
.chat-panel .chat-log { background: var(--bg); border: 1px solid var(--rule); border-radius: 8px; padding: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.chip { font: inherit; font-size: .875rem; font-weight: 700; line-height: 1.5; padding: 4px 14px; border-radius: 999px; border: 1px solid var(--rule); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip:hover { border-color: var(--navy); color: var(--navy); }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip-n { font-size: .75rem; min-width: 1.6em; padding: 0 5px; border-radius: 999px; background: var(--seal); color: #fff; text-align: center; line-height: 1.6; }
.tpl-label { font-size: .8125rem; font-weight: 700; color: var(--sub); margin-right: 2px; }
.tpl-chips .chip { font-weight: 400; }
.tpl-edit { font-size: .8125rem; display: inline-flex; gap: 4px; align-items: center; }
.unread-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--seal); flex: none; }
.unread-dot.new { background: var(--warn); }
.unread-badge { display: inline-flex; align-items: center; gap: 6px; justify-self: start; grid-column: 1 / -1; margin: 0; }
.tag-navy { color: var(--navy); background: var(--navy-soft); border-color: transparent; }
.tag-warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.tag-seal { color: var(--seal); background: var(--seal-soft); border-color: transparent; }
.tag i { margin-right: 4px; }
.admin-thread { margin-top: 8px; border-top: 1px dashed var(--rule); padding-top: 8px; }
.admin-thread summary { cursor: pointer; font-weight: 700; }
.admin-thread .chat { margin-top: 8px; max-width: 720px; }

/* =====================================================================================
 * 提携企業の画面（/partner）。上部バー＋3列（メニュー｜案件一覧｜案件詳細）。見本は sample-chat
 * ===================================================================================== */
.pt-body { --top-h: 56px; min-height: 100vh; background: var(--bg); line-height: 1.7; }
.pt-top { position: sticky; top: 0; z-index: 20; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 16px 0 20px; background: var(--navy-deep); color: #fff; }
:root[data-theme="dark"] .pt-top { background: #0d141b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pt-top { background: #0d141b; } }
.pt-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.pt-brand img { width: 30px; height: 30px; background: #fff; border-radius: 6px; padding: 2px; flex: none; }
.pt-brand b { font-size: 1.125rem; letter-spacing: .04em; white-space: nowrap; }
.pt-role { font-size: .875rem; font-weight: 700; color: #b9d3ec; white-space: nowrap; }
.pt-top-r { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.pt-company { font-size: .9375rem; color: #dbe6f1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pt-topbtn { font: inherit; font-size: .9375rem; font-weight: 700; display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; min-height: 38px; border-radius: 8px; border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.08); color: #fff; text-decoration: none; cursor: pointer; white-space: nowrap; }
.pt-topbtn:hover { background: rgba(255,255,255,.18); }
.pt-topbtn.on { background: #fff; color: var(--navy-deep); border-color: #fff; }
.pt-topbtn.ghost { border-color: transparent; background: transparent; }
.pt-logout { margin: 0; }
.pt-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - var(--top-h)); }
.pt-side { position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); display: flex; flex-direction: column; gap: 4px; padding: 16px 10px; background: var(--surface); border-right: 1px solid var(--rule); }
.pt-side > a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.pt-side > a i { width: 1.25em; text-align: center; color: var(--sub); }
.pt-side > a:hover { background: var(--bg); }
.pt-side > a[aria-current="page"] { background: var(--navy-soft); color: var(--navy); }
.pt-side > a[aria-current="page"] i { color: var(--navy); }
.pt-count { margin-left: auto; min-width: 1.6em; padding: 0 6px; border-radius: 999px; background: var(--seal); color: #fff; font-size: .8125rem; text-align: center; line-height: 1.6; }
.pt-side-foot { margin-top: auto; border-top: 1px solid var(--rule); padding: 12px 6px 0; display: grid; gap: 6px; font-size: .8125rem; color: var(--sub); }
.pt-main { min-width: 0; position: relative; }
.pt-company-sp { display: none; }
.pt-flash { margin: 12px 20px 0; }
.pt-h1 { font-size: 1.75rem; line-height: 1.3; border: 0; padding: 0; }
.pt-empty { color: var(--sub); padding: 24px 4px; }
.pt-note { font-size: .8125rem; color: var(--sub); }

/* 一覧＋詳細（PC は列ごとにスクロール） */
.pt-inbox { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: calc(100vh - var(--top-h)); }   /* 行を枠の高さに固定（中身の高さで行が伸び、ページの下に白紙までスクロールできていた。2026-10-31） */
.pt-main:has(.pt-flash) .pt-inbox { height: calc(100vh - var(--top-h) - 76px); }
.pt-list { position: relative; min-width: 0; overflow-y: auto; border-right: 1px solid var(--rule); background: var(--surface); }
.pt-list-head { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 20px 16px 12px; display: grid; gap: 10px; border-bottom: 1px solid var(--rule); }
.pt-list-head h1 { font-size: 1.5rem; border: 0; padding: 0; }
.chips-sub .chip { font-weight: 400; font-size: .8125rem; padding: 2px 12px; }
.pt-cards { list-style: none; margin: 0; padding: 0; }
.pt-cards li { border-bottom: 1px solid var(--rule); }
.pt-card-link { display: grid; gap: 2px; padding: 14px 16px 14px 18px; color: var(--ink); text-decoration: none; border-left: 4px solid transparent; }
.pt-card-link:hover { background: var(--bg); }
.pt-card-link.sel { background: var(--navy-soft); border-left-color: var(--navy); }
.pc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pc-name { font-size: 1.0625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pc-when { margin-left: auto; font-size: .8125rem; color: var(--sub); white-space: nowrap; }
.pc-area { font-size: .9375rem; }
.pc-scope { font-size: .875rem; color: var(--sub); }
.pc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.pc-tags .tag { margin: 0; font-size: .75rem; line-height: 1.8; font-weight: 700; }

/* 列を絶対配置の基準にする：中の読み上げ用ラベルが列の外へ出て、ページの下に白紙までスクロールできていた（2026-10-31） */
.pt-detail { position: relative; min-width: 0; overflow-y: auto; padding: 20px 24px 40px; container-type: inline-size; }
.pt-back { display: none; }
.pt-detail-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.pt-meta { color: var(--sub); font-size: .9375rem; margin-top: 4px; }
.pt-status { display: grid; grid-template-columns: auto auto; align-items: center; gap: 8px 10px; justify-items: start; }
.pt-status > label { font-weight: 700; color: var(--sub); font-size: .9375rem; }
.pt-status select { width: auto; min-width: 170px; min-height: 44px; padding: 6px 10px; }
.pt-status option:disabled { color: #9aa4ae; }
.pt-status-extra { grid-column: 1 / -1; display: grid; gap: 8px; padding: 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); width: 100%; max-width: 340px; justify-self: end; }
.pt-status > p { grid-column: 1 / -1; justify-self: end; }
.pt-detail-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.pt-col-a { display: grid; gap: 16px; min-width: 0; }
.pt-col-b { position: sticky; top: 0; min-width: 0; }
@container (max-width: 860px) {
  .pt-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .pt-col-b { position: static; order: -1; }
  .pt-status-extra { justify-self: start; }
  .pt-status > p { justify-self: start; }
}
.pt-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 16px 18px; display: grid; gap: 12px; min-width: 0; }
.pt-card.flash-target { box-shadow: 0 0 0 3px var(--key1); }
.pt-card-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.pt-card-h h2, .pt-card-h h3 { font-size: 1.125rem; border: 0; padding: 0; display: flex; align-items: center; gap: 10px; }
.pt-card-h h2 i, .pt-card-h h3 i { color: var(--navy); }
.pt-card-h > span { font-size: .8125rem; color: var(--sub); }
.pt-points { display: grid; }
.pt-point { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 14px; padding: 12px 0; }
.pt-point + .pt-point { border-top: 1px solid var(--rule); }
.pt-point > i { width: 38px; height: 38px; border-radius: 8px; background: var(--navy-soft); color: var(--navy); display: grid; place-items: center; font-size: 1rem; }
.pp-label { font-size: .875rem; font-weight: 700; color: var(--sub); }
.pp-value { font-size: 1.375rem; font-weight: 700; color: var(--navy); line-height: 1.5; }
.pp-value.sm { font-size: 1rem; color: var(--ink); }
.pp-note { font-size: .8125rem; color: var(--sub); margin-top: 2px; }
.pp-chance { display: inline-block; font-size: .75rem; padding: 0 8px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); margin-left: 4px; vertical-align: 1px; }
.pp-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 4px; font-size: .9375rem; }
.pp-list li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: baseline; }
.pp-cnt { font-size: .75rem; font-weight: 700; color: var(--seal); background: var(--seal-soft); border-radius: 4px; padding: 0 6px; white-space: nowrap; }
.pp-dl, .pt-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 4px 0 0; }
.pp-dl dt, .pt-dl dt { font-size: .875rem; color: var(--sub); font-weight: 700; }
.pp-dl dd, .pt-dl dd { margin: 0; min-width: 0; }
.cmp-sm { font-size: .875rem; min-width: 480px; }
.pt-fd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 20px; }
.pt-fd-grid h4 { font-size: .9375rem; margin: 0 0 4px; }
.pt-card .upload { border-top-width: 1px; padding: 0; border: 0; }
.pt-chat-card { gap: 10px; }
.pt-chat-card .chat-log { max-height: none; height: clamp(240px, calc(100vh - var(--top-h) - 470px), 640px); background: var(--bg); border-radius: 8px; padding: 12px; }

/* お客様の画面を並べる */
.pt-customer { min-width: 0; overflow-y: auto; border-left: 1px solid var(--rule); background: var(--navy-soft); padding: 16px; }
.cv-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cv-head h2 { font-size: 1.0625rem; border: 0; padding: 0; display: flex; gap: 8px; align-items: center; }
.cv-head span { font-size: .75rem; font-weight: 700; color: var(--sub); border: 1px solid var(--rule); border-radius: 999px; padding: 0 10px; background: var(--surface); }
.cv-phone { max-width: 370px; margin: 0 auto; border: 10px solid #1b2430; border-radius: 30px; background: var(--bg); overflow: hidden; box-shadow: 0 8px 24px rgba(15, 30, 50, .18); }
.cv-bar { display: flex; justify-content: space-between; background: var(--navy); color: var(--on-navy); font-size: .8125rem; font-weight: 700; padding: 8px 14px; }
.cv-body { padding: 12px; display: grid; gap: 10px; font-size: .875rem; }
.cv-crumb { font-size: .75rem; color: var(--sub); }
.cv-h { font-size: 1.0625rem; }
.cv-sub { color: var(--sub); font-size: .8125rem; }
.cv-box { background: var(--surface); border: 1px solid var(--rule); padding: 12px; display: grid; gap: 8px; min-width: 0; }
.cv-box-h { font-weight: 700; font-size: .9375rem; border-bottom: 2px solid var(--navy); padding-bottom: 4px; }
.cv-box .progress li { font-size: .6875rem; }
.cv-table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.cv-table th, .cv-table td { border-bottom: 1px solid var(--rule); padding: 4px 6px; text-align: left; }
.cv-table td { text-align: right; }
.cv-own th, .cv-own td { background: var(--warn-soft); }
.cv-note { font-size: .75rem; color: var(--sub); }
.cv-chat .chat-log { max-height: 360px; }
.cv-chat .msg-bubble { font-size: .875rem; padding: 8px 12px; }
.cv-input { display: flex; justify-content: space-between; align-items: center; border: 2px solid var(--rule); border-radius: 6px; padding: 8px 10px; color: var(--sub); }
.cv-input span { background: var(--navy); color: var(--on-navy); border-radius: 4px; padding: 0 10px; font-weight: 700; opacity: .6; }

/* ホーム・対応エリア・定型文 */
.pt-pagewrap { max-width: 1080px; padding: 24px; display: grid; gap: 18px; }
.pt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.pt-stat { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 18px; color: var(--ink); text-decoration: none; }
.pt-stat span { font-size: .875rem; color: var(--sub); font-weight: 700; }
.pt-stat b { font-size: 1.75rem; color: var(--navy); line-height: 1.3; }
.pt-stat b small { font-size: .875rem; margin-left: 2px; color: var(--sub); }
.pt-stat.hot b { color: var(--seal); }
.pt-stat:hover { border-color: var(--navy); }
.pt-mini { list-style: none; padding: 0; margin: 0; display: grid; }
.pt-mini li + li { border-top: 1px solid var(--rule); }
.pt-mini a { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 4px; color: var(--ink); text-decoration: none; }
.pt-mini a:hover { background: var(--bg); }
.pt-mini a .muted { flex-basis: 100%; }
.pt-pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pt-pills li { background: var(--navy-soft); color: var(--navy); font-weight: 700; border-radius: 999px; padding: 2px 14px; }
.pt-table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.pt-table th, .pt-table td { border-bottom: 1px solid var(--rule); padding: 8px 6px; text-align: left; vertical-align: top; }
.pt-table thead th { font-size: .8125rem; color: var(--sub); }
.pt-tpl-form { display: grid; gap: 10px; }
/* 企業情報（/partner/profile） */
.pf-form { display: grid; gap: 16px; }
.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; align-items: start; }
.pf-grid > .wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .pf-grid { grid-template-columns: minmax(0, 1fr); } }
.pf-company { font-size: 1.25rem; font-weight: 700; margin: 0; overflow-wrap: anywhere; }
.pt-tpl-preview { white-space: normal; color: var(--sub); }
/* 提携企業の紹介文・ウェブサイト（結果ページの提案・申込フォーム） */
.offer-intro { margin: 6px 0 0; overflow-wrap: anywhere; }
.offer-web { margin: 4px 0 0; overflow-wrap: anywhere; }
.pt-tpl-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 12px; }

/* 狭い画面：お客様の画面を並べたときは一覧を畳む */
@media (max-width: 1500px) {
}
@media (max-width: 1180px) {
  .pt-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .pt-side { padding: 12px 8px; }
  .pt-side > a { flex-direction: column; gap: 2px; padding: 8px 4px; font-size: .6875rem; text-align: center; position: relative; }
  .pt-side > a i { font-size: 1.125rem; }
  .pt-count { position: absolute; top: 2px; right: 6px; margin: 0; font-size: .6875rem; }
  .pt-side-foot { display: none; }
}

/* スマホ：3列を縦に切り替え（一覧 → 詳細。詳細には「案件一覧に戻る」） */
@media (max-width: 860px) {
  .pt-top { padding: 0 12px; gap: 8px; }
  .pt-brand b { font-size: 1rem; }
  .pt-hide-sm { display: none; }
  .pt-company { font-size: .8125rem; }
  .pt-topbtn { padding: 6px 10px; }
  .pt-shell { display: block; }
  .pt-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; justify-content: space-around; gap: 0; padding: 4px; border-right: 0; border-bottom: 1px solid var(--rule); }
  .pt-side > a { flex: 1 1 0; min-width: 0; }
  .pt-inbox, .pt-main:has(.pt-flash) .pt-inbox { display: block; height: auto; }
  .pt-list { overflow: visible; border-right: 0; }
  .pt-list-head { position: static; padding: 16px 16px 10px; }
  .pt-no-sel .pt-detail { display: none; }
  .pt-has-sel .pt-list { display: none; }
  .pt-detail { overflow: visible; padding: 12px 16px 32px; }
  .pt-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 10px; text-decoration: none; }
  .pt-h1 { font-size: 1.5rem; }
  .pt-status { grid-template-columns: auto minmax(0, 1fr); width: 100%; }
  .pt-status select { min-width: 0; width: 100%; }
  .pt-status-extra { max-width: none; }
  .pt-card { padding: 14px; }
  .pt-chat-card .chat-log { height: auto; max-height: 60vh; }
  .pt-customer { border-left: 0; border-top: 1px solid var(--rule); }
  .pt-pagewrap { padding: 16px; }
  .pt-flash { margin: 10px 16px 0; }
  .pt-tpl-row { grid-template-columns: minmax(0, 1fr) 90px; }
  .msg { max-width: 92%; }
}
@media (max-width: 560px) {
  .pt-role, .pt-company { display: none; }
  .pt-company-sp { display: block; font-size: .8125rem; color: var(--sub); padding: 8px 16px 0; }
}

/* ---- 代理ログイン（設計書 §9.10）。帯は常に最上部に固定。色はライト・ダークとも同じ（目立たせる） ---- */
.imp-bar { --imp-h: 48px; position: sticky; top: 0; z-index: 50; min-height: var(--imp-h); background: repeating-linear-gradient(135deg, #8a2a1d 0 14px, #9b3324 14px 28px); color: #fff; border-bottom: 3px solid #f2c94c; font-size: .9375rem; line-height: 1.45; }
.imp-in { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; justify-content: space-between; padding: 6px 16px; max-width: 1680px; margin-inline: auto; }
.imp-text { margin: 0; display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.imp-text > i { font-size: 1.125rem; color: #f2c94c; }
.imp-sub { font-weight: 400; opacity: .92; }
.imp-time { font-size: .8125rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, .28); white-space: nowrap; }
.imp-bar form { margin: 0; }
.imp-end { font: inherit; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 14px; border-radius: 6px; border: 2px solid #fff; background: #fff; color: #8a2a1d; cursor: pointer; white-space: nowrap; }
.imp-end:hover { background: #f2c94c; border-color: #f2c94c; }
.imp-end:focus-visible { outline: 3px solid #f2c94c; outline-offset: 2px; }
/* 管理画面のやり取り：代理ログイン中の操作の印（お客様・提携企業の画面には出ない） */
.msg-proxy { font-size: .75rem; color: var(--seal); font-weight: 700; }
/* 提携企業の画面：上部バー・左メニュー・3列の高さを帯の分だけずらす */
.pt-body.imp-on { --top-h: calc(56px + 51px); }
.pt-body.imp-on .pt-top { top: 51px; height: 56px; }
.pt-body.imp-on .imp-bar { height: 51px; min-height: 0; overflow: hidden; }
@media (max-width: 760px) {
  /* スマホ：文言は2行まで、終了ボタンは常に右に見せる */
  .imp-bar { font-size: .8125rem; }
  .imp-in { flex-wrap: nowrap; padding: 6px 10px; gap: 8px; }
  .imp-text { flex-wrap: nowrap; min-width: 0; align-items: flex-start; }
  .imp-msg { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .imp-sub, .imp-time, .imp-end-l { display: none; }
  .imp-end { padding: 4px 10px; flex: none; }
  .pt-body.imp-on { --top-h: calc(56px + 51px); }
}
.inline-imp { display: inline; margin-left: 8px; }

/* ---- 表をスマホで読みやすく（2026-10-01） ----
 * 共通：表の中では1文字ずつ折り返さない。body の overflow-wrap: anywhere は列の最小幅まで1文字に縮めるので、
 *   表の中は break-word（はみ出すときだけ折る＝列幅の計算には効かない）に戻す。長いURL・メールはカード側で anywhere。
 * 一覧の表 …… table.table-cards。640px 以下で1行＝1枚のカード。各セルの見出し（data-label）は thead から
 *   partials/scripts の小さなスクリプトで入れる。主キーのセルに .tc-key（カードの見出し）。
 * 比較表 ……… partials/compare（.cmp-set）。PC は .cmp-table（表）、640px 以下は .cmp-cards（工事の項目ごとのカード）。
 */
th, td { overflow-wrap: break-word; word-break: normal; }
.mono { overflow-wrap: anywhere; }
.table-cards thead th { white-space: nowrap; }
@media (min-width: 641px) { table.table-cards > tbody > tr > td { min-width: 5em; } }  /* タブレット幅で列が2文字幅まで縮まないように（足りなければ .scroll で横に送る） */
.rf { display: inline-flex; align-items: center; }
.rf-l { display: none; }

/* 比較表：カード（スマホ） */
.cmp-cards { display: none; }
.cmp-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.cmp-card + .cmp-card { margin-top: 10px; }
.cmp-card-h { margin: 0; padding: 8px 12px; font-size: 1rem; line-height: 1.6; font-weight: 700; background: var(--navy-soft); color: var(--ink); border: 0; border-bottom: 1px solid var(--rule); }
.cmp-card-h .diff { margin-top: 2px; }
.cmp-card-list { list-style: none; margin: 0; padding: 0; }
.cmp-v { display: grid; grid-template-columns: minmax(4.5em, 1fr) minmax(0, max-content); gap: 2px 12px; align-items: baseline; padding: 7px 12px; line-height: 1.6; }
.cmp-v + .cmp-v { border-top: 1px solid var(--rule); }
.cmp-who { font-weight: 700; min-width: 0; }
.cmp-who small, .cmp-val small { display: block; font-weight: 400; font-size: .8125rem; color: var(--sub); line-height: 1.5; }
.cmp-who .pr-tag { margin-top: 4px; white-space: normal; }
.cmp-card:not(.cmp-card-sum) .cmp-who small { display: inline; margin-left: 6px; }  /* 社名は「A社」の横に（行を短く） */
.cmp-card:not(.cmp-card-sum) .cmp-who .pr-tag { display: table; }
.cmp-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; min-width: 0; }
.cmp-v.none { background: var(--seal-soft); }
.cmp-v.none .cmp-val { color: var(--seal); }
.cmp-v.incl { grid-template-columns: minmax(0, 1fr); }  /* 「…に含むと記載」は長いので社名の下に */
.cmp-v.incl .cmp-val { color: var(--sub); font-weight: 400; font-size: .9375rem; text-align: left; }
.cmp-v.partner .cmp-who { color: var(--warn); }
.cmp-v.partner .cmp-who small { color: var(--sub); }
.cmp-card-sum { border: 2px solid var(--navy); }
.cmp-card-sum .cmp-card-h { background: var(--navy); color: var(--on-navy); border-bottom: 0; }
.cmp-card-sum .cmp-v { grid-template-columns: 1fr; }
.cmp-sum-dl { margin: 0; display: grid; gap: 2px; }
.cmp-sum-dl > div { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 12px; align-items: baseline; border-top: 1px dashed var(--rule); padding-top: 2px; }
.cmp-sum-dl dt { font-size: .875rem; color: var(--sub); }
.cmp-sum-dl dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }

@media (max-width: 640px) {
  .cmp-set > .cmp-table { display: none; }
  .cmp-set > .cmp-cards { display: block; }

  /* 一覧の表：1行＝1枚のカード */
  .scroll:has(> table.table-cards), .scroll:has(> form > table.table-cards) { overflow-x: visible; }
  table.table-cards { display: block; width: 100% !important; min-width: 0 !important; background: transparent; border: 0; font-size: .9375rem; }
  table.table-cards > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
  table.table-cards > tbody { display: grid; gap: 10px; }
  table.table-cards > tbody > tr { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--navy); border-radius: 6px; padding: 6px 12px 8px; }
  table.table-cards > tbody > tr > td, table.table-cards > tbody > tr > th {
    display: block; position: relative; min-width: 0 !important; width: auto; border: 0; border-top: 1px dashed var(--rule);
    padding: 6px 0 6px 7.5em; text-align: left; white-space: normal; overflow-wrap: anywhere; background: transparent; font-weight: 400; line-height: 1.7;
  }
  table.table-cards > tbody > tr > [data-label]::before {
    content: attr(data-label); position: absolute; left: 0; top: 7px; width: 7em; font-size: .8125rem; font-weight: 700; color: var(--sub); line-height: 1.6; overflow-wrap: anywhere;
  }
  table.table-cards > tbody > tr > :not([data-label]), table.table-cards > tbody > tr > [data-label=""],
  table.table-cards > tbody > tr > .tc-stack, table.table-cards > tbody > tr > .tc-key, table.table-cards > tbody > tr > td:has(textarea), table.table-cards > tbody > tr > td:has(details) { padding-left: 0; }
  table.table-cards > tbody > tr > [data-label=""]::before { content: none; }
  table.table-cards > tbody > tr > .tc-stack::before, table.table-cards > tbody > tr > td[data-label]:has(textarea)::before, table.table-cards > tbody > tr > td[data-label]:has(details)::before { position: static; display: block; width: auto; margin-bottom: 2px; }
  /* 主キー（番号・企業名など）はカードの見出し。DOM の順に関係なく先頭に出す */
  table.table-cards > tbody > tr > .tc-key { order: -1; border-top: 0; padding-top: 4px; font-size: 1.0625rem; font-weight: 700; line-height: 1.6; }
  table.table-cards > tbody > tr > .tc-key::before { position: static; display: block; width: auto; font-size: .75rem; font-weight: 400; }
  table.table-cards > tbody > tr > .tc-empty { display: none; }
  table.table-cards > tbody > tr > .tc-full { padding: 4px 0; border-top: 0; }
  table.table-cards > tbody > tr:has(> .tc-full) { border-left-width: 1px; }
  table.table-cards > tbody > tr.illegible { background: var(--warn-soft); }
  table.table-cards > tbody > tr.illegible > td { background: transparent; }
  table.table-cards td.num { text-align: left; }
  table.table-cards td input:not([type=checkbox]):not([type=radio]):not([type=hidden]), table.table-cards td select, table.table-cards td textarea { width: 100% !important; max-width: 100%; min-width: 0; }
  table.table-cards td .actions { gap: 4px 16px; }
  table.table-cards td .btn, table.table-cards td .linkbtn { min-height: 40px; }
  /* 見出しの無い小さな2列の表（差し込み変数の一覧など）は、枠を付けずに「キー→説明」を縦に詰めて並べる */
  table.table-cards.tc-plain > tbody { gap: 0; }
  table.table-cards.tc-plain > tbody > tr { border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent; padding: 6px 0; }
  table.table-cards.tc-plain > tbody > tr > td { border-top: 0; padding: 0; }
  table.table-cards.tc-plain > tbody > tr > .tc-key { font-size: inherit; padding: 0; }
  /* 管理：紹介一覧の「状態・紹介料・契約金額・請求メモ」はカードの中で2列に */
  table.table-cards td.tc-form { padding-left: 0; }
  table.table-cards td.tc-form::before { position: static; display: block; width: auto; margin-bottom: 4px; }
  table.table-cards .row-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; align-items: end; }
  table.table-cards .row-form .rf { display: grid; gap: 2px; min-width: 0; }
  table.table-cards .row-form .rf:first-of-type, table.table-cards .row-form .rf:last-of-type { grid-column: 1 / -1; }
  table.table-cards .row-form .rf-l { display: block; font-size: .75rem; font-weight: 700; color: var(--sub); }
  table.table-cards .row-form input, table.table-cards .row-form select { min-height: 44px; font-size: 1rem; }
  table.table-cards .row-form .btn { grid-column: 1 / -1; width: 100%; min-height: 44px; }
  /* 管理：明細の編集表・指摘の表 */
  table.lines.table-cards td input + input { margin-top: 6px; }
}

/* ---- スマホで「カード」と「表（横にスクロール）」を切り替える ----
 * partials/scripts が .cmp-set と table.table-cards の直前に .view-toggle を差し込む（640px 以下でだけ見える）。
 * 表を選ぶと、比較表は .cmp-set.as-table、一覧の表は table.table-cards → table.table-cards-off に切り替える。 */
.view-toggle { display: none; }
.cmp-set { min-width: 0; max-width: 100%; }  /* 親が grid/flex でも表の幅に引っぱられて広がらないように */
@media (max-width: 640px) {
  .view-toggle { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
  .view-toggle .vt-label { font-size: .8125rem; color: var(--sub); }
  .view-toggle .vt-seg { display: inline-flex; border: 1px solid var(--navy); border-radius: 6px; overflow: hidden; }
  .view-toggle button { font: inherit; font-size: .8125rem; font-weight: 700; padding: 6px 12px; min-height: 36px; border: 0; background: var(--surface); color: var(--navy); cursor: pointer; }
  .view-toggle button + button { border-left: 1px solid var(--navy); }
  .view-toggle button[aria-pressed="true"] { background: var(--navy); color: var(--on-navy, #fff); }
  .view-toggle button:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
  .view-toggle .vt-hint { flex-basis: 100%; font-size: .75rem; color: var(--sub); }
  /* 比較表：表で見る */
  .cmp-set.as-table { min-width: 0; max-width: 100%; }
  .cmp-set.as-table > .cmp-table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cmp-set.as-table > .cmp-cards { display: none; }
  .cmp-set.as-table table.cmp { width: max-content; min-width: 100%; }
  .cmp-set.as-table table.cmp th, .cmp-set.as-table table.cmp td { min-width: 8.5em; overflow-wrap: normal; word-break: keep-all; }
  .cmp-set.as-table table.cmp tbody th[scope="row"], .cmp-set.as-table table.cmp thead th:first-child, .cmp-set.as-table table.cmp tfoot th { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 9em; box-shadow: 1px 0 0 var(--rule); }
  .cmp-set.as-table table.cmp thead th:first-child { background: var(--navy-soft); }
  .cmp-set.as-table table.cmp .diff { display: block; white-space: normal; word-break: normal; overflow-wrap: anywhere; }
  /* 一覧の表：表で見る */
  table.table-cards-off { width: max-content; min-width: 100%; }
  table.table-cards-off th, table.table-cards-off td { min-width: 6em; overflow-wrap: normal; word-break: keep-all; }
  table.table-cards-off td input, table.table-cards-off td select, table.table-cards-off td textarea { min-width: 8em; }
}

/* =====================================================================================
 * ログイン画面（お客様 /login・提携企業 /partner/login・社内管理 /admin/login）。
 * 3つとも同じ組み方で、上の札（誰のためのログインか）の色だけを変える。社内管理の入口はサイトからリンクしない
 * ===================================================================================== */
.login { display: grid; gap: 18px; width: 100%; max-width: 560px; margin-inline: auto; }
.login-head { display: grid; gap: 10px; }
.login-head p { color: var(--sub); }
.login-for { justify-self: start; display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; font-weight: 700; line-height: 1.6; padding: 2px 10px; border-radius: 3px; }
.login-for.user { background: var(--ok-soft); color: var(--ok); }
.login-for.partner { background: var(--navy-soft); color: var(--navy); }
.login-for.admin { background: var(--warn-soft); color: var(--warn); }
.login-panel { border-top: 4px solid var(--navy); }
.login-panel .alert { margin: 0; }
.login-other { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline; font-size: .9375rem; padding: 12px 16px; border: 1px dashed var(--rule); color: var(--sub); }
.login-other i { color: var(--navy); }
.login-other b { color: var(--ink); }
/* パスワードでのログイン（設計書 §9.11） */
.login-remember { font-size: .9375rem; }
.login-remember .hint { display: block; }
.login-forgot { display: flex; align-items: baseline; gap: 8px; font-weight: 700; }
.login-forgot i { color: var(--navy); }
.login-alt { gap: 0; }
.login-alt > summary { cursor: pointer; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.login-alt[open] > summary { margin-bottom: 14px; }
.login-alt-form { display: grid; gap: 14px; }
.pw-card { max-width: 560px; }
body.admin-login .site-nav { gap: 4px 10px; }
.admin-who { display: inline-flex; align-items: center; gap: 4px; }
/* 管理者の一覧 */
.admin-pw summary { cursor: pointer; color: var(--navy); font-weight: 700; font-size: .875rem; }
.admin-pw form { display: grid; gap: 6px; margin-top: 6px; min-width: 220px; }

/* 見積書として読み取れなかった社の知らせと選び直し（partials/rejected-quotes。設計書 §4.1） */
.rejects { display: grid; gap: 16px; }
.reject { display: grid; gap: 0; }
.reject .alert { border-bottom: 0; }
.reject-form { border-top-width: 1px; }
.st-rejected { background: var(--seal-soft); color: var(--seal); border-color: transparent; }

/* 同意のチェックボックス（横は1行。説明は「取り扱いについて」を開いて読む） */
.consent-line { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-weight: 700; }
.consent-line input { width: 24px; height: 24px; margin: 1px 0 0; flex: none; accent-color: var(--navy); }
.consent-line.opt-line { font-weight: 400; }
.consent-more { font-size: .875rem; color: var(--sub); margin-left: 34px; }
.consent-more summary { cursor: pointer; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; display: inline-block; padding: 4px 0; }
.consent-more summary:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.consent-more[open] summary { margin-bottom: 4px; }
.consent-more ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.consent-more .give { margin-top: 8px; color: var(--ink); }
.consent-box { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--rule); background: var(--bg); }
.consent-row { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 2px; row-gap: 2px; }
.consent-row .consent-more { margin-left: 0; }
.consent-row .consent-more[open] { flex-basis: 100%; padding-left: 34px; }
.field-err { margin: 0; color: var(--seal); font-weight: 700; font-size: .9375rem; }

/* ---- カテゴリのイラストとマーク（public/img/categories/。config/categories.php の illust・mark） ---- */
.cat.has-illust { grid-template-columns: 260px minmax(0, 1fr) auto; }
.cat-illust { display: block; line-height: 0; }
.cat-illust img { width: 260px; height: auto; display: block; border-radius: 6px; image-rendering: auto; }
.cat-body { display: grid; gap: 4px; min-width: 0; }
.cat-body h3 { margin: 0; font-size: 1.25rem; }
.cat-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: .8125rem; font-weight: 700; color: var(--navy); }
.cat-kicker img { flex: none; }
.brand-cat { gap: 10px; }
.brand-cat img { flex: none; }
.hero-cat { grid-template-columns: minmax(0, 1fr) 270px; column-gap: 32px; }
.hero-cat > * { grid-column: 1; }
.hero-cat > .hero-illust { grid-column: 2; grid-row: 1 / span 5; align-self: center; width: 270px; height: auto; }
.cat-kicker .nw { white-space: nowrap; }
@media (max-width: 760px) {
  .cat.has-illust { grid-template-columns: 1fr; }
  .cat-illust img { width: 100%; max-width: 420px; margin: 0 auto; }
  .hero-cat { grid-template-columns: minmax(0, 1fr); }
  .hero-cat > .hero-illust { grid-column: 1; grid-row: auto; display: block; width: min(100%, 240px); margin: 0 auto 4px; }
  .cat-kicker { flex-wrap: wrap; row-gap: 2px; }
}
@media (max-width: 560px) { .brand-cat span { font-size: 1rem; } }

/* 見出しを「、」の後ろで折り返す（AI／が… のような途中の改行を防ぐ） */
.nw-ib { display: inline-block; }

/* ---- 開閉式の項目（チェック項目・よくある質問）：押す部分と説明をはっきり分ける ---- */
.check-group summary, .faq summary { list-style: none; display: flex; align-items: flex-start; gap: 10px; }
.check-group summary::-webkit-details-marker, .faq summary::-webkit-details-marker { display: none; }
.check-group summary { padding: 10px 0; font-weight: 700; color: var(--ink); }
.check-group summary .tag { font-weight: 400; }
/* 根拠の条文は項目名の下の行に。長い条文（建築基準法施行令…告示…）は折り返す（横に並べると項目名が1文字ずつ縦に潰れた。2026-11-06） */
.check-group summary .ck-t { flex: 1; min-width: 0; }
.check-group summary .ck-t .tag { display: block; width: fit-content; max-width: 100%; margin: 4px 0 0; white-space: normal; }
/* 開閉の印（右向き → 下向き） */
.check-group summary::after, .faq summary::after { content: ""; flex: none; margin-left: auto; margin-top: .5em; width: .55em; height: .55em;
  border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: rotate(-45deg); transition: transform .15s ease; }
.check-group details[open] > summary::after, .faq details[open] > summary::after { transform: rotate(45deg); margin-top: .3em; }
.check-group summary:hover, .faq summary:hover { color: var(--navy); }
/* 説明は色を変えた箱に入れる */
.check-group details p { margin: 0 0 12px; padding: 10px 12px; font-size: .875rem; line-height: 1.8; color: var(--ink);
  background: var(--navy-soft); border-left: 3px solid var(--navy); border-radius: 0 6px 6px 0; }
/* よくある質問は Q と A の印を付ける */
.faq summary { padding: 16px 20px; }
.faq summary::before, .faq details p::before { flex: none; display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%;
  font-size: .875rem; font-weight: 700; line-height: 1; }
.faq summary::before { content: "Q"; background: var(--navy); color: var(--on-navy); }
.faq details p { position: relative; margin: 0 20px 16px; padding: 12px 14px 12px calc(14px + 1.7em + 10px); color: var(--ink);
  background: var(--navy-soft); border-radius: 8px; }   /* 文中のリンクが別の列にならないよう、A の印は絶対配置（2026-10-31） */
.faq details p::before { position: absolute; left: 14px; top: 12px; }
.faq details p::before { content: "A"; background: var(--key1); color: var(--key-line); }
@media (prefers-reduced-motion: reduce) { .check-group summary::after, .faq summary::after { transition: none; } }

/* 申し込みのボタン（LPの .lp-cta と同じ黄色の立体ボタン）。黄色はテーマによらず固定 */
.btn.cta { background: #ecc94b; border-color: #ecc94b; color: #1f2f45; min-height: 60px; padding: 14px 28px; border-radius: 10px; font-size: 1.125rem;
  box-shadow: 0 4px 0 #b8952a, 0 10px 24px -10px rgba(0, 0, 0, .45); transition: transform .12s ease, box-shadow .12s ease, background .12s; }
.btn.cta:hover { background: #f3d76a; border-color: #f3d76a; }
.btn.cta:active { transform: translateY(3px); box-shadow: 0 1px 0 #b8952a; }
.btn.cta i { font-size: 1.2em; }
.btn.cta > span { text-align: center; }
.cta-em { display: inline-block; white-space: nowrap; color: #a4291b; background: #ffffff; padding: 2px 10px; border-radius: 6px; margin: 2px 4px; line-height: 1.5; }

/* アップロード画面の見出し：左に説明、右に「診断後に届くレポート」の小さな書類風の見本。紙の色はテーマによらず固定 */
.upload-head-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 12px 32px; align-items: start; }
.upload-head-text { display: grid; gap: 10px; min-width: 0; }
.upload-head-text p { margin: 0; color: var(--sub); }
.reward-doc { margin: 0; width: 200px; display: grid; gap: 8px; justify-items: center; }
.reward-doc figcaption { font-size: .75rem; font-weight: 700; color: var(--navy); text-align: center; line-height: 1.5; }
.rd-paper { position: relative; width: 100%; background: #fffdf8; color: #1f2933; border: 1px solid #d9d2c3; border-radius: 3px; padding: 10px 10px 8px;
  box-shadow: 4px 4px 0 -1px #f3eee3, 4px 4px 0 0 #d9d2c3, 0 10px 18px -12px rgba(0, 0, 0, .35); transform: rotate(-1.5deg); display: grid; gap: 5px; font-size: .6875rem; line-height: 1.4; }
.rd-paper p { margin: 0; color: inherit; }
.rd-title { text-align: center; font-weight: 700; letter-spacing: .12em; font-size: .75rem; border-bottom: 3px double #1f2933; padding-bottom: 4px; }
.rd-sum { display: flex; align-items: baseline; gap: 4px; border-left: 4px solid #c0392b; background: #fbe9e6; padding: 3px 8px; border-radius: 3px; font-weight: 700; }
.rd-sum em { font-style: normal; font-size: 1rem; color: #c0392b; line-height: 1; margin-left: auto; }
.rd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.rd-list li { display: flex; gap: 5px; align-items: baseline; padding: 2px 2px; border-bottom: 1px dashed #d9d2c3; }
.rd-list i { color: #c0392b; }
.rd-foot { display: flex; gap: 5px; align-items: center; color: #1f4e79 !important; font-weight: 700; }
.rd-stamp { position: absolute; top: -10px; right: -10px; width: 38px; height: 38px; border: 2px solid #c0392b; border-radius: 50%; color: #c0392b; font-weight: 700; font-size: .5625rem;
  display: grid; place-items: center; transform: rotate(14deg); background: rgba(255, 253, 248, .85); }
@media (max-width: 760px) {
  .upload-head-grid { grid-template-columns: 1fr; }
  .reward-doc { width: 200px; justify-self: center; gap: 6px; }
  .reward-doc figcaption { order: -1; font-size: .8125rem; }
}
/* フォームの送信ボタン（黄色）は中央に置く */
.section > .btn.cta { justify-self: center; }

/* 読みもの（/exterior/column/。resources/views/columns） */
.column { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; }
.column-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 44em; min-width: 0; font-size: 1.0625rem; line-height: 1.9; }
.column-body > * { margin: 0; }
.column-body h2 { margin-top: 20px; }
.column-body h3 { font-size: 1.1875rem; margin-top: 8px; padding-left: 10px; border-left: 4px solid var(--navy); }
.column-body ul, .column-body ol { padding-left: 1.4em; display: grid; gap: 4px; }
.column-body table { border-collapse: collapse; width: 100%; font-size: .9375rem; line-height: 1.6; background: var(--surface); }
.column-body th, .column-body td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
.column-body thead th { background: var(--navy-soft); }
.column-body blockquote { border-left: 4px solid var(--rule); padding: 4px 0 4px 14px; color: var(--sub); }
.column-body img { max-width: 100%; height: auto; }
/* 本文の写真・図（AI 生成。Columns::figures） */
.column-figure { margin: 4px 0; display: grid; gap: 6px; }
.column-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.column-figure figcaption { font-size: .875rem; color: var(--sub); line-height: 1.5; }
.column-figure figcaption small { display: inline-block; font-size: .75rem; line-height: 1.4; margin-left: .75em; padding: 3px 10px; border: 1px solid var(--rule); border-radius: 2px; white-space: nowrap; }
@media (max-width: 640px) { .column-body table { display: block; overflow-x: auto; } .column-body th, .column-body td { overflow-wrap: break-word; min-width: 6em; } }
.column-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.column-list li { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 4px; }
.column-list a { font-weight: 700; font-size: 1.0625rem; }
.column-list p { margin: 0; color: var(--sub); }
.column-cta { justify-items: start; margin-top: 8px; }
.column-cta p { margin: 0; }
@media (max-width: 560px) { .column-cta .btn { width: 100%; } }
/* 車種別カーポート適合ツール（columns/tools/carport-fit） */
.cfx { max-width: 52em; }
.cfx-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.cfx-form label { display: grid; gap: 4px; font-size: .875rem; font-weight: 700; }
.cfx-form select { font: inherit; font-size: 1rem; padding: 8px; max-width: 100%; }
.cfx-result { display: grid; gap: 12px; }
.cfx-out { margin: 0; padding: 10px 14px; border-left: 4px solid var(--navy); background: var(--bg); }
.cfx-tw { overflow-x: auto; }
.cfx-tw table { min-width: 640px; }
.cfx-gap { font-weight: 700; }
.cfx-gap[data-level="ng"], .cfx-ng { color: var(--seal); }
.cfx-gap[data-level="warn"], .cfx-warn { color: var(--warn); }
.cfx-gap[data-level="ok"] { color: var(--ok); }
.cfx-morewrap { margin: 0; text-align: center; }
/* 読みものの見出しは文節で折り返す（「読み｜方」のような語の途中の改行を防ぐ。対応ブラウザだけ効く） */
.column h1, .column-body h2, .column-body h3, .column-list a { word-break: auto-phrase; }
/* 読みものの2列（本文＋右メニュー）。960px 未満は1列で、右メニューは本文の下に回る */
.column-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
.column-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; min-width: 0; }
@media (min-width: 960px) { .column-layout { grid-template-columns: minmax(0, 1fr) 280px; gap: 40px; } }
.column-side { display: grid; gap: 16px; min-width: 0; font-size: .9375rem; align-self: stretch; align-content: start; }  /* 本文と同じ高さまで伸ばす（でないと目次の sticky が動ける範囲が無い） */
.side-box { background: var(--surface); border: 1px solid var(--rule); padding: 16px; display: grid; gap: 10px; }
.side-box p { margin: 0; }
.side-title { font-weight: 700; padding-bottom: 6px; border-bottom: 2px solid var(--navy); }
.side-title a { color: inherit; text-decoration: none; }
.side-cta { border-top: 4px solid var(--key1); }
.side-cta .btn.cta { width: 100%; min-height: 52px; font-size: 1rem; padding: 10px 14px; }
.side-group summary { cursor: pointer; font-weight: 700; padding: 6px 0; display: flex; justify-content: space-between; gap: 8px; }
.side-count { color: var(--sub); font-weight: 400; font-size: .8125rem; }
.side-group ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 0; }
.side-group li a { display: block; padding: 6px 0 6px 10px; border-left: 2px solid var(--rule); line-height: 1.5; text-decoration: none; word-break: auto-phrase; }
.side-group li a:hover { border-left-color: var(--navy); text-decoration: underline; }
.side-group li a[aria-current="page"] { border-left-color: var(--navy); font-weight: 700; color: var(--ink); }
.side-toc ol { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; line-height: 1.5; }
.side-toc a.is-current { font-weight: 700; }
/* PC：目次だけ画面に付いてくる。スマホ用の本文上の目次は隠す */
@media (min-width: 960px) {
  .side-toc { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
  .toc-inline { display: none; }
}
.toc-inline { background: var(--surface); border: 1px solid var(--rule); padding: 10px 16px; }
.toc-inline summary { cursor: pointer; font-weight: 700; }
.toc-inline ol { margin: 8px 0 4px; padding-left: 1.4em; display: grid; gap: 6px; }
/* 目次から飛んだとき見出しが画面の端に貼りつかないように */
.column-body h2[id] { scroll-margin-top: 16px; }
/* 読みもののサムネイル（public/img/columns/。tools/column_thumbs.py） */
.column-eyecatch { width: 100%; height: auto; aspect-ratio: 1200 / 630; border: 1px solid var(--rule); }
.column-list li.has-thumb { grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
.column-list li.has-thumb > div { display: grid; gap: 4px; }
.column-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border: 1px solid var(--rule); }
@media (max-width: 560px) { .column-list li.has-thumb { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; } .column-list li.has-thumb p { display: none; } }
.column-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.column-cards a { display: grid; gap: 8px; font-weight: 700; line-height: 1.5; text-decoration: none; word-break: auto-phrase; }
.column-cards a:hover span { text-decoration: underline; }
.column-cards img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border: 1px solid var(--rule); }
/* 業者ディレクトリ（/exterior/companies/。App\Support\Companies） */
.company { display: grid; gap: 28px; }
.company-kicker { margin: 0; font-weight: 700; color: var(--sub); }
.company-operator { margin: -.25em 0 .75em; color: var(--sub); }
.company-op { font-size: .85em; color: var(--sub); }
.company .dl dd { overflow-wrap: anywhere; }
.trade-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.trade-list li { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); font-weight: 700; }
.trade-list small { font-size: .75rem; font-weight: 400; color: var(--sub); padding: 1px 8px; border: 1px solid var(--rule); border-radius: 2px; }
.company-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; border-top: 1px solid var(--rule); }
.company-list li { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.company-list a { font-weight: 700; word-break: auto-phrase; }
.company-list small { color: var(--sub); font-size: .8125rem; }
.company-regions { display: flex; flex-wrap: wrap; gap: 8px; }
.company-regions a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); text-decoration: none; font-weight: 700; }
.company-regions small { color: var(--sub); font-weight: 400; }
.company-regions a { white-space: nowrap; }
.company-regions a[aria-current="page"] { border-color: var(--navy); background: var(--navy); color: #fff; }
.company-regions a[aria-current="page"] small { color: #fff; }
.company-types { margin-bottom: 24px; }
.company-types h2 { font-size: 1.125rem; margin-bottom: 10px; }
.company-types .small { margin-top: 8px; }
.company-filter-head { font-size: 1.25rem; margin: 8px 0 12px; }
/* 建設業許可の業者の一覧（外構以外。companies/licensees-index。2026-11-01） */
.licensee-search .form-grid { align-items: end; }
.licensee-results .pagination { margin-top: 20px; }
.offer-item { padding-block: 14px; border-top: 1px solid var(--rule); align-items: center; }   /* 提携企業を複数社並べるときの区切り（2026-10-31 最大2社に） */

/* 業者の口コミ（reviews/*。2026-11-01） */
.rv-stars { color: #d39b00; letter-spacing: .05em; margin-right: 6px; }
.rv-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 28px; align-items: start; padding: 16px 18px; border: 1px solid var(--rule); background: var(--surface); }
.rv-avg { margin: 0; display: flex; align-items: baseline; gap: 4px; }
.rv-avg b { font-size: 1.75rem; }
.rv-items { margin: 0; display: grid; gap: 4px; }
.rv-items > div { display: flex; justify-content: space-between; gap: 12px; font-size: .9375rem; }
.rv-items dd { margin: 0; white-space: nowrap; }
.rv-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.rv-item { padding: 14px 16px; border: 1px solid var(--rule); background: var(--surface); }
.rv-item p { margin: 0 0 4px; }
.rv-head b { margin-left: 4px; }
.rv-body { margin: 6px 0; line-height: 1.9; }
.rv-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.rv-form { display: grid; gap: 16px; max-width: 680px; }
.rv-form fieldset { border: 0; margin: 0; padding: 0; }
.rv-form legend { font-weight: 700; margin-bottom: 6px; }
.rv-form .req { margin-left: 8px; font-size: .75rem; color: #fff; background: var(--seal); padding: 1px 6px; border-radius: 3px; }
.rv-form .field-error { margin: 4px 0 0; color: var(--seal); font-size: .875rem; }
.rv-stars-input { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rv-stars-input label { position: relative; }
.rv-stars-input input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.rv-stars-input label span { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); font-weight: 700; }
.rv-stars-input input:checked + span { background: #d39b00; color: #fff; border-color: #d39b00; }
.rv-stars-input input:focus-visible + span { outline: 3px solid var(--navy); outline-offset: 2px; }
.rv-scale { flex-basis: 100%; font-size: .8125rem; }   /* 目盛りの説明は星の下の行に（2026-10-31 星と同じ箱に押し込まれていた） */
@media (max-width: 640px) { .rv-summary { grid-template-columns: 1fr; } }

/* 業者ページの上部（companies/show。2026-11-01 作り直し）：公式サイトの画面と、確かめた事実の札 */
.company-hero { display: grid; gap: 20px 32px; }
.company-hero.has-shot { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.company-hero-main { display: grid; gap: 10px; }
.company-hero h1 { margin: 0; }
.company-addr { margin: 0; color: var(--sub); display: flex; gap: 6px; align-items: baseline; }
.company-badges { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.company-badges a { display: flex; gap: 10px; align-items: center; height: 100%; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 8px; background: var(--surface); color: var(--ink); text-decoration: none; }
.company-badges a:hover { border-color: var(--navy); }
.company-badges i { font-size: 1.375rem; color: var(--sub); width: 1.5em; text-align: center; }
.company-badges span { display: grid; line-height: 1.4; }
.company-badges b { font-size: .9375rem; }
.company-badges small { font-size: .75rem; color: var(--sub); }
.company-badges .ok a { border-color: var(--ok); background: var(--ok-soft); }
.company-badges .ok i { color: var(--ok); }
.company-badges .warn a { border-color: var(--warn); background: var(--warn-soft); }
.company-badges .warn i { color: var(--warn); }
.company-shot { margin: 0; display: grid; gap: 6px; }
.company-shot img { width: 100%; height: auto; border: 1px solid var(--rule); border-radius: 8px; box-shadow: 0 12px 28px -18px rgba(19, 49, 79, .5); }
.company-shot figcaption { font-size: .75rem; color: var(--sub); }
.company-explain { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; padding: 14px 16px; border-radius: 8px; border: 1px solid var(--rule); background: var(--surface); margin-bottom: 12px; }
.company-explain > i { font-size: 1.75rem; color: var(--navy); margin-top: 2px; }
.company-explain.ok { border-color: var(--ok); background: var(--ok-soft); }
.company-explain.ok > i { color: var(--ok); }
.company-explain p { margin: 0 0 6px; }
.company-explain p:last-child { margin-bottom: 0; font-size: .9375rem; }
@media (max-width: 860px) { .company-hero.has-shot { grid-template-columns: 1fr; } .company-shot { max-width: 480px; } }

/* 記事に埋め込むツールの枠（columns/tool-frame。2026-10-31）：記事の本文と見分けがつき、操作できると分かる見た目 */
.tool-app { margin: 28px 0; border: 1px solid #c7d6e6; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: 0 18px 40px -26px rgba(19, 49, 79, .55); }
.tool-app-bar { display: flex; gap: 14px; align-items: center; padding: 14px 18px; background: linear-gradient(120deg, #173b5c, #1f4e79); color: #fff; }
.tool-app-ico { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: #ecc94b; color: #1f2f45; font-size: 1.375rem; }
.tool-app-name { margin: 0; font-size: 1.125rem; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.tool-app-tag { font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .35); }
.tool-app-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: .8125rem; color: rgba(255, 255, 255, .88); counter-reset: st; }
.tool-app-steps li { counter-increment: st; }
.tool-app-steps li::before { content: counter(st, decimal) " "; font-weight: 700; color: #ecc94b; }
.tool-app-steps li + li::before { content: "→ " counter(st, decimal) " "; }
.tool-app-body { padding: 18px; }
.tool-app-body > * > :first-child { margin-top: 0; }
/* 入力の欄：水色の操作パネル・大きい選択欄 */
.tool-app-body .ccx .cc-box, .tool-app .cfx-form, .tool-app form { background: #eef4fa; border: 0; border-radius: 12px; padding: 16px; }
.tool-app select, .tool-app input[type="text"], .tool-app input[type="number"], .tool-app input[type="search"] {
  min-height: 50px; font-size: 1.0625rem; border: 2px solid #b9cde2; border-radius: 10px; padding: 0 12px; background-color: #fff; color: #1b2430; cursor: pointer; }
.tool-app select:hover { border-color: #1f4e79; }
.tool-app select:focus-visible, .tool-app input:focus-visible { outline: 3px solid #ecc94b; outline-offset: 1px; border-color: #1f4e79; }
.tool-app .cc-lbl { font-weight: 700; color: #173b5c; }
.tool-app .cc-stat { border-radius: 12px; }
.tool-app .cc-stat .v { font-size: 1.75rem; }
@media (max-width: 560px) { .tool-app-body { padding: 12px; } .tool-app-bar { padding: 12px 14px; } }

/* ---- 見積りの依頼（見積書なし。/{category}/request。2026-10-31）---- */
.rq-steps { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9375rem; color: var(--sub); }
.rq-steps li { display: inline-flex; align-items: center; gap: 8px; }
.rq-steps span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--rule); font-size: .8125rem; font-weight: 700; }
.rq-steps .on { color: var(--ink); font-weight: 700; }
.rq-steps .on span, .rq-steps .done span { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }
.rq-partners { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.rq-partners li { border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); padding: 10px 14px; }
.rq-partner { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.rq-partner input { flex: none; width: 22px; height: 22px; margin: 4px 0 0; accent-color: var(--navy); }
.rq-partner > span { display: grid; gap: 2px; min-width: 0; }
.rq-web { margin: 4px 0 0 34px; }
.rq-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 4px 0 0; }
.rq-dl dt { font-size: .875rem; color: var(--sub); font-weight: 700; }
.rq-dl dd { margin: 0; }

/* ---- パートナー企業の見積書（作る・編集・確認・お客様の画面。設計書 §9.12） ---------------------------------- */
.pq-wrap { padding: 20px 24px 48px; display: grid; gap: 16px; max-width: 1480px; }
.pq-crumbs a { display: inline-flex; align-items: center; gap: 6px; }
.pq-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.pq-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.pq-main { display: grid; gap: 16px; min-width: 0; }
.pq-side { position: sticky; top: calc(var(--top-h) + 12px); min-width: 0; }
@media (max-width: 1180px) { .pq-grid { grid-template-columns: minmax(0, 1fr); } .pq-side { position: static; } }
.pq-title { max-width: 520px; }
.pq-lines { width: 100%; min-width: 1060px; border-collapse: collapse; font-size: .875rem; }
.pq-lines th { font-size: .8125rem; color: var(--sub); text-align: left; padding: 4px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.pq-lines td { padding: 4px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.pq-lines input, .pq-lines select { width: 100%; min-height: 38px; padding: 4px 6px; font-size: .875rem; }
.pq-lines input.r, .pq-sums input.r { text-align: right; }
.pq-lines input.auto { background: var(--bg); color: var(--ink); }
.pq-c-no { width: 2.6em; color: var(--sub); text-align: center; }
.pq-c-code { width: 150px; } .pq-c-item { width: 190px; } .pq-c-spec { width: 190px; } .pq-c-num { width: 100px; } .pq-c-unit { width: 64px; } .pq-c-note { width: 140px; }
.pq-c-ops { width: 112px; white-space: nowrap; }
.pq-op { font: inherit; width: 34px; height: 34px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--sub); cursor: pointer; }
.pq-op:hover { color: var(--navy); border-color: var(--navy); }
.pq-op.del:hover { color: var(--seal); border-color: var(--seal); }
.pq-sums { display: grid; gap: 6px; justify-self: end; width: min(100%, 360px); margin: 0; }
.pq-sums > div { display: grid; grid-template-columns: 1fr 160px; align-items: center; gap: 10px; }
.pq-sums dt { font-weight: 700; color: var(--sub); }
.pq-sums dd { margin: 0; text-align: right; }
.pq-sum-total { border-top: 2px solid var(--ink); padding-top: 6px; }
.pq-sum-total dt, .pq-sum-total dd { color: var(--ink); font-size: 1.125rem; font-weight: 700; }
.pq-terms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.pq-terms-wide { grid-column: 1 / -1; }
@media (max-width: 760px) { .pq-terms { grid-template-columns: minmax(0, 1fr); } }
.pq-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pq-adv { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .9375rem; }
.pq-adv li { padding-bottom: 8px; border-bottom: 1px dashed var(--rule); }
.pq-checks { margin: 0; }
.pq-state { display: grid; gap: 4px; }
.pq-make { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pq-make-opt { display: grid; gap: 8px; align-content: start; border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; background: var(--bg); }
.pq-make-opt h4 { font-size: 1rem; margin: 0; display: flex; gap: 8px; align-items: center; }
.pq-make-opt h4 i { color: var(--navy); }
.pq-make-opt .btn { justify-self: start; }
.pq-link { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.pq-confirm { max-width: 960px; }

/* 見積書（お客様の画面・確認の画面で同じ。印刷できる） */
.pq-doc { background: #fff; color: #1d2733; border: 1px solid var(--rule); border-radius: 6px; padding: 32px 36px; display: grid; gap: 18px; max-width: 960px; }
.pq-doc .small, .pq-doc .muted { color: #4a5663; }
.pq-doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.pq-doc-title { font-size: 1.75rem; letter-spacing: .4em; border: 0; padding: 0 0 6px; margin: 0 0 10px; border-bottom: 3px double #1d2733; color: #1d2733; }
.pq-doc-to { font-size: 1.25rem; border-bottom: 1px solid #1d2733; padding-bottom: 2px; margin: 0 0 8px; }
.pq-doc-subject, .pq-doc-site { margin: 0; }
.pq-doc-meta { display: grid; gap: 10px; min-width: 240px; }
.pq-doc-meta dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 0; font-size: .9375rem; }
.pq-doc-meta dt { color: #4a5663; }
.pq-doc-meta dd { margin: 0; }
.pq-doc-from p { margin: 0; font-size: .9375rem; }
.pq-doc-tag { margin-top: 6px !important; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pq-doc-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; border: 2px solid #1d2733; padding: 10px 16px; margin: 0; max-width: 520px; }
.pq-doc-total span { font-weight: 700; }
.pq-doc-total b { font-size: 1.75rem; }
.pq-doc-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: .9375rem; }
.pq-doc-table th, .pq-doc-table td { border: 1px solid #b9c2cb; padding: 6px 8px; vertical-align: top; text-align: left; }
.pq-doc-table thead th { background: #eef2f6; font-size: .8125rem; }
.pq-doc-table .r { text-align: right; white-space: nowrap; }
.pq-doc-table tfoot th { text-align: right; font-weight: 700; background: #f7f9fb; }
.pq-doc-sum th, .pq-doc-sum td { font-size: 1.0625rem; font-weight: 700; }
.pq-doc-terms { display: grid; grid-template-columns: 9em 1fr; gap: 4px 12px; margin: 0; }
.pq-doc-terms dt { font-weight: 700; }
.pq-doc-terms dd { margin: 0; }
.pq-doc-foot { border-top: 1px solid #b9c2cb; padding-top: 10px; margin: 0; }
@media (max-width: 560px) { .pq-doc { padding: 18px 16px; } .pq-doc-terms { grid-template-columns: minmax(0, 1fr); } .pq-doc-title { font-size: 1.375rem; } }
@media print {
  .pq-noprint, .site-head, .foot, .crumbs, .pt-top, .pt-side, .imp-bar, .skip { display: none !important; }
  body { background: #fff !important; }
  .pq-doc { border: 0; padding: 0; max-width: none; }
  .pq-doc-scroll { overflow: visible !important; }
  .pq-doc-table { min-width: 0; }
}

/* ===== トップとLPの「診断の仕組み」「安心」「よくある質問」（2026-10-31 淡泊だったので作り直し） ===== */
/* 安心の帯：濃紺の帯を画面いっぱいに（.lp-band と同じ書き方）。濃紺はダークモードでも同じ */
.trust-band { --band: #13314f; position: relative; box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); background: var(--band);
  color: #fff; padding-block: 64px; display: grid; gap: 28px; }
.trust-band::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 80% at 85% 0%, rgba(236, 201, 75, .14), transparent 60%), radial-gradient(50% 70% at 0% 100%, rgba(134, 175, 214, .16), transparent 60%); }
.trust-band > * { position: relative; z-index: 1; }
.trust-band-head { display: grid; gap: 10px; }
.trust-band-eyebrow { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 700; letter-spacing: .08em; color: #ecc94b; }
.trust-band h2 { margin: 0; padding: 0; border: 0; color: #fff; font-size: clamp(1.5rem, 3.4vw, 2.125rem); line-height: 1.4; text-wrap: balance; }
.trust-band-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.trust-band-list li { display: grid; gap: 8px; align-content: start; padding: 24px 20px 22px; border-radius: 12px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); }
.trust-band-list li > i { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 1.25rem; color: #13314f; background: #ecc94b; }
.trust-band-key { display: block; margin-top: 6px; font-size: clamp(1.375rem, 2.4vw, 1.75rem); line-height: 1.3; color: #ecc94b; letter-spacing: .02em; }
.trust-band-list h3 { margin: 0; font-size: 1rem; color: #fff; }
.trust-band-list p { margin: 0; font-size: .9375rem; line-height: 1.75; color: rgba(255, 255, 255, .82); }
@media (max-width: 960px) { .trust-band-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .trust-band { padding-block: 48px; }
  .trust-band-list { grid-template-columns: 1fr; gap: 12px; }
  .trust-band-list li { grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; padding: 18px 16px; }
  .trust-band-list li > i { grid-row: span 3; }
  .trust-band-key { margin-top: 0; }
}

/* よくある質問：PC は左に見出しと申し込み、右に質問（2段組） */
.faq-sec { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); column-gap: 40px; align-items: start; }
.faq-side { display: grid; gap: 16px; align-content: start; position: sticky; top: 24px; }
.faq-side > h2 { margin: 0; }
.faq-cta { display: grid; gap: 10px; padding: 20px; border-radius: 12px; background: var(--navy-soft); border: 1px solid var(--rule); }
.faq-cta > i { font-size: 1.75rem; color: var(--navy); }
.faq-cta p { margin: 0; color: var(--sub); font-size: .9375rem; }
.faq-cta p b { display: block; color: var(--ink); font-size: 1.0625rem; margin-bottom: 4px; }
.faq-cta .btn { justify-self: stretch; }
.faq-sec .faq { background: transparent; border: 0; gap: 10px; }
.faq-sec .faq details { background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; transition: border-color .15s, box-shadow .15s; }
.faq-sec .faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq-sec .faq details[open] { border-color: var(--navy); box-shadow: 0 6px 18px rgba(19, 49, 79, .08); }
.faq-sec .faq summary { padding: 18px 20px; font-size: 1.0625rem; }
@media (max-width: 860px) {
  .faq-sec { grid-template-columns: 1fr; }
  .faq-side { position: static; }
  .faq-cta { display: none; }   /* スマホは画面下の申し込みボタンがあるので出さない */
}
@media (prefers-reduced-motion: reduce) { .faq-sec .faq details { transition: none; } }

/* ===== パートナーの選定基準（/partners/criteria。2026-10-31 安心感が出るように作り直し） ===== */
.pc-hero { --band: #13314f; position: relative; box-shadow: 0 0 0 100vmax var(--band); clip-path: inset(0 -100vmax); background: var(--band); color: #fff;
  padding-block: 48px 52px; margin-bottom: 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.pc-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(50% 90% at 90% 10%, rgba(236, 201, 75, .16), transparent 60%), radial-gradient(40% 70% at 0% 100%, rgba(134, 175, 214, .18), transparent 60%); }
.pc-hero > * { position: relative; }
.pc-hero-body { display: grid; gap: 14px; }
.pc-eyebrow { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 700; letter-spacing: .08em; color: #ecc94b; }
.pc-hero h1 { margin: 0; color: #fff; font-size: clamp(1.75rem, 4.4vw, 2.5rem); line-height: 1.3; }
.pc-lead { margin: 0; max-width: 40em; color: rgba(255, 255, 255, .88); line-height: 1.9; }
.pc-stats { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 640px; }
.pc-stats li { display: grid; gap: 4px; padding: 14px 16px; border-radius: 10px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18); }
.pc-stats b { font-size: 1.75rem; line-height: 1.1; color: #ecc94b; }
.pc-stats b small { font-size: .9375rem; margin-left: 2px; }
.pc-stats span { font-size: .8125rem; color: rgba(255, 255, 255, .85); }
.pc-seal { position: relative; width: 180px; height: 180px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, rgba(236, 201, 75, .22), rgba(236, 201, 75, .04) 70%); border: 2px solid rgba(236, 201, 75, .5); }
.pc-seal > i { font-size: 92px; color: #ecc94b; grid-area: 1 / 1; }
.pc-seal .pc-seal-check { font-size: 38px; color: #13314f; grid-area: 1 / 1; }
.pc-crits { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pc-crit { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; padding: 22px 22px; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); }
.pc-crit.is-req { border-left: 6px solid var(--navy); }
.pc-crit-ico { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 1.375rem; background: var(--navy-soft); color: var(--navy); }
.pc-crit-body { display: grid; gap: 8px; }
.pc-crit-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pc-crit-head h3 { margin: 0; font-size: 1.1875rem; }
.pc-crit-body > p { margin: 0; color: var(--sub); line-height: 1.85; }
.pc-tag { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pc-tag.req { background: var(--navy); color: var(--on-navy); }
.pc-tag.opt { background: var(--surface); color: var(--navy); border: 1px solid var(--navy); }
.pc-crit-body > .pc-crit-note { color: var(--ok); font-weight: 700; font-size: .9375rem; display: flex; gap: 6px; align-items: baseline; }
.pc-crit-body > .pc-crit-cycle { font-size: .8125rem; display: flex; gap: 6px; align-items: baseline; }
.pc-flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; counter-reset: pcf; }
.pc-flow li { counter-increment: pcf; position: relative; display: grid; gap: 6px; align-content: start; padding: 18px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--rule); text-align: center; }
.pc-flow li > i { justify-self: center; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--on-navy); font-size: 1.125rem; }
.pc-flow b::before { content: counter(pcf) ". "; color: var(--navy); }
.pc-flow span { font-size: .8125rem; color: var(--sub); line-height: 1.7; text-align: left; }
.pc-flow li + li::after { content: ""; position: absolute; left: -10px; top: 40px; width: 8px; height: 8px; border-top: 2px solid var(--navy); border-right: 2px solid var(--navy); transform: rotate(45deg); }
.pc-promises { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pc-promises li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 20px; border-radius: 12px; background: var(--navy-soft); }
.pc-promises li > i { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--navy); font-size: 1.125rem; }
.pc-promises h3 { margin: 0 0 6px; font-size: 1.0625rem; }
.pc-promises p { margin: 0; color: var(--sub); font-size: .9375rem; line-height: 1.8; }
@media (max-width: 900px) {
  .pc-flow { grid-template-columns: 1fr; }
  .pc-flow li { grid-template-columns: 48px minmax(0, 1fr); text-align: left; column-gap: 14px; }
  .pc-flow li > i { grid-row: span 2; }
  .pc-flow li + li::after { left: 38px; top: -9px; transform: rotate(135deg); }
  .pc-promises { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .pc-hero { grid-template-columns: 1fr; padding-block: 36px 40px; }
  .pc-seal { display: none; }
  .pc-stats { grid-template-columns: 1fr; }
  .pc-stats li { grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 14px; }
  .pc-crit { grid-template-columns: 1fr; padding: 18px; }
}
/* 指摘の本文を「ここに注意」として出す（2026-10-31） */
.find-note b { display: inline-flex; align-items: center; gap: 6px; margin-right: 8px; font-size: .8125rem; color: var(--seal); }

/* 記事の本文の上の入口（columns/top-cta。2026-10-31）：AI 診断（黄）と厳選パートナー見積り（白地・濃紺） */
.col-entry { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; margin: 4px 0 20px; padding: 14px; border-radius: 12px; background: #13314f; }
.col-entry-btn { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 60px; padding: 8px 14px; border-radius: 10px;
  text-decoration: none; line-height: 1.35; transition: transform .12s ease, box-shadow .12s ease; }
.col-entry-btn > i:first-child { font-size: 1.25rem; }
.col-entry-btn span { display: grid; }
.col-entry-btn small { font-size: .75rem; font-weight: 700; }
.col-entry-btn b { font-size: 1.0625rem; white-space: nowrap; }
.col-entry-btn.is-check { background: #ecc94b; color: #1f2f45; box-shadow: 0 3px 0 #b8952a; }
.col-entry-btn.is-req { background: #fff; color: #13314f; box-shadow: 0 3px 0 #9fb4c9; }
.col-entry-btn.is-req small { color: #4a5563; }
.col-entry-btn:active { transform: translateY(2px); box-shadow: none; }
.col-entry-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.col-entry-max { padding: 3px 9px; border-radius: 999px; background: #ecc94b; color: #1f2f45; font-size: .75rem; font-weight: 700; white-space: nowrap; }
.col-entry-note { grid-column: 1 / -1; margin: 0; font-size: .8125rem; color: rgba(255, 255, 255, .85); }
.col-entry-note a { color: #fff; }
.col-entry-note .pr-tag { background: transparent; color: #ecc94b; border-color: #ecc94b; }
@media (max-width: 640px) { .col-entry { grid-template-columns: 1fr; padding: 12px; } }
@media (prefers-reduced-motion: reduce) { .col-entry-btn { transition: none; } }
