.fx-receipt { --fx-f: 0; --fx-s: 0; --fx-d: 0; --fx-v: 0; --fx-count: calc(var(--fx-f) + var(--fx-s) + var(--fx-d) + var(--fx-v)); display: grid; }
.fx-receipt:has(#fx-receipt-f:checked) { --fx-f: 1; }
.fx-receipt:has(#fx-receipt-s:checked) { --fx-s: 1; }
.fx-receipt:has(#fx-receipt-d:checked) { --fx-d: 1; }
.fx-receipt:has(#fx-receipt-v:checked) { --fx-v: 1; }
.fx-receipt:has(#fx-receipt-v:checked):not(:has(#fx-receipt-f:checked, #fx-receipt-s:checked, #fx-receipt-d:checked)) { --fx-v: 0; }
.fx-receipt .fx-receipt-body { display: grid; gap: 14px; min-width: 0; color: var(--fx-ink); font-size: 14px; line-height: 1.5; }
.fx-receipt .fx-receipt-body > p, .fx-receipt .fx-receipt-body > .fx-note { margin: 0; }
.fx-receipt .fx-receipt-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fx-receipt .fx-receipt-controls { min-width: 0; border: 0; margin: 0; padding: 0; }
.fx-receipt .fx-receipt-controls legend { padding: 0; font-weight: 800; }
.fx-receipt .fx-receipt-hint { margin: 6px 0 10px; }
.fx-receipt .fx-receipt-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fx-receipt .fx-btn { box-sizing: border-box; min-height: 44px; padding: 10px; color: var(--fx-ink); background: var(--fx-paper); border: 2px solid var(--fx-ink); cursor: pointer; white-space: normal; }
.fx-receipt .fx-btn:has(input:checked) { color: var(--fx-ink); background: var(--fx-mint-pale); }
.fx-receipt .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-ink); outline-offset: 3px; }
.fx-receipt .fx-receipt-scene { position: relative; box-sizing: border-box; height: 430px; padding: 0; overflow: hidden; font-size: 12px; }
.fx-receipt .fx-receipt-till { position: absolute; right: 2%; top: 10px; width: 46%; box-sizing: border-box; padding: 3px; border: 2px solid var(--fx-ink); background: var(--fx-sky); text-align: center; font-weight: 800; }
.fx-receipt .fx-receipt-source { position: absolute; left: 4%; top: 65px; width: 42%; text-align: center; }
.fx-receipt .fx-receipt-paper { position: absolute; right: 2%; top: 50px; width: 46%; height: calc(140px + var(--fx-count) * 50px); box-sizing: border-box; border: 2px solid var(--fx-ink); background: var(--fx-paper); transition: height 0.45s; }
.fx-receipt .fx-receipt-title { position: absolute; top: 10px; left: 8px; }
.fx-receipt .fx-receipt-total { position: absolute; left: 6px; right: 6px; bottom: 10px; text-align: center; border-top: 1px dashed var(--fx-ink); padding-top: 4px; }
.fx-receipt .fx-receipt-total > b { display: block; font-size: 12px; }
.fx-receipt .fx-receipt-total .fx-score { font-size: 24px; line-height: 1.2; }
.fx-receipt .fx-receipt-slip { position: absolute; left: 4%; width: 42%; height: 44px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 4px; border: 1px solid var(--fx-ink); background: var(--fx-sun-pale); text-align: center; font-size: 12px; line-height: 1.2; transition: left 0.45s, top 0.45s; }
.fx-receipt .fx-receipt-food { top: 116px; }
.fx-receipt .fx-receipt-service { top: 166px; }
.fx-receipt .fx-receipt-delivery { top: 216px; }
.fx-receipt .fx-receipt-voucher { top: 266px; background: var(--fx-mint-pale); }
.fx-receipt:has(#fx-receipt-f:checked) .fx-receipt-food { left: 54%; }
.fx-receipt:has(#fx-receipt-s:checked) .fx-receipt-service { left: 54%; top: calc(116px + var(--fx-f) * 50px); }
.fx-receipt:has(#fx-receipt-d:checked) .fx-receipt-delivery { left: 54%; top: calc(116px + (var(--fx-f) + var(--fx-s)) * 50px); }
.fx-receipt:has(#fx-receipt-v:checked):has(#fx-receipt-f:checked, #fx-receipt-s:checked, #fx-receipt-d:checked) .fx-receipt-voucher { left: 54%; top: calc(116px + (var(--fx-f) + var(--fx-s) + var(--fx-d)) * 50px); }
.fx-receipt .fx-receipt-van { width: 18px; height: 18px; flex-shrink: 0; color: var(--fx-ink); background: var(--fx-sky-pale); }
.fx-receipt:has(#fx-receipt-d:checked) .fx-receipt-van { animation: fx-receipt-flash 0.55s 2; }
.fx-receipt:has(#fx-receipt-v:checked):not(:has(#fx-receipt-f:checked, #fx-receipt-s:checked, #fx-receipt-d:checked)) .fx-receipt-voucher { animation: fx-receipt-bounce 0.8s 1; }
.fx-receipt:has(#fx-receipt-s:checked):has(#fx-receipt-v:checked):not(:has(#fx-receipt-f:checked, #fx-receipt-d:checked)) .fx-receipt-voucher { background: var(--fx-coral-pale); animation: fx-receipt-flash 0.55s 2; }
.fx-receipt .fx-receipt-stamp { visibility: hidden; position: absolute; right: 5%; top: 83px; padding: 0 5px; border: 2px solid var(--fx-ink); background: var(--fx-mint); font-size: 12px; }
.fx-receipt:has(#fx-receipt-f:checked):has(#fx-receipt-s:checked):has(#fx-receipt-v:checked):not(:has(#fx-receipt-d:checked)) .fx-receipt-stamp { visibility: visible; }
.fx-receipt .fx-receipt-counter { position: absolute; bottom: 0; left: 0; right: 0; height: 22px; border-top: 2px solid var(--fx-ink); background: var(--fx-sky); text-align: center; }
.fx-receipt .fx-receipt-switch { display: grid; }
.fx-receipt .fx-receipt-state { grid-area: 1 / 1; visibility: hidden; margin: 0; }
.fx-receipt:not(:has(#fx-receipt-f:checked, #fx-receipt-s:checked, #fx-receipt-d:checked, #fx-receipt-v:checked)) .fx-receipt-state-0,
.fx-receipt:has(#fx-receipt-f:checked):not(:has(#fx-receipt-s:checked, #fx-receipt-d:checked, #fx-receipt-v:checked)) .fx-receipt-state-1,
.fx-receipt:has(#fx-receipt-s:checked):not(:has(#fx-receipt-f:checked, #fx-receipt-d:checked, #fx-receipt-v:checked)) .fx-receipt-state-2,
.fx-receipt:has(#fx-receipt-f:checked):has(#fx-receipt-s:checked):not(:has(#fx-receipt-d:checked, #fx-receipt-v:checked)) .fx-receipt-state-3,
.fx-receipt:has(#fx-receipt-d:checked):not(:has(#fx-receipt-f:checked, #fx-receipt-s:checked, #fx-receipt-v:checked)) .fx-receipt-state-4,
.fx-receipt:has(#fx-receipt-f:checked):has(#fx-receipt-d:checked):not(:has(#fx-receipt-s:checked, #fx-receipt-v:checked)) .fx-receipt-state-5,
.fx-receipt:has(#fx-receipt-s:checked):has(#fx-receipt-d:checked):not(:has(#fx-receipt-f:checked, #fx-receipt-v:checked)) .fx-receipt-state-6,
.fx-receipt:has(#fx-receipt-f:checked):has(#fx-receipt-s:checked):has(#fx-receipt-d:checked):not(:has(#fx-receipt-v:checked)) .fx-receipt-state-7,
.fx-receipt:has(#fx-receipt-v:checked):not(:has(#fx-receipt-f:checked, #fx-receipt-s:checked, #fx-receipt-d:checked)) .fx-receipt-state-8,
.fx-receipt:has(#fx-receipt-f:checked):has(#fx-receipt-v:checked):not(:has(#fx-receipt-s:checked, #fx-receipt-d:checked)) .fx-receipt-state-9,
.fx-receipt:has(#fx-receipt-s:checked):has(#fx-receipt-v:checked):not(:has(#fx-receipt-f:checked, #fx-receipt-d:checked)) .fx-receipt-state-10,
.fx-receipt:has(#fx-receipt-f:checked):has(#fx-receipt-s:checked):has(#fx-receipt-v:checked):not(:has(#fx-receipt-d:checked)) .fx-receipt-state-11,
.fx-receipt:has(#fx-receipt-d:checked):has(#fx-receipt-v:checked):not(:has(#fx-receipt-f:checked, #fx-receipt-s:checked)) .fx-receipt-state-12,
.fx-receipt:has(#fx-receipt-f:checked):has(#fx-receipt-d:checked):has(#fx-receipt-v:checked):not(:has(#fx-receipt-s:checked)) .fx-receipt-state-13,
.fx-receipt:has(#fx-receipt-s:checked):has(#fx-receipt-d:checked):has(#fx-receipt-v:checked):not(:has(#fx-receipt-f:checked)) .fx-receipt-state-14,
.fx-receipt:has(#fx-receipt-f:checked):has(#fx-receipt-s:checked):has(#fx-receipt-d:checked):has(#fx-receipt-v:checked) .fx-receipt-state-15 { visibility: visible; }
@keyframes fx-receipt-flash { 50% { background: var(--fx-coral); } }
@keyframes fx-receipt-bounce { 0%, 100% { left: 4%; transform: translateY(0); } 50% { left: 54%; transform: translateY(-8px); } }
@container (max-width: 480px) { .fx-receipt .fx-receipt-choices { grid-template-columns: 1fr; } }