.text-box-surface{position:absolute;inset:0;width:100%;height:100%;outline:0;--text-ui-scale:1;touch-action:pan-x pan-y}
.text-box-layer{position:absolute;top:0;left:0;transform-origin:0 0;pointer-events:none}
.text-box-boundary{position:absolute;border:1px dashed #7b879c55;border-radius:3px;pointer-events:none;opacity:0;transition:opacity .15s}
.text-box-surface.has-selection .text-box-boundary,.text-box-surface.is-create-mode .text-box-boundary{opacity:1}
.text-box-surface.is-create-mode{cursor:crosshair;touch-action:none}
.text-box-surface .text-box{position:absolute;pointer-events:auto;cursor:move;touch-action:none;outline:calc(1px * var(--text-ui-scale)) solid transparent}
.text-box-surface .text-box.is-selected{outline-color:#6f7b8c}
.text-box-surface .text-box.is-editing{cursor:text;touch-action:pan-x pan-y}
.text-box-surface.is-disabled .text-box{pointer-events:none}
.text-box-input{position:absolute;top:0;left:0;padding:0;margin:0;border:0;border-radius:0;outline:0;resize:none;background:transparent;color:#1a1a1a;font-weight:400;line-height:1.5;white-space:pre-wrap;overflow-wrap:break-word;overflow:auto;scrollbar-width:thin;transform-origin:0 0;pointer-events:none}
.text-box.is-editing .text-box-input{pointer-events:auto;cursor:text;touch-action:pan-x pan-y;user-select:text;-webkit-user-select:text}
.text-box-surface .text-box-handle{display:none;position:absolute;z-index:2;width:24px;height:24px;padding:0;margin:0;border:0;border-radius:0;background:transparent;transform:translate(-50%,-50%) scale(var(--text-ui-scale));touch-action:none}
.text-box-handle::after{content:"";position:absolute;width:7px;height:7px;top:8.5px;left:8.5px;background:#fff;border:1px solid #6f7b8c;box-shadow:0 1px 3px #0000001a}
.text-box.is-selected .text-box-handle{display:block}
.text-box-handle.handle-nw{left:0;top:0;cursor:nwse-resize}.text-box-handle.handle-n{left:50%;top:0;cursor:ns-resize}.text-box-handle.handle-ne{left:100%;top:0;cursor:nesw-resize}.text-box-handle.handle-e{left:100%;top:50%;cursor:ew-resize}.text-box-handle.handle-se{left:100%;top:100%;cursor:nwse-resize}.text-box-handle.handle-s{left:50%;top:100%;cursor:ns-resize}.text-box-handle.handle-sw{left:0;top:100%;cursor:nesw-resize}.text-box-handle.handle-w{left:0;top:50%;cursor:ew-resize}
.text-box-toolbar{position:absolute;z-index:4;display:flex;gap:2px;align-items:center;padding:3px;background:#ffffffcc;border:1px solid #ffffffc9;border-radius:10px;backdrop-filter:blur(20px);box-shadow:0 3px 12px #0000001c;font-family:system-ui,sans-serif;color:#374151;pointer-events:auto}
.text-box-toolbar[hidden]{display:none}.text-box-toolbar button{padding:7px 9px;font-size:11px;line-height:16px;border:0;border-radius:6px;background:transparent;color:inherit;white-space:nowrap;touch-action:manipulation}.text-box-toolbar button:hover{background:#0000000a}.text-box-toolbar button[data-text-action=move]{cursor:move;touch-action:none}.text-box-toolbar button:focus-visible{outline:2px solid #6f7b8c;outline-offset:1px}
.text-box-surface .text-box-rotation-handle{position:absolute;z-index:5;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:transparent;transform:translate(-50%,-50%);cursor:grab;touch-action:none}
.text-box-rotation-handle::after{content:"";position:absolute;left:10px;top:10px;width:12px;height:12px;background:#fff;border:1px solid #6f7b8c;border-radius:50%}.text-box-rotation-handle:active{cursor:grabbing}.text-box-rotation-handle:focus-visible{outline:2px solid #6f7b8c;outline-offset:0}.text-box-rotation-handle[hidden]{display:none}
@media(any-pointer:coarse){.text-box-toolbar button{min-height:38px;padding:8px 10px}.text-box-toolbar{max-width:calc(100% - 8px)}.text-box-surface .text-box-handle{width:32px;height:32px}.text-box-handle::after{left:12.5px;top:12.5px}}
@media(prefers-reduced-motion:reduce){.text-box-boundary{transition:none}}
