/* JOSHIN AI建築積算システム Ver1.1.4 の画面スタイル（static/css/style.css の写し。画面デモ用） */
:root {
  --navy: #1f3a5f;
  --navy-d: #142840;
  --navy-l: #2d5282;
  --accent: #3b6ea8;
  --bg: #f3f5f8;
  --card: #ffffff;
  --line: #d9dee5;
  --line-d: #b9c2cd;
  --text: #1d2733;
  --muted: #64707d;
  --gray: #eef1f4;
  --warn-bg: #fff4ce;
  --warn: #8a5a00;
  --ok-bg: #e3f4e8;
  --ok: #1e6b3a;
  --err-bg: #fde7e7;
  --err: #a32020;
  --info-bg: #e7eef8;
  --radius: 6px;
  --font: "Yu Gothic UI", "Yu Gothic", "Meiryo", "Hiragino Sans", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); }
a { color: var(--accent); }
.layout { display: flex; min-height: 100vh; }

/* ---------- sidebar */
.sidebar { width: 220px; flex: 0 0 220px; background: var(--navy); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-mark { width: 38px; height: 38px; border-radius: 6px; background: #fff; color: var(--navy); font-weight: 800; font-size: 22px; display: grid; place-items: center; }
.brand-name { font-weight: 800; letter-spacing: .12em; font-size: 16px; }
.brand-sub { font-size: 11px; opacity: .8; }
.nav { display: flex; flex-direction: column; padding: 10px 0; flex: 1; }
.nav a { color: #dfe7f1; text-decoration: none; padding: 11px 18px; display: flex; gap: 10px; align-items: center; border-left: 4px solid transparent; font-size: 14px; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: rgba(255,255,255,.13); border-left-color: #8fb3df; color: #fff; font-weight: 700; }
.nav .ico { width: 18px; text-align: center; opacity: .9; }
.nav-sep { height: 1px; background: rgba(255,255,255,.12); margin: 8px 14px; }
.sidebar-foot { font-size: 11px; opacity: .6; padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.12); }

/* ---------- main */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; }
.topbar h1 { font-size: 19px; margin: 0; color: var(--navy); }
.user-box { font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.user-box input { width: 150px; }
.view { padding: 20px 24px 60px; }

/* ---------- cards & grid */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; }
.card h2 { font-size: 15px; margin: 0 0 12px; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.card h2 .sub { font-weight: normal; color: var(--muted); font-size: 12px; }
.card h3 { font-size: 14px; margin: 14px 0 8px; color: var(--navy-l); }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, 1fr); } .split, .g2, .g3 { grid-template-columns: 1fr; } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; border-top: 4px solid var(--navy); }
.kpi .label { font-size: 12px; color: var(--muted); }
.kpi .value { font-size: 28px; font-weight: 700; color: var(--navy); margin-top: 4px; }
.kpi .value small { font-size: 13px; color: var(--muted); font-weight: normal; }
.kpi.warn { border-top-color: #d9a400; }

/* ---------- forms */
input, select, textarea { font-family: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line-d); border-radius: 4px; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc0ea; border-color: var(--accent); }
textarea { width: 100%; min-height: 60px; }
.form { display: grid; grid-template-columns: 110px 1fr; gap: 8px 10px; align-items: center; }
.form label { font-size: 12px; color: var(--muted); text-align: right; }
.form input, .form select, .form textarea { width: 100%; }
.req::after { content: " *"; color: var(--err); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- buttons */
.btn { font-family: inherit; font-size: 13px; padding: 7px 14px; border-radius: 4px; border: 1px solid var(--line-d); background: #fff; color: var(--text); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn:hover { background: var(--gray); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-l); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--err); border-color: #e3b4b4; }
.btn.sm { padding: 3px 9px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- tables */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 4px; max-height: 560px; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 13px; background: #fff; }
.tbl th { background: var(--navy); color: #fff; font-weight: 600; padding: 7px 8px; text-align: left; position: sticky; top: 0; z-index: 1; white-space: nowrap; font-size: 12px; }
.tbl td { border-bottom: 1px solid var(--line); padding: 5px 8px; vertical-align: top; }
.tbl tr:nth-child(even) td { background: #fafbfc; }
.tbl tr:hover td { background: #eef4fb; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl tr.review td { background: var(--warn-bg) !important; }
.tbl tr.group td { background: var(--gray) !important; font-weight: 700; color: var(--navy); }
.tbl tr.sel td { background: #dfeafa !important; }
.tbl tr.clickable { cursor: pointer; }
.tbl input, .tbl select { padding: 3px 5px; font-size: 12px; width: 100%; min-width: 50px; }
.tbl input.num { text-align: right; }
.tbl tfoot td { font-weight: 700; background: var(--gray); position: sticky; bottom: 0; }

/* ---------- badges */
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--gray); color: var(--muted); white-space: nowrap; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border: 1px solid #ecd27d; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.err { background: var(--err-bg); color: var(--err); }
.badge.info { background: var(--info-bg); color: var(--navy-l); }
.badge.navy { background: var(--navy); color: #fff; }

/* ---------- alerts */
.alert { padding: 10px 14px; border-radius: 4px; margin-bottom: 12px; font-size: 13px; border: 1px solid; }
.alert.warn { background: var(--warn-bg); border-color: #ecd27d; color: #5e4300; }
.alert.info { background: var(--info-bg); border-color: #bfd0e8; color: var(--navy); }
.alert.err { background: var(--err-bg); border-color: #efb9b9; color: var(--err); }
.alert.ok { background: var(--ok-bg); border-color: #b5dcc1; color: var(--ok); }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

/* ---------- dropzone */
.drop { border: 2px dashed var(--line-d); border-radius: 6px; padding: 22px; text-align: center; color: var(--muted); background: #fafbfc; cursor: pointer; transition: .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: #eef4fb; color: var(--navy); }
.drop .big { font-size: 15px; font-weight: 700; color: var(--navy); }

/* ---------- lists */
.list { border: 1px solid var(--line); border-radius: 4px; max-height: 620px; overflow: auto; background: #fff; }
.list-item { padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.list-item:hover { background: #f2f6fb; }
.list-item.active { background: #e3edf9; border-left: 4px solid var(--navy); padding-left: 8px; }
.list-item .t { font-weight: 700; color: var(--navy); }
.list-item .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- tabs */
.tabs { display: flex; border-bottom: 2px solid var(--line); margin-bottom: 14px; gap: 2px; }
.tabs button { background: none; border: none; padding: 9px 16px; font-family: inherit; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button.active { color: var(--navy); border-bottom-color: var(--navy); font-weight: 700; }

/* ---------- steps */
.steps { display: flex; gap: 0; margin-bottom: 16px; }
.step { flex: 1; padding: 10px 12px; background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--muted); position: relative; }
.step + .step { border-left: none; }
.step b { display: block; color: var(--navy); font-size: 12px; }
.step.done { background: var(--ok-bg); }
.step.cur { background: var(--info-bg); border-color: #bfd0e8; color: var(--navy); }

/* ---------- pdf preview */
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0; }
.thumb { flex: 0 0 auto; border: 2px solid var(--line); border-radius: 4px; cursor: pointer; background: #fff; text-align: center; font-size: 11px; color: var(--muted); }
.thumb img { display: block; height: 130px; }
.thumb.sel { border-color: var(--accent); }
.thumb.chk { outline: 3px solid #d9a400; }
.preview-img { width: 100%; border: 1px solid var(--line); background: #fff; }
.pdf-frame { width: 100%; height: 75vh; border: 1px solid var(--line); background: #fff; }
pre.raw { background: #f7f8fa; border: 1px solid var(--line); padding: 10px; font-size: 12px; max-height: 360px; overflow: auto; white-space: pre-wrap; }

/* ---------- modal */
.modal-back { position: fixed; inset: 0; background: rgba(15,25,40,.45); display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 40px 20px; overflow: auto; }
.modal { background: #fff; border-radius: 8px; width: 640px; max-width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.modal.wide { width: 1100px; }
.modal-h { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-h h3 { margin: 0; font-size: 16px; color: var(--navy); }
.modal-b { padding: 16px 18px; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: #fafbfc; border-radius: 0 0 8px 8px; }
.x { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--muted); }

/* ---------- toast & loading */
#toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 4px; box-shadow: 0 4px 14px rgba(0,0,0,.2); font-size: 13px; max-width: 420px; }
.toast.err { background: var(--err); }
.toast.ok { background: var(--ok); }
.loading { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(0,0,0,.15); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: middle; }
.btn.primary .loading { border-color: rgba(255,255,255,.3); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 30px; }
.status-list li { margin: 3px 0; }
.chart { width: 100%; height: 220px; }
.total-box { background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 6px; display: flex; gap: 30px; align-items: baseline; flex-wrap: wrap; }
.total-box .v { font-size: 24px; font-weight: 700; }
.total-box .l { font-size: 12px; opacity: .8; }
details.basis summary { cursor: pointer; color: var(--accent); font-size: 12px; }
details.basis table { margin-top: 6px; }
.sidebar-foot .ver-link { color: #9fc0e8; margin-left: 6px; }
.changelog h2 { border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-top: 22px; }
.changelog li { margin: 3px 0; }

/* ---------- ダッシュボード（Ver1.0.3）：白×ネイビー、余白多め、枠線は最小限 */
.dash { max-width: 1120px; margin: 4px auto 0; display: flex; flex-direction: column; gap: 28px; }
.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(20, 40, 64, .08); }
.dash-stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 6px; align-items: baseline; padding: 22px 28px; text-decoration: none; color: var(--text); }
.dash-stat + .dash-stat { border-left: 1px solid var(--line); }
.dash-stat:hover { background: #f6f8fb; }
.dash-stat .l { grid-column: 1 / -1; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.dash-stat .v { font-size: 40px; font-weight: 700; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.dash-stat .u { font-size: 15px; color: var(--muted); }
.dash-stat .s { grid-column: 1 / -1; font-size: 12px; color: var(--muted); margin-top: 8px; }
.dash-stat.is-warn .v { color: #b07a00; }
.dash-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-btn { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-height: 120px; padding: 24px 32px; border-radius: 8px;
  background: var(--navy); color: #fff; text-decoration: none; transition: background .15s, transform .15s; }
.dash-btn:hover { background: var(--navy-l); }
.dash-btn:active { transform: translateY(1px); }
.dash-btn:focus-visible { outline: 3px solid #9cc0ea; outline-offset: 3px; }
.dash-btn .t { font-size: 22px; font-weight: 700; letter-spacing: .04em; }
.dash-btn .t::after { content: " →"; font-weight: 400; opacity: .8; }
.dash-btn .d { font-size: 13px; opacity: .85; line-height: 1.6; }
.dash-recent { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(20, 40, 64, .08); padding: 20px 28px 12px; }
.dash-recent h2 { font-size: 16px; color: var(--navy); margin: 0 0 8px; }
.dash-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dash-table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.dash-table td { padding: 10px; border-bottom: 1px solid #eef1f4; }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table td a { color: var(--navy); font-weight: 600; text-decoration: none; }
.dash-table td a:hover { text-decoration: underline; }
.dash-empty { color: var(--muted); padding: 18px 0; }
@media (max-width: 900px) { .dash-stats, .dash-actions { grid-template-columns: 1fr; } .dash-stat + .dash-stat { border-left: none; border-top: 1px solid var(--line); } }

/* ---------- バージョン不一致などのシステム警告（Ver1.0.4） */
.sys-banner { background: #fde7e7; color: #8a1c1c; border-bottom: 2px solid #d9534f; padding: 12px 24px; font-size: 14px; line-height: 1.7; }
.sys-banner[hidden] { display: none; }

/* ---------- 過去案件登録：大きいPDFドロップエリア（Ver1.0.5） */
.intake-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 4px; }
.intake-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.drop.drop-lg { min-height: 260px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 28px 20px; border: 3px dashed #9fb0c4; border-radius: 10px; background: #f8fafc; color: var(--navy); position: relative; user-select: none; }
.drop.drop-lg > * { pointer-events: none; }
.drop.drop-lg .drop-icon { width: 76px; height: 95px; color: var(--navy); transition: transform .15s; }
.drop.drop-lg .drop-title { font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: .03em; }
.drop.drop-lg .drop-sub { font-size: 13px; color: var(--muted); }
.drop.drop-lg .drop-over-msg { display: none; font-size: 15px; font-weight: 700; color: #fff; background: var(--accent); padding: 4px 14px; border-radius: 14px; }
.drop.drop-lg:hover { border-color: var(--accent); background: #eef4fb; }
.drop.drop-lg:focus-visible { outline: 3px solid #9cc0ea; outline-offset: 3px; }
.drop.drop-lg.over { border-color: var(--accent); border-style: solid; background: #dceafa; box-shadow: inset 0 0 0 4px rgba(59, 110, 168, .15); }
.drop.drop-lg.over .drop-icon { transform: scale(1.12); color: var(--accent); }
.drop.drop-lg.over .drop-sub { display: none; }
.drop.drop-lg.over .drop-over-msg { display: block; }
.drop.drop-lg.has-files { border-color: #7fb38f; background: #f5fbf7; }
.qlist { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.qlist-h { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--navy); }
.qlist-h b { font-size: 16px; }
.qlist ul { list-style: none; margin: 0; padding: 4px 0; max-height: 220px; overflow-y: auto; }
.qlist li { display: flex; align-items: center; gap: 8px; padding: 7px 12px; font-size: 14px; flex-wrap: wrap; }
.qlist li + li { border-top: 1px solid #eef1f4; }
.qlist-ico { flex: 0 0 auto; font-size: 10px; font-weight: 700; color: #fff; background: var(--navy); border-radius: 3px; padding: 2px 5px; }
.qlist-name { flex: 1 1 120px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qlist-size { flex: 0 0 auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.qlist-empty { text-align: center; font-size: 13px; color: var(--muted); padding: 6px; }
@media (max-width: 760px) {
  .intake-grid { grid-template-columns: 1fr; }
  .drop.drop-lg { min-height: 250px; }
}

/* ---------- 新規案件積算：図面解析の2方式と「未確定」表示（Ver1.0.6） */
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.method-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: #fff; display: flex; flex-direction: column; }
.method-card[data-method="rule"] { border: 2px solid #7fb38f; }
.method-card.off { background: #f6f7f9; }
.method-card.off .method-tbl td { color: var(--muted); }
.method-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.method-h b { font-size: 16px; color: var(--navy); margin-right: 4px; }
.method-tbl th { width: 92px; white-space: nowrap; text-align: left; vertical-align: top; }
.method-tbl td { font-size: 13px; }
.method-card .row.mt { margin-top: auto; padding-top: 10px; }
input.undecided { background: var(--warn-bg); }
input.undecided::placeholder { color: #a06a00; font-weight: 600; opacity: 1; }
.undecided-text { color: #a06a00; font-weight: 600; }
@media (max-width: 900px) { .method-grid { grid-template-columns: 1fr; } }

/* ---------- 自動積算（Ver1.1.3）：図面PDF → 自動積算 → 見積結果・Excel出力を1画面で */
.auto { max-width: none; }
.auto-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; }
.auto-head select { min-width: 280px; max-width: 100%; }
.auto-run { display: flex; justify-content: center; margin-top: 16px; }
.btn.auto-run-btn { font-size: 17px; font-weight: 700; padding: 12px 36px; border-radius: 6px; }
.auto-steps { list-style: none; margin: 16px auto 0; padding: 0; max-width: 760px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.auto-steps li { display: grid; grid-template-columns: 28px minmax(0, 260px) 1fr; gap: 10px; align-items: center; padding: 9px 14px; font-size: 14px; color: var(--muted); }
.auto-steps li + li { border-top: 1px solid #eef1f4; }
.auto-step-ico { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; border: 2px solid var(--line-d); }
.auto-steps li.is-run { color: var(--navy); background: #f2f7fd; }
.auto-steps li.is-run .auto-step-ico { border: none; }
.auto-steps li.is-ok { color: var(--text); }
.auto-steps li.is-ok .auto-step-ico { background: var(--ok); border-color: var(--ok); color: #fff; }
.auto-steps li.is-err { color: var(--err); background: var(--err-bg); }
.auto-steps li.is-err .auto-step-ico { background: var(--err); border-color: var(--err); color: #fff; }
.auto-step-d { font-size: 13px; }
.auto-total { background: var(--navy); color: #fff; border-radius: 8px; padding: 16px 22px; display: flex; gap: 34px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.auto-total .l { font-size: 12px; opacity: .85; }
.auto-total .m { font-size: 18px; font-weight: 700; }
.auto-total .v { font-size: 32px; font-weight: 700; line-height: 1.2; }
.auto-total input { width: 54px; padding: 2px 4px; font-size: 13px; }
.auto-total-warn { font-size: 12px; color: #ffd76a; margin-top: 2px; }
.auto-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.auto-review { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; }
.auto-review li { padding: 0 8px 0 10px; height: 40px; box-sizing: border-box; font-size: 13px; display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.auto-review li:hover { background: #f2f7fd; }
.auto-review-name { flex: 0 1 auto; max-width: 40%; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auto-review-why { flex: 1 1 0; min-width: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auto-review li + li { border-top: 1px solid #eef1f4; }
.auto-finish { margin: 16px 0 6px; }
.auto-detail > summary { cursor: pointer; padding: 2px 0; }
.dash-main { display: block; }
.dash-btn.dash-btn-main { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 34px 20px; }
.dash-btn.dash-btn-main .t { font-size: 24px; }
@media (max-width: 900px) { .auto-grid { grid-template-columns: minmax(0, 1fr); } .auto-steps li { grid-template-columns: 28px 1fr; } .auto-step-d { grid-column: 2; } }

/* ---------- 自動積算：見積明細を1行表示（行の高さ約44px）・詳細はモーダル（Ver1.1.4） */
.ci-wrap { max-height: none; }
table.ci-tbl { table-layout: fixed; min-width: 900px; }
.ci-tbl td { height: 44px; box-sizing: border-box; padding: 0 8px; vertical-align: middle; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-tbl tr.group td { height: 36px; }
.ci-tbl input { height: 30px; box-sizing: border-box; }
.ci-tbl input[type=checkbox] { width: auto; min-width: 0; height: auto; }
.ci-tbl col.c-part { width: 44px; } .ci-tbl col.c-name { width: 22%; } .ci-tbl col.c-q { width: 128px; }
.ci-tbl col.c-p { width: 92px; } .ci-tbl col.c-amt { width: 102px; } .ci-tbl col.c-why { width: auto; }
.ci-tbl col.c-ok { width: 40px; } .ci-tbl col.c-ops { width: 226px; }
.ci-qty { text-align: right; }
.ci-qty input { width: 74px; min-width: 0; }
.ci-unit { display: inline-block; width: 30px; margin-left: 4px; text-align: left; font-size: 12px; color: var(--muted); }
.ci-why-text { margin-left: 6px; }
.ci-ops .btn { padding: 4px 7px; font-size: 12px; }
.ci-spec { color: var(--muted); font-size: 12px; margin-left: 8px; }
.ci-sub { font-weight: 400; font-size: 12px; color: var(--muted); margin-left: 14px; }
.ci-why { font-size: 12px; color: #6b5300; }
.ci-badges { display: inline-flex; gap: 4px; flex-wrap: nowrap; }
.ci-ops { text-align: right; padding: 0 6px !important; }
.ci-ops .btn { margin-left: 3px; }
.ci-detail h4 { margin: 16px 0 6px; color: var(--navy); font-size: 14px; }
.ci-sum { display: grid; grid-template-columns: max-content 1fr max-content 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.ci-sum dt { color: var(--muted); font-size: 12px; align-self: center; }
.ci-sum dd { margin: 0; }
.ci-why-list { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.7; }
.ci-basis td { vertical-align: top; }
@media (max-width: 900px) { .ci-sum { grid-template-columns: max-content 1fr; } }
/* 自動積算の詳細情報：室情報・建具の確認事項は1行に省略（全文はマウスを重ねると表示） */
.auto-detail .tbl td.note-cell { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.auto-detail .tbl td { vertical-align: middle; }
