/* PoC 7.8 · pages/creation-packs.css · the collection sketchbook: asset + motion + interaction points + sound = a pack */
#dive[data-k="pack"] .pc .it:has(>p.wr:empty){position:relative;min-height:max(260px,calc(var(--ph) - 132px));margin:0}
#dive[data-k="pack"] .pc .it:has(>p.wr:empty)>:is(.dd,p){display:none}
#dive .pst{gap:clamp(6px,2.4cqh,22px)}
/* each view offers its own book: building blocks outside the collection, the pack book only on it */
body:not([data-sv="1"]) [data-dive="pack"],body[data-sv="1"] [data-dive="build"]{display:none}
/* the sum: four pieces in a row with plus signs between them */
#dive .peq{display:flex;align-items:flex-start;justify-content:center;gap:clamp(2px,1.2cqw,10px);width:100%}
#dive .ptk{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;gap:3px;width:clamp(60px,21cqw,120px);text-align:center;color:var(--ink);opacity:0;transform:translateY(12px) scale(.82);transition:opacity .5s,transform .6s cubic-bezier(.3,.8,.3,1)}
#dive .ptk .bmini{display:block;width:100%}
#dive .pwh{display:block}
#dive .ptk b{max-width:100%;font:600 clamp(13px,4.2cqw,18px)/1.05 var(--hand);hyphens:auto;overflow-wrap:anywhere}
#dive .ptk small{font-size:clamp(9px,2.5cqw,11px);line-height:1.25;color:var(--pencil)}
#dive .ptk.in{opacity:1;transform:none}
#dive .pplus{align-self:flex-start;margin-top:clamp(18px,7cqw,40px);font:700 clamp(18px,6cqw,30px)/1 var(--hand);font-style:normal;color:#5b3f8c;opacity:0;transition:opacity .4s}
#dive .pplus:has(+.ptk.in){opacity:1}
/* the pieces fly into the pack, the pack takes over */
#dive .pst.mg .ptk{opacity:0;transform:translate(var(--dx,0),var(--dy,0)) scale(.3);transition:opacity .7s .15s,transform .8s cubic-bezier(.55,0,.35,1)}
#dive .pst.mg .peq .pplus{opacity:0;transition-delay:0s}
#dive .pres{display:flex;align-items:center;gap:clamp(8px,3cqw,22px);opacity:0;transform:scale(.7);transition:opacity .6s .35s,transform .9s .35s cubic-bezier(.3,1.3,.4,1)}
#dive .pres .peqs{margin:0;align-self:center;opacity:1}
#dive .pst.rl .pres{opacity:1;transform:none}
#dive .pbig{display:block;width:clamp(110px,min(34cqh,40cqw),180px)}
#dive .pst.up .pbig{box-shadow:0 0 0 2px #5ff3e6,0 0 34px rgba(95,243,230,.55),0 10px 22px -10px rgba(30,18,50,.6)}
/* once the pack is alive the sum comes back quietly above it, so the page reads piece + piece + piece + piece = pack */
#dive .pst.mg.up .ptk{opacity:.92;transform:scale(.86);transition:opacity .8s 1s,transform .01s .95s}
#dive .pst.mg.up .peq .pplus{opacity:.9;transition:opacity .8s 1.1s}
/* still frame: the whole sum side by side */
#dive .pst.fin .ptk{opacity:1;transform:none;transition:none}
#dive .pst.fin .pplus,#dive .pst.fin .pres{opacity:1;transform:none;transition:none}
/* inside the tokens */
#dive .pst .ghost{opacity:.42}
#dive .pmo{fill:none;stroke:#5ff3e6;stroke-width:3.2;stroke-linecap:round;stroke-dasharray:7 7}
#dive .ptk.in .pmo{animation:pmo 1.1s linear infinite}
#dive .psk{fill:rgba(95,243,230,.16);stroke:#5ff3e6;stroke-width:2.4;transform-box:fill-box;transform-origin:center}
#dive .psd{fill:#fff}
#dive .pzn{fill:rgba(255,211,106,.07);stroke:#ffd36a;stroke-width:2;stroke-dasharray:4 7}
#dive .ptk.in .psk,#dive .pst.up .psk{animation:psk 1.8s ease-in-out infinite}
#dive .pwv rect{fill:#f2a8ff;transform-box:fill-box;transform-origin:center}
#dive .ptk.in .pwv rect,#dive .pst.up .pwv rect{animation:pwv 1.1s ease-in-out var(--d) infinite}
#dive .prg circle{fill:none;stroke:#f2a8ff;stroke-width:1.6;opacity:0;transform-box:fill-box;transform-origin:center}
#dive .pst.up .prg circle{animation:prg 2.4s ease-out var(--d) infinite}
#dive .pst.up .pw .bbody{animation:bbreath 3.8s ease-in-out infinite}
#dive .pkx{animation:pkx 3s ease-in-out infinite}
@keyframes pmo{to{stroke-dashoffset:-28}}
@keyframes psk{0%,100%{transform:scale(1);opacity:.9}50%{transform:scale(1.35);opacity:.45}}
@keyframes pwv{0%,100%{transform:scaleY(.45)}50%{transform:scaleY(1)}}
@keyframes prg{0%{transform:scale(.55);opacity:.7}100%{transform:scale(1.5);opacity:0}}
@keyframes pkx{0%,100%{transform:translateY(0);opacity:.7}50%{transform:translateY(-5px);opacity:.25}}
/* the opening page: seven collections */
#dive .pov{grid-template-columns:repeat(4,1fr);width:min(96cqw,calc((100cqh - 90px) * 1.3))}
#dive .pgo{display:grid;justify-items:center;gap:4px;padding:4px;border:0;background:none;cursor:pointer;color:var(--ink);font:inherit;border-radius:12px}
#dive .pgo b{font:500 clamp(13px,calc(var(--pw)*.03),17px)/1.05 var(--hand);text-align:center}
#dive .pgo:hover .bmini,#dive .pgo: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 .pgo:focus-visible{outline:2px solid #5b3f8c;outline-offset:2px}
@media (prefers-reduced-motion:reduce){#dive .pst *,#dive .pst{animation:none!important;transition:none!important}#dive .pst .ptk,#dive .pst .pplus,#dive .pst .pres{opacity:1;transform:none}}
.paused #dive .pst *{animation:none!important}
@media (max-width:859.98px){#dive[data-k="pack"] .pc .it:has(>p.wr:empty){min-height:max(300px,calc(var(--ph)*.44))}#dive .pov{grid-template-columns:repeat(3,1fr)}#dive .ptk small{font-size:10px;line-height:1.2;color:var(--ink);opacity:.8}#dive .pst{gap:clamp(4px,1.4cqh,12px)}#dive .pst .pbig{width:clamp(96px,min(28cqh,40cqw),160px)}}
/* master pass: on narrow screens the chooser has 3 columns (3 rows for 7 packs), so the 4-column width formula overflowed its stage
   and the grid spilled over the page number and the next heading; size the stage and grid for 3 columns */
@media (max-width:859.98px){#dive[data-k="pack"] .pc .it:has(>p.wr:empty):has(>.pkov){min-height:max(420px,calc(var(--ph)*.52))}#dive .pov{width:min(96cqw,calc((100cqh - 100px) * .8))}}
/* master pass · a short stage (small phones) keeps the token row to its names, so nothing spills over the heading */
@container (max-height:329.98px){#dive .pst .ptk small{display:none}}
/* master pass · the pack pieces stand in warm dusk light, so every figure reads as a clear shape */
#dive .pst .bmini,#dive .pov .bmini{background:radial-gradient(circle at 50% 38%,#fff4dc,#efd7ad 48%,#c99e6c 78%,#8a6544);box-shadow:0 0 0 1px rgba(95,243,230,.55),0 8px 16px -8px rgba(30,18,50,.6)}
