.dk-tool{--a:#83ADB2;--ink:#0b0b0b;--mut:#5b6b6e;--line:#d9e2e4;--bg:#f3f6f6;--stage:#e4ebed;--err:#b3261e}
.dk-tool,.dk-tool *{box-sizing:border-box}
.dk-tool{margin:0;font:16px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--ink);background:#fff;padding-bottom:84px}
.dk-tool button,.dk-tool input,.dk-tool select{font:inherit;color:inherit}
.dk-tool :focus-visible{outline:3px solid #000;outline-offset:2px;box-shadow:0 0 0 5px #fff}
.dk-tool .app{max-width:1240px;margin:0 auto;padding:16px;display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,1fr);gap:20px}
@media(max-width:900px){.dk-tool .app{grid-template-columns:1fr;padding:10px}
}
.dk-tool .toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-bottom:8px}
.dk-tool .toolbar .sp{flex:1}
.dk-tool .btn{min-height:44px;min-width:44px;padding:8px 14px;border:1.5px solid var(--ink);border-radius:10px;background:#fff;cursor:pointer;font-weight:600}
.dk-tool .btn:hover:not(:disabled){background:var(--bg)}
.dk-tool .btn:disabled{opacity:.4;cursor:not-allowed}
.dk-tool .btn.pri{background:var(--a);border-color:var(--ink);color:#000}
.dk-tool .btn.pri:hover:not(:disabled){background:#97bcc0}
.dk-tool .stage{position:relative;background:var(--stage);border-radius:14px;min-height:320px;max-height:70vh;overflow:auto;display:flex;touch-action:pan-x pan-y}
.dk-tool .stage canvas{margin:auto;display:block;touch-action:none;cursor:grab;max-width:none}
.dk-tool .stage canvas:active{cursor:grabbing}
.dk-tool .empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;padding:20px;pointer-events:none}
.dk-tool .empty .btn{pointer-events:auto}
.dk-tool .empty p{margin:0;max-width:34ch;font-weight:600}
.dk-tool .empty small{color:var(--mut)}
.dk-tool .stage.drag{outline:3px dashed var(--a);outline-offset:-8px}
.dk-tool .busy{position:absolute;inset:0;background:rgba(255,255,255,.75);display:none;align-items:center;justify-content:center;gap:12px;font-weight:600}
.dk-tool .busy.on{display:flex}
.dk-tool .spin{width:22px;height:22px;border:3px solid var(--line);border-top-color:#000;border-radius:50%;animation:s 0.8s linear infinite}
@keyframes s{to{transform:rotate(360deg)}}
.dk-tool .legend{display:flex;flex-wrap:wrap;gap:6px 16px;font-size:13px;color:var(--mut);margin:8px 2px}
.dk-tool [hidden]{display:none!important}
.dk-tool .legend i{display:inline-block;width:18px;border-top:2px dashed;vertical-align:middle;margin-right:4px}
.dk-tool .msg{margin:8px 0;padding:10px 12px;border-radius:10px;font-size:14px}
.dk-tool .msg.err{background:#fdecea;color:var(--err);border:1px solid #f3b9b4}
.dk-tool .msg.warn{background:#fff6e0;border:1px solid #f0d58a}
.dk-tool .msg.ok{background:#eaf4f5;border:1px solid var(--a)}
.dk-tool .msg:empty{display:none}
.dk-tool .panel section{border:1px solid var(--line);border-radius:14px;padding:14px;margin-bottom:12px;background:#fff}
.dk-tool .panel h2{font-size:16px;margin:0 0 10px;display:flex;gap:8px;align-items:center}
.dk-tool .panel h2 span.n{background:#000;color:#fff;border-radius:50%;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;font-size:13px}
.dk-tool .row{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0}
.dk-tool .seg{position:relative;flex:1 1 110px}
.dk-tool .seg input{position:absolute;opacity:0;inset:0;cursor:pointer}
.dk-tool .seg .sl{display:flex;flex-direction:column;align-items:center;gap:2px;text-align:center;padding:10px 6px;border:1.5px solid var(--line);border-radius:10px;min-height:56px;justify-content:center;background:#fff}
.dk-tool .seg .sl svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8}
.dk-tool .seg .sl small{font-size:11px;color:var(--mut);font-weight:400}
.dk-tool .seg input:checked+.sl{border-color:#000;background:var(--a);color:#000;box-shadow:inset 0 0 0 1px #000}
.dk-tool .seg input:checked+.sl small{color:#000}
.dk-tool .seg input:focus-visible+.sl{outline:3px solid #000;outline-offset:2px}
.dk-tool .seg.dis{opacity:.45}
.dk-tool .seg.dis input{cursor:not-allowed}
.dk-tool .seg.q{flex:0 0 auto;min-width:54px}
.dk-tool label.f{display:flex;flex-direction:column;gap:4px;font-size:14px;font-weight:600;flex:1 1 140px}
.dk-tool label.f.c{flex-direction:row;align-items:center;gap:10px;font-weight:500;min-height:44px}
.dk-tool label.f.c input{width:22px;height:22px;accent-color:#000}
.dk-tool select,.dk-tool input[type=number]{min-height:44px;padding:6px 10px;border:1.5px solid var(--line);border-radius:10px;background:#fff;width:100%}
.dk-tool input[type=range]{width:100%;height:44px;accent-color:#000}
.dk-tool .hint{font-size:13px;color:var(--mut);margin:4px 0}
.dk-tool .file{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;font-size:14px}
.dk-tool details{margin-top:6px}
.dk-tool summary{cursor:pointer;font-weight:600;min-height:44px;display:flex;align-items:center}
.dk-tool .sheetwrap{margin-top:14px}
.dk-tool .sheetwrap canvas{display:block;margin:8px auto;background:var(--stage);border-radius:10px;max-width:100%}
.dk-tool .stats{font-size:14px}
.dk-tool .stats b{font-weight:700}
.dk-tool dl.sum{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin:0;font-size:14px}
.dk-tool dl.sum dt{color:var(--mut)}
.dk-tool dl.sum dd{margin:0;font-weight:600}
.dk-tool .bar{position:fixed;left:0;right:0;bottom:0;background:#000;color:#fff;padding:10px 16px;display:flex;gap:16px;align-items:center;justify-content:space-between;z-index:5}
.dk-tool .bar small{display:block;color:#c9d6d8;font-size:12px}
.dk-tool .bar strong{font-size:20px}
.dk-tool .bar .btn{background:var(--a);color:#000;border-color:var(--a);padding:10px 22px}
.dk-tool .sr{position:absolute;left:-9999px}
.dk-tool dialog#rev{border:2px solid #000;border-radius:14px;padding:18px;max-width:560px;width:calc(100% - 24px)}
.dk-tool dialog#rev::backdrop{background:rgba(0,0,0,.55)}
.dk-tool #revcv{display:block;margin:6px auto 10px;max-width:100%;background:var(--stage);border-radius:10px}
.dk-tool .szlabel{font-size:14px;font-weight:600}
.dk-tool .seg.sz{flex:0 0 auto;min-width:72px}
.dk-tool .seg.sz.wide{min-width:120px}
.dk-tool #customRow .x{align-self:flex-end;padding-bottom:12px;font-weight:700}
.dk-tool #customRow input{width:100%}
.dk-tool .sizebig{font-size:20px;font-weight:700;margin:6px 0 2px}

.dk-tool *{scroll-margin-top:var(--dk-offset,130px)}

body:not(.dk-admin) .dk-tool .dk-adminonly,body:not(.dk-admin) .dk-tool #prodMsg.ok{display:none!important}
@media(max-width:900px){
.dk-tool .toolbar{flex-wrap:nowrap;gap:6px;margin-bottom:6px}
.dk-tool .toolbar .btn{padding:6px 10px;font-size:14px;flex:1}
.dk-tool .toolbar #zout,.dk-tool .toolbar #zin,.dk-tool .toolbar #viewLbl,.dk-tool .toolbar #zfit,.dk-tool .toolbar #zmode,.dk-tool .toolbar .sp{display:none}
.dk-tool .stage{min-height:230px;max-height:44vh}
.dk-tool .app>div>.hint:not(#sizeLive):not(#contourNote2){display:none}
.dk-tool .legend{display:none}
.dk-tool .panel section{padding:12px}
.dk-tool .panel h2{margin-bottom:8px}
}
@media(max-width:900px){
.dk-tool [data-seg=shape]{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.dk-tool [data-seg=shape] button{min-height:52px;padding:6px 4px;font-size:14px;width:100%;margin:0}
.dk-tool [data-seg=shape] button small,.dk-tool [data-seg=shape] button svg{display:none}
.dk-tool [data-seg=shape] button:last-child{grid-column:span 3}
.dk-tool [data-seg=shape] button:last-child small{display:block}
}
.dk-tool details.mo{margin:6px 0}
.dk-tool details.mo>summary{cursor:pointer;font-weight:600;min-height:44px;display:flex;align-items:center}
@media(max-width:900px){
#modeHint{display:none}
.dk-tool section[aria-labelledby=h3] .hint,.dk-tool section[aria-labelledby=h4] .hint,.dk-tool #sizeNote{display:none}
.dk-tool section[aria-labelledby=h5]{display:none}
}
.cookie-preferences-button{bottom:92px!important}
.dk-tool details.mo>summary::after{content:"▾";margin-left:8px}.dk-tool details.mo[open]>summary::after{content:"▴"}
