.fx-rule { --fx-drop: 0px; --fx-turn: 0deg; display: grid; gap: 16px; }
.fx-rule:has(#fx-rule-colour:checked) { --fx-drop: 207px; --fx-turn: -90deg; }
.fx-rule:has(#fx-rule-type:checked) { --fx-drop: 207px; --fx-turn: -180deg; }
.fx-rule:has(#fx-rule-both:checked) { --fx-drop: 207px; --fx-turn: -270deg; }
.fx-rule .fx-rule-how { margin: 0; color: var(--fx-ink); }
.fx-rule .fx-rule-steps { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: 14px; line-height: 1.5; }
.fx-rule .fx-rule-goal { margin: 0; color: var(--fx-ink); line-height: 1.5; }
.fx-rule .fx-rule-controls { min-width: 0; margin: 0; padding: 0; border: 0; color: var(--fx-ink); }
.fx-rule .fx-rule-controls legend { padding: 0; margin-bottom: 12px; font-weight: 800; }
.fx-rule .fx-rule-choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.fx-rule .fx-btn { display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: 0; min-height: 44px; padding: 10px; border: 2px solid var(--fx-ink); background: var(--fx-paper); color: var(--fx-ink); font-size: 16px; font-weight: 700; line-height: 1.25; text-align: center; cursor: pointer; }
.fx-rule .fx-btn:has(input:checked) { border: 2px solid var(--fx-ink); background: var(--fx-mint); color: var(--fx-ink); }
.fx-rule .fx-btn:focus-within { outline: 3px solid var(--fx-ink); outline-offset: 3px; }
.fx-rule .fx-rule-scene { position: relative; box-sizing: border-box; min-width: 0; height: 600px; padding: 0; overflow: hidden; color: var(--fx-ink); }
.fx-rule .fx-rule-rail-label { position: absolute; top: 16px; left: 0; width: 100%; text-align: center; font-size: 16px; }
.fx-rule .fx-rule-rail { position: absolute; top: 60px; left: 3%; width: 94%; border-top: 3px solid var(--fx-ink); }
.fx-rule .fx-rule-group { position: absolute; top: 185px; width: 46%; height: 220px; box-sizing: border-box; border: 2px solid var(--fx-ink); border-radius: 12px; background: var(--fx-paper); }
.fx-rule .fx-rule-left { left: 2%; }
.fx-rule .fx-rule-right { right: 2%; }
.fx-rule .fx-rule-group-label { display: block; margin-top: 7px; text-align: center; font-size: 14px; line-height: 20px; }
.fx-rule .fx-rule-heading-label { display: block; text-align: center; font-size: 12px; line-height: 18px; }
.fx-rule .fx-rule-card { display: grid; align-items: center; min-height: 36px; margin: 2px 5px 0; border: 1px solid var(--fx-ink); border-radius: 6px; background: var(--fx-sun-pale); text-align: center; }
.fx-rule .fx-rule-card > span { grid-area: 1 / 1; padding: 3px; font-size: 14px; line-height: 18px; font-weight: 800; }
.fx-rule .fx-rule-state { visibility: hidden; }
.fx-rule:has(#fx-rule-none:checked) .fx-rule-s0, .fx-rule:has(#fx-rule-colour:checked) .fx-rule-s1, .fx-rule:has(#fx-rule-type:checked) .fx-rule-s2, .fx-rule:has(#fx-rule-both:checked) .fx-rule-s3 { visibility: visible; }
.fx-rule .fx-rule-garment { position: absolute; top: 60px; width: 21%; text-align: center; transform: translateY(var(--fx-drop)); transition: transform 0.65s, left 0.65s; }
.fx-rule .fx-rule-garment svg { display: block; width: 100%; max-width: 68px; height: 85px; margin: 0 auto; }
.fx-rule .fx-rule-garment > span { display: block; color: var(--fx-ink); font-size: 12px; line-height: 16px; font-weight: 700; overflow-wrap: anywhere; }
.fx-rule .fx-rule-hanger { fill: none; stroke: var(--fx-ink); stroke-width: 2; stroke-linejoin: round; }
.fx-rule .fx-rule-cloth { stroke: var(--fx-ink); stroke-width: 2; stroke-linejoin: round; }
.fx-rule .fx-rule-dark { fill: var(--fx-ink); }
.fx-rule .fx-rule-light { fill: var(--fx-paper); }
.fx-rule .fx-rule-darktee, .fx-rule .fx-rule-p1 { left: 3%; }
.fx-rule .fx-rule-lightlegs, .fx-rule .fx-rule-p2 { left: 26%; }
.fx-rule .fx-rule-lighttee, .fx-rule .fx-rule-p3 { left: 52%; }
.fx-rule .fx-rule-darklegs, .fx-rule .fx-rule-p4 { left: 75%; }
.fx-rule:has(#fx-rule-colour:checked) .fx-rule-darklegs { left: 26%; }
.fx-rule:has(#fx-rule-colour:checked) .fx-rule-lightlegs { left: 75%; }
.fx-rule:has(#fx-rule-type:checked) .fx-rule-lighttee { left: 26%; }
.fx-rule:has(#fx-rule-type:checked) .fx-rule-lightlegs { left: 52%; }
.fx-rule .fx-rule-pile { position: absolute; top: 263px; box-sizing: border-box; width: 21%; height: 132px; border: 1px dashed var(--fx-coral); border-radius: 6px; background: var(--fx-coral-pale); }
.fx-rule .fx-rule-pile > span { position: absolute; bottom: 1px; left: 0; width: 100%; text-align: center; font-size: 12px; line-height: 16px; }
.fx-rule:has(#fx-rule-both:checked) .fx-rule-card { background: var(--fx-coral-pale); animation: fx-rule-alert 0.8s steps(2, end) 2; }
.fx-rule .fx-rule-dial { position: absolute; bottom: 12px; left: 0; width: 100%; height: 160px; }
.fx-rule .fx-rule-dial-label { position: absolute; top: 0; left: 0; width: 100%; text-align: center; font-size: 16px; }
.fx-rule .fx-rule-cage { position: absolute; top: 43px; left: 50%; width: 160px; height: 80px; perspective: 500px; transform: translateX(-50%); }
.fx-rule .fx-rule-axle { width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(-14deg); }
.fx-rule .fx-rule-drum { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateX(var(--fx-turn)); transition: transform 0.8s steps(4, end); }
.fx-rule .fx-rule-face { position: absolute; inset: 0; box-sizing: border-box; display: grid; place-items: center; padding: 8px; border: 2px solid var(--fx-ink); border-radius: 12px; background: var(--fx-sun-pale); color: var(--fx-ink); font-size: 16px; font-weight: 800; text-align: center; backface-visibility: hidden; transform: rotateX(calc(var(--fx-i) * 90deg)) translateZ(40px); }
.fx-rule .fx-rule-cap { position: absolute; top: 0; width: 80px; height: 80px; box-sizing: border-box; border: 5px dashed var(--fx-ink); border-radius: 50%; background: var(--fx-sun); transform: rotateY(90deg); }
.fx-rule .fx-rule-cap-left { left: -40px; }
.fx-rule .fx-rule-cap-right { right: -40px; }
.fx-rule .fx-rule-pointer { position: absolute; top: 73px; left: calc(50% - 108px); width: 18px; height: 20px; background: var(--fx-coral); clip-path: polygon(0 0, 100% 50%, 0 100%); }
.fx-rule .fx-rule-pointer-label { position: absolute; bottom: 0; left: 0; width: 100%; text-align: center; font-size: 12px; line-height: 18px; }
.fx-rule .fx-rule-messages { display: grid; min-width: 0; }
.fx-rule .fx-rule-message { grid-area: 1 / 1; box-sizing: border-box; margin: 0; padding: 14px; color: var(--fx-ink); font-size: 16px; line-height: 1.5; }
.fx-rule .fx-rule-detail { display: inline-block; margin-top: 8px; font-size: 14px; }
@container (max-width: 480px) { .fx-rule .fx-rule-choices { grid-template-columns: 1fr; } }
@keyframes fx-rule-alert { 50% { background: var(--fx-coral); } }
@media (prefers-reduced-motion: reduce) { .fx-rule .fx-rule-garment, .fx-rule .fx-rule-drum { transition: none; } .fx-rule .fx-rule-card { animation: none; } }