/* v0.9.117. Primary area groups and row-owned parking inputs; optional advanced fields. */
.room115-house,.room115-sales,.room115-cost,.room115-body,.room115-card,.room115-field,.room115-grid>*,.room115-references section{min-width:0;box-sizing:border-box}
.room115-house{margin:18px 0;padding:18px 0;border-top:1px solid #dce3e9;border-bottom:1px solid #dce3e9}
.room115-house h3,.room115-sales h3,.room115-cost h3{margin:0 0 10px;font-size:17px}
.room115-card{margin:12px 0;border:1px solid #dce3e9;border-radius:10px;background:#fff}
.room115-card>summary,.room115-report>summary,.room115-report-group>summary{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:14px 16px;cursor:pointer;overflow-wrap:anywhere;list-style:none}
.room115-card>summary::before,.room115-report>summary::before,.room115-report-group>summary::before{content:'▸';flex:0 0 12px;color:#607584;transition:transform .12s}
.room115-card[open]>summary::before,.room115-report[open]>summary::before,.room115-report-group[open]>summary::before{transform:rotate(90deg)}
.room115-card>summary>span:first-of-type{flex:1;min-width:0}
.room115-card>summary>span:last-child{max-width:45%;font-variant-numeric:tabular-nums;text-align:right;color:#435a69;font-size:13px}
.room115-card summary small{display:block;margin-top:4px;color:#667b88;font-size:12px}
.room115-body{padding:16px;border-top:1px solid #e6ebef}
.room115-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.room115-field{display:flex;flex-direction:column;align-items:stretch;gap:7px;margin:0;line-height:1.4;font-size:13px}
.room115-field input,.room115-field select,.room115-add select{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.room115-field small,.room115-note{color:#627785;font-size:12px;line-height:1.55;overflow-wrap:anywhere}
.room115-note{margin:10px 0}
.room115-grid [hidden],.room115-body [hidden]{display:none!important}
.room115-balance{display:flex;flex-wrap:wrap;gap:10px 20px;padding:12px;border-radius:8px;background:#f0f5f8;font-size:13px}
.room115-balance span{display:flex;flex-direction:column;gap:4px;min-width:0}
.room115-add{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin-top:18px}
.room115-add label{display:flex;flex-direction:column;gap:7px;flex:1 1 220px;min-width:0;font-size:13px}
.room115-row-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:12px;margin-top:18px;padding:0 2px 2px}
.room115-row-actions .button{max-width:100%;white-space:normal;overflow-wrap:anywhere}
.room115-preview,.room115-conversion{margin-top:14px;padding:12px;background:#f4f7fa;border:1px solid #dfe7ee;border-radius:8px;font-size:13px;line-height:1.5}
.room115-errors{padding:12px;margin:12px 0;color:#8d302b;background:#fff2f0;border:1px solid #eac3be;border-radius:8px;font-size:13px;overflow-wrap:anywhere}
.room115-errors p{margin:4px 0}.room115-error-text{color:#a3332d}.room115-check{padding:10px 12px;color:#275f48;background:#edf7f1;border-radius:8px;font-size:13px}
.room115-buttons{display:flex;flex-wrap:wrap;gap:12px;margin-top:14px}
.room115-valuation{margin-top:16px;padding:12px;border:1px solid #e3e9ee;border-radius:8px}.room115-valuation>summary{cursor:pointer;font-size:13px;margin-bottom:12px}
.room115-cost{margin-top:18px;padding-top:16px;border-top:1px solid #e1e7ed;grid-column:1/-1}
.room115-adjustment{margin:0 0 16px;padding:16px 18px 18px;background:#f8fafc;border:1px solid #dce5eb;border-radius:8px}
.room115-references section+section{margin-top:18px;padding-top:14px;border-top:1px solid #e3e9ee}
.room115-report{margin:14px 0;border:1px solid #cfdce4;border-radius:10px;background:#fff}
.room115-report>summary{background:#edf3f7}.room115-report-group{margin:12px 0;border:1px solid #dae4eb;border-radius:8px}
.room115-chart{display:block;width:100%;height:auto;min-width:0}.room115-chart text{font:12px sans-serif;fill:#596d7b}
.room115-legend{display:flex;gap:8px 18px;flex-wrap:wrap;font-size:12px}.room115-legend span{display:flex;align-items:center;gap:6px}.room115-legend i{display:inline-block;width:11px;height:11px;border-radius:2px}
.room115-report-table{max-width:100%;overflow-x:auto;margin-top:12px}.room115-report-table table{width:100%;border-collapse:collapse;font-size:12px}.room115-report-table th,.room115-report-table td{padding:9px;text-align:right;border-bottom:1px solid #e3e9ed;white-space:nowrap}.room115-report-table th:first-child,.room115-report-table td:first-child{text-align:left}
#buildingForm:has(.room115-house) .dialog-actions{position:sticky;bottom:0;background:#fff;padding-top:16px;margin-top:14px;z-index:3}
@media(max-width:760px){.room115-grid{grid-template-columns:minmax(0,1fr)}.room115-card>summary,.room115-report>summary,.room115-report-group>summary{flex-wrap:wrap}.room115-card>summary>span:last-child{max-width:100%;text-align:left;padding-left:24px;flex-basis:100%}.room115-body{padding:14px}.room115-adjustment{padding:14px 18px 18px}.room115-house .button{white-space:normal}}
@media print{.room115-report details{break-inside:auto}.room115-report-table{overflow:visible}.room115-report{border-color:#aaa}}

#buildingForm .field[hidden],#buildingForm .parking96-fields[hidden]{display:none!important}

/* House form: each group owns its add actions; percentages retain the Sales source. */
#buildingDialog.dialog{width:min(820px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px)}
#buildingForm{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
#buildingForm>.field-grid,#buildingForm .field-grid>*,#buildingForm .parking96-grid>*{min-width:0;box-sizing:border-box}
#buildingForm>.field-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px}
#buildingForm input,#buildingForm select,#buildingForm button{max-width:100%;box-sizing:border-box}
#buildingForm .dialog-actions{position:sticky;bottom:-20px;z-index:4;flex-wrap:wrap;gap:12px;margin:18px -20px -20px;padding:16px 20px 20px;border-top:1px solid #dce3e9;background:linear-gradient(180deg,rgba(255,255,255,.96),#fff 30%)}
#buildingForm .dialog-actions .button{white-space:normal;overflow-wrap:anywhere;min-height:40px}
.room116-group{border-color:#cbd9e3;background:#f8fafc}
.room116-group>summary{background:#edf3f7;border-radius:10px}
.room116-group>.room115-body{padding:16px;background:#f8fafc;border-radius:0 0 10px 10px}
.room116-group .room115-card:first-child{margin-top:0}
.room116-group-add{padding:16px 0 0;border-top:1px solid #dce3e9}
.room116-group-add .button{white-space:normal;overflow-wrap:anywhere}
.room116-catalog-delete{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap;width:100%;padding-top:6px;min-width:0}
.room116-catalog-delete p{flex:1 1 220px;margin:0;min-width:0}
.room116-derived{display:flex;flex-direction:column;gap:7px;min-width:0;padding:12px;background:#f0f5f8;border:1px solid #dce5eb;border-radius:8px;font-size:13px}
.room116-derived strong{font-size:18px;font-variant-numeric:tabular-nums;color:#24495e}
.room116-derived small{font-size:12px;color:#627785;line-height:1.5}
.room116-check{display:flex;align-items:flex-start;gap:10px;margin:16px 0;font-size:13px;line-height:1.5;min-width:0;cursor:pointer}
.room116-check input[type=checkbox]{flex:0 0 18px;width:18px!important;height:18px;margin:1px 0 0;min-width:18px}
.room116-check span{min-width:0;overflow-wrap:anywhere}
.room116-house-override{display:grid;gap:16px;margin-top:12px;padding:16px;border:1px solid #d6e2ea;border-radius:8px;background:#f8fafc;min-width:0}
.room116-house-override[hidden],.room116-share [hidden]{display:none!important}
.room116-source-box{margin-top:14px;padding:12px;background:#f1f6fa;border-left:3px solid #8ba9bd;border-radius:4px;min-width:0}
.room116-source{font-size:13px;line-height:1.55;margin:0;overflow-wrap:anywhere}
.room116-rounding{font-size:12px;line-height:1.55;margin:10px 0 0;color:#7b552b;overflow-wrap:anywhere}
.room116-source-item+.room116-source-item{border-top:1px solid #dce3e9;margin-top:14px;padding-top:14px}
.room116-source-item p{margin:6px 0}
.room116-group-conditions{margin-bottom:24px;padding-bottom:12px;border-bottom:1px solid #dce3e9}
.room116-group-conditions .room115-references>summary>strong{flex:1;min-width:0}
.room116-share{margin:18px 0;padding:14px;border:1px solid #dce5eb;border-radius:8px;background:#f8fafc;min-width:0}
.room116-share h4{margin:0 0 10px}
.room116-preview-pending [data-room-conversion]{scroll-margin-bottom:90px}
@media(max-width:680px){#buildingForm>.field-grid{grid-template-columns:minmax(0,1fr)}#buildingForm .field-span-2{grid-column:auto}.room116-group>.room115-body{padding:12px}.room116-house-override,.room116-share{padding:12px}.room116-catalog-delete{flex-direction:column}.room116-catalog-delete p{flex-basis:auto}#buildingForm .dialog-actions{gap:10px}}

/* The legacy source controls are moved into these same four visible groups.
   The bank is only a storage location while an explicit room catalogue is shown. */
#buildingLegacyAreas[hidden]{display:none!important}
#buildingForm .room115-house{margin:14px 0 10px;padding:14px 0;border-bottom:0}
.room117-section-heading h3{margin-bottom:5px}.room117-section-heading>.room115-note{margin:0 0 12px}
.room117-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start;min-width:0}
.room117-groups>.room116-group{margin:0;min-width:0;max-width:100%}
.room117-groups>.room116-group>summary{padding:12px;gap:8px}
.room117-groups>.room116-group>.room115-body{padding:12px}
.room117-groups>.room116-group>summary>strong{flex:1;min-width:0}
.room117-groups>.room116-group>summary>span:last-child{font-size:12px;max-width:48%}
.room117-row{padding:12px;background:#fff;border:1px solid #dce3e9;border-radius:8px;min-width:0;max-width:100%;box-sizing:border-box}
.room117-row+.room117-row{margin-top:12px}
.room117-row-heading{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px 12px;min-width:0;margin:0 0 12px;overflow-wrap:anywhere}
.room117-row-heading strong{flex:1 1 150px;font-size:14px;min-width:0}
.room117-row-heading>span{color:#627785;font-size:12px;font-variant-numeric:tabular-nums}
.room117-primary{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;min-width:0}
.room117-primary .room116-derived{padding:9px 11px}.room117-primary .room116-derived strong{font-size:16px}
.room117-row .room116-source-box{margin-top:10px;padding:9px 10px}
.room117-row .room116-source{font-size:12px;line-height:1.45}
.room117-row .room115-grid{gap:12px;grid-template-columns:minmax(0,1fr)}
.room117-row .room116-check{margin:4px 0 12px}
.room117-row .room116-house-override{padding:11px}
.room117-advanced{border-top:1px solid #e3e9ee;margin-top:12px;padding-top:10px;min-width:0}
.room117-advanced>summary,.room117-catalog>summary{font-size:12px;line-height:1.45;color:#325970;cursor:pointer;overflow-wrap:anywhere}
.room117-advanced-body{padding-top:12px;min-width:0}
.room117-group-action,.room117-groups .room116-group-add{margin-top:10px;padding-top:10px;display:flex;flex-wrap:wrap;gap:10px;border-top:1px solid #dce3e9;min-width:0}
.room117-group-action .button,.room117-groups .room116-group-add>.button{min-height:36px;width:100%;padding:8px 12px;white-space:normal}
.room117-catalog{width:100%;min-width:0}.room117-catalog>summary{margin-bottom:10px}
.room117-catalog .button{margin-top:9px;width:100%}.room117-catalog .room116-catalog-delete{gap:6px}
.room117-catalog .room116-catalog-delete p{flex-basis:100%;font-size:11px}
.room117-full-output{display:block;padding:10px 12px;background:#f0f5f8;border:1px solid #dce3e9;border-radius:6px;font-variant-numeric:tabular-nums;font-size:16px}
.room117-physical-source{font-size:12px;line-height:1.5;margin:8px 0 0;overflow-wrap:anywhere}
.room117-legacy-group .field{margin:0}.room117-legacy-group .parking96-fields{margin:0;padding:0;border:0;background:transparent;min-width:0}
.room117-legacy-group .parking96-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;min-width:0}
.room117-legacy-group [data-room-legacy-space]{margin-top:12px}.room117-legacy-group [data-room-legacy-space][hidden]{display:none!important}
.room117-construction-total{margin-top:14px}
@media(max-width:680px){.room117-groups{grid-template-columns:minmax(0,1fr)}.room117-row .room115-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:460px){.room117-row .room115-grid{grid-template-columns:minmax(0,1fr)}}
