/* Image Crop: страницы с классом .t-kr на <body> (изолировано от остальных инструментов) */
.t-kr [hidden]{display:none!important}
.t-kr .sp-e{margin:6px 0 0;font-size:13px;color:var(--err);font-weight:600}.t-kr .sp-e:empty{display:none}
.t-kr [aria-invalid=true]{border-color:var(--err)!important}
.t-kr code{font-family:ui-monospace,"JetBrains Mono",Menlo,monospace;font-size:.88em;background:color-mix(in srgb,var(--ac) 10%,transparent);color:var(--ac);padding:1px 6px;border-radius:6px;overflow-wrap:break-word}
.t-kr .kr-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;align-items:start}
.t-kr .kr-left{min-width:0;display:grid;gap:14px}
.t-kr .kr-right{position:sticky;top:16px;border:1px solid var(--line);border-radius:14px;padding:14px;background:var(--card);display:grid;gap:12px;min-width:0}
.t-kr input[type=text],.t-kr select,.t-kr textarea{width:100%;font-size:15px;font-family:inherit;color:var(--tx);background:color-mix(in srgb,var(--bg) 35%,var(--card));border:1.5px solid var(--line);border-radius:10px;outline:0;box-sizing:border-box;padding:0 12px;height:44px;min-width:0}
.t-kr input[type=datetime-local]{height:44px;padding-top:0;padding-bottom:0}
.t-kr textarea{height:auto;padding:10px 12px;line-height:1.5;resize:vertical}
.t-kr input:focus,.t-kr select:focus,.t-kr textarea:focus{border-color:var(--ac);box-shadow:0 0 0 3px color-mix(in srgb,var(--ac) 20%,transparent)}
.t-kr .kr-ck{display:flex;gap:8px;align-items:center;font-weight:500}
.t-kr .kr-fa{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.t-kr .kr-set{border:1px solid var(--line);border-radius:12px;background:var(--card)}
.t-kr .kr-set>summary{cursor:pointer;padding:12px 14px;font-weight:700;font-size:14.5px;list-style:none;display:flex;justify-content:space-between;align-items:center}
.t-kr .kr-set>summary::-webkit-details-marker{display:none}
.t-kr .kr-set>summary::after{content:"+";font-size:20px;line-height:1;color:var(--mu)}
.t-kr .kr-set[open]>summary::after{content:"−"}
.t-kr .kr-sb{padding:2px 14px 14px;display:grid;gap:14px}
.t-kr .kr-row .lb{display:block;margin:0 0 6px}
.t-kr .kr-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.t-kr .kr-cl{display:flex;gap:8px;align-items:center}
.t-kr input[type=color]{width:44px;height:44px;padding:3px;border:1.5px solid var(--line);border-radius:10px;background:var(--card);cursor:pointer;flex:none}
.t-kr .kr-cl input[type=text]{min-width:0;flex:1 1 auto;width:100%}
.t-kr .kr-cl input[type=text]{font-family:ui-monospace,Menlo,monospace;text-transform:lowercase}
.t-kr input[type=range]{width:100%;accent-color:var(--ac2)}
.t-kr .kr-sg{display:flex;flex-wrap:wrap;gap:6px}
.t-kr .kr-sg button{font-family:inherit;font-size:13.5px;font-weight:600;padding:9px 13px;border-radius:9px;border:1.5px solid var(--line);background:var(--card);color:var(--mu);cursor:pointer}
.t-kr .kr-sg button[aria-pressed=true]{background:var(--navy);border-color:var(--navy);color:#fff}
.t-kr .kr-act{display:grid;gap:8px}
.t-kr .kr-act .btn{width:100%;justify-content:center;text-align:center}
.t-kr .kr-act .btn:disabled{opacity:.5;cursor:not-allowed}
/* блоки содержимого */
.t-kr table.kr-t{width:100%;border-collapse:collapse;font-size:14px}
.t-kr .kr-t th{background:var(--bg);text-align:left;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--mu);padding:9px 12px}
.t-kr .kr-t td{padding:9px 12px;border-top:1px solid var(--line);vertical-align:top}
.t-kr .tbw{overflow-x:auto;border:1px solid var(--line);border-radius:12px}
.t-kr .kr-lg2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.t-kr .kr-lg2>div{border:1px solid var(--line);border-radius:12px;padding:14px 16px}
.t-kr .kr-lg2 p{margin:4px 0 0;font-size:14px;color:var(--mu);line-height:1.5}
.t-kr .step,.t-kr .step>*{min-width:0}
.t-kr .step b{overflow-wrap:break-word}
@media(max-width:700px){
.t-kr .kr-cols{grid-template-columns:minmax(0,1fr)}
.t-kr .kr-lg2{grid-template-columns:minmax(0,1fr)}
.t-kr .kr-t{min-width:520px}
}
/* загрузка, список, итог */
.t-kr .kr-drop{display:grid;justify-items:center;gap:6px;text-align:center;padding:26px 18px;border:2px dashed var(--line);border-radius:14px;background:color-mix(in srgb,var(--bg) 35%,var(--card));cursor:pointer;transition:border-color .15s,background .15s}
.t-kr .kr-drop:hover,.t-kr .kr-drop.on{border-color:var(--ac);background:color-mix(in srgb,var(--ac) 7%,var(--card))}
.t-kr .kr-drop:focus-within{outline:2px solid var(--ac);outline-offset:2px}
.t-kr .kr-di{font-size:34px;line-height:1;opacity:.6}
.t-kr .kr-drop b{font-size:15.5px}
.t-kr .kr-drop small{color:var(--mu);font-size:12.5px;line-height:1.45}
/* настройки */
.t-kr .kr-chips{display:flex;flex-wrap:wrap;gap:6px}
.t-kr .kr-chip{font-family:inherit;font-size:12.5px;font-weight:600;padding:7px 11px;border-radius:99px;border:1.5px solid var(--line);background:var(--card);color:var(--mu);cursor:pointer}
.t-kr .kr-chip:hover{border-color:var(--ac2);color:var(--tx)}
.t-kr .kr-th2{margin:8px 0 0;font-size:13px;color:var(--mu);line-height:1.5}
.t-kr .kr-ck{display:flex;gap:8px;align-items:center;font-weight:500;font-size:14px;cursor:pointer}
.t-kr input[type=checkbox]{width:18px;height:18px;accent-color:var(--ac2);flex:none}
.t-kr input[type=checkbox]:disabled+*,.t-kr .kr-ck:has(:disabled){opacity:.5}
.t-kr .kr-note{margin:0;font-size:12.5px;color:var(--mu);line-height:1.5}
/* рамка обрезки */
.t-kr .kr-stagew{display:flex;justify-content:center;padding:10px;border-radius:14px;background:color-mix(in srgb,var(--bg) 45%,var(--card));border:1px solid var(--line)}
.t-kr .kr-stage{position:relative;line-height:0;touch-action:none;user-select:none;-webkit-user-select:none;cursor:crosshair;background:repeating-conic-gradient(#e3e7ee 0 25%,#fff 0 50%) 0 0/16px 16px;overflow:hidden;border-radius:4px;flex:none}
.t-kr .kr-stage canvas{width:100%;height:100%;display:block}
.t-kr .kr-box{position:absolute;box-shadow:0 0 0 9999px rgba(10,20,40,.58);outline:2px solid #fff;outline-offset:-1px;cursor:move;box-sizing:border-box}
.t-kr .kr-box:focus-visible{outline:3px solid var(--ac2)}
.t-kr .kr-box.circ{border-radius:50%}
.t-kr .kr-box.g3{background-image:linear-gradient(rgba(255,255,255,.55),rgba(255,255,255,.55)),linear-gradient(rgba(255,255,255,.55),rgba(255,255,255,.55)),linear-gradient(90deg,rgba(255,255,255,.55),rgba(255,255,255,.55)),linear-gradient(90deg,rgba(255,255,255,.55),rgba(255,255,255,.55));background-size:100% 1px,100% 1px,1px 100%,1px 100%;background-position:0 33.333%,0 66.666%,33.333% 0,66.666% 0;background-repeat:no-repeat}
.t-kr .kr-hd{position:absolute;width:14px;height:14px;background:#fff;border:2px solid var(--ac2);border-radius:4px;box-sizing:border-box;margin:-7px 0 0 -7px}
.t-kr .kr-hd::after{content:"";position:absolute;inset:-12px}
.t-kr .kr-h-nw{left:0;top:0;cursor:nwse-resize}.t-kr .kr-h-n{left:50%;top:0;cursor:ns-resize}.t-kr .kr-h-ne{left:100%;top:0;cursor:nesw-resize}
.t-kr .kr-h-e{left:100%;top:50%;cursor:ew-resize}.t-kr .kr-h-se{left:100%;top:100%;cursor:nwse-resize}.t-kr .kr-h-s{left:50%;top:100%;cursor:ns-resize}
.t-kr .kr-h-sw{left:0;top:100%;cursor:nesw-resize}.t-kr .kr-h-w{left:0;top:50%;cursor:ew-resize}
.t-kr .kr-box.circ .kr-hd{border-radius:50%}
.t-kr .kr-tip{margin:8px 2px 0;font-size:12.5px;color:var(--mu);line-height:1.5}
.t-kr .kr-tip #kr-fname{font-weight:700;color:var(--tx);overflow-wrap:break-word}
.t-kr #kr-work{display:grid;gap:14px}
.t-kr .kr-n4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.t-kr .kr-n4 .lb{display:block;margin:0 0 6px}
.t-kr .kr-btns{display:flex;flex-wrap:wrap;gap:8px}
.t-kr .kr-cust{display:flex;align-items:center;gap:8px;margin-top:10px;max-width:220px}
.t-kr .kr-cust span{font-weight:700;color:var(--mu)}
.t-kr .kr-chips{display:flex;flex-wrap:wrap;gap:6px}
.t-kr .kr-chip[aria-pressed=true]{background:var(--navy);border-color:var(--navy);color:#fff}
.t-kr .kr-pv{border:1px solid var(--line);border-radius:12px;display:grid;place-items:center;padding:8px;background:repeating-conic-gradient(#e3e7ee 0 25%,#fff 0 50%) 0 0/14px 14px;min-height:120px}
.t-kr .kr-pv canvas{max-width:100%;max-height:260px;display:block}
.t-kr .kr-info{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 12px;margin:0;font-size:13px}
.t-kr .kr-info dt{color:var(--mu);font-weight:600}.t-kr .kr-info dd{margin:0;text-align:right;font-weight:700;overflow-wrap:break-word}
.t-kr #kr-res{display:grid;gap:12px}
.t-kr .kr-empty{text-align:center;padding:18px 10px;color:var(--mu)}
.t-kr .kr-empty span{font-size:42px;line-height:1;display:block;opacity:.35;margin-bottom:8px}
.t-kr .kr-empty p{margin:0;font-size:13.5px;line-height:1.5}
@media(max-width:900px){.t-kr .kr-grid{grid-template-columns:minmax(0,1fr)}.t-kr .kr-right{position:static}}
@media(max-width:700px){.t-kr .kr-n4{grid-template-columns:repeat(2,minmax(0,1fr))}}
