/* ---- image-batch (shared look across image tools) ---- */
.ib-drop{padding:30px 16px}
.ib-drop span{font-size:14px}
.ib-ico{width:48px;height:48px;margin:0 auto 10px;border-radius:14px;background:var(--brand-soft);color:var(--brand);display:grid;place-items:center}
.ib-list{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.ib-item{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface)}
.ib-item.sel{border-color:var(--brand);box-shadow:0 0 0 2px var(--brand-soft)}
.ib-thumb{width:56px;height:56px;border-radius:8px;flex:none;background:var(--surface-2);display:block;overflow:hidden;border:0;padding:0;cursor:pointer}
.ib-thumb canvas{width:100%;height:100%;display:block}
.ib-meta{flex:1;min-width:0}
.ib-name{display:block;font-weight:600;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ib-info{font-size:13px;color:var(--muted);display:flex;flex-wrap:wrap;gap:2px 8px;align-items:center;margin-top:2px;font-variant-numeric:tabular-nums}
.ib-info>span{white-space:nowrap}
.ib-info .ib-err{color:var(--bad);white-space:normal}
.ib-acts{display:flex;gap:4px;align-items:center;flex:none}
.ib-x{width:34px;height:34px;border:0;background:transparent;color:var(--faint);border-radius:8px;cursor:pointer;font-size:22px;line-height:1;flex:none;display:grid;place-items:center}
.ib-x:hover{background:var(--surface-2);color:var(--bad)}
.ib-bar{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.ib-bar .btn-primary{flex:1 1 200px}
.ib-spin{width:22px;height:22px;margin:17px;border-radius:50%;border:3px solid var(--border);border-top-color:var(--brand);animation:ib-spin .8s linear infinite}
@keyframes ib-spin{to{transform:rotate(360deg)}}
.ib-val{float:right;color:var(--brand);font-weight:700;font-variant-numeric:tabular-nums}
.ib-stats{grid-template-columns:repeat(3,minmax(0,1fr))}
@media (max-width:480px){.ib-stats{gap:8px}.ib-stats .stat{padding:10px}.ib-stats .stat b{font-size:17px}.ib-stats .stat span{font-size:12px}}
/* ---- end image-batch ---- */
#cr-ratios .chip{min-height:36px}
.cr-wrap{position:relative;width:fit-content;max-width:100%;margin-left:auto;margin-right:auto;overflow:hidden;touch-action:none;user-select:none;-webkit-user-select:none;line-height:0;border-radius:6px;background:repeating-conic-gradient(var(--surface-2) 0 25%,var(--surface) 0 50%) 0 0/16px 16px}
.cr-wrap canvas{display:block;max-width:100%;max-height:min(62vh,560px);width:auto;height:auto}
.cr-box{position:absolute;box-shadow:0 0 0 9999px rgba(10,12,20,.55);outline:2px solid #fff;cursor:move}
.cr-box:focus-visible{outline-color:var(--brand)}
.cr-box::before,.cr-box::after{content:"";position:absolute;pointer-events:none;border:0 solid rgba(255,255,255,.55)}
.cr-box::before{inset:0 33.33%;border-left-width:1px;border-right-width:1px}
.cr-box::after{inset:33.33% 0;border-top-width:1px;border-bottom-width:1px}
.cr-h{position:absolute;width:34px;height:34px;margin:-17px 0 0 -17px;z-index:1}
.cr-h::after{content:"";position:absolute;left:11px;top:11px;width:12px;height:12px;background:#fff;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.35)}
.cr-h[data-h=nw]{left:0;top:0;cursor:nwse-resize}.cr-h[data-h=n]{left:50%;top:0;cursor:ns-resize}.cr-h[data-h=ne]{left:100%;top:0;cursor:nesw-resize}
.cr-h[data-h=e]{left:100%;top:50%;cursor:ew-resize}.cr-h[data-h=se]{left:100%;top:100%;cursor:nwse-resize}.cr-h[data-h=s]{left:50%;top:100%;cursor:ns-resize}
.cr-h[data-h=sw]{left:0;top:100%;cursor:nesw-resize}.cr-h[data-h=w]{left:0;top:50%;cursor:ew-resize}
.cr-tools{display:flex;flex-wrap:wrap;gap:6px;justify-content:center}
.cr-tools .btn{flex:1 1 auto}
.cr-size{text-align:center;margin:10px 0 0;font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums}
.cr-size b{color:var(--text)}
#cr-edit{scroll-margin-top:110px}
