/* Reserve a stable response area once Pep has something to say. */
.wl-pep{width:100%;max-width:480px;margin:16px auto 0;padding-bottom:12px;display:grid;grid-template-rows:152px minmax(112px,auto) 44px;justify-items:center;align-content:start;gap:8px;text-align:center}
.wl-pep:not([data-shown="true"]){display:block;margin:0;padding:0}
.wl-pep:not([data-shown="true"]) .wl-pep-actions{display:none}
.wl-pep-stage{position:relative;width:168px;height:152px;padding:0;border:0;border-radius:24px;background:radial-gradient(ellipse,#c2dde4 25%,#c2dde400 72%);color:var(--ink);cursor:pointer;overflow:hidden}
.wl-pep-stage:hover{background:radial-gradient(ellipse,#c2dde4 25%,#c2dde400 72%)}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) .wl-pep-stage, html:not([data-theme="light"]) .wl-pep-stage:hover{background:radial-gradient(ellipse,#7ca8bb 25%,#7ca8bb00 72%)}}
html[data-theme="dark"] .wl-pep-stage, html[data-theme="dark"] .wl-pep-stage:hover{background:radial-gradient(ellipse,#7ca8bb 25%,#7ca8bb00 72%)}
.wl-pep-stage:focus-visible,.wl-pep-next:focus-visible{outline:3px solid var(--deep);outline-offset:4px}
.wl-pep-stage img,.wl-pep-stage video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;pointer-events:none}
/* The first frame of the next video covers the switch, above the video (operator 18 Nov: "it blinks"). */
.wl-pep-stage .wl-pep-poster{z-index:1}
.wl-pep-line{width:calc(100% - 24px);max-width:38ch;margin:0;color:var(--ink);font-size:15px;line-height:1.6;overflow-wrap:break-word}
.wl-pep-actions{height:44px;display:flex;align-items:center;justify-content:center}
.wl-pep-next{min-width:64px;min-height:44px;padding:8px 18px;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--ink);font-size:13px;font-weight:400}
.wl-pep-next:hover{background:var(--water-ground)}
.wl-pep [hidden]{display:none!important}
.wl-pep[data-shown="true"] .wl-pep-line{animation:wl-pep-fade 1s ease-out both}
.waitlist:has(.wl-pep[data-shown="true"]) #joined{display:none}
@keyframes wl-pep-fade{from{opacity:0}to{opacity:1}}
/* The sign-up fun (operator 18 Nov: "Sign up pet fun after my bottle, yes."): our own drawn art, each move 1 s or more.
   The shrimp pops up beside Pep, waves, and flicks off backwards, as a real shrimp escapes. */
/* The shrimp shares the stage's cell, so every part keeps its own row. */
.wl-pep-stage{grid-row:1;grid-column:1}
.wl-pep-line{grid-row:2}
.wl-pep-actions{grid-row:3}
.wl-pep-shrimp{
  grid-row:1;grid-column:1;align-self:center;justify-self:center;
  width:80px;height:auto;overflow:visible;pointer-events:none;
  position:relative;left:var(--shrimp-offset);top:18px;
  --shrimp-offset:112px;
  /* At the far end, half the shrimp is 27.5% of its full width. */
  --escape-x:clamp(0px,calc(var(--shrimp-room) - var(--shrimp-offset) - 27.5% - 2px),40px);
  transform-box:border-box;transform-origin:center;
}
/* Round 2b (19 Nov): Pep's body fills x 30 to 139 of the stage, so the bottle starts fully left of him, outside the
   stage (still under him), is fully seen on "ocean", then passes behind him and out on the right, inside the Pep box. */
.wl-pep-stage .wl-pep-bottle{inset:auto;top:58%;width:70px;height:auto;
  --bottle-from:max(calc(var(--lap-x, -72px) + 4px), -76px);--bottle-to:calc(98px - var(--bottle-from));
  left:calc(var(--bottle-from) + 16px)}
.wl-pep[data-fun="bottle"] .wl-pep-stage{overflow:visible}
.wl-pep{isolation:isolate}
.wl-pep-portal{
  display:none;grid-area:1 / 1;place-self:center;position:relative;top:3px;
  width:44px;height:116px;overflow:visible;pointer-events:none;z-index:-1
}
.wl-pep-portal[data-side="left"]{left:-84px;--contact:.89s}
.wl-pep-portal[data-side="right"]{left:76px;--contact:1s}
.wl-pep-spill{z-index:1;mix-blend-mode:soft-light}
.wl-pep-surface{z-index:2}
.wl-portal-wave,.wl-portal-light,.wl-portal-reflection{opacity:0}
.wl-portal-mouth{transform-origin:22px 58px}
/* The portal's size: registered properties animated on the player root (waitlist-pep.js openPortal), read by every
   layer of that side, so the back, the surface and the spill keep one size and WebKit repaints them each frame. */
@property --wl-left-x{syntax:"<number>";inherits:true;initial-value:0}
@property --wl-left-y{syntax:"<number>";inherits:true;initial-value:0}
@property --wl-right-x{syntax:"<number>";inherits:true;initial-value:0}
@property --wl-right-y{syntax:"<number>";inherits:true;initial-value:0}
.wl-pep-portal[data-side="left"] .wl-portal-mouth{transform:scale(var(--wl-left-x),var(--wl-left-y))}
.wl-pep-portal[data-side="right"] .wl-portal-mouth{transform:scale(var(--wl-right-x),var(--wl-right-y))}
.wl-portal-eddy,.wl-portal-swirl{transform-origin:0 0}
@media(prefers-reduced-motion:no-preference){
  .wl-pep[data-fun="shrimp"] .wl-pep-shrimp{animation:wl-pep-shrimp 3.4s ease-out both}
  .wl-pep[data-fun="shrimp"] :is(.wl-pep-shrimp-body,[data-part="legs"]){animation:wl-pep-float 2s ease-in-out -.5s infinite}
  .wl-pep[data-fun="shrimp"] [data-part="legs"] > g{animation:wl-pep-paddle 1s ease-in-out var(--leg-delay) infinite}
  .wl-pep-shrimp [data-part="legs"]{--leg-delay:0s}
  .wl-pep-shrimp [data-part="legs"] > :nth-child(1){transform-origin:36px 36px}
  .wl-pep-shrimp [data-part="legs"] > :nth-child(2){transform-origin:44px 36px;--leg-delay:.1s}
  .wl-pep-shrimp [data-part="legs"] > :nth-child(3){transform-origin:52px 36px;--leg-delay:.2s}
  .wl-pep-shrimp [data-part="legs"] > :nth-child(4){transform-origin:60px 36px;--leg-delay:.3s}
  .wl-pep[data-fun="shrimp"] [data-part="antennae"]{
    transform-origin:23px 25px;
    animation:wl-pep-lift 1s ease-in-out, wl-pep-wave 1.2s ease-in-out 1s infinite;
  }
  .wl-pep[data-fun="shrimp"] [data-part="tail"]{transform-origin:77px 35px;animation:wl-pep-flip 1.2s ease-in-out 2.2s forwards}
  .wl-pep[data-fun="bottle"] .wl-pep-bottle{
    animation:wl-pep-bottle 5.4s linear both, wl-pep-bob 2s ease-in-out -.5s infinite, wl-pep-tilt 2s ease-in-out infinite;
  }
  .wl-pep[data-fun="lap"] :is(.wl-pep-video,.wl-pep-poster){
    transform-origin:center;
    animation:wl-pep-lap 1.3s ease-in both;
  }
  /* A newly decoded poster also holds the exit pose until the swim starts. */
  .wl-pep[data-fun="lap-in"][data-phase="talk"] :is(.wl-pep-video,.wl-pep-poster){
    transform:translateX(-146px) rotate(4deg);
  }
  .wl-pep[data-left-portal] [data-side="left"],.wl-pep[data-right-portal] [data-side="right"]{display:block}
  /* The recorded frame is 168 px wide. Its right crossing is at stage x 160. Only Pep's pictures are clipped there:
     clipping the stage also cut its glow, a straight edge beside him while the portal was small (Lead Ops 20 Nov). */
  .wl-pep[data-right-portal] :is(.wl-pep-video,.wl-pep-poster){clip-path:inset(0 8px 0 0)}
  .wl-portal-mouth{animation:wl-portal-gulp 1s ease-in-out calc(var(--contact) - .89s) both}
  .wl-portal-wave{animation:wl-portal-spread 1.2s ease-out var(--contact) both}
  .wl-portal-light,.wl-portal-reflection{animation:wl-portal-glow 2s ease-in-out calc(var(--contact) - 1s) both}
  .wl-portal-swirl{animation:wl-portal-turn 2s linear infinite}
  .wl-portal-bubble{animation:wl-portal-puff 1.2s ease-out 1s both;--puff-x:-17px;--puff-y:-35px}
  .wl-portal-bubble:nth-child(2){--puff-x:-28px;--puff-y:-42px;animation-delay:1.08s}
  .wl-portal-bubble:nth-child(3){--puff-x:-10px;--puff-y:-27px;animation-delay:1.15s}
  .wl-pep[data-left-portal="close"] [data-side="left"] .wl-portal-eddy,
  .wl-pep[data-right-portal="close"] [data-side="right"] .wl-portal-eddy{animation:wl-portal-turn 1s ease-in both}
}
@keyframes wl-pep-shrimp{
  0%{opacity:0;transform:translateY(30px)}
  17.647%,72.059%{opacity:1;transform:translate(0,0) scale(1)}
  97.059%,100%{opacity:0;transform:translate(var(--escape-x),-24px) scale(.55)}
}
@keyframes wl-pep-float{
  0%,100%{transform:translateY(-2.5px)}
  50%{transform:translateY(2.5px)}
}
@keyframes wl-pep-paddle{
  0%,50%,100%{transform:rotate(0deg)}
  25%{transform:rotate(14deg)}
  75%{transform:rotate(-14deg)}
}
@keyframes wl-pep-lift{from{transform:rotate(0deg)}to{transform:rotate(12deg)}}
@keyframes wl-pep-wave{
  0%,50%,100%{transform:rotate(12deg)}
  25%{transform:rotate(22deg)}
  75%{transform:rotate(2deg)}
}
@keyframes wl-pep-flip{
  0%{transform:rotate(0deg)}
  20.833%{transform:rotate(-25deg)}
  33.333%{transform:rotate(30deg)}
  100%{transform:rotate(0deg)}
}
@keyframes wl-pep-bottle{
  0%{left:var(--bottle-from);opacity:0}
  14.815%{left:calc(var(--bottle-from) + 8px);opacity:1}
  25.926%{left:calc(var(--bottle-from) + 16px);animation-timing-function:ease-in-out}
  81.481%{left:calc(var(--bottle-to) - 16px);opacity:1}
  100%{left:var(--bottle-to);opacity:0}
}
@keyframes wl-pep-bob{0%,100%{translate:0 -5px}50%{translate:0 5px}}
@keyframes wl-pep-tilt{0%,100%{transform:rotate(-5deg)}50%{transform:rotate(5deg)}}
@keyframes wl-pep-lap{
  0%{transform:translateX(0) rotate(0deg);animation-timing-function:ease-out}
  38.462%{transform:translateX(6px) rotate(0deg)}
  100%{transform:translateX(-146px) rotate(4deg)}
}
@keyframes wl-portal-gulp{
  0%,74%,100%{scale:1 1}
  89%{scale:1.08 1}
}
@keyframes wl-portal-spread{
  0%{opacity:0;transform:scale(.06)}
  16%{opacity:.85}
  100%{opacity:0;transform:scale(1.35)}
}
@keyframes wl-portal-glow{
  0%,100%{opacity:0}
  50%{opacity:.65}
}
@keyframes wl-portal-turn{to{transform:rotate(1turn)}}
@keyframes wl-portal-puff{
  0%{opacity:0;transform:translate(0,0)}
  18%,52%{opacity:1}
  100%{opacity:0;transform:translate(var(--puff-x),var(--puff-y))}
}
.wl-pep[data-covered] .wl-pep-video{opacity:0}
@media(prefers-reduced-motion:reduce){
  .wl-pep[data-shown="true"] .wl-pep-line{animation:none}
  /* site.css disables CSS animation globally under Reduced Motion. Only the resting poster fades. */
  .wl-pep[data-phase="fade"] .wl-pep-poster{
    animation-name:wl-pep-fade!important;
    animation-duration:1s!important;
    animation-timing-function:ease-in!important;
  }
}
