/* IRIS_SKETCH_V1 + IRIS_REGION_EDIT_V1 modals */
.irt-bg { position: fixed; inset: 0; z-index: 10050; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.irt-modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg-1); color: var(--tx); border: 1px solid var(--brd-2); border-radius: var(--r-lg, 16px); box-shadow: var(--sh-lg); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.irt-modal.irt-wide { width: min(860px, 100%); }
.irt-head { display: flex; align-items: center; justify-content: space-between; }
.irt-title { font-weight: 600; font-size: 1rem; }
.irt-x { appearance: none; border: 0; background: none; color: var(--tx-3); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.irt-x:hover { color: var(--tx); background: var(--bg-2); }
.irt-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.irt-group { display: flex; gap: 4px; align-items: center; }
.irt-right { margin-left: auto; }
.irt-tool { appearance: none; border: 1px solid var(--brd-2); background: var(--bg-2); color: var(--tx-2); font: inherit; font-size: .8rem; border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.irt-tool.is-on { color: var(--tx); border-color: var(--tx-3); background: var(--bg-3); }
.irt-sw { appearance: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.irt-sw.is-on { border-color: var(--tx); }
.irt-size { appearance: none; width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--brd-2); background: var(--bg-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.irt-size span { display: block; border-radius: 50%; background: var(--tx-2); }
.irt-size.is-on { border-color: var(--tx-3); background: var(--bg-3); }
.irt-select { border: 1px solid var(--brd-2); background: var(--bg-2); color: var(--tx); font: inherit; font-size: .8rem; border-radius: 8px; padding: 5px 8px; }
.irt-canvas-wrap { display: flex; justify-content: center; background: var(--bg-2); border-radius: 12px; padding: 10px; }
.irt-canvas { display: block; max-width: 100%; max-height: 56vh; width: auto; height: auto; background: #fff; border-radius: 6px; touch-action: none; cursor: crosshair; box-shadow: 0 0 0 1px var(--brd-2); }
.irt-desc, .irt-note { width: 100%; box-sizing: border-box; border: 1px solid var(--brd-2); background: var(--bg-2); color: var(--tx); font: inherit; font-size: .9rem; border-radius: 10px; padding: 9px 11px; resize: vertical; outline: none; }
.irt-desc:focus, .irt-note:focus, .irt-pin-in:focus { border-color: var(--ac); }
.irt-foot { display: flex; justify-content: flex-end; gap: 8px; }
.irt-btn { appearance: none; border: 1px solid var(--brd-2); background: var(--bg-2); color: var(--tx); font: inherit; font-size: .88rem; border-radius: 10px; padding: 8px 16px; cursor: pointer; }
.irt-btn:hover { background: var(--bg-3); }
.irt-btn.irt-primary { background: var(--tx); color: var(--bg-1); border-color: var(--tx); }
.irt-btn:disabled { opacity: .5; cursor: default; }
.irt-tool:focus-visible, .irt-sw:focus-visible, .irt-size:focus-visible, .irt-btn:focus-visible, .irt-x:focus-visible, .irt-pin-x:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.irt-hint { font-size: .82rem; color: var(--tx-3); }
.irt-region { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: start; }
@media (max-width: 680px) { .irt-region { grid-template-columns: 1fr; } }
.irt-stage { position: relative; display: inline-block; justify-self: center; line-height: 0; }
.irt-img { display: block; max-width: 100%; max-height: 58vh; border-radius: 10px; cursor: crosshair; user-select: none; }
.irt-pin { position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #111; font: 600 12px/24px var(--font-b, system-ui); text-align: center; box-shadow: 0 0 0 2px #111, 0 2px 8px rgba(0,0,0,.35); pointer-events: none; }
.irt-pins { display: flex; flex-direction: column; gap: 8px; }
.irt-pins:empty { display: none; }
.irt-pin-row { display: flex; gap: 8px; align-items: center; }
.irt-pin-n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #111; font: 600 11px/22px var(--font-b, system-ui); text-align: center; box-shadow: 0 0 0 2px #111; }
.irt-pin-in { flex: 1; min-width: 0; border: 1px solid var(--brd-2); background: var(--bg-2); color: var(--tx); font: inherit; font-size: .85rem; border-radius: 8px; padding: 7px 9px; outline: none; }
.irt-pin-x { appearance: none; border: 0; background: none; color: var(--tx-3); font: inherit; font-size: .76rem; cursor: pointer; padding: 4px; }
.irt-pin-x:hover { color: var(--red, #ef4444); }
.img-gen-dd .irt-sketch-btn { margin-top: 6px; width: 100%; }
