.fx-jar { --fx-taken: 0; display: grid; gap: 16px; }
.fx-jar .fx-jar-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.fx-jar .fx-jar-goal, .fx-jar .fx-note, .fx-jar .fx-right { margin: 0; }
.fx-jar .fx-jar-controls { min-width: 0; padding: 0; margin: 0; border: 0; }
.fx-jar .fx-jar-controls legend { padding: 0; font-weight: 800; }
.fx-jar .fx-jar-help { margin: 8px 0 12px; }
.fx-jar .fx-jar-choices { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.fx-jar .fx-btn { box-sizing: border-box; min-width: 0; min-height: 48px; padding: 8px 4px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; border: 2px solid var(--fx-ink); border-radius: 12px; background: var(--fx-sun-pale); color: var(--fx-ink); font-size: 14px; text-align: center; cursor: pointer; }
.fx-jar .fx-btn small { font-size: 12px; }
.fx-jar .fx-jar-sw:checked + .fx-btn { background: var(--fx-mint); color: var(--fx-ink); border-style: dashed; }
.fx-jar .fx-jar-sw:focus-visible + .fx-btn { outline: 3px solid var(--fx-grape); outline-offset: 3px; }
.fx-jar .fx-jar-scene { box-sizing: border-box; height: 420px; padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fx-jar .fx-jar-panel { min-width: 0; display: flex; flex-direction: column; align-items: center; }
.fx-jar .fx-jar-panel > b { line-height: 24px; }
.fx-jar .fx-jar-glass { position: relative; width: 240px; max-width: 100%; height: 350px; }
.fx-jar .fx-jar-in { display: block; width: 100%; height: 350px; overflow: visible; }
.fx-jar .fx-jar-out { display: block; width: 240px; max-width: 100%; height: 180px; margin-top: auto; margin-bottom: 12px; }
.fx-jar .fx-jar-outline { fill: var(--fx-paper); stroke: var(--fx-ink); stroke-width: 3; }
.fx-jar .fx-jar-lid { fill: var(--fx-sky); stroke: var(--fx-ink); stroke-width: 2; }
.fx-jar .fx-jar-label { fill: var(--fx-sun-pale); stroke: var(--fx-ink); stroke-width: 2; }
.fx-jar .fx-jar-plate { fill: var(--fx-paper); stroke: var(--fx-ink); stroke-width: 3; }
.fx-jar .fx-jar-rim { fill: none; stroke: var(--fx-muted); stroke-width: 2; }
.fx-jar .fx-jar-sweet { --fx-out: 0; transition: opacity 0.25s, transform 0.25s; }
.fx-jar .fx-jar-in .fx-jar-sweet { opacity: calc(1 - var(--fx-out)); }
.fx-jar .fx-jar-out .fx-jar-sweet { opacity: var(--fx-out); transform: translateY(calc((var(--fx-out) - 1) * 15px)); }
.fx-jar .fx-jar-sweet circle { fill: var(--fx-sun); stroke: var(--fx-ink); stroke-width: 1.5; }
.fx-jar .fx-jar-sweet:nth-child(even) circle { fill: var(--fx-mint); }
.fx-jar .fx-jar-sweet:nth-child(3n) circle { fill: var(--fx-sky); }
.fx-jar .fx-jar-sweet:nth-child(4n) circle { fill: var(--fx-coral); }
.fx-jar .fx-jar-scene text { fill: var(--fx-ink); font-size: 12px; text-anchor: middle; }
.fx-jar .fx-jar-scene .fx-jar-hint { text-anchor: start; }
.fx-jar .fx-jar-number { position: absolute; left: 0; right: 0; bottom: 14px; display: grid; margin: 0; font-size: 32px; line-height: 32px; text-align: center; color: var(--fx-ink); }
.fx-jar .fx-jar-trail p { margin: 0 0 8px; }
.fx-jar .fx-jar-countdown { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
.fx-jar .fx-jar-countdown li { position: relative; isolation: isolate; display: grid; place-items: center; min-height: 32px; border: 2px solid var(--fx-ink); border-radius: 6px; background: var(--fx-paper); color: var(--fx-ink); font-size: 16px; font-weight: 800; overflow: hidden; }
.fx-jar .fx-jar-countdown li::before { content: ""; position: absolute; inset: 0; background: var(--fx-mint); opacity: clamp(0, calc(var(--fx-taken) - var(--fx-step) + 1), 1); }
.fx-jar .fx-jar-countdown span { position: relative; }
.fx-jar .fx-jar-says { display: grid; }
.fx-jar .fx-jar-state { grid-area: 1 / 1; visibility: hidden; }
.fx-jar .fx-jar-says > p { box-sizing: border-box; align-self: stretch; margin: 0; color: var(--fx-ink); }
.fx-jar .fx-jar-extra { display: block; margin-top: 8px; font-size: 14px; }
.fx-jar:has(.fx-jar-sw:nth-child(1 of :checked)) { --fx-taken: 1; }
.fx-jar:has(.fx-jar-sw:nth-child(2 of :checked)) { --fx-taken: 2; }
.fx-jar:has(.fx-jar-sw:nth-child(3 of :checked)) { --fx-taken: 3; }
.fx-jar:has(.fx-jar-sw:nth-child(4 of :checked)) { --fx-taken: 4; }
.fx-jar:has(.fx-jar-sw:nth-child(5 of :checked)) { --fx-taken: 5; }
.fx-jar:has(.fx-jar-sw:nth-child(6 of :checked)) { --fx-taken: 6; }
.fx-jar:has(.fx-jar-sw:nth-child(7 of :checked)) { --fx-taken: 7; }
.fx-jar:has(.fx-jar-sw:nth-child(8 of :checked)) { --fx-taken: 8; }
.fx-jar:has(.fx-jar-sw:nth-child(9 of :checked)) { --fx-taken: 9; }
.fx-jar:has(.fx-jar-sw:nth-child(10 of :checked)) { --fx-taken: 10; }
.fx-jar:not(:has(.fx-jar-sw:checked)) .fx-jar-n0, .fx-jar:has(.fx-jar-sw:nth-child(1 of :checked):nth-last-child(1 of :checked)) .fx-jar-n1, .fx-jar:has(.fx-jar-sw:nth-child(2 of :checked):nth-last-child(1 of :checked)) .fx-jar-n2, .fx-jar:has(.fx-jar-sw:nth-child(3 of :checked):nth-last-child(1 of :checked)) .fx-jar-n3, .fx-jar:has(.fx-jar-sw:nth-child(4 of :checked):nth-last-child(1 of :checked)) .fx-jar-n4, .fx-jar:has(.fx-jar-sw:nth-child(5 of :checked):nth-last-child(1 of :checked)) .fx-jar-n5, .fx-jar:has(.fx-jar-sw:nth-child(6 of :checked):nth-last-child(1 of :checked)) .fx-jar-n6, .fx-jar:has(.fx-jar-sw:nth-child(7 of :checked):nth-last-child(1 of :checked)) .fx-jar-n7, .fx-jar:has(.fx-jar-sw:nth-child(8 of :checked):nth-last-child(1 of :checked)) .fx-jar-n8, .fx-jar:has(.fx-jar-sw:nth-child(9 of :checked):nth-last-child(1 of :checked)) .fx-jar-n9, .fx-jar:has(.fx-jar-sw:nth-child(10 of :checked):nth-last-child(1 of :checked)) .fx-jar-n10 { visibility: visible; }
.fx-jar:has(#fx-jar-s1:checked) .fx-jar-c1, .fx-jar:has(#fx-jar-s2:checked) .fx-jar-c2, .fx-jar:has(#fx-jar-s3:checked) .fx-jar-c3, .fx-jar:has(#fx-jar-s4:checked) .fx-jar-c4, .fx-jar:has(#fx-jar-s5:checked) .fx-jar-c5, .fx-jar:has(#fx-jar-s6:checked) .fx-jar-c6, .fx-jar:has(#fx-jar-s7:checked) .fx-jar-c7, .fx-jar:has(#fx-jar-s8:checked) .fx-jar-c8, .fx-jar:has(#fx-jar-s9:checked) .fx-jar-c9, .fx-jar:has(#fx-jar-s10:checked) .fx-jar-c10 { --fx-out: 1; }
@container (max-width: 480px) { .fx-jar .fx-jar-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fx-jar .fx-jar-scene { height: 640px; grid-template-columns: minmax(0, 1fr); grid-template-rows: 374px 218px; } .fx-jar .fx-jar-countdown { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .fx-jar .fx-jar-sweet { transition: none; } }