/* =============================================================================
   ReactLive animations — shared stylesheet
   The vocabulary every animation in this folder speaks: the website's tokens,
   borrowed as they are, plus the pieces each animation needs — the agent bar,
   agent cards, orbs, captions, the touch ripple, the start screen, the
   controls and the header. Scene-specific styles (the set, the people, the product screens)
   stay in each animation's own <style>. How to use all of this: RULES.md.

   Structure
     0  Brand face
     1  Site tokens — copied from css/reactive.v2.css, keep in sync
     2  Animation tokens — what the site doesn't have
     3  Page and canvas — animation pages are <body class="scene">
     4  Agents: colour hook, agent bar, agent card, orb, captions
     5  Shared motion
     6  Start screen
     7  Controls
     8  Preview mode — ?preview, for capturing thumbnails
     9  Responsive
    10  The audience app — ReactLive on an attendee's phone, in the Spark skin
    11  Header — full width across the top of every page in this folder
   ========================================================================== */

/* --- 0  Brand face ------------------------------------------------------------
   As in css/reactive.v2.css: ReactLive Bold, for agent names and nothing else. */
@font-face {
  font-family: 'ReactLive';
  src: url('../fonts/ReactLive-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Geist and JetBrains Mono, self-hosted as on the site, so no visitor request
   reaches Google. Same files and unicode-ranges as css/reactive.v2.css; the
   weight ranges are each file's full axis (Geist 100–900, JetBrains Mono
   400–800), because the scenes use Geist 800 and Mono 700, which the site's
   narrower declarations would leave to faux bold. */
@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/Geist-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/Geist-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/Geist-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/Geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url('../fonts/Geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/JetBrainsMono-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/JetBrainsMono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/JetBrainsMono-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/JetBrainsMono-vietnamese.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/JetBrainsMono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/JetBrainsMono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- 1  Site tokens -------------------------------------------------------------
   Copied from css/reactive.v2.css §1 with the same names and values, so a rule or
   snippet from the site means the same thing here. Dark values only: every
   animation is a dark scene, as the site is a dark site. Change them in
   reactive.v2.css first, then here. RGB triples are comma-separated, as on the
   site: rgba(var(--ag-answer-rgb), .4). */
:root {
  /* Graphite */
  --ink:             #0b0d11;
  --ink-2:           #101318;
  --ink-3:           #171a20;
  --fg-on-dark:      #eef0f5;
  --fg-on-dark-mut:  #a0a6b5;
  --fg-on-dark-fnt:  #8a94a6;
  --line-dark:       #1a1e25;
  --line-dark-str:   #232830;
  --accent-lift:     #eef0f5;
  --accent-bright:   #c6cad3;
  --accent-lift-fg:  #1e2229;

  /* Agents — the only colour in the interface */
  --ag-engage-lift:     #f98c3f;
  --ag-engage-soft-dk:  #2b1c12;
  --ag-engage-line-dk:  #5a3218;
  --ag-engage-rgb:      249, 140, 63;
  --ag-answer-lift:     #4293f2;
  --ag-answer-soft-dk:  #132030;
  --ag-answer-line-dk:  #1d3859;
  --ag-answer-rgb:      66, 147, 242;
  --ag-protect-lift:    #a47cf6;
  --ag-protect-soft-dk: #1f1830;
  --ag-protect-line-dk: #3d2d63;
  --ag-protect-rgb:     164, 124, 246;
  /* Stagent's crimson — the site's colour for the Stream Agent */
  --ft-stagent-lift:    #ff5f75;
  --ft-stagent-soft-dk: #2c1419;
  --ft-stagent-line-dk: #5c2030;

  /* Status — reserved, never decorative */
  --safe-lift:  #3fcf7f;
  --hold-lift:  #f5b33c;
  --live-lift:  #f5555a;
  --hold-rgb:   245, 179, 60;
  --live-rgb:   245, 85, 90;

  /* Type */
  --font:       'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono:       'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-brand: 'ReactLive', var(--font);

  /* Radius, shadow, easing */
  --r-xs: 4px;
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;
  --sh-dark: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 24px 60px -20px rgba(0, 0, 0, .8);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* --- 2  Animation tokens --------------------------------------------------------
   What an animation needs and the site doesn't have. */
:root {
  /* The Stream Agent under an agent name, with the site's value */
  --ag-stream-lift: var(--ft-stagent-lift);
  --ag-stream-rgb:  255, 95, 117;
  /* Status triple for translucent success washes */
  --safe-rgb: 63, 207, 127;

  /* An agent card's ground: near-black, tinted toward its agent */
  --ag-engage-ground:  rgba(24, 15, 10, .95);
  --ag-answer-ground:  rgba(8, 12, 24, .95);
  --ag-protect-ground: rgba(16, 10, 28, .95);
  --ag-stream-ground:  rgba(24, 8, 12, .95);

  /* The product. Spark is the ReactLive app's current skin, so a depicted
     ReactLive screen uses it — and nothing outside a depicted screen does. */
  --spark-pink:       #ff4f9a;
  --spark-pink-rgb:   255, 79, 154;
  --spark-violet:     #8b5cf6;
  --spark-violet-rgb: 139, 92, 246;
  --spark-card:       #1c1529;
  --spark-card-2:     #251c36;

  /* Hairline for panels floating over the scene */
  --hairline: rgba(255, 255, 255, .09);

  /* Chrome accent — the start screen and controls. RULES.md §3 wants graphite;
     this still points at Spark until that's decided (RULES.md §12). */
  --chrome-accent:     var(--spark-pink);
  --chrome-accent-rgb: var(--spark-pink-rgb);
}

/* --- 3  Page and canvas -------------------------------------------------------
   Every animation is authored on a 1600×900 canvas in pixels and scaled to fit
   the window by its script; the controls sit underneath. Scoped to .scene so
   other pages in this folder (directory.html) can share the tokens. */
* { box-sizing: border-box; }
.scene {
  margin: 0; height: 100vh; height: 100dvh;
  background: var(--ink); color: var(--fg-on-dark);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 16px; overflow: hidden;
}
.fit { position: relative; width: 1600px; height: 900px; flex-shrink: 0; }
.canvas {
  position: absolute; inset: 0; width: 1600px; height: 900px; overflow: hidden;
  transform-origin: top left; border-radius: 18px;
  background: var(--ink-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px var(--hairline);
}

/* --- 4  Agents ---------------------------------------------------------------- */

/* Any element with data-a takes its agent's colour as --c, --c-rgb and --c-ground */
[data-a="engage"]  { --c: var(--ag-engage-lift);  --c-rgb: var(--ag-engage-rgb);  --c-ground: var(--ag-engage-ground); }
[data-a="answer"]  { --c: var(--ag-answer-lift);  --c-rgb: var(--ag-answer-rgb);  --c-ground: var(--ag-answer-ground); }
[data-a="protect"] { --c: var(--ag-protect-lift); --c-rgb: var(--ag-protect-rgb); --c-ground: var(--ag-protect-ground); }
[data-a="stream"]  { --c: var(--ag-stream-lift);  --c-rgb: var(--ag-stream-rgb);  --c-ground: var(--ag-stream-ground); }

/* Agent bar: every agent in the story, lit while it works. Rounded squares
   whose corners follow the marks' (a mark's 9px radius + 5px padding). */
.dock { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 8; display: flex; gap: 12px; }
.agent {
  width: 236px; display: flex; align-items: center; gap: 10px;
  padding: 5px 14px 5px 5px; border-radius: 14px; background: rgba(12, 8, 20, .9); border: 1px solid var(--hairline);
  transition: border-color .4s, box-shadow .4s;
}
.agent img { width: 30px; height: 30px; border-radius: 9px; opacity: .55; transition: opacity .4s; }
.agent div { min-width: 0; }
.agent b { display: block; font-family: var(--font-brand); font-size: 13px; font-weight: 700; line-height: 1.2; }
.agent span {
  display: block; font-size: 11px; color: var(--fg-on-dark-mut);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .4s;
}
.agent > i { margin-left: auto; width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); }
.agent.on { border-color: rgba(var(--c-rgb), .75); box-shadow: 0 0 0 1px rgba(var(--c-rgb), .25), 0 0 28px rgba(var(--c-rgb), .4); }
.agent.on img { opacity: 1; }
.agent.on span { color: var(--c); }
.agent.on > i { background: var(--c); animation: blink 1.1s infinite; }

/* Agent card: where an agent's work lands. The scene places it and chooses its
   entrance (a transform on the card and its .on state). */
.a-card {
  position: absolute; z-index: 6; padding: 14px 16px; border-radius: 14px;
  background: var(--c-ground); border: 1px solid rgba(var(--c-rgb), .55);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55), 0 0 40px rgba(var(--c-rgb), .18);
  opacity: 0; transition: opacity .5s, transform .5s var(--ease);
}
.a-card.on { opacity: 1; }
.a-head { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.a-head img { width: 24px; height: 24px; border-radius: 7px; }
.a-head b { font-family: var(--font-brand); font-size: 13px; font-weight: 700; }
.a-head span { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--c); }

/* Orb: work travelling between places, in the colour of the agent carrying it.
   X and Y are eased apart so the path arcs. Markup: .orb-x > .orb-y > .orb[data-a]. */
.orb-x { position: absolute; z-index: 7; pointer-events: none; transition: transform 1.3s cubic-bezier(.45, 0, .55, 1); }
.orb-y { transition: transform 1.3s cubic-bezier(.15, .75, .3, 1); }
.orb {
  position: absolute; left: -10px; top: -10px; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle, #fff 0 28%, rgb(var(--c-rgb)) 58%, rgba(var(--c-rgb), 0) 72%);
  box-shadow: 0 0 26px 8px rgba(var(--c-rgb), .55); transition: transform .45s, opacity .45s;
}
.orb.pop { transform: scale(2.6); opacity: 0; }

/* Captions: the Stream Agent writing down what is said, word by word. Sits at
   the bottom of whatever it is placed in (the stage screen, a video). */
.captions {
  position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 4; display: flex; gap: 10px; align-items: flex-start;
  padding: 9px 12px 9px 9px; border-radius: 8px; background: rgba(4, 3, 8, .85); border: 1px solid rgba(var(--ag-stream-rgb), .5);
  opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s var(--ease);
}
.captions.on { opacity: 1; transform: none; }
.captions > img { width: 24px; height: 24px; border-radius: 7px; }
.cc-tag {
  position: absolute; left: 40px; top: -9px; padding: 2px 7px; border-radius: 99px; background: var(--ag-stream-lift); color: #fff;
  font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.cc-lines { flex: 1; height: 60px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; }
.cc-lines p { margin: 0; font-size: 14px; line-height: 20px; font-weight: 500; }
.cc-lines span { display: none; }
.cc-lines span.on { display: inline; }
/* A hand-off: the receiving agent marks the passage it takes (RULES.md §3) */
.cc-lines mark {
  color: inherit; background: transparent; border-radius: 3px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-color .6s, box-shadow .6s;
}
.cc-lines mark.on { background: rgba(var(--c-rgb), .4); box-shadow: 0 0 0 2px rgba(var(--c-rgb), .4); }

/* --- 5  Shared motion ---------------------------------------------------------- */
@keyframes blink { 50% { opacity: .25; } }

/* Touch ripple: a finger tapping a phone or a card. Place one .tap per container. */
.tap {
  position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; z-index: 10; pointer-events: none;
  background: rgba(255, 255, 255, .35); border: 2px solid rgba(255, 255, 255, .8); opacity: 0;
}
.tap.go { animation: tap .6s ease-out; }
@keyframes tap { 0% { opacity: 0; transform: scale(1.5); } 30% { opacity: 1; transform: scale(.8); } 100% { opacity: 0; transform: scale(1.3); } }

/* --- 6  Start screen ------------------------------------------------------------
   The scene waits, blurred and dimmed, until Play demo. That click is also what
   browsers need before a page may play sound. <body class="intro"> to start. */
.fit, .bar { transition: filter .9s var(--ease); }
body.intro .fit, body.intro .bar { filter: blur(10px) brightness(.3); }
.start {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 16px; background: rgba(0, 0, 0, .35); transition: opacity .6s;
}
body:not(.intro) .start { opacity: 0; pointer-events: none; }
.play-demo {
  display: inline-flex; align-items: center; gap: 12px; font: inherit; font-size: 22px; font-weight: 700; color: #fff;
  padding: 18px 34px 18px 26px; border: 0; border-radius: 99px; cursor: pointer;
  background: linear-gradient(135deg, var(--spark-pink), var(--spark-violet)); box-shadow: 0 18px 50px rgba(var(--spark-violet-rgb), .45);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.play-demo:hover { transform: scale(1.04); box-shadow: 0 22px 60px rgba(var(--spark-pink-rgb), .5); }
.play-demo:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.play-demo svg { width: 24px; height: 24px; }
.start p { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; font-weight: 600; color: rgba(255, 255, 255, .75); }
.start p svg { width: 18px; height: 18px; }

/* --- 7  Controls ---------------------------------------------------------------
   Under the canvas: the numbered narration, progress, Sound, Pause, Replay. */
.bar { display: flex; align-items: center; gap: 14px; width: min(1600px, 100%); }
.step { font-size: 15px; font-weight: 600; min-height: 1.4em; transition: opacity .3s; }
.step b { color: var(--chrome-accent); margin-right: 8px; font-variant-numeric: tabular-nums; }
.dots { display: flex; gap: 5px; margin-left: auto; }
.dots i { width: 22px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); transition: background .3s; }
.dots i.on { background: var(--chrome-accent); }
.btn {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--fg-on-dark); background: var(--ink-3); border: 1px solid var(--hairline);
  border-radius: 99px; padding: 7px 14px; cursor: pointer;
}
.btn:hover { border-color: var(--chrome-accent); }
.snd { display: inline-flex; align-items: center; gap: 7px; }
.snd svg { width: 15px; height: 15px; }
.snd .w, .snd[aria-pressed="true"] .x { display: none; }
.snd[aria-pressed="true"] .w { display: inline; }
.snd[aria-pressed="true"] { color: var(--chrome-accent); border-color: rgba(var(--chrome-accent-rgb), .6); }

/* --- 8  Preview mode ------------------------------------------------------------
   <name>.html?preview: silent, no start screen, no controls, loops, and the
   canvas fills its frame edge to edge — a clean frame for the index's
   thumbnails (RULES.md §11). */
.scene.preview { padding: 0; }
.scene.preview .start, .scene.preview .bar, .scene.preview .hdr { display: none; }
.scene.preview .canvas { border-radius: 0; box-shadow: none; }

/* --- 9  Responsive --------------------------------------------------------------- */
@media (max-width: 720px) {
  .bar { flex-wrap: wrap; }
  .step { flex-basis: 100%; }
  .dots { display: none; }
}

/* --- 10  The audience app ---------------------------------------------------------
   ReactLive's audience app on an attendee's phone, in the product's Spark skin. A
   .phone is 340×700 canvas pixels; each scene places and scales it with its own
   transforms (keep those in the scene). Views: .v-qa, .v-poll, .v-updates, shown by
   the phone's data-view. */
.phone { position: absolute; left: 0; top: 0; width: 340px; height: 700px; z-index: 5;
  transform-origin: top left; transition: transform 1.1s var(--ease), opacity .6s; will-change: transform; }
.phone.no-anim { transition: none; }
.phone.fade { opacity: 0; }

.phone .who { position: absolute; left: 50%; top: -54px; transform: translateX(-50%); white-space: nowrap;
  display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 600;
  background: rgb(12 8 20 / .85); border: 1px solid var(--hairline); border-radius: 99px; padding: 6px 16px 6px 6px; }
.phone .who i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 15px; font-weight: 800; color: #fff; }

.phone .body { position: absolute; inset: 0; border-radius: 48px; background: #17121f; padding: 12px;
  box-shadow: 0 0 0 2px #3a3148, 0 40px 90px rgb(0 0 0 / .7), 0 0 60px rgba(var(--spark-violet-rgb), .18); }
.phone .notch { position: absolute; left: 50%; top: 20px; transform: translateX(-50%); width: 96px; height: 26px; border-radius: 20px; background: #000; z-index: 9; }
.phone .scr { position: relative; height: 100%; border-radius: 38px; overflow: hidden; background: #110c1a;
  display: flex; flex-direction: column; font-size: 13px; }
.phone .status { display: flex; justify-content: space-between; padding: 16px 26px 0; font-size: 12px; font-weight: 700; height: 44px; }
.phone .status span:last-child { letter-spacing: 2px; font-size: 10px; }
.phone .app-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px 12px; }
.phone .logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--spark-pink), var(--spark-violet)); }
.phone .ev { font-weight: 700; font-size: 14px; }
.phone .ev-sub { font-size: 11px; color: var(--fg-on-dark-mut); }
.phone .live { margin-left: auto; font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--spark-pink);
  border: 1px solid rgba(var(--spark-pink-rgb), .5); border-radius: 99px; padding: 3px 8px; }
.phone .tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 0 16px 12px; padding: 4px; border-radius: 12px; background: var(--spark-card); }
.phone .tabs span { text-align: center; padding: 8px 0; border-radius: 9px; font-weight: 600; color: var(--fg-on-dark-mut); transition: background .3s, color .3s; }
.phone[data-view="qa"] .tabs span[data-t="qa"],
.phone[data-view="poll"] .tabs span[data-t="poll"],
.phone[data-view="updates"] .tabs span[data-t="updates"] { background: var(--spark-card-2); color: var(--fg-on-dark); }

.phone .view { position: absolute; left: 0; right: 0; top: 150px; bottom: 0; padding: 0 16px 18px; display: flex; flex-direction: column;
  opacity: 0; transform: translateX(12px); transition: opacity .35s, transform .35s var(--ease); pointer-events: none; }
.phone[data-view="qa"] .v-qa,
.phone[data-view="poll"] .v-poll,
.phone[data-view="updates"] .v-updates { opacity: 1; transform: none; }

.phone .list { flex: 1; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.phone .q { background: var(--spark-card); border: 1px solid var(--hairline); border-radius: 14px; padding: 11px 12px; display: flex; gap: 10px;
  transition: transform .5s var(--ease), opacity .5s, border-color .5s, background .5s; }
.phone .q.enter { opacity: 0; transform: translateY(-12px); }
.phone .q.mine { border-color: rgba(var(--spark-pink-rgb), .5); background: rgba(var(--spark-pink-rgb), .08); }
.phone .q-body { flex: 1; }
.phone .q-text { font-weight: 600; line-height: 1.3; }
.phone .q-meta { font-size: 11px; color: var(--fg-on-dark-mut); margin-top: 5px; }
.phone .q-meta b { color: var(--spark-pink); font-weight: 600; }
.phone .wait { display: flex; gap: 5px; align-items: flex-start; font-size: 11px; line-height: 1.35; color: var(--ag-answer-lift); margin-top: 5px; }
.phone .wait.done { color: var(--safe-lift); font-weight: 600; }
.phone .wait img,
.phone .hint img { width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; }
.phone .by { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; font-size: 10px; font-weight: 600; color: var(--ag-engage-lift); }
.phone .by img { width: 14px; height: 14px; border-radius: 4px; }
.phone .vote { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--fg-on-dark-mut); font-weight: 700; gap: 1px; min-width: 26px; }

.phone .hint { display: flex; gap: 7px; align-items: flex-start; font-size: 11px; line-height: 1.35; color: var(--ag-answer-lift); background: rgba(var(--ag-answer-rgb), .12); border: 1px solid rgba(var(--ag-answer-rgb), .4);
  border-radius: 10px; padding: 8px 10px; margin-top: 8px; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s var(--ease); }
.phone .hint.on { opacity: 1; transform: none; }
.phone .compose { display: flex; gap: 8px; margin-top: 10px; }
.phone .input { flex: 1; min-height: 44px; border-radius: 14px; background: var(--spark-card); border: 1px solid var(--hairline);
  padding: 12px; line-height: 1.35; position: relative; transition: border-color .3s; }
.phone .input.focus { border-color: var(--spark-pink); }
.phone .input .ph { color: var(--fg-on-dark-mut); }
.phone .input.has .ph { display: none; }
.phone .caret { display: none; width: 2px; height: 15px; background: var(--spark-pink); vertical-align: -2px; margin-left: 1px; animation: blink .9s steps(1) infinite; }
.phone .input.focus .caret { display: inline-block; }
.phone .send { width: 44px; height: 44px; align-self: flex-end; border-radius: 14px; border: 0; color: #fff; font-size: 18px; font-weight: 800;
  background: linear-gradient(135deg, var(--spark-pink), var(--spark-violet)); transition: transform .15s; }
.phone .send.press { transform: scale(.88); }

.phone .pq { font-size: 17px; font-weight: 700; line-height: 1.3; margin: 4px 0 14px; }
.phone .opt { position: relative; overflow: hidden; display: flex; justify-content: space-between; align-items: center;
  padding: 14px; margin-bottom: 9px; border-radius: 13px; background: var(--spark-card); border: 1px solid var(--hairline); font-weight: 600;
  transition: border-color .3s, transform .15s; }
.phone .opt.press { transform: scale(.97); }
.phone .opt .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(var(--spark-violet-rgb), .22); transition: width .8s var(--ease); }
.phone .opt.picked { border-color: var(--spark-pink); }
.phone .opt.picked .fill { background: rgba(var(--spark-pink-rgb), .22); }
.phone .opt span { position: relative; }
.phone .opt .pct { opacity: 0; font-variant-numeric: tabular-nums; transition: opacity .4s; }
.phone .v-poll.voted .opt .pct { opacity: 1; }
.phone .poll-foot { margin-top: 6px; font-size: 11px; color: var(--fg-on-dark-mut); text-align: center; font-variant-numeric: tabular-nums; }
.phone .v-poll.voted .poll-foot { color: var(--safe-lift); }

.phone .toast { position: absolute; left: 12px; right: 12px; top: 50px; z-index: 8; padding: 14px; border-radius: 18px;
  background: rgb(30 22 44); border: 1px solid rgba(var(--safe-rgb), .45); box-shadow: 0 18px 40px rgb(0 0 0 / .55);
  transform: translateY(calc(-100% - 64px)); transition: transform .8s var(--ease); }   /* fully above the screen, whatever its height */
.phone .toast.on { transform: none; }
.phone .toast-h { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--safe-lift); }
.phone .toast-h img { width: 20px; height: 20px; border-radius: 6px; }
.phone .toast-h span { margin-left: auto; color: var(--fg-on-dark-mut); letter-spacing: 0; text-transform: none; font-weight: 500; }
.phone .toast-q { font-size: 11px; color: var(--fg-on-dark-mut); margin: 9px 0 6px; padding-left: 8px; border-left: 2px solid var(--hairline); }
.phone .toast-a { font-size: 14px; font-weight: 600; line-height: 1.35; }
.phone .toast-src { margin-top: 8px; font-size: 11px; color: var(--fg-on-dark-mut); }
.phone .toast-src b { color: var(--ag-answer-lift); font-weight: 600; }


/* Updates: announcements from the event team, newest first */
.phone .tabs span { position: relative; }
.phone .badge {
  position: absolute; top: 5px; right: 12px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--spark-pink); opacity: 0; transform: scale(.4); transition: opacity .3s, transform .3s var(--ease);
}
.phone .badge.on { opacity: 1; transform: none; }
.phone .upd {
  padding: 13px 14px; border-radius: 14px; background: var(--spark-card); border: 1px solid var(--hairline);
  border-left: 3px solid var(--spark-pink); transition: opacity .5s, transform .5s var(--ease);
}
.phone .upd.enter { opacity: 0; transform: translateY(-10px); }
.phone .upd-h { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--spark-pink); }
.phone .upd-h span { color: var(--fg-on-dark-mut); letter-spacing: 0; text-transform: none; font-weight: 500; margin-left: 6px; }
.phone .upd-t { margin-top: 6px; font-size: 14px; font-weight: 600; line-height: 1.35; }
.phone .empty-note { font-size: 12px; color: var(--fg-on-dark-mut); text-align: center; padding: 30px 10px; }

/* Reactions: a bar that rises from the bottom once reactions are on, and the emoji a tap sends up */
.phone .reacts {
  position: absolute; left: 14px; right: 14px; bottom: 16px; z-index: 7; display: flex; justify-content: space-around;
  padding: 8px; border-radius: 22px; background: rgba(30, 22, 44, .97); border: 1px solid var(--hairline);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5); transform: translateY(140%); transition: transform .7s var(--ease);
}
.phone .reacts.on { transform: none; }
.phone .reacts i {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 24px;
  background: var(--spark-card); transition: transform .15s;
}
.phone .reacts i.press { transform: scale(.82); }
.phone .flt { position: absolute; z-index: 8; font-size: 26px; pointer-events: none; animation: flt 1.6s ease-out forwards; }
@keyframes flt { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: 1; transform: translateY(-20px) scale(1.1); } 100% { opacity: 0; transform: translateY(-220px) scale(1); } }


/* --- 11  Header -------------------------------------------------------------------
   Full width across the top of every page in this folder, the list and each
   animation alike: the ReactLive logo, where you are, and a link to the website.
   An animation adds "All animations" before its title — the way back to the
   list. Markup: RULES.md §11. On the list it scrolls with the page and sticks;
   over an animation it's fixed, above the start screen, so it works before Play
   demo too, and the scene leaves room for it (each script's resize() subtracts
   its height). Preview mode hides it. */
.hdr {
  --pad: clamp(16px, 4vw, 56px);
  position: sticky; top: 0; z-index: 30; height: 56px; padding: 0 var(--pad);
  display: flex; align-items: center; gap: 16px;
  background: rgba(11, 13, 17, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line-dark);
  font-family: var(--font); color: var(--fg-on-dark); -webkit-font-smoothing: antialiased;
}
.scene .hdr { position: fixed; left: 0; right: 0; }
.scene { padding-top: 72px; }   /* the header's 56px, plus the usual 16px gutter */
.hdr a { color: inherit; text-decoration: none; }
.hdr :focus-visible { outline: 2px solid var(--accent-lift); outline-offset: 3px; border-radius: 4px; }
.hdr__brand { flex: none; display: block; }
.hdr__brand img { display: block; width: auto; height: 22px; }
.hdr__here { display: flex; align-items: center; gap: 14px; min-width: 0; padding-left: 16px; border-left: 1px solid var(--line-dark-str); }
.hdr__back {
  flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px 6px 10px; border-radius: 999px;
  border: 1px solid var(--line-dark-str); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.hdr__back:hover { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .04); }
.hdr__back svg { width: 16px; height: 16px; }
.hdr__title { min-width: 0; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr__site { margin-left: auto; flex: none; font-size: 14px; color: var(--fg-on-dark-mut); transition: color .2s var(--ease); }
.hdr__site:hover { color: var(--fg-on-dark); }
@media (max-width: 640px) {
  .hdr__site, .hdr__back + .hdr__title { display: none; }
}
