.fx-speller { display: grid; }
.fx-speller .fx-body { display: grid; gap: 16px; min-width: 0; color: var(--fx-ink); font-size: 16px; line-height: 1.5; }
.fx-speller .fx-steps { margin: 0; padding-left: 24px; }
.fx-speller .fx-steps li + li { margin-top: 6px; }
.fx-speller .fx-goal, .fx-speller .fx-caution { margin: 0; }
.fx-speller .fx-machine { display: grid; gap: 16px; min-width: 0; padding: 16px; border: 2px solid var(--fx-ink); border-radius: 20px; background: var(--fx-sun-pale); }
.fx-speller .fx-switches { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fx-speller .fx-control { min-width: 0; margin: 0; padding: 0; border: 0; }
.fx-speller .fx-control legend { padding: 0; margin-bottom: 10px; font-size: 16px; font-weight: 800; line-height: 1.4; }
.fx-speller .fx-switch { display: flex; align-items: center; justify-content: center; gap: 12px; box-sizing: border-box; width: 100%; min-height: 58px; padding: 12px; border: 2px solid var(--fx-ink); border-radius: 12px; background: var(--fx-paper); color: var(--fx-ink); cursor: pointer; }
.fx-speller .fx-switch:has(input:checked) { background: var(--fx-mint-pale); color: var(--fx-ink); }
.fx-speller .fx-switch:has(input:focus-visible) { outline: 3px solid var(--fx-ink); outline-offset: 3px; }
.fx-speller .fx-track { position: relative; display: inline-block; flex: 0 0 60px; width: 60px; height: 30px; box-sizing: border-box; border: 2px solid var(--fx-ink); border-radius: 18px; background: var(--fx-paper); }
.fx-speller .fx-lever { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--fx-ink); transition: transform 0.35s; }
.fx-speller .fx-switch:has(input:checked) .fx-lever { transform: translateX(30px); }
.fx-speller .fx-hint { display: block; min-height: 24px; margin-top: 6px; text-align: center; font-size: 14px; font-weight: 700; }
.fx-speller .fx-output { display: grid; grid-template-rows: 22px 128px 22px 44px 24px; align-content: center; justify-items: center; gap: 8px; box-sizing: border-box; height: 320px; min-width: 0; padding: 12px; overflow: hidden; }
.fx-speller .fx-part { font-size: 14px; line-height: 22px; }
.fx-speller .fx-window { width: 128px; height: 128px; perspective: 650px; }
.fx-speller .fx-tile { position: relative; width: 128px; height: 128px; transform-style: preserve-3d; transform: rotateY(0deg); transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1); }
.fx-speller .fx-face { position: absolute; inset: 0; display: grid; place-items: center; box-sizing: border-box; border: 3px solid var(--fx-ink); border-radius: 12px; backface-visibility: hidden; font-size: 58px; font-weight: 900; line-height: 1; }
.fx-speller .fx-front { background: var(--fx-mint); transform: translateZ(1px); }
.fx-speller .fx-back { background: var(--fx-paper); transform: rotateY(180deg) translateZ(1px); }
.fx-speller .fx-panel { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 8px; }
.fx-speller .fx-panel.fx-after { background: var(--fx-sky); }
.fx-speller .fx-off-face { position: relative; background: var(--fx-paper); }
.fx-speller .fx-off-face::before { content: ""; position: absolute; inset: 0; border-radius: 8px; background: var(--fx-muted); opacity: 0.18; }
.fx-speller .fx-mark { position: relative; }
.fx-speller:has(#fx-speller-bee:checked):has(#fx-speller-c:checked) .fx-tile { transform: rotateY(180deg); }
.fx-speller:not(:has(#fx-speller-bee:checked)) .fx-tile { transform: rotateY(-180deg); }
.fx-speller .fx-word-stack { display: grid; justify-items: center; width: 100%; height: 44px; min-width: 0; }
.fx-speller .fx-word-window { width: 100%; height: 44px; overflow: hidden; }
.fx-speller .fx-word { height: 44px; font-size: 24px; font-weight: 700; line-height: 44px; text-align: center; white-space: nowrap; }
.fx-speller .fx-word strong { padding: 0 2px; border-radius: 4px; background: var(--fx-mint-pale); }
.fx-speller .fx-word.fx-after strong { background: var(--fx-sky-pale); }
.fx-speller .fx-grey-word strong { background: var(--fx-paper); color: var(--fx-muted); }
.fx-speller:has(#fx-speller-bee:checked):not(:has(#fx-speller-c:checked)) .fx-belt { animation: fx-speller-words 9s steps(3) 1 both; }
@keyframes fx-speller-words { from { transform: translateY(0); } to { transform: translateY(-132px); } }
.fx-speller .fx-light-row { display: grid; justify-items: center; width: 100%; height: 24px; }
.fx-speller .fx-rule-light { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 800; }
.fx-speller .fx-lamp { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--fx-ink); border-radius: 50%; background: var(--fx-sun); }
.fx-speller .fx-message-stack { display: grid; min-width: 0; }
.fx-speller .fx-message-stack p { margin: 0; }
.fx-speller .fx-state { grid-area: 1 / 1; visibility: hidden; }
.fx-speller:has(#fx-speller-bee:checked):not(:has(#fx-speller-c:checked)) .fx-start, .fx-speller:has(#fx-speller-bee:checked):has(#fx-speller-c:checked) .fx-after, .fx-speller:not(:has(#fx-speller-bee:checked)):not(:has(#fx-speller-c:checked)) .fx-eight, .fx-speller:not(:has(#fx-speller-bee:checked)):has(#fx-speller-c:checked) .fx-science, .fx-speller:not(:has(#fx-speller-bee:checked)) .fx-off { visibility: visible; }
.fx-speller .fx-caution { padding: 12px; border-left: 4px solid var(--fx-sun); background: var(--fx-sun-pale); font-size: 14px; }
@container (max-width: 480px) { .fx-speller .fx-switches { grid-template-columns: minmax(0, 1fr); } .fx-speller .fx-machine { padding: 10px; } }
@media (prefers-reduced-motion: reduce) { .fx-speller .fx-tile, .fx-speller .fx-lever { transition: none; } .fx-speller .fx-belt { animation: none; } }