.fx-bags { --fx-angle: -16deg; display: grid; gap: 14px; }
.fx-bags * { box-sizing: border-box; }
.fx-bags .fx-steps { list-style: none; padding: 0; margin: 0; line-height: 1.5; }
.fx-bags .fx-goal { margin: 0; line-height: 1.5; }
.fx-bags .fx-controls { min-width: 0; border: 0; padding: 0; margin: 0; }
.fx-bags .fx-controls legend { padding: 0; margin-bottom: 10px; font-weight: 800; }
.fx-bags .fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-bags .fx-btn { flex: 1 1 88px; min-width: 0; min-height: 44px; padding: 10px 12px; justify-content: center; font-size: 14px; line-height: 1.4; color: var(--fx-ink); background: var(--fx-paper); border: 2px solid var(--fx-ink); }
.fx-bags .fx-btn:has(input:checked) { color: var(--fx-ink); background: var(--fx-sun); }
.fx-bags .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-grape); outline-offset: 3px; }
.fx-bags .fx-scene { height: 500px; min-width: 0; padding: 12px; display: grid; grid-template-rows: 100px 184px minmax(0, 1fr); gap: 8px; color: var(--fx-ink); }
.fx-bags .fx-shopping { min-width: 0; text-align: center; font-size: 16px; line-height: 1.3; }
.fx-bags .fx-total { margin: 3px 0 6px; font-size: 14px; font-weight: 800; }
.fx-bags .fx-stock { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; font-size: 12px; line-height: 1.4; }
.fx-bags .fx-stock li { padding: 2px 4px; background: var(--fx-paper); border-radius: 4px; }
.fx-bags .fx-bag-area { min-width: 0; display: grid; grid-template-rows: 24px 160px; }
.fx-bags .fx-part-label { display: block; font-size: 14px; line-height: 20px; text-align: center; }
.fx-bags .fx-bag-grid { min-width: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fx-bags .fx-slot { --fx-load: 0; min-width: 0; display: grid; grid-template-rows: 20px 120px 20px; text-align: center; }
.fx-bags .fx-first { --fx-load: 1; }
.fx-bags .fx-second, .fx-bags .fx-third, .fx-bags .fx-fourth { visibility: hidden; }
.fx-bags .fx-bag-name { font-size: 14px; line-height: 20px; }
.fx-bags .fx-mass { font-size: 12px; font-weight: 800; line-height: 20px; }
.fx-bags .fx-view { min-width: 0; height: 120px; perspective: 500px; }
.fx-bags .fx-bag { position: relative; top: 20px; width: calc(100% - 22px); max-width: 112px; height: 96px; margin: 0 auto; transform-style: preserve-3d; transform: rotateX(-5deg) rotateY(var(--fx-angle)); transition: transform 0.6s; }
.fx-bags .fx-front { position: absolute; top: 0; left: 0; width: 100%; height: 96px; border: 2px solid var(--fx-ink); background: var(--fx-paper); transform: translateZ(9px); }
.fx-bags .fx-side { position: absolute; top: 0; left: 100%; width: 18px; height: 96px; border: 2px solid var(--fx-ink); background: var(--fx-sun-pale); transform-origin: left center; transform: translateZ(9px) rotateY(90deg); }
.fx-bags .fx-bottom { position: absolute; left: 0; bottom: 0; width: 100%; height: 18px; border: 2px solid var(--fx-ink); background: var(--fx-sun-pale); transform-origin: center bottom; transform: translateZ(9px) rotateX(90deg); }
.fx-bags .fx-handle { position: absolute; top: -18px; left: 25%; width: 50%; height: 23px; border: 3px solid var(--fx-ink); border-bottom: 0; border-radius: 12px 12px 0 0; }
.fx-bags .fx-fill { position: absolute; bottom: 0; left: 0; width: 100%; height: calc(var(--fx-load) * 68px); background: var(--fx-sky); transition: height 0.6s; }
.fx-bags .fx-side .fx-fill { background: var(--fx-mint); }
.fx-bags .fx-full { position: absolute; bottom: 68px; left: 0; width: 100%; border-bottom: 2px dashed var(--fx-ink); font-size: 12px; line-height: 12px; text-align: center; color: var(--fx-ink); }
.fx-bags:has(#fx-bags-two:checked) { --fx-angle: -8deg; }
.fx-bags:has(#fx-bags-three:checked) { --fx-angle: 8deg; }
.fx-bags:has(#fx-bags-four:checked) { --fx-angle: -2deg; }
.fx-bags:has(#fx-bags-two:checked) .fx-second, .fx-bags:has(#fx-bags-three:checked) .fx-second, .fx-bags:has(#fx-bags-four:checked) .fx-second { --fx-load: 1; visibility: visible; }
.fx-bags:has(#fx-bags-three:checked) .fx-third, .fx-bags:has(#fx-bags-four:checked) .fx-third { --fx-load: 0.1125; visibility: visible; }
.fx-bags:has(#fx-bags-four:checked) .fx-fourth { visibility: visible; }
.fx-bags .fx-floor { min-width: 0; min-height: 0; padding: 8px; border: 1px solid var(--fx-ink); border-radius: 8px; background: var(--fx-sun-pale); }
.fx-bags .fx-swap { display: grid; }
.fx-bags .fx-swap > .fx-state { grid-area: 1 / 1; visibility: hidden; }
.fx-bags .fx-floor-swap > .fx-state { min-width: 0; display: grid; grid-template-rows: 50px auto auto; align-content: start; gap: 3px; text-align: center; }
.fx-bags .fx-pile { display: block; width: 100%; height: 50px; }
.fx-bags .fx-pile * { stroke: var(--fx-ink); stroke-width: 2; stroke-linejoin: round; }
.fx-bags .fx-floor-line { fill: none; }
.fx-bags .fx-water { fill: var(--fx-sky); }
.fx-bags .fx-potato { fill: var(--fx-sun); }
.fx-bags .fx-bread { fill: var(--fx-coral-pale); }
.fx-bags .fx-egg { fill: var(--fx-paper); }
.fx-bags .fx-floor-mass { display: block; font-size: 16px; line-height: 20px; }
.fx-bags .fx-floor-swap small { display: block; font-size: 12px; line-height: 16px; }
.fx-bags .fx-clear-space { height: 50px; display: grid; place-items: center; border-bottom: 2px solid var(--fx-ink); font-size: 14px; }
.fx-bags .fx-tick { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--fx-mint); color: var(--fx-ink); font-size: 28px; font-weight: 800; }
.fx-bags .fx-feedback > .fx-state { margin: 0; line-height: 1.5; }
.fx-bags:has(#fx-bags-one:checked) .fx-state-one, .fx-bags:has(#fx-bags-two:checked) .fx-state-two, .fx-bags:has(#fx-bags-three:checked) .fx-state-three, .fx-bags:has(#fx-bags-four:checked) .fx-state-four { visibility: visible; }
@container (max-width: 480px) { .fx-bags .fx-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .fx-bags .fx-scene { height: 670px; grid-template-rows: 120px 352px minmax(0, 1fr); } .fx-bags .fx-stock { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; } .fx-bags .fx-bag-area { grid-template-rows: 20px 332px; } .fx-bags .fx-bag-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, 160px); } }
@media (prefers-reduced-motion: reduce) { .fx-bags .fx-bag, .fx-bags .fx-fill { transition: none; } }