.ir,.ir-editor{min-width:0}.ir{display:grid;gap:14px;grid-template-columns:minmax(0,1fr)}
.ir-drop{min-height:220px;border:2px dashed var(--blue);border-radius:14px;background:var(--panel2);color:var(--ink);font:inherit;cursor:pointer}
.ir-drop.drag,.ir-drop:hover{border-color:var(--yellow)}
.ir-err{margin:0;color:#ff8a8a}
.ir-editor{display:grid;gap:14px;grid-template-columns:minmax(0,1fr)}
.ir-stagewrap{display:flex;justify-content:center;padding:22px;background:var(--bg);border:1px solid var(--line);border-radius:12px;overflow:hidden}
.ir-stage{position:relative;touch-action:none;user-select:none}
.ir-stage canvas{display:block}
.ir-crop{position:absolute;box-shadow:0 0 0 9999px rgba(0,0,0,.6);border:2px solid var(--yellow);cursor:move;touch-action:none;background:linear-gradient(90deg,transparent 33%,rgba(255,255,255,.35) 33% calc(33% + 1px),transparent calc(33% + 1px) 66%,rgba(255,255,255,.35) 66% calc(66% + 1px),transparent calc(66% + 1px)),linear-gradient(0deg,transparent 33%,rgba(255,255,255,.35) 33% calc(33% + 1px),transparent calc(33% + 1px) 66%,rgba(255,255,255,.35) 66% calc(66% + 1px),transparent calc(66% + 1px))}
.ir-stagewrap{clip-path:inset(0)}
.ir-crop:focus-visible,.ir button:focus-visible,.ir input:focus-visible,.ir select:focus-visible{outline:3px solid #fff;outline-offset:2px}
.ir-crop .h{position:absolute;width:44px;height:44px;margin:-22px 0 0 -22px;touch-action:none}
.ir-crop .h::after{content:"";position:absolute;left:50%;top:50%;width:14px;height:14px;margin:-7px;background:var(--yellow);border-radius:3px}
.h[data-h=nw]{left:0;top:0;cursor:nwse-resize}.h[data-h=n]{left:50%;top:0;cursor:ns-resize}.h[data-h=ne]{left:100%;top:0;cursor:nesw-resize}.h[data-h=e]{left:100%;top:50%;cursor:ew-resize}.h[data-h=se]{left:100%;top:100%;cursor:nwse-resize}.h[data-h=s]{left:50%;top:100%;cursor:ns-resize}.h[data-h=sw]{left:0;top:100%;cursor:nesw-resize}.h[data-h=w]{left:0;top:50%;cursor:ew-resize}
.ir-bar,.ir-group,.ir-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.ir button,.ir select,.ir input[type=number]{min-height:44px;padding:8px 14px;border:1px solid var(--line);border-radius:10px;background:var(--panel2);color:var(--ink);font:inherit;cursor:pointer}
.ir input[type=number]{width:96px;cursor:text}
.ir button[aria-pressed=true]{background:var(--yellow);color:var(--yellow-ink);border-color:var(--yellow)}
.ir .wg-btn-primary{background:var(--yellow);color:var(--yellow-ink);border-color:var(--yellow)}
.ir label{display:flex;align-items:center;gap:8px;color:var(--muted)}
.ir input[type=range]{width:min(360px,60vw);min-height:44px;accent-color:var(--yellow)}
.ir-chk{min-height:44px}.ir-chk input{width:22px;height:22px;accent-color:var(--yellow)}
.ir-result{display:flex;flex-wrap:wrap;gap:14px;align-items:flex-start;padding-top:12px;border-top:1px solid var(--line)}
.ir-result img{max-width:100%;max-height:300px;border:1px solid var(--line);border-radius:10px;background:repeating-conic-gradient(#222 0 25%,#333 0 50%) 0 0/16px 16px}
.ir-result p{margin:0 0 10px;color:var(--muted)}
@media(max-width:480px){.ir-stagewrap{padding:22px 10px}}
