/* Scoped toy-tile UI; all sizes follow Zone B, never the browser window. */
.magic-cube-module{container-type:size;width:100%;height:100%;min-height:0;position:relative;display:flex;align-items:center;justify-content:center;gap:16px;padding:12px;flex-direction:column;box-sizing:border-box;color:#000;font-family:inherit;overflow:hidden;--magic-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
.magic-cube-module *{box-sizing:border-box}
.magic-cube-module [hidden]{display:none!important}
.magic-cube-stage{--magic-d:min(15cqh,100px,16cqw);--magic-c:min(19cqh,230px,40cqw);--magic-big:min(90cqh,560px,88cqw);display:flex;flex-direction:column;align-items:center;gap:16px;flex:none}
.magic-cube-module .magic-cube-button{margin:0;box-shadow:none;transform:none;transition:background-color .15s,color .15s;border:2px solid #000;border-radius:8px;padding:10px 18px;background:#fff;color:#000;font-family:'Work Sans',system-ui,sans-serif;font-weight:600;font-size:18px;line-height:1.2;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.magic-cube-module .magic-cube-button:hover{transform:none}
.magic-cube-module .magic-cube-button:focus-visible{outline:3px solid #7855ff;outline-offset:3px}
.magic-cube-module .magic-cube-button:disabled{cursor:default;opacity:.5}
.magic-cube-representation{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}
.magic-cube-module.is-frame .magic-cube-representation{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}
.magic-cube-module.is-solo .magic-cube-representation{width:var(--magic-big);height:var(--magic-big);display:flex;flex-direction:column;gap:0}
.magic-cube-module .magic-cube-digit,.magic-cube-module .magic-cube-word{position:relative;z-index:1;border:0;background:transparent;padding:0;min-height:0;font-size:var(--magic-d);line-height:1;font-weight:400;border-radius:0;text-shadow:0 1px 0 rgba(255,255,255,.45)}
.magic-cube-module .magic-cube-digit,.magic-cube-tile-digit{font-family:'DM Mono',ui-monospace,Menlo,Consolas,monospace;font-weight:400}
.magic-cube-module.is-solo .magic-cube-digit{font-size:calc(var(--magic-big)*.5);transition:font-size .6s cubic-bezier(.2,1.4,.4,1),opacity .35s}
.magic-cube-module.is-solo .magic-cube-word{font-family:'Work Sans',system-ui,sans-serif;font-size:calc(var(--magic-big)*.16);text-transform:capitalize;margin-top:calc(var(--magic-big)*.03);transition:font-size .6s cubic-bezier(.2,1.4,.4,1),margin .6s,opacity .35s}
.magic-cube-module.is-solo.no-digit .magic-cube-digit,.magic-cube-module.is-solo.no-word .magic-cube-word{font-size:0;opacity:0;margin-top:0;pointer-events:none}
.magic-cube-module.is-solo.no-digit .magic-cube-word{font-size:calc(var(--magic-big)*.28);opacity:1}
.magic-cube-module.is-solo.no-digit.no-word .magic-cube-word{font-size:0;opacity:0;margin-top:0}
.magic-cube-module .magic-cube-solo{--magic-u:var(--magic-big);position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:0}
.magic-cube-frame{display:grid;grid-template-columns:repeat(2,calc(var(--magic-c)*.942));grid-template-rows:repeat(5,calc(var(--magic-c)*.942));gap:0;padding:0 calc(var(--magic-c)*.058) calc(var(--magic-c)*.058) 0}
.magic-cube-module .magic-cube-slot{--magic-u:var(--magic-c);width:var(--magic-c);height:var(--magic-c);border:calc(var(--magic-c)*.058) solid transparent;background:transparent;padding:0;border-radius:0;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1;overflow:hidden}
.magic-cube-module .magic-cube-slot.is-filled{border-color:#ebebeb;opacity:1}
.magic-cube-module .magic-cube-solo,.magic-cube-module .magic-cube-slot.is-filled,.magic-cube-module .magic-cube-small{position:relative;overflow:hidden;background:var(--magic-grain),linear-gradient(150deg,var(--magic-pink-light) 0%,var(--magic-pink) 42%,var(--magic-pink-end) 100%);box-shadow:inset 0 calc(var(--magic-u)*.035) 0 #ffffff8c,inset 0 calc(var(--magic-u)*-.05) 0 #0000002b,inset calc(var(--magic-u)*.03) 0 0 #ffffff47,inset calc(var(--magic-u)*-.03) 0 0 #00000017}
.magic-cube-module .magic-cube-solo{position:absolute}
.magic-cube-module .magic-cube-solo::before,.magic-cube-module .magic-cube-slot.is-filled::before,.magic-cube-small::before{content:"";position:absolute;inset:0;background:linear-gradient(135deg,#ffffff80 0%,#ffffff00 38%);pointer-events:none}
.magic-cube-tile-digit,.magic-cube-tile-word{position:relative;z-index:1;color:#000;pointer-events:none;text-shadow:0 1px 0 #ffffff73}
.magic-cube-tile-digit{font-size:calc(var(--magic-c)*.46)}
.magic-cube-tile-word{font-family:'Work Sans',system-ui,sans-serif;font-size:calc(var(--magic-c)*.17);font-weight:400;line-height:1;margin-top:calc(var(--magic-c)*.03)}
.magic-cube-module.no-digit .magic-cube-tile-word{font-size:calc(var(--magic-c)*.22)}
.magic-cube-controls{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;max-width:560px}
.magic-cube-module.is-wide{flex-direction:row;gap:56px}
.magic-cube-module.is-wide .magic-cube-controls{flex-direction:column;flex-wrap:nowrap;align-items:stretch;min-width:170px}
.magic-cube-module.is-wide .magic-cube-controls .magic-cube-button{font-size:20px;padding:12px 18px}
.magic-cube-module.is-wide .magic-cube-adder{padding:0}
.magic-cube-options{display:contents}
.magic-cube-adders{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap;flex-basis:100%}
.magic-cube-module.is-wide .magic-cube-adders{flex-basis:auto;flex-wrap:nowrap}
.magic-cube-module .magic-cube-adder{--btn:clamp(58px,9cqh,76px);width:var(--btn);height:var(--btn);min-width:44px;min-height:44px;padding:0;border:0;border-radius:50%;display:grid;place-items:center;color:#111;background:linear-gradient(180deg,#fff,#f0f0f0);box-shadow:inset 0 1px 0 #fff,0 0 0 1.5px #00000014,0 8px 18px #0000001f;transition:transform .14s cubic-bezier(.2,1.4,.4,1),box-shadow .14s}
.magic-cube-module .magic-cube-adder.is-primary{color:#fff;background:linear-gradient(180deg,#333,#000);box-shadow:inset 0 1px 0 #ffffff33,0 8px 18px #0000004d}
.magic-cube-adder svg{width:44%;height:44%;fill:none;stroke:currentColor;stroke-width:2.8;stroke-linecap:round}
.magic-cube-module .magic-cube-adder:active:not(:disabled){transform:scale(.9);box-shadow:inset 0 1px 0 #ffffff26,0 3px 8px #0000002e}
@media(hover:hover){.magic-cube-module .magic-cube-adder:hover:not(:disabled){transform:translateY(-2px)}.magic-cube-module .magic-cube-adder:active:not(:disabled){transform:scale(.9)}}
.magic-cube-module .magic-cube-adders>.magic-cube-button:not(.magic-cube-adder){border:0;border-radius:999px;background:#f1f1f1;color:#444;padding:10px 20px}
.magic-cube-module .magic-cube-adders>.magic-cube-button:not(.magic-cube-adder):active{background:#e4e4e4}
.magic-cube-module .magic-cube-button.is-on{background:#000;color:#fff}
.magic-cube-groups{display:grid;grid-template-columns:repeat(2,1fr);gap:clamp(20px,5cqw,60px);width:min(75cqw,600px)}
.magic-cube-group{display:grid;grid-template-columns:repeat(3,1fr);align-content:center;gap:4px;padding:8px;min-height:8cqh;border:3px solid transparent}
.magic-cube-group.is-highlighted{border-color:#7855ff;border-radius:12px}
.magic-cube-small{--magic-u:min(7cqw,7cqh,52px);width:var(--magic-u);aspect-ratio:1;border:3px solid #ebebeb}
.magic-cube-choices{display:flex;gap:20px;justify-content:center}
.magic-cube-module .magic-cube-choice{font-family:'DM Mono',monospace;font-size:clamp(36px,9cqh,100px);padding:12px 26px}
.magic-cube-family{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;max-width:80cqw}
.magic-cube-family-digit{font-family:'DM Mono',monospace;font-size:clamp(24px,7cqw,72px);border:2px solid transparent;border-radius:8px;padding:6px}
.magic-cube-family-digit.is-highlighted{border-color:#7855ff;color:#7855ff}
.magic-cube-module.is-family .magic-cube-representation{display:none}
.magic-cube-module:has(.magic-cube-choices:not([hidden])) .magic-cube-stage{--magic-big:min(65cqh,440px,75cqw)}
@container(max-width:640px){
.magic-cube-stage{--magic-d:min(13cqh,72px,16cqw);--magic-c:min(19cqh,40cqw,150px);--magic-big:min(90cqh,88cqw,420px)}
.magic-cube-controls{gap:8px}
.magic-cube-module .magic-cube-options .magic-cube-button{font-size:16px;padding:10px 12px}

}
@media(prefers-reduced-motion:reduce){.magic-cube-module .magic-cube-button,.magic-cube-module.is-solo .magic-cube-digit,.magic-cube-module.is-solo .magic-cube-word{transition:none}}
.number-twins-phase2 .magic-cube-choice.is-guided-answer{outline:3px solid #7855ff;outline-offset:6px;box-shadow:0 0 0 10px #7855ff22}
.number-twins-phase2 .magic-cube-choice.is-dimmed{opacity:.3}
