:root{--order-ink:var(--text,#111814);--order-muted:var(--muted,#6f7771);--order-line:var(--line,#e3e6df);--order-soft:var(--bg,#f6f6f1);--order-paper:var(--panel-strong,#fffefa);--order-green:var(--accent,#3f7363);--order-green-2:var(--accent-strong,#15211d);--order-orange:#c66f2b;--order-danger:var(--danger,#a83a32);--order-shadow:var(--shadow,0 12px 34px rgba(31,42,35,.09))}
*{box-sizing:border-box}.order-app{min-height:100vh;display:grid;grid-template-columns:190px 370px minmax(620px,1fr);background:#f7f6f1;color:var(--order-ink)}
.order-sidebar{position:sticky;top:0;height:100vh;padding:24px 16px;display:flex;flex-direction:column;border-right:1px solid var(--order-line);background:rgba(255,254,250,.96)}.order-brand{display:flex;gap:12px;align-items:center;color:inherit;text-decoration:none;padding:0 8px 34px}.order-brand-mark{width:34px;height:34px;border:1px solid #dfe5dc;border-radius:50%;display:grid;place-items:center;color:var(--order-green);font-weight:800;font-size:11px;overflow:hidden;background:#fff}.order-brand-mark.has-logo{border-color:transparent;border-radius:8px}.order-brand-mark.has-logo #orderBrandFallback{display:none}.order-brand-logo{display:block;width:100%;height:100%;padding:2px;object-fit:contain}.order-brand-logo[hidden]{display:none}.order-brand strong,.order-brand small{display:block}.order-brand strong{font-size:16px}.order-brand small{font-size:10px;letter-spacing:.08em}.order-sidebar nav{display:grid;gap:8px}.order-sidebar-footer{margin-top:auto;display:grid;gap:6px;border-top:1px solid var(--order-line);padding-top:16px}.order-nav{width:100%;display:flex;gap:12px;align-items:center;border:0;background:transparent;color:#333;border-radius:8px;padding:13px 14px;text-decoration:none;text-align:left;font-weight:700}.order-nav:hover,.order-nav.active{background:#edf0e8;color:var(--order-green)}
.order-list-pane,.order-editor-pane{min-width:0;background:var(--order-paper)}.order-list-pane{border-right:1px solid var(--order-line);display:flex;flex-direction:column;height:100vh;position:sticky;top:0}.order-pane-header{min-height:70px;padding:0 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--order-line);gap:12px}.order-pane-header h1{font-size:19px;margin:0}.order-editor-header{position:sticky;top:0;z-index:8;background:rgba(255,254,250,.94);backdrop-filter:blur(12px)}.order-editor-header>div:first-of-type{display:flex;align-items:center;gap:10px}.order-header-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.order-app button,.order-dialog button{border:1px solid var(--order-line);background:white;color:var(--order-ink);border-radius:7px;min-height:38px;padding:8px 14px;font:inherit;font-weight:700;cursor:pointer}.order-app button:hover,.order-dialog button:hover{border-color:#b8c4ba}.order-app button:disabled,.order-dialog button:disabled{opacity:.45;cursor:not-allowed}.order-primary{background:linear-gradient(135deg,var(--order-green),#276646)!important;color:white!important;border-color:transparent!important}.order-primary-soft{color:var(--order-green)!important;background:#f4f8f4!important}.danger{color:var(--order-danger)!important}.compact{min-height:34px!important;padding:7px 11px!important;font-size:12px}.order-icon-button{width:40px;padding:0!important}.order-mobile-menu,.order-mobile-back{display:none}
.order-search-row{padding:14px 20px 8px;display:flex;gap:8px}.order-search{flex:1;border:1px solid var(--order-line);border-radius:7px;display:flex;align-items:center;gap:8px;padding:0 10px;background:white}.order-search input{width:100%;border:0;outline:0;padding:10px 0;background:transparent}.order-tabs{display:flex;gap:2px;padding:0 18px;border-bottom:1px solid var(--order-line);overflow:auto}.order-tabs button{border:0;border-radius:0;background:transparent;white-space:nowrap;padding:12px 8px;min-height:auto;font-size:12px;color:var(--order-muted)}.order-tabs button.active{color:var(--order-green);border-bottom:2px solid var(--order-green)}.order-feedback{min-height:20px;margin:8px 20px;color:var(--order-muted);font-size:12px}.order-feedback.error{color:var(--order-danger)}.order-list{overflow:auto;flex:1}.order-list-item{display:block;width:100%;text-align:left;border:0!important;border-radius:0!important;border-bottom:1px solid var(--order-line)!important;padding:16px 20px!important;background:transparent!important}.order-list-item:hover,.order-list-item.selected{background:#faf9f4!important}.order-list-item-row{display:flex;justify-content:space-between;gap:10px;align-items:center}.order-list-item strong{font-size:13px}.order-list-item p{font-size:12px;color:#4e554f;margin:7px 0}.order-list-item small{color:var(--order-muted);font-weight:500}.order-list-amount{font-weight:800;font-size:13px}.order-status{display:inline-flex;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:800;background:#eef1ed;color:#455049}.order-status.confirmed{background:#e8f1e6;color:#2f653e}.order-status.sent{background:#e5f1f6;color:#27617a}.order-status.cancelled{background:#f5e8e6;color:#8d3932}.order-pagination{height:56px;border-top:1px solid var(--order-line);display:flex;align-items:center;justify-content:center;gap:12px}.order-pagination button{min-height:32px;padding:4px 12px}
.order-editor-pane{height:100vh;overflow:auto;padding-bottom:40px}.order-card{margin:16px 20px;padding:18px;border:1px solid var(--order-line);border-radius:10px;background:#fff;box-shadow:0 2px 12px rgba(31,42,35,.025)}.order-card-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}.order-card-title h2{font-size:15px;margin:0}.order-card-title small{color:var(--order-muted)}.site-card-title>div{display:flex;align-items:center;gap:7px}.site-card-title>div:last-child{justify-content:flex-end}.site-data-badge{display:inline-flex;padding:3px 7px;border-radius:999px;background:var(--accent-soft);color:var(--order-green);font-size:9px;font-weight:900}.site-data-badge.qa{background:#f4eddb;color:#72591f}.order-form-grid{display:grid;gap:11px}.order-form-grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.order-form-grid label,.order-settings-form label,.calculator-form label{font-size:11px;color:var(--order-muted);font-weight:700;display:grid;gap:6px}.span-2{grid-column:span 2}.span-3{grid-column:span 3}.order-app input,.order-app textarea,.order-app select,.order-dialog input,.order-dialog textarea,.order-dialog select{border:1px solid var(--order-line);border-radius:7px;background:#fff;padding:9px 10px;min-height:38px;font:inherit;color:var(--order-ink);width:100%}.order-app input:focus,.order-app textarea:focus,.order-app select:focus,.order-dialog input:focus,.order-dialog textarea:focus{outline:2px solid rgba(23,76,53,.16);border-color:var(--order-green)}.order-app input[readonly]{background:#f7f7f3;color:#5f665f}.order-check{display:flex!important;align-items:center;gap:7px!important}.order-check input{width:auto;min-height:auto}.order-inline-actions{display:flex;gap:7px}.order-table-wrap{overflow:auto}.order-items-table{width:100%;min-width:980px;border-collapse:collapse;font-size:11px}.order-items-table th{background:#f7f7f2;padding:9px 6px;border:1px solid var(--order-line);text-align:left;white-space:nowrap}.order-items-table td{border:1px solid var(--order-line);padding:5px;vertical-align:middle}.order-items-table td:first-child{text-align:center;width:34px}.order-items-table input{border:0!important;padding:5px;min-height:30px;outline:0!important}.order-items-table .row-source{display:block;font-size:9px;color:var(--order-green);margin-top:2px}.order-row-actions{display:flex;gap:3px}.order-row-actions button{min-height:28px;padding:2px 7px}.order-items-mobile,.order-mobile-actionbar{display:none}.order-empty{text-align:center;padding:34px;color:var(--order-muted);border:1px dashed var(--order-line);border-top:0}.order-totals{display:flex;justify-content:flex-end;gap:24px;padding-top:14px;font-size:12px}.order-totals strong{margin-left:7px;font-size:14px}.order-totals span:last-child strong{color:var(--order-green);font-size:17px}.order-delivery-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.order-delivery-history{display:grid;gap:6px;margin-top:12px}.delivery-row{display:flex;justify-content:space-between;background:#f8f8f4;padding:9px;border-radius:6px;font-size:11px}
.order-calculator{position:fixed;z-index:30;right:0;top:0;width:390px;max-width:100%;height:100vh;background:var(--order-paper);box-shadow:-18px 0 50px rgba(31,42,35,.17);transform:translateX(105%);transition:transform .24s ease;overflow:auto;padding-bottom:24px}.order-calculator.open{transform:none}.order-calculator header{display:flex;justify-content:space-between;align-items:center;padding:18px 20px;border-bottom:1px solid var(--order-line)}.order-calculator h2{margin:2px 0 0;font-size:19px}.order-calculator header small{color:var(--order-green);font-weight:800}.order-calculator header button{border:0;font-size:24px;padding:0;width:38px}.calculator-tabs{padding:0 14px}.calculator-form{padding:18px 20px;display:grid;grid-template-columns:1fr 1fr;gap:12px}.calculator-form .wide{grid-column:span 2}.calculator-help{grid-column:span 2;background:#f5f6f1;padding:10px;border-radius:7px;color:var(--order-muted);font-size:11px;line-height:1.5}.calculator-result{margin:0 20px 16px;background:#f3f7f2;border:1px solid #dce7dd;border-radius:9px;padding:15px}.calculator-result strong{font-size:25px;color:var(--order-green)}.calculator-result dl{display:grid;grid-template-columns:1fr auto;gap:7px;margin:12px 0 0;font-size:11px}.calculator-result dd{font-weight:800}.order-wide{width:calc(100% - 40px);margin:0 20px 8px}.order-scrim{position:fixed;inset:0;z-index:20;background:rgba(17,24,20,.28)}
.order-dialog{width:min(920px,calc(100vw - 28px));max-height:92vh;padding:0;border:0;border-radius:12px;box-shadow:var(--order-shadow);background:#eee}.order-dialog::backdrop{background:rgba(17,24,20,.46)}.order-dialog>header,.order-dialog>footer{padding:14px 18px;background:white;display:flex;align-items:center;justify-content:space-between;position:sticky;z-index:3}.order-dialog>header{top:0;border-bottom:1px solid var(--order-line)}.order-dialog>footer{bottom:0;border-top:1px solid var(--order-line);justify-content:flex-end}.order-dialog>header div{display:grid}.order-dialog>header small{color:var(--order-muted)}.order-dialog>header button{border:0;font-size:22px}.preview-dialog{overflow:auto}.order-print-root{padding:24px;display:grid;gap:20px;justify-content:center}.settings-dialog{width:min(560px,calc(100vw - 28px));background:white}.order-settings-form{padding:18px;display:grid;gap:13px}
.print-sheet.order-print-sheet{position:relative;width:210mm;min-height:297mm;padding:16mm 15mm;background:#fff;color:#151a17;font-family:"NanumGothic",Arial,sans-serif;box-shadow:0 4px 18px rgba(0,0,0,.08)}.order-doc-header{display:flex;justify-content:space-between;align-items:flex-end;border-bottom:2px solid #173f2f;padding-bottom:6mm}.order-doc-brand strong{font-size:22px;letter-spacing:.03em}.order-doc-brand small{display:block;font-size:9px;margin-top:3px;color:#4f6258}.order-doc-title{font-size:28px;font-weight:900;letter-spacing:.18em}.order-doc-meta{display:grid;grid-template-columns:26mm 1fr 26mm 1fr;margin-top:8mm;border-top:1px solid #8d9890;border-left:1px solid #8d9890;font-size:10px}.order-doc-meta>*{border-right:1px solid #8d9890;border-bottom:1px solid #8d9890;padding:3mm}.order-doc-meta dt{margin:0;background:#f2f4ef;font-weight:800}.order-doc-meta dd{margin:0}.order-doc-table{width:100%;border-collapse:collapse;margin-top:8mm;font-size:9px}.order-doc-table th,.order-doc-table td{border:1px solid #7e8981;padding:2.4mm 1.5mm;text-align:center}.order-doc-table th{background:#eef2ec}.order-doc-table td.text{text-align:left}.order-doc-total{margin-top:5mm;margin-left:auto;width:74mm;display:grid;grid-template-columns:1fr 1fr;font-size:10px;border-top:1px solid #7e8981;border-left:1px solid #7e8981}.order-doc-total>*{padding:2.5mm;border-right:1px solid #7e8981;border-bottom:1px solid #7e8981}.order-doc-total dt{background:#f2f4ef;font-weight:800}.order-doc-total dd{margin:0;text-align:right}.order-doc-total .grand{color:#174c35;font-size:12px;font-weight:900}.order-doc-note{margin-top:8mm;padding:4mm;border:1px solid #aab2ac;min-height:18mm;font-size:9px;line-height:1.6;white-space:pre-wrap}.order-doc-footer{position:absolute;left:15mm;right:15mm;bottom:10mm;display:flex;justify-content:space-between;border-top:1px solid #d4d8d3;padding-top:3mm;font-size:8px;color:#677069}
@media(max-width:1250px){.order-app{grid-template-columns:76px 330px minmax(570px,1fr)}.order-sidebar{padding:20px 10px}.order-brand{justify-content:center}.order-brand>span:last-child,.order-nav span{display:none}.order-nav{justify-content:center;font-size:18px}.order-form-grid.three{grid-template-columns:repeat(2,minmax(0,1fr))}.span-3{grid-column:span 2}.order-delivery-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:860px){.order-app{display:block}.order-sidebar{position:fixed;z-index:50;left:0;top:0;width:220px;transform:translateX(-105%);transition:transform .2s;box-shadow:var(--order-shadow)}.order-sidebar.open{transform:none}.order-brand>span:last-child,.order-nav span{display:block}.order-nav{justify-content:flex-start;font-size:14px}.order-list-pane,.order-editor-pane{height:100vh;position:static}.order-editor-pane{display:none}.order-app.mobile-editor .order-list-pane{display:none}.order-app.mobile-editor .order-editor-pane{display:block}.order-mobile-menu,.order-mobile-back{display:inline-flex;padding:4px 10px!important}.order-pane-header{padding:0 12px}.order-editor-header{align-items:flex-start;padding:10px 12px;min-height:96px}.order-editor-header>div:first-of-type{align-items:flex-start;padding-top:8px}.order-header-actions{gap:5px}.order-header-actions button{font-size:11px;padding:7px 9px}.order-card{margin:10px;padding:14px}.order-form-grid.three{grid-template-columns:1fr}.span-2,.span-3{grid-column:auto}.order-card-title{align-items:flex-start}.order-items-card{padding:12px}.order-totals{justify-content:flex-start;overflow:auto}.order-delivery-grid{grid-template-columns:1fr 1fr}.order-calculator{width:100%}.print-sheet.order-print-sheet{transform-origin:top left}.order-dialog{width:100vw;max-height:100vh;height:100vh;border-radius:0}.order-print-root{padding:12px;justify-content:start;overflow:auto}}
@media print{body{background:#fff}.order-app,.order-dialog>header,.order-dialog>footer{display:none!important}.order-dialog[open]{display:block;position:static;width:auto;height:auto;max-height:none}.order-print-root{padding:0}.print-sheet.order-print-sheet{box-shadow:none;break-after:page}}
.order-editor-pane.hide-amounts .amount-column{display:none}
.order-public-view{margin:0;background:#ecece7;color:#111814}.order-public-toolbar{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;padding:12px 20px;background:rgba(255,255,252,.95);border-bottom:1px solid #dde1db;backdrop-filter:blur(10px)}.order-public-toolbar div{display:grid;gap:3px}.order-public-toolbar small{color:#6f7771}.order-public-error{margin:10vh auto;background:white;border-radius:12px;padding:32px;width:min(520px,calc(100vw - 30px));text-align:center;box-shadow:0 12px 34px rgba(31,42,35,.09)}
.order-app button,.order-dialog button{width:auto;margin-top:0}.order-nav,.order-list-item{width:100%!important}.order-wide{width:calc(100% - 40px)!important}.calculator-reset{margin:0 20px 12px!important;color:var(--order-green)!important}.calculator-diagram{min-height:82px;border:1px dashed #b8c5bb;border-radius:8px;background:linear-gradient(135deg,#fafbf8,#f1f5ef);display:grid;place-items:center;align-content:center;gap:5px;color:var(--order-green)}.calculator-diagram strong{font-size:20px}.calculator-diagram small{color:var(--order-muted)}
.calculator-section{display:grid;grid-template-columns:1fr 1fr;gap:12px}.calculator-locations{display:grid;gap:8px}.calculator-location-title{display:flex;align-items:center;justify-content:space-between;gap:8px}.calculator-location-title strong{font-size:12px;color:var(--order-ink)}.calculator-location-title button{min-height:30px!important;padding:5px 9px!important;font-size:11px}.calculator-location-row{position:relative;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px 38px 10px 10px;border:1px solid var(--order-line);border-radius:8px;background:#fafaf6}.calculator-location-row>button{position:absolute;right:7px;top:7px;width:26px!important;min-height:26px!important;padding:0!important}.calculator-ceiling{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;border-radius:7px;background:#f4f6f1}.calculator-ceiling small{color:var(--order-muted);font-size:10px;text-align:right}.calculator-form [hidden]{display:none!important}.calculator-result dd{margin:0;text-align:right}.calculator-result input{min-width:145px}
@media(max-width:860px){.order-editor-pane{padding-bottom:40px}.order-editor-header{min-height:64px;backdrop-filter:none}.order-header-actions{position:static;padding:0;background:transparent;border:0;box-shadow:none;justify-content:flex-end;flex-wrap:wrap}.order-header-actions button{font-size:11px;padding:7px 10px;white-space:nowrap}}
@media(max-width:430px){.calculator-form,.calculator-location-row,.calculator-section{grid-template-columns:1fr}.calculator-form .wide,.calculator-help{grid-column:auto}.calculator-location-row{padding-right:38px}.calculator-result dl{grid-template-columns:1fr}.calculator-result dd{text-align:left}.calculator-result input{min-width:0}}
.order-doc-brand{display:flex;align-items:center;gap:3mm}.order-doc-logo{width:15mm;height:15mm;object-fit:contain}
.order-editor-pane.hide-amounts .order-totals{display:none}

/* EASE ORDER v3: process-scoped authoring, visual quantity drawer and settings. */
body[data-page="orders"],body[data-page="order-settings"]{overflow-x:clip;background:var(--order-soft);color:var(--order-ink)}
.order-filter-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding:4px 20px 12px;border-bottom:1px solid var(--order-line)}
.order-filter-grid label{display:grid;gap:4px;margin:0;color:var(--order-muted);font-size:10px;font-weight:700}
.order-filter-grid input,.order-filter-grid select{min-height:34px;padding:7px 9px;font-size:11px}
.order-vendor-filter{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;align-items:end}
.order-vendor-filter label{grid-column:1/-1}
.order-filter-grid .order-filter-reset{grid-column:2;justify-self:end;min-width:0;min-height:20px;padding:0 2px;border:0;background:transparent;color:var(--order-muted);font-size:9px;line-height:20px;font-weight:700}
.order-filter-grid .order-filter-reset:hover{border:0;background:transparent;color:var(--order-green);text-decoration:underline;text-underline-offset:2px}
.order-filter-field{display:grid;gap:4px;min-width:0}.order-vendor-filter>.order-filter-field{grid-column:1/-1}
.order-filter-picker{position:relative;min-width:0}.order-filter-grid .order-filter-picker input{width:100%;padding-right:44px}
.order-filter-picker button{position:absolute;right:1px;top:1px;bottom:1px;width:40px;min-height:0;padding:0;border:0;background:transparent;color:var(--order-green);font-size:22px}
.order-filter-picker button[aria-expanded="true"] span{display:inline-block;transform:rotate(180deg)}
.order-filter-options{position:fixed;z-index:60;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:4px;background:var(--order-paper);color:var(--order-ink);border:1px solid var(--order-line);border-radius:8px;box-shadow:0 8px 24px rgba(31,42,35,.18)}
.order-filter-options[hidden]{display:none}.order-filter-options .order-filter-option{display:block;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:5px;background:transparent;color:inherit;font:inherit;font-size:14px;line-height:1.5;text-align:left;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
.order-filter-option:hover,.order-filter-option.is-active,.order-filter-option[aria-selected="true"]{background:var(--accent-soft,#edf3ef);color:var(--order-green)}
.order-filter-empty{margin:0;padding:10px 12px;color:var(--order-muted);font-size:13px}
@media(max-width:430px){.order-filter-grid>.order-site-filter{grid-column:1/-1}.order-filter-options .order-filter-option{font-size:16px}}
.order-list-process{display:inline-flex;align-items:center;min-height:22px;padding:2px 8px;border:1px solid color-mix(in srgb,var(--order-green) 24%,transparent);border-radius:999px;background:var(--accent-soft);color:var(--order-green);font-size:10px;font-weight:800;white-space:nowrap}
.order-list-site{display:flex;align-items:center;gap:7px;min-width:0}
.order-list-site strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-list-item-meta{display:grid;grid-template-columns:1fr 1fr;gap:5px 10px;margin-top:8px;color:var(--order-muted);font-size:10px;font-weight:600}
.order-list-item-meta span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-primary{background:var(--order-green)!important}

.order-calculator{width:min(460px,100vw);height:100vh;height:100dvh;display:flex;flex-direction:column;overflow:hidden;padding:0;background:var(--order-paper)}
.calculator-header{flex:0 0 auto;display:flex;justify-content:space-between;align-items:center;padding:17px 20px;border-bottom:1px solid var(--order-line);background:color-mix(in srgb,var(--order-paper) 94%,transparent)}
.calculator-body{flex:1 1 auto;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:16px 18px 26px}
.calculator-block{display:grid;gap:12px;padding:0 0 20px;margin:0 0 20px;border-bottom:1px solid var(--order-line)}
.calculator-block:last-child{margin-bottom:0;border-bottom:0}
.calculator-block-title{display:flex;align-items:flex-start;gap:9px}
.calculator-block-title>span{display:grid;place-items:center;flex:0 0 24px;width:24px;height:24px;border-radius:999px;background:var(--accent-soft);color:var(--order-green);font-size:11px;font-weight:900}
.calculator-block-title>div{display:grid;gap:3px;min-width:0}
.calculator-block-title strong{font-size:13px}
.calculator-block-title small{color:var(--order-muted);font-size:10px;line-height:1.45}
.calculator-actions{position:relative;z-index:2;display:grid;grid-template-columns:1fr 1fr;gap:8px;flex:0 0 auto;padding:11px 18px calc(11px + env(safe-area-inset-bottom));border-top:1px solid var(--order-line);background:var(--order-paper);box-shadow:0 -10px 26px rgba(21,33,29,.07)}
.calculator-actions button{width:100%;min-height:46px;margin:0}
.calculator-actions button:only-child{grid-column:1/-1}
.calculator-form{padding:0;grid-template-columns:1fr 1fr}
.calculator-diagram{grid-column:1/-1;min-height:150px;padding:12px;background:var(--order-soft);border-style:solid}
.area-diagram{width:100%;min-height:132px;display:grid;place-items:center;color:var(--order-green)}
.area-diagram svg{display:block;width:100%;height:118px;overflow:visible}
.area-diagram .area-shape{fill:color-mix(in srgb,var(--order-green) 8%,white);stroke:var(--order-green);stroke-width:1.5}
.area-diagram .area-line{stroke:var(--order-muted);stroke-width:1}
.area-diagram text{fill:var(--order-muted);font-size:11px;font-weight:700}
.area-diagram .area-value{fill:var(--order-green);font-size:14px;font-weight:900}

.construction-method-cards,.material-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.construction-method-card,.material-card{position:relative;min-width:0;overflow:hidden;margin:0!important;padding:0!important;text-align:left;border:1px solid var(--order-line)!important;border-radius:11px!important;background:var(--order-paper)!important;color:var(--order-ink)!important;box-shadow:none!important;transform:none!important}
.construction-method-card:hover,.material-card:hover{border-color:var(--line-strong)!important}
.construction-method-card.is-selected,.material-card.is-selected{border-color:var(--order-green)!important;background:var(--accent-soft)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--order-green) 10%,transparent)!important}
.construction-method-card.is-selected::after,.material-card.is-selected::after{content:"✓";position:absolute;right:7px;top:7px;display:grid;place-items:center;width:20px;height:20px;border-radius:999px;background:var(--order-green);color:#fff;font-size:11px;font-weight:900;box-shadow:0 2px 8px rgba(31,74,55,.2)}
.construction-method-card img,.material-card img,.order-image-fallback{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;background:var(--order-soft)}
.material-card img,.material-card .order-image-fallback{aspect-ratio:4/3}
.order-image-fallback{display:grid;place-items:center;color:var(--order-green);font-size:26px;font-weight:900}
.construction-method-copy,.material-card-copy{display:grid;gap:4px;padding:9px}
.construction-method-copy strong,.material-card-copy strong{font-size:11px;line-height:1.35}
.construction-method-copy small,.material-card-copy small{display:block;color:var(--order-muted);font-size:9px;line-height:1.4;overflow-wrap:anywhere}
.material-card-meta{display:flex;flex-wrap:wrap;gap:4px}
.material-card-meta span{padding:2px 5px;border-radius:999px;background:var(--order-soft);color:var(--order-muted);font-size:8px;font-weight:700}
.material-card-package{display:block;color:var(--order-green);font-size:8px;font-weight:800;line-height:1.35}
.material-search{display:grid;gap:5px!important;margin:0!important;color:var(--order-muted);font-size:10px;font-weight:700}
.material-category-filters{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px;scrollbar-width:thin}
.material-category-filters button{flex:0 0 auto;min-height:30px;padding:4px 9px;margin:0;border-radius:999px;font-size:10px}
.material-category-filters button.is-selected{border-color:var(--order-green);background:var(--accent-soft);color:var(--order-green)}
.material-empty{grid-column:1/-1;padding:22px 10px;border:1px dashed var(--order-line);border-radius:10px;text-align:center;color:var(--order-muted);font-size:11px}
.component-rule-cards{display:grid;gap:8px;min-width:0}
.component-rule-card{display:grid;grid-template-columns:72px minmax(0,1fr);align-items:center;gap:10px;min-width:0;padding:8px;border:1px solid var(--order-line);border-radius:10px;background:var(--order-paper)}
.component-rule-card>img,.component-rule-card>.order-image-fallback{width:72px;height:58px;aspect-ratio:auto;border-radius:7px;object-fit:cover;background:var(--order-soft)}
.component-rule-card>div{display:grid;gap:3px;min-width:0}.component-rule-card strong,.component-rule-card small,.component-rule-card b{overflow-wrap:anywhere}.component-rule-card strong{font-size:11px}.component-rule-card small{color:var(--order-muted);font-size:9px}.component-rule-card b{color:var(--order-green);font-size:10px}
.component-rule-badge{width:max-content;max-width:100%;padding:2px 6px;border-radius:999px;background:var(--accent-soft);color:var(--order-green);font-size:8px;font-weight:900}.component-rule-card.is-manual .component-rule-badge{background:var(--order-soft);color:var(--order-muted)}.component-rule-card.is-recommend .component-rule-badge{background:#f5f0df;color:#755b18}
.calculator-reset{width:auto!important;justify-self:start;margin:0!important;min-height:34px!important;padding:6px 10px!important;font-size:10px}
.calculator-result{margin:0}
.calculator-result .result-headline{display:block;margin-bottom:10px;font-size:24px;color:var(--order-green)}
.calculator-result .result-adjustment{grid-column:1/-1;display:grid;gap:5px;padding-top:6px}
.calculator-result .result-adjustment[hidden]{display:none!important}
.calculator-result .result-adjustment input{min-width:0}
.wood-assembly-fields{display:grid;gap:10px}.wood-assembly-choice{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.wood-assembly-choice>label,.wood-layer-card label,.wood-stud-card label,.wood-output-card label{display:grid;gap:5px;color:var(--order-muted);font-size:10px;font-weight:700}.wood-assembly-choice .order-check{display:flex;align-items:center;gap:7px;padding:8px;border:1px solid var(--order-line);border-radius:8px;background:var(--order-soft);color:var(--order-ink)}.wood-assembly-choice .order-check input{width:auto}.wood-layer-card,.wood-stud-card{display:grid;grid-template-columns:minmax(0,1fr) 130px;gap:8px;padding:11px;border:1px solid var(--order-line);border-radius:10px;background:var(--order-soft)}.wood-layer-card>strong,.wood-stud-card>strong{grid-column:1/-1;font-size:11px}.wood-stud-card{grid-template-columns:repeat(2,minmax(0,1fr))}.wood-stud-card .calculator-help{grid-column:1/-1;margin:2px 0 0}.wood-accessory-recommendations{display:grid;gap:6px;padding:10px;border:1px solid #e6dcc0;border-radius:10px;background:#fffaf0}.wood-accessory-recommendations>div{display:flex;flex-wrap:wrap;gap:5px}.wood-accessory-recommendations span{padding:3px 7px;border-radius:999px;background:#f5f0df;color:#755b18;font-size:9px;font-weight:800}.wood-accessory-recommendations small{color:var(--order-muted);font-size:9px}.wood-stud-reference{margin:0 0 10px;padding:9px;border-radius:8px;background:var(--accent-soft);color:var(--order-green);font-size:11px}.wood-output-results{display:grid;gap:9px}.wood-output-card{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(90px,.6fr) minmax(90px,.6fr);gap:8px;padding:11px;border:1px solid var(--order-line);border-radius:10px;background:#fff}.wood-output-card>div{display:grid;gap:3px}.wood-output-card>div>span{color:var(--order-green);font-size:9px;font-weight:900}.wood-output-card>div>strong{font-size:12px}.wood-output-card>div>small,.wood-output-card>div>p{margin:0;color:var(--order-muted);font-size:9px;line-height:1.45}.wood-output-card .wide{grid-column:1/-1}

.new-order-dialog{width:min(620px,calc(100vw - 28px));background:var(--order-paper)}
.new-order-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden}
.new-order-dialog .new-order-flow{min-height:0;overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:20px}
.new-order-dialog>footer{flex-wrap:wrap;gap:8px}
.new-order-start-feedback{flex:0 0 100%;margin:0;color:var(--order-muted);font-size:14px;line-height:1.4;overflow-wrap:anywhere}
.new-order-start-feedback.error{color:var(--order-danger)}
.new-order-start-feedback[hidden]{display:none!important}
.new-order-flooring-subtype select[aria-invalid="true"]{border-color:var(--order-danger)}
.new-order-flow{display:grid;gap:10px;padding:18px}
.new-order-step{position:relative;display:grid!important;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:5px 10px!important;margin:0!important;padding:14px;border:1px solid var(--order-line);border-radius:12px;background:var(--order-paper)}
.new-order-step>span{grid-row:1/3;display:grid;place-items:center;width:30px;height:30px;border-radius:999px;background:var(--accent-soft);color:var(--order-green);font-weight:900}
.new-order-step>strong{color:var(--order-ink);font-size:13px}
.new-order-step>input,.new-order-step>select{grid-column:2;margin:0}
.order-group-tabs{position:sticky;top:70px;z-index:7;display:flex;gap:6px;overflow-x:auto;padding:8px 20px;border-bottom:1px solid var(--order-line);background:rgba(255,254,250,.97)}
.order-group-tabs[hidden]{display:none!important}.order-group-tab{display:grid!important;gap:2px;flex:0 0 auto;min-width:92px;min-height:44px!important;padding:6px 10px!important;text-align:left}.order-group-tab small{color:var(--order-muted);font-size:9px}.order-group-tab.is-current{border-color:var(--order-green)!important;background:var(--accent-soft)!important;color:var(--order-green)!important}
.process-selection-step{align-items:start}.process-selection-head{grid-column:2;display:flex;align-items:center;justify-content:space-between;gap:10px}.process-selection-head>div{display:flex;gap:5px}.process-selection-head button{min-height:30px;padding:4px 8px;font-size:10px}.new-order-process-grid{grid-column:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.new-order-process-card{position:relative;display:grid;grid-template-columns:22px minmax(0,1fr);align-items:center;gap:7px;min-height:48px;padding:8px 9px;border:1px solid var(--order-line);border-radius:9px;background:#fff;color:var(--order-ink);font-size:11px;font-weight:800;cursor:pointer}.new-order-process-card input{position:absolute;opacity:0;pointer-events:none}.new-order-process-icon{display:grid;width:22px;height:22px;place-items:center;border-radius:7px;background:var(--order-soft);color:var(--order-green);font-size:11px}.new-order-process-check{position:absolute;right:6px;top:5px;color:transparent;font-size:10px}.new-order-process-card.is-selected{border-color:var(--order-green);background:var(--accent-soft);box-shadow:0 0 0 1px color-mix(in srgb,var(--order-green) 14%,transparent)}.new-order-process-card.is-selected .new-order-process-check{color:var(--order-green)}.new-order-process-card.is-disabled{opacity:.42;cursor:not-allowed}.new-order-process-count{grid-column:2;margin:0;color:var(--order-green);font-size:11px;font-weight:800}.new-order-flooring-subtype{grid-column:2;display:grid;grid-template-columns:120px 1fr;align-items:center;gap:8px;color:var(--order-muted);font-size:11px;font-weight:700}.new-order-flooring-subtype[hidden]{display:none!important}.new-order-conflict{margin:0;padding:12px;border:1px solid #e0c8a2;border-radius:10px;background:#fff9ef}.new-order-conflict[hidden]{display:none!important}.new-order-conflict>strong{display:block;color:#72511d;font-size:12px}.new-order-conflict>div{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.new-order-conflict #newOrderConflictList{display:grid;width:100%;color:var(--order-muted);font-size:10px}.new-order-conflict button{min-height:34px;padding:6px 10px;font-size:10px}
.vendor-selection-step>strong,.new-order-vendor-selectors,.new-order-vendor-feedback{grid-column:2}.new-order-vendor-selectors{display:grid;gap:7px}.new-order-vendor-row{display:grid;grid-template-columns:90px minmax(0,1fr);align-items:center;gap:8px}.new-order-vendor-row strong{font-size:11px}.new-order-vendor-row select{min-height:36px;padding:7px 9px}.new-order-vendor-row.is-deferred{min-height:40px}.new-order-vendor-deferred{display:flex;align-items:center;min-height:36px;padding:8px 10px;border:1px dashed #c8d7cc;border-radius:8px;background:var(--accent-soft);color:var(--order-green);font-size:10px;font-weight:800;line-height:1.35}.new-order-vendor-feedback{margin:0;color:var(--order-muted);font-size:9px}.new-order-vendor-feedback.error{color:var(--order-danger)}

.order-settings-app{min-height:100vh;display:grid;grid-template-columns:190px minmax(0,1fr);background:var(--order-soft)}
.order-settings-content{min-width:0;padding:20px}
.order-settings-shell{min-height:calc(100vh - 40px)}
.order-settings-topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:16px;padding:18px 20px;border:1px solid var(--order-line);border-radius:18px;background:var(--panel);box-shadow:var(--order-shadow)}
.order-settings-brand{display:flex;align-items:center;gap:14px}
.order-settings-brand h1{font-size:28px;margin:2px 0 4px}
.order-settings-nav{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
.order-settings-nav a{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 14px;border:1px solid var(--order-line);border-radius:12px;background:var(--order-paper);font-size:13px;font-weight:700}
.order-settings-nav a.is-active{border-color:transparent;background:var(--order-green);color:#fff}
.order-settings-main{display:grid;gap:14px;max-width:1440px;margin:0 auto}
.order-settings-tabs{display:flex;gap:6px;overflow-x:auto;padding:7px;border:1px solid var(--order-line);border-radius:15px;background:var(--order-paper)}
.order-settings-tabs button{flex:1 0 auto;width:auto;min-height:42px;margin:0;padding:8px 14px}
.order-settings-tabs button.is-active{border-color:var(--order-green);background:var(--accent-soft);color:var(--order-green)}
.order-settings-panel{padding:18px;border:1px solid var(--order-line);border-radius:16px;background:var(--order-paper);box-shadow:var(--order-shadow)}
.order-settings-panel[hidden]{display:none!important}
.order-settings-panel-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:16px}
.order-settings-panel-head h2{font-size:20px;margin:3px 0}
.order-settings-panel-head p{color:var(--order-muted);font-size:12px}
.order-settings-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) 180px auto;gap:8px;margin-bottom:14px}
.order-settings-toolbar button{width:auto;margin:0}
.order-settings-list{display:grid;gap:8px}
.order-setting-row{display:grid;grid-template-columns:64px minmax(160px,1.2fr) minmax(120px,.8fr) minmax(120px,.8fr) auto;align-items:center;gap:10px;padding:10px;border:1px solid var(--order-line);border-radius:11px;background:var(--order-paper)}
.order-setting-row.is-inactive{opacity:.62;background:var(--order-soft)}
.order-setting-row img,.order-setting-row .order-image-fallback{width:64px;height:48px;aspect-ratio:auto;border-radius:7px;object-fit:cover}
.order-setting-row strong,.order-setting-row small{display:block;overflow-wrap:anywhere}
.order-setting-row small{margin-top:3px;color:var(--order-muted);font-size:10px}
.order-setting-row-actions{display:flex;gap:6px}
.order-setting-row-actions button{width:auto;min-height:34px;margin:0;padding:5px 9px;font-size:10px}
.order-settings-editor{margin-top:16px;padding:16px;border:1px solid var(--order-line);border-radius:13px;background:var(--order-soft)}
.order-settings-editor[hidden]{display:none!important}
.order-settings-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.order-settings-form-grid label{display:grid;gap:5px;margin:0;color:var(--order-muted);font-size:11px;font-weight:700}
.order-settings-form-grid .wide{grid-column:1/-1}
.order-settings-form-grid .span-2{grid-column:span 2}
.order-image-editor{display:grid;grid-template-columns:120px minmax(0,1fr);gap:12px;align-items:center}
.order-image-editor img,.order-image-editor .order-image-fallback{width:120px;height:90px;aspect-ratio:auto;border-radius:9px;object-fit:cover}
.order-settings-form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.order-settings-form-actions button{width:auto;margin:0}
.order-settings-feedback{min-height:20px;margin:0;color:var(--order-muted);font-size:12px}
.order-settings-feedback.error{color:var(--order-danger)}
.order-settings-feedback.success{color:var(--order-green)}
.setting-rule-type{display:inline-flex;width:max-content;padding:3px 7px;border-radius:999px;background:var(--accent-soft);color:var(--order-green);font-size:9px;font-weight:800}
.order-common-picker{display:grid;gap:14px;margin-bottom:14px;padding:14px;border:1px solid var(--order-line);border-radius:12px;background:var(--order-soft)}
.order-common-picker[hidden]{display:none!important}.order-common-picker-head,.order-settings-section-head,.order-template-editor-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.order-common-picker-head>div,.order-settings-section-head>div{display:grid;gap:3px}.order-common-picker-head small,.order-settings-section-head p{margin:0;color:var(--order-muted);font-size:10px}.order-common-picker-head button,.order-settings-section-head button,.order-template-editor-head button{width:auto;margin:0}
.order-common-search{display:grid;gap:5px;color:var(--order-muted);font-size:10px;font-weight:700}.order-common-card-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.order-common-card-grid h3,.order-template-list h3{grid-column:1/-1;margin:0;font-size:12px}.order-common-card{display:grid!important;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:8px;min-width:0;padding:7px!important;text-align:left!important;background:#fff!important;color:var(--order-ink)!important}.order-common-card img,.order-common-card .order-image-fallback{width:58px;height:48px;border-radius:7px;object-fit:cover}.order-common-card span{min-width:0}.order-common-card strong,.order-common-card small,.order-common-card b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.order-common-card small{margin:2px 0;color:var(--order-muted);font-size:9px}.order-common-card b{color:var(--order-green);font-size:9px}.order-template-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.order-template-card{display:flex!important;align-items:center;justify-content:space-between;gap:10px;padding:10px!important;text-align:left!important;background:#fff!important;color:var(--order-ink)!important}.order-template-card strong,.order-template-card small{display:block}.order-template-card small{margin-top:3px;color:var(--order-muted);font-size:9px}.order-template-card b{color:var(--order-green);font-size:10px}
.project-search-step{position:relative}.order-project-results{grid-column:2;display:grid;gap:5px;max-height:220px;overflow:auto}.order-project-results:empty{display:none}.order-project-results button{display:grid;gap:2px;width:100%;margin:0;padding:9px;text-align:left;background:#fff}.order-project-results button[aria-selected="true"],.order-project-results button:hover{border-color:var(--order-green);background:var(--accent-soft)}.order-project-results button small,.project-search-step>small{color:var(--order-muted);font-size:9px}.project-search-step>small{grid-column:2}.order-project-results p{margin:0;padding:10px;color:var(--order-muted);font-size:10px}
.order-settings-subhead{margin:0 0 9px;font-size:14px}.order-settings-split{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:20px}.order-settings-split>section{min-width:0;padding:14px;border:1px solid var(--order-line);border-radius:13px}.compact-list{margin-top:10px}.order-setting-row.compact-row{grid-template-columns:42px minmax(0,1fr) auto}.order-process-symbol{display:grid;width:42px;height:42px;place-items:center;border-radius:10px;background:var(--accent-soft);color:var(--order-green);font-weight:900}.order-process-row{grid-template-columns:minmax(160px,1.2fr) minmax(120px,.8fr) minmax(120px,.8fr) auto}.order-process-row label{display:grid;gap:4px;color:var(--order-muted);font-size:9px;font-weight:700}.order-process-row .order-inline-check{display:flex;align-items:center;gap:6px}.order-process-row .order-inline-check input{width:auto}.order-template-editor-head{margin:16px 0 8px}.order-template-editor-rows{display:grid;gap:7px}.order-template-editor-row{display:grid;grid-template-columns:1.2fr 1fr 1fr .55fr .65fr 1fr 34px;gap:6px}.order-template-editor-row>*{min-width:0;margin:0!important}.order-template-editor-row button{padding:4px!important}

@media(max-width:860px){
  .order-filter-grid{padding-inline:12px}
  .order-calculator{width:100vw;max-width:100vw}
  .order-calculator,.calculator-body,.calculator-form,.calculator-block{min-width:0;max-width:100%;overflow-x:hidden}.order-calculator input,.order-calculator select,.order-calculator textarea{min-width:0;max-width:100%}
  .calculator-body{padding:14px 12px 24px}
  .calculator-header{padding:13px 14px}
  .calculator-actions{padding-inline:12px}
  .order-settings-app{display:block}.order-settings-content{padding:10px}.order-settings-shell{min-height:calc(100vh - 20px)}
  .order-settings-topbar,.order-settings-panel{padding:14px;border-radius:14px}
  .order-settings-topbar,.order-settings-panel-head{align-items:stretch;flex-direction:column}
  .order-settings-nav{justify-content:flex-start}
  .order-settings-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .order-setting-row{grid-template-columns:56px minmax(0,1fr) auto}
  .order-setting-row>:nth-child(3),.order-setting-row>:nth-child(4){grid-column:2}
  .order-setting-row-actions{grid-column:3;grid-row:1/4;flex-direction:column}
  .order-process-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .order-process-row>:nth-child(1),.order-process-row>:nth-child(2),.order-process-row>:nth-child(3),.order-process-row>:nth-child(4){grid-column:auto}
  .order-common-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.order-template-list{grid-template-columns:repeat(2,minmax(0,1fr))}.order-settings-split{grid-template-columns:1fr}.order-template-editor-row{grid-template-columns:repeat(2,minmax(0,1fr))}.order-template-editor-row button{grid-column:2;justify-self:end}
  .order-group-tabs{top:64px;padding-inline:12px}
}
@media(max-width:430px){
  .order-filter-grid{grid-template-columns:1fr 1fr}
  .order-filter-grid label:first-child,.order-filter-grid label:nth-child(3){grid-column:1/-1}
  .calculator-form,.calculator-location-row,.calculator-section{grid-template-columns:1fr}
  .wood-assembly-choice,.wood-layer-card,.wood-stud-card,.wood-output-card{grid-template-columns:1fr}.wood-layer-card>strong,.wood-stud-card>strong,.wood-stud-card .calculator-help,.wood-output-card .wide{grid-column:1}.wood-output-card>label{grid-column:1}
  .construction-method-cards,.material-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .calculator-actions{grid-template-columns:1fr}
  .calculator-actions button{grid-column:1}
  .order-card-title{flex-direction:column}.order-inline-actions{width:100%;flex-wrap:wrap}.order-inline-actions button{flex:1 1 auto}
  .new-order-dialog{width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}
  .new-order-flow{padding:14px 12px}
  .new-order-step{grid-template-columns:30px minmax(0,1fr);padding:11px}.new-order-process-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.process-selection-head{align-items:flex-start;flex-direction:column}.new-order-flooring-subtype{grid-template-columns:1fr}.new-order-process-card{min-height:52px}.new-order-vendor-row{grid-template-columns:72px minmax(0,1fr)}
  .site-card-title>div{width:100%;flex-wrap:wrap}.site-card-title>div:last-child{justify-content:flex-start}.site-card-title>div:last-child small{width:100%}
  .order-editor-pane{padding-bottom:calc(94px + env(safe-area-inset-bottom))}.order-header-actions #saveOrderButton,.order-header-actions #confirmOrderButton{display:none!important}.order-mobile-actionbar:not([hidden]){position:fixed;left:0;right:0;bottom:0;z-index:18;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px 12px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--order-line);background:rgba(255,254,250,.98);box-shadow:0 -8px 24px rgba(31,42,35,.08)}.order-mobile-actionbar button{min-height:48px}
  .order-table-wrap{display:none}.order-items-mobile{display:grid;gap:10px}.order-mobile-item{display:grid;gap:11px;padding:12px;border:1px solid var(--order-line);border-radius:12px;background:var(--order-paper)}.order-mobile-item>header{display:flex;align-items:center;justify-content:space-between;gap:8px}.order-mobile-item>header strong{font-size:12px}.order-mobile-item>header span{color:var(--order-green);font-size:9px;font-weight:800}.order-mobile-item-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.order-mobile-item-grid label{display:grid;gap:5px;min-width:0;color:var(--order-muted);font-size:10px;font-weight:700}.order-mobile-item-grid label.wide{grid-column:1/-1}.order-mobile-item-grid input{min-width:0;min-height:42px}.order-mobile-item-auto{display:flex;align-items:center;min-height:42px;padding:9px 10px;border:1px solid var(--order-line);border-radius:7px;background:var(--order-soft);color:var(--order-ink);font-size:12px}.order-mobile-item-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.order-mobile-item-actions button{min-height:42px;padding:7px 9px}.order-mobile-item-actions [data-remove]{color:var(--order-danger)}.order-empty{border-top:1px dashed var(--order-line);border-radius:9px}
  .order-settings-nav a{flex:1 1 0;padding-inline:8px;font-size:11px}
  .order-settings-tabs button{min-height:46px;padding-inline:11px}
  .order-settings-toolbar{grid-template-columns:1fr 1fr}
  .order-settings-toolbar input{grid-column:1/-1}
  .order-settings-form-grid{grid-template-columns:1fr}
  .order-settings-form-grid .span-2,.order-settings-form-grid .wide{grid-column:1}
  .order-image-editor{grid-template-columns:90px minmax(0,1fr)}
  .order-image-editor img,.order-image-editor .order-image-fallback{width:90px;height:70px}
  .order-setting-row{grid-template-columns:50px minmax(0,1fr)}
  .order-setting-row img,.order-setting-row .order-image-fallback{width:50px;height:42px}
  .order-setting-row-actions{grid-column:1/-1;grid-row:auto;flex-direction:row}
  .order-setting-row-actions button{flex:1}
  .order-process-row{grid-template-columns:1fr}
  .order-process-row>:nth-child(1),.order-process-row>:nth-child(2),.order-process-row>:nth-child(3),.order-process-row>:nth-child(4){grid-column:1}
  .order-common-card-grid,.order-template-list{grid-template-columns:1fr}.order-common-picker{padding:10px}.order-common-card{grid-template-columns:52px minmax(0,1fr)}.order-common-card img,.order-common-card .order-image-fallback{width:52px;height:44px}.order-template-editor-row{grid-template-columns:1fr}.order-template-editor-row button{grid-column:1;width:100%}
}

/* Dedicated quantity-calculation route; the existing calculation engine and fields are reused. */
.order-items-table{min-width:780px}
.order-excel-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0;padding:11px;border:1px solid var(--order-line);border-radius:10px;background:var(--order-soft)}.order-excel-toolbar small{color:var(--order-muted)}.order-button-link{display:inline-flex;align-items:center;min-height:36px;padding:8px 12px;border:1px solid var(--order-line);border-radius:7px;background:#fff;color:var(--order-ink);font-size:11px;font-weight:800;text-decoration:none}.material-import-dialog{width:min(1050px,calc(100vw - 32px));max-height:90vh}.material-import-body{display:grid;gap:12px;padding:16px}.material-import-counts{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}.material-import-counts span{display:grid;gap:4px;padding:10px;border:1px solid var(--order-line);border-radius:9px;background:var(--order-soft)}.material-import-counts small{color:var(--order-muted)}.material-import-counts strong{font-size:17px}.material-import-counts .is-error,.material-import-counts .is-duplicate{color:var(--order-danger)}.material-import-table-wrap{max-height:52vh;overflow:auto}.material-import-table-wrap table{width:100%;border-collapse:collapse;font-size:11px}.material-import-table-wrap th,.material-import-table-wrap td{padding:8px;border:1px solid var(--order-line);text-align:left}.material-import-table-wrap th{position:sticky;top:0;background:#edf4ee;color:var(--order-green)}.material-import-table-wrap tr.is-error,.material-import-table-wrap tr.is-duplicate{background:#fff2ef}
.calculator-context{margin:5px 0 0;color:var(--order-muted);font-size:10px;line-height:1.45}
.order-app.calculation-page{display:block;min-height:100vh;background:var(--order-soft)}
.calculation-page>.order-sidebar,.calculation-page>.order-list-pane,.calculation-page>.order-editor-pane,.calculation-page>.order-group-tabs{display:none!important}
.calculation-page .order-calculator{position:relative;z-index:1;inset:auto;width:100%;max-width:none;height:100vh;height:100dvh;transform:none;box-shadow:none;background:var(--order-soft)}
.calculation-page .calculator-header{padding:18px max(20px,calc((100vw - 1360px)/2));background:#fff}
.calculation-page .calculator-header>div{min-width:0}.calculation-page .calculator-header h2{font-size:22px}
.calculation-page .calculator-body{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:max-content;align-items:start;align-content:start;gap:16px;width:min(1360px,100%);margin:0 auto;padding:20px}
.calculation-page .calculator-block{min-width:0;margin:0;padding:18px;border:1px solid var(--order-line);border-radius:14px;background:#fff}
.calculation-page .calculator-support-block,.calculation-page .calculator-output-block{grid-column:1/-1}.calculation-page .calculator-actions{grid-template-columns:repeat(2,minmax(0,220px));justify-content:end;padding:12px max(20px,calc((100vw - 1360px)/2));background:#fff}.calculation-page .calculator-actions:not(.is-result-ready) #calculateButton{grid-column:1/-1}
.calculation-page .construction-method-cards,.calculation-page .material-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:980px){.calculation-page .calculator-body{grid-template-columns:repeat(2,minmax(0,1fr))}.calculation-page .calculator-support-block,.calculation-page .calculator-output-block{grid-column:1/-1}}
@media(max-width:600px){.calculation-page .calculator-body{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:max-content;align-content:start;gap:12px;padding:12px}.calculation-page .calculator-block,.calculation-page .calculator-output-block{grid-column:1;max-width:100%;overflow:visible;padding:14px}.calculation-page .calculator-header{padding:13px 14px}.calculation-page .calculator-actions{grid-template-columns:1fr 1fr;padding-inline:12px}.calculation-page .construction-method-cards,.calculation-page .material-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.material-import-counts{grid-template-columns:repeat(2,minmax(0,1fr))}.material-import-dialog{width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0}}

/* Visual calculation picker: images communicate method and material identity; formulas stay out of cards. */
.calculator-section-toggle{margin-left:auto!important;min-height:28px!important;padding:4px 8px!important;border-color:transparent!important;background:transparent!important;color:var(--order-green)!important;font-size:9px!important}.calculator-block-title .material-picker-dismiss{margin-left:0!important}.calculator-step-summary{min-width:0}.calculator-step-summary>button{display:flex!important;align-items:center;gap:8px;width:100%!important;min-width:0;min-height:58px!important;margin:0!important;padding:8px!important;border:1px solid #cfded3!important;border-radius:10px!important;background:#f4f8f4!important;text-align:left!important}.calculator-step-summary>button>img{flex:0 0 52px;width:52px;height:42px;border-radius:7px;object-fit:cover;background:#fff}.calculator-step-summary>button>span:not(.calculator-summary-check){display:grid;gap:2px;min-width:0}.calculator-step-summary>button small{color:var(--order-muted);font-size:8px}.calculator-step-summary>button strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--order-ink);font-size:11px}.calculator-step-summary>button>em{margin-left:auto;color:var(--order-green);font-size:9px;font-style:normal;font-weight:800}.calculator-summary-check{display:grid!important;place-items:center!important;flex:0 0 20px;width:20px;height:20px;border-radius:999px;background:var(--order-green);color:#fff;font-size:10px;font-weight:900}.calculator-summary-materials{display:grid!important;flex:1;gap:6px;min-width:0}.calculator-summary-material{display:grid!important;grid-template-columns:38px minmax(0,1fr);align-items:center;gap:7px;min-width:0}.calculator-summary-material>img{width:38px;height:34px;border-radius:6px;object-fit:cover;background:#fff}.calculator-summary-material>span{display:grid!important;gap:1px;min-width:0}.calculator-summary-material small{color:var(--order-green)!important;font-weight:900}.calculator-summary-material strong{font-size:10px!important}.calculator-summary-material em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--order-muted);font-size:8px;font-style:normal}.material-summary-button{align-items:flex-start!important}.calculator-block.is-collapsed #constructionMethodCards,.calculator-block.is-collapsed #calculatorForm,.calculator-block.is-collapsed>.material-search,.calculator-block.is-collapsed>#materialCategoryFilters,.calculator-block.is-collapsed>#materialCards,.calculator-block.is-collapsed>#woodMaterialTargetSelector{display:none!important}
.wood-material-target-selector{display:grid;gap:7px;padding:9px;border:1px solid var(--order-line);border-radius:10px;background:var(--order-soft)}.wood-material-target-selector>strong{color:var(--order-muted);font-size:9px}.wood-material-target-selector>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.wood-material-target-selector button{display:flex;align-items:center;justify-content:center;gap:5px;min-width:0;min-height:34px;padding:5px 6px;border-radius:8px;font-size:9px;white-space:nowrap}.wood-material-target-selector button>span{display:block;flex:0 0 10px;width:10px;height:10px;border:1px solid #9caaa0;border-radius:999px;background:#fff}.wood-material-target-selector button.is-active{border-color:var(--order-green);background:var(--accent-soft);color:var(--order-green)}.wood-material-target-selector button.is-active>span{border:3px solid var(--order-green)}
.calculation-page .construction-method-card{min-height:148px}.calculation-page .construction-method-card img{min-height:86px}.calculation-page .material-card{min-height:176px}.calculation-page .material-card img{min-height:112px}.calculation-page .construction-method-copy,.calculation-page .material-card-copy{padding:10px}.calculation-page .construction-method-copy strong,.calculation-page .material-card-copy strong{font-size:12px}.calculation-page .construction-method-copy small,.calculation-page .material-card-copy small{font-size:9px}

/* Wood v1: the center controls identify a target; the visual catalog is the only picker. */
.material-picker-dismiss{display:none;margin-left:auto!important;min-height:32px!important;padding:5px 10px!important;font-size:10px}
.wood-material-field{display:grid;gap:5px;min-width:0;color:var(--order-muted);font-size:10px;font-weight:700}
.wood-material-trigger{width:100%!important;min-height:58px!important;margin:0!important;padding:7px!important;border:1px solid var(--order-line)!important;border-radius:8px!important;background:#fff!important;color:var(--order-ink)!important;text-align:left!important}
.wood-material-trigger.is-active{border-color:var(--order-green)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--order-green) 10%,transparent)!important}
.wood-material-trigger>span{display:grid;grid-template-columns:46px minmax(0,1fr);align-items:center;gap:8px;min-width:0}
.wood-material-trigger img{width:46px;height:40px;border-radius:6px;object-fit:cover;background:var(--order-soft)}
.wood-material-trigger .wood-material-empty{display:block;grid-column:1/-1;padding:5px;color:var(--order-muted);font-weight:700}
.wood-material-summary-copy{display:grid!important;grid-template-columns:1fr!important;gap:3px!important;min-width:0}
.wood-material-summary-copy strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.wood-material-summary-copy small{overflow-wrap:anywhere;color:var(--order-muted);font-size:9px}
.wood-stud-card [data-wood-stud-reference-preview]{display:block;margin-top:3px;color:var(--order-green);font-size:9px;line-height:1.4}
.wood-stud-product-info{grid-column:1/-1;display:flex;align-items:center;gap:5px;flex-wrap:wrap;padding:8px;border:1px solid #dce7dd;border-radius:8px;background:#fff}
.wood-stud-product-info strong{margin-right:auto;font-size:10px}.wood-stud-product-info span{padding:3px 6px;border-radius:999px;background:var(--accent-soft);color:var(--order-green);font-size:8px;font-weight:800}
.wood-nonassembly-stud-use{display:grid;gap:5px;padding:10px;border:1px solid var(--order-line);border-radius:8px;background:var(--order-soft)}.wood-nonassembly-stud-use small{color:var(--order-muted);font-size:9px;line-height:1.45}
.wood-result-area{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 9px;padding:9px 10px;border:1px solid var(--order-line);border-radius:8px;background:#fff}.wood-result-area span{color:var(--order-muted);font-size:10px;font-weight:700}.wood-result-area strong{font-size:14px!important}
.wood-stud-reference{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:3px 8px}.wood-stud-reference>span{grid-row:1/3;color:var(--order-muted);font-size:9px;font-weight:800}.wood-stud-reference>strong{font-size:12px!important}.wood-stud-reference>small{color:var(--order-green);font-size:9px}
.wood-stud-summary{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;margin:0 0 10px;padding:10px;border:1px solid #dce7dd;border-radius:9px;background:#fff;font-size:10px}.wood-stud-summary dt{color:var(--order-muted)}.wood-stud-summary dd{margin:0;text-align:right;font-weight:900}.wood-stud-summary dd:last-child{color:var(--order-green);font-size:12px}
.wood-result-overview{display:grid;gap:10px}.wood-result-overview h3,.calculation-result-overview span{margin:0;color:var(--order-muted);font-size:10px;font-weight:900;letter-spacing:.04em}.wood-result-items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.wood-result-item{display:grid;grid-template-columns:58px minmax(0,1fr) auto;align-items:center;gap:10px;min-width:0;padding:11px;border:1px solid #cfded3;border-radius:11px;background:#fff}.wood-result-item img,.wood-result-item .order-image-fallback{width:58px;height:48px;border-radius:7px;object-fit:cover}.wood-result-item>div{display:grid;gap:2px;min-width:0}.wood-result-item span{color:var(--order-green);font-size:8px;font-weight:900}.wood-result-item strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--order-ink)!important;font-size:12px!important}.wood-result-item small{overflow-wrap:anywhere;color:var(--order-muted);font-size:8px}.wood-result-quantity{color:var(--order-green);font-size:21px;font-weight:900;white-space:nowrap}.wood-basis-summary{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px;margin-bottom:9px}.wood-basis-summary .wood-result-area{margin:0}.wood-basis-summary .wood-stud-reference{margin:0}.wood-basis-summary .wood-stud-summary{grid-column:1/-1;margin:0}.calculation-result-overview{display:flex;align-items:end;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid #cfded3;border-radius:10px;background:#fff}.calculation-result-overview strong{margin:0!important;font-size:24px!important}.calculation-result-basis{margin-top:10px}.calculation-result-basis summary{cursor:pointer;padding:9px 10px;border:1px solid var(--order-line);border-radius:8px;background:var(--order-soft);font-size:11px;font-weight:900}.calculation-result-basis dl{display:grid;grid-template-columns:1fr auto;gap:7px;margin:9px 0 0;padding:10px;border:1px solid var(--order-line);border-radius:8px;background:#fff;font-size:10px}.calculation-result-basis dd{margin:0;text-align:right;font-weight:800}.calculation-final-control{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,.35fr);gap:9px;margin-top:12px;padding-top:12px;border-top:2px solid var(--order-green)}.calculation-final-control>label{display:grid;gap:5px;color:var(--order-muted);font-size:10px;font-weight:700}.calculation-final-control .result-adjustment{grid-column:1/-1}
.wood-calculation-basis,.wood-final-items{display:grid;gap:8px}.wood-calculation-basis summary,.wood-final-items h4{margin:0;color:var(--order-ink);font-size:11px;font-weight:900}.wood-calculation-basis summary{cursor:pointer;padding:9px 10px;border:1px solid var(--order-line);border-radius:8px;background:var(--order-soft);list-style-position:inside}.wood-calculation-basis[open] summary{margin-bottom:8px;border-color:#cfded3;color:var(--order-green)}.wood-final-items{margin-top:14px;padding-top:13px;border-top:2px solid var(--order-green)}
.wood-basis-results{display:grid;gap:8px}.wood-basis-card{display:grid;gap:8px;padding:10px;border:1px solid var(--order-line);border-radius:10px;background:#fff}.wood-basis-card.is-stud{border-color:#cfded3;background:#fbfdfb}.wood-basis-card header{display:grid;grid-template-columns:54px minmax(0,1fr);align-items:center;gap:8px}.wood-basis-card header img{width:54px;height:46px;border-radius:7px;object-fit:cover;background:var(--order-soft)}.wood-basis-card header>div{display:grid;gap:2px}.wood-basis-card header span{color:var(--order-green);font-size:8px;font-weight:900}.wood-basis-card header strong{font-size:11px!important;color:var(--order-ink)!important}.wood-basis-card header small{color:var(--order-muted);font-size:8px;overflow-wrap:anywhere}.wood-basis-card dl{display:grid;grid-template-columns:minmax(92px,.8fr) minmax(0,1.2fr);gap:5px 8px;margin:0;padding-top:7px;border-top:1px dashed var(--order-line);font-size:9px}.wood-basis-card dt{color:var(--order-muted)}.wood-basis-card dd{margin:0;text-align:right;font-weight:800;overflow-wrap:anywhere}

@media(max-width:600px){
  .calculation-page .calculator-body{padding-bottom:calc(112px + env(safe-area-inset-bottom))}
  .calculator-section-toggle{min-height:32px!important}.calculator-step-summary>button{min-height:54px!important}.calculator-step-summary>button>img{width:46px;height:38px}.calculator-summary-materials{gap:5px}.calculator-summary-material{grid-template-columns:34px minmax(0,1fr)}.calculator-summary-material>img{width:34px;height:31px}.wood-material-target-selector>div{grid-template-columns:repeat(3,minmax(0,1fr))}.calculation-page .construction-method-card{min-height:126px}.calculation-page .construction-method-card img{min-height:72px}.calculation-page .material-card{min-height:154px}.calculation-page .material-card img{min-height:94px}.calculation-page .construction-method-copy,.calculation-page .material-card-copy{padding:8px}.calculation-page .construction-method-copy strong,.calculation-page .material-card-copy strong{font-size:10px}.calculation-page .construction-method-copy small,.calculation-page .material-card-copy small{font-size:8px}
  .wood-material-trigger{min-height:64px!important}.wood-layer-card,.wood-stud-card,.wood-basis-results{grid-template-columns:1fr}.wood-stud-product-info{grid-column:1}
  .wood-result-items,.wood-basis-summary,.calculation-final-control{grid-template-columns:1fr}.wood-result-item{grid-template-columns:50px minmax(0,1fr) auto}.wood-result-item img,.wood-result-item .order-image-fallback{width:50px;height:44px}.wood-basis-summary .wood-stud-summary,.calculation-final-control .result-adjustment{grid-column:1}
  #materialPickerSection.is-mobile-material-picker{position:fixed;z-index:90;left:8px;right:8px;bottom:8px;display:grid!important;width:auto;max-height:min(82dvh,720px);margin:0;padding:14px 14px calc(18px + env(safe-area-inset-bottom));overflow-y:auto;border:1px solid var(--line-strong);border-radius:16px 16px 12px 12px;background:var(--order-paper);box-shadow:0 -18px 50px rgba(17,31,24,.24)}
  #materialPickerSection.is-mobile-material-picker .material-picker-dismiss{display:inline-flex}
  body.has-mobile-material-picker::after{content:"";position:fixed;z-index:89;inset:0;background:rgba(17,31,24,.25);pointer-events:none}
  .wood-basis-card dl{grid-template-columns:minmax(0,1fr);gap:2px}.wood-basis-card dd{text-align:left;margin-bottom:5px}
}

/* EASE ORDER unified work modes and delivery-address disclosure. */
.order-mode-tabs{display:inline-grid;grid-template-columns:1fr 1fr;gap:3px;padding:3px;border:1px solid var(--order-line);border-radius:10px;background:#f5f7f2}
.order-mode-tabs button,.order-calculator header .order-mode-tabs button{width:auto;min-height:34px;padding:6px 13px;border:0;border-radius:7px;background:transparent;color:var(--order-muted);font-size:11px;font-weight:800;white-space:nowrap}
.order-mode-tabs button.is-active{background:#fff;color:var(--order-green);box-shadow:0 1px 4px rgba(31,42,35,.08)}
.delivery-address-field{display:grid;gap:9px;padding:11px 12px;border:1px solid var(--order-line);border-radius:9px;background:#fbfcf9}
.delivery-address-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.delivery-address-head strong{color:var(--order-ink);font-size:11px}
.delivery-address-display{margin:0;color:var(--order-ink);font-size:12px;line-height:1.45}
.delivery-address-options{display:grid;gap:10px;padding-top:10px;border-top:1px dashed var(--order-line)}.delivery-address-source{display:flex;gap:20px;align-items:center}
.delivery-manual-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}.delivery-manual-fields .delivery-save-check{grid-column:1/-1}
.order-items-table tr.is-newly-added td,.order-mobile-item.is-newly-added{animation:order-item-added 2.2s ease-out}
@keyframes order-item-added{0%,28%{background:#dff0e3;box-shadow:inset 3px 0 #276646}100%{background:transparent;box-shadow:none}}
.calculation-page .calculator-header{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:16px;align-items:center}
.calculator-back-mobile{display:none}
@media(max-width:860px){.order-editor-header{display:grid;grid-template-columns:auto minmax(0,1fr);height:auto}.order-editor-header .order-mode-tabs{grid-column:1/-1;width:100%}.order-editor-header .order-header-actions{position:absolute;right:12px;top:10px}.delivery-manual-fields{grid-template-columns:1fr}}
@media(max-width:600px){.calculation-page .calculator-header{grid-template-columns:minmax(0,1fr) auto;gap:8px}.calculation-page .calculator-header .calculator-heading{grid-column:1/-1;grid-row:2}.calculation-page .calculator-header .order-mode-tabs{grid-column:1;grid-row:1;width:100%}.calculation-page .calculator-header>#closeCalculatorButton{grid-column:2;grid-row:1}.delivery-address-field{padding:10px}.delivery-address-head{align-items:flex-start}.delivery-address-display{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.delivery-address-source{gap:12px}.order-mode-tabs button,.order-calculator header .order-mode-tabs button{min-height:38px;padding-inline:8px}}
.saved-address-panel-head{margin-top:20px;padding-top:20px;border-top:1px solid var(--order-line)}.saved-address-admin-list{display:grid;gap:8px;margin-top:12px}.saved-address-admin-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px;border:1px solid var(--order-line);border-radius:10px;background:#fff}.saved-address-admin-row>div:first-child{display:grid;gap:4px}.saved-address-admin-row small{color:var(--order-muted)}.saved-address-admin-row.is-inactive{opacity:.55}.saved-address-editor{margin-top:12px;border:1px solid var(--order-line);border-radius:12px;background:var(--order-soft)}
@media(max-width:600px){.saved-address-admin-row{grid-template-columns:1fr}.saved-address-admin-row .order-setting-row-actions{grid-column:1;display:grid;grid-template-columns:repeat(4,1fr)}}

/* Material specification presets and product-first calculation UX. */
.size-preset-picker{display:grid;gap:10px;margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid var(--order-line)}
.size-preset-picker-title{display:grid;gap:2px}.size-preset-picker-title strong{font-size:11px}.size-preset-picker-title small{color:var(--order-muted);font-size:9px;line-height:1.4}
.size-preset-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.size-preset-card{position:relative;display:grid!important;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:8px;min-width:0;min-height:78px!important;margin:0!important;padding:8px!important;border:1px solid var(--order-line)!important;border-radius:10px!important;background:#fff!important;color:var(--order-ink)!important;text-align:left!important;box-shadow:none!important}
.size-preset-card.is-selected{border-color:var(--order-green)!important;background:var(--accent-soft)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--order-green) 9%,transparent)!important}
.size-preset-card.is-selected::after{content:"✓";position:absolute;right:6px;top:6px;display:grid;place-items:center;width:18px;height:18px;border-radius:999px;background:var(--order-green);color:#fff;font-size:9px;font-weight:900}
.size-preset-card>span:last-child{display:grid;gap:3px;min-width:0}.size-preset-card strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.size-preset-card small{color:var(--order-muted);font-size:8px;line-height:1.35}
.tile-size-art,.film-roll-art,.wallpaper-roll-art{display:grid;place-items:center;width:58px;height:58px;overflow:hidden;border-radius:8px;background:#f6f8f4}
.tile-size-art i{display:block;width:calc(42px * var(--tile-scale));height:calc(42px * var(--tile-scale) / var(--tile-aspect));max-height:48px;border:1.5px solid #2d664a;background:repeating-linear-gradient(135deg,#edf5ee 0 5px,#dfece2 5px 6px);box-shadow:3px 3px 0 #c6d8ca}
.film-roll-art,.wallpaper-roll-art{position:relative}.film-roll-art i,.wallpaper-roll-art i{position:absolute;width:18px;height:42px;border:2px solid #275f45;border-radius:50%;background:#fff;transform:translateX(11px)}.film-roll-art b,.wallpaper-roll-art b{display:block;width:33px;height:42px;margin-right:14px;border:1px solid #88a291;border-radius:4px 0 0 4px;background:linear-gradient(145deg,#c8ab7c,#8f6f47)}.wallpaper-roll-art b{background:repeating-linear-gradient(45deg,var(--pattern-tone,#9fbbae) 0 5px,#f7f3e9 5px 10px)}
.packaging-source-note{align-self:end;padding:7px 8px;border-radius:7px;background:#eef5ef;color:var(--order-green);font-size:9px;font-weight:800}.wallpaper-theoretical{display:grid;align-content:center;gap:4px;padding:8px 10px;border-radius:8px;background:var(--order-soft)}.wallpaper-theoretical small{color:var(--order-muted);font-size:9px}.wallpaper-theoretical strong{color:var(--order-green);font-size:11px}
.calculation-result-overview{flex-wrap:wrap}.calculation-result-overview>small{flex:1 1 180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--order-ink);font-size:11px;font-weight:800}.calculation-result-overview .result-headline{margin-left:auto!important}
.construction-method-card img,.material-card img,.calculation-page .construction-method-card img,.calculation-page .material-card img{height:clamp(104px,9vw,136px);min-height:0;max-height:136px;object-fit:contain;padding:8px;background:#f8faf6}
.construction-method-card .order-default-image,.material-card .order-default-image{object-fit:contain}
.calculator-summary-material>.tile-size-art,.calculator-summary-material>.film-roll-art,.calculator-summary-material>.wallpaper-roll-art{width:38px;height:34px}.calculator-summary-material>.tile-size-art i{max-width:28px;max-height:27px}.calculator-summary-material>.film-roll-art i,.calculator-summary-material>.wallpaper-roll-art i{width:10px;height:24px}.calculator-summary-material>.film-roll-art b,.calculator-summary-material>.wallpaper-roll-art b{width:22px;height:24px}
.calculator-block.is-collapsed>#sizePresetPicker{display:none!important}

.order-size-preset-admin{display:grid;gap:10px;margin:16px 0 18px;padding:14px 0;border-top:1px solid var(--order-line);border-bottom:1px solid var(--order-line)}
.order-settings-panel-head.compact{margin:0}.order-settings-panel-head.compact h3{margin:2px 0;font-size:15px}.order-settings-toolbar.compact{margin:0}.size-preset-admin-list{display:grid;gap:7px}.size-preset-admin-row{display:grid;grid-template-columns:minmax(170px,1fr) minmax(210px,1.2fr) auto;align-items:center;gap:12px;padding:11px 12px;border:1px solid var(--order-line);border-radius:9px;background:#fff}.size-preset-admin-row>div:not(.order-setting-row-actions){display:grid;gap:3px}.size-preset-admin-row small{color:var(--order-muted);font-size:10px}.size-preset-admin-row.is-inactive{opacity:.55}

@media(max-width:600px){
  .size-preset-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.size-preset-card{grid-template-columns:1fr;align-content:start;min-height:142px!important;padding:7px!important}.tile-size-art,.film-roll-art,.wallpaper-roll-art{width:100%;height:92px}.size-preset-card strong{white-space:normal;font-size:9px}.size-preset-card small{font-size:7px}
  .construction-method-card img,.material-card img,.calculation-page .construction-method-card img,.calculation-page .material-card img{height:96px;max-height:104px;padding:6px;object-fit:contain}.calculation-page .construction-method-card,.calculation-page .material-card{min-height:0}
  .size-preset-admin-row{grid-template-columns:1fr}.size-preset-admin-row .order-setting-row-actions{display:grid;grid-template-columns:repeat(4,1fr)}
  .calculator-summary-material>.tile-size-art,.calculator-summary-material>.film-roll-art,.calculator-summary-material>.wallpaper-roll-art{width:34px;height:31px}
}

/* Wood calculation final visual pass: preserve the engine while clarifying input, selection and result hierarchy. */
.calculator-form-host{display:contents}
.calculation-page .calculator-input-block{align-self:stretch}
.calculation-page #constructionMethodSection{grid-column:1}
.calculation-page #calculatorInputSection{grid-column:2}
.calculation-page #materialPickerSection{grid-column:3}
.calculation-page .wood-configuration-section{grid-column:1/-1;padding-block:16px;box-shadow:none}
.wood-configuration-content{min-width:0}
.wood-configuration-content .wood-assembly-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px}
.wood-configuration-content .wood-layer-card,.wood-configuration-content .wood-stud-card{min-width:0;padding:12px 0;border:0;border-top:1px solid var(--order-line);border-radius:0;background:transparent}
.wood-configuration-content .wood-layer-card{grid-template-columns:minmax(0,1fr) 130px}
.wood-configuration-content .wood-assembly-fields:not(:has([data-wood-layer="1"]:not([hidden]))) [data-wood-layer="0"]{grid-column:1/-1}
.wood-configuration-content .wood-stud-card{grid-column:1/-1;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 12px}
.wood-configuration-content .wood-stud-card>strong,.wood-configuration-content .wood-stud-card .wood-material-field,.wood-configuration-content .wood-stud-product-info,.wood-configuration-content .wood-stud-card .calculator-help{grid-column:1/-1}
.wood-configuration-content .wood-stud-product-info{padding:6px 0;border:0;border-radius:0;background:transparent}
.wood-configuration-content .wood-stud-product-info span{background:transparent;padding:0}
.wood-configuration-content .calculator-help{padding:8px 0;border-radius:0;background:transparent;border-top:1px dashed var(--order-line)}
.wood-assembly-primary-controls{display:grid;gap:10px;padding-bottom:10px;border-bottom:1px solid var(--order-line)}
.wood-assembly-primary-controls[hidden]{display:none!important}
.wood-assembly-primary-controls .wood-assembly-choice{grid-template-columns:repeat(2,minmax(0,1fr))}
.wood-assembly-primary-controls .wood-assembly-choice .order-check{grid-column:1/-1;border:0;padding:5px 0;background:transparent}
.wood-material-target-selector{padding:0;border:0;border-radius:0;background:transparent}
.calculator-block.is-collapsed #calculatorFormFields,.calculator-block.is-collapsed>#woodAssemblyPrimaryControls{display:none!important}

.calculator-section-toggle{display:grid!important;place-items:center!important;flex:0 0 32px!important;width:32px!important;min-height:32px!important;padding:0!important;border-radius:999px!important}
.calculator-section-toggle::before{content:"⌃";display:block;color:var(--order-green);font-size:17px;font-weight:800;line-height:1;transform:translateY(2px)}
.calculator-section-toggle[data-collapsed="true"]::before{content:"⌄";transform:translateY(-2px)}
.calculator-section-toggle>span{display:none}

.calculation-page .construction-method-card img,.calculation-page .material-card img{height:120px;min-height:0;max-height:128px;object-fit:contain;padding:9px}
.calculation-page .calculator-actions{grid-template-columns:repeat(2,minmax(0,180px));justify-content:end}
.calculation-page #calculateButton{width:100%;max-width:380px;justify-self:end}
.calculation-page .calculator-actions:not(.is-result-ready) #calculateButton{grid-column:1/-1}

.calculation-page .calculator-result{margin:0;padding:0;border:0;border-radius:0;background:transparent}
.wood-result-overview{padding:2px 0 4px}
.wood-result-item{border-color:#d9e4db;box-shadow:none}
.wood-result-quantity{font-size:24px}
.wood-calculation-basis{margin-top:4px}
.wood-calculation-basis summary{border-color:transparent;border-top:1px solid var(--order-line);border-radius:0;background:transparent;padding-inline:0}
.wood-basis-card{border:0;border-top:1px solid var(--order-line);border-radius:0;padding:12px 0;background:transparent}
.wood-basis-card.is-stud{border-color:var(--order-line);background:transparent}
.wood-final-items{margin-top:18px;padding-top:16px;border-top:2px solid var(--order-green)}
.wood-final-items h4{font-size:13px}
.wood-output-results{gap:0}
.wood-output-card{grid-template-columns:minmax(0,1.5fr) 130px 180px;align-items:end;gap:16px;padding:14px 0;border:0;border-top:1px solid var(--order-line);border-radius:0;background:transparent}
.wood-output-card:first-child{border-top:0}
.wood-output-card>div>strong{font-size:13px}
.wood-output-auto>span{display:flex;align-items:center;min-height:40px;color:var(--order-muted);font-size:13px;font-weight:800}
.wood-output-final>span{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px}
.wood-output-final input{border:1px solid var(--order-green);background:#fff;font-size:17px;font-weight:900;text-align:right}
.wood-output-final b{color:var(--order-green);font-size:12px}
.wood-output-adjustment{padding-top:2px}
.calculation-final-control{border-top:1px solid var(--order-line)}
.calculation-final-control>label:first-child{color:var(--order-ink);font-size:12px;font-weight:900}
.calculation-final-control #calculatorFinalQuantity{border-color:var(--order-green);font-size:18px;font-weight:900}

input[data-wood-output-final],#calculatorFinalQuantity{-moz-appearance:textfield;appearance:textfield}
input[data-wood-output-final]::-webkit-inner-spin-button,input[data-wood-output-final]::-webkit-outer-spin-button,#calculatorFinalQuantity::-webkit-inner-spin-button,#calculatorFinalQuantity::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

@media(max-width:980px) and (min-width:601px){
  .calculation-page #constructionMethodSection{grid-column:1}.calculation-page #calculatorInputSection{grid-column:2}.calculation-page #materialPickerSection,.calculation-page .wood-configuration-section{grid-column:1/-1}
  .wood-configuration-content .wood-stud-card{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:600px){
  html.has-mobile-material-picker,body.has-mobile-material-picker{overflow:hidden!important;overscroll-behavior:none}
  .calculation-page,.calculation-page .order-calculator,.calculation-page .calculator-body,.calculator-form-host,.calculation-page .calculator-block{min-width:0;max-width:100%;overflow-x:hidden}
  .calculation-page .calculator-body{padding-bottom:calc(140px + env(safe-area-inset-bottom))}
  .calculation-page #constructionMethodSection{grid-column:1;order:1}.calculation-page #calculatorInputSection{grid-column:1;order:2}.calculation-page .wood-configuration-section{grid-column:1;order:3}.calculation-page #materialPickerSection{grid-column:1;order:4}.calculation-page #componentRuleSection{grid-column:1;order:5}.calculation-page .calculator-output-block{grid-column:1;order:6}
  .calculation-page .wood-configuration-section{padding:14px}
  .wood-configuration-content .wood-assembly-fields,.wood-configuration-content .wood-layer-card,.wood-configuration-content .wood-stud-card{grid-template-columns:minmax(0,1fr);gap:9px}
  .wood-configuration-content .wood-layer-card,.wood-configuration-content .wood-stud-card{grid-column:1;padding:11px 0}
  .wood-configuration-content .wood-stud-card>strong,.wood-configuration-content .wood-stud-card .wood-material-field,.wood-configuration-content .wood-stud-product-info,.wood-configuration-content .wood-stud-card .calculator-help{grid-column:1}
  .wood-assembly-primary-controls .wood-assembly-choice{grid-template-columns:repeat(2,minmax(0,1fr))}
  .wood-assembly-primary-controls .wood-assembly-choice .order-check{grid-column:1/-1}
  .calculation-page .construction-method-card img,.calculation-page .material-card img{height:94px;max-height:100px;padding:7px;object-fit:contain}
  .calculation-page .calculator-actions{grid-template-columns:1fr 1fr}
  .calculation-page #calculateButton{max-width:none}
  .wood-output-card{grid-template-columns:minmax(0,1fr);gap:10px;padding:14px 0}
  .wood-output-card>label,.wood-output-card .wide{grid-column:1}
  #materialPickerSection.is-mobile-material-picker{max-width:calc(100vw - 16px);overscroll-behavior:contain;touch-action:pan-y}
  #materialPickerSection.is-mobile-material-picker .calculator-block-title{position:sticky;z-index:2;top:-14px;margin:-14px -14px 4px;padding:14px;border-bottom:1px solid var(--order-line);background:var(--order-paper)}
  #materialPickerSection.is-mobile-material-picker .material-picker-dismiss{display:inline-flex;min-height:36px!important;border-color:var(--order-green)!important;color:var(--order-green)!important}
}

/* Final calculation-screen hierarchy cleanup. */
.order-mode-tabs{overflow:hidden}
.order-mode-tabs button{position:relative}
.order-mode-tabs button:not(.is-active){color:#7e8982}
.order-mode-tabs button.is-active{background:var(--accent-soft);color:var(--order-green);box-shadow:none}
.order-mode-tabs button.is-active::after{content:"";position:absolute;left:9px;right:9px;bottom:1px;height:2px;border-radius:2px;background:var(--order-green)}

.wood-configuration-toggle{margin-left:auto!important;min-height:32px!important;padding:5px 10px!important;border-color:#cfded3!important;background:#fff!important;color:var(--order-green)!important;font-size:9px!important;font-weight:900!important}
.wood-configuration-toggle:disabled{opacity:.45}
.wood-configuration-summary{display:flex;align-items:center;gap:14px;padding:11px 12px;border:1px solid #cfded3;border-radius:10px;background:var(--accent-soft)}
.wood-configuration-summary[hidden]{display:none!important}
.wood-configuration-summary>div{display:grid;gap:3px;min-width:0}
.wood-configuration-summary span{color:var(--order-green);font-size:9px;font-weight:900}
.wood-configuration-summary strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
.wood-configuration-summary small{overflow-wrap:anywhere;color:var(--order-muted);font-size:9px}
.wood-configuration-summary button{margin-left:auto;min-height:32px;padding:5px 10px;color:var(--order-green);font-size:9px;font-weight:900}
.wood-configuration-section.is-collapsed{padding-block:13px}
.wood-configuration-section.is-collapsed .calculator-block-title>div>small{display:none}
.wood-assembly-choice label>small{color:var(--order-muted);font-size:8px;font-weight:600;line-height:1.35}

.wood-result-items{align-items:stretch}
.wood-result-item{min-height:82px;align-items:center}
.wood-result-item img,.wood-result-item .order-image-fallback{object-fit:contain;background:var(--order-soft)}
.wood-result-quantity{align-self:center;min-width:44px;text-align:right;font-variant-numeric:tabular-nums}
.wood-basis-results{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
.wood-basis-card{align-content:start}
.wood-basis-card dl{grid-template-columns:minmax(104px,.85fr) minmax(0,1.15fr)}

.wood-output-card{grid-template-columns:minmax(0,1fr) 112px 168px;align-items:end;gap:12px;padding:11px 0}
.wood-output-card>div{align-self:center}
.wood-output-auto>span{min-height:38px;font-variant-numeric:tabular-nums}
.wood-output-final{justify-items:start}
.wood-output-final>span{width:100%;max-width:142px}
.wood-output-final input{width:100%;max-width:110px;min-width:0}
.wood-output-adjustment{grid-column:1/-1!important}

.calculation-page .calculator-actions{gap:8px;padding:8px max(20px,calc((100vw - 1360px)/2)) calc(8px + env(safe-area-inset-bottom));box-shadow:0 -5px 16px rgba(21,33,29,.05)}
.calculation-page .calculator-actions button{min-height:42px}

#calculatorPanel[data-calculator-type="tile"] .material-card,
#calculatorPanel[data-calculator-type="film"] .material-card,
#calculatorPanel[data-calculator-type="wallpaper"] .material-card{border-radius:11px!important;font-family:inherit}
#calculatorPanel[data-calculator-type="tile"] .material-card.is-selected,
#calculatorPanel[data-calculator-type="film"] .material-card.is-selected,
#calculatorPanel[data-calculator-type="wallpaper"] .material-card.is-selected{border-color:var(--order-green)!important;background:var(--accent-soft)!important}

@media(max-width:980px) and (min-width:601px){
  .wood-basis-results{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:600px){
  .calculation-page .calculator-body{padding-bottom:calc(86px + env(safe-area-inset-bottom))}
  .wood-configuration-summary{align-items:flex-start;padding:10px}
  .wood-configuration-summary strong{white-space:normal}
  .wood-result-item{min-height:74px}
  .wood-basis-results,.wood-basis-card dl{grid-template-columns:minmax(0,1fr)}
  .wood-basis-card dd{text-align:left}
  .wood-output-card{grid-template-columns:minmax(0,1fr);gap:8px;padding:12px 0}
  .wood-output-final>span{max-width:160px}
  .calculation-page .calculator-actions{padding:7px 10px calc(7px + env(safe-area-inset-bottom))}
  .calculation-page .calculator-actions.is-result-ready{grid-template-columns:minmax(0,2fr) minmax(0,3fr)}
  .calculation-page .calculator-actions.is-result-ready>button{grid-column:auto;min-width:0;white-space:nowrap}
  .calculation-page .calculator-actions.is-result-ready>#calculateButton,
  .calculation-page .calculator-actions.is-result-ready>#addCalculatedItemButton{grid-column:auto;min-width:0;white-space:nowrap}
  .calculation-page .calculator-actions button{min-height:42px;padding-inline:8px;font-size:11px}
  #materialPickerSection.is-mobile-material-picker .material-cards{padding-bottom:calc(18px + env(safe-area-inset-bottom))}
}

@media(max-width:340px){
  .calculation-page .calculator-actions.is-result-ready{grid-template-columns:1fr}
  .calculation-page .calculator-actions.is-result-ready>#calculateButton,
  .calculation-page .calculator-actions.is-result-ready>#addCalculatedItemButton{grid-column:1}
  .calculation-page .calculator-body{padding-bottom:calc(132px + env(safe-area-inset-bottom))}
}

/* Tile bathroom quick calculation: nested rooms stay inside the existing tile work mode. */
.calculation-page .order-calculator.is-bathroom-quick #constructionMethodSection{grid-column:1}
.calculation-page .order-calculator.is-bathroom-quick #calculatorInputSection{grid-column:2/-1}
.calculation-page .order-calculator.is-bathroom-quick #materialPickerSection{grid-column:1/-1}
.calculation-page .order-calculator.is-bathroom-quick #materialPickerSection .material-cards{grid-template-columns:repeat(4,minmax(0,1fr))}
.bathroom-quick{grid-template-columns:minmax(0,1fr);gap:14px;min-width:0}
.bathroom-quick-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.bathroom-quick-heading>div{display:grid;gap:3px;min-width:0}.bathroom-quick-heading strong{font-size:12px}.bathroom-quick-heading small{color:var(--order-muted);font-size:9px;line-height:1.45}
.bathroom-quick-heading button,.bathroom-deduction-head button{min-height:32px!important;padding:5px 9px!important;color:var(--order-green)!important;font-size:9px!important;white-space:nowrap}
.bathroom-room-list{display:grid;gap:13px;min-width:0}
.bathroom-room-card{display:grid;gap:13px;min-width:0;padding:13px;border:1px solid var(--order-line);border-radius:12px;background:#fbfbf7}
.bathroom-room-card>header{display:flex;align-items:end;gap:8px;min-width:0}.bathroom-room-card>header label{flex:1;min-width:0}.bathroom-room-card>header button{min-height:36px!important;padding:7px 9px!important;color:var(--order-danger)!important;font-size:9px!important}
.bathroom-shape-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;min-width:0}
.bathroom-shape-card{position:relative;display:grid!important;grid-template-columns:minmax(0,1fr)!important;align-content:start;gap:5px;min-width:0;min-height:104px!important;padding:7px!important;overflow:hidden;border-radius:9px!important;text-align:left!important;background:#fff!important;color:var(--order-ink)!important}
.bathroom-shape-card.is-selected{border-color:var(--order-green)!important;background:var(--accent-soft)!important;box-shadow:0 0 0 1px color-mix(in srgb,var(--order-green) 12%,transparent)}
.bathroom-shape-card.is-selected::after{content:"✓";position:absolute;right:5px;top:5px;display:grid;place-items:center;width:17px;height:17px;border-radius:50%;background:var(--order-green);color:#fff;font-size:9px;font-weight:900}
.bathroom-shape-card>span:last-child{display:grid;gap:2px;min-width:0}.bathroom-shape-card strong{font-size:9px}.bathroom-shape-card small{color:var(--order-muted);font-size:7px;line-height:1.35}
.bathroom-shape-art{display:grid;place-items:center;width:100%;height:54px;border-radius:7px;background:#f4f7f2;color:var(--order-green)}.bathroom-shape-art svg,.bathroom-shape-art img{width:100%;height:54px;object-fit:contain}.bathroom-shape-art svg *{fill:none;stroke:currentColor;stroke-width:2}.bathroom-shape-art svg .solid{fill:#dbe9df;stroke:var(--order-green)}.bathroom-shape-art svg .measure{stroke:#98aa9f;stroke-dasharray:3 2}
.bathroom-plan{display:grid;place-items:center;min-width:0;min-height:112px;padding:7px;border:1px dashed #cad7cd;border-radius:9px;background:#fff;color:var(--order-green)}.bathroom-plan svg{display:block;width:min(100%,300px);height:118px}.bathroom-plan-room{fill:#f4f8f4;stroke:currentColor;stroke-width:2}.bathroom-plan-chase{fill:#c9ddd0;stroke:currentColor;stroke-width:2}.bathroom-plan text{fill:#65736a;font-size:10px;font-weight:700}.bathroom-manual-plan{color:var(--order-muted);font-size:10px;font-weight:800}
.bathroom-dimension-grid,.bathroom-pipe-grid,.bathroom-manual-grid,.bathroom-packaging-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;min-width:0}.bathroom-dimension-grid>*{min-width:0}.bathroom-ceiling-check{align-self:end;min-height:38px}.bathroom-ceiling-value{align-self:center;color:var(--order-green);font-size:9px;font-weight:800}
.bathroom-pipe-grid,.bathroom-manual-grid{padding:10px;border:1px solid #dbe4dc;border-radius:9px;background:#fff}.bathroom-pipe-grid>p,.bathroom-manual-grid>small{grid-column:1/-1;margin:0;color:var(--order-muted);font-size:8px;line-height:1.45}.bathroom-position-choice{display:grid;grid-template-columns:1fr 1fr;gap:5px}.bathroom-position-choice>span{grid-column:1/-1;color:var(--order-muted);font-size:9px;font-weight:700}.bathroom-position-choice button{min-height:36px!important;padding:6px!important;font-size:9px!important}.bathroom-position-choice button[aria-pressed="true"]{border-color:var(--order-green)!important;background:var(--accent-soft)!important;color:var(--order-green)!important}
.bathroom-extra-options{padding:10px;border:1px solid var(--order-line);border-radius:9px;background:#fff}.bathroom-extra-options>summary,.bathroom-calculation-basis>summary{cursor:pointer;color:var(--order-green);font-size:10px;font-weight:900}.bathroom-extra-options[open]>summary{margin-bottom:10px}.bathroom-deduction-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0 6px}.bathroom-deduction-head strong{font-size:10px}
.bathroom-deduction-row{display:grid;grid-template-columns:minmax(86px,1.2fr) repeat(3,minmax(58px,1fr)) 30px;gap:5px;align-items:end;margin-bottom:6px}.bathroom-deduction-row label{min-width:0;font-size:8px}.bathroom-deduction-row input{min-width:0;padding-inline:6px!important}.bathroom-deduction-row button{width:30px!important;min-height:38px!important;padding:0!important;color:var(--order-danger)!important}
.bathroom-partition{display:grid;gap:7px;margin-top:10px;padding-top:10px;border-top:1px solid var(--order-line)}.bathroom-partition>[data-bathroom-partition-fields]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.bathroom-partition>[data-bathroom-partition-fields]>small{grid-column:1/-1;color:var(--order-muted);font-size:8px}
.bathroom-product-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;min-width:0}.bathroom-product-grid>[data-bathroom-partition-product]{grid-column:1/-1;min-width:0}.bathroom-tile-target{display:grid;gap:7px;min-width:0;padding:8px;border:1px solid var(--order-line);border-radius:10px;background:#fff}.bathroom-material-choice{display:grid!important;gap:6px;width:100%!important;min-width:0;min-height:68px!important;padding:7px!important;text-align:left!important;background:#fff!important;color:var(--order-ink)!important}.bathroom-material-choice.is-active{border-color:var(--order-green)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--order-green) 12%,transparent)}.bathroom-target-label{color:var(--order-green);font-size:9px;font-weight:900}.bathroom-material-choice [data-bathroom-material-summary]{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:7px;min-width:0}.bathroom-material-choice [data-bathroom-material-summary]>img,.bathroom-material-choice [data-bathroom-material-summary]>.order-image-fallback{width:40px;height:36px;border-radius:6px;object-fit:contain;background:var(--order-soft)}.bathroom-material-choice [data-bathroom-material-summary]>span{display:grid;gap:2px;min-width:0}.bathroom-material-choice strong,.bathroom-material-choice small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.bathroom-material-choice strong{font-size:10px}.bathroom-material-choice small{color:var(--order-muted);font-size:8px}.bathroom-material-empty{grid-column:1/-1;color:var(--order-muted);font-size:9px;font-style:normal}.bathroom-tile-quantity{display:grid;gap:7px}.bathroom-tile-quantity details{padding:7px;border-radius:7px;background:var(--order-soft)}.bathroom-tile-quantity summary{cursor:pointer;color:var(--order-muted);font-size:8px;font-weight:800}.bathroom-tile-quantity details[open] summary{margin-bottom:7px}.bathroom-packaging-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.bathroom-packaging-grid label{min-width:0;font-size:7px}.bathroom-tile-quantity details>small{display:block;margin-top:6px;color:var(--order-green);font-size:8px;font-weight:800}
.bathroom-result-overview,.bathroom-output-overview,.bathroom-final-items{display:grid;gap:9px}.bathroom-result-overview h3,.bathroom-output-overview h3,.bathroom-final-items h4{margin:0;font-size:12px}.bathroom-result-rooms,.bathroom-output-cards,.bathroom-basis-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.bathroom-result-rooms>article,.bathroom-basis-cards>article{display:grid;gap:4px;padding:10px;border:1px solid #dce7dd;border-radius:9px;background:#fff}.bathroom-result-rooms span,.bathroom-output-cards span,.bathroom-basis-cards header span,.bathroom-final-identity span{color:var(--order-green);font-size:8px;font-weight:900}.bathroom-result-rooms strong,.bathroom-output-cards strong,.bathroom-basis-cards strong,.bathroom-final-identity strong{color:var(--order-ink);font-size:11px}.bathroom-result-rooms dl,.bathroom-basis-cards dl{margin-top:5px}.bathroom-output-cards>article{display:grid;grid-template-columns:48px minmax(0,1fr) auto;align-items:center;gap:8px;padding:9px;border:1px solid #dce7dd;border-radius:9px;background:#fff}.bathroom-output-cards img,.bathroom-output-cards .order-image-fallback{width:48px;height:44px;border-radius:6px;object-fit:contain;background:var(--order-soft)}.bathroom-output-cards>article>div{display:grid;gap:2px;min-width:0}.bathroom-output-cards small,.bathroom-output-cards em{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--order-muted);font-size:8px;font-style:normal}.bathroom-output-cards b{color:var(--order-green);font-size:14px;white-space:nowrap}.bathroom-calculation-basis{margin-top:10px;padding:10px;border:1px solid #dce7dd;border-radius:9px;background:#fff}.bathroom-calculation-basis[open]>summary{margin-bottom:9px}.bathroom-basis-cards ul{display:grid;gap:3px;margin:4px 0 7px;padding:0;list-style:none}.bathroom-basis-cards li{display:flex;justify-content:space-between;gap:8px;color:var(--order-muted);font-size:8px}.bathroom-basis-cards dl{grid-template-columns:minmax(0,1fr) auto}.bathroom-basis-cards dd{text-align:right}
.bathroom-final-items{margin-top:11px}.bathroom-output-adjustments{display:grid;gap:1px}.bathroom-output-adjustments>article{display:grid;grid-template-columns:minmax(0,1fr) 142px;align-items:end;gap:10px;padding:10px 0;border-top:1px solid #dce7dd}.bathroom-final-identity{display:grid;gap:2px;min-width:0}.bathroom-final-identity small{overflow-wrap:anywhere;color:var(--order-muted);font-size:8px}.bathroom-output-adjustments>article>label{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px;min-width:0;color:var(--order-muted);font-size:8px}.bathroom-output-adjustments>article>label input{grid-column:1;min-width:0!important;width:100%;max-width:106px}.bathroom-output-adjustments>article>label>span{grid-column:2;grid-row:2;color:var(--order-ink);font-weight:900}.bathroom-output-reason{grid-column:1/-1}.bathroom-output-reason label{display:grid;gap:5px;color:var(--order-muted);font-size:8px}
.calculator-result input[data-bathroom-output-final]{appearance:textfield;-moz-appearance:textfield}.calculator-result input[data-bathroom-output-final]::-webkit-inner-spin-button,.calculator-result input[data-bathroom-output-final]::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}

@media(max-width:600px){
  .calculation-page .order-calculator.is-bathroom-quick #constructionMethodSection,.calculation-page .order-calculator.is-bathroom-quick #calculatorInputSection,.calculation-page .order-calculator.is-bathroom-quick #materialPickerSection{grid-column:1}
  .calculation-page .order-calculator.is-bathroom-quick #materialPickerSection .material-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .bathroom-quick-heading{align-items:flex-start}.bathroom-room-card{padding:10px}.bathroom-shape-cards{grid-template-columns:repeat(2,minmax(0,1fr))}.bathroom-shape-card{min-height:98px!important}.bathroom-dimension-grid,.bathroom-pipe-grid,.bathroom-manual-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.bathroom-product-grid{grid-template-columns:minmax(0,1fr)}.bathroom-product-grid>[data-bathroom-partition-product]{grid-column:1}.bathroom-deduction-row{grid-template-columns:repeat(2,minmax(0,1fr)) 30px}.bathroom-deduction-row label:first-child{grid-column:1/-1}.bathroom-deduction-row button{grid-column:3;grid-row:2}.bathroom-partition>[data-bathroom-partition-fields],.bathroom-packaging-grid{grid-template-columns:minmax(0,1fr)}.bathroom-result-rooms,.bathroom-output-cards,.bathroom-basis-cards{grid-template-columns:minmax(0,1fr)}.bathroom-output-adjustments>article{grid-template-columns:minmax(0,1fr) 126px}.bathroom-room-card,.bathroom-room-card *{max-width:100%}.bathroom-room-card input,.bathroom-room-card select{min-width:0}
}
@media(max-width:980px) and (min-width:601px){
  .calculation-page .order-calculator.is-bathroom-quick #constructionMethodSection,.calculation-page .order-calculator.is-bathroom-quick #calculatorInputSection,.calculation-page .order-calculator.is-bathroom-quick #materialPickerSection{grid-column:1/-1}
  .calculation-page .order-calculator.is-bathroom-quick #materialPickerSection .material-cards{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:360px){
  .bathroom-quick-heading{display:grid}.bathroom-quick-heading button{justify-self:start}.bathroom-dimension-grid,.bathroom-pipe-grid,.bathroom-manual-grid,.bathroom-output-adjustments>article{grid-template-columns:minmax(0,1fr)}.bathroom-output-reason{grid-column:1}.bathroom-deduction-row{grid-template-columns:minmax(0,1fr) 30px}.bathroom-deduction-row label:first-child{grid-column:1/-1}.bathroom-deduction-row button{grid-column:2;grid-row:4}.bathroom-ceiling-check{min-height:0}
}

/* Release hardening: concise state actions, autosave feedback and item menus. */
.order-editor-title{display:flex;align-items:center;gap:7px;min-width:0}.order-editor-title h1{margin:0;font-size:18px;white-space:nowrap}.order-revision-badge{display:inline-flex;align-items:center;min-height:24px;padding:3px 7px;border:1px solid var(--order-line);border-radius:999px;background:#fff;color:var(--order-muted);font-size:9px;font-weight:900;white-space:nowrap}
.order-autosave-status{min-height:32px!important;padding:5px 9px!important;border-color:transparent!important;background:transparent!important;color:var(--order-muted)!important;font-size:10px!important;cursor:default!important}.order-autosave-status[data-status="saving"]::before{content:"";display:inline-block;width:7px;height:7px;margin-right:6px;border:1px solid currentColor;border-right-color:transparent;border-radius:50%;animation:order-save-spin .8s linear infinite}.order-autosave-status[data-status="saved"]{color:var(--order-green)!important}.order-autosave-status.is-error{border-color:#e4c7c3!important;background:#fff7f5!important;color:var(--order-danger)!important;cursor:pointer!important}@keyframes order-save-spin{to{transform:rotate(360deg)}}
.order-more-menu,.order-row-more,.order-add-item-menu{position:relative}.order-more-menu>summary,.order-row-more>summary{display:grid;place-items:center;min-height:38px;padding:8px 13px;border:1px solid var(--order-line);border-radius:7px;background:#fff;cursor:pointer;font-size:11px;font-weight:800;list-style:none}.order-more-menu>summary::-webkit-details-marker,.order-row-more>summary::-webkit-details-marker{display:none}.order-more-menu>div,.order-row-more>div,.order-add-item-menu>div{position:absolute;z-index:18;right:0;top:calc(100% + 5px);display:grid;min-width:176px;padding:5px;border:1px solid var(--order-line);border-radius:9px;background:#fff;box-shadow:0 12px 28px rgba(21,33,29,.14)}.order-more-menu>div button,.order-row-more>div button,.order-add-item-menu>div button{width:100%;min-height:34px;padding:7px 9px;border:0;text-align:left;font-size:10px}.order-add-item-menu>div[hidden]{display:none}.order-row-more{display:inline-block}.order-row-more>summary{width:34px;min-height:30px;padding:2px}.order-row-more>div{min-width:128px}.order-row-more>div button:disabled{display:none}
.order-group-tabs{display:flex;gap:6px;margin:12px 20px 0;padding-bottom:3px;overflow-x:auto}.order-group-tabs[hidden]{display:none}.order-group-tab,.order-group-add{flex:0 0 auto;display:grid!important;gap:2px;min-height:44px!important;padding:7px 12px!important;text-align:left!important}.order-group-tab strong{font-size:10px}.order-group-tab small{color:var(--order-muted);font-size:8px}.order-group-tab.is-current{border-color:var(--order-green)!important;background:var(--accent-soft)!important;color:var(--order-green)!important}.order-group-add{place-items:center;color:var(--order-green)!important}
.order-revision-trail{display:flex;align-items:center;gap:6px;margin:9px 20px 0;padding:8px 10px;border:1px solid var(--order-line);border-radius:8px;background:#fbfcf9;overflow-x:auto}.order-revision-trail[hidden]{display:none}.order-revision-trail>span{color:var(--order-muted);font-size:9px;font-weight:800;white-space:nowrap}.order-revision-trail button{flex:0 0 auto;min-height:28px;padding:4px 8px;font-size:9px}.order-revision-trail button.is-current{border-color:var(--order-green);background:var(--accent-soft);color:var(--order-green)}
.manual-adjustment-badge{display:inline-flex;margin:2px 0 0 4px;padding:2px 5px;border-radius:999px;background:#f8eedf;color:#7b551d;font-size:8px;font-weight:900;white-space:nowrap}.order-items-table td[data-label="발주 수량"]{min-width:112px}.order-mobile-item-actions{display:flex;justify-content:flex-end}.order-mobile-item-actions .order-row-more>div{right:0;top:auto;bottom:calc(100% + 5px)}
.calculator-breadcrumb{display:flex;align-items:center;gap:6px;margin:0 0 4px;color:var(--order-muted);font-size:9px;font-weight:800}.calculator-breadcrumb b{color:var(--order-green)}.calculation-formula,.calculation-input-evidence{display:grid;gap:4px;margin:8px 0;padding:9px;border-radius:8px;background:var(--order-soft);font-size:9px;line-height:1.5}.calculation-formula strong,.calculation-input-evidence strong{color:var(--order-green)}
.duplicate-item-dialog{width:min(470px,calc(100vw - 28px));background:#fff}.duplicate-item-dialog>header small{max-width:360px;margin-top:3px;line-height:1.45}

@media(max-width:1250px) and (min-width:861px){.order-editor-header{height:auto;min-height:76px;padding-block:10px}.order-header-actions{max-width:310px}.order-items-table{min-width:860px}}
@media(max-width:860px){.order-editor-pane{padding-bottom:calc(82px + env(safe-area-inset-bottom))}.order-editor-header{grid-template-columns:auto minmax(0,1fr);gap:5px;min-height:110px}.order-editor-title{flex-wrap:wrap}.order-editor-title h1{font-size:15px}.order-editor-header .order-header-actions{position:static;grid-column:1/-1;justify-content:flex-start;width:100%}.order-editor-header .order-mode-tabs{grid-column:1/-1;grid-row:auto}.order-header-actions #orderAutosaveStatus{margin-left:auto}.order-more-menu>div{right:auto;left:0}.order-inline-actions{flex-wrap:wrap;justify-content:flex-end}.order-group-tabs,.order-revision-trail{margin-inline:10px}.order-mobile-actionbar{position:fixed;z-index:24;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 12px calc(9px + env(safe-area-inset-bottom));border-top:1px solid var(--order-line);background:rgba(255,254,250,.97);box-shadow:0 -8px 22px rgba(21,33,29,.08)}.order-mobile-actionbar[hidden]{display:none}.order-mobile-actionbar .order-autosave-status{margin-right:auto}.order-mobile-actionbar button{min-width:130px}.order-mobile-item-actions{display:flex}.order-row-more>div{z-index:30}.order-card-title .order-inline-actions{width:100%}.order-add-item-menu{flex:1}.order-add-item-menu>#addItemButton,.order-inline-actions>#openCalculatorButton{width:100%}.order-card-title:has(.order-add-item-menu){display:grid}.order-card-title:has(.order-add-item-menu) .order-inline-actions{display:grid;grid-template-columns:1fr 1fr}}
@media(max-width:390px){.order-editor-header{padding:8px 10px}.order-editor-title h1{max-width:145px;overflow:hidden;text-overflow:ellipsis}.order-header-actions #pdfOrderButton,.order-header-actions #createRevisionButton{flex:1}.order-form-grid.three{gap:9px}.order-mobile-item-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.order-mobile-item,.order-mobile-item *{max-width:100%}.order-mobile-item-grid input{min-width:0}.delivery-address-display{max-width:100%}}

/* Mobile order operability: safe scrolling, touch targets and iOS input stability. */
@media(max-width:430px){
  body[data-page="orders"]{max-width:100vw;overflow-x:hidden}
  .order-dialog{width:100%;max-width:100%}
  .order-pane-header{min-height:62px;gap:8px}.order-pane-header h1{font-size:17px}.order-pane-header #newOrderButton{min-height:44px;padding:8px 11px}
  .order-search-row{padding:10px 12px}.order-search-row input,.order-filter-grid input,.order-filter-grid select{min-height:44px;font-size:16px}
  .order-tabs{min-height:44px;overflow-x:auto;overscroll-behavior-inline:contain}.order-tabs button{flex:0 0 auto;min-height:44px;padding-inline:12px}
  .new-order-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden}
  .new-order-dialog>header{align-items:flex-start;padding:calc(11px + env(safe-area-inset-top)) 12px 11px}.new-order-dialog>header strong{font-size:15px}.new-order-dialog>header small{margin-top:3px;font-size:10px;line-height:1.4}.new-order-dialog>header button{min-width:44px;min-height:44px;margin:-6px -6px 0 4px;padding:0}
  .new-order-dialog .new-order-flow{min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:12px;scroll-padding-bottom:28px}
  .new-order-dialog>footer{gap:8px;padding:9px 12px calc(9px + env(safe-area-inset-bottom))}.new-order-dialog>footer button{min-height:48px}.new-order-dialog>footer #startOrderButton{flex:1;min-width:0}
  .new-order-step{grid-template-columns:28px minmax(0,1fr);gap:6px 8px!important;padding:10px}.new-order-step>span{width:28px;height:28px}.new-order-step>input,.new-order-step>select{min-height:48px;font-size:16px}
  .project-search-step>small,.order-project-results,.process-selection-head,.new-order-process-grid,.new-order-process-count,.new-order-flooring-subtype,.vendor-selection-step>strong,.new-order-vendor-selectors,.new-order-vendor-feedback{min-width:0}
  .order-project-results{max-height:min(31dvh,230px);scrollbar-gutter:stable}.order-project-results button{min-height:52px;padding:9px 10px;touch-action:manipulation}.order-project-results button strong{font-size:11px}.order-project-results button small{font-size:9px;line-height:1.35}
  .process-selection-head{align-items:flex-start;flex-direction:column}.process-selection-head>div{display:grid;width:100%;grid-template-columns:1fr 1fr}.process-selection-head button{min-height:44px;padding:7px 8px}.new-order-process-card{min-height:56px;padding:9px;touch-action:manipulation}.new-order-flooring-subtype select,.new-order-vendor-row select{min-height:48px;font-size:16px}
  .new-order-vendor-row{grid-template-columns:minmax(0,1fr);gap:5px}.new-order-vendor-row strong{font-size:10px}.new-order-vendor-deferred{min-height:44px}
  .order-editor-pane input:not([type="checkbox"]):not([type="radio"]),.order-editor-pane select,.order-editor-pane textarea,.calculation-page input:not([type="checkbox"]):not([type="radio"]),.calculation-page select,.calculation-page textarea{font-size:16px}
  .order-editor-pane .order-check input,.calculation-page .order-check input{min-width:22px;min-height:22px}
  .order-card{margin:8px;padding:12px}.order-form-grid.three{gap:10px}.order-card-title{gap:9px}.order-card-title h2{font-size:14px}
  .order-mobile-item{padding:12px}.order-mobile-item-grid input{min-height:48px}.order-mobile-item-auto{min-height:48px}
  .order-mobile-actionbar{padding-inline:10px}.order-mobile-actionbar button{min-width:124px;min-height:48px}.order-mobile-actionbar .order-autosave-status{min-width:0;padding-inline:2px!important}
  .calculation-page .calculator-header{grid-template-columns:minmax(0,1fr) auto;padding-inline:10px}.calculation-page .calculator-header>#closeCalculatorButton{width:auto;min-width:82px;min-height:44px;padding:7px 9px;white-space:nowrap}.calculator-back-desktop{display:none}.calculator-back-mobile{display:inline}.calculation-page .calculator-body{padding:10px 10px calc(142px + env(safe-area-inset-bottom))}.calculation-page .calculator-block{padding:12px}.calculation-page .calculator-actions{padding-inline:10px}.calculation-page .calculator-actions button{min-height:48px;touch-action:manipulation}
  .calculation-page .construction-method-card,.calculation-page .material-card{touch-action:manipulation}.calculation-page .construction-method-card img,.calculation-page .material-card img{height:88px;max-height:88px}
}

/* Catalog list and item editor reuse the existing ORDER palette and controls. */
.material-admin-toolbar{display:flex;align-items:end;flex-wrap:wrap}
.material-admin-toolbar label,.material-secondary-toolbar label{display:grid;gap:6px;min-width:130px;font-size:12px;color:var(--order-muted)}
.material-admin-toolbar .material-search{flex:1;min-width:220px}
.material-admin-toolbar input,.material-admin-toolbar select,.material-secondary-toolbar select{width:100%}
.material-secondary-toolbar{display:flex;align-items:start;gap:10px;margin:12px 0 20px}
.material-secondary-toolbar details{flex:1}
.material-secondary-toolbar>button{width:auto;flex-shrink:0;margin:0}.material-secondary-toolbar summary{white-space:nowrap}
.material-admin-toolbar>button{flex-shrink:0}.material-admin-toolbar>label:not(.material-search){flex:0 1 160px}
.material-secondary-toolbar summary,.material-excel-menu summary,.material-editor-section summary{cursor:pointer;font-size:13px;font-weight:700;padding:10px 0}
.material-excel-menu{position:relative}
.material-excel-menu summary{border:1px solid var(--order-line);border-radius:8px;padding:10px 16px;background:var(--order-paper)}
.material-excel-menu>div{position:absolute;z-index:4;right:0;min-width:170px;display:grid;gap:8px;padding:12px;border:1px solid var(--order-line);border-radius:8px;background:var(--order-paper);box-shadow:var(--order-shadow)}
.material-table-wrap{width:100%;overflow:auto}
.material-admin-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px}
.material-admin-table th{padding:12px;text-align:left;font-size:11px;color:var(--order-muted);border-bottom:1px solid var(--order-line)}
.material-admin-table td{padding:14px 12px;border-bottom:1px solid var(--order-line);overflow-wrap:anywhere;vertical-align:middle}
.material-admin-table th:nth-child(1){width:17%}.material-admin-table th:nth-child(2){width:27%}.material-admin-table th:nth-child(3){width:14%}.material-admin-table th:nth-child(4){width:26%}.material-admin-table th:nth-child(n+5){width:8%}
.material-admin-table small{display:block;margin-top:5px;color:var(--order-muted);font-size:11px}
.material-admin-table tr[data-material-row]{cursor:pointer}.material-admin-table tr[data-material-row]:hover{background:var(--order-soft)}
.material-admin-table .is-inactive{color:var(--order-muted)}
.material-admin-table .material-name-button{padding:0;min-height:32px;border:0;background:none;text-align:left;font:inherit;font-weight:700;color:var(--order-ink);white-space:normal}
.material-admin-table .material-name-button:hover{text-decoration:underline;background:none}
.material-pagination{display:flex;gap:12px;align-items:center;padding-top:18px;font-size:12px;color:var(--order-muted)}
.material-pagination>span:first-child{margin-right:auto}
.material-editor-open{overflow:hidden}
.material-editor-dialog{position:fixed;inset:0 0 0 auto;width:min(620px,100%);height:100dvh;max-width:100%;max-height:100dvh;margin:0;padding:0;border:0;border-left:1px solid var(--order-line);background:var(--order-paper);color:var(--order-ink);box-shadow:var(--order-shadow)}
.material-editor-dialog::backdrop{background:rgba(17,24,20,.32)}
.material-editor-dialog #materialEditor{display:flex;flex-direction:column;height:100%;min-height:0;margin:0;padding:0;border:0;border-radius:0;background:var(--order-paper)}
.material-editor-dialog [hidden],.material-editor-dialog #materialEditor[hidden]{display:none!important}
.material-editor-header{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid var(--order-line)}
.material-editor-header h2{margin:0;font-size:19px}.material-editor-header button{width:40px;min-height:40px;font-size:22px}
.material-editor-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 24px 24px;scroll-padding:20px}
.material-editor-body .order-settings-form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.material-editor-body .order-settings-feedback:empty{display:none}
.material-editor-body>.order-settings-form-grid{padding-top:20px}
.material-editor-section{margin-top:22px;border-top:1px solid var(--order-line);padding-top:6px}
.material-editor-section summary{padding:12px 0}.material-editor-section summary small{display:block;margin:6px 0 0 16px;font-size:11px;color:var(--order-muted);font-weight:400}
.material-editor-note{font-size:12px;line-height:1.6;color:var(--order-muted);padding:10px;background:var(--order-soft);border-radius:6px}
.material-preset-picker{display:flex;gap:10px;align-items:end;margin:8px 0 18px}.material-preset-picker>label{flex:1;min-width:0;display:grid;gap:6px;font-size:12px}.material-preset-picker select{width:100%}
.material-editor-dialog .material-editor-footer{flex-shrink:0;display:flex;justify-content:flex-end;margin:0;padding:14px 24px calc(14px + env(safe-area-inset-bottom));border-top:1px solid var(--order-line);background:var(--order-paper)}
.material-editor-footer button{min-height:44px;min-width:100px}
.material-field-error{display:block;color:var(--order-danger);font-size:11px;line-height:1.5}
.material-editor-dialog [aria-invalid="true"]{border-color:var(--order-danger)}
#checkMaterialCalculation{margin-top:16px}
.material-confirm-dialog{width:min(440px,calc(100vw - 32px));padding:24px;border:1px solid var(--order-line);border-radius:12px;background:var(--order-paper);color:var(--order-ink);box-shadow:var(--order-shadow)}
.material-confirm-dialog::backdrop{background:rgba(17,24,20,.32)}.material-confirm-dialog h3{margin-top:0;font-size:17px}.material-confirm-dialog p{font-size:13px;line-height:1.7}.material-confirm-dialog button{width:auto;min-height:44px}
@media(max-width:700px){
  .material-admin-toolbar{display:grid!important;grid-template-columns:1fr 1fr;gap:12px}.material-admin-toolbar .material-search{grid-column:1/-1;min-width:0}.material-admin-toolbar label{min-width:0}
  .material-secondary-toolbar{flex-wrap:wrap;font-size:12px}.material-secondary-toolbar details{min-width:150px}.material-secondary-toolbar button{padding:8px}
  .material-admin-table,.material-admin-table tbody{display:block}.material-admin-table thead{display:none}.material-admin-table tr[data-material-row]{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:16px 0;border-bottom:1px solid var(--order-line)}
  .material-admin-table td{display:block;border:0;padding:0}.material-admin-table td:before{content:attr(data-label);display:block;font-size:10px;color:var(--order-muted);margin-bottom:4px}.material-admin-table td:nth-child(2){grid-column:1/-1;grid-row:1}.material-admin-table small{margin-top:3px}
  .material-pagination{gap:8px;flex-wrap:wrap}.material-pagination>span:first-child{flex-basis:100%}
  .material-editor-dialog{inset:0;width:100%;border:0}.material-editor-header{padding:12px 16px}.material-editor-body{padding:0 16px 20px}.material-editor-dialog .material-editor-footer{padding:12px 16px calc(12px + env(safe-area-inset-bottom))}.material-editor-footer button{flex:1}
}
@media(max-width:380px){.material-editor-body .order-settings-form-grid{grid-template-columns:1fr}.material-preset-picker{flex-wrap:wrap}.material-preset-picker>label{flex-basis:100%}}

/* Keep Excel preview scrolling inside the table; header and actions stay in view. */
.material-import-dialog[open]{display:flex;flex-direction:column;height:min(780px,90dvh);overflow:hidden;background:var(--order-paper)}
.material-import-dialog>header,.material-import-dialog>footer{position:static;flex-shrink:0;min-width:0;gap:8px}
.material-import-dialog>header>div{min-width:0;flex:1}.material-import-dialog>header small{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.material-import-dialog>header button{flex-shrink:0}
.material-import-body{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;overflow:hidden}
.material-import-counts,.material-import-body>.order-settings-feedback{flex-shrink:0}.material-import-table-wrap{flex:1;min-height:0;max-height:none;overflow:auto}.material-import-table-wrap table{min-width:760px}
@media (max-width:600px){.material-import-dialog[open]{inset:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0}.material-import-dialog>footer{padding-bottom:calc(14px + env(safe-area-inset-bottom))}.material-import-counts span{padding:8px}.material-import-body{padding:12px}}

/* The list scrolls as one surface. Search opens separately from the order details. */
.order-list-pane{display:block;height:100dvh;overflow-y:auto;overscroll-behavior-y:contain}
.order-list-pane>.order-list{overflow:visible}
.order-list-toolbar{display:flex;align-items:center;gap:8px;padding:12px 20px}
.order-list-toolbar .order-search-button{flex:1;min-height:44px;text-align:left;font-size:14px}
.order-search-button>span{margin-right:4px;font-size:20px;vertical-align:middle}
.order-list-toolbar .order-icon-button{flex:0 0 44px;min-height:44px}
.order-site-summary{display:flex;align-items:center;gap:10px;margin:0 20px 12px;padding:10px 12px;border-radius:8px;background:var(--order-soft);font-size:14px}
.order-site-summary[hidden]{display:none}
.order-site-summary>span{flex:1;min-width:0;overflow-wrap:anywhere;font-weight:700}
.order-site-summary>button{flex-shrink:0;min-height:36px;padding:6px 8px;font-size:12px}
html.order-search-open{overflow:hidden}
body.order-search-open{position:fixed;top:var(--order-search-scroll-top,0);left:0;right:0;width:100%;overflow:hidden}
.order-search-dialog{position:fixed;inset:var(--order-search-top,12px) auto auto 50%;transform:translateX(-50%);width:min(480px,calc(100% - 24px));max-width:calc(100% - 24px);height:min(560px,var(--order-search-height,calc(100dvh - 24px)));max-height:var(--order-search-height,calc(100dvh - 24px));margin:0;padding:0;overflow:hidden;border-radius:12px;background:var(--order-paper);color:var(--order-ink)}
.order-search-dialog[open]{display:flex;flex-direction:column}
.order-search-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.order-search-dialog>.order-site-search-header{position:static;flex-shrink:0;display:flex;align-items:center;gap:8px;padding:10px 12px}
.order-site-search-form{position:relative;display:flex;flex:1;min-width:0;margin:0;padding:0;border:0;background:transparent}
.order-site-search-form>input{width:100%;min-width:0;height:44px;min-height:44px;padding:8px 48px 8px 12px;font-size:16px}
.order-site-search-form>.order-site-search-submit{position:absolute;right:0;top:0;display:grid;place-items:center;width:44px;min-height:44px;padding:0;border:0;background:transparent;color:var(--order-green)}
.order-site-search-header>#closeOrderSearch{flex-shrink:0;width:auto;min-width:44px;min-height:44px;padding:0 4px;border:0;background:transparent;font-size:14px}
.order-site-results{flex:1;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:0 12px calc(12px + env(safe-area-inset-bottom));scroll-padding:8px}
.order-site-results .order-site-option{display:block;width:100%;min-height:48px;margin:0;padding:12px;text-align:left;font-size:15px;line-height:1.5;white-space:normal;overflow-wrap:anywhere;border:0;border-bottom:1px solid var(--order-line);border-radius:0;background:transparent}
.order-site-results .order-site-option[aria-pressed="true"]{color:var(--order-green);background:var(--order-soft)}
.order-site-results .order-site-option:focus-visible{outline:2px solid var(--order-green);outline-offset:-2px}
.order-site-search-feedback{margin:16px 12px;font-size:14px;line-height:1.6;color:var(--order-muted)}
@media(max-width:860px){
  .order-search-dialog{inset:var(--order-search-top,0) 0 auto;width:100%;max-width:100%;height:var(--order-search-height,100dvh);max-height:var(--order-search-height,100dvh);transform:none;border-radius:0}
  .order-list-pane{height:auto;min-height:100dvh;position:static;overflow:visible;overscroll-behavior:auto;padding-bottom:env(safe-area-inset-bottom)}
  .order-list-pane>.order-list{height:auto;max-height:none;overflow:visible}
  .order-list-pane>.order-pane-header{position:static}
  .order-list-toolbar{padding:10px 12px}
  .order-site-summary{margin:0 12px 10px}
  .order-list-pane .order-tabs{padding-inline:12px}
  .order-list-pane .order-list-item{padding:16px!important}
  .order-list-pane .order-list-item-meta{font-size:12px;line-height:1.5}
  .order-list-pane .order-list-site strong{font-size:14px;white-space:normal;overflow-wrap:anywhere}
  .order-list-pane .order-pagination{height:auto;min-height:64px}
  .order-list-pane .order-pagination button{min-width:44px;min-height:44px}
}

/* Mobile editor shares document scrolling with the list. An overflow:auto
   editor creates a second, two-axis scroll surface on iOS even when it fits. */
@media (max-width:860px){
  .order-editor-pane{height:auto;min-height:100dvh;overflow:visible}
  .order-editor-header{position:static;min-height:0}
  .order-editor-pane>.order-group-tabs{position:static}
  .order-editor-pane .order-form-grid.three{grid-template-columns:minmax(0,1fr)}
  .order-editor-pane .order-form-grid>*,.order-editor-title{min-width:0}
  .order-editor-pane input:not([type="checkbox"]):not([type="radio"]),.order-editor-pane select,.order-editor-pane textarea{min-width:0;max-width:100%;font-size:16px}
  .order-editor-header .order-more-menu>div{left:auto;right:0;max-width:calc(100vw - 24px)}
}

/* Mobile navigation uses the visible viewport; only the open menu may scroll. */
@media (max-width:860px){
  html:has(body[data-page="orders"]),html:has(body[data-page="order-settings"]){overflow-x:clip;overscroll-behavior-x:none}
  body[data-page="orders"],body[data-page="order-settings"]{width:100%;max-width:100%;overflow-x:clip;overscroll-behavior-x:none}
  html.order-navigation-open{overflow:hidden}
  body.order-navigation-open{position:fixed;top:var(--order-nav-scroll-top,0);left:0;right:0;width:100%;overflow:hidden}
  .order-sidebar{top:var(--order-nav-top,0);height:100dvh;height:var(--order-nav-height,100dvh);max-height:100dvh;max-height:var(--order-nav-height,100dvh);max-width:calc(100% - 44px);padding:calc(20px + env(safe-area-inset-top)) 10px calc(20px + env(safe-area-inset-bottom));overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y pinch-zoom;visibility:hidden}
  .order-sidebar.open{visibility:visible}
  .order-sidebar>.order-brand,.order-sidebar>nav,.order-sidebar-footer{flex-shrink:0}
  .order-sidebar-footer{margin-top:24px}
  .order-navigation-open #orderScrim{z-index:49;touch-action:none;overscroll-behavior:contain}
  .order-app,.order-settings-app,.order-settings-content,.order-settings-shell,.order-settings-main,.order-settings-panel{min-width:0;max-width:100%}
  .order-settings-main{grid-template-columns:minmax(0,1fr)}
  .order-settings-brand,.order-settings-brand>div,.order-settings-toolbar>*,.order-settings-form-grid>*,.material-editor-body{min-width:0}
  .order-settings-tabs{min-width:0;max-width:100%;overscroll-behavior-x:contain}
  .order-settings-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}
  .order-settings-toolbar>input{grid-column:1/-1}
  .order-settings-app input:not([type="checkbox"]):not([type="radio"]),.order-settings-app select,.order-settings-app textarea{width:100%;min-width:0;max-width:100%;font-size:16px}
  .material-admin-toolbar,.material-admin-table tr[data-material-row]{grid-template-columns:repeat(2,minmax(0,1fr))}
  .material-editor-body{overflow-x:hidden}
}

.customer-order-scope{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:14px;margin:10px 0;background:#f2f5f8;border-radius:10px;font-size:14px}.customer-order-scope a{color:inherit;text-decoration:underline}

.new-order-vendor-feedback:empty,
#newOrderProjectSelection:empty,
#materialPickerHint:empty {
  display: none;
}
