/* Shared capture editor: selection tools above, completion below. */
.dd-capture-dialog{box-sizing:border-box;width:min(98vw,1540px);height:min(96dvh,1050px);max-width:none;max-height:96dvh;margin:auto;padding:0;border:1px solid #b9cce6;border-radius:16px;overflow:hidden;box-shadow:0 24px 80px #102b494d;color:#111;background:#fff;font-family:system-ui,-apple-system,'Malgun Gothic','Apple SD Gothic Neo',sans-serif}
.dd-capture-dialog[open]{display:flex;flex-direction:column}.dd-capture-dialog::backdrop{background:#102033b8}
.dd-capture-dialog *{box-sizing:border-box}.dd-capture-dialog button{font:inherit;cursor:pointer;transition:background .15s,border-color .15s}
.dd-capture-dialog button:focus-visible,.dd-capture-box:focus-visible{outline:3px solid #e0a223;outline-offset:3px}
.dd-capture-wrapper{height:100%;min-height:0;min-width:0;display:flex;flex:1;flex-direction:column;overflow:hidden}
.dd-capture-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 22px;background:#f4f7fd;border-bottom:1px solid #d6e0ef;flex:none}
.dd-capture-heading-text{min-width:0}.dd-capture-kicker{font-size:10px;letter-spacing:1.7px;color:#315b94;font-weight:800}
.dd-capture-header h2{margin:3px 0 5px;line-height:1.3;font-size:25px;font-weight:850;letter-spacing:-.5px;color:#152b4c}
.dd-capture-hint{margin:0;font-size:14px;font-weight:650;color:#111;line-height:1.45}
.dd-capture-header-right{display:flex;align-items:center;gap:14px;flex:none}.dd-capture-privacy{font-size:12px;color:#294e81;white-space:nowrap;font-weight:700}
.dd-capture-close{display:grid;place-items:center;width:38px;height:38px;border:1px solid #bfcfe5;border-radius:9px;background:#fff;color:#173c73;font-size:20px}
.dd-capture-close:hover{background:#e8effb}
.dd-capture-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:10px 20px;min-height:60px;flex:none;background:white}
.dd-capture-toolbar-tools,.dd-capture-toolbar-utility{display:flex;align-items:center;gap:8px;min-width:0}
.dd-capture-tool{min-height:40px;white-space:nowrap;padding:9px 14px;border-radius:8px;background:#fff;color:#173c73;border:1px solid #adc3e2;font-weight:800;font-size:14px}
.dd-capture-tool:hover{background:#edf3ff}.dd-capture-tool.is-active,.dd-capture-tool[aria-pressed="true"]{color:white;background:#245ec7;border-color:#245ec7}
.dd-capture-size{font-size:13px;font-weight:700;color:#111;white-space:nowrap;font-variant-numeric:tabular-nums;margin-left:7px}
.dd-capture-viewer{flex:1;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center;position:relative;margin:0 20px 14px;overflow:hidden;border-radius:10px;border:1px solid #ccd7e6;background:#edf1f6}
.dd-capture-stage{position:relative;flex:none;overflow:hidden;touch-action:none;cursor:crosshair;border:0;outline:1px solid #bdc9da;background:#fff;box-shadow:0 3px 18px #132c4826;user-select:none}
.dd-capture-image{display:block;width:100%;height:100%;object-fit:fill;pointer-events:none}
.dd-capture-box{position:absolute;border:2px solid #3478ed;outline:1px solid #ffffffd9;background:transparent;box-shadow:0 0 0 3000px #081a306b;cursor:move;touch-action:none}
.dd-capture-stage.drawing-new .dd-capture-box{cursor:crosshair;pointer-events:none}
.dd-capture-crosshair{display:none}
.dd-capture-selection-label{position:absolute;left:7px;top:7px;max-width:calc(100% - 14px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;pointer-events:none;border-radius:4px;padding:3px 7px;background:#245ec7;color:white;font-size:11px;font-weight:800}
.dd-capture-grip{position:absolute;width:19px;height:19px;border:2px solid #245ec7;border-radius:4px;background:white;box-shadow:0 1px 4px #102b4933}
.dd-capture-grip-nw{left:-10px;top:-10px;cursor:nwse-resize}.dd-capture-grip-n{left:50%;top:-10px;transform:translateX(-50%);cursor:ns-resize}.dd-capture-grip-ne{right:-10px;top:-10px;cursor:nesw-resize}.dd-capture-grip-e{right:-10px;top:50%;transform:translateY(-50%);cursor:ew-resize}.dd-capture-grip-se{right:-10px;bottom:-10px;cursor:nwse-resize}.dd-capture-grip-s{left:50%;bottom:-10px;transform:translateX(-50%);cursor:ns-resize}.dd-capture-grip-sw{left:-10px;bottom:-10px;cursor:nesw-resize}.dd-capture-grip-w{left:-10px;top:50%;transform:translateY(-50%);cursor:ew-resize}
.dd-capture-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:13px 20px;min-height:76px;border-top:1px solid #d6e0ef;background:#f8faff;flex:none}
.dd-capture-footer-secondary{flex:1;min-width:0}.dd-capture-footer-primary{display:flex;align-items:center;gap:10px;flex:none}
.dd-capture-status{font-size:14px;line-height:1.5;color:#111;font-weight:650;overflow-wrap:anywhere}.dd-capture-status.error{color:#a51e32}
.dd-capture-btn{min-height:42px;padding:10px 14px;border:1px solid #b8cbe5;border-radius:8px;font-size:14px;font-weight:800;white-space:nowrap;line-height:1.2}
.dd-capture-btn.secondary{background:white;color:#173c73}.dd-capture-btn.secondary:hover{background:#edf3ff}
.dd-capture-btn.quiet{background:white;color:#111;border-color:#bccbdd}.dd-capture-btn.quiet:hover{background:#e8effb}
.dd-capture-btn.primary{min-height:48px;padding:12px 24px;background:#245ec7;color:white;border-color:#245ec7;font-size:17px;box-shadow:none}.dd-capture-btn.primary:hover{background:#194dab}
.dd-capture-btn:disabled{opacity:.5;cursor:wait}.dd-capture-dialog [hidden]{display:none!important}
@media(max-width:850px){.dd-capture-dialog{width:99vw;height:98dvh;max-height:98dvh;border-radius:12px}.dd-capture-header{padding:12px 14px}.dd-capture-header h2{font-size:21px}.dd-capture-privacy{display:none}.dd-capture-toolbar{padding:9px 12px;gap:8px;flex-wrap:wrap}.dd-capture-size{font-size:12px}.dd-capture-viewer{margin:0 12px 10px}.dd-capture-footer{padding:11px 12px;gap:12px}.dd-capture-btn{padding:9px 11px;font-size:13px}.dd-capture-btn.primary{padding:12px 18px;font-size:16px}}
@media(max-width:570px){.dd-capture-hint{font-size:13px}.dd-capture-toolbar-tools{flex-wrap:wrap;gap:7px}.dd-capture-toolbar-utility{width:100%}.dd-capture-toolbar-utility .dd-capture-btn{flex:1}.dd-capture-tool{padding:8px 10px;font-size:13px}.dd-capture-size{margin-left:0;font-size:11px}.dd-capture-footer{flex-wrap:wrap}.dd-capture-footer-secondary{flex-basis:100%}.dd-capture-footer-primary{width:100%;justify-content:flex-end}.dd-capture-status{font-size:13px}}
@media(max-height:670px){.dd-capture-header{padding-top:9px;padding-bottom:9px}.dd-capture-kicker{display:none}.dd-capture-header h2{font-size:20px;margin-top:0}.dd-capture-hint{font-size:12px}.dd-capture-toolbar{min-height:48px;padding-top:6px;padding-bottom:6px}.dd-capture-footer{min-height:62px;padding-top:8px;padding-bottom:8px}}
@media(prefers-reduced-motion:reduce){.dd-capture-dialog button{transition:none}}

.dd-capture-viewer{overflow:auto;align-items:flex-start;justify-content:flex-start}.dd-capture-stage{margin:auto}
.dd-capture-selection-label{display:none}.dd-capture-zoom{display:flex;align-items:center;gap:5px}.dd-capture-zoom-value{min-width:44px;text-align:center;font-size:12px;color:#111;font-weight:750;white-space:nowrap}
.dd-capture-zoom .dd-capture-tool{padding:8px 11px}.dd-capture-toolbar{flex-wrap:wrap}.dd-capture-toolbar-utility{flex-wrap:wrap}
@media(max-width:850px){.dd-capture-toolbar-utility{width:100%;justify-content:space-between}}
