:root {
  --bg: #eef1f5; --card: #fff; --text: #1b2330; --muted: #5a6878; --line: #d2dbe5; --soft: #f1f5f9;
  --accent: #1e2f4f; --accent-soft: #e6edf5; --blue: #56799f; --blue-lt: #dde6f0; --wine: #7a2336;
  --req: #e3ebf4; --auto: #fbf3e4; --subj: #f6f0f2;
  --plus: #1a5a3a; --minus: #7a2336; --warn-bg: #f9eef0;
  --land: #7a2336; --house: #56799f; --rc: #2e4a70; --mansion: #1e2f4f;
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.6 "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.35; }
.muted { color: var(--muted); font-size: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }
.r { text-align: right; }

/* ナビ */
.topnav { background: var(--accent); position: sticky; top: 0; z-index: 10; border-bottom: 3px solid var(--blue); }
.topnav nav { max-width: 1180px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 2px; padding: 0 8px; }
.topnav button, .topnav a { background: none; border: 0; color: #fff; padding: 10px 14px; cursor: pointer; text-decoration: none; font-weight: bold; font-size: 14px; }
.topnav button.active { background: rgba(255, 255, 255, .2); }
.topnav a { margin-left: auto; font-weight: normal; opacity: .9; }
main { max-width: 1180px; margin: 0 auto; padding: 16px; }

/* ボタン */
button, .btn { border: 0; border-radius: 6px; background: var(--accent); color: #fff; padding: 8px 16px; cursor: pointer; display: inline-block; }
button.sub, .btn.sub { background: #fff; color: var(--text); border: 1px solid var(--line); }
button.sm { padding: 5px 12px; font-size: 13px; }
button.xs { padding: 2px 8px; font-size: 12px; }
button:hover { filter: brightness(.96); }

/* TOP */
.hero { text-align: center; margin: 16px 0 24px; }
.hero h1 { margin: 0; font: 700 32px/1.4 "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; letter-spacing: .08em; color: var(--accent); }
.hero .en { letter-spacing: .35em; font-size: 11px; color: var(--blue); margin: 0 0 4px; }
.hero p { margin: 4px 0 0; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.tile { min-height: 150px; border-radius: 8px; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 22px; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); }
.tile small { font-size: 13px; border-top: 1px solid rgba(255, 255, 255, .5); padding-top: 6px; }
.tile-land { background: var(--land); } .tile-house { background: var(--house); } .tile-rc { background: var(--rc); } .tile-mansion { background: var(--mansion); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.card h2 { margin: 0 0 8px; font-size: 16px; }

/* 査定画面 */
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.kind-title { margin: 0; font-size: 22px; border-left: 6px solid; padding-left: 10px; }
.kind-title small { font-size: 13px; color: var(--muted); font-weight: normal; margin-left: 10px; }
.kind-land { border-color: var(--land); } .kind-house { border-color: var(--house); } .kind-rc { border-color: var(--rc); } .kind-mansion { border-color: var(--mansion); }
.bar { background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
.bar h2 { margin: 0 0 8px; font-size: 20px; font-weight: normal; }
.formula-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.formula-bar > div { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); }
.formula-bar > b { font-size: 16px; color: var(--muted); }
.formula-bar i { font-style: normal; text-align: right; }
.formula-bar .frac hr { margin: 2px 0; border: 0; border-top: 1px solid var(--muted); }
.formula-bar .final span { color: var(--minus); font-weight: bold; }
output.auto, .auto output { display: inline-block; min-width: 72px; background: var(--auto); border: 1px solid #ead9b6; border-radius: 4px; padding: 3px 8px; color: var(--text); font-variant-numeric: tabular-nums; }
output.big { font-size: 18px; font-weight: bold; min-width: 110px; }
output.pt { display: inline-block; min-width: 54px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
output.pt[data-state="plus"] { color: var(--plus); } output.pt[data-state="minus"], output[data-state="minus"] { color: var(--minus); }
.req-note { font-size: 12px; color: var(--muted); margin: 4px 0 8px; }
.req-note .req, .req-note .auto { padding: 1px 6px; border-radius: 3px; background: var(--req); }
.req-note .auto { background: var(--auto); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { background: #fff; color: var(--accent); border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; padding: 7px 12px; font-size: 13px; }
.tabs button.active { background: var(--card); color: var(--text); font-weight: bold; position: relative; top: 1px; }
.tab-body { background: var(--card); border: 1px solid var(--line); border-top: 0; padding: 16px; border-radius: 0 0 8px 8px; }
.tab-body h3 { font-size: 16px; margin: 20px 0 8px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.tab-body h4 { font-size: 14px; margin: 14px 0 4px; }
.pager { display: flex; justify-content: space-between; margin: 12px 0 40px; }
.note-box { background: #f5f8ec; border-radius: 6px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.warn-text { color: var(--minus); font-size: 12px; display: block; }
output.warn-block:not(:empty) { display: block; background: var(--warn-bg); color: var(--minus); padding: 10px 14px; border-radius: 6px; margin: 12px 0; font-weight: bold; }
.warnings { color: var(--minus); background: var(--warn-bg); border-radius: 6px; padding: 8px 8px 8px 28px; margin: 8px 0 0; font-size: 13px; }

/* 入力 */
input, select, textarea { border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; background: #fff; max-width: 100%; }
select { width: 100%; }
textarea { width: 100%; resize: vertical; }
.inp { display: inline-flex; align-items: center; gap: 4px; }
.inp input { width: 100%; min-width: 80px; }
.inp i { font-style: normal; color: var(--muted); white-space: nowrap; font-size: 12px; }
td .inp, label .inp { display: flex; }
.lbl { font-size: 12px; color: var(--muted); margin-right: 6px; }
.chk { display: flex; gap: 6px; align-items: baseline; margin: 4px 0; cursor: pointer; }
.chk.top { align-items: flex-start; }
.chk input { width: auto; }

/* 左右比較表 */
.scroll { overflow-x: auto; }
table.side { border-collapse: collapse; width: 100%; min-width: 720px; }
table.side th, table.side td { border-bottom: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: middle; }
table.side thead th { font-weight: normal; font-size: 15px; background: #fff; }
table.side thead th.lead { font-weight: bold; font-size: 17px; }
table.side tbody th { font-weight: normal; width: 200px; font-size: 13px; }
table.side tbody th small { display: block; color: var(--muted); font-size: 11px; }
table.side th.req { background: var(--req); }
table.side td:nth-child(2), table.side th.subj { background: var(--subj); }
table.side tr.subhead th { font-weight: bold; font-size: 15px; padding-top: 14px; }
table.side td.na { background: transparent; }
.scorebox { float: right; font-size: 12px; font-weight: bold; }
.case-tools { display: flex; gap: 4px; margin-top: 4px; clear: both; }
.fc { display: flex; gap: 6px; align-items: center; }
.fc select, .fc .inp { flex: 1; }
.auto-cell { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* フォーム（建物） */
.formbox { display: grid; grid-template-columns: 200px 1fr; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin: 8px 0; }
.formbox > .fl { background: var(--req); padding: 10px; font-size: 13px; }
.formbox > div:last-child { padding: 8px 12px; }
.formgrid { display: grid; grid-template-columns: 220px 1fr; gap: 6px 12px; align-items: center; margin: 8px 0; }
.fl { font-size: 13px; }
.fl.req { background: var(--req); padding: 4px 8px; border-radius: 4px; }
.fl small { display: block; color: var(--muted); font-size: 11px; }
fieldset { border: 1px solid var(--line); border-radius: 6px; margin: 12px 0; }
legend { font-size: 13px; padding: 0 6px; }
.rate-head { text-align: right; font-weight: bold; }
.flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; list-style: none; padding: 0; }
.flow li { background: var(--accent-soft); border-radius: 6px; padding: 8px; display: flex; flex-direction: column; }
.flow li b { color: var(--accent); font-size: 12px; } .flow li small { color: var(--muted); font-size: 11px; }

/* 流通性比率 */
.liq { display: grid; grid-template-columns: 260px 1fr; gap: 12px; background: var(--subj); border-radius: 6px; padding: 12px; }
.liq-total { display: flex; flex-direction: column; gap: 4px; }
.liq-total small { color: var(--muted); font-size: 11px; }
.liq-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 16px; }
.liq-items label { display: flex; flex-direction: column; font-size: 13px; }
.liq-items small { color: var(--muted); font-size: 11px; }
.ta { background: var(--soft); border-radius: 6px; padding: 8px; }

/* 提案書 */
.refs { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.ref { background: var(--soft); border-radius: 6px; padding: 10px; }
.ref label { display: grid; grid-template-columns: 130px 1fr; align-items: center; gap: 8px; font-size: 13px; margin: 4px 0; }
.grid2 { display: grid; grid-template-columns: minmax(240px, 320px) 1fr; gap: 16px; }
.grid2 label { display: flex; flex-direction: column; font-size: 13px; margin-bottom: 6px; }

/* 一覧表 */
table.list { border-collapse: collapse; width: 100%; margin: 6px 0 10px; }
table.list th, table.list td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; font-size: 13px; }
table.list thead th { background: var(--soft); font-weight: normal; }
table.list.center td, table.list.center th { text-align: center; vertical-align: middle; }
table.list.center td.l { text-align: left; }
table.list td.r, table.list th.r { text-align: right; }
table.list tr.sum td, table.list tr.grp td { background: var(--soft); font-weight: bold; }
table.list.grade td { width: 28%; }
.ptv { float: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* モーダル */
dialog { border: 0; border-radius: 10px; padding: 0; width: min(640px, calc(100vw - 32px)); box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(0, 0, 0, .35); }
dialog header { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); }
dialog header h3 { margin: 0; font-size: 16px; }
.dlg-body { padding: 12px 16px; max-height: 70vh; overflow: auto; }
.picklist { list-style: none; padding: 0; margin: 0; }
.picklist li { display: flex; gap: 6px; align-items: flex-start; margin-bottom: 6px; }
button.pick { flex: 1; text-align: left; background: var(--soft); color: var(--text); border: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }

/* グラフ */
.chart { margin: 8px 0; }
.chart figcaption { font-size: 13px; margin-bottom: 4px; }
.chart figcaption span { color: var(--muted); }
.chart svg { width: 100%; max-width: 560px; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--accent); stroke: var(--card); stroke-width: 2; }
.chart .hit { fill: transparent; }
.chart .pt:hover .dot { r: 6; }
.chart .label { fill: var(--text); font-size: 12px; font-weight: bold; }

/* 査定書 */
.report { max-width: 820px; margin: 16px auto 0; }
.rp-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 3px solid var(--accent); padding-bottom: 8px; }
.rp-head h2 { margin: 0; font-size: 26px; letter-spacing: .1em; }
.rp-head .kind { margin: 0; color: var(--muted); }
.rp-head .to { font-size: 18px; border-bottom: 1px solid var(--text); display: inline-block; min-width: 220px; margin: 12px 0 0; }
.rp-head .meta { text-align: right; font-size: 12px; }
.lead-text { font-size: 16px; font-weight: bold; }
.price { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 12px 0; }
.price div { border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; }
.price span { font-size: 12px; color: var(--muted); }
.price strong { font-size: 30px; color: var(--accent); }
.price strong small { font-size: 14px; margin-left: 2px; }
.price b { font-size: 16px; }
.formula { background: var(--soft); border-radius: 6px; padding: 8px 12px; }
table.kv { border-collapse: collapse; width: 100%; margin: 6px 0 10px; }
table.kv th, table.kv td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; font-size: 13px; }
table.kv th { width: 170px; background: var(--soft); font-weight: normal; }
.comment { background: var(--soft); border-radius: 6px; padding: 10px 12px; }
.disclaimer { font-size: 11px; color: var(--muted); margin-top: 20px; border-top: 1px solid var(--line); padding-top: 8px; }

@media (max-width: 720px) {
  .formbox, .formgrid, .liq, .grid2 { grid-template-columns: 1fr; }
  .ref label { grid-template-columns: 1fr; }
  .topnav a { margin-left: 0; }
}
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 12px; }
  .no-print, .topnav, .tabs, .pager, .bar, .req-note { display: none !important; }
  main { padding: 0; max-width: none; }
  .tab-body { border: 0; padding: 0; }
  .report { max-width: none; margin: 0; }
  table, figure { break-inside: avoid; }
  h3, h4 { break-after: avoid; }
}

/* アプリ化・Excel */
button.excel { background: #1d6f42; }
button.pdf { background: var(--wine); }
.update { background: #fff4dc; border-bottom: 1px solid #f1dcae; text-align: center; padding: 8px; font-size: 13px; }
.update button { margin-left: 8px; }
.card.install { border-color: var(--accent); background: var(--accent-soft); }
.topnav a.back { margin-left: 0; }
main.doc { max-width: 860px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 24px 32px; margin: 16px auto; }
main.doc h1 { font-size: 24px; } main.doc h2 { font-size: 19px; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-top: 32px; }
main.doc table { border-collapse: collapse; width: 100%; margin: 8px 0; }
main.doc th, main.doc td { border: 1px solid var(--line); padding: 5px 8px; text-align: left; font-size: 13px; vertical-align: top; }
main.doc th { background: var(--soft); }
main.doc pre { background: var(--soft); padding: 10px 12px; border-radius: 6px; overflow-x: auto; font-size: 12px; }
main.doc code { font-size: 12px; }
main.doc blockquote { margin: 8px 0; padding: 8px 14px; background: #fff4dc; border-left: 4px solid #e08a14; }
@media (display-mode: standalone) { .topnav { padding-top: env(safe-area-inset-top); } }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: #1d2330; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13px; max-width: calc(100vw - 32px); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); z-index: 20; }

/* 戸建建物（1ページ） */
.jump { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 42px); z-index: 5; display: flex; flex-wrap: wrap; gap: 4px; background: var(--card); padding: 8px 0; margin: -4px 0 8px; border-bottom: 1px solid var(--line); }
.hsec { padding: 8px 0 20px; scroll-margin-top: 110px; }
.hsec + .hsec { border-top: 1px solid var(--line); }
.hsec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.hsec-head h2 { margin: 12px 0 8px; font-size: 22px; font-weight: normal; }
.hsec-right { font-size: 13px; font-weight: bold; }
.req-chip { color: var(--minus); background: var(--req); padding: 2px 8px; border-radius: 4px; font-size: 13px; }
details.fold { border: 1px solid var(--line); border-radius: 6px; margin: 10px 0; padding: 0 12px; background: var(--card); }
details.fold > summary { cursor: pointer; padding: 8px 0; font-weight: bold; }
details.fold[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
table.grade2 th[rowspan] { min-width: 8.5em; background: var(--soft); font-weight: normal; }
table.grade2 { min-width: 760px; }
table.grade2 td { width: 27%; }
table.grade2 td.sublabel { min-width: 6.5em; color: var(--muted); white-space: nowrap; }
table.grade2 tr.rate-row td { background: var(--soft); font-size: 12px; }
table.grade2 td.c { text-align: center; }
output.wide { min-width: 220px; }
.auto-val { display: inline-block; min-width: 180px; background: var(--auto); border: 1px solid #f1dcae; border-radius: 4px; padding: 3px 8px; }
.auto-val.big { min-width: 100px; font-weight: bold; text-align: right; }
button.on { outline: 2px solid var(--accent); }
.row.end { justify-content: flex-end; margin-top: 16px; }

/* 完了画面 */
.done { text-align: center; display: grid; gap: 10px; padding: 4px 8px 12px; }
.done p { margin: 0; }
.done .muted { text-align: left; background: var(--soft); border-radius: 6px; padding: 8px 12px; }
button.big { font-size: 18px; padding: 14px 24px; border-radius: 8px; margin-top: 10px; justify-self: center; min-width: 280px; }

/* 簡易結果PDFの紙面（画面外で組んで画像化する） */
.p-host { position: fixed; left: -10000px; top: 0; width: 794px; }
.p-page { width: 794px; height: 1123px; background: #fff; color: #1b2330; position: relative; overflow: hidden; font: 11px/1.55 "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif; margin-bottom: 20px; }
.p-head { position: absolute; left: 0; right: 0; top: 0; height: 92px; background: #1e2f4f; color: #fff; border-bottom: 5px solid #56799f; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 56px 14px; }
.p-head small { letter-spacing: .35em; font-size: 9px; color: #a9bdd3; }
.p-head h1 { margin: 2px 0 0; font: 700 22px/1.2 "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; letter-spacing: .08em; }
.p-no { font-size: 11px; color: #dde6f0; }
.p-body { position: absolute; left: 56px; right: 56px; top: 118px; height: 935px; overflow: hidden; }
.p-host > .p-body { width: 682px; height: auto; }
.p-foot { position: absolute; left: 56px; right: 56px; bottom: 26px; border-top: 1px solid #dde6f0; padding-top: 6px; display: flex; justify-content: space-between; font-size: 9px; color: #5a6878; }
.p-price { border: 1px solid #56799f; border-left: 5px solid #1e2f4f; padding: 12px 16px; margin-bottom: 10px; }
.p-total { font-size: 14px; }
.p-total b { font: 700 26px/1 "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; color: #7a2336; border-bottom: 1px solid #7a2336; padding: 0 8px; }
.p-cap { margin: 10px 0 6px; color: #1e2f4f; font-weight: 700; }
.p-formula { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.p-formula em { font-style: normal; font-size: 15px; color: #5a6878; padding-bottom: 6px; }
.p-box { display: flex; flex-direction: column; font-size: 10px; color: #5a6878; }
.p-box div { display: flex; align-items: baseline; gap: 3px; }
.p-box b { border: 1px solid #56799f; min-width: 78px; padding: 3px 8px; text-align: right; color: #1b2330; font-size: 13px; font-variant-numeric: tabular-nums; }
.p-box i, .p-step i { font-style: normal; }
.p-frac { display: flex; flex-direction: column; align-items: center; font-size: 9px; color: #5a6878; }
.p-frac b { border: 1px solid #56799f; min-width: 56px; text-align: center; color: #1b2330; font-size: 12px; padding: 1px 6px; }
.p-frac hr { width: 100%; margin: 2px 0; border: 0; border-top: 1px solid #1b2330; }
.p-t { width: 100%; border-collapse: collapse; margin: 6px 0 12px; font-size: 10.5px; }
.p-t th { background: #56799f; color: #fff; font-weight: 500; padding: 4px 6px; border: 1px solid #56799f; text-align: center; }
.p-t td { border: 1px solid #c9d6e4; padding: 3px 6px; vertical-align: top; }
.p-t td.r, .p-t th.r { text-align: right; font-variant-numeric: tabular-nums; }
.p-t td.small { font-size: 9px; color: #3d4a59; }
.p-t td.ind { padding-left: 14px; }
.p-t td.neg { color: #7a2336; }
.p-t tr.p-sec td { background: #1e2f4f; color: #fff; font-weight: 700; border-color: #1e2f4f; }
.p-t tr.p-sub td { background: #dde6f0; color: #1e2f4f; font-weight: 700; }
.p-t tr.p-total-row td { background: #f1f5f9; font-weight: 700; border-top: 2px solid #1e2f4f; }
.p-h { font: 700 15px/1.3 "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; color: #1e2f4f; border-left: 5px solid #56799f; padding-left: 8px; margin: 0 0 12px; }
.p-flow { display: grid; gap: 0; margin: 10px 0 14px; padding-left: 8px; border-left: 3px solid #1e2f4f; }
.p-step { display: grid; grid-template-columns: 260px 140px auto; align-items: center; gap: 8px; margin: 6px 0; }
.p-step span { background: #f1f5f9; border: 1px solid #c9d6e4; padding: 6px 10px; font-weight: 700; color: #1e2f4f; }
.p-step b { border: 1px solid #c9d6e4; padding: 6px 10px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.p-step.strong span { background: #1e2f4f; color: #fff; border-color: #1e2f4f; }
.p-step.strong b { border-color: #1e2f4f; color: #7a2336; font-size: 15px; }
.p-side { display: grid; grid-template-columns: 300px 110px; gap: 8px; margin: 2px 0 2px 120px; font-size: 10px; align-items: center; }
.p-side::before { content: ""; }
.p-side span { background: #dde6f0; padding: 4px 10px; color: #1e2f4f; }
.p-side b { border: 1px solid #c9d6e4; padding: 4px 10px; text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.p-side { grid-template-columns: 0 300px 130px; }
.p-side.plus span { background: #56799f; color: #fff; }
.p-note { font-size: 9px; color: #5a6878; margin: 4px 0; }
.p-warn { color: #7a2336; font-weight: 700; border: 1px solid #7a2336; padding: 8px 12px; }

dialog.wide { width: min(900px, calc(100vw - 32px)); }
.manual-body table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 13px; }
.manual-body th, .manual-body td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; vertical-align: top; }
.manual-body pre { background: var(--soft); padding: 8px; overflow-x: auto; font-size: 12px; }
.topnav button[data-act="manual"] { margin-left: auto; font-weight: normal; opacity: .9; }

/* 編集モード */
.topnav .nav-edit { font-weight: normal; opacity: .85; }
.tab-body.ed h3 { margin-top: 8px; }
.ed-block { padding: 4px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.ed-table { border-collapse: collapse; margin: 6px 0; }
.ed-table th { background: var(--soft); font-weight: normal; font-size: 12px; padding: 4px 8px; text-align: left; border: 1px solid var(--line); }
.ed-table td { border: 1px solid var(--line); padding: 3px 6px; vertical-align: top; }
.ed-table input[type=text] { min-width: 220px; width: 100%; }
.ed-table.cols tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 12px; }
.ed-table.cols thead { display: none; }
.ed-table.cols tr { display: flex; gap: 6px; align-items: center; }
.ed-table.cols td { border: 0; }
.ed-card { border: 1px solid var(--line); border-radius: 6px; margin: 6px 0; background: var(--card); }
.ed-card > summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer; background: var(--soft); border-radius: 6px; }
.ed-card[open] > summary { border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0; }
.ed-fields { display: grid; gap: 8px; padding: 10px; }
.ed-f { display: grid; grid-template-columns: 220px 1fr; gap: 8px; align-items: center; font-size: 13px; color: var(--text); }
.ed-f small { display: block; color: var(--muted); font-size: 11px; }
.ed-f input[type=text], .ed-f textarea { width: 100%; }
.ed-sub { border-left: 3px solid var(--blue-lt); padding-left: 10px; }
.ed-label { font-size: 13px; font-weight: bold; color: var(--accent); margin: 4px 0; }
.ed-abc { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ed-abc-text { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ed-abc-text label { display: flex; flex-direction: column; font-size: 11px; color: var(--muted); }
.ed-row { display: flex; gap: 6px; align-items: flex-start; margin: 4px 0; }
.ed-row textarea { flex: 1; }
.ed-btns { display: inline-flex; gap: 3px; flex-shrink: 0; }
.ed-static { display: inline-block; min-width: 90px; }
.ed-dirty { color: var(--wine); font-size: 12px; font-weight: bold; }
button.danger { color: var(--wine); }
@media (max-width: 720px) { .ed-f { grid-template-columns: 1fr; } .ed-abc-text { grid-template-columns: 1fr; } }

/* 査定の履歴・共有 */
.hist-filter input[type=search] { flex: 1; min-width: 220px; }
.hist-filter select { width: auto; }
table.hist td { vertical-align: middle; }
.kchip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; color: #fff; white-space: nowrap; }
.kchip-land { background: var(--land); } .kchip-house { background: var(--house); } .kchip-rc { background: var(--rc); } .kchip-mansion { background: var(--mansion); }
.sync { font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.sync.on { background: #e5f1ea; color: var(--plus); }
.sync.warn, .sync.off { background: var(--warn-bg); color: var(--minus); }
