.estimate-alert{margin:8px 0;padding:8px 10px;border-left:3px solid #985219;background:#fff3e1;color:#653400;font-weight:650}
.estimate-alert[hidden]{display:none}
.estimate-sheet{box-sizing:border-box;width:min(95vw,56rem);max-width:95vw;max-height:90vh;max-height:90dvh;margin:auto;padding:0;border:1px solid #ded1e5;border-radius:16px;background:#fff;color:#281936;overscroll-behavior:contain}
.estimate-sheet::backdrop{background:#21132d99}
.sheet-toolbar{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:8px clamp(8px,3vw,24px);background:#faf6fc;border-bottom:1px solid #ded1e5}
.sheet-toolbar p{flex:1;margin:0;font-weight:750}
.sheet-toolbar nav{display:flex;flex:1 0 100%;gap:4px;flex-wrap:wrap}
.sheet-toolbar button{min-width:44px;min-height:44px;padding:5px 9px;border:1px solid #ded1e5;border-radius:8px;background:#fff;color:inherit;font:inherit;font-size:.84rem;cursor:pointer}
.sheet-toolbar nav button{background:transparent;border-color:transparent;color:#5d266f;font-weight:650}
.sheet-toolbar button:hover{background:#f0e2f6}
.estimate-sheet :is(button,h2,h3):focus-visible{outline:2px solid #7c23a9;outline-offset:2px}
.estimate-sheet article{padding:clamp(12px,3vw,28px)}
.estimate-sheet h2{margin:0;font-size:clamp(1.3rem,4vw,2rem);line-height:1.15}
.estimate-sheet h3{margin:1.25rem 0 .5rem}
.estimate-sheet .sheet-price{font-size:clamp(1.4rem,5vw,2rem);font-weight:780;margin:.25em 0;font-variant-numeric:tabular-nums}
.estimate-sheet .sheet-price-basis{margin:.5rem 0 .8rem;color:#634d70;font-size:.89rem}
.sheet-scope{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 1rem}
.sheet-scope > div{padding:10px;border:1px solid #e7dbec;border-radius:10px;background:#faf7fc}
.sheet-scope dt{font-weight:730}
.sheet-scope dd{margin:.25rem 0 0;font-size:.9rem;line-height:1.4}
.estimate-sheet figure{margin:0 0 1rem}
.estimate-sheet figure svg{display:block;width:100%;max-height:50vh}
.sheet-room,.sheet-base,.sheet-upper,.sheet-opening,.sheet-gap{stroke:#45514a;stroke-width:1.5;vector-effect:non-scaling-stroke}
.sheet-room{fill:#f9faf8}.sheet-base{fill:#dce7cd}
.sheet-upper{fill:none;stroke-dasharray:3 3}.sheet-opening{stroke:#466985;stroke-width:3}.sheet-gap{stroke:#985219;stroke-width:3}
.sheet-wall,.sheet-module,.sheet-opening-label{fill:#202523;text-anchor:middle;dominant-baseline:middle}
.sheet-wall,.sheet-opening-label{paint-order:stroke;stroke:#fff;stroke-width:3;vector-effect:non-scaling-stroke}
.estimate-sheet table{width:100%;table-layout:fixed;border-collapse:collapse;margin:0 0 .85rem;font-size:.87rem;line-height:1.35}
.estimate-sheet caption{text-align:left;font-weight:650;margin-bottom:.3rem}
.estimate-sheet th,.estimate-sheet td{text-align:left;vertical-align:top;padding:7px 5px;border-bottom:1px solid #e1e4df;overflow-wrap:anywhere;hyphens:auto}
.estimate-sheet thead{background:#f0f3ec}
.estimate-sheet tbody th{font-weight:550}
.sheet-cell-label{display:none}
.estimate-sheet ul{padding-inline-start:1.3rem}
.estimate-sheet li{margin:.35rem 0}
@media screen and (max-width:600px){
 .sheet-toolbar nav{gap:2px}
 .sheet-toolbar nav button{padding-inline:5px}
 .sheet-scope{grid-template-columns:1fr;gap:6px}
 .estimate-sheet .sheet-stack,.sheet-stack :is(tbody,tfoot,caption){display:block}
 .sheet-stack thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .sheet-stack tbody tr{display:grid;padding:7px 9px;border:1px solid #e7dbec;border-radius:8px;margin-bottom:6px}
 .estimate-sheet .sheet-stack tbody :is(th,td){padding:3px 0;border:0;overflow-wrap:break-word}
 .estimate-sheet .sheet-stack tbody th{font-weight:720}
 .estimate-sheet .sheet-stack tbody td{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:8px}
 .sheet-cell-label{display:block;color:#634d70}
 .sheet-stack tfoot tr{display:flex;justify-content:space-between;gap:8px}
}
@page {margin:13mm}
@media print {
 body.printing-estimate > :not(.estimate-sheet){display:none!important}
 body.printing-estimate{margin:0!important;background:white!important;overflow:visible!important}
 body.printing-estimate .estimate-sheet{position:static;max-width:none;width:auto;max-height:none;margin:0;padding:0;overflow:visible;border:0}
 .estimate-sheet::backdrop,.sheet-toolbar{display:none}
 .estimate-sheet article{padding:0}
 .estimate-sheet figure,.estimate-sheet tr,.estimate-sheet h2,.estimate-sheet h3,.estimate-sheet caption,.sheet-scope > div{break-inside:avoid}
 .estimate-sheet h3,.estimate-sheet caption{break-after:avoid}
 .estimate-sheet figure svg{max-height:110mm}
 .estimate-sheet thead{display:table-header-group}
 .estimate-sheet tfoot{display:table-row-group}
 .estimate-sheet{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
