/* Pass the Pose: mobile mock-up. Plain CSS, no build step. */

@font-face {
  font-family: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(fonts/anton-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: 'Anton';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url(fonts/anton-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #000;
  --text: #fff;
  --dim: rgba(255, 255, 255, .72);
  --faint: rgba(255, 255, 255, .5);
  --accent: #FFB800;
  --on-accent: #1A1200;
  --pink: #FF2D6F;
  --green: #25D366;
  --on-green: #04220F;
  --sheet: rgba(22, 22, 24, .92);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-screen: 240ms;
  --t-sheet: 320ms;
  --ui: -apple-system, "SF Pro Text", Roboto, "Segoe UI", sans-serif;
  --display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --shadow-text: 0 1px 2px rgba(0, 0, 0, .5);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  /* 1% of the app's width; fixed when the app sits in the desktop frame */
  --u: 1vw;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  position: fixed;
  inset: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

button, a, label, input { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
a { text-decoration: none; }
img, video { display: block; -webkit-user-drag: none; }
[hidden] { display: none !important; }

.ico {
  width: 28px; height: 28px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- the app frame ---------- */
.app {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}

@media (min-width: 601px) {
  html, body { background: #0B0B0D; }
  .app {
    --u: 3.9px;
    --sat: 0px; --sab: 0px; --sal: 0px; --sar: 0px;
    inset: auto;
    left: 50%;
    top: 50%;
    width: 390px;
    height: 844px;
    transform: translate(-50%, -50%) scale(var(--fit, 1));
    border-radius: 44px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 0 0 10px #1d1d21, 0 0 0 11px rgba(255, 255, 255, .1), 0 40px 120px rgba(0, 0, 0, .7);
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* Safari: clip video to the radius */
  }
}

/* ---------- screens ---------- */
.screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity var(--t-screen) var(--ease), transform var(--t-screen) var(--ease), visibility 0s linear var(--t-screen);
  text-shadow: var(--shadow-text);
  z-index: 1;
}
.screen.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
  z-index: 2;
}

.fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.mirror { transform: scaleX(-1); }
.hold-img { z-index: 0; }

.scrim-top, .scrim-bottom { position: absolute; left: 0; right: 0; pointer-events: none; }
.scrim-top {
  top: 0;
  height: calc(120px + var(--sat));
  background: linear-gradient(to bottom, rgba(0, 0, 0, .45), rgba(0, 0, 0, 0));
}
.scrim-bottom {
  bottom: 0;
  height: 46%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .78));
}
.scrim-short { height: 34%; }

/* ---------- pressed state ---------- */
.tap { transition: transform 80ms ease-out, opacity 200ms var(--ease); }
.tap:active, .tap.is-pressed { transform: scale(.97); }

/* ---------- top bar ---------- */
.topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: calc(var(--sat) + 6px) calc(var(--sar) + 6px) 0 calc(var(--sal) + 6px);
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
  column-gap: 10px;
  align-items: start;
  z-index: 5;
}
.topbar > :first-child { grid-column: 1; justify-self: start; }
.topbar > :last-child { grid-column: 3; }
.topbar > .topbar-center { grid-column: 2; }
.topbar-center { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 7px; }
.topbar-right, .topbar > .rail { justify-self: end; display: flex; }
.wordmark {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 44px;
  padding-left: 10px;
  white-space: nowrap;
}
.wordmark::after { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-left: 2px; vertical-align: 1px; }

.icon-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
}
.back-btn {
  display: flex; align-items: center; gap: 2px;
  height: 44px;
  padding: 0 12px 0 2px;
  font-size: 16px;
  font-weight: 600;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
}

.rail { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.rail-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 56px; min-height: 44px;
  padding: 4px 0;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
}
.rail-btn .ico { width: 30px; height: 30px; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .42);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.tnum { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.pill-sep { width: 1px; height: 12px; background: rgba(255, 255, 255, .32); }

/* ---------- bottom block + buttons ---------- */
.bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 0 calc(var(--sar) + 16px) calc(var(--sab) + 10px) calc(var(--sal) + 16px);
  display: flex;
  flex-direction: column;
  z-index: 4;
}

.btn {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  height: 54px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.005em;
  text-shadow: none;
  overflow: hidden;
}
.btn .ico { width: 22px; height: 22px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-green { background: var(--green); color: var(--on-green); }
.btn-secondary { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-quiet {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 44px;
  font-size: 15px;
  font-weight: 500;
  color: var(--dim);
}
.btn-quiet-strong { color: #fff; font-weight: 600; }
.text-btn { min-height: 44px; min-width: 44px; padding: 0 6px; font-size: 15px; font-weight: 600; color: var(--accent); text-shadow: none; }
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }

.rec-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 2px var(--on-accent);
}

/* ---------- shared overlay pieces ---------- */
.frame-border {
  position: absolute;
  inset: calc(var(--sat) + 8px) calc(var(--sar) + 8px) calc(var(--sab) + 8px) calc(var(--sal) + 8px);
  border: 2.5px solid #fff;
  border-radius: 30px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08), inset 0 0 0 1px rgba(0, 0, 0, .08);
  transition: opacity 120ms ease-out;
  z-index: 3;
}
.flash {
  position: absolute; inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 8;
}
.flash.go { animation: flash 120ms ease-out both; }
@keyframes flash { from { opacity: .92; } to { opacity: 0; } }

/* ---------- 1. landing ---------- */
.ghost { opacity: 0; pointer-events: none; background: transparent; }
.fallback { z-index: 1; display: grid; place-items: center; }
.play-glyph {
  position: relative;
  width: 76px; height: 76px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .38);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .5);
}
.play-glyph .ico { width: 30px; height: 30px; fill: #fff; stroke: #fff; margin-left: 4px; }

#landing.is-hold #l-border { opacity: 1; }
#landing.is-hold #l-freeze { animation: wordIn 200ms cubic-bezier(.2, 1.4, .4, 1) both; }

.pill-float {
  position: absolute;
  top: calc(var(--sat) + 62px);
  left: 50%;
  transform: translate(-50%, -6px);
  opacity: 0;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 180ms ease-out, transform 240ms var(--ease);
  z-index: 6;
}
.pill-float::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pill-float.show { opacity: 1; transform: translate(-50%, 0); }

.account { display: flex; align-items: center; gap: 9px; min-height: 36px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700;
  background: var(--pink); color: #fff;
  box-shadow: 0 0 0 1.5px #fff;
  text-shadow: none;
  flex: none;
  transition: background-color 200ms;
}
.avatar-you { background: #fff; color: #000; }
.account-name { font-size: 15px; font-weight: 700; }

/* ---------- 1. landing: laid out like a Reels viewer ----------
   Full-bleed video, title top-left, sound top-right, caption and a sponsored-Reel
   style action bar bottom-left, Stories-style segmented progress bar on the top edge. */
#landing .scrim-top { height: calc(110px + var(--sat)); background: linear-gradient(to bottom, rgba(0, 0, 0, .38), rgba(0, 0, 0, 0)); }
#landing .scrim-bottom {
  height: 44%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .22) 35%, rgba(0, 0, 0, .58) 70%, rgba(0, 0, 0, .74) 100%);
}
#landing .wordmark { font-size: 22px; font-weight: 800; letter-spacing: -.02em; padding-left: 8px; }
#landing .wordmark::after { width: 6px; height: 6px; }

/* Stories-style bar: one segment per scene (app.js builds them from landing-timing.json),
   equal widths, small gaps; dim track, solid white fill. Below the top inset, above the
   wordmark row (which is pushed down to clear it). Indicator only: never takes a tap. */
.l-segs {
  position: absolute;
  top: calc(var(--sat) + 8px);
  left: calc(var(--sal) + 8px);
  right: calc(var(--sar) + 8px);
  height: 2px;
  display: flex;
  gap: 4px;
  pointer-events: none;
  z-index: 6;
}
.l-seg {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  border-radius: 1px;
  overflow: hidden;
  background: rgba(255, 255, 255, .35);
  box-shadow: 0 0 2px rgba(0, 0, 0, .18);
}
.l-seg-fill { height: 100%; background: #fff; transform-origin: 0 50%; transform: scaleX(0); }
#landing .topbar { padding-top: calc(var(--sat) + 14px); }

.l-bottom { padding-bottom: calc(var(--sab) + 20px); }
.l-line {
  margin: 0 0 12px;
  max-width: 34em;
  font-family: var(--ui);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.01em;
  text-align: left;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 12px rgba(0, 0, 0, .35);
}
/* two weights: the first sentence is the hook, the second follows it, smaller and dimmer */
.l-line span { display: block; max-width: 100%; }
.l-line .l-hook {
  font-size: clamp(20px, calc(var(--u) * 5.4), 22px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
}
.l-line .l-follow {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  color: rgba(255, 255, 255, .85);
}
/* the action bar of a sponsored Reel: full width, short, label left, chevron right;
   solid in the primary colour from the first frame */
.l-cta {
  height: 46px;
  border-radius: 10px;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 10px 0 16px;
  font-size: 15px;
  font-weight: 650;
  overflow: visible;
}
.l-cta-label { flex: 1; text-align: left; }
.l-cta .l-cta-chev { width: 22px; height: 22px; stroke-width: 2.4; }
/* last frame held: the button pulses; the class goes when the film loops */
#landing.is-final #l-record { animation: recPulse 1.6s ease-in-out infinite; }
@keyframes recPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 184, 0, .6); }
  60% { box-shadow: 0 0 0 10px rgba(255, 184, 0, 0); }
}

/* centre glyph flashed when a tap on the video turns sound on or off */
.l-glyph {
  position: absolute;
  left: 50%; top: 50%;
  width: 72px; height: 72px;
  margin: -36px 0 0 -36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .5);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 6;
}
.l-glyph .ico { width: 32px; height: 32px; }
.l-glyph.go { animation: glyphFlash 750ms ease-out both; }
@keyframes glyphFlash {
  0% { opacity: 0; transform: scale(.8); }
  15% { opacity: 1; transform: scale(1); }
  65% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1); }
}

/* ---------- 2/3. camera ---------- */
#camera .scrim-top { height: calc(140px + var(--sat)); }
.pill-timer { min-width: 56px; justify-content: center; font-size: 14px; }
.pill-timer .rec-blink { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); animation: blink 1s steps(1) infinite; }
#camera[data-state="recording"] .pill-timer .rec-blink,
#camera[data-state="freeze"] .pill-timer .rec-blink { display: block; }
#camera[data-state="freeze"] .pill-timer .rec-blink { animation: none; }
@keyframes blink { 50% { opacity: .15; } }
.demo-tag {
  font-size: 10px; font-weight: 800; letter-spacing: .14em;
  padding: 3px 7px; border-radius: 5px;
  background: var(--accent); color: var(--on-accent);
  text-shadow: none;
}
.rail-top { padding-top: 0; }

.fade-ctl { transition: opacity 220ms var(--ease), transform 80ms ease-out; }
#camera:not([data-state="idle"]) .fade-ctl { opacity: 0; pointer-events: none; }

.cam-bottom {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(var(--sab) + 26px);
  display: flex; flex-direction: column; align-items: center;
  z-index: 4;
}
.cam-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 calc(var(--sar) + 24px) 0 calc(var(--sal) + 24px);
}
.gallery-btn {
  justify-self: start;
  position: relative;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: rgba(0, 0, 0, .3);
  box-shadow: inset 0 0 0 2px #fff, 0 2px 8px rgba(0, 0, 0, .3);
  color: #fff;
  cursor: pointer;
}
.gallery-btn .ico { width: 26px; height: 26px; }
/* idle only: also taken out of hit-testing and the accessibility tree once faded */
#camera:not([data-state="idle"]) .gallery-btn { visibility: hidden; transition: opacity 220ms var(--ease), visibility 0s linear 220ms; }
.cam-spacer { width: 48px; }

.ring { position: relative; width: 84px; height: 84px; display: block; }
.ring-svg { position: absolute; inset: 0; width: 84px; height: 84px; transform: rotate(-90deg); overflow: visible; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .3)); }
.ring-track { fill: none; stroke: #fff; stroke-width: 5; }
.ring-arc { fill: none; stroke: var(--pink); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 248.19; stroke-dashoffset: 248.19; opacity: 0; }
#camera[data-state="recording"] .ring-arc, #camera[data-state="freeze"] .ring-arc { opacity: 1; }
.ring-disc {
  position: absolute;
  left: 50%; top: 50%;
  width: 66px; height: 66px;
  margin: -33px 0 0 -33px;
  border-radius: 33px;
  background: var(--pink);
  transition: all 260ms var(--ease);
}
#camera[data-state="recording"] .ring-disc, #camera[data-state="freeze"] .ring-disc {
  width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 8px;
}

.big-num {
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1.2em;
  margin-top: -.62em;
  text-align: center;
  font-family: var(--display);
  font-size: calc(var(--u) * 52);
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .35);
  opacity: 0;
  pointer-events: none;
  z-index: 6;
  font-variant-numeric: tabular-nums;
}
.big-num.pop { animation: numPop 950ms cubic-bezier(.2, .8, .2, 1) both; }
.big-num.pop.faint { animation-name: numPopFaint; }
.big-num.static { opacity: 1; animation: none; }
.big-num.static.faint { opacity: .55; }
@keyframes numPop {
  0% { opacity: 0; transform: scale(1.35); }
  12% { opacity: 1; transform: scale(1.18); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: scale(.62); }
}
@keyframes numPopFaint {
  0% { opacity: 0; transform: scale(1.35); }
  12% { opacity: .55; transform: scale(1.18); }
  70% { opacity: .55; }
  100% { opacity: 0; transform: scale(.62); }
}

.cam-off {
  position: absolute; inset: 0;
  z-index: 9;
  display: grid; place-items: center;
  padding: calc(var(--sat) + 24px) 24px calc(var(--sab) + 24px);
  background: radial-gradient(120% 70% at 50% 0%, #1c1c20 0%, #000 70%);
  text-shadow: none;
}
.cam-off-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.cam-off-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .08); margin-bottom: 8px; }
.cam-off-icon .ico { width: 32px; height: 32px; color: var(--dim); }
.cam-off h2 { margin: 0; font-size: 22px; font-weight: 700; }
.cam-off p { margin: 0 0 14px; font-size: 15px; line-height: 1.45; color: var(--dim); }
.cam-off .btn { cursor: pointer; }

/* ---------- 4. review ---------- */
#review.is-holding #r-border, #review.strip-open #r-border { opacity: 1; }
#review.strip-open .bottom-review { opacity: 0; pointer-events: none; }
.bottom-review { transition: opacity 200ms var(--ease); }
.bottom-review .btn-quiet { margin-bottom: 4px; }
/* receiver ("their take"): one button, one quiet Retake under it; no top-left Retake, no Change ending */
#r-retake { display: none; margin: 4px 0 0; }
#review.is-rx #r-retake { display: flex; }
#review.is-rx #r-back, #review.is-rx #r-ending, #review.is-rx .strip-sheet { display: none; }
#review.is-rx .bottom-review { padding-bottom: calc(var(--sab) + 6px); }
.r-outline { opacity: 0; z-index: 1; }
.r-outline.go { animation: rOutline 1.6s linear both; }
@keyframes rOutline { 0% { opacity: 1; } 45% { opacity: 1; } 100% { opacity: 0; } }
#rvt { z-index: 1; }

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 8px calc(var(--sar) + 16px) calc(var(--sab) + 16px) calc(var(--sal) + 16px);
  border-radius: 24px 24px 0 0;
  background: var(--sheet);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, .06), 0 -12px 40px rgba(0, 0, 0, .35);
  transform: translateY(105%);
  transition: transform var(--t-sheet) var(--ease);
  text-shadow: none;
  z-index: 7;
}
.sheet.open { transform: none; }
.sheet-grabber { width: 36px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .26); margin: 0 auto 10px; }

.strip-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.strip-title { font-size: 17px; font-weight: 700; }
.strip-sub { font-size: 13px; color: var(--dim); margin-top: 2px; }
.strip-sub b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.strip {
  position: relative;
  height: 76px;
  display: flex;
  gap: 2px;
  border-radius: 12px;
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  background: rgba(255, 255, 255, .06);
}
.strip img { flex: 1 1 0; min-width: 0; height: 100%; object-fit: cover; pointer-events: none; }
.strip-empty { flex: 1; display: grid; place-items: center; font-size: 13px; color: var(--dim); }
.strip-sel {
  position: absolute;
  top: 0; bottom: 0;
  left: 0;
  width: 40px;
  border: 3px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, .5), 0 2px 10px rgba(0, 0, 0, .5);
  transition: left 140ms var(--ease);
  pointer-events: none;
  z-index: 1;
}
.strip.dragging .strip-sel { transition: none; }

/* ---------- transparent overlays laid over video (outlines) ---------- */
.overlay-img { background: transparent; pointer-events: none; }

/* camera: receiver outline (opacity set by app.js) and the demo stop outline */
/* receiver: the 3-2-1 sits above the outline's heads instead of across the faces */
#camera.is-rx .big-num { top: 23%; font-size: calc(var(--u) * 40); }
.cam-outline { display: none; z-index: 1; }
#camera.is-rx .cam-outline { display: block; }
.cam-endline { opacity: 0; z-index: 1; transform-origin: 50% 70%; }
.cam-endline.draw { animation: endlineIn 300ms cubic-bezier(.2, .8, .2, 1) both; }
.cam-endline.shown { opacity: 1; }
@keyframes endlineIn { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: none; } }

/* ---------- 5. stamp: freeze-frame title card ---------- */
#stamp { background: #000; text-shadow: none; }
#stamp.is-active { transition: none; }
.st-pic { position: absolute; inset: 0; overflow: hidden; }
.st-pic canvas { background: #000; }
.st-count {
  /* in the lower third, clear of the faces in the frozen frame */
  position: absolute; left: 0; right: 0; top: 71%;
  transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 2);
  color: #fff;
  font-family: var(--display);
  line-height: 1;
  text-shadow: 0 4px 14px rgba(0, 0, 0, .45), 0 10px 50px rgba(0, 0, 0, .45);
  z-index: 3;
}
.st-flame { font-family: var(--ui); font-size: calc(var(--u) * 26); }
.st-count b { font-weight: 400; font-size: calc(var(--u) * 40); letter-spacing: .01em; }
/* settled (screenshots): the end state */
#stamp .st-pic { transform: scale(1.06); filter: saturate(.35) contrast(1.12) brightness(.72); }
#stamp.run .st-pic { animation: stPunch 1000ms cubic-bezier(.2, .8, .2, 1) both; }
#stamp.run .st-count { animation: stSlam 260ms cubic-bezier(.3, 1.35, .45, 1) 120ms both; }
#stamp.run #st-flash { animation: flash 160ms ease-out 330ms both; }
#stamp.run.shake { animation: shake 200ms linear 380ms both; }
@keyframes stPunch {
  0% { transform: none; filter: none; }
  30% { transform: scale(1.05); filter: saturate(.45) contrast(1.1) brightness(.78); }
  100% { transform: scale(1.06); filter: saturate(.35) contrast(1.12) brightness(.72); }
}
@keyframes stSlam { 0% { opacity: 0; transform: translateY(-50%) scale(2.6); } 60% { opacity: 1; } 100% { opacity: 1; transform: translateY(-50%) scale(1); } }
@keyframes shake {
  0% { transform: translate(0, 0); } 20% { transform: translate(-4px, 3px); } 40% { transform: translate(4px, -2px); }
  60% { transform: translate(-3px, -1px); } 80% { transform: translate(2px, 2px); } 100% { transform: translate(0, 0); }
}

/* ---------- 6. send / 7. waiting / 8. ended: laid out like the landing ---------- */
#send .wordmark, #waiting .wordmark, #ended .wordmark, #rxland .wordmark { font-size: 22px; font-weight: 800; letter-spacing: -.02em; padding-left: 8px; }
#send .wordmark::after, #waiting .wordmark::after, #ended .wordmark::after, #rxland .wordmark::after { width: 6px; height: 6px; }
#send .topbar, #waiting .topbar, #ended .topbar, #rxland .topbar { padding-top: calc(var(--sat) + 14px); }
#send .scrim-bottom, #waiting .scrim-bottom, #ended .scrim-bottom, #rxland .scrim-bottom {
  height: 44%;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .22) 35%, rgba(0, 0, 0, .58) 70%, rgba(0, 0, 0, .74) 100%);
}
.sd-bg { filter: saturate(.35) contrast(1.12) brightness(.6); transform: scale(1.06); }
.sd-quiet { display: grid; grid-template-columns: 1fr 1fr; margin-top: 6px; margin-bottom: -10px; }
.sd-quiet .btn-quiet { font-size: 14px; }
#send .l-cta .ico:first-child { width: 20px; height: 20px; }
#waiting .l-cta .ico:first-child { width: 20px; height: 20px; }
.ended-bg { filter: grayscale(1) contrast(1.05) brightness(.5); }

/* ---------- R1. chat (a generic messaging app, stand-in) ---------- */
#chat { background: #0E1013; text-shadow: none; }
.chat-head {
  position: absolute; top: 0; left: 0; right: 0;
  height: calc(var(--sat) + 56px);
  padding: var(--sat) calc(var(--sar) + 12px) 0 calc(var(--sal) + 4px);
  display: flex; align-items: center; gap: 4px;
  background: #1A1C20;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05);
  z-index: 3;
}
.chat-back { width: 36px; height: 44px; display: grid; place-items: center; color: #8CB8FF; }
.chat-back .ico { width: 26px; height: 26px; }
.chat-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #3A3F47; color: #C9CED6; }
.chat-avatar .ico { width: 22px; height: 22px; }
.chat-body {
  position: absolute; left: 0; right: 0; bottom: 0;
  top: calc(var(--sat) + 56px);
  padding: 18px calc(var(--sar) + 12px) calc(var(--sab) + 24px) calc(var(--sal) + 12px);
  display: flex; flex-direction: column; justify-content: flex-end;
  background-color: #0E1013;
  background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1.2px);
  background-size: 18px 18px;
}
.msg {
  align-self: flex-start;
  width: 84%; max-width: 330px;
  padding: 4px 4px 6px;
  border-radius: 14px 14px 14px 4px;
  background: #22252B;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .3);
}
.msg-card { display: block; width: 100%; text-align: left; border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, .05); }
.msg-card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; background: #111; }
.msg-meta { display: block; padding: 8px 10px 9px; }
.msg-title { display: block; font-size: 15px; font-weight: 700; line-height: 1.25; color: #fff; }
.msg-desc { display: block; margin-top: 2px; font-size: 13px; color: rgba(255, 255, 255, .7); }
.msg-site { display: block; margin-top: 3px; font-size: 12px; color: rgba(255, 255, 255, .45); }
.msg-text { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; padding: 7px 6px 0 8px; }
.msg-link { font-size: 15px; color: #6CB8FF; text-decoration: underline; text-underline-offset: 2px; text-align: left; }
.msg-time { flex: none; font-size: 11px; color: rgba(255, 255, 255, .45); }
.mock-switch {
  position: absolute; z-index: 4;
  top: calc(var(--sat) + 13px); right: calc(var(--sar) + 10px);
  display: flex; align-items: center; gap: 2px;
  padding: 2px 3px 2px 8px;
  border: 1px dashed rgba(255, 184, 0, .8);
  border-radius: 8px;
  font: 600 10px/1 ui-monospace, Menlo, monospace;
  letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255, 184, 0, .9);
}
.mock-switch span { margin-right: 4px; }
.mock-switch button { min-width: 26px; height: 24px; border-radius: 5px; font: inherit; color: inherit; }
.mock-switch button.is-on { background: rgba(255, 184, 0, .9); color: #1A1200; }

/* ---------- R2. receiver's landing ---------- */
#rxland .l-segs { gap: 4px; }
.x-slot { background: transparent; box-shadow: none; border: 1px dashed rgba(255, 255, 255, .75); height: 4px; margin-top: -1px; border-radius: 2px; }
#rxland.is-end .x-slot { animation: slotPulse 1.1s ease-in-out infinite; }
@keyframes slotPulse { 0%, 100% { border-color: rgba(255, 255, 255, .55); background: transparent; } 50% { border-color: rgba(255, 184, 0, 1); background: rgba(255, 184, 0, .55); } }
#rxland.is-end #x-take { animation: recPulse 1.6s ease-in-out 450ms infinite; }
/* The line and the button are on screen throughout; replay sits under the sound icon, at the end only. */
#rxland .x-icons { flex-direction: column; align-items: center; gap: 2px; }
#rxland .x-replay { opacity: 0; visibility: hidden; transition: opacity 160ms ease-out, visibility 0s linear 160ms; }
#rxland.is-end .x-replay { opacity: 1; visibility: visible; transition: opacity 320ms ease-out 200ms, visibility 0s; }
#x-glyph .ico { fill: #fff; stroke: none; }

/* ---------- R2. watch in full (pretend paid unlock) ---------- */
/* watch in full: a quiet tile beside the main button (the yellow button stays the primary) */
.x-actions { display: flex; gap: 8px; align-items: stretch; }
.x-actions .l-cta { flex: 1 1 auto; min-width: 0; }
.x-actions .l-cta-label { white-space: nowrap; }
.x-full { position: relative; flex: none; height: 46px; border-radius: 10px; padding: 0 12px 0 10px;
  display: flex; align-items: center; gap: 7px; color: #fff; text-shadow: none;
  background: rgba(0, 0, 0, .42); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.x-full-play { width: 15px; height: 15px; fill: #fff; stroke: #fff; stroke-width: 1.5; }
.x-full-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.x-full-text b { font-size: 14px; font-weight: 700; }
.x-full-text span { font-size: 11.5px; font-weight: 600; color: rgba(255, 255, 255, .8); font-variant-numeric: tabular-nums; }
.x-lock { position: absolute; right: -5px; top: -5px; width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .35); }
.x-lock .ico { width: 11px; height: 11px; stroke-width: 2.4; }
#rxland.full-open .x-lock { display: none; }
/* narrow phones: the main button drops its chevron before its text would shrink */
@media (max-width: 360px) { .x-actions .l-cta-chev { display: none; } .x-actions .l-cta { padding-right: 12px; } }
.x-chip { position: absolute; left: 50%; top: calc(var(--sat) + 64px); transform: translate(-50%, -6px); opacity: 0; pointer-events: none; z-index: 6;
  height: 28px; padding: 0 12px; border-radius: 999px; display: flex; align-items: center; gap: 6px;
  background: rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 13px; font-weight: 600; white-space: nowrap; transition: opacity 200ms ease-out, transform 240ms var(--ease); }
.x-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.x-chip.show { opacity: 1; transform: translate(-50%, 0); }
.x-sheet { z-index: 8; padding-top: 8px; text-align: left; }
.x-mock { position: absolute; top: 10px; right: calc(var(--sar) + 12px); padding: 3px 6px; border: 1px dashed rgba(255, 184, 0, .8); border-radius: 6px;
  font: 600 9.5px/1 ui-monospace, Menlo, monospace; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 184, 0, .9); }
.x-thumbs { display: flex; gap: 6px; margin: 6px 0 14px; }
.x-thumbs img { width: 54px; height: 96px; object-fit: cover; border-radius: 6px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12); }
.x-sheet-title { margin: 0 0 14px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.x-sheet-line { margin: 4px 0 16px; font-size: 14px; line-height: 1.35; color: var(--dim); }
.x-sheet .btn { margin-bottom: 4px; }
.x-sheet .btn-quiet { margin-bottom: -6px; }
.x-sheet #xs-watch, .x-sheet #xs-tell { display: none; }
.x-sheet[data-stage="paid"] #xs-watch, .x-sheet[data-stage="paid"] #xs-tell { display: flex; }
.x-sheet[data-stage="paid"] #xs-pay, .x-sheet[data-stage="paid"] #xs-not-now { display: none; }
.x-sheet[data-stage="paying"] #xs-not-now { visibility: hidden; }
.x-pay[disabled] { opacity: .92; }
.x-pay .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(26, 18, 0, .3); border-top-color: var(--on-accent); animation: spin .8s linear infinite; }
.x-pay .ico { width: 20px; height: 20px; stroke-width: 2.6; }
@keyframes spin { to { transform: rotate(360deg); } }
#rxland .x-icons { gap: 0; }

/* ---------- 7. waiting, receiver: their cut ---------- */
#waiting .w-icons { flex-direction: column; align-items: center; }
#waiting .w-replay { opacity: 0; visibility: hidden; transition: opacity 160ms ease-out, visibility 0s linear 160ms; }
#waiting.is-end .w-replay { opacity: 1; visibility: visible; transition: opacity 320ms ease-out 200ms, visibility 0s; }
#waiting .w-post { display: none; margin: 4px 0 -10px; font-size: 14px; }
#waiting.has-cut .w-post { display: flex; }

/* ---------- toast ---------- */
.toast {
  position: absolute;
  left: 50%;
  top: calc(var(--sat) + 60px);
  transform: translate(-50%, -8px);
  max-width: calc(100% - 40px);
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .96);
  color: #000;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease-out, transform 240ms var(--ease);
  z-index: 50;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- review aid ---------- */
.review-pill {
  position: fixed;
  left: 0;
  top: 46%;
  z-index: 60;
  display: flex; align-items: center; gap: 5px;
  height: 30px;
  padding: 0 10px 0 7px;
  border-radius: 0 15px 15px 0;
  background: rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, .78);
  font-size: 11px; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  text-shadow: none;
}
.review-pill::after { content: ''; position: absolute; inset: -7px -4px; }
.review-pill .ico { width: 13px; height: 13px; }
.review-menu {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.review-menu-card {
  width: 250px;
  max-height: 86%;
  overflow: auto;
  padding: 8px;
  border-radius: 20px;
  background: var(--sheet);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.review-menu-card h3 { margin: 6px 10px 6px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.review-item {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 44px; padding: 0 12px;
  border-radius: 12px;
  font-size: 15px; font-weight: 500;
  text-align: left;
}
.review-item span { color: rgba(255, 255, 255, .4); font-size: 12px; font-variant-numeric: tabular-nums; }
.review-item.current { background: rgba(255, 184, 0, .16); color: var(--accent); }
@media (min-width: 601px) {
  .review-pill { top: 24px; left: 24px; height: 36px; padding: 0 14px 0 11px; border-radius: 18px; font-size: 13px; }
  .review-pill .ico { width: 15px; height: 15px; }
}

/* screenshot helper: no blinking in still shots */
.still .rec-blink { animation: none; }
/* the watch-in-full sheet is out of the reading order while closed */
.x-sheet { visibility: hidden; transition: transform var(--t-sheet) var(--ease), visibility 0s linear var(--t-sheet); }
.x-sheet.open { visibility: visible; transition: transform var(--t-sheet) var(--ease), visibility 0s; }
.x-sheet[data-stage="paid"] .x-sheet-title { margin-bottom: 14px; }

/* review only: the roll-back variant switch (?rewind=), a narrow column on the left edge, mid-height */
#rxland .x-rewind { top: 40%; right: auto; left: calc(var(--sal) + 4px); flex-direction: column; gap: 3px; padding: 6px 3px; z-index: 7;
  background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
#rxland .x-rewind span { margin: 0 0 2px; font-size: 8.5px; }
#rxland .x-rewind button { min-width: 26px; height: 26px; }
