.fx-snap { --fx-turn: 0deg; --fx-row-gap: 0px; --fx-column-gap: 0px; display: grid; gap: 14px; }
.fx-snap:has(#fx-snap-short:checked) { --fx-turn: 90deg; }
.fx-snap:has(#fx-snap-long:checked):has(#fx-snap-break:checked) { --fx-row-gap: 16px; }
.fx-snap:has(#fx-snap-short:checked):has(#fx-snap-break:checked) { --fx-column-gap: 9px; }
.fx-snap .fx-snap-steps { margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.6; }
.fx-snap .fx-snap-goal, .fx-snap .fx-snap-read { margin: 0; color: var(--fx-ink); font-size: 16px; line-height: 1.5; }
.fx-snap .fx-snap-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.fx-snap .fx-snap-control { min-width: 0; padding: 0; border: 0; margin: 0; }
.fx-snap .fx-snap-control legend { padding: 0; margin-bottom: 8px; font-size: 16px; font-weight: 700; color: var(--fx-ink); }
.fx-snap .fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-snap .fx-btn { display: flex; align-items: center; box-sizing: border-box; min-height: 44px; padding: 10px 12px; border: 2px solid var(--fx-ink); background: var(--fx-paper); color: var(--fx-ink); font-size: 16px; line-height: 1.4; cursor: pointer; }
.fx-snap .fx-btn:has(input:checked) { background: var(--fx-sun); color: var(--fx-ink); }
.fx-snap .fx-btn:focus-within { outline: 3px solid var(--fx-coral); outline-offset: 3px; }
.fx-snap .fx-snap-figure { box-sizing: border-box; height: 480px; min-width: 0; margin: 0; padding: 12px; display: grid; grid-template-rows: 24px 226px 26px minmax(0, 1fr); gap: 8px; color: var(--fx-ink); font-size: 14px; }
.fx-snap .fx-snap-bar-label { text-align: center; line-height: 24px; font-size: 14px; }
.fx-snap .fx-snap-visual { position: relative; height: 226px; min-width: 0; perspective: 650px; }
.fx-snap .fx-snap-surface { position: absolute; left: 50%; top: 50%; width: min(92%, 230px); aspect-ratio: 1; transform: translate(-50%, -50%) rotateX(28deg); transform-style: preserve-3d; }
.fx-snap .fx-snap-plate { position: absolute; inset: 0; box-sizing: border-box; border: 4px solid var(--fx-muted); border-radius: 50%; background: var(--fx-paper); transform: translateZ(-4px); }
.fx-snap .fx-snap-bar { position: absolute; left: 50%; top: 50%; width: 69%; height: 34.5%; transform: translate(-50%, -50%) translateZ(7px) rotateZ(var(--fx-turn)); transform-style: preserve-3d; transition: transform 0.8s; }
.fx-snap .fx-snap-square { position: absolute; left: calc(var(--fx-c) * 100% / 6); top: calc(var(--fx-r) * 100% / 3); width: calc(100% / 6); height: calc(100% / 3); background: var(--fx-ink); transform: translate3d(calc((var(--fx-c) - 2.5) * var(--fx-column-gap)), calc((var(--fx-r) - 1) * var(--fx-row-gap)), 0px); transform-style: preserve-3d; transition: transform 0.8s; }
.fx-snap .fx-snap-square::before { content: ""; position: absolute; inset: 0; box-sizing: border-box; border: 1px solid var(--fx-sun-pale); background: var(--fx-ink); transform: translateZ(4px); }
.fx-snap .fx-snap-square::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--fx-muted); transform-origin: bottom; transform: rotateX(-90deg); }
.fx-snap .fx-snap-edge { position: absolute; top: 0; bottom: 0; right: 0; width: 4px; background: var(--fx-muted); transform-origin: right; transform: rotateY(90deg); }
.fx-snap .fx-snap-number { position: absolute; left: 50%; top: 50%; box-sizing: border-box; width: 18px; height: 18px; border-radius: 50%; background: var(--fx-sun); color: var(--fx-ink); text-align: center; font-size: 12px; line-height: 18px; font-weight: 800; transform: translate3d(-50%, -50%, 7px) rotateZ(calc(0deg - var(--fx-turn))); visibility: hidden; transition: transform 0.8s; }
.fx-snap:has(#fx-snap-long:checked):has(#fx-snap-break:checked) .fx-snap-number-long, .fx-snap:has(#fx-snap-short:checked):has(#fx-snap-break:checked) .fx-snap-number-short { visibility: visible; }
.fx-snap .fx-snap-guide-line { position: absolute; box-sizing: border-box; transform: translateZ(6px); transition: opacity 0.3s; }
.fx-snap .fx-snap-row-line { left: 0; top: calc(var(--fx-i) * 100% / 3); width: 100%; height: 0; border-top: 2px dashed var(--fx-paper); }
.fx-snap .fx-snap-column-line { top: 0; left: calc(var(--fx-i) * 100% / 6); width: 0; height: 100%; border-left: 2px dashed var(--fx-paper); opacity: 0; }
.fx-snap:has(#fx-snap-short:checked) .fx-snap-row-line { opacity: 0; }
.fx-snap:has(#fx-snap-short:checked) .fx-snap-column-line { opacity: 1; }
.fx-snap:has(#fx-snap-break:checked) .fx-snap-bar .fx-snap-guide-line { opacity: 0; }
.fx-snap .fx-snap-picture-key { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; line-height: 18px; }
.fx-snap .fx-snap-key-item { display: flex; align-items: center; gap: 6px; }
.fx-snap .fx-snap-dash { width: 20px; border-top: 2px dashed var(--fx-ink); }
.fx-snap .fx-snap-plate-sample { box-sizing: border-box; width: 18px; height: 14px; border: 2px solid var(--fx-muted); border-radius: 50%; background: var(--fx-paper); }
.fx-snap .fx-snap-piece-labels { display: grid; min-width: 0; align-items: start; }
.fx-snap .fx-snap-piece-labels > p, .fx-snap .fx-snap-piece-labels > div { grid-area: 1 / 1; visibility: hidden; }
.fx-snap .fx-snap-piece-labels .fx-snap-piece-guide { visibility: visible; margin: 0; padding: 8px; background: var(--fx-sun-pale); color: var(--fx-ink); font-size: 14px; line-height: 1.5; }
.fx-snap .fx-snap-piece-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.fx-snap .fx-snap-card { display: flex; justify-content: center; align-items: center; gap: 4px; box-sizing: border-box; min-width: 0; min-height: 44px; padding: 4px; border: 1px solid var(--fx-ink); border-radius: 6px; background: var(--fx-sun-pale); color: var(--fx-ink); font-size: 12px; line-height: 16px; }
.fx-snap .fx-snap-card b { flex-shrink: 0; padding: 2px 4px; border-radius: 50%; background: var(--fx-sun); font-size: 12px; }
.fx-snap .fx-snap-messages { display: grid; }
.fx-snap .fx-snap-messages > p { grid-area: 1 / 1; visibility: hidden; margin: 0; color: var(--fx-ink); font-size: 14px; line-height: 1.6; }
.fx-snap:has(#fx-snap-long:checked) .fx-snap-say-long-whole, .fx-snap:has(#fx-snap-short:checked) .fx-snap-say-short-whole { visibility: visible; }
.fx-snap:has(#fx-snap-break:checked) .fx-snap-piece-labels .fx-snap-whole, .fx-snap:has(#fx-snap-break:checked) .fx-snap-messages .fx-snap-whole { visibility: hidden; }
.fx-snap:has(#fx-snap-long:checked):has(#fx-snap-break:checked) .fx-snap-pieces-long, .fx-snap:has(#fx-snap-long:checked):has(#fx-snap-break:checked) .fx-snap-say-long-broken, .fx-snap:has(#fx-snap-short:checked):has(#fx-snap-break:checked) .fx-snap-pieces-short, .fx-snap:has(#fx-snap-short:checked):has(#fx-snap-break:checked) .fx-snap-say-short-broken { visibility: visible; }
@container (max-width: 480px) { .fx-snap .fx-snap-controls { grid-template-columns: minmax(0, 1fr); } .fx-snap .fx-snap-piece-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .fx-snap .fx-snap-bar, .fx-snap .fx-snap-square, .fx-snap .fx-snap-number, .fx-snap .fx-snap-guide-line { transition: none; } }