.story-text-stage { overflow: hidden; }
.story-text-editor-element { cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; transition: none !important; }
.story-text-editor-element.is-moving-text { cursor: grabbing; }
.story-text-editor-element:focus { outline: none; }
.story-text-editor-element:focus-visible { outline: 1px dashed rgba(255,255,255,.8); outline-offset: 3px; }
.story-text-editor-selection { position: absolute; z-index: 9; inset: 0; overflow: visible; pointer-events: none; }
.story-text-editor-selection > svg { position: absolute; width: 100%; height: 100%; inset: 0; fill: none; stroke: rgba(255,255,255,.9); stroke-width: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.story-text-editor-selection > svg polygon { vector-effect: non-scaling-stroke; }
.story-text-handle { position: absolute; z-index: 2; display: grid; place-items: center; width: 10px; height: 10px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: #3f4650; transform: translate(-50%,-50%); pointer-events: auto; cursor: nwse-resize; touch-action: none; -webkit-tap-highlight-color: transparent; }
.story-text-handle::after { content: ""; width: 6px; height: 6px; border: 1px solid #fff; border-radius: 1px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.story-text-handle--ne, .story-text-handle--sw { cursor: nesw-resize; }
.story-text-corner-rotate { position: absolute; z-index: 1; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #fff; text-shadow: 0 1px 3px #151719; font: 22px/1 Arial,sans-serif !important; transform: translate(-50%,-50%); opacity: 0; pointer-events: auto; cursor: crosshair; cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M21 12a8 8 0 1 0 0 7M21 5v7h-7' fill='none' stroke='%23151719' stroke-width='5'/%3E%3Cpath d='M21 12a8 8 0 1 0 0 7M21 5v7h-7' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E") 14 14, crosshair; touch-action: none; transition: opacity .12s ease; }
.story-text-corner-rotate:hover, .story-text-corner-rotate:focus-visible, .story-text-corner-rotate.is-near-corner, .story-text-corner-rotate.is-active { opacity: 1; }
.story-text-corner-rotate:focus-visible { outline: 1px solid #fff; outline-offset: 1px; }
.story-text-handle:focus-visible { outline: 2px solid #c8d8ee; outline-offset: 2px; }
.story-text-guide { position: absolute; z-index: 2; pointer-events: none; background: #c3d8ed; box-shadow: 0 0 3px rgba(0,0,0,.3); }
.story-text-guide--x { top: 0; bottom: 0; width: 1px; }
.story-text-guide--y { left: 0; right: 0; height: 1px; }
.story-text-angle { position: absolute; z-index: 3; top: 64px; left: 50%; min-width: 40px; padding: 5px 9px; border-radius: 15px; background: rgba(20,23,29,.6); color: #fff; transform: translateX(-50%); text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; backdrop-filter: blur(8px); }
@media (pointer: coarse) { .story-text-handle { width: 24px; height: 24px; } .story-text-corner-rotate { opacity: 0 !important; pointer-events: none; } .story-text-corner-rotate:focus-visible { opacity: 1 !important; } }
@media (prefers-reduced-motion: reduce) { .story-text-corner-rotate { transition: none; } }
