/* v13: building records, improvement/future scenario inputs and the 03–06 value-flow report sections. Screen rules follow property-deep.css; print keeps every detail visible without clipping. */
.property-records, .property-scenario { min-width: 0; padding: 20px 0; margin: 24px 0; border-top: 1px solid #ccd4dc; color: #23384b; font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
.property-records h3, .property-scenario h3 { font-size: 20px; margin: 10px 0 12px; color: #23384b; }
.property-records p, .property-scenario p { font-size: 16px; line-height: 1.85; }
.records-amount { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr) minmax(0,1fr); gap: 8px; }
.records-amount input, .records-amount select { min-width: 0; width: 100%; min-height: 48px; font-size: 16px; }
.records-check-control input { width: 22px; height: 22px; margin-top: 4px; flex-shrink: 0; }
.records-adopt { margin-top: 14px; }
.records-adopt .button { white-space: normal; min-height: 48px; }
.records-table, .scenario-table { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.records-table th, .records-table td, .scenario-table th, .scenario-table td { border-bottom: 1px solid #d6dde4; padding: 8px 6px; text-align: left; vertical-align: top; }
.records-table thead th, .scenario-table thead th { background: #f3f5f7; font-weight: 700; }
.records-removed { color: #6b7580; text-decoration: line-through; }
.scenario-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.scenario-card .deep-fields, .scenario-row-change .deep-fields { grid-template-columns: minmax(0,1fr); }
.scenario-row-change .deep-row-header .field-hint { font-size: 15px; }
.future-cell { display: grid; gap: 2px; font-size: 14px; color: #44596c; }
.future-cell strong { font-size: 16px; color: #243c53; }
.future-table caption { caption-side: top; text-align: left; font-size: 14px; color: #44596c; padding: 6px 0; }
.value-flow-step .summary-list dd small { display: block; font-weight: 400; color: #4c5c69; font-size: 14px; margin-top: 4px; }
.value-flow-step details > summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-weight: 650; }
.value-flow-step ol, .value-flow-step ul { padding-left: 22px; }
.value-flow-step li { margin: 6px 0; }
.records-summary h4, .scenario-summary h4 { font-size: 17px; margin: 16px 0 6px; color: #243c53; }
@media screen and (max-width: 900px) { .scenario-grid { grid-template-columns: minmax(0,1fr); } }
@media screen and (max-width: 640px) {
  .records-amount { grid-template-columns: minmax(0,1fr); }
  .records-table thead, .scenario-table thead { display: none; }
  .records-table tr, .scenario-table tr { display: block; border-bottom: 2px solid #d6dde4; padding: 6px 0; }
  .records-table td, .records-table th, .scenario-table td, .scenario-table th { display: block; border: 0; padding: 4px 0; }
  .records-table td::before, .scenario-table td::before { content: attr(data-label) '：'; font-weight: 700; color: #44596c; }
  .future-cell, .future-table caption, .value-flow-step .summary-list dd small { font-size: 16px; }
}
@media print {
  .property-records, .property-scenario { display: none; }
  .records-summary, .scenario-summary, .value-flow-step { font-size: 9pt; line-height: 1.65; overflow: visible; break-inside: auto; }
  .records-table, .scenario-table { font-size: 8.5pt; }
  .records-table th, .records-table td, .scenario-table th, .scenario-table td { padding: 3px 4px; }
  .value-flow-step details, .value-flow-step details:not([open]) > *, .records-summary details, .records-summary details:not([open]) > * { display: block !important; overflow: visible !important; }
  .value-flow-step details::details-content, .records-summary details::details-content { display: block; content-visibility: visible; }
  .value-flow-step h3 { font-size: 11pt; }
  .future-cell strong { font-size: 10pt; }
}
/* 集計・根拠の dl：基本の .summary-row は dt が縮まない flex のため、見出しが長いと dd が1文字ずつ折れる。該当ブロックだけ2列グリッドにし、狭い幅では縦に積む。 */
.deep-analysis .summary-row, .deep-summary .summary-row, .property-life-summary .summary-row, .records-summary .summary-row, .scenario-summary .summary-row, .value-flow-step .summary-row, .current-value-summary .summary-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 4px 16px; align-items: start; }
.deep-analysis .summary-row > :first-child, .deep-summary .summary-row > :first-child, .property-life-summary .summary-row > :first-child, .records-summary .summary-row > :first-child, .scenario-summary .summary-row > :first-child, .value-flow-step .summary-row > :first-child, .current-value-summary .summary-row > :first-child { max-width: none; min-width: 0; flex: none; }
.deep-analysis .summary-row > :last-child, .deep-summary .summary-row > :last-child, .property-life-summary .summary-row > :last-child, .records-summary .summary-row > :last-child, .scenario-summary .summary-row > :last-child, .value-flow-step .summary-row > :last-child, .current-value-summary .summary-row > :last-child { text-align: right; min-width: 0; overflow-wrap: break-word; word-break: normal; }
@media screen and (max-width: 640px) {
  .deep-analysis .summary-row, .deep-summary .summary-row, .property-life-summary .summary-row, .records-summary .summary-row, .scenario-summary .summary-row, .value-flow-step .summary-row, .current-value-summary .summary-row { grid-template-columns: minmax(0,1fr); gap: 2px; }
  .deep-analysis .summary-row > :last-child, .deep-summary .summary-row > :last-child, .property-life-summary .summary-row > :last-child, .records-summary .summary-row > :last-child, .scenario-summary .summary-row > :last-child, .value-flow-step .summary-row > :last-child, .current-value-summary .summary-row > :last-child { text-align: left; }
}
@media print {
  .deep-analysis .summary-row, .deep-summary .summary-row, .records-summary .summary-row, .scenario-summary .summary-row, .value-flow-step .summary-row, .current-value-summary .summary-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 2px 10px; }
}
/* 区画欄の単位セレクト（円／万円・月額／年額・㎡／坪） */
.deep-unit-select { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; margin: 8px 0 0; }
.deep-unit-select .field { margin: 0; }
.deep-row-interview .deep-unit-select { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .deep-unit-select, .deep-row-interview .deep-unit-select { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
@media print { .deep-unit-select, .deep-unit-select + .field-hint { display: none; } }
/* 構造別の参考工事費単価（建築着工統計）。この建物の構造の行を示す。 */
.reference-costs { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line, #d9d4cf); border-radius: 10px; background: #fbfaf8; }
.reference-costs h4 { margin: 0 0 8px; font-size: 14px; }
.reference-costs-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.reference-costs-table th, .reference-costs-table td { padding: 6px 8px; border-bottom: 1px solid #e6e1dc; text-align: left; }
.reference-costs-table td { text-align: right; white-space: nowrap; }
.reference-costs-table tr.is-current th, .reference-costs-table tr.is-current td { font-weight: 700; background: #f3ece7; }
@media print { .reference-costs .button { display: none; } }
