/* The canvas stays white in both app themes; it scrolls with the page. */
.v23-vision{position:relative;isolation:isolate;margin:0 0 24px;border:1px solid var(--border);border-radius:10px;overflow:hidden;background:#fff}
.v23-canvas{position:relative;width:100%;aspect-ratio:5/3;overflow:hidden;background:#fff;isolation:isolate;direction:ltr;--collage-scale:1}
.v23-piece{position:absolute;margin:0;box-sizing:border-box;color:#202020;outline-offset:2px}
.v23-image-window{position:relative;width:100%;height:100%;overflow:hidden}
.v23-image-window img{position:absolute;display:block;max-width:none;pointer-events:none;user-select:none}
.v23-image-window img.v23-image-unmeasured{position:static;width:100%;height:100%;object-fit:contain}
.v23-quote{width:100%;height:100%;display:flex;align-items:center;justify-content:center;text-align:center;white-space:pre-wrap;overflow-wrap:anywhere;overflow:hidden;padding:calc(10px * var(--collage-scale));font-size:calc(var(--quote-size) * 1px * var(--collage-scale));line-height:1.35;color:#202020;background:transparent;font-family:var(--font),sans-serif}
.v23-quote-bold{font-weight:800}.v23-quote-quote{font-family:Georgia,'Times New Roman',serif;font-style:italic}.v23-quote-plain{font-weight:400}
.v23-empty{position:absolute;inset:0;display:grid;place-content:center;color:#777;font-size:13px;text-align:center;padding:20px;pointer-events:none}.v23-empty button{pointer-events:auto;background:#fff!important;color:#333!important;border-color:#ddd!important}
.v23-vision:has(.v23-empty) .v23-canvas{aspect-ratio:auto;min-height:150px}
button.v23-edit-board{position:absolute;top:10px;left:10px;z-index:50;border-radius:50%;border:1px solid #ddd;background:#fff;color:#333;box-shadow:0 1px 6px #0002;width:32px;height:32px;padding:6px}
.modal.v23-modal{width:min(1160px,96vw);max-width:1160px;max-height:94dvh;overflow:auto}
#v23-editor,#v23-crop-editor{padding:0 22px 18px}
.v23-toolbar{display:flex;gap:8px;align-items:center;margin-bottom:14px;flex-wrap:wrap}.v23-toolbar .outline-btn{font-size:12px;padding:7px 12px}.v23-toolbar-space{flex:1}.v23-file-label{cursor:pointer}
.v23-workspace{display:grid;grid-template-columns:minmax(0,1fr) 200px;gap:16px;direction:ltr;align-items:start}.v23-stage{background:var(--surface-2);padding:12px;border-radius:8px;min-width:0;border:1px solid var(--border)}
.is-editable{outline:1px solid #ddd;touch-action:pan-y}.is-editable .v23-piece{cursor:grab;touch-action:none;user-select:none}.is-editable .v23-piece:active{cursor:grabbing}.is-editable .v23-piece.is-selected{outline:2px solid #536b86}.is-editable .v23-piece:focus-visible{outline:2px solid #536b86}
button.v23-resize{position:absolute;right:-5px;bottom:-5px;width:13px;height:13px;min-width:13px;min-height:13px;padding:0;border:2px solid #fff;background:#536b86;border-radius:2px;cursor:nwse-resize;touch-action:none;z-index:2}
#v23-tools{direction:rtl;font-size:12px;display:grid;gap:14px;min-width:0}#v23-tools label{display:grid;gap:5px}#v23-tools select,#v23-tools textarea{width:100%;min-width:0;font-size:12px;padding:7px}#v23-tools input[type=range]{width:100%;min-width:0;accent-color:var(--text)}.v23-piece-actions{display:flex;gap:4px;align-items:center;flex-wrap:wrap}.v23-piece-actions .chip-btn{font-size:11px;padding:4px 8px}.v23-piece-actions .ui-action{margin-inline-start:auto}.v23-text-style{display:grid;gap:12px}.v23-editor-hint{font-size:11px;color:var(--muted);margin:12px 0}.v23-pick-label select{max-height:36px}
.v23-crop-wrap{display:flex;align-items:center;justify-content:center;margin:15px 0;background:repeating-conic-gradient(#eee 0% 25%,#fff 0% 50%) 50% /16px 16px;border-radius:8px;padding:8px;overflow:hidden}
#v23-crop-source{position:relative;overflow:hidden;touch-action:none;user-select:none;cursor:crosshair;direction:ltr}#v23-crop-source>img{display:block;width:100%;height:auto;pointer-events:none}#v23-crop-selection{position:absolute;border:2px dashed #fff;outline:1px solid #222;box-shadow:0 0 0 2000px #0008;pointer-events:none}
.v23-crop-fields{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.v23-crop-fields label{font-size:11px;display:grid;gap:5px}.v23-crop-fields input{width:100%;min-width:0;direction:ltr}
@media(max-width:750px){.modal.v23-modal{width:98vw;max-height:96dvh}#v23-editor,#v23-crop-editor{padding:0 10px 12px}.v23-workspace{grid-template-columns:1fr;gap:12px}.v23-stage{padding:7px}#v23-tools{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}#v23-tools .field{grid-column:1/-1}.v23-toolbar{gap:5px}.v23-toolbar .outline-btn{font-size:11px;padding:6px 8px}.v23-toolbar .chip-btn{font-size:10px}.v23-editor-hint{font-size:10px}.v23-text-style{gap:6px}.v23-crop-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media print{button.v23-edit-board{display:none}}

/* v30.8.3: «قص ذكي» */
/* v30.8.3: board background colour */
.v23-bg{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}
.v23-bg>span{font-size:12px;color:var(--muted);margin-inline-end:2px}
.v23-bg-dot{width:22px;height:22px;border-radius:50%;border:1px solid color-mix(in srgb,var(--text) 25%,transparent);padding:0;cursor:pointer}
.v23-bg-dot[aria-pressed="true"]{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--text)}
.v23-bg-custom{position:relative;width:22px;height:22px;border-radius:50%;overflow:hidden;border:1px dashed var(--muted);cursor:pointer;background:conic-gradient(#e66,#ee6,#6e6,#6ee,#66e,#e6e,#e66)}
.v23-bg-custom input{position:absolute;inset:-6px;width:40px;height:40px;opacity:0;cursor:pointer}
/* v30.8.4: side handles (width / height alone) and the turning handle on the chosen piece */
.v23-piece{transform-origin:50% 50%}
.v23-edge{position:absolute;padding:0;min-width:0;min-height:0;border:2px solid #fff;background:#536b86;border-radius:3px;touch-action:none;z-index:2}
.v23-edge-x{right:-5px;top:50%;width:10px;height:26px;margin-top:-13px;cursor:ew-resize}
.v23-edge-y{bottom:-5px;left:50%;width:26px;height:10px;margin-left:-13px;cursor:ns-resize}
.v23-rotate{position:absolute;top:6px;left:50%;width:22px;height:22px;min-width:22px;min-height:22px;margin-left:-11px;padding:0;display:grid;place-items:center;border:2px solid #fff;border-radius:50%;background:#536b86;color:#fff;cursor:grab;touch-action:none;z-index:2;box-shadow:0 1px 3px rgba(0,0,0,.35)}
.v23-rotate:active{cursor:grabbing}
.v23-rot-label span{display:flex;justify-content:space-between;align-items:center}
.v23-rot-label b{font-weight:600;font-variant-numeric:tabular-nums;direction:ltr}
