/* The stories demo: the wait while the story is made live, and the "Super secret info" panel (4 Dec 2026).
   Given: the waiting card (#storyWait), the "Open your book" button and the panel (#secret) in index.html, filled in
   by stories-live.js. Gives back: a white card like the form's with a visitor bobbing, a big gag, five stars for the
   stages and the countdown in a bold pill; under the player, a dark "behind the curtain" panel whose lines tick in.
   Never: brown, a shape behind words (colour only), movement other than transform and opacity; still with
   "reduce motion". */

.trap{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}

/* The waiting card keeps one size whatever the message (Zesty, 4 Dec 2026): everything sits in fixed spaces */
.wait{text-align:center;padding:30px 26px;height:500px;display:flex;flex-direction:column;align-items:center;justify-content:center}
.wait[hidden]{display:none}
.wait-pal{width:96px;height:80px;margin:0 auto 14px;display:grid;place-items:center;animation:palBob 1.4s ease-in-out infinite alternate}
.wait-pal svg{display:block;width:100%;height:100%;overflow:visible}
.wait-big{margin:0 0 8px;font-weight:900;font-size:clamp(28px,6vw,38px);line-height:1.1;color:var(--deep-violet);text-wrap:balance;
  height:2.2em;display:flex;align-items:center;justify-content:center;overflow:hidden}
.wait-small{margin:0 auto;max-width:34ch;font-size:clamp(16px,3.4vw,19px);line-height:1.45;color:var(--muted);text-wrap:balance;height:4.35em;overflow:hidden}

/* Five stars for the stages: waiting, picked up, voices, mixing, ready */
.wait-steps{list-style:none;display:flex;justify-content:center;gap:12px;margin:22px 0 0;padding:0}
.wait-steps li{width:24px;height:24px;background:#e4dbff;
  clip-path:polygon(50% 0,62% 36%,100% 38%,70% 60%,80% 100%,50% 76%,20% 100%,30% 60%,0 38%,38% 36%);transition:transform .3s}
/* Done: green; this one: yellow (as the form's stars, 4 Dec 2026) */
.wait-steps li.done{background:#3fbf7f}
.wait-steps li.now{background:#ffc83d;animation:twinkle 1s ease-in-out infinite alternate}
@keyframes twinkle{from{transform:scale(1) rotate(-8deg)}to{transform:scale(1.35) rotate(8deg)}}

.wait-count{margin:20px auto 0;max-width:44ch;min-height:46px;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:17px;
  color:#fff;background:linear-gradient(95deg,var(--deep-pink),var(--deep-violet));border-radius:999px;padding:8px 20px;box-shadow:0 4px 0 #4a2bc2}
.wait-count:empty{visibility:hidden}   /* its space is kept, so nothing moves when it comes and goes */

.open-book{display:flex;margin:18px auto 0;font-size:22px;min-height:64px}
.open-book[hidden]{display:none}

/* Behind the curtain: monospace lines ticking in, each with its time */
.secret{margin:22px 0 0;background:#231a4a;color:#e9e4ff;border-radius:22px;padding:18px 20px 16px;border:3px solid #5b34d6;
  box-shadow:0 6px 0 #160f33}
.secret[hidden]{display:none}
.secret h2{margin:0 0 10px;font-size:15px;font-weight:900;letter-spacing:.04em;text-transform:uppercase;color:#ffd34d}
/* A fixed height, scrolling to the newest line, so the panel never changes size as lines arrive (4 Dec 2026) */
.secret ol{list-style:none;margin:0;padding:0;font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;font-size:14px;line-height:1.6;
  height:16em;overflow-y:auto;overscroll-behavior:contain}
.secret li{display:flex;gap:12px;animation:tickIn .35s ease-out}
.secret time{color:#8fe3c0;flex:none}
@keyframes tickIn{from{opacity:0;transform:translateY(6px)}}

@media (min-width:760px){
  .wait{height:440px}
  .wait-big{font-size:42px}
  .wait-small{font-size:21px}
  .secret ol{font-size:15px}
}
@media (max-width:520px){
  .wait{height:520px;padding:26px 18px}
  .secret ol{height:19em}
}
@media (prefers-reduced-motion:reduce){
  .wait-pal,.wait-steps li.now,.secret li{animation:none}
}
