/* Original Range advances own composition; glyph rotation never changes them. */
:root [data-language-motion] span:is(.language-motion-run, .language-motion-word, .language-motion-glyph, .language-motion-control-label) {
    all: unset;
    display: inline-block;
    min-width: 0;
    min-height: 0;
    color: inherit;
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
}
:root [data-language-motion] span.language-motion-word {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    vertical-align: baseline;
}
/* A run replaces one original anonymous text item, never one item per word. */
:root [data-language-motion] span.language-motion-run {
    display: inline;
    white-space: inherit;
    min-width: 0;
    min-height: 0;
    font: inherit;
    color: inherit;
    line-height: inherit;
    letter-spacing: inherit;
}
/* Font strut, no duplicate source text. Keeps the native baseline/line box. */
:root [data-language-motion] span.language-motion-word::before { content: '\200b'; }
:root [data-language-motion] span.language-motion-glyph {
    position: absolute;
    display: block;
    white-space: pre;
    transform-origin: 50% 60%;
    backface-visibility: hidden;
    will-change: transform;
}
@media (prefers-reduced-motion: reduce), print {
    :root [data-language-motion] span.language-motion-glyph {
        transform: none !important;
        will-change: auto;
    }
}

/* Preserve vertical shaping and the button's own hit area/background. */
:root [data-language-motion] span.language-motion-control-label {
    display: inline-block;
    writing-mode: inherit;
    white-space: inherit;
    vertical-align: baseline;
    transform-origin: 50% 50%;
    backface-visibility: hidden;
    will-change: transform;
}
@media (prefers-reduced-motion: reduce), print {
    :root [data-language-motion] span.language-motion-control-label {
        transform: none !important;
        will-change: auto;
    }
}
