.workspace-text-layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.workspace-text { position: absolute; pointer-events: auto; font-family: system-ui, sans-serif; line-height: 1.25; border: 1px solid transparent; background: transparent; }
.workspace-text-content, .workspace-text-editor { width: 100%; height: 100%; padding: 4px; margin: 0; font: inherit; color: inherit; line-height: inherit; white-space: pre-wrap; overflow-wrap: anywhere; overflow: hidden; text-align: start; }
.workspace-text-editor { display: block; resize: none; outline: none; border: 0; border-radius: 0; background: transparent; user-select: text; }
.workspace-text:hover, .workspace-text:focus-visible, .workspace-text.text-selected { border-color: var(--accent); outline: none; }
.text-move, .text-resize { display: none; position: absolute; padding: 0; border-radius: 3px; background: Canvas; color: CanvasText; touch-action: none; }
.text-move { left: -1px; top: -22px; width: 28px; height: 22px; cursor: move; font-size: 17px; }
.text-resize { right: -5px; bottom: -5px; width: 12px; height: 12px; cursor: nwse-resize; }
.workspace-text.text-selected .text-move, .workspace-text.text-selected .text-resize { display: block; }
.text-readonly .text-move, .text-readonly .text-resize { display: none !important; }
.text-tool-toggle { position: fixed; right: 80px; bottom: 20px; z-index: 6; font: bold 24px Georgia, serif; }
.workspace-text-toolbar { position: fixed; right: 20px; bottom: 82px; z-index: 7; display: flex; align-items: center; gap: 8px; max-width: calc(100vw - 40px); padding: 8px; border: 1px solid color-mix(in srgb, CanvasText 20%, transparent); border-radius: 8px; background: Canvas; color: CanvasText; font-size: 12px; }
.workspace-text-toolbar label { display: flex; align-items: center; gap: 4px; }
.workspace-text-toolbar input[type="number"] { width: 58px; padding: 4px; color: inherit; background: Canvas; border: 1px solid color-mix(in srgb, CanvasText 25%, transparent); }
.workspace-text-toolbar input[type="color"] { width: 32px; height: 28px; padding: 0; }
.workspace-text-toolbar button[aria-pressed="true"] { background: CanvasText; color: Canvas; }
#viewport.text-tool-active { cursor: text; }
