body[data-calc-way=house] #calc-way-name{display:none}
.house-project-launcher{display:none}
body[data-calc-way=house] .house-project-launcher{display:inline-flex;align-self:flex-start;align-items:center;min-height:44px;margin-top:10px;padding:10px 17px;border:1px solid #99b49f;border-radius:8px;background:#eaf3ec;color:#254d35;font-weight:600;font-size:15px;cursor:pointer}
.house-project-launcher:hover{background:#dbeadf;border-color:#26864d}
.house-project-dialog{box-sizing:border-box;width:min(1280px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 32px);margin:auto;padding:24px;border:0;border-radius:18px;background:#fff;color:#263d2e;overflow:auto;box-shadow:0 18px 75px #12301b38}
.house-project-dialog::backdrop{background:#17342688}
.house-project-dialog[open]{display:block}
.house-project-dialog *{box-sizing:border-box}
.hp-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:20px}
.hp-head h2{font-size:24px;line-height:1.25;margin:0;color:#263d2e}
.house-project-dialog button{font:inherit;cursor:pointer}
.house-project-dialog button:focus-visible{outline:3px solid #28954f;outline-offset:3px}
.house-project-dialog button:disabled{opacity:.5;cursor:default}
.hp-close,.hp-back,.hp-tools button,.hp-tabs button,.hp-turn button,.hp-footer>button{border:1px solid #bdcec0;border-radius:8px;padding:10px 15px;background:#fff;color:#2c553a;font-size:14px;min-height:42px}
.hp-project-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.house-project-dialog .hp-project-card{display:flex;flex-direction:column;align-items:stretch;text-align:left;min-width:0;overflow:hidden;padding:0;border:1px solid #d3ded3;border-radius:12px;background:#f4f6f3;color:#263d2e}
.hp-project-card:hover{border-color:#66a17a;background:#eaf3ec}
.house-project-dialog .hp-project-card[aria-pressed=true]{border:2px solid #348b51;background:#edf5ed}
.hp-project-card img{display:block;width:100%;height:auto;aspect-ratio:1.47;object-fit:contain;background:#f3f5f2;mix-blend-mode:multiply}
.hp-project-caption{display:grid;gap:4px;padding:12px 16px 15px;background:#ffffffbd}
.hp-project-caption strong{font-size:17px;line-height:1.25}
.hp-project-caption>span,.hp-own-project>span:last-child{font-size:13px;line-height:1.4;color:#627263}
.hp-project-caption small{font-size:12px;color:#287545}
.hp-thumbnail-studio{position:fixed;left:-2000px;top:0;width:360px;height:245px;pointer-events:none}
.house-project-dialog .hp-own-project{justify-content:center;align-items:center;text-align:center;gap:12px;min-height:260px;border-style:dashed;padding:25px}
.hp-own-project strong{font-size:18px;max-width:220px}
.hp-pencil{font-size:76px;line-height:1;color:#318952}
.hp-help{font-size:14px;line-height:1.5;color:#637264;margin:16px 0 0}
.hp-editor{margin-top:16px}
.hp-tabs,.hp-tools,.hp-turn{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0}
.hp-tabs button[aria-pressed=true],.hp-tools button[aria-pressed=true]{background:#2c5b3d;color:#fff;border-color:#2c5b3d}
.hp-drawing{display:block;width:min(100%,83.333vh);height:auto;aspect-ratio:5/3;max-height:none;border:1px solid #becfbf;border-radius:10px;margin:12px auto;touch-action:none;cursor:crosshair;background:#fff}
.hp-editor>label{display:block;font-size:14px;margin-top:16px;text-align:left}
.hp-editor textarea{display:block;width:100%;resize:vertical;min-height:72px;margin-top:7px;padding:10px 12px;border:1px solid #bdcec0;border-radius:8px;font:inherit;color:#293e2c;background:#fff}
.hp-footer{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:18px;flex-wrap:wrap}
.hp-quota{margin-right:auto;font-size:14px;color:#617361}
.house-project-dialog .hp-footer .primary{background:#189c45;border:1px solid #189c45;border-radius:9px;min-height:48px;padding:12px 25px;color:#fff;font-weight:700}
.hp-feedback{font-size:15px;color:#42644b;line-height:1.45;margin:16px 0 0}
.hp-feedback:empty{display:none}
.hp-result-preview{width:100%;height:min(54vh,570px);background:#f3f5f2;border-radius:12px;overflow:hidden}
.hp-result-preview canvas{display:block;width:100%;height:100%}
.hp-turn{justify-content:center}
@media(max-width:720px){.house-project-dialog{padding:16px;width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:13px}.hp-head{gap:10px}.hp-head h2{font-size:20px}.hp-project-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.hp-project-caption{padding:10px}.hp-project-caption strong{font-size:15px}.hp-project-caption>span{font-size:12px}.house-project-dialog .hp-own-project{min-height:210px;padding:14px}.hp-own-project strong{font-size:15px}.hp-drawing{max-height:none}.hp-footer .primary{flex:1}.hp-quota{flex-basis:100%}}
@media(max-width:380px){.hp-project-grid{grid-template-columns:1fr}.hp-project-card img{max-height:230px}.hp-tools button{padding:8px 11px}}
@media print{.house-project-launcher,.house-project-dialog{display:none!important}}

.house-project-dialog:has(.hp-editor){width:min(1040px,calc(100vw - 24px))}
@media(max-width:720px){.hp-drawing{width:100%}}

body.hp-projects-open{overflow:hidden}

/* Three previews share the former colour controls column. */
.house-project-sidebar{display:none}
body[data-calc-way=house] .house-project-sidebar{--hp-card-height:clamp(108px,calc((100dvh - 370px)/3),180px);display:flex;flex-direction:column;gap:8px;width:min(100%,290px);min-width:0;margin:14px 0 20px}
.hp-project-strip{position:relative;display:flex;flex-direction:column;gap:10px;height:calc(3 * var(--hp-card-height) + 20px);overflow-y:auto;overscroll-behavior-y:contain;scroll-snap-type:y mandatory;scrollbar-width:thin;scrollbar-color:#9ab0a0 transparent;padding:0 8px 0 0}
.hp-project-strip .hp-strip-card{box-sizing:border-box;flex:0 0 var(--hp-card-height);height:var(--hp-card-height);min-height:0;width:100%;display:flex;flex-direction:column;align-items:stretch;overflow:hidden;padding:0;border:1px solid #cad8cd;border-radius:9px;background:#f3f5f2;color:#294d3b;cursor:pointer;scroll-snap-align:start;font:inherit}
.hp-strip-card img{display:block;width:100%;flex:1;min-height:0;height:0;object-fit:contain;background:#f3f5f2;mix-blend-mode:multiply}
.hp-strip-card strong{font-size:14px;line-height:20px;text-align:left;padding:4px 12px;background:#ffffffba;flex:none}
.hp-project-strip .hp-strip-card[aria-pressed=true]{border:2px solid #208844;background:#e5efe6}
.hp-strip-card[aria-pressed=true] strong{color:#146b32}
.hp-project-strip .hp-strip-card:hover{border-color:#208844}
.house-project-sidebar .hp-strip-arrow{display:grid;place-items:center;align-self:center;width:44px;height:28px;min-height:28px;margin:0;padding:0;border:1px solid #cbd9ce;border-radius:7px;background:#fff;color:#29563e;font:24px/1 sans-serif;cursor:pointer}
.hp-strip-arrow:disabled{opacity:.35;cursor:default}
.house-project-sidebar :is(button,summary,.hp-project-strip):focus-visible{outline:2px solid #218849;outline-offset:-3px}
body[data-calc-way=house] .house-project-sidebar #house-project-launcher{margin:0;padding:4px 0;min-height:28px;font-size:13px;background:none;border:0;text-decoration:underline}
body[data-calc-way=house] .house-project-sidebar .house-opening-colours{display:block;margin:2px 0 0;width:100%}
.house-project-sidebar .house-opening-colours>summary{cursor:pointer;font-size:14px;font-weight:600;color:#294d3b;padding:6px 0}
.house-project-sidebar .house-opening-colours fieldset{margin:14px 0}
@media(min-width:1180px){body[data-calc-way=house] main>.house-project-sidebar{grid-column:1;grid-row:2;margin-top:12px}body[data-calc-way=house] main>.measurements{grid-row:1/span 2}}
@media(max-width:1179px){body[data-calc-way=house] .house-project-sidebar{--hp-card-height:110px;width:min(100%,300px);margin-inline:auto}}
@media print{.house-project-sidebar{display:none!important}}



.hp-photo-project>svg{width:76px;height:58px;flex:1;min-height:0;align-self:center;color:#438160;padding:18px 0}
.hp-project-strip .hp-photo-project{background:#e9f2eb;border-style:dashed}
.hp-project-strip .hp-photo-project strong{line-height:18px;padding-block:6px}
.hp-photo-help{line-height:1.5;max-width:760px;margin:8px 0 18px;color:#405d49}
.hp-photo-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.hp-photo-card{min-width:0;border:1px solid #c9d9cd;border-radius:10px;padding:12px;background:#f7faf7;display:flex;flex-direction:column;gap:10px}
.hp-photo-card>strong{font-size:15px}
.hp-photo-frame{height:160px;display:grid;place-items:center;background:#eaf0eb;border-radius:7px;overflow:hidden}
.hp-photo-frame img{width:100%;height:100%;object-fit:contain}
.hp-photo-frame svg{width:64px;height:48px;color:#749783}
.hp-photo-card [hidden]{display:none!important}
.hp-photo-upload{position:relative;display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px;border:1px solid #9bb8a5;border-radius:7px;background:#fff;color:#275d3c;font-size:14px;font-weight:600;cursor:pointer;text-align:center}
.hp-photo-upload input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.hp-photo-upload:focus-within{outline:2px solid #218849;outline-offset:2px}
.hp-photo-upload:has(input:disabled){opacity:.6;cursor:default}
.house-project-dialog .hp-photo-remove{background:none;border:0;color:#9a4d3c;min-height:32px;font-size:13px;text-decoration:underline}
.house-project-dialog:has(.hp-photo-editor){width:min(1060px,calc(100vw - 24px))}
@media(max-width:760px){.hp-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.hp-photo-frame{height:130px}.hp-photo-card{padding:10px}.hp-photo-help{font-size:14px}}
@media(max-width:400px){.hp-photo-grid{gap:8px}.hp-photo-frame{height:100px}.hp-photo-card>strong{font-size:13px}.hp-photo-upload{font-size:12px}}

.hp-photo-toolbar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.hp-photo-toolbar .hp-photo-upload{padding-inline:20px}
.hp-photo-toolbar>span{font-size:14px;color:#637264}
.hp-photo-grid:empty{display:none}
.hp-photo-status{font-size:13px;line-height:1.4;margin:0;overflow-wrap:anywhere}
.hp-photo-card[data-status=invalid]{border-color:#bd5b48;background:#fff7f5}
.hp-photo-card[data-status=invalid] .hp-photo-status{color:#a23b2c}
.hp-photo-card[data-status=error] .hp-photo-status{color:#915b13}
.hp-photo-card[data-status=valid] .hp-photo-status{color:#237240}
.hp-photo-card .hp-photo-remove{margin-top:auto}

/* Generated house review: a compact, centred model viewer. */
.house-project-dialog:has(.hp-result-preview){width:min(960px,calc(100vw - 32px))}
.hp-result-preview{height:clamp(260px,48dvh,490px)}
.hp-result-preview canvas{cursor:grab;touch-action:none;user-select:none}
.hp-result-preview canvas.is-dragging{cursor:grabbing}
.hp-result-preview canvas:focus-visible{outline:2px solid #28954f;outline-offset:-3px;border-radius:12px}
.hp-orbit-hint{margin:0;text-align:center;color:#637264;font-size:13px;line-height:1.4}
@media(max-width:720px){.house-project-dialog:has(.hp-result-preview){width:calc(100vw - 16px)}.hp-result-preview{height:clamp(250px,42dvh,400px)}}

/* A saved photo house occupies the first project slot; its delete action is separate. */
.hp-photo-slot{position:relative;min-width:0;display:flex;align-items:stretch}
.hp-photo-slot>.hp-project-card{width:100%}
.hp-project-strip>.hp-photo-slot{flex:0 0 var(--hp-card-height);height:var(--hp-card-height);scroll-snap-align:start}
.hp-project-strip .hp-photo-slot>.hp-strip-card{flex:1 1 auto;height:100%;scroll-snap-align:none}
.hp-photo-slot .hp-delete-house{position:absolute;top:8px;right:8px;display:grid;place-items:center;width:36px;height:36px;min-height:36px;padding:7px;border:1px solid #cbd8ce;border-radius:8px;background:#fffffff0;color:#954b3b;box-shadow:0 2px 5px #17342614;cursor:pointer}
.hp-delete-house svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.hp-photo-slot .hp-delete-house:hover{background:#fff1ec;border-color:#b96650}
.hp-photo-slot .hp-delete-house:disabled{opacity:.5;cursor:wait}
.hp-saved-message{font-size:13px;line-height:1.45;color:#526c59;margin:0}
.hp-saved-message:empty{display:none}
@media(pointer:coarse){.hp-photo-slot .hp-delete-house{width:44px;height:44px}}
