/* Contain horizontal spill so a long burst can fly past the box without widening the page. */
html:has(body.pal-vibe-candy),body.pal-vibe-candy{overflow-x:clip}
/* Vibe Candy page head: a field of real bracketed bursts. Tap draws a fresh chip from the bag. Paper and ink, bright candy fills. */
.vcp-stage{position:relative;display:flex;flex-wrap:wrap;gap:12px 14px;justify-content:center;align-items:center;
  margin:18px 0 10px;padding:22px 14px 30px;border:2px solid var(--ink,#201B0F);background:var(--pp2,#E7EED9);
  box-shadow:inset 0 0 0 3px var(--pp,#ECF1E6);overflow:hidden;-webkit-user-select:none;user-select:none;
  min-height:7.5rem}
.vcp-stage.is-spilling{overflow:visible;z-index:4}
.vcp-stage::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.5;
  background:radial-gradient(circle,rgba(32,27,15,.16) 1.2px,transparent 1.6px) 0 0/18px 18px}
.vcp-chip{--f:#7ABEA8;position:relative;display:inline-flex;flex-direction:column;align-items:center;justify-content:center;
  max-width:100%;min-width:0;box-sizing:border-box;padding:6px 12px 8px;cursor:pointer;
  font:700 clamp(14px,3.6vw,19px)/1.3 var(--mono),"Grimoire Candy",monospace;color:var(--ink,#201B0F);
  background:var(--f);border:2px solid var(--ink,#201B0F);border-radius:999px;box-shadow:3px 3px 0 var(--ink,#201B0F);
  touch-action:manipulation;-webkit-tap-highlight-color:transparent;
  animation:vcp-bob 4.6s ease-in-out infinite;transition:background-color .25s,border-radius .3s}
.vcp-chip .vcp-text{display:block;max-width:100%;white-space:nowrap;text-align:center}
.vcp-chip:nth-child(1){--f:#7ABEA8;rotate:-3deg}
.vcp-chip:nth-child(2){--f:#FAD50C;rotate:2deg;animation-duration:5.2s;animation-delay:-1.1s}
.vcp-chip:nth-child(3){--f:#F2A3C4;rotate:-1.5deg;animation-duration:4.1s;animation-delay:-2.3s}
.vcp-chip:nth-child(4){--f:#FCAF2C;rotate:3deg;animation-duration:5.6s;animation-delay:-.4s}
.vcp-chip:nth-child(5){--f:#67AF52;rotate:-2.5deg;animation-duration:4.4s;animation-delay:-3s}
.vcp-chip:nth-child(6){--f:#C9B3DD;rotate:1.5deg;animation-duration:5s;animation-delay:-1.8s}
.vcp-chip:nth-child(7){--f:#FA522C;rotate:-3.5deg;animation-duration:4.8s;animation-delay:-2.7s}
.vcp-chip:nth-child(8){--f:#7ABEA8;rotate:2.5deg;animation-duration:5.4s;animation-delay:-.9s}
.vcp-chip:nth-child(9){--f:#FAD50C;rotate:-2deg;animation-duration:4.3s;animation-delay:-3.4s}
.vcp-chip:hover,.vcp-chip:focus-visible{animation:vcp-wobble .5s ease-in-out infinite;z-index:2}
.vcp-chip:focus-visible{outline:2px solid var(--ink,#201B0F);outline-offset:3px}
.vcp-chip.is-pop{animation:vcp-pop .5s cubic-bezier(.2,1.4,.4,1) 1;z-index:3}
/* Long chips: layout box stays in the stage (max-width 100%). During the whack, the nowrap
   text paints past the pill and the pill scales — a brief spill, then it wraps and settles. */
.vcp-chip.is-long{border-radius:28px;align-self:stretch;flex:1 1 100%;max-width:100%}
.vcp-chip.is-long:not(.is-whack) .vcp-text{white-space:normal;overflow-wrap:anywhere;word-break:break-word}
.vcp-chip.is-whack{animation:vcp-whack 1.05s cubic-bezier(.2,1.4,.3,1) 1;z-index:6;max-width:100%;overflow:visible}
.vcp-chip.is-whack .vcp-text{white-space:nowrap;max-width:none}
.vcp-flavor{display:none;margin-top:.35em;padding:2px 9px 3px;max-width:100%;
  font:italic 600 11px/1.3 Georgia,"Times New Roman",serif;letter-spacing:.01em;color:#201B0F;
  background:#f3efe3;border:1px solid #201B0F;border-radius:999px;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
.vcp-chip.has-flavor .vcp-flavor{display:block}
.vcp-spark{position:absolute;left:var(--x);top:var(--y);width:1em;height:1em;margin:-.5em 0 0 -.5em;display:grid;place-items:center;
  font:700 18px/1 var(--mono),"Grimoire Candy",monospace;color:var(--c,#201B0F);text-shadow:0 0 0 var(--ink,#201B0F),1px 1px 0 var(--ink,#201B0F);
  pointer-events:none;z-index:4;animation:vcp-spark .8s ease-out forwards}
.vcp-stage .vcp-hint{position:absolute;left:0;right:0;bottom:6px;margin:0;max-width:none;white-space:normal;text-align:center;font-size:11px;letter-spacing:.12em;text-transform:uppercase;
  color:var(--ink-soft,#554C32);pointer-events:none}
.vcp-live{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@keyframes vcp-bob{0%,100%{translate:0 0}50%{translate:0 -6px}}
@keyframes vcp-wobble{0%,100%{scale:1.06;rotate:-3deg}50%{scale:1.1;rotate:3deg}}
@keyframes vcp-pop{0%{scale:1}35%{scale:.55}70%{scale:1.2}100%{scale:1}}
@keyframes vcp-whack{
  0%{scale:1;rotate:0deg}
  18%{scale:.62;rotate:-4deg}
  48%{scale:1.28;rotate:5deg}
  72%{scale:1.08;rotate:-2deg}
  100%{scale:1;rotate:0deg}
}
@keyframes vcp-spark{from{translate:0 0;scale:.6;opacity:1}to{translate:var(--dx) var(--dy);scale:1.25;opacity:0}}
@media (max-width:600px){
  .vcp-stage{gap:10px 10px;padding:18px 8px 28px}
  .vcp-chip:nth-child(n+8){display:none}
  .vcp-chip{padding:5px 10px 7px}
}
@media (prefers-reduced-motion:reduce){
  .vcp-chip,.vcp-chip:hover,.vcp-chip:focus-visible,.vcp-chip.is-pop,.vcp-chip.is-whack{animation:none}
  .vcp-chip{transition:none}
  .vcp-chip:hover,.vcp-chip:focus-visible{scale:1.06}
  .vcp-spark{display:none}
  .vcp-stage.is-spilling{overflow:hidden}
  .vcp-chip.is-whack .vcp-text{white-space:normal;overflow-wrap:anywhere;word-break:break-word;max-width:100%}
}
@media (forced-colors:active){.vcp-stage::before{display:none}.vcp-chip{border-color:CanvasText}}
