.fx-machine { display: grid; gap: 14px; }
.fx-machine .fx-machine-steps { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.fx-machine .fx-machine-goal, .fx-machine .fx-machine-rule, .fx-machine .fx-machine-readstep { margin: 0; color: var(--fx-ink); }
.fx-machine .fx-machine-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fx-machine .fx-machine-group { min-width: 0; margin: 0; padding: 0; border: 0; color: var(--fx-ink); }
.fx-machine .fx-machine-group legend { max-width: 100%; padding: 0; margin-bottom: 10px; font-size: 16px; font-weight: 800; }
.fx-machine .fx-machine-group .fx-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.fx-machine .fx-btn { box-sizing: border-box; display: flex; align-items: center; justify-content: flex-start; min-height: 44px; min-width: 24px; padding: 10px 12px; border: 2px solid var(--fx-ink); border-radius: 10px; background: var(--fx-paper); color: var(--fx-ink); font-size: 15px; font-weight: 700; line-height: 1.4; cursor: pointer; }
.fx-machine .fx-btn:has(input:checked) { background: var(--fx-mint-pale); color: var(--fx-ink); }
.fx-machine .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-grape); outline-offset: 3px; }
.fx-machine .fx-machine-scene { box-sizing: border-box; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr); align-items: center; align-content: center; gap: 4px; height: 196px; min-width: 0; padding: 12px; overflow: hidden; color: var(--fx-ink); }
.fx-machine .fx-machine-node { display: grid; grid-template-rows: 32px 68px; gap: 4px; height: 104px; min-width: 0; text-align: center; }
.fx-machine .fx-machine-part { display: flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1.15; }
.fx-machine .fx-machine-readout { box-sizing: border-box; position: relative; display: grid; height: 68px; min-width: 0; font-size: 20px; font-weight: 800; line-height: 1.2; }
.fx-machine .fx-machine-state, .fx-machine .fx-machine-hour { grid-area: 1 / 1; visibility: hidden; }
.fx-machine .fx-machine-hour { position: relative; align-self: center; justify-self: center; }
.fx-machine .fx-machine-funnel svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.fx-machine .fx-machine-funnel polygon { fill: var(--fx-sun-pale); stroke: var(--fx-ink); stroke-width: 2; stroke-linejoin: round; }
.fx-machine .fx-machine-block { box-sizing: border-box; display: grid; grid-template-rows: 24px 24px; align-content: center; justify-items: center; height: 68px; min-width: 0; padding: 4px; border: 2px solid var(--fx-ink); border-radius: 10px; }
.fx-machine .fx-machine-block strong { font-size: 18px; }
.fx-machine .fx-machine-product { background: var(--fx-sky); }
.fx-machine .fx-machine-sum { background: var(--fx-coral); }
.fx-machine .fx-machine-arrow { font-size: 28px; font-weight: 800; line-height: 1; text-align: center; }
.fx-machine .fx-machine-bill { align-items: center; justify-items: center; border: 2px solid var(--fx-ink); border-top-width: 8px; border-radius: 2px 2px 8px 8px; background: var(--fx-paper); }
.fx-machine:has(#fx-machine-plus:checked) .fx-machine-bill { border-color: var(--fx-coral); background: var(--fx-coral-pale); }
.fx-machine .fx-machine-says, .fx-machine .fx-machine-comparison { display: grid; min-width: 0; }
.fx-machine .fx-machine-says p, .fx-machine .fx-machine-comparison p { box-sizing: border-box; margin: 0; color: var(--fx-ink); font-size: 15px; line-height: 1.5; }
.fx-machine .fx-machine-compare { grid-area: 1 / 1; visibility: hidden; }
.fx-machine:has(#fx-machine-times:checked) .fx-machine-good, .fx-machine:has(#fx-machine-plus:checked) .fx-machine-bad { visibility: visible; }
.fx-machine:has(#fx-machine-h1:checked) .fx-machine-hours1, .fx-machine:has(#fx-machine-h10:checked) .fx-machine-hours10, .fx-machine:has(#fx-machine-h48:checked) .fx-machine-hours48 { visibility: visible; }
.fx-machine:has(#fx-machine-times:checked):has(#fx-machine-h1:checked) .fx-machine-c1, .fx-machine:has(#fx-machine-times:checked):has(#fx-machine-h10:checked) .fx-machine-c10, .fx-machine:has(#fx-machine-times:checked):has(#fx-machine-h48:checked) .fx-machine-c48, .fx-machine:has(#fx-machine-plus:checked):has(#fx-machine-h1:checked) .fx-machine-w1, .fx-machine:has(#fx-machine-plus:checked):has(#fx-machine-h10:checked) .fx-machine-w10, .fx-machine:has(#fx-machine-plus:checked):has(#fx-machine-h48:checked) .fx-machine-w48 { visibility: visible; }
@container (max-width: 480px) { .fx-machine .fx-machine-controls { grid-template-columns: minmax(0, 1fr); } .fx-machine .fx-machine-scene { grid-template-columns: minmax(0, 1fr); grid-template-rows: 68px 18px 68px 18px 68px 18px 68px; height: 400px; } .fx-machine .fx-machine-node { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 68px; align-items: center; gap: 8px; height: 68px; } .fx-machine .fx-machine-arrow { transform: rotate(90deg); } }