#shape-secret[hidden],#shape-secret-note[hidden],#shape-choices[hidden],#shape-steps[hidden],#shape-rectangles[hidden]{display:none}
#shape-secret{margin-inline:3px;min-height:38px}
#shape-secret:before{content:'?';display:inline-flex;align-items:center;justify-content:center;width:19px;height:19px;margin-right:6px;border:1px dashed currentColor;border-radius:50%;font-weight:750;animation:secret-peek 3.5s ease-in-out infinite}
#shape-secret[aria-pressed="true"]:before{content:'↩';animation:none;border-style:solid}
.shape-units{transform:scale3d(var(--unit-fit,.8),var(--unit-fit,.8),var(--unit-fit,.8));transition:none}
.shape-arrived .unit-cube{transform:translate3d(calc(var(--shape-x)*var(--unit)),calc(var(--shape-y)*var(--unit)),0);transition-duration:1s}
.shape-group-label{position:absolute;left:calc(var(--label-x)*var(--unit));top:calc(var(--label-y)*var(--unit));transform:translate3d(-50%,-50%,calc(var(--unit)/2 + 2px));min-width:27px;padding:3px 7px;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fffcf9);color:var(--ink);font-size:calc(13px / var(--unit-fit,.8));font-weight:750;line-height:1.2;opacity:0;transition:opacity .2s;backface-visibility:hidden}
.shape-finished .shape-group-label{opacity:1}
.shape-square-face{position:absolute;left:calc(var(--label-x)*var(--unit));top:calc(var(--label-y)*var(--unit));width:calc(.5*var(--unit));height:calc(.18*var(--unit));border-bottom:calc(.045*var(--unit)) solid #302532;border-radius:0 0 50% 50%;transform:translateZ(calc(var(--unit)/2 + 2px));opacity:0;transition:opacity .2s 1s}
.shape-square-face:before,.shape-square-face:after{content:'';position:absolute;top:calc(-.42*var(--unit));width:calc(.3*var(--unit));height:calc(.32*var(--unit));border:1px solid #302532;border-radius:50%;background:radial-gradient(ellipse at 55% 55%,#302532 30%,white 33%)}
.shape-square-face:before{left:calc(-.22*var(--unit))}.shape-square-face:after{right:calc(-.22*var(--unit))}
.shape-arrived .shape-square-face{opacity:1}
.shape-squares.shape-arrived:not(.shape-finished) .unit-cube,.shape-squares.shape-arrived:not(.shape-finished) .shape-square-face{animation:shape-square-bounce .55s ease calc(1.05s + var(--square-order)*.16s)}
@keyframes shape-square-bounce{0%,100%{translate:0 0}45%{translate:0 calc(-.22*var(--unit))}}
@keyframes secret-peek{0%,80%,100%{transform:translateY(0) rotate(0)}88%{transform:translateY(-3px) rotate(-8deg)}94%{transform:translateY(-3px) rotate(8deg)}}
:root[data-life="off"] #shape-secret:before{animation:none}
:root[data-life="off"] .shape-units *{transition:none;animation:none}
@media(prefers-reduced-motion:reduce){#shape-secret:before{animation:none}.shape-units *{transition:none;animation:none}}

#shape-choices,#shape-rectangles{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-self:center;width:min(100%,360px);gap:8px;margin-top:10px;flex-shrink:0}
:is(#shape-choices,#shape-rectangles) button{min-width:0;min-height:44px;padding:8px 12px;white-space:normal;line-height:1.4}
:is(#shape-choices,#shape-rectangles) button.is-explored:before{content:'✓';margin-right:5px}
:is(#shape-choices,#shape-rectangles) button[aria-pressed="true"]{border-color:var(--purple);background:var(--accent-soft,#eee4fb)}
:is(#shape-choices,#shape-rectangles) button:disabled{cursor:default}

#shape-steps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-self:center;width:min(100%,440px);gap:6px;margin-top:10px;flex-shrink:0}
#shape-steps button{min-width:0;min-height:44px;padding:7px 8px;white-space:normal;line-height:1.4;font-size:12px}
#shape-steps button:disabled{cursor:default;opacity:.5}
#shape-steps button[aria-pressed="true"]{opacity:1;border-color:var(--purple);background:var(--accent-soft,#eee4fb)}
#shape-steps button[aria-pressed="true"]:before{content:'✓';margin-right:3px}
.shape-six .step-lit .unit-front{box-shadow:inset 0 0 0 3px var(--purple),inset 0 0 12px var(--accent-soft,#eee4fb)}
.shape-six .shape-group-label.step-lit{border-color:var(--purple);background:var(--accent-soft,#eee4fb)}

.shape-resizing .unit-cube{transition:none}
