header{background:#0c2946;border-bottom:3px solid #15735f}header strong{font-weight:750}main{max-width:1920px;margin:auto;padding:14px 2vw}#start{max-width:950px}#jobform label input{max-width:205px}#sheet{display:grid;grid-template-columns:minmax(0,1fr);gap:9px}#sheet article{padding:9px 15px}.canvas{height:clamp(140px,36vh,470px);max-height:none;margin:6px 0 0;cursor:grab;overscroll-behavior:contain;touch-action:none}.canvas:active{cursor:grabbing}.canvas img{user-select:none;-webkit-user-drag:none}.zoom{margin:0}.drawingbar{display:flex;align-items:center;gap:14px}.drawingbar a{margin-left:auto}.drawingbar h2{margin-right:12px}#sheet .scroll{height:196px;max-height:196px;overscroll-behavior:contain;margin:8px 0}.scroll #grid tr{height:52px}#sheet th{white-space:nowrap}#grid td:first-child,#columns th:first-child{position:sticky;left:0;background:#eaf3f0;font-weight:700;min-width:90px}#columns th:first-child{z-index:3}#grid td{padding:3px 6px}#grid td:nth-child(7){min-width:125px}#grid input,#grid select{min-width:65px}#grid .ok,.badge.ok,#totals span:first-of-type{background:#146b38;color:white;font-weight:700}#grid .ng,.badge.ng,#totals span:last-child{background:#b00020;color:white;font-weight:700}#grid small:not(:empty){border-radius:4px;text-align:center;line-height:16px}#grid td:has(.ok){background:#146b38}#grid td:has(.ng){background:#b00020}#grid input.ok,#grid input.ng,#grid select.ok,#grid select.ng{border-color:#ffffff75}#spc>.controls{background:#eff5f5;padding:12px;border-radius:8px;margin:12px 0}.analysis{display:grid;grid-template-columns:minmax(0,3fr) minmax(190px,1fr);gap:12px}.analysis section,.analysis aside,.cap{border:1px solid #ccdad9;border-radius:8px;padding:14px}.analysis h3{margin:0}.analysis aside{background:#f4f8f7}.analysis aside p{line-height:1.6}#indices,#totals{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}#indices div{min-width:110px;flex:1;background:#f0f5f4;padding:10px 15px;border-left:3px solid #317779}#indices strong{display:block;font-size:24px;font-variant-numeric:tabular-nums}#totals>*{padding:6px 9px;border-radius:5px}.cap{margin-top:12px}#period,#method{font-size:13px;color:#49616c}.badge{display:inline-block;border-radius:4px;padding:2px 7px}#grid td small:empty{display:none}#desk h1{font-size:26px}#meta{margin:4px 0}nav{margin:9px 0}#msg{z-index:5}#distribution svg{height:170px}#chart svg{min-height:160px}@media(max-width:750px){.analysis{grid-template-columns:1fr}.drawingbar{flex-wrap:wrap}#sheet .bar{flex-wrap:wrap}#sheet .scroll{height:196px}#indices div{min-width:70px}.controls{gap:8px}}

.caplayout{display:grid;grid-template-columns:minmax(0,3fr) minmax(200px,1fr);gap:18px;align-items:center}
#distribution svg{height:260px;max-height:none}
#indices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
#indices div{min-width:0}.history details{margin:4px 0;border:1px solid #d3e0dc;border-radius:6px}
.history summary{padding:11px;cursor:pointer;background:#edf4f2}.history summary>*{margin-right:14px}
#grid tr.by{height:21px;background:#f3f7f6}.by td{font-size:11px;color:#365960}
#sheet .scroll{height:262px;max-height:262px}#grid tr:not(.by)>td:last-child,#columns th:last-child{position:sticky;right:0;background:#eef4f2}
#grid tr:not(.by)>td:last-child button{padding:2px 8px;font-size:20px}
dialog{border:1px solid #bdcdcb;border-radius:12px;padding:24px;width:min(92vw,440px);color:#123a42}
dialog::backdrop{background:#112e3baa}dialog label{margin:12px 0}#actionerror{color:#93291d}
@media(max-width:760px){.caplayout{grid-template-columns:1fr}.history summary>*{margin-right:6px}}


#sheet article>.bar{flex-wrap:wrap}.qty-control input{width:95px}
