/* PoC 7.8 · pages/creation-blocks.css · from poc76b.html lines 199–230 */
/* creation · assets and the inspection plate */
svg.aspot{opacity:0;transition:opacity .5s}
svg.aspot.on{opacity:1}
svg.aspot path{fill:rgba(4,2,16,.62);fill-rule:evenodd}
svg.aspot rect,svg.ahov rect{fill:none;stroke:var(--teal);stroke-width:2;vector-effect:non-scaling-stroke;filter:drop-shadow(0 0 6px rgba(95,243,230,.8))}
svg.ahov rect{stroke:rgba(255,255,255,.6);stroke-dasharray:6 6;opacity:0;transition:opacity .2s}
svg.ahov rect.on{opacity:1}
#plate{right:clamp(16px,6vw,96px);top:46%;width:min(290px,24vw);aspect-ratio:1;transform:translateY(-50%);border-radius:50%;background:radial-gradient(circle at 50% 62%,rgba(95,243,230,.2),rgba(8,6,26,.88) 64%);border:1px solid rgba(95,243,230,.45);box-shadow:0 0 0 10px rgba(95,243,230,.05),0 30px 80px rgba(0,0,0,.6);display:grid;place-items:center}
#plate::before{content:"";position:absolute;inset:7%;border-radius:50%;border:1.5px dashed rgba(95,243,230,.45);animation:spin 30s linear infinite}
#plate.hot{box-shadow:0 0 0 10px rgba(95,243,230,.18),0 0 60px rgba(95,243,230,.5)}
#plate .pimg{position:relative;width:78%;aspect-ratio:1;border-radius:50%;background-repeat:no-repeat;transition:transform .5s}
#plate.land .pimg{animation:land .6s ease-out}
#plate .pempty{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:24%;font-size:13px;color:var(--dim)}
#plate .pempty[hidden]{display:none}
#plate .pcap{position:absolute;top:calc(100% + 10px);left:50%;transform:translateX(-50%);text-align:center;white-space:nowrap}
#plate .pcap b{display:block;font-family:ui-serif,Georgia,serif;font-weight:500;font-size:20px}
#plate .pcap span{font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--teal)}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes land{0%{transform:scale(.6);opacity:.3}70%{transform:scale(1.05)}100%{transform:none}}
#ghost{position:fixed;z-index:12;width:120px;aspect-ratio:1;border-radius:50%;background-repeat:no-repeat;pointer-events:none;box-shadow:0 0 0 2px var(--teal),0 0 40px rgba(95,243,230,.6);display:none}
.tray{pointer-events:auto;display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.tray button{width:44px;height:44px;border-radius:10px;border:1px solid rgba(255,255,255,.25);background-repeat:no-repeat;cursor:pointer;padding:0}
.tray button[aria-pressed=true]{border-color:var(--teal);box-shadow:0 0 0 2px var(--teal),0 0 14px rgba(95,243,230,.6)}
/* the scale dial */
.dial{display:flex;align-items:center;gap:0;margin-top:14px;pointer-events:auto;flex-wrap:wrap}
.dial button{position:relative;border:0;background:transparent;cursor:pointer;padding:22px 10px 4px;font-size:12px;letter-spacing:.06em;color:var(--dim);min-height:44px}
.dial button::before{content:"";position:absolute;left:50%;top:6px;width:10px;height:10px;margin-left:-5px;border-radius:50%;border:1.5px solid rgba(255,255,255,.6);background:var(--bg);transition:all .3s}
.dial button::after{content:"";position:absolute;top:10.5px;left:calc(50% + 7px);width:calc(100% - 14px);height:1.5px;background:rgba(255,255,255,.25)}
.dial button:last-child::after{display:none}
.dial button[aria-pressed=true]{color:var(--ink)}
.dial button[aria-pressed=true]::before{background:var(--teal);border-color:var(--teal);box-shadow:0 0 12px var(--teal);transform:scale(1.25)}
.dial button:focus-visible{outline:2px solid #fff;outline-offset:2px;border-radius:8px}
/* creation · building blocks: the dive from the world onto the island */
/* each kind of block fills the facing page: dust, a pen, the sketch, then the real block floating above the paper */
#dive[data-k="build"] .pc .it:has(>p.wr:empty){position:relative;min-height:max(240px,calc(var(--ph) - 132px));margin:0}
#dive[data-k="build"] .pc .it:has(>p.wr:empty)>:is(.dd,p){display:none}
#dive .bstage{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(8px,2vh,18px);pointer-events:none;container-type:size}
#dive .bart{position:relative;width:min(88cqw,calc(100cqh - 104px));aspect-ratio:1;flex:none}
#dive .bart>*{position:absolute}
#dive .bsk{inset:0;width:100%;height:100%;overflow:visible;transition:opacity 1s}
#dive .bsk *{fill:none!important;stroke:var(--pencil);stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
#dive .bstage:not(.go) .bsk{opacity:0}
#dive .bstage.rl .bsk{opacity:.16}
#dive .bdust{inset:0;width:100%;height:100%}
#dive .bpen{left:0;top:0;width:16px;height:43px;margin:-41px 0 0 -8px;transform-origin:50% 95%;opacity:0;filter:drop-shadow(2px 4px 3px rgba(40,25,60,.35));will-change:transform}
#dive .bpen svg{display:block;width:100%;height:100%}
#dive .bfl{inset:6%;perspective:900px}
#dive .breal{position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle at 50% 62%,rgba(95,243,230,.16),rgba(10,8,30,.94) 66%);box-shadow:0 0 0 1px rgba(95,243,230,.5),0 0 0 7px rgba(95,243,230,.06),0 30px 40px -24px rgba(30,18,50,.7);overflow:hidden;opacity:0}
#dive .breal>*{position:absolute;inset:0;width:100%;height:100%}
#dive .breal .bimg{inset:7%;width:86%;height:86%;border-radius:50%;background-repeat:no-repeat}
#dive .breal svg{inset:8%;width:84%;height:84%;overflow:visible}
#dive .b-fire .breal .bfls{opacity:0}
#dive .b-fire.still .breal .bfls{opacity:1}#dive .b-fire.still .bfire{display:none}
#dive .bstage.rl .breal{animation:breal 1.3s cubic-bezier(.3,.7,.3,1) both}
#dive .bstage.up .bfl{animation:blift 1.2s cubic-bezier(.3,.8,.3,1) both,bfloat 6s ease-in-out 1.2s infinite}
#dive .bsh{left:20%;right:20%;bottom:-2%;height:18px;border-radius:50%;background:radial-gradient(closest-side,rgba(40,25,60,.42),transparent);opacity:0;transition:opacity .6s}
#dive .bstage.rl .bsh{opacity:1}
#dive .bstage.up .bsh{animation:bshad 6s ease-in-out 1.2s infinite}
#dive .bcap{position:relative;display:grid;justify-items:center;gap:3px;text-align:center;color:var(--ink)}
#dive .bcap b{font:600 clamp(22px,calc(var(--pw)*.052),30px)/1 var(--hand)}
#dive .bcap small{font-size:10.5px;letter-spacing:.16em;text-transform:uppercase;color:var(--pencil)}
#dive .bst{display:flex;gap:6px;list-style:none;margin:4px 0 0;padding:0}
#dive .bst li{font:500 16px/1 var(--hand);color:var(--pencil);opacity:.68;padding:2px 6px;border-radius:999px;transition:all .4s}
#dive .bst li.dn{opacity:.75}
#dive .bst li.on{opacity:1;color:#fff;background:#5b3f8c}
/* life once it is real: skeletons, anchor points and idle motion */
#dive .breal svg *{transform-box:view-box}
#dive .brig line{stroke:#5ff3e6;stroke-width:1.6;stroke-linecap:round}
#dive .brig circle{fill:#0a0f1c;stroke:#5ff3e6;stroke-width:1.6}
#dive .brig{opacity:0;filter:drop-shadow(0 0 3px rgba(95,243,230,.9))}
#dive .bstage.up .brig{animation:brig 8s ease-in-out .3s infinite}
#dive .breal svg .bsock{transform-box:fill-box;transform-origin:50% 50%}
#dive .bsock{fill:none;stroke:#5ff3e6;stroke-width:1.6;stroke-dasharray:3 3;opacity:0}
#dive .bstage.up .bsock{animation:bsock 2.6s ease-in-out 1.4s infinite}
#dive .b-npc .bsw{transform-origin:139px 116px;opacity:0}
#dive .b-npc.up .bsw{animation:bsnap .9s cubic-bezier(.3,1.5,.5,1) 1.1s both}
#dive .b-npc .barm{transform-origin:128px 64px}
#dive .b-npc.up .barm{animation:bswing 4.4s ease-in-out 2.2s infinite}
#dive .bbody{transform-origin:100px 178px}
#dive .bstage.up .bbody{animation:bbreath 3.8s ease-in-out infinite}
#dive .bstage.up .beye{animation:beye 3s ease-in-out infinite}
#dive .bshine{opacity:0}
#dive .b-weapon.up .bshine{animation:bshine 3.2s ease-in-out .6s infinite}
#dive .b-shield.up .breal svg{animation:bwob 5.5s ease-in-out infinite}
#dive .b-plant.up .bimg{transform-origin:50% 92%;animation:bsway 5s ease-in-out infinite}
#dive .b-animal.up .bimg{transform-origin:50% 90%;animation:bbreath 3.4s ease-in-out infinite}
#dive .b-stone .breal::after,#dive .b-building .breal::after{content:"";position:absolute;inset:0;border-radius:50%;pointer-events:none;opacity:0}
#dive .b-stone.up .breal::after{background:linear-gradient(115deg,transparent 40%,rgba(255,255,255,.35) 50%,transparent 60%) -200% 0/300% 100% no-repeat;opacity:1;animation:bglint 4.5s ease-in-out .5s infinite}
#dive .b-building.up .breal::after{background:radial-gradient(circle at 50% 54%,rgba(255,200,110,.45),transparent 22%);animation:bglow 3.2s ease-in-out infinite}
/* the opening page: every kind of block as a token */
#dive .bstage.b0{pointer-events:auto;gap:clamp(10px,2.4vh,20px)}
#dive .bov{display:grid;grid-template-columns:repeat(3,1fr);gap:clamp(6px,1.6cqh,14px) clamp(6px,2cqw,16px);width:min(92cqw,calc((100cqh - 90px) * .92))}
#dive .bgo{display:grid;justify-items:center;gap:4px;padding:4px;border:0;background:none;cursor:pointer;color:var(--ink);font:inherit;border-radius:12px}
#dive .bgo b{font:500 clamp(14px,calc(var(--pw)*.034),19px)/1 var(--hand)}
#dive .bmini{position:relative;width:min(100%,92px);aspect-ratio:1;border-radius:50%;overflow:hidden;background:radial-gradient(circle at 50% 62%,rgba(95,243,230,.16),rgba(10,8,30,.94) 66%);box-shadow:0 0 0 1px rgba(95,243,230,.45),0 8px 16px -8px rgba(30,18,50,.6);transition:transform .3s,box-shadow .3s}
#dive .bmini>*{position:absolute;inset:8%;width:84%;height:84%}
#dive .bmini .bimg{background-repeat:no-repeat;border-radius:50%}
#dive .bmini .brig,#dive .bmini .bsock,#dive .bmini .bshine{display:none}
#dive .bgo:hover .bmini,#dive .bgo:focus-visible .bmini{transform:translateY(-4px) scale(1.05);box-shadow:0 0 0 2px #5ff3e6,0 0 18px rgba(95,243,230,.5)}
#dive .bgo:focus-visible{outline:2px solid #5b3f8c;outline-offset:2px}
@keyframes breal{0%{opacity:0;filter:grayscale(1) sepia(.7) contrast(1.5) brightness(1.5) blur(5px);clip-path:inset(100% 0 0 0 round 50%)}45%{opacity:1;filter:grayscale(1) sepia(.7) contrast(1.5) brightness(1.4) blur(1px);clip-path:inset(0 0 0 0 round 50%)}100%{opacity:1;filter:none;clip-path:inset(0 0 0 0 round 50%)}}
@keyframes blift{0%{transform:none}100%{transform:translateY(-14px) scale(1.04)}}
@keyframes bfloat{0%,100%{transform:translateY(-14px) scale(1.04)}50%{transform:translateY(-24px) scale(1.04)}}
@keyframes bshad{0%,100%{transform:scale(.9);opacity:.85}50%{transform:scale(.76);opacity:.6}}
@keyframes brig{0%,55%,100%{opacity:0}12%,40%{opacity:.95}}
@keyframes bsock{0%,100%{opacity:0;transform:scale(1.4)}30%,70%{opacity:1;transform:scale(1)}}
@keyframes bsnap{0%{opacity:0;transform:translate(30px,-46px) rotate(-38deg)}60%{opacity:1}100%{opacity:1;transform:none}}
@keyframes bswing{0%,100%{transform:rotate(0)}50%{transform:rotate(-4deg)}}
@keyframes bbreath{0%,100%{transform:scaleY(1)}50%{transform:scaleY(1.018)}}
@keyframes beye{0%,100%{opacity:1}50%{opacity:.55}}
@keyframes bshine{0%,100%{opacity:0}40%,60%{opacity:.9}}
@keyframes bwob{0%,100%{transform:perspective(500px) rotateY(-16deg)}50%{transform:perspective(500px) rotateY(16deg)}}
@keyframes bsway{0%,100%{transform:rotate(-1.4deg)}50%{transform:rotate(1.4deg)}}
@keyframes bglint{0%{background-position:-200% 0}60%,100%{background-position:200% 0}}
@keyframes bglow{0%,100%{opacity:.55}50%{opacity:1}}
@media (prefers-reduced-motion:reduce){#dive .bstage *,#dive .bstage *::after{animation:none!important}#dive .bstage .breal{opacity:1}#dive .bstage .bsw{opacity:1}#dive .bstage .bsock{opacity:.8}}
.paused #dive .bstage *,.paused #dive .bstage *::after{animation:none!important}.paused #dive .bstage .breal{opacity:1}.paused #dive .bstage .bsw{opacity:1}
/* one page at a time: the block is drawn under its own text, so the story and the drawing share a page */
@media (max-width:859.98px){#dive[data-k="build"] .pc .it:has(>p.wr:empty){min-height:max(250px,calc(var(--ph)*.52))}#dive .bst li{font-size:14px;padding:2px 4px}}
#dive .bstage.rl:has(.bimg) .bsk{opacity:0}

/* master pass · the step pills are a scrub bar: drag along them to run the birth forwards or backwards */
#dive .bst{pointer-events:auto;touch-action:none;cursor:ew-resize;user-select:none;-webkit-user-select:none;position:relative;padding:4px 2px 10px}
#dive .bst::after{content:"";position:absolute;left:8px;right:8px;bottom:3px;height:2px;border-radius:2px;background:repeating-linear-gradient(90deg,var(--pencil) 0 4px,transparent 4px 8px);opacity:.35}
#dive .bstage.scrub .bst li{transition:none}
#dive .bstage.scrub .bst::after{opacity:.7}
