.fx-eggbox { --fx-n: 0; --fx-full: 0; display: grid; gap: 16px; }
.fx-eggbox:has(#fx-eggbox-n1:checked) { --fx-n: 1; }
.fx-eggbox:has(#fx-eggbox-n2:checked) { --fx-n: 2; }
.fx-eggbox:has(#fx-eggbox-n3:checked) { --fx-n: 3; }
.fx-eggbox:has(#fx-eggbox-n4:checked) { --fx-n: 4; }
.fx-eggbox:has(#fx-eggbox-n5:checked) { --fx-n: 5; }
.fx-eggbox:has(#fx-eggbox-n6:checked) { --fx-n: 6; }
.fx-eggbox:has(#fx-eggbox-n7:checked) { --fx-n: 7; }
.fx-eggbox:has(#fx-eggbox-n8:checked) { --fx-n: 8; }
.fx-eggbox:has(#fx-eggbox-n9:checked) { --fx-n: 9; }
.fx-eggbox:has(#fx-eggbox-n10:checked) { --fx-n: 10; --fx-full: 1; }
.fx-eggbox .fx-eggbox-instructions, .fx-eggbox .fx-eggbox-goal, .fx-eggbox .fx-eggbox-hint, .fx-eggbox .fx-eggbox-controls, .fx-eggbox .fx-eggbox-work { color: var(--fx-ink); font-size: 16px; line-height: 1.5; }
.fx-eggbox .fx-eggbox-instructions, .fx-eggbox .fx-eggbox-goal, .fx-eggbox .fx-eggbox-hint { margin: 0; }
.fx-eggbox .fx-eggbox-instructions ol { margin: 0; padding-left: 24px; }
.fx-eggbox .fx-eggbox-instructions li + li { margin-top: 4px; }
.fx-eggbox .fx-eggbox-controls { border: 0; padding: 0; margin: 0; min-width: 0; }
.fx-eggbox .fx-eggbox-controls legend { padding: 0; margin-bottom: 10px; font-weight: 800; }
.fx-eggbox .fx-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-eggbox .fx-btn { position: relative; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; margin: 0; border: 2px solid var(--fx-muted); border-radius: 50%; background: var(--fx-paper); color: var(--fx-ink); font-size: 16px; font-weight: 800; line-height: 1; cursor: pointer; }
.fx-eggbox .fx-btn:has(input:checked) { background: var(--fx-sun); color: var(--fx-ink); border-color: var(--fx-ink); }
.fx-eggbox .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-grape); outline-offset: 3px; }
.fx-eggbox .fx-eggbox-work { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fx-eggbox .fx-eggbox-stage { box-sizing: border-box; height: 288px; min-width: 0; margin: 0; padding: 12px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; }
.fx-eggbox .fx-eggbox-stage svg { display: block; width: 100%; height: 100%; max-width: 440px; min-height: 0; justify-self: center; }
.fx-eggbox .fx-eggbox-lid, .fx-eggbox .fx-eggbox-tray { fill: var(--fx-sun-pale); stroke: var(--fx-ink); stroke-width: 2; stroke-linejoin: round; }
.fx-eggbox .fx-eggbox-front { fill: var(--fx-sun); stroke: var(--fx-ink); stroke-width: 2; stroke-linejoin: round; }
.fx-eggbox .fx-eggbox-fold { fill: none; stroke: var(--fx-muted); stroke-width: 2; }
.fx-eggbox .fx-eggbox-glow { fill: none; stroke: var(--fx-sun); stroke-width: 8; stroke-linejoin: round; opacity: var(--fx-full); transition: opacity 0.3s; }
.fx-eggbox .fx-eggbox-cup { --fx-on: clamp(0, calc(var(--fx-n) - var(--fx-i) + 1), 1); }
.fx-eggbox .fx-eggbox-hollow { fill: var(--fx-sun-pale); stroke: var(--fx-muted); stroke-width: 2; stroke-dasharray: 4 4; }
.fx-eggbox .fx-eggbox-rim { fill: var(--fx-sun-pale); stroke: var(--fx-ink); stroke-width: 2; opacity: var(--fx-on); }
.fx-eggbox .fx-eggbox-egg { fill: var(--fx-paper); stroke: var(--fx-ink); stroke-width: 2; opacity: var(--fx-on); transform: translateY(calc((1 - var(--fx-on)) * -14px)); transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), opacity 0.25s; }
.fx-eggbox .fx-eggbox-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; font-size: 14px; line-height: 1.4; }
.fx-eggbox .fx-eggbox-key span { display: inline-flex; align-items: center; gap: 6px; }
.fx-eggbox .fx-eggbox-key-eggs::before { content: ""; box-sizing: border-box; width: 15px; height: 20px; border: 2px solid var(--fx-ink); border-radius: 50% 50% 45% 45%; background: var(--fx-paper); }
.fx-eggbox .fx-eggbox-key-gaps::before { content: ""; box-sizing: border-box; width: 22px; height: 16px; border: 2px dashed var(--fx-muted); border-radius: 50%; background: var(--fx-sun-pale); }
.fx-eggbox .fx-eggbox-readout { display: grid; gap: 10px; min-width: 0; }
.fx-eggbox .fx-eggbox-messages { display: grid; min-width: 0; }
.fx-eggbox .fx-eggbox-messages p { grid-area: 1 / 1; visibility: hidden; margin: 0; padding: 14px; color: var(--fx-ink); background: var(--fx-sky-pale); }
.fx-eggbox .fx-eggbox-description { display: block; margin-top: 12px; font-size: 14px; }
.fx-eggbox:has(#fx-eggbox-n0:checked) .fx-eggbox-s0, .fx-eggbox:has(#fx-eggbox-n1:checked) .fx-eggbox-s1, .fx-eggbox:has(#fx-eggbox-n2:checked) .fx-eggbox-s2, .fx-eggbox:has(#fx-eggbox-n3:checked) .fx-eggbox-s3, .fx-eggbox:has(#fx-eggbox-n4:checked) .fx-eggbox-s4, .fx-eggbox:has(#fx-eggbox-n5:checked) .fx-eggbox-s5, .fx-eggbox:has(#fx-eggbox-n6:checked) .fx-eggbox-s6, .fx-eggbox:has(#fx-eggbox-n7:checked) .fx-eggbox-s7, .fx-eggbox:has(#fx-eggbox-n8:checked) .fx-eggbox-s8, .fx-eggbox:has(#fx-eggbox-n9:checked) .fx-eggbox-s9, .fx-eggbox:has(#fx-eggbox-n10:checked) .fx-eggbox-s10 { visibility: visible; }
@container (max-width: 480px) { .fx-eggbox .fx-eggbox-work { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .fx-eggbox .fx-eggbox-egg, .fx-eggbox .fx-eggbox-glow { transition: none; } }