.specification-dialog{width:min(1200px,96vw);max-width:96vw}
.specification-dialog .modalhead{padding:14px 20px}
.specification-dialog .modalbody{padding:16px 20px}
.specification-form{--spec-columns:3;display:grid;grid-template-columns:repeat(var(--spec-columns),minmax(0,1fr));gap:12px}
.specification-form>*{grid-column:1/-1;min-width:0}
.specification-form>.field,.specification-form>label:not(.full){grid-column:auto}
.specification-form>.full{grid-column:1/-1}
.specification-form .formgrid{grid-template-columns:repeat(var(--spec-columns),minmax(0,1fr));gap:12px}
.specification-form .formgrid>*{min-width:0;grid-column:auto}
.specification-form .formgrid>.full{grid-column:1/-1}
.specification-form>section,.spec-read>section{border-top:1px solid var(--line,#dce4e0);padding-top:12px;margin-top:0}
.specification-form h3{margin:4px 0 8px}
.specification-form h4{font-size:14px;margin:0 0 8px}
.specification-form label{margin-bottom:0;font-size:13px}
.specification-form .field label{margin-bottom:4px}
.specification-form input:not([type=checkbox]),.specification-form select,.specification-form textarea{min-height:36px;padding:7px 10px;font-size:13px}
.specification-form textarea{min-height:60px}
.specification-form .notice{padding:10px 12px;margin:0;font-size:13px}
.specification-form .footer-note{margin:6px 0;font-size:12px;line-height:1.45}
.specification-form .spec-geometry,.specification-form .uv-spec{display:grid;grid-template-columns:repeat(var(--spec-columns),minmax(0,1fr));gap:10px 12px}
.spec-geometry>h3,.spec-geometry>p,.uv-spec>h3,.uv-spec>details,.uv-spec>.footer-note,.uv-spec>.spec-pack-content{grid-column:1/-1}
.specification-form .uv-spec>*{min-width:0}
.spec-measures{display:grid;gap:6px;padding:10px 12px;background:#eef4f1;border-radius:8px;margin:0;align-content:center;font-size:13px}
.spec-step-list,.spec-resource-list{display:grid;grid-template-columns:repeat(var(--spec-columns),minmax(0,1fr));gap:12px;align-items:start}
.spec-step,.spec-resource{display:grid;gap:8px;min-width:0;padding:12px;border:1px solid #dce4e0;border-radius:10px;margin:0}
.spec-step p,.spec-resource p{margin:0;font-size:12px}
.spec-step input[type=file]{max-width:100%;font-size:12px}
.spec-step-list:empty,.spec-resource-list:empty{display:none}
.spec-norms>h3:not(:first-child){margin-top:14px}
.spec-norms>.spec-add-resource{margin-top:10px}
.spec-drawing{max-width:100%;max-height:160px;object-fit:contain;display:block;margin:4px 0}
.specification-form [data-norm-result]{color:#286653;font-weight:600}
.specification-form .formfooter{position:sticky;bottom:-16px;background:#fff;padding:10px 0;margin:0;z-index:2;border-top:1px solid #dce4e0}
.specification-form .uv-spec{margin-bottom:0}
.specification-form #route-editor,.specification-form #mirror-route{display:grid;grid-template-columns:repeat(var(--spec-columns),minmax(0,1fr));gap:10px}
.specification-form .route-step{min-width:0;margin:0;padding:10px}
.specification-form .route-step .row{flex-wrap:wrap;gap:6px}
.specification-form .route-step strong{font-size:13px}
@media(max-width:900px){.specification-form{--spec-columns:2}}
@media(max-width:600px){.specification-dialog{width:100%;max-width:100%}.specification-dialog .modalbody{padding:12px}.specification-form{--spec-columns:1}.specification-form .formfooter{bottom:-12px}.spec-step,.spec-resource{padding:10px}}

/* Desktop sheet: a fixed viewport, with overflow only for unusually long lists. */
.spec-lane{min-width:0}
.spec-help{font-size:12px;margin-top:8px}
.spec-help summary{cursor:pointer;color:#426d60}
.spec-repeated-title{display:none}
@media(min-width:1000px){
 .specification-form:not(.spec-screen)>.uv-pack-component{grid-column:auto;padding:8px;margin:0}
 .specification-dialog:has(.spec-screen){width:calc(100vw - 24px);max-width:1600px;height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);overflow:hidden}
 .specification-dialog:has(.spec-screen) .modalhead{padding:8px 12px;height:46px;box-sizing:border-box}
 .specification-dialog:has(.spec-screen) .modalhead h2{font-size:16px}
 .specification-dialog:has(.spec-screen) .modalbody{padding:8px;height:calc(100% - 46px);box-sizing:border-box;overflow:hidden}
 .specification-form.spec-screen{height:100%;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.15fr);grid-template-rows:minmax(0,1fr) auto auto;gap:6px 10px;--spec-columns:2;align-content:stretch}
 .spec-screen>.spec-lane{grid-column:auto;grid-row:1;overflow:auto;scrollbar-width:thin;min-height:0;padding:0 6px 4px 2px;overscroll-behavior:contain}
 .spec-screen>.spec-lane+.spec-lane{border-left:1px solid #dce4e0;padding-left:10px}
 .spec-screen>.formfooter{position:static;padding:6px 0 0;grid-column:1/-1;grid-row:3}
 .spec-screen>#form-error{grid-column:1/-1;grid-row:2;margin:0;max-height:55px;overflow:auto}
 .spec-screen .spec-lane-title{font-size:13px;color:#2c6251;background:#edf4f0;padding:6px 8px;margin:0 0 8px;border-radius:6px}
 .spec-screen .formgrid{gap:6px 8px}
 .spec-screen .field label,.spec-screen label{font-size:11px;line-height:1.2;margin-bottom:2px}
 .spec-screen input:not([type=checkbox]),.spec-screen select,.spec-screen textarea{min-height:28px;padding:4px 6px;font-size:12px;border-radius:5px}
 .specification-form.spec-screen input:not([type=checkbox]):not([type=radio]):not([type=file]),.specification-form.spec-screen select{height:28px;min-height:28px}
 .spec-screen textarea{height:32px;min-height:32px}
 .spec-screen button{padding:4px 8px;min-height:28px;font-size:11px}
 .spec-screen .item-picker-trigger{min-height:28px;padding:4px 6px;font-size:12px}
 .spec-screen .check{padding:2px 0;gap:5px;min-height:22px}
 .spec-screen .check input{width:14px;height:14px}
 .spec-screen h3{font-size:12px;margin:7px 0 5px}
 .spec-screen h4{font-size:12px;margin:0}
 .spec-screen .notice{padding:6px;margin-bottom:6px;font-size:11px}
 .spec-screen .spec-geometry{padding-top:6px;margin-top:8px;gap:5px 8px}
 .spec-screen .spec-measures{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px 20px;padding:6px;font-size:12px}
 .spec-screen #route-editor,.spec-screen #mirror-route{grid-template-columns:1fr;gap:5px}
 .spec-screen .route-step{padding:5px;display:grid;grid-template-columns:1fr;gap:4px}
 .spec-screen .route-step .row{gap:3px}
 .spec-screen .route-step strong{font-size:11px}
 .spec-screen .route-step button{min-height:23px;padding:2px 6px}
 .spec-screen .route-step .actions{gap:3px}
 .spec-screen .uv-spec{gap:5px 8px;margin-top:8px;padding-top:6px}
 .spec-screen .uv-spec .uv-checks{gap:4px;display:flex;flex-wrap:wrap}
 .spec-screen .uv-spec .uv-checks{margin:5px 0}
 .spec-screen .uv-spec .uv-dot{width:18px;height:18px;font-size:10px}
 .spec-screen .uv-spec details{padding:3px 0}
 .spec-screen .uv-spec .uv-checks label{padding:2px;font-size:10px}
 .spec-screen .uv-spec .uv-color-picker{gap:4px;padding:0}
 .spec-screen .uv-spec details{font-size:11px}
 .spec-screen .spec-step-list,.spec-screen .spec-resource-list{grid-template-columns:1fr;gap:5px}
 .spec-screen .spec-step,.spec-screen .spec-resource{grid-template-columns:repeat(2,minmax(0,1fr));padding:6px;gap:4px 8px}
 .spec-screen .spec-step>h4,.spec-screen .spec-resource>h4,.spec-screen .spec-step>label:has(textarea),.spec-screen .spec-step>img{grid-column:1/-1}
 .spec-screen .spec-step>[data-norm-result]{grid-column:1/-1;font-size:10px}
 .spec-screen .spec-step>label:has(input[type=file]){font-size:10px}
 .spec-screen .spec-step input[type=file]{font-size:10px;padding:2px;min-height:24px}
 .spec-screen .spec-step>label:has(input[data-remove-image]){font-size:10px;align-self:end}
 .specification-form.spec-screen .spec-step>label{display:grid;gap:2px;align-content:start;margin:0;line-height:12px}
 .specification-form.spec-screen .spec-step>label:has(input[data-remove-image]){display:flex;align-items:center;align-self:center}
 .specification-form.spec-screen .spec-step>label:has(input[type=file]){font-size:0;line-height:0}
 .specification-form.spec-screen .spec-step textarea{height:26px;min-height:26px;padding:3px 5px;box-sizing:border-box}
 .specification-form.spec-screen .spec-step input:not([type=checkbox]),.specification-form.spec-screen .spec-step select{height:26px;min-height:26px;box-sizing:border-box}
 .specification-form.spec-screen .spec-step input[type=file]{font-size:10px;line-height:18px;padding:1px}
 .specification-form.spec-screen .route-step{gap:2px;padding:4px}
 .specification-form.spec-screen .route-step .row{margin:0}
 .specification-form.spec-screen .route-step input{height:26px;min-height:26px;padding:3px 5px}
 .specification-form.spec-screen .uv-spec h3{margin:3px 0}
 .specification-form.spec-screen .uv-spec .uv-checks{margin:2px 0}
 .specification-form.spec-screen .uv-spec{padding:4px 0;margin-top:4px}
 .specification-form.spec-screen .spec-step{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px 7px}
 .specification-form.spec-screen .spec-step>h4{grid-column:1/3;grid-row:1}
 .specification-form.spec-screen .spec-step>[data-norm-result]{grid-column:3;grid-row:1}
 .specification-form.spec-screen .spec-step>label:has([data-norm]){grid-column:1;grid-row:2}
 .specification-form.spec-screen .spec-step>label:has([data-basis]){grid-column:2;grid-row:2}
 .specification-form.spec-screen .spec-step>label:has(textarea){grid-column:3;grid-row:2}
 .specification-form.spec-screen .spec-step>label:has(input[type=file]){grid-column:1/3;grid-row:3}
 .specification-form.spec-screen .spec-step>label:has(input[data-remove-image]){grid-column:3;grid-row:3}
 .specification-form.spec-screen .spec-step>img{grid-column:1/-1;grid-row:4}
 .specification-form.spec-screen .route-step{grid-template-columns:minmax(110px,.8fr) minmax(0,1.2fr);align-items:center}
 .specification-form.spec-screen .route-step .row{display:grid;gap:1px}
 .specification-form.spec-screen .route-step input{min-width:0}
 .spec-screen .spec-drawing{max-height:80px;margin:0}
 .spec-screen .spec-norms>h3:not(:first-child){margin-top:8px}
 .spec-screen .spec-norms>.spec-add-resource{margin-top:5px}
 .spec-screen .spec-resource-list>p{margin:3px 0;font-size:11px}
 .spec-screen .toolbar{gap:5px;margin:6px 0}
 .spec-screen .spec-help{font-size:11px}
 .spec-screen .spec-help p{font-size:11px;line-height:1.35;margin:5px 0}
}
@media(max-width:999px){.spec-screen>.spec-lane{grid-column:1/-1}.spec-lane+.spec-lane{margin-top:12px}}

.catalog-contour-field{margin-top:6px;padding-top:6px;border-top:1px solid var(--line,#d9e3df)}.catalog-contour-current{display:flex;gap:8px;align-items:center}.catalog-contour-preview{width:70px;height:70px;flex-shrink:0;color:#176351;background:#f2f7f5;border:1px solid #d9e3df;border-radius:6px;padding:4px}.catalog-contour-field p,.catalog-contour-field small{font-size:11px;line-height:1.4}.catalog-contour-field input[type=file]{max-width:100%;font-size:11px}.catalog-contour-field .field{margin-top:4px}.catalog-contour-field [hidden]{display:none!important}
