.fx-guards { --fx-v0: visible; --fx-v1: hidden; --fx-v2: hidden; --fx-v3: hidden; --fx-v4: hidden; display: grid; gap: 14px; }
.fx-guards:has(input:checked) { --fx-v0: hidden; --fx-v1: visible; }
.fx-guards:has(#fx-guards-g1:checked):has(#fx-guards-g2:checked), .fx-guards:has(#fx-guards-g1:checked):has(#fx-guards-g3:checked), .fx-guards:has(#fx-guards-g1:checked):has(#fx-guards-g4:checked), .fx-guards:has(#fx-guards-g2:checked):has(#fx-guards-g3:checked), .fx-guards:has(#fx-guards-g2:checked):has(#fx-guards-g4:checked), .fx-guards:has(#fx-guards-g3:checked):has(#fx-guards-g4:checked) { --fx-v1: hidden; --fx-v2: visible; }
.fx-guards:has(#fx-guards-g1:checked):has(#fx-guards-g2:checked):has(#fx-guards-g3:checked), .fx-guards:has(#fx-guards-g1:checked):has(#fx-guards-g2:checked):has(#fx-guards-g4:checked), .fx-guards:has(#fx-guards-g1:checked):has(#fx-guards-g3:checked):has(#fx-guards-g4:checked), .fx-guards:has(#fx-guards-g2:checked):has(#fx-guards-g3:checked):has(#fx-guards-g4:checked) { --fx-v2: hidden; --fx-v3: visible; }
.fx-guards:has(#fx-guards-g1:checked):has(#fx-guards-g2:checked):has(#fx-guards-g3:checked):has(#fx-guards-g4:checked) { --fx-v3: hidden; --fx-v4: visible; }
.fx-guards * { box-sizing: border-box; }
.fx-guards .fx-instructions ol { margin: 0; padding-left: 24px; }
.fx-guards .fx-instructions li { margin: 4px 0; }
.fx-guards .fx-goal { margin: 0; color: var(--fx-ink); }
.fx-guards .fx-controls { border: 0; padding: 0; margin: 0; min-width: 0; }
.fx-guards .fx-controls legend { padding: 0; margin-bottom: 10px; font-weight: 800; color: var(--fx-ink); }
.fx-guards .fx-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-guards .fx-btn { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1 1 100px; min-width: 0; min-height: 44px; padding: 10px; border: 2px solid var(--fx-ink); border-radius: 8px; background: var(--fx-paper); color: var(--fx-ink); font-size: 16px; cursor: pointer; }
.fx-guards .fx-btn:has(input:checked) { background: var(--fx-mint); color: var(--fx-ink); }
.fx-guards .fx-btn:focus-within { outline: 3px solid var(--fx-grape); outline-offset: 3px; }
.fx-guards .fx-check { position: relative; flex: 0 0 18px; width: 18px; height: 18px; border: 2px solid var(--fx-ink); border-radius: 3px; background: var(--fx-paper); }
.fx-guards .fx-btn input:checked + .fx-check::after { content: ""; position: absolute; left: 4px; top: 0; width: 5px; height: 10px; border-right: 2px solid var(--fx-ink); border-bottom: 2px solid var(--fx-ink); transform: rotate(45deg); }
.fx-guards .fx-scene { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); align-items: center; gap: 12px; height: 316px; padding: 12px; overflow: hidden; }
.fx-guards .fx-door { position: relative; justify-self: center; width: 100%; max-width: 128px; height: 192px; padding: 10px 4px; border: 4px solid var(--fx-ink); border-radius: 5px 5px 0 0; background: var(--fx-coral-pale); color: var(--fx-ink); text-align: center; }
.fx-guards .fx-door b { display: block; font-size: 14px; line-height: 1.3; }
.fx-guards .fx-window { width: 72%; height: 44%; margin: 12px auto 0; border: 2px solid var(--fx-ink); background: var(--fx-sky-pale); }
.fx-guards .fx-door::after { content: ""; position: absolute; right: 6px; top: 65%; width: 8px; height: 8px; border-radius: 50%; background: var(--fx-ink); }
.fx-guards .fx-lineup { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding-top: 58px; min-width: 0; }
.fx-guards .fx-hint { position: absolute; top: 0; left: 0; width: calc((100% - 18px) / 4); font-size: 12px; line-height: 14px; text-align: center; color: var(--fx-ink); visibility: var(--fx-v0); }
.fx-guards .fx-hint svg { display: block; width: 18px; height: 16px; margin: 0 auto; fill: none; stroke: var(--fx-ink); stroke-width: 2; }
.fx-guards .fx-slot { min-width: 0; text-align: center; }
.fx-guards .fx-slot > svg { display: block; width: 100%; height: 144px; }
.fx-guards .fx-slot-label { display: block; min-height: 32px; font-size: 12px; font-weight: 800; line-height: 16px; color: var(--fx-ink); }
.fx-guards .fx-outline { fill: none; stroke: var(--fx-muted); stroke-width: 2; stroke-dasharray: 4 4; stroke-linejoin: round; }
.fx-guards .fx-person { opacity: 0; transform: translateY(14px); transition: transform 350ms ease-out, opacity 350ms ease-out; }
.fx-guards .fx-face { fill: var(--fx-sun-pale); stroke: var(--fx-ink); stroke-width: 2; }
.fx-guards .fx-uniform { fill: var(--fx-ink); stroke: var(--fx-ink); stroke-width: 2; stroke-linejoin: round; }
.fx-guards .fx-badge { fill: var(--fx-sun); }
.fx-guards .fx-belt { fill: none; stroke: var(--fx-mint); stroke-width: 3; }
.fx-guards:has(#fx-guards-g1:checked) .fx-person1, .fx-guards:has(#fx-guards-g2:checked) .fx-person2, .fx-guards:has(#fx-guards-g3:checked) .fx-person3, .fx-guards:has(#fx-guards-g4:checked) .fx-person4 { opacity: 1; transform: translateY(0); }
.fx-guards .fx-sentence { padding: 14px; border: 3px solid var(--fx-ink); border-radius: 8px; background: var(--fx-paper); color: var(--fx-ink); }
.fx-guards .fx-caption { margin: 0 0 8px; font-size: 14px; }
.fx-guards .fx-swap { display: grid; min-width: 0; }
.fx-guards .fx-swap p { grid-area: 1 / 1; margin: 0; min-width: 0; visibility: hidden; }
.fx-guards .fx-says p { font-size: 16px; line-height: 1.9; }
.fx-guards .fx-says strong { display: inline-block; padding: 0 4px; border-radius: 4px; background: var(--fx-sun); box-shadow: 0 0 0 2px var(--fx-sun-pale); color: var(--fx-ink); font-size: 1.4em; line-height: 1.2; }
.fx-guards .fx-swap .fx-count0 { visibility: var(--fx-v0); }
.fx-guards .fx-swap .fx-count1 { visibility: var(--fx-v1); }
.fx-guards .fx-swap .fx-count2 { visibility: var(--fx-v2); }
.fx-guards .fx-swap .fx-count3 { visibility: var(--fx-v3); }
.fx-guards .fx-swap .fx-count4 { visibility: var(--fx-v4); }
.fx-guards:has(.fx-btn:has(:checked) ~ .fx-btn:has(:checked)):not(:has(.fx-btn:has(:checked) ~ .fx-btn:has(:checked) ~ .fx-btn:has(:checked))) .fx-count2 strong { animation: fx-guards-bounce 360ms ease-out; }
.fx-guards .fx-feedback p { color: var(--fx-ink); font-size: 16px; line-height: 1.5; }
@keyframes fx-guards-bounce { 0% { transform: translateY(0) scale(1); } 45% { transform: translateY(-3px) scale(1.06); } 100% { transform: translateY(0) scale(1); } }
@container (max-width: 480px) { .fx-guards .fx-scene { grid-template-columns: minmax(0, 1fr); grid-template-rows: 104px 1fr; height: 400px; } .fx-guards .fx-door { height: 104px; } .fx-guards .fx-window { margin-top: 8px; } .fx-guards .fx-slot > svg { height: 124px; } }
@media (prefers-reduced-motion: reduce) { .fx-guards .fx-person { transition: none; } .fx-guards:has(.fx-btn:has(:checked) ~ .fx-btn:has(:checked)):not(:has(.fx-btn:has(:checked) ~ .fx-btn:has(:checked) ~ .fx-btn:has(:checked))) .fx-count2 strong { animation: none; } }