/* Plant your Pea: the setup as a short stop-motion video that ends on naming.
   Seven beats in JJ's order: give Pea a home, plant it with a click, a few questions,
   add what you've got, show Pea around, its memory, its name.
   A soft light laptop on the paper, one neutral app window ("Your AI app"),
   Pea's own cream and green palette, big captions underneath.
   Everything inside the screen is sized in em off one container-based font size,
   so the whole scene scales with the laptop. Tokens only; soil and folder tans
   are mixed from brass, brass-soft and ink (the house-folder uses the yourplace mixes). */

.anim-plant { container: plant / inline-size; position: relative; max-width: 960px; margin: 40px auto 0; }
.anim-plant.is-snap *, .anim-plant.is-snap *::before, .anim-plant.is-snap *::after { transition: none !important; }

/* ---------- The laptop ---------- */
/* capped by screen height too, so the laptop, the caption, the name box and Keep 'Pea' fit on a 1280x720 laptop screen */
.anim-plant .pl-view { position: relative; width: min(100%, 960px, calc((100vh - 66px - 250px) * 1.69)); width: min(100%, 960px, calc((100svh - 66px - 250px) * 1.69)); margin-inline: auto; }
.anim-plant .pl-laptop { position: relative; }
.anim-plant .pl-lid { position: relative; width: 88%; margin: 0 auto; padding: 2.1% 1.5% 1.5%; background: linear-gradient(180deg, #fff, var(--card) 30%, var(--paper-2)); border: 1px solid var(--line); border-radius: 26px 26px 10px 10px; box-shadow: 0 50px 90px -60px rgba(34, 56, 26, .55), 0 2px 6px rgba(34, 56, 26, .06); }
.anim-plant .pl-lid::before { content: ""; position: absolute; left: 0; right: 0; top: 0; padding-top: 2.1%; background: radial-gradient(circle at 50% 55%, var(--line) 0 2.6px, transparent 3.2px); }
.anim-plant .pl-screen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px rgba(34, 56, 26, .08); container: plscreen / inline-size; }
.anim-plant .pl-base { position: relative; z-index: 1; height: 0; padding-bottom: 2.4%; margin-top: -1px; background: linear-gradient(180deg, #fff, var(--paper-2) 45%, var(--line)); border: 1px solid var(--line); border-radius: 3px 3px 30px 30px / 3px 3px 16px 16px; box-shadow: 0 26px 34px -24px rgba(34, 56, 26, .55); }
.anim-plant .pl-base::before { content: ""; position: absolute; left: 50%; top: 0; width: 13%; height: 42%; transform: translateX(-50%); border-radius: 0 0 12px 12px; background: var(--line); opacity: .7; }

.anim-plant .pl-scene { position: absolute; inset: 0; font-size: 2.15cqw; line-height: 1.25; color: var(--ink);
  --ax: 25%; --ah: 88%; --dx8: 21.9cqw; --dx9: 13cqw; --sc8: 1.06; --sc9: 1.06; --hx: -27%; --hs: .55; }
.anim-plant .pl-wall { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 80% at 28% 70%, rgba(199, 222, 168, .75), transparent 70%), linear-gradient(160deg, var(--paper), var(--paper-2)); }

/* ---------- The app window ---------- */
.anim-plant .pl-win { position: absolute; left: 2.4%; right: 2.4%; top: 3.6%; bottom: 3.6%; }
.anim-plant .pl-chrome { position: absolute; inset: 0; z-index: 1; background: #fff; border: 1px solid var(--line); border-radius: .9em; box-shadow: 0 1.4em 3em -1.6em rgba(34, 56, 26, .5); opacity: 0; transform: scale(1.06); transition: opacity .45s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.anim-plant.is-win .pl-chrome { opacity: 1; transform: none; }
.anim-plant .pl-bar { position: absolute; left: 0; right: 0; top: 0; height: 2.5em; display: flex; align-items: center; gap: .5em; padding: 0 .8em; border-bottom: 1px solid var(--line); }
.anim-plant .pl-label { padding: .45em .85em; border-radius: 999px; background: var(--paper); font: 700 .72em/1 var(--body); letter-spacing: .02em; color: var(--muted); }
.anim-plant .pl-apps { display: flex; gap: .35em; }
.anim-plant .pl-apps b { padding: .4em .7em; border-radius: 999px; border: 1px solid var(--line); font: 700 .64em/1 var(--body); color: var(--muted); }
.anim-plant .pl-rail { position: absolute; left: 0; top: 2.5em; bottom: 0; width: 8%; display: flex; flex-direction: column; gap: .7em; padding: .9em .75em; border-right: 1px solid var(--line); border-bottom-left-radius: .9em; background: var(--card); }
.anim-plant .pl-rail b { height: 1.7em; border-radius: .55em; background: var(--pea-soft); }
.anim-plant .pl-rail i { height: .5em; border-radius: 1em; background: var(--paper-2); }
.anim-plant .pl-rail i:nth-child(odd) { width: 70%; }
.anim-plant .pl-box { position: absolute; left: calc(8% + 1.4em); right: 1.4em; bottom: .9em; height: 2.9em; display: flex; align-items: center; gap: .5em; padding: 0 .35em 0 .45em; border: 1px solid var(--line); border-radius: 999px; background: var(--card); box-shadow: 0 .5em 1.2em -.8em rgba(34, 56, 26, .35); transition: opacity .4s ease; }
/* the naming beat points below the screen, so the app's own message box steps back */
.anim-plant[data-beat="7"] .pl-box { opacity: 0; }
.anim-plant .pl-chip { flex: none; display: inline-flex; align-items: center; gap: .3em; padding: .32em .7em .32em .35em; border-radius: 999px; background: var(--paper-2); font: 700 .74em/1 var(--body); color: var(--ink); white-space: nowrap; opacity: 0; transform: scale(.5); transition: opacity .25s, transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.anim-plant.is-chip .pl-chip { opacity: 1; transform: none; transition-delay: .35s; }
.anim-plant .pl-chip svg { width: 1.55em; height: 1.55em; }
/* the mini house-folder icon (the chip and the Allow card) */
.anim-plant .pl-mh-back { fill: color-mix(in srgb, var(--brass) 30%, var(--brass-soft)); }
.anim-plant .pl-mh-front { fill: color-mix(in srgb, var(--brass-soft) 70%, var(--brass)); }
.anim-plant .pl-mh-door { fill: var(--pea); }
.anim-plant .pl-mh-win { fill: var(--pea-glow); stroke: color-mix(in srgb, var(--brass) 55%, var(--brass-soft)); stroke-width: .8; }
.anim-plant .pl-type { display: none; align-items: center; gap: .45em; min-width: 0; font: 600 .92em/1 var(--body); white-space: nowrap; opacity: 0; }
.anim-plant .pl-type b { font-weight: 700; }
.anim-plant.is-typed .pl-type { display: inline-flex; opacity: 1; animation: plant-drop .6s cubic-bezier(.3, 1.4, .5, 1) both; }
.anim-plant .pl-caret { flex: none; width: 2px; height: 1.15em; margin-left: -.2em; border-radius: 2px; background: var(--pea); animation: plant-blink 1s steps(1) infinite; }
.anim-plant.is-typed .pl-caret { display: none; }
.anim-plant .pl-send { flex: none; display: grid; place-items: center; width: 2.2em; height: 2.2em; margin-left: auto; border-radius: 50%; background: var(--pea-soft); color: var(--pea); transition: background .2s, color .2s, transform .15s; }
.anim-plant.is-typed .pl-send { background: var(--pea); color: #fff; }
.anim-plant .pl-send svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }

/* the blurred "your setup line" chip */
.anim-plant .pl-link { position: relative; display: inline-flex; align-items: center; padding: .34em .6em; border-radius: .5em; background: var(--pea-soft); overflow: hidden; }
.anim-plant .pl-link i { position: absolute; inset: .2em .3em; background: repeating-linear-gradient(90deg, var(--pea-glow) 0 .45em, transparent .45em .62em); filter: blur(2.5px); opacity: .9; }
.anim-plant .pl-link em { position: relative; font: italic 600 .78em/1 var(--body); color: var(--pea); white-space: nowrap; }
.anim-plant .pl-msg--me b { white-space: nowrap; }

/* ---------- The stage: Pea's home, Pea, the chat ---------- */
.anim-plant .pl-stage { position: absolute; z-index: 2; left: 8%; right: 0; top: 2.5em; bottom: 4.3em; overflow-x: clip; overflow-y: visible; }
.anim-plant .pl-actor { position: absolute; z-index: 2; left: var(--ax); bottom: 2%; height: var(--ah); aspect-ratio: var(--ar, .8); transform: translateX(-50%) translateX(var(--dx, 0px)) translateY(var(--dy, 0px)) scale(var(--sc, 1)); transform-origin: 50% 100%; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.anim-plant .pl-idle, .anim-plant .pl-bob { position: absolute; inset: 0; transform-origin: 50% 100%; }
.anim-plant .pl-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1em .9em rgba(34, 56, 26, .2)); }
.anim-plant.is-wide .pl-img { object-fit: cover; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent); mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent); }
.anim-plant[data-pose="none"] .pl-img { visibility: hidden; }
.anim-plant .pl-bob.is-pop { animation: plant-pop .5s cubic-bezier(.3, 1.5, .5, 1); }
.anim-plant .pl-bob.is-hop { animation: plant-hop .75s cubic-bezier(.3, 1.2, .5, 1); }
.anim-plant .pl-bob.is-sprout { animation: plant-sprout .9s cubic-bezier(.3, 1.3, .5, 1); }
/* while Pea rises out of its home, nothing of the picture shows below the home's floor */
.anim-plant[data-pose="sprout"] .pl-idle { clip-path: inset(-60% -60% 2.2% -60%); }
.anim-plant .pl-bob.is-cheer { animation: plant-cheer 1.1s cubic-bezier(.3, 1.3, .5, 1); }

/* beat 1 has no app window yet: the home and the seed packet sit bigger, nearer the middle of
   the desktop, and settle back as the window opens around them (no transform at rest, so the
   home's front can still sit in front of Pea later) */
.anim-plant .pl-yard { position: absolute; inset: 0; transform-origin: 32% 100%; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.anim-plant:not(.is-win) .pl-yard { transform: translate(12cqw, -7%) scale(1.3); }
/* under reduced motion the first frame waits behind "Watch with sound": the home sits a little lower so the button has the top of the screen */
.anim-plant.is-gate .pl-yard { transform: translate(12cqw, 5%) scale(1.18); }

/* Pea's home: the house-folder. Same box as Pea in the sprout pose, so its front sits exactly
   on the folder in sprout.webp. From the hello on it stands, smaller, behind Pea's feet. */
.anim-plant .pl-home, .anim-plant .pl-homef { position: absolute; z-index: 1; left: var(--ax); bottom: 2%; height: var(--ah); aspect-ratio: 646 / 820; transform: translateX(-50%); transform-origin: 11% 97.6%; transition: transform .85s cubic-bezier(.2, .7, .2, 1); pointer-events: none; }
.anim-plant .pl-homef { z-index: 3; }
.anim-plant.is-homed .pl-home, .anim-plant.is-homed .pl-homef { transform: translateX(-50%) translateX(var(--hx)) scale(var(--hs)); }
.anim-plant.is-homed .pl-homef { z-index: 1; }
.anim-plant .pl-home svg, .anim-plant .pl-homef svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; opacity: 0; transform: translateY(6%) scale(.4); transform-origin: 50% 97%; transition: opacity .2s ease, transform .55s cubic-bezier(.3, 1.6, .5, 1); }
.anim-plant.h-in .pl-home svg, .anim-plant.h-in .pl-homef svg { opacity: 1; transform: none; }
.anim-plant .pl-hback { filter: drop-shadow(0 1.2em 1.1em rgba(34, 56, 26, .14)); }
.anim-plant .pl-h-back { fill: color-mix(in srgb, var(--brass) 24%, var(--brass-soft)); stroke: color-mix(in srgb, var(--brass) 42%, var(--brass-soft)); stroke-width: 5; }
.anim-plant .pl-h-tab { font: 800 30px var(--display); letter-spacing: -.02em; fill: var(--brass); }
.anim-plant .pl-h-paper { fill: var(--card); stroke: var(--line); stroke-width: 4; transition: opacity .3s ease; }
.anim-plant .pl-h-paper--2 { fill: #fff; }
.anim-plant.h-soil .pl-h-paper { opacity: 0; }
.anim-plant .pl-h-front { fill: var(--brass-soft); stroke: color-mix(in srgb, var(--brass) 42%, var(--brass-soft)); stroke-width: 5; }
.anim-plant .pl-h-shine { fill: none; stroke: rgba(255, 255, 255, .7); stroke-width: 7; stroke-linecap: round; }
.anim-plant .pl-h-chim { fill: color-mix(in srgb, var(--brass) 36%, var(--brass-soft)); stroke: color-mix(in srgb, var(--brass) 52%, var(--brass-soft)); stroke-width: 5; transform-box: fill-box; transform: translateY(90%); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.anim-plant.h-chim .pl-h-chim { transform: none; }
.anim-plant .pl-h-puff { fill: var(--card); stroke: var(--line); stroke-width: 4; opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }
.anim-plant.h-chim .pl-h-puff { animation: plant-puff 6s ease-out .4s infinite; }
.anim-plant.h-chim .pl-h-puff--2 { animation-delay: .75s; }
.anim-plant.h-chim .pl-h-puff--3 { animation-delay: 1.1s; }
.anim-plant .pl-h-win { transform-box: fill-box; transform-origin: 50% 50%; transform: scale(0); transition: transform .45s cubic-bezier(.3, 1.7, .5, 1); }
.anim-plant.h-win .pl-h-win { transform: none; }
.anim-plant .pl-h-winlight { fill: var(--card); transition: fill .5s ease .25s; }
.anim-plant.h-win .pl-h-winlight { fill: var(--pea-glow); }
.anim-plant .pl-h-winframe { fill: none; stroke: color-mix(in srgb, var(--brass) 55%, var(--brass-soft)); stroke-width: 8; }
.anim-plant .pl-h-winbars { fill: none; stroke: color-mix(in srgb, var(--brass) 55%, var(--brass-soft)); stroke-width: 6; }
.anim-plant .pl-h-doorway { fill: var(--band-2); opacity: 0; transition: opacity .2s ease; }
.anim-plant .pl-door { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform .5s cubic-bezier(.3, 1.5, .5, 1); }
.anim-plant.h-door .pl-door { transform: none; }
.anim-plant.h-door .pl-h-doorway { opacity: 1; }
.anim-plant .pl-door__leaf { fill: var(--pea); }
.anim-plant .pl-door__panel { fill: none; stroke: var(--pea-hi); stroke-width: 5; }
.anim-plant .pl-door__knob { fill: color-mix(in srgb, var(--brass) 25%, var(--brass-soft)); stroke: var(--brass); stroke-width: 3; }
.anim-plant .pl-h-mat { fill: color-mix(in srgb, var(--brass) 45%, var(--brass-soft)); opacity: 0; transition: opacity .3s ease; }
.anim-plant.h-door .pl-h-mat { opacity: 1; }
.anim-plant .pl-h-soil { transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform .6s cubic-bezier(.3, 1.6, .5, 1), opacity .3s ease; }
.anim-plant.h-soil .pl-h-soil { transform: none; }
.anim-plant.is-homed .pl-h-soil { opacity: 0; }
.anim-plant .pl-h-soil path { fill: color-mix(in srgb, var(--brass) 38%, var(--ink)); }
.anim-plant .pl-crumbl { fill: color-mix(in srgb, var(--brass) 62%, var(--ink)); }
.anim-plant .pl-crumbd { fill: var(--ink); opacity: .55; }
.anim-plant .pl-home.is-rumble svg { animation: plant-rumble .1s linear 8; }
.anim-plant .pl-homef.is-rumble svg { animation: plant-rumble .1s linear 8; }
.anim-plant .pl-hometag { position: absolute; left: 50%; top: calc(100% + .7em); display: inline-flex; align-items: center; gap: .45em; padding: .45em .85em; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font: 700 .74em/1 var(--body); color: var(--muted); white-space: nowrap; opacity: 0; transform: translate(-50%, .5em); transition: opacity .35s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.anim-plant .pl-hometag::before { content: ""; width: .55em; height: .55em; border-radius: 50%; background: var(--pea-hi); }
.anim-plant.h-tag .pl-hometag { opacity: 1; transform: translate(-50%, 0); }
.anim-plant.is-win .pl-hometag { opacity: 0; transition-duration: .2s; }

.anim-plant .pl-crumbs { position: absolute; left: 16%; right: 16%; top: 55%; height: 0; pointer-events: none; }
.anim-plant .pl-crumbs i { position: absolute; left: var(--l); top: 0; width: .55em; height: .55em; border-radius: 50%; background: color-mix(in srgb, var(--brass) 38%, var(--ink)); opacity: 0; }
.anim-plant.is-crumbs .pl-crumbs i { animation: plant-crumb .85s cubic-bezier(.2, .6, .4, 1) both; }
.anim-plant .pl-crumbs i:nth-child(even) { width: .4em; height: .4em; animation-delay: .05s; }

/* the seed packet: the seed dozes in it, the packet front covers its little mound */
.anim-plant .pl-packet { position: absolute; z-index: 4; left: 41%; bottom: 2%; height: 34%; aspect-ratio: .8; }
.anim-plant .pl-packet__back { position: absolute; left: 7%; right: 7%; top: 30%; bottom: 0; background: color-mix(in srgb, var(--brass) 16%, var(--brass-soft)); border-radius: 0 0 .5em .5em;
  clip-path: polygon(0 4%, 8% 0, 16% 4%, 25% 0, 33% 4%, 42% 0, 50% 4%, 58% 0, 67% 4%, 75% 0, 84% 4%, 92% 0, 100% 4%, 100% 100%, 0 100%); transition: opacity .35s ease .2s, transform .5s ease .2s; }
.anim-plant .pl-seed { position: absolute; left: 0; right: 0; top: 8%; height: 80%; }
.anim-plant .pl-seed img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; transform-origin: 50% 100%; animation: plant-breathe 3.2s ease-in-out infinite; filter: drop-shadow(0 .5em .5em rgba(34, 56, 26, .18)); }
.anim-plant .pl-packet__front { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; display: flex; align-items: center; justify-content: center; gap: .2em; background: linear-gradient(180deg, #fff, var(--card)); border: 1px solid var(--line); border-top: .28em solid var(--pea-hi); border-radius: .3em .3em .6em .6em; box-shadow: 0 .8em 1.4em -1em rgba(34, 56, 26, .45); transition: opacity .35s ease .2s, transform .5s ease .2s; }
.anim-plant .pl-packet__front b { font: 800 1.15em/1 var(--display); letter-spacing: -.03em; color: var(--pea); }
.anim-plant .pl-packet__leaf { width: 1.1em; height: 1.1em; fill: var(--pea-hi); }
.anim-plant .pl-packet__rib { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; opacity: .85; }
.anim-plant .pl-z { position: absolute; left: 74%; top: 14%; }
.anim-plant .pl-z b { position: absolute; left: 0; top: 0; font: 800 1.05em/1 var(--display); color: var(--pea); opacity: 0; animation: plant-z 2.7s ease-out infinite; }
.anim-plant .pl-z b:nth-child(2) { animation-delay: .9s; font-size: .9em; }
.anim-plant .pl-z b:nth-child(3) { animation-delay: 1.8s; font-size: .75em; }
.anim-plant.seed-hop .pl-z { display: none; }
.anim-plant:not(.is-seed) .pl-packet { visibility: hidden; }
.anim-plant.seed-gone .pl-packet__front, .anim-plant.seed-gone .pl-packet__back { opacity: 0; transform: translateY(18%) rotate(6deg); }

/* the name written on the sticker */
.anim-plant .pl-tagname { position: absolute; left: 32%; top: 62.4%; width: 36.3%; height: 14.4%; display: none; align-items: center; justify-content: center; container-type: size; }
.anim-plant[data-pose="nametag"] .pl-tagname { display: flex; }
.anim-plant .pl-tagtext { display: inline-block; font: 800 var(--fs, 60cqh)/1 var(--display); letter-spacing: -.03em; color: var(--ink); white-space: nowrap; transform: rotate(-4deg); }
/* longer names: two balanced lines across the whole white area of the sticker
   (laid out 115% wide, then drawn 10% narrower, so the ink spans 104% of the box) */
.anim-plant .pl-tagtext.is-two { flex: none; max-width: 115cqw; white-space: normal; text-align: center; line-height: .9; letter-spacing: -.04em; text-wrap: balance; transform: rotate(-4deg) scaleX(.9); }
.anim-plant .pl-tagtext.is-break { overflow-wrap: anywhere; }
/* nothing picked yet: a soft dashed "Your name here" */
.anim-plant .pl-tagname::before { content: ""; position: absolute; inset: 6% 3%; border: max(1.5px, 2.2cqh) dashed var(--pea-hi); border-radius: 10cqh; opacity: 0; transform: rotate(-4deg); transition: opacity .3s ease; }
.anim-plant.is-hint .pl-tagname::before { opacity: .75; }
.anim-plant.is-hint .pl-tagtext { color: var(--muted); font-weight: 700; letter-spacing: -.02em; }
.anim-plant .pl-tagcaret { display: none; width: 3cqw; min-width: 2px; height: 56cqh; border-radius: 2px; background: var(--pea); animation: plant-blink 1s steps(1) infinite; }
.anim-plant.is-tagempty .pl-tagcaret { display: block; }
/* demo names: the caret types along beside the letters */
.anim-plant.is-demo .pl-tagcaret { display: block; }
.anim-plant.is-demo:not(.is-tagempty) .pl-tagcaret { margin-left: 2.5cqw; height: 48cqh; transform: rotate(-4deg); }

/* memory glow */
.anim-plant .pl-glow { position: absolute; left: 50%; top: 54%; width: 170%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(182, 224, 127, .75), rgba(199, 222, 168, .55) 30%, rgba(199, 222, 168, .2) 52%, transparent 70%); opacity: 0; transform: translate(-50%, -50%) scale(.5); transition: opacity .6s ease, transform 1s cubic-bezier(.2, .7, .2, 1); }
.anim-plant .pl-glow::after { content: ""; position: absolute; left: 50%; top: 56%; width: 34%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(242, 231, 210, .95), rgba(242, 231, 210, 0) 70%); }
.anim-plant.is-glow .pl-glow { animation: plant-glow 2.4s ease-in-out 1s infinite; }
.anim-plant.is-glow .pl-glow, .anim-plant.is-named .pl-glow { opacity: 1; transform: translate(-50%, -50%); }
.anim-plant .pl-spark { position: absolute; z-index: 1; left: var(--x); top: var(--y); width: 1.6em; height: 1.6em; background: var(--pea-hi); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); opacity: 0; transform: scale(0); }
.anim-plant .pl-spark:nth-of-type(even) { background: var(--brass); width: 1.15em; height: 1.15em; }
.anim-plant.is-glow .pl-spark, .anim-plant.is-named .pl-spark { animation: plant-twinkle 1.8s ease-in-out var(--d) infinite; }

/* ---------- The chat ---------- */
.anim-plant .pl-convo { position: absolute; z-index: 3; left: 47%; right: 4%; top: 4%; bottom: 4%; }
.anim-plant .pl-grp { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: .7em; opacity: 0; visibility: hidden; transform: translateY(-1.2em); transition: opacity .35s ease, transform .5s cubic-bezier(.2, .7, .2, 1), visibility 0s linear .5s; }
.anim-plant[data-beat="2"] .pl-grp[data-g="2"], .anim-plant[data-beat="3"] .pl-grp[data-g="3"],
.anim-plant[data-beat="4"] .pl-grp[data-g="4"], .anim-plant[data-beat="5"] .pl-grp[data-g="5"],
.anim-plant[data-beat="6"] .pl-grp[data-g="6"] { opacity: 1; visibility: visible; transform: none; transition: opacity .35s ease .15s, transform .5s cubic-bezier(.2, .7, .2, 1) .15s; }

.anim-plant .pl-msg { max-width: 92%; padding: .62em .95em; border-radius: 1.15em; font: 700 1em/1.25 var(--body); color: var(--ink); }
.anim-plant .pl-msg--pea { align-self: flex-start; background: var(--pea-soft); border-bottom-left-radius: .3em; transform-origin: 0 100%; }
.anim-plant .pl-msg--me { align-self: flex-end; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: .45em .5em; background: var(--paper-2); font-weight: 600; border-bottom-right-radius: .3em; transform-origin: 100% 100%; }
.anim-plant .pl-in { opacity: 0; transform: translateY(.7em) scale(.9); transition: opacity .3s ease, transform .5s cubic-bezier(.3, 1.5, .5, 1); }
.anim-plant .pl-in.is-in { opacity: 1; transform: none; }

.anim-plant .pl-sq { padding: .55em .9em; }
.anim-plant .pl-sq svg { display: block; width: 6.4em; height: 1.8em; fill: none; stroke: var(--muted); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.anim-plant .pl-sq path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .55s ease .15s; }
.anim-plant .pl-sq path + path { transition-delay: .6s; }
.anim-plant .pl-sq.is-in path { stroke-dashoffset: 0; }

/* beat 2: after the click, the setup line and Pea's hello in the chat */
.anim-plant .pl-grp[data-g="2"] { justify-content: flex-start; gap: 1em; padding-top: 9%; }
/* the one click: the Allow card pops up centre stage, in front of the home and the seed packet,
   over a soft veil, and holds there until the press */
.anim-plant .pl-allowpane { position: absolute; z-index: 5; inset: 0; display: grid; place-items: center; padding: 0 4%; pointer-events: none; }
.anim-plant .pl-allowpane::before { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--paper) 62%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 78%, transparent); mask-image: linear-gradient(180deg, #000 78%, transparent); opacity: 0; transition: opacity .35s ease; }
.anim-plant.is-allow .pl-allowpane::before { opacity: 1; }
.anim-plant .pl-allow { position: relative; display: flex; align-items: center; gap: .7em; padding: .75em .75em .75em .8em; background: #fff; border: 1px solid var(--line); border-radius: 1.1em; box-shadow: 0 1.4em 2.6em -1.2em rgba(34, 56, 26, .6), 0 0 0 .4em rgba(199, 222, 168, .5); font: 700 1.12em/1.25 var(--body); color: var(--ink); transform-origin: 50% 50%; }
.anim-plant .pl-allow__ico { flex: none; display: grid; place-items: center; width: 2.3em; height: 2.3em; border-radius: .65em; background: var(--paper-2); }
.anim-plant .pl-allow__ico svg { width: 1.7em; height: 1.7em; }
.anim-plant .pl-allow__t { max-width: 8.6em; }
.anim-plant .pl-allow__b { flex: none; display: inline-flex; align-items: center; justify-content: center; padding: .7em 1.3em; border-radius: 999px; background: var(--band); color: var(--band-ink); font-weight: 800; transition: background .2s; }
.anim-plant .pl-allow__b.is-press { background: var(--pea); animation: plant-press .3s ease; }
.anim-plant .pl-allow.is-in.is-gone { opacity: 0; transform: scale(.85); transition-duration: .3s; }

.anim-plant .pl-files { align-self: flex-end; display: flex; gap: .6em; }
.anim-plant .pl-file { display: grid; justify-items: center; gap: .35em; --r: -4deg; }
.anim-plant .pl-file:nth-child(2) { --r: 3deg; }
.anim-plant .pl-file:nth-child(3) { --r: -2deg; }
.anim-plant .pl-file.pl-in { transform: translate(6em, -4em) rotate(24deg) scale(.6); transition: opacity .25s ease, transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.anim-plant .pl-file.pl-in.is-in { transform: rotate(var(--r)); }
.anim-plant .pl-file em { font: 700 .66em/1 var(--body); font-style: normal; color: var(--muted); }
.anim-plant .pl-file__card { display: flex; flex-direction: column; gap: .3em; width: 3.7em; height: 4.6em; padding: .45em; background: #fff; border: 1px solid var(--line); border-radius: .45em; box-shadow: 0 .6em 1.1em -.7em rgba(34, 56, 26, .45); }
.anim-plant .pl-file__card i { height: .3em; border-radius: 1em; background: var(--line); }
.anim-plant .pl-file__card i:last-child { width: 65%; }
.anim-plant .pl-file--web .pl-file__bar { height: .5em; width: 100%; background: var(--pea-soft); }
.anim-plant .pl-file--web .pl-file__pic { height: 1.3em; width: 100%; border-radius: .25em; background: var(--pea-glow); }
.anim-plant .pl-file--price b { font: 800 1.15em/1 var(--display); color: var(--brass); }
.anim-plant .pl-file--note .pl-file__card { padding-top: .8em; background: var(--brass-soft); border-color: color-mix(in srgb, var(--brass) 25%, var(--brass-soft)); }
.anim-plant .pl-file--note .pl-file__card i { background: color-mix(in srgb, var(--brass) 30%, var(--brass-soft)); }

.anim-plant .pl-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .55em; }
.anim-plant .pl-tile { position: relative; display: flex; align-items: center; gap: .5em; padding: .5em .6em; background: #fff; border: 1px solid var(--line); border-radius: .8em; font: 700 .84em/1 var(--body); color: var(--ink); transition: opacity .3s ease, transform .5s cubic-bezier(.3, 1.5, .5, 1), border-color .3s ease, background .3s ease; }
.anim-plant .pl-tile > i { flex: none; display: grid; place-items: center; width: 2em; height: 2em; border-radius: .6em; background: var(--pea-soft); color: var(--pea); }
.anim-plant .pl-tile > i svg { width: 1.15em; height: 1.15em; }
.anim-plant .pl-tile > b { position: absolute; top: -.5em; right: -.5em; display: grid; place-items: center; width: 1.55em; height: 1.55em; border-radius: 50%; background: var(--pea-hi); color: #fff; box-shadow: 0 0 0 .2em #fff; transform: scale(0); transition: transform .45s cubic-bezier(.3, 1.7, .5, 1); }
.anim-plant .pl-tile > b svg { width: .95em; height: .95em; }
.anim-plant .pl-tile.is-on { border-color: var(--pea-glow); background: color-mix(in srgb, var(--pea-soft) 40%, #fff); }
.anim-plant .pl-tile.is-on > b { transform: none; }

.anim-plant .pl-yes { align-self: flex-end; padding: .65em 1.6em; border-radius: 999px; background: var(--band); color: var(--band-ink); font: 700 .95em/1 var(--body); box-shadow: 0 .6em 1.2em -.7em rgba(34, 56, 26, .8); transform-origin: 100% 50%; }
.anim-plant .pl-yes.is-in.is-press { background: var(--pea); animation: plant-press .3s ease; }

/* the teetering pile that gets waved away */
.anim-plant .pl-pha { display: flex; flex-direction: column; gap: .7em; transition: opacity .35s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.anim-plant.pile-in .pl-pha { opacity: 0; transform: translateY(-.8em); }
.anim-plant.pile-in.pile-out .pl-pha { opacity: 1; transform: none; transition-delay: .35s; }
.anim-plant .pl-good { position: absolute; left: 0; top: 2%; }
/* once the question is out of sight: Pea's line on top, the three good files come back under it */
.anim-plant.pile-trim .pl-grp[data-g="4"] { justify-content: flex-start; padding-top: .3em; }
.anim-plant.pile-trim .pl-pha > .pl-msg { display: none; }
.anim-plant.pile-trim .pl-good { position: static; order: -1; }
.anim-plant .pl-pile { position: absolute; z-index: 4; right: 7%; bottom: 1%; width: 31%; height: 80%; opacity: 0; transform: translateX(150%); transition: transform .65s cubic-bezier(.2, .7, .2, 1), opacity .25s ease; pointer-events: none; }
.anim-plant.pile-in .pl-pile { opacity: 1; transform: none; }
.anim-plant.pile-in.pile-out .pl-pile { opacity: 0; transform: translateX(150%) rotate(14deg); transition: transform .75s cubic-bezier(.5, 0, .75, .4), opacity .4s ease .3s; }
.anim-plant .pl-pile__in { position: absolute; inset: 0; transform-origin: 50% 100%; }
.anim-plant.pile-in[data-beat="4"] .pl-pile__in { animation: plant-teeter 1.25s ease-in-out .45s infinite; }
.anim-plant .pl-pilesvg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 .5em .6em rgba(34, 56, 26, .16)); }
.anim-plant .pp-a, .anim-plant .pp-b, .anim-plant .pp-c, .anim-plant .pp-d, .anim-plant .pp-e { stroke-width: 1.5; }
.anim-plant .pp-a { fill: #fff; stroke: var(--line); }
.anim-plant .pp-b { fill: var(--paper-2); stroke: var(--line); }
.anim-plant .pp-c { fill: var(--pea-soft); stroke: var(--pea-glow); }
.anim-plant .pp-d { fill: var(--brass-soft); stroke: color-mix(in srgb, var(--brass) 22%, var(--brass-soft)); }
.anim-plant .pp-e { fill: color-mix(in srgb, var(--brass-soft) 64%, var(--brass)); stroke: color-mix(in srgb, var(--brass-soft) 30%, var(--brass)); }
.anim-plant .pp-ft { fill: color-mix(in srgb, var(--brass-soft) 38%, var(--brass)); }
.anim-plant .pp-s { fill: var(--brass-soft); stroke: color-mix(in srgb, var(--brass) 22%, var(--brass-soft)); }
.anim-plant .pp-l { stroke: var(--line); stroke-width: 2; stroke-linecap: round; }

/* ---------- The naming beat, inside the screen ---------- */
.anim-plant .pl-prompt, .anim-plant .pl-cheer { position: absolute; z-index: 3; left: 64%; top: 7%; max-width: 34%; font-size: 1.2em; opacity: 0; transform: scale(.6); transition: opacity .3s ease, transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.anim-plant.is-prompt .pl-prompt { opacity: 1; transform: none; }
.anim-plant.is-named .pl-prompt { opacity: 0; transform: scale(.85); transition-duration: .2s; }
.anim-plant.is-named .pl-cheer { opacity: 1; transform: none; transition-delay: .3s; }
/* the arrow points out of the screen, down at the name box */
.anim-plant .pl-arrow { position: absolute; z-index: 3; left: 75%; bottom: 3%; width: 3.2em; height: 3.2em; display: grid; place-items: center; border-radius: 50%; background: var(--pea); color: #fff; box-shadow: 0 0 0 .4em rgba(199, 222, 168, .7), 0 .8em 1.4em -.8em rgba(34, 56, 26, .7); opacity: 0; transform: translateY(-1em) scale(.6); transition: opacity .3s ease, transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.anim-plant .pl-arrow svg { width: 1.7em; height: 1.7em; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.anim-plant.is-prompt .pl-arrow { opacity: 1; transform: none; transition-delay: .5s; }
.anim-plant.is-prompt .pl-arrow svg { animation: plant-point 1.1s ease-in-out 1s infinite; }
.anim-plant.is-named .pl-arrow { opacity: 0; transform: scale(.6); transition-delay: 0s; }
/* beside the sticker: you can always change it later */
.anim-plant .pl-later { position: absolute; z-index: 3; left: 66.5%; top: 48%; max-width: 31%; padding: .5em .8em; text-wrap: balance; border-radius: .8em; background: var(--card); border: 1px solid var(--line); font: 700 .86em/1.25 var(--body); color: var(--muted); opacity: 0; transform: translateX(-.6em); transition: opacity .35s ease, transform .5s cubic-bezier(.2, .7, .2, 1); }
.anim-plant .pl-later::before { content: ""; position: absolute; left: -.42em; top: 50%; width: .8em; height: .8em; margin-top: -.4em; background: var(--card); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.anim-plant.is-prompt .pl-later { opacity: 1; transform: none; transition-delay: 1s; }
.anim-plant.is-named .pl-later { top: 66%; }
.anim-plant .pl-badge { position: absolute; z-index: 3; left: 66%; top: 36%; display: inline-flex; align-items: center; gap: .45em; padding: .5em 1.05em .5em .5em; border: 2px solid color-mix(in srgb, var(--brass) 35%, var(--brass-soft)); border-radius: 999px; background: var(--brass-soft); color: var(--brass); font: 800 1.2em/1 var(--display); letter-spacing: -.02em; box-shadow: 0 1em 2em -1.2em rgba(34, 56, 26, .55); opacity: 0; transform: rotate(-8deg) scale(0); transition: transform .6s cubic-bezier(.3, 1.7, .5, 1), opacity .2s; }
.anim-plant .pl-badge i { display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--pea); color: #fff; }
.anim-plant .pl-badge svg { width: 1em; height: 1em; }
.anim-plant.is-named .pl-badge { opacity: 1; transform: rotate(-8deg); transition-delay: .8s; }
/* a new name: snap the bubble and badge away for one frame, so they come in again */
.anim-plant.is-recheer .pl-cheer { transition: none !important; opacity: 0; transform: scale(.6); }
.anim-plant.is-recheer .pl-badge { transition: none !important; opacity: 0; transform: rotate(-8deg) scale(0); }

/* where Pea stands on the naming beat */
.anim-plant[data-beat="7"] .pl-actor { --dx: var(--dx8); --sc: var(--sc8); --dy: var(--dy8, 0px); }
.anim-plant[data-beat="7"] .pl-idle { animation: plant-wait 2.2s ease-in-out .8s infinite; }
.anim-plant.is-named .pl-actor { --dx: var(--dx9); --sc: var(--sc9); }
.anim-plant.is-named .pl-idle { animation: none; }

/* ---------- The cursor ---------- */
.anim-plant .pl-cursor { position: absolute; z-index: 6; left: 0; top: 0; width: 1.9em; height: 1.9em; opacity: 0; transform: translate(var(--cx, 90cqw), var(--cy, 70cqw)); transition: transform .75s cubic-bezier(.45, 0, .2, 1), opacity .25s ease; pointer-events: none; }
.anim-plant.is-cursor .pl-cursor { opacity: 1; }
.anim-plant .pl-cursor.is-snap { transition: opacity .25s ease; }
.anim-plant .pl-cursor svg { position: relative; display: block; width: 100%; height: 100%; filter: drop-shadow(0 .15em .25em rgba(0, 0, 0, .25)); }
.anim-plant .pl-cursor svg path { fill: var(--ink); stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; }
.anim-plant .pl-cursor.is-click svg { animation: plant-press .28s ease; }
.anim-plant .pl-ring { position: absolute; left: 21%; top: 13%; width: 2.6em; height: 2.6em; margin: -1.3em 0 0 -1.3em; border-radius: 50%; border: .2em solid var(--pea-hi); opacity: 0; }
.anim-plant .pl-cursor.is-click .pl-ring { animation: plant-ring .6s ease-out; }

/* ---------- Under the laptop ---------- */
.anim-plant .pl-play { position: absolute; z-index: 5; left: 50%; top: 24%; display: inline-flex; align-items: center; gap: 12px; padding: 18px 30px; border: 0; border-radius: 999px; background: var(--band); color: var(--band-ink); font: 800 19px/1 var(--body); cursor: pointer; white-space: nowrap; transform: translate(-50%, -50%); box-shadow: 0 18px 40px -14px rgba(34, 56, 26, .8), 0 0 0 10px rgba(199, 222, 168, .6); transition: background .2s, transform .15s; }
.anim-plant .pl-play:hover { background: var(--pea); }
.anim-plant .pl-play:active { transform: translate(-50%, -50%) scale(.97); }
.anim-plant .pl-play:focus-visible { outline: 3px solid var(--pea-hi); outline-offset: 5px; }
.anim-plant .pl-play svg { width: 22px; height: 22px; }
.anim-plant .pl-play[hidden] { display: none; }

.anim-plant .pl-under { display: grid; justify-items: center; gap: 10px; margin-top: 22px; text-align: center; }
.anim-plant .pl-dots { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.anim-plant .pl-dots button { position: relative; display: block; width: 34px; height: 24px; padding: 0; border: 0; border-radius: 8px; background: none; cursor: pointer; }
.anim-plant .pl-dots button::before, .anim-plant .pl-dots button::after { content: ""; position: absolute; left: 4px; right: 4px; top: 50%; height: 6px; margin-top: -3px; border-radius: 6px; background: var(--line); }
.anim-plant .pl-dots button::after { background: var(--pea-hi); transform: scaleX(0); transform-origin: 0 50%; }
.anim-plant .pl-dots button:hover::before { background: var(--pea-glow); }
.anim-plant .pl-dots button:focus-visible { outline: 2px solid var(--pea-hi); outline-offset: 1px; }
.anim-plant .pl-dots button.is-done::after { transform: none; }
.anim-plant .pl-dots button.is-now::after { animation: plant-fill var(--dur, 5s) linear both; }
.anim-plant.is-idle .pl-dots button.is-now::after { animation: none; }
/* wide enough that every caption is one line on a laptop (so the scene plus caption fit a 720px-tall screen) */
.anim-plant .pl-cap { max-width: min(100%, 22em); min-height: 1.12em; font: 800 clamp(26px, 3.8vw, 42px)/1.12 var(--display); letter-spacing: -.035em; color: var(--ink); text-wrap: balance; }
.anim-plant .pl-cap__t { display: inline-block; }
.anim-plant .pl-cap__t > span { display: inline-block; }
.anim-plant .pl-cap.is-new .pl-cap__t { animation: plant-capin .5s cubic-bezier(.2, .7, .2, 1) both; }
.anim-plant .pl-sub { display: grid; justify-items: center; gap: 12px; width: 100%; min-height: 66px; }
/* steps 2 to 6: the hour, said softly under the caption (it keeps its space on step 1, so nothing jumps) */
.anim-plant .pl-hour { margin: -6px 0 0; font: 600 15.5px/1.3 var(--body); color: var(--muted); text-wrap: balance; opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility 0s linear .4s; }
.anim-plant[data-beat="2"] .pl-hour, .anim-plant[data-beat="3"] .pl-hour, .anim-plant[data-beat="4"] .pl-hour,
.anim-plant[data-beat="5"] .pl-hour, .anim-plant[data-beat="6"] .pl-hour { opacity: 1; visibility: visible; transition: opacity .5s ease .4s; }
.anim-plant[data-beat="7"] .pl-hour { display: none; }
.anim-plant .pl-skip { padding: 10px 14px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 700 15.5px/1 var(--body); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: pointer; }
.anim-plant .pl-skip:hover { color: var(--pea); }
.anim-plant[data-beat="7"] .pl-skip { display: none; }

/* the name box: under the caption, with a soft green glow ring */
.anim-plant .pl-name { position: relative; display: none; align-items: center; gap: 8px; width: min(520px, 100%); padding: 7px; background: #fff; border: 2px solid var(--pea-hi); border-radius: 999px; box-shadow: var(--shadow), 0 0 0 6px rgba(199, 222, 168, .55); transition: border-color .2s, box-shadow .2s; }
.anim-plant .pl-name::after { content: ""; position: absolute; inset: -12px; border-radius: 999px; border: 3px solid var(--pea-hi); opacity: 0; pointer-events: none; }
.anim-plant.is-wait .pl-name::after { animation: plant-nudge 2s ease-in-out infinite; }
.anim-plant.is-wait .pl-name:focus-within::after { animation: none; }
/* "That's the one" with nothing typed: the same soft pulse, a little quicker, even while the box has focus */
.anim-plant.is-nudge .pl-name::after, .anim-plant.is-nudge .pl-name:focus-within::after { animation: plant-nudge 1.1s ease-in-out 2; }
.anim-plant.is-ask .pl-name { display: flex; animation: plant-formin .55s cubic-bezier(.2, .7, .2, 1) both; }
.anim-plant .pl-name:focus-within { border-color: var(--pea); box-shadow: var(--shadow), 0 0 0 6px rgba(111, 161, 74, .3); }
.anim-plant .pl-name__box { flex: 1; min-width: 0; display: flex; }
.anim-plant .pl-name input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 0 6px 0 18px; font: 600 19px/1.2 var(--body); color: var(--ink); outline: none; }
.anim-plant .pl-name input::placeholder { color: var(--muted); opacity: .75; }
.anim-plant .pl-name .btn { flex: none; padding: 15px 24px; }
.anim-plant .pl-name .btn:focus-visible { outline: 3px solid var(--pea-hi); outline-offset: 3px; }
.anim-plant .pl-keep { display: none; margin-top: -4px; padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: var(--muted); font: 700 15.5px/1 var(--body); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: pointer; }
.anim-plant .pl-keep:hover { color: var(--pea); }
.anim-plant .pl-keep:focus-visible { outline: 2px solid var(--pea-hi); outline-offset: 2px; }
.anim-plant.is-ask:not(.is-named) .pl-keep { display: inline-block; animation: plant-formin .5s cubic-bezier(.2, .7, .2, 1) .15s both; }
.anim-plant .pl-buyrow { display: none; justify-items: center; gap: 8px; margin-top: 6px; }
.anim-plant.is-ask .pl-buyrow { display: grid; animation: plant-formin .5s cubic-bezier(.2, .7, .2, 1) .25s both; }
.anim-plant .pl-buy:focus-visible { outline: 3px solid var(--pea-hi); outline-offset: 4px; }
.anim-plant .pl-price { margin: 0; font: 600 15.5px/1.3 var(--body); color: var(--muted); }
/* after naming: Make Pea yours is the main action, the name box stays (quieter) for a change of mind */
.anim-plant.is-named .pl-buy { background: var(--band); color: var(--band-ink); box-shadow: 0 12px 30px -14px rgba(34, 56, 26, .8); }
.anim-plant.is-named .pl-buy:hover { background: var(--pea); color: var(--band-ink); }
.anim-plant.is-named .pl-name { width: min(440px, 100%); border-color: var(--line); box-shadow: none; background: var(--card); }
.anim-plant.is-named .pl-name:focus-within { border-color: var(--pea-hi); box-shadow: 0 0 0 5px rgba(111, 161, 74, .18); }
.anim-plant.is-named .pl-name .btn { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.anim-plant.is-named .pl-name .btn:hover { background: #fff; color: var(--pea); }
/* the control row shows from the first frame (sound button); only Watch again waits for the end */
.anim-plant .pl-ctl { margin-top: 0; }
.anim-plant .pl-ctl { min-height: 40px; }
.anim-plant .pl-ctl [data-again] { display: none; }
.anim-plant[data-beat="7"] .pl-ctl [data-again] { display: inline-flex; }
/* reduced motion: the big "Watch with sound" over the laptop is the only one until it's pressed (the row keeps its height) */
.anim-plant.is-gate .pl-ctl .snd-btn { visibility: hidden; }

/* phones: each step dot is a 44px-tall tap target; the bar you see stays 6px */
@media (max-width: 640px) {
  .anim-plant .pl-dots button { height: 44px; }
}

/* ---------- Phone: a smaller laptop with a squarer screen and bigger type ---------- */
@container plant (max-width: 600px) {
  .anim-plant .pl-lid { width: 95%; padding: 2.8% 2% 2%; border-radius: 18px 18px 8px 8px; }
  .anim-plant .pl-lid::before { padding-top: 2.8%; }
  .anim-plant .pl-screen { aspect-ratio: 10 / 9; border-radius: 9px; }
  .anim-plant .pl-base { padding-bottom: 3.6%; }
  .anim-plant .pl-cap { max-width: 17ch; min-height: 2.24em; display: grid; place-items: center; }
  .anim-plant .pl-play { top: 17%; gap: 10px; padding: 13px 22px; font-size: 16px; box-shadow: 0 14px 30px -12px rgba(34, 56, 26, .8), 0 0 0 7px rgba(199, 222, 168, .6); }
  .anim-plant .pl-play svg { width: 18px; height: 18px; }
}
@container plscreen (max-width: 520px) {
  .anim-plant .pl-scene { font-size: 4.25cqw; --ax: 23%; --ah: 80%; --dx8: 17cqw; --dx9: 17cqw; --sc8: 1.12; --sc9: 1.12; --hx: -15%; --hs: .5; }
  .anim-plant .pl-bar { height: 2.1em; padding: 0 .55em; gap: .35em; }
  .anim-plant .pl-label { font-size: .74em; padding: .4em .7em; }
  .anim-plant .pl-apps b { font-size: .62em; padding: .38em .55em; }
  .anim-plant .pl-rail { top: 2.1em; width: 6%; padding: .6em .3em; gap: .5em; }
  .anim-plant .pl-rail b { height: 1.1em; border-radius: .35em; }
  .anim-plant .pl-rail i { height: .35em; }
  .anim-plant .pl-stage { left: 6%; top: 2.1em; bottom: 3.3em; }
  .anim-plant .pl-box { left: calc(6% + .6em); right: .6em; bottom: .6em; height: 2.35em; gap: .35em; }
  .anim-plant .pl-chip { gap: .25em; padding: .3em .55em .3em .3em; font-size: .68em; }
  .anim-plant .pl-type { font-size: .8em; gap: .35em; }
  .anim-plant .pl-link em { font-size: .74em; }
  .anim-plant .pl-send { width: 1.85em; height: 1.85em; }
  .anim-plant .pl-convo { left: 45%; right: 3%; top: 3%; bottom: 3%; }
  .anim-plant .pl-grp { gap: .5em; }
  .anim-plant .pl-msg { max-width: 100%; padding: .5em .7em; font-size: .9em; border-radius: .95em; }
  .anim-plant .pl-msg--me.pl-msg { gap: .35em; }
  .anim-plant .pl-sq { padding: .45em .7em; }
  .anim-plant .pl-sq svg { width: 4.6em; height: 1.4em; }
  /* the setup line and the hello sit at the top of the chat */
  .anim-plant .pl-grp[data-g="2"] { padding-top: 0; }
  /* the Allow card stacks: the question, then a big Allow under it */
  .anim-plant .pl-allow { flex-direction: column; gap: .6em; padding: .85em 1.1em .9em; font-size: .95em; text-align: center; }
  .anim-plant .pl-allow__ico { display: none; }
  .anim-plant .pl-allow__t { max-width: none; }
  .anim-plant .pl-allow__b { padding: .6em 1.8em; }
  .anim-plant .pl-files { gap: .4em; }
  .anim-plant .pl-file__card { width: 2.7em; height: 3.3em; padding: .32em; gap: .22em; }
  .anim-plant .pl-file__card i { height: .22em; }
  .anim-plant .pl-file--web .pl-file__pic { height: .9em; }
  .anim-plant .pl-file--web .pl-file__bar { height: .35em; }
  .anim-plant .pl-file--note .pl-file__card { padding-top: .55em; }
  .anim-plant .pl-file--price b { font-size: .9em; }
  .anim-plant .pl-file em { font-size: .6em; }
  .anim-plant .pl-tiles { gap: .4em; }
  .anim-plant .pl-tile { gap: .3em; padding: .35em .35em; font-size: .68em; border-radius: .6em; }
  .anim-plant .pl-tile > i { width: 1.7em; height: 1.7em; border-radius: .5em; }
  .anim-plant .pl-yes { padding: .55em 1.3em; font-size: .85em; }
  .anim-plant .pl-pile { width: 36%; right: 4%; height: 74%; }
  .anim-plant .pl-packet { left: 40%; height: 30%; }
  .anim-plant[data-beat="2"] .pl-z { display: none; }
  .anim-plant .pl-packet__front b { font-size: .9em; }
  .anim-plant .pl-packet__leaf { width: .8em; height: .8em; }
  .anim-plant .pl-hometag { font-size: .66em; }
  .anim-plant .pl-prompt, .anim-plant .pl-cheer { left: 60%; top: 3%; max-width: 39%; font-size: .86em; }
  .anim-plant .pl-later { left: 67%; top: 42%; max-width: 32%; font-size: .66em; }
  .anim-plant.is-named .pl-later { top: 68%; }
  .anim-plant .pl-arrow { left: 80%; bottom: 3%; width: 2.5em; height: 2.5em; }
  .anim-plant .pl-badge { left: 64%; top: 44%; font-size: .86em; }
  .anim-plant .pl-cursor { width: 1.6em; height: 1.6em; }
}
/* a very narrow screen: the message box's chip keeps only its house icon */
@container plscreen (max-width: 318px) {
  .anim-plant .pl-chip { padding: .3em .35em; }
  .anim-plant .pl-chip span { display: none; }
}
@container plant (max-width: 420px) {
  .anim-plant .pl-name { padding: 6px; }
  .anim-plant .pl-name input { padding-left: 14px; font-size: 17px; }
  .anim-plant .pl-name .btn { padding: 14px 16px; font-size: 16px; }
}
/* ---------- Small phones: no bezel, no sidebar, so the scene is bigger; mock text 11px or more ---------- */
@media (max-width: 480px) {
  .anim-plant .pl-lid { width: 100%; padding: 0; border-radius: 12px 12px 6px 6px; }
  .anim-plant .pl-lid::before { display: none; }
  .anim-plant .pl-screen { border-radius: 11px 11px 5px 5px; }
  .anim-plant .pl-base { margin-inline: -2.5%; }
  .anim-plant .pl-rail { display: none; }
  .anim-plant .pl-stage { left: 0; }
  .anim-plant .pl-box { left: .6em; }
  .anim-plant .pl-label, .anim-plant .pl-file em { font-size: max(11px, .76em); }
  /* the one click reads on a phone: 14px words and an Allow at least 40px tall */
  .anim-plant .pl-allow { font-size: 14px; }
  .anim-plant .pl-allow__b { min-height: 40px; padding: 0 1.9em; }
  .anim-plant .pl-apps b { font-size: max(10px, .6em); }
  .anim-plant .pl-link em { font-size: max(11px, .8em); }
  .anim-plant .pl-type { font-size: max(11px, .8em); }
  .anim-plant .pl-chip { font-size: max(11px, .68em); }
  /* the tiles stay inside the chat column, and each tick sits on its tile's corner above the
     label, so it never covers a letter (Accounts) and is never cut by the window edge (Calendar) */
  .anim-plant .pl-grp[data-g="5"] { gap: .75em; }
  .anim-plant .pl-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65em .3em; }
  .anim-plant .pl-tile { gap: .25em; padding: .38em .4em .38em .3em; font-size: max(11px, .76em); }
  .anim-plant .pl-tile > i { width: 1.3em; height: 1.3em; }
  .anim-plant .pl-tile > b { top: -.95em; right: -.45em; width: 1.3em; height: 1.3em; }
  .anim-plant .pl-tile > b svg { width: .8em; height: .8em; }
  .anim-plant .pl-later { font-size: max(10.5px, .66em); }
  /* the naming beat and after: a bigger Pea (grown from its feet), so even a long name reads on the sticker */
  .anim-plant .pl-scene { --sc8: 1.18; --dy8: 1.6cqw; --sc9: 1.18; }
  /* the name box and its button stack, so the placeholder and a 20-letter name show in full */
  .anim-plant .pl-name { flex-direction: column; align-items: stretch; gap: 10px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
  .anim-plant .pl-name::after { display: none; }
  .anim-plant .pl-name:focus-within { box-shadow: none; }
  .anim-plant .pl-name__box { position: relative; min-height: 56px; background: #fff; border: 2px solid var(--pea-hi); border-radius: 999px; box-shadow: var(--shadow), 0 0 0 6px rgba(199, 222, 168, .55); transition: border-color .2s, box-shadow .2s; }
  .anim-plant .pl-name__box::after { content: ""; position: absolute; inset: -11px; border-radius: 999px; border: 3px solid var(--pea-hi); opacity: 0; pointer-events: none; }
  .anim-plant.is-wait .pl-name__box::after { animation: plant-nudge 2s ease-in-out infinite; }
  .anim-plant.is-wait .pl-name__box:focus-within::after { animation: none; }
  .anim-plant.is-nudge .pl-name__box::after, .anim-plant.is-nudge .pl-name__box:focus-within::after { animation: plant-nudge 1.1s ease-in-out 2; }
  .anim-plant .pl-name__box:focus-within { border-color: var(--pea); box-shadow: var(--shadow), 0 0 0 6px rgba(111, 161, 74, .3); }
  .anim-plant .pl-name input { padding: 0 16px; text-align: center; }
  .anim-plant .pl-name .btn { width: 100%; justify-content: center; }
  /* named: quieter, Make Pea yours leads */
  .anim-plant.is-named .pl-name { width: 100%; border: 0; background: transparent; box-shadow: none; }
  .anim-plant.is-named .pl-name__box { min-height: 54px; border: 1.5px solid var(--line); box-shadow: none; }
  .anim-plant.is-named .pl-name:focus-within { box-shadow: none; }
  .anim-plant.is-named .pl-name__box:focus-within { border-color: var(--pea-hi); box-shadow: 0 0 0 5px rgba(111, 161, 74, .18); }
  .anim-plant.is-named .pl-name .btn { background: transparent; color: var(--pea); box-shadow: none; }
}

/* ---------- Keyframes ---------- */
@keyframes plant-pop { 0% { transform: translateY(3%) scale(1.04, .95); } 45% { transform: translateY(-3.5%) scale(.97, 1.03); } 100% { transform: none; } }
@keyframes plant-hop { 0% { transform: scale(1.05, .95); } 35% { transform: translateY(-14%) scale(.97, 1.04); } 62% { transform: translateY(0) scale(1.05, .95); } 80% { transform: translateY(-3%) scale(.98, 1.02); } 100% { transform: none; } }
/* Pea rises out of its home's soil (the house front stays in front of it) */
@keyframes plant-sprout { 0% { transform: translateY(34%); } 55% { transform: translateY(-5%) scale(.97, 1.04); } 78% { transform: translateY(1%) scale(1.03, .97); } 100% { transform: none; } }
@keyframes plant-cheer { 0% { transform: none; } 18% { transform: scale(1.05, .95); } 42% { transform: translateY(-16%) rotate(-5deg) scale(.97, 1.04); } 60% { transform: translateY(0) rotate(4deg) scale(1.04, .96); } 78% { transform: translateY(-4%) rotate(-2deg); } 100% { transform: none; } }
@keyframes plant-wait { 0%, 100% { transform: none; } 50% { transform: translateY(-2.2%) rotate(-1deg); } }
@keyframes plant-rumble { 0%, 100% { transform: translateX(-1.2%) rotate(-1deg); } 50% { transform: translateX(1.2%) rotate(1deg); } }
@keyframes plant-crumb { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 12% { opacity: 1; } 55% { opacity: 1; transform: translate(var(--x), var(--y)) scale(1); } 100% { opacity: 0; transform: translate(calc(var(--x) * 1.35), calc(var(--y) + 2.6em)) scale(.7); } }
@keyframes plant-puff { 0% { opacity: 0; transform: translateY(30%) scale(.4); } 8% { opacity: .95; } 22% { opacity: 0; transform: translateY(-60%) scale(1.15); } 100% { opacity: 0; transform: translateY(-60%) scale(1.15); } }
@keyframes plant-glow { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, -50%) scale(1.06); } }
@keyframes plant-twinkle { 0%, 100% { opacity: 0; transform: scale(0) rotate(0); } 40%, 60% { opacity: 1; transform: scale(1) rotate(45deg); } }
@keyframes plant-teeter { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-4.5deg); } 70% { transform: rotate(4deg); } }
@keyframes plant-breathe { 0%, 100% { transform: none; } 50% { transform: scale(1.02, .985); } }
@keyframes plant-z { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(.4em, -2.4em) scale(1.1); } }
@keyframes plant-blink { 50% { opacity: 0; } }
@keyframes plant-press { 50% { transform: scale(.86); } }
@keyframes plant-ring { 0% { opacity: .9; transform: scale(.3); } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes plant-drop { 0% { opacity: 0; transform: translateY(-1.4em); } 60% { opacity: 1; transform: translateY(.12em); background: var(--pea-glow); } 100% { opacity: 1; transform: none; background: transparent; } }
@keyframes plant-point { 0%, 100% { transform: none; } 50% { transform: translateY(.3em); } }
@keyframes plant-nudge { 0%, 100% { opacity: 0; transform: scale(.98); } 50% { opacity: .55; transform: scale(1.01); } }
@keyframes plant-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes plant-capin { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes plant-formin { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
