/* peloo.nexus.cab (T76): the app's paper, ink and ginkgo, nothing else. */
:root {
  --paper: #fff8ee;
  --paper-deep: #f3e9da;
  --card: #fffdf8;
  --line: #e8dccb;
  --ink: #2a261f;
  --ink-soft: #4a453c;
  --muted: #6f685d;
  --ginkgo: #f6c93a;
  --ginkgo-ink: #84620a;
  --canvas: #fff6ee;
  --grid: rgba(42, 38, 31, 0.05);
  --radius: 22px;
  --page: min(1080px, calc(100vw - 40px));
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

img { max-width: 100%; height: auto; display: block; }

/* The hero's glow and floating stickers may reach past the page's sides;
   clip them there (clip, not hidden, so the sticky header still works). */
main { overflow-x: clip; }

a { color: inherit; }

a:focus-visible, span:focus-visible { outline: 3px solid var(--ginkgo-ink); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }

.top, main > section, .foot { width: var(--page); margin-inline: auto; }

/* Header: stays at the top, frosted, full width with the page's content width inside. */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding: 14px max(20px, calc((100% - 1080px) / 2));
  flex-wrap: wrap;
  background: rgba(255, 248, 238, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid rgba(232, 220, 203, 0.7);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 22px;
  text-decoration: none;
}

.sections { display: flex; gap: 20px; margin-left: auto; }

.sections a, .languages a { text-decoration: none; color: var(--ink-soft); }

.sections a:hover, .languages a:hover { color: var(--ink); text-decoration: underline; }

.languages { display: flex; gap: 12px; font-size: 15px; }

.languages [aria-current] { font-weight: 700; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 48px 0 72px;
}

.hero h1 { font-size: clamp(36px, 5.2vw, 60px); }

.keep { display: inline-block; }

.lead { font-size: 20px; color: var(--ink-soft); margin: 20px 0 32px; max-width: 34em; }

.actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.store-soon, .store-link {
  display: inline-block;
  text-wrap: balance;
  padding: 14px 22px;
  border-radius: 14px;
  background: var(--ginkgo);
  font-weight: 700;
}

.store-link { color: inherit; text-decoration: none; }

.web-link { font-weight: 600; text-underline-offset: 4px; }

/* The hero: the app at work in a phone, Peloo beside it saying what it just did. */
.hero-art {
  position: relative;
  isolation: isolate;
  justify-self: center;
  width: min(100%, 370px);
  padding: 8px 36px 40px;
  container-type: inline-size;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 4% -10% 8%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(246, 201, 58, 0.42), rgba(246, 201, 58, 0));
}

/* Grid children may shrink below their content's width, or a phone-width
   page would scroll sideways. */
.hero > *, .highlight > * { min-width: 0; }

.hero-art .dphone { rotate: 1.5deg; }

.float { position: absolute; width: 32cqw; height: auto; rotate: var(--tilt, 0deg); }
.float-a { left: -4%; top: 8%; --tilt: -10deg; }
.float-b { right: -2%; top: 46%; --tilt: 8deg; }

.hero-art .peloo { left: -6%; bottom: 0; }

.peloo {
  position: absolute;
  left: 8%;
  bottom: 5%;
  display: flex;
  align-items: flex-end;
  gap: 1.6cqw;
}

.peloo img { width: 17cqw; height: auto; }

.bubble {
  position: relative;
  margin-bottom: 7cqw;
  padding: 2cqw 3cqw;
  border-radius: 3cqw 3cqw 3cqw 0.6cqw;
  background: var(--ink);
  color: var(--paper);
  font-size: 3.3cqw;
  font-weight: 600;
  max-width: 52cqw;
  line-height: 1.35;
}

@keyframes rest {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -0.9cqw; }
}

/* Everything that moves on its own lives in a no-preference block, so a
   visitor who asked for less motion gets none (scripts/test-fi-site.mjs). */
@media (prefers-reduced-motion: no-preference) {
  .float { animation: rest 7s ease-in-out infinite; }
  .float-b { animation-delay: -3s; }
  .peloo img { animation: rest 5s ease-in-out infinite; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.plus h2, .trust h2, .highlights h2, .mix h2, .more h2, .faq h2, .feedback h2, .closing h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  margin-bottom: 28px;
}

/* Every kind of fragment on one canvas */
.mix { padding: 8px 0 72px; }

/* Highlights: one demo per row, alternating sides */
.highlights { padding: 24px 0 56px; }

.section-intro { margin: -16px 0 32px; color: var(--muted); }

.highlights ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 56px; }

.highlight {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: clamp(28px, 6vw, 80px);
  align-items: center;
  padding: 36px clamp(20px, 5vw, 56px);
  border-radius: 32px;
  background: var(--card);
  border: 1px solid var(--line);
}

.highlight:nth-child(even) { grid-template-columns: 1fr minmax(220px, 300px); }
.highlight:nth-child(even) .highlight-demo { order: 2; }

.highlight:nth-child(3n + 1) { background: #fdf3d6; }
.highlight:nth-child(3n + 2) { background: #e9f1f4; }
.highlight:nth-child(3n) { background: #f7e6df; }

.highlight-demo { width: 100%; max-width: 300px; justify-self: center; }

.kicker {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ginkgo-ink);
}

.step {
  display: inline-grid;
  place-items: center;
  width: 2.3em;
  height: 2.3em;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  letter-spacing: 0;
}

.highlight h3 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 14px; }

.highlight-words p:last-child { margin: 0; font-size: 19px; color: var(--ink-soft); max-width: 28em; }

/* And more */
.more { padding: 16px 0 56px; }

.more ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.more li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 22px 24px;
}

.tile-icon { font-size: 30px; line-height: 1; }

.more h3 { font-size: 19px; margin: 14px 0 6px; }

.more p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* Questions */
.faq { padding: 8px 0 40px; }
.feedback { padding: 8px 0 40px; }
.feedback p { margin: 0 0 12px; color: var(--ink-soft); max-width: 40rem; }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 4px;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 19px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after { content: "+"; font-weight: 400; color: var(--muted); }

.faq details[open] summary::after { content: "–"; }

.faq details p { margin: 10px 0 0; color: var(--ink-soft); }

/* Closing call */
.closing {
  text-align: center;
  padding: 56px clamp(20px, 5vw, 56px) 64px;
  margin-bottom: 24px;
  border-radius: 32px;
  background: var(--ginkgo);
}

.closing img { margin: 0 auto 18px; }

.closing h2 { margin-bottom: 12px; }

.closing p { margin: 0 0 26px; color: var(--ink-soft); }

.closing .actions { justify-content: center; }

.closing .store-soon, .closing .store-link { background: var(--ink); color: var(--paper); }

/* Plus and trust */
.plus, .trust {
  background: var(--paper-deep);
  border-radius: var(--radius);
  padding: 40px clamp(20px, 5vw, 56px);
  margin-bottom: 32px;
}

/* Plus in ink, so the page changes key once before the questions. */
.plus { background: var(--ink); color: var(--paper); }

.plus-intro { margin: -12px 0 20px; color: rgba(255, 248, 238, 0.75); }

.plus ul, .trust ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }

.plus ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; }

.plus li, .trust li { position: relative; padding-left: 34px; }

/* A ginkgo dot with a tick drawn from two borders: no image, no script. */
.plus li::before, .trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ginkgo);
}

.plus li::after, .trust li::after {
  content: "";
  position: absolute;
  left: 8px;
  top: calc(0.2em + 4px);
  width: 6px;
  height: 10px;
  border: solid var(--ink);
  border-width: 0 2.4px 2.4px 0;
  rotate: 45deg;
}

.fine { font-size: 14px; color: var(--muted); margin: 20px 0 0; }

.plus .fine { color: rgba(255, 248, 238, 0.6); }

.trust p { margin: 20px 0 0; font-weight: 600; }

/* Footer */
.foot { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }

.foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 12px; }

.foot a { color: var(--ink-soft); }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; }
  .hero-art { width: min(100%, 360px); }
  .highlight, .highlight:nth-child(even) { grid-template-columns: 1fr; gap: 28px; }
  .highlight:nth-child(even) .highlight-demo { order: 0; }
  .highlight-demo { max-width: 260px; }
  .more ul { grid-template-columns: 1fr 1fr; }
  .plus ul { grid-template-columns: 1fr; }
  .sections { display: none; }
  .languages { margin-left: auto; }
}

/* Rows rise into view as the page scrolls, where the browser can tie an
   animation to scrolling without script. */
@supports (animation-timeline: view()) {
  @media screen and (prefers-reduced-motion: no-preference) {
    .highlight, .more li, .plus, .trust, .closing {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(48px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* Animated demos (T87): the phone, the app chrome and the sticker paper.
   Every size is in cqw of the phone, so the same drawing scales from the
   hero to a feature row. The base styles are each scene's final frame; the
   keyframes in demo-hero.css and demo-scenes.css play the way there. */
@font-face {
  font-family: "Gelasio";
  src: url("/fonts/Gelasio-Regular.ttf") format("truetype");
  font-display: swap;
}

.dphone, .dtab {
  --tone-paper: #fbf8f1;
  --tone-butter: #f6e6b4;
  --tone-sky: #d4e3ea;
  --tone-sage: #dbe4cd;
  --tone-rose: #f4d8cd;
  --tone-lilac: #e2daec;
  --serif: "Gelasio", "Songti SC", "STSong", "Noto Serif SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
}

.dphone {
  container-type: inline-size;
  position: relative;
  width: 100%;
  aspect-ratio: 330 / 717;
  /* The phone's own sizes cannot be in its own cqw (those resolve against an
     outer container, or the viewport), so its corners are in percent:
     15% of the width, the same length as a share of the height. */
  border-radius: 15% / 6.9%;
  background: #211d18;
  box-shadow: 0 40px 80px -42px rgba(42, 38, 31, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.dscreen {
  position: absolute;
  inset: 2.8cqw;
  overflow: hidden;
  border-radius: 12.4cqw;
  background-color: #f4efe5;
  background-image:
    linear-gradient(rgba(70, 55, 35, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 55, 35, 0.07) 1px, transparent 1px);
  background-size: 5.5cqw 5.5cqw;
  color: #2b2621;
  font-family: var(--sans);
}

.dscreen svg { display: block; }
.i-line { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.i-fill { fill: currentColor; }
.i-fill-dark { fill: none; stroke: #2a2620; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Status bar and island */
.dstatus {
  position: absolute;
  inset: 0 0 auto;
  height: 11cqw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8cqw;
  font: 600 3.5cqw/1 var(--sans);
  z-index: 5;
}

.disland {
  position: absolute;
  left: 50%;
  top: 2.4cqw;
  width: 25cqw;
  height: 7.2cqw;
  border-radius: 4cqw;
  background: #000;
  translate: -50% 0;
}

.dbatt {
  width: 6.6cqw;
  height: 3.2cqw;
  border-radius: 1cqw;
  background: #2b2621;
  box-shadow: 0 0 0 0.45cqw #f4efe5 inset, 0 0 0 0.9cqw #2b2621 inset;
}

/* Canvas top bar and bottom dock */
.dbar {
  position: absolute;
  top: 13cqw;
  left: 5.5cqw;
  right: 5.5cqw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 600 3.7cqw/1 var(--sans);
  z-index: 4;
}

.dtitle { display: inline-flex; align-items: center; gap: 0.8cqw; }
.dtitle svg { width: 3.6cqw; height: 3.6cqw; }
.dicons { display: flex; gap: 4.4cqw; }
.dicons svg { width: 5cqw; height: 5cqw; }

.dcanvas { position: absolute; inset: 0; }

.ddock {
  position: absolute;
  left: 5cqw;
  right: 5cqw;
  bottom: 4.5cqw;
  display: flex;
  align-items: center;
  gap: 4cqw;
  z-index: 4;
}

.dbulb {
  display: grid;
  place-items: center;
  width: 9.6cqw;
  height: 9.6cqw;
  border-radius: 50%;
  background: #f5c533;
}

.dbulb svg { width: 5.2cqw; height: 5.2cqw; }
.dlist svg, .dright svg { width: 5.8cqw; height: 5.8cqw; }
.dright { display: flex; gap: 6cqw; margin-left: auto; }

/* Sticker paper */
.stk {
  position: absolute;
  width: 41cqw;
  padding: 3.2cqw 3.2cqw 2.8cqw;
  border-radius: 1.3cqw;
  background: var(--tone-paper);
  color: #3a332b;
  box-shadow: 0 1.4cqw 2.8cqw -1.2cqw rgba(70, 50, 30, 0.3), 0 0 0 0.2cqw rgba(70, 50, 30, 0.05);
}

.tone-paper { background: var(--tone-paper); }
.tone-butter { background: var(--tone-butter); }
.tone-sky { background: var(--tone-sky); }
.tone-sage { background: var(--tone-sage); }
.tone-rose { background: var(--tone-rose); }
.tone-lilac { background: var(--tone-lilac); }

.stk-text { margin: 0; font: 400 3.5cqw/1.42 var(--serif); }
/* Lines that type themselves in clip as boxes, not as runs of text. */
.stk-text > span { display: inline-block; }
.stk-ill { position: absolute; right: -3.2cqw; top: -3.6cqw; width: 9.4cqw; height: auto; }

.stk-persona {
  display: flex;
  align-items: center;
  gap: 1.1cqw;
  margin: 2cqw 0 0;
  font: 500 2.3cqw/1 var(--sans);
  color: #8b8277;
}

.persona-icon { width: 2.8cqw; height: 2.8cqw; }
.stk-aside { margin: 1.1cqw 0 0; font: italic 400 3.15cqw/1.42 var(--serif); color: #6f665c; }

.stk-status {
  display: flex;
  align-items: center;
  gap: 1cqw;
  margin: 2.2cqw 0 0;
  font: 600 2.3cqw/1 var(--sans);
  color: #857c71;
}

.stk-status svg { width: 2.7cqw; height: 2.7cqw; }

/* Photo stickers: a polaroid print, as fi_sticker_media_stage.dart draws it —
   even white sides, a deeper base, the capture moment in the corner. */
.pol { padding: 2.6cqw 2.6cqw 3cqw; border-radius: 0.5cqw; background: #fdfcfa; }
.pol-pic { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; background: #e9e2d6; }
.pol-pic img { width: 100%; height: 100%; object-fit: cover; }

.pol-stamp {
  position: absolute;
  left: 1.8cqw;
  bottom: 1.4cqw;
  font: 700 2.3cqw/1 ui-monospace, "SF Mono", Menlo, monospace;
  font-style: normal;
  letter-spacing: 0.04em;
  color: #ffae42;
  text-shadow: 0 0 0.5cqw rgba(255, 110, 20, 0.7);
}

.pol .pol-line { margin-top: 2.2cqw; font-size: 3.3cqw; }

/* Peloo reading a sticker (thinking() in demos.mjs): a chip under it and a
   light passing over it. Both rest hidden; each scene plays them. */
.think-chip {
  position: absolute;
  left: 2.6cqw;
  bottom: -5.6cqw;
  display: flex;
  align-items: center;
  gap: 0.8cqw;
  margin: 0;
  padding: 1cqw 2.2cqw;
  border-radius: 9cqw;
  background: #2b2621;
  color: #fdf6e6;
  font: 600 2.3cqw/1 var(--sans);
  white-space: nowrap;
  opacity: 0;
}

.think-chip svg { width: 2.6cqw; height: 2.6cqw; color: #f5c533; }

.shimmer {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.75) 50%, transparent 65%) no-repeat;
  background-size: 260% 100%;
  opacity: 0;
  pointer-events: none;
}

/* The canvas around a scene's one sticker (backdrop() in demos.mjs). */
.bg-0 { left: 4cqw; top: 25cqw; rotate: -1.2deg; }
.bg-1 { left: 50cqw; top: 28cqw; rotate: 1deg; }
.bg-2 { left: 5cqw; top: 150cqw; rotate: 0.8deg; }
.bg-3 { left: 51cqw; top: 144cqw; rotate: -1deg; }

/* A scene's one sticker is drawn larger, as if the canvas were zoomed in on it. */
.focus { scale: 1.38; transform-origin: 0 0; z-index: 2; }

/* A finger's tap, wherever a scene needs one. */
.tap {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9cqw;
  height: 9cqw;
  margin: -4.5cqw 0 0 -4.5cqw;
  border-radius: 50%;
  background: rgba(42, 38, 31, 0.22);
  opacity: 0;
  pointer-events: none;
}

/* Each scene sets this one tap's place in its loop with animation-delay. */
@keyframes tap {
  0% { opacity: 0; transform: scale(0.4); }
  2% { opacity: 1; transform: scale(1); }
  7%, 100% { opacity: 0; transform: scale(1.8); }
}

/* Hero (owner 第 331、332 則): the phone plays the 30-second film, silent and looping, centred under
   the status bar; its top and bottom edges fade into the screen's own paper. With reduced motion the
   phone shows the film's first scene as a still (heroFilm() in demos.mjs). */
.hfilm {
  position: absolute;
  inset: 11cqw 0 0;
  display: grid;
  place-items: center;
}

.hfilm video, .hfilm-still {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 5%, #000 95%, transparent);
}

.hfilm-still { display: none; }

@media (prefers-reduced-motion: reduce) {
  .hfilm video { display: none; }
  .hfilm-still { display: block; }
}

/* The bubble beside the phone: one line at a time. */
.bubble { display: grid; }
.bubble-line { grid-area: 1 / 1; opacity: 0; }
.b1 { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .bubble-line {
    animation-duration: 14s;
    animation-iteration-count: infinite;
  }

  .b1 { animation-name: bub1; }
  .b2 { animation-name: bub2; }
  .b3 { animation-name: bub3; }
}

@keyframes bub1 { 0%, 40% { opacity: 1; } 42%, 100% { opacity: 0; } }
@keyframes bub2 { 0%, 42% { opacity: 0; } 44%, 72% { opacity: 1; } 74%, 100% { opacity: 0; } }
@keyframes bub3 { 0%, 74% { opacity: 0; } 76%, 97% { opacity: 1; } 99%, 100% { opacity: 0; } }

/* Demos of getting things down (T87): say it, set when, check it off.
   Base styles are the moment worth seeing when nothing moves; the
   keyframes play each loop. Percentages are of the scene's loop. */

/* ── Voice, 10 s: hold the mic, talk, and the words become a sticker. ── */
.v-new { left: 12cqw; top: 66cqw; width: 52cqw; rotate: -0.8deg; }

.v-pill {
  position: absolute;
  left: 50%;
  bottom: 19cqw;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 2cqw;
  padding: 2.6cqw 4cqw;
  border-radius: 9cqw;
  background: #2b2621;
  color: #fdf6e6;
  font: 600 3.4cqw/1 var(--sans);
  white-space: nowrap;
  z-index: 5;
  opacity: 0;
}

.v-dot { width: 2cqw; height: 2cqw; border-radius: 50%; background: #e5533d; }
.v-bars { display: flex; align-items: center; gap: 0.7cqw; height: 5cqw; }
.v-bars i { width: 0.8cqw; height: 100%; border-radius: 1cqw; background: #f5c533; transform: scaleY(0.35); }
.v-time { display: grid; font-variant-numeric: tabular-nums; }
.v-time b { grid-area: 1 / 1; font-weight: 600; opacity: 0; }
.v-time .t3 { opacity: 1; }

/* Centred on the mic: the dock's right group is mic, 6cqw gap, add. */
.v-ring {
  position: absolute;
  right: 8.7cqw;
  top: 50%;
  width: 12cqw;
  height: 12cqw;
  margin-top: -6cqw;
  border-radius: 50%;
  background: rgba(229, 83, 61, 0.16);
  box-shadow: 0 0 0 0.4cqw rgba(229, 83, 61, 0.45);
  opacity: 0;
}

/* ── Remind, 11 s: tap the alarm, roll the wheel, pick weekly. ── */
.r-note { left: 14cqw; top: 64cqw; width: 54cqw; rotate: -0.6deg; }

.r-status { display: inline-flex; padding: 1cqw 2cqw; border-radius: 9cqw; background: rgba(196, 87, 61, 0.13); color: #b45c45; }

.r-tools {
  position: absolute;
  left: 18cqw;
  top: 49cqw;
  display: flex;
  align-items: center;
  gap: 5cqw;
  padding: 2.4cqw 4.4cqw;
  border-radius: 9cqw;
  background: #2b2621;
  color: #fdf6e6;
  z-index: 3;
  opacity: 0;
}

.r-tools svg { width: 4.6cqw; height: 4.6cqw; }
.r-tools .i-fill-dark { stroke: currentColor; }
.r-alarm { position: relative; color: #f5c533; }

.r-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 5.4cqw 6cqw 12cqw;
  border-radius: 7cqw 7cqw 0 0;
  background: #fffdf8;
  box-shadow: 0 -2cqw 6cqw rgba(40, 30, 20, 0.18);
  z-index: 6;
  transform: translateY(105%);
}

.r-head { display: flex; align-items: center; gap: 1.6cqw; margin: 0 0 4cqw; font: 700 3.8cqw/1 var(--sans); }
.r-head svg { width: 4.4cqw; height: 4.4cqw; color: #c4573d; }

.r-done {
  position: relative;
  margin-left: auto;
  padding: 1.8cqw 3.8cqw;
  border-radius: 9cqw;
  background: #2b2621;
  color: #fdf6e6;
  font: 700 3.2cqw/1 var(--sans);
}

/* Three rows of 9cqw; the middle one is the choice. */
.r-wheel {
  position: relative;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  height: 27cqw;
  overflow: hidden;
  font: 600 3.9cqw/9cqw var(--sans);
  text-align: center;
  -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent);
  mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent);
}

.r-band { position: absolute; inset: 9cqw 0 auto; height: 9cqw; border-radius: 2.4cqw; background: rgba(43, 38, 33, 0.07); }
.r-col b { display: block; height: 9cqw; font-weight: 600; white-space: nowrap; }

.r-repeats { display: flex; gap: 1.4cqw; margin: 4.4cqw 0 0; }

.r-rep {
  position: relative;
  flex: 1;
  padding: 2.1cqw 0;
  border-radius: 9cqw;
  background: rgba(43, 38, 33, 0.06);
  font: 600 3cqw/1 var(--sans);
  text-align: center;
  white-space: nowrap;
}

.r-chosen { background: #2b2621; color: #fdf6e6; }

/* ── Habit, 9 s: tap the weekly strip and this week counts. ── */
.hb-note { left: 9cqw; top: 58cqw; width: 56cqw; rotate: -0.6deg; }

.hb-strip {
  position: relative;
  display: inline-flex;
  padding: 1.4cqw 2.4cqw;
  border-radius: 9cqw;
  background: rgba(77, 156, 99, 0.16);
  color: #3f7d50;
}

.hb-count { display: inline-grid; overflow: hidden; }
.hb-before, .hb-after { grid-area: 1 / 1; }
.hb-before { opacity: 0; transform: translateY(-100%); }

.hb-burst {
  position: absolute;
  right: -4cqw;
  bottom: -4cqw;
  display: grid;
  place-items: center;
  width: 11cqw;
  height: 11cqw;
  border-radius: 50%;
  background: #4d9c63;
  color: #fff;
  opacity: 0;
}

.hb-burst svg { width: 6cqw; height: 6cqw; }

.hb-toast {
  position: absolute;
  left: 50%;
  bottom: 19cqw;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  margin: 0;
  padding: 2.6cqw 4cqw;
  border-radius: 9cqw;
  background: #2b2621;
  color: #fdf6e6;
  font: 600 3.2cqw/1.2 var(--sans);
  white-space: nowrap;
  z-index: 5;
}

.hb-toast svg { width: 3.6cqw; height: 3.6cqw; color: #8fd19e; }

@media (prefers-reduced-motion: no-preference) {
  .demo-voice * { animation-duration: 10s; animation-iteration-count: infinite; }
  .demo-remind * { animation-duration: 11s; animation-iteration-count: infinite; }
  .demo-habit * { animation-duration: 9s; animation-iteration-count: infinite; }

  .v-ring { animation-name: v-ring; }
  .v-pill { animation-name: v-pill; }
  .demo-voice .v-bars i { animation: v-bar 0.8s ease-in-out infinite alternate; }
  .demo-voice .v-bars i:nth-child(3n + 2) { animation-delay: -0.3s; animation-duration: 0.6s; }
  .demo-voice .v-bars i:nth-child(3n) { animation-delay: -0.55s; animation-duration: 0.95s; }
  .demo-voice .v-bars i:nth-child(even) { animation-direction: alternate-reverse; }
  .t1 { animation-name: v-t1; }
  .t2 { animation-name: v-t2; }
  .t3 { animation-name: v-t3; }
  .v-new { animation-name: v-drop; }
  .v-l1 { animation-name: v-type1; }
  .v-l2 { animation-name: v-type2; }
  .v-persona { animation-name: v-fade; }
  .v-aside { animation-name: v-aside; }

  .r-note { animation-name: r-select; }
  .r-tools { animation-name: r-tools; }
  .r-alarm .tap { animation-name: tap; animation-delay: 1.2s; }
  .r-sheet { animation-name: r-sheet; }
  .r-days { animation-name: r-days; }
  .r-hours { animation-name: r-hours; }
  .r-mins { animation-name: r-mins; }
  .r-chosen .tap { animation-name: tap; animation-delay: 5.3s; }
  .r0 { animation-name: r-was; }
  .r-chosen { animation-name: r-now; }
  .r-done .tap { animation-name: tap; animation-delay: 6.8s; }
  .r-status { animation-name: r-status; }

  .hb-strip .tap { animation-name: tap; animation-delay: 2.1s; }
  .hb-strip { animation-name: hb-strip; }
  .hb-before { animation-name: hb-before; }
  .hb-after { animation-name: hb-after; }
  .hb-burst { animation-name: hb-burst; }
  .hb-toast { animation-name: hb-toast; }
}

@keyframes v-ring {
  0%, 5% { opacity: 0; transform: scale(0.6); }
  8%, 24%, 40% { opacity: 1; transform: scale(1); }
  16%, 32% { opacity: 1; transform: scale(1.25); }
  46%, 100% { opacity: 0; transform: scale(1); }
}

@keyframes v-pill {
  0%, 7% { opacity: 0; transform: translateY(4cqw) scale(0.9); }
  10%, 43% { opacity: 1; transform: none; }
  49%, 100% { opacity: 0; transform: translateY(-14cqw) scale(0.5); }
}

@keyframes v-bar { to { transform: scaleY(1); } }

@keyframes v-t1 { 0%, 20% { opacity: 1; } 21%, 100% { opacity: 0; } }
@keyframes v-t2 { 0%, 20% { opacity: 0; } 21%, 32% { opacity: 1; } 33%, 100% { opacity: 0; } }
@keyframes v-t3 { 0%, 32% { opacity: 0; } 33%, 100% { opacity: 1; } }

@keyframes v-drop {
  0%, 46% { opacity: 0; transform: translateY(24cqw) scale(0.5); }
  51% { opacity: 1; transform: translateY(-1cqw) scale(1.03); }
  54%, 95% { opacity: 1; transform: none; }
  99%, 100% { opacity: 0; transform: none; }
}

@keyframes v-type1 {
  0%, 53% { clip-path: inset(0 100% 0 0); animation-timing-function: steps(9, end); }
  63%, 100% { clip-path: inset(0); }
}

@keyframes v-type2 {
  0%, 63% { clip-path: inset(0 100% 0 0); animation-timing-function: steps(7, end); }
  71%, 100% { clip-path: inset(0); }
}

@keyframes v-fade { 0%, 73% { opacity: 0; } 77%, 100% { opacity: 1; } }

@keyframes v-aside {
  0%, 77% { clip-path: inset(0 100% 0 0); animation-timing-function: steps(12, end); }
  88%, 100% { clip-path: inset(0); }
}

@keyframes r-select {
  0%, 2%, 22%, 100% { outline: 0.5cqw solid rgba(196, 87, 61, 0); outline-offset: 1cqw; }
  5%, 18% { outline: 0.5cqw solid rgba(196, 87, 61, 0.55); outline-offset: 1cqw; }
}

@keyframes r-tools {
  0%, 3% { opacity: 0; transform: translateY(2cqw); }
  6%, 15% { opacity: 1; transform: none; }
  19%, 100% { opacity: 0; transform: none; }
}

@keyframes r-sheet {
  0%, 14% { transform: translateY(105%); }
  22%, 65% { transform: none; }
  73%, 100% { transform: translateY(105%); }
}

@keyframes r-days { 0%, 26% { transform: translateY(9cqw); } 32%, 100% { transform: none; } }
@keyframes r-hours { 0%, 30% { transform: translateY(9cqw); } 36%, 100% { transform: none; } }
@keyframes r-mins { 0%, 34% { transform: translateY(9cqw); } 40%, 100% { transform: none; } }

@keyframes r-was {
  0%, 49% { background: #2b2621; color: #fdf6e6; }
  51%, 100% { background: rgba(43, 38, 33, 0.06); color: inherit; }
}

@keyframes r-now {
  0%, 49% { background: rgba(43, 38, 33, 0.06); color: #2b2621; }
  51%, 100% { background: #2b2621; color: #fdf6e6; }
}

@keyframes r-status {
  0%, 73% { opacity: 0; transform: scale(0.6); }
  77% { opacity: 1; transform: scale(1.15); }
  79%, 95% { opacity: 1; transform: none; }
  99%, 100% { opacity: 0; transform: none; }
}

@keyframes hb-strip {
  0%, 25%, 94%, 100% { background: rgba(43, 38, 33, 0.07); color: #857c71; }
  30%, 90% { background: rgba(77, 156, 99, 0.16); color: #3f7d50; }
}

@keyframes hb-before {
  0%, 26% { opacity: 1; transform: none; }
  31%, 92% { opacity: 0; transform: translateY(-100%); }
  96%, 100% { opacity: 1; transform: none; }
}

@keyframes hb-after {
  0%, 26% { opacity: 0; transform: translateY(100%); }
  31%, 92% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; transform: translateY(100%); }
}

@keyframes hb-burst {
  0%, 25% { opacity: 0; transform: scale(0.2) rotate(-30deg); }
  29% { opacity: 1; transform: scale(1.2) rotate(6deg); }
  32%, 40% { opacity: 1; transform: none; }
  46%, 100% { opacity: 0; transform: scale(0.8); }
}

@keyframes hb-toast {
  0%, 33% { opacity: 0; transform: translateY(6cqw); }
  38%, 86% { opacity: 1; transform: none; }
  91%, 100% { opacity: 0; transform: translateY(3cqw); }
}

/* Photo demo (T90; owner 2026-10-13: 「增加一些照片，例如宠物照片」), 11 s:
   tap +, pick the corgi from the album, and it lands as a polaroid that
   Peloo looks at and answers. The base styles are the polaroid on the
   canvas with Peloo's line. */
.p-new { left: 14cqw; top: 52cqw; width: 50cqw; rotate: -1.2deg; }

/* Over the dock's + (the last icon on the right). */
.p-add { left: auto; right: -1.6cqw; }

.p-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 5cqw 4.4cqw 13cqw;
  border-radius: 7cqw 7cqw 0 0;
  background: #fffdf8;
  box-shadow: 0 -2cqw 6cqw rgba(40, 30, 20, 0.18);
  z-index: 6;
  transform: translateY(105%);
}

.p-head { margin: 0 0 3.4cqw 1cqw; font: 700 3.8cqw/1 var(--sans); }
.p-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2cqw; }

.p-cell {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 1.2cqw;
  background: #e9e2d6;
}

.p-cell img { width: 100%; height: 100%; object-fit: cover; }

.p-chosen::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0.9cqw #f5c533 inset;
  opacity: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .demo-photo * { animation-duration: 11s; animation-iteration-count: infinite; }
  .demo-photo .p-chosen::after { animation: p-pick 11s infinite; }

  .p-add { animation-name: tap; animation-delay: 0.55s; }
  .p-sheet { animation-name: p-sheet; }
  .p-chosen .tap { animation-name: tap; animation-delay: 2.9s; }
  .p-new { animation-name: p-land; }
  .p-think { animation-name: p-think; }
  .p-shimmer { animation-name: p-shimmer; }
  .p-persona { animation-name: p-fade; }
  .p-aside { animation-name: p-aside; }
}

@keyframes p-sheet {
  0%, 7% { transform: translateY(105%); }
  13%, 33% { transform: none; }
  39%, 100% { transform: translateY(105%); }
}

@keyframes p-pick {
  0%, 26% { opacity: 0; }
  28%, 34% { opacity: 1; }
  36%, 100% { opacity: 0; }
}

@keyframes p-land {
  0%, 37% { opacity: 0; transform: translateY(40cqw) scale(0.3); }
  43% { opacity: 1; transform: translateY(-1cqw) scale(1.03); }
  46%, 95% { opacity: 1; transform: none; }
  99%, 100% { opacity: 0; transform: none; }
}

@keyframes p-think {
  0%, 46% { opacity: 0; transform: translateY(1cqw); }
  48%, 56% { opacity: 1; transform: none; }
  59%, 100% { opacity: 0; }
}

@keyframes p-shimmer {
  0%, 46% { opacity: 0; background-position: 130% 0; }
  47% { opacity: 1; }
  56% { opacity: 1; background-position: -30% 0; }
  58%, 100% { opacity: 0; background-position: -30% 0; }
}

@keyframes p-fade { 0%, 57% { opacity: 0; } 61%, 100% { opacity: 1; } }

@keyframes p-aside {
  0%, 60% { clip-path: inset(0 100% 0 0); animation-timing-function: steps(14, end); }
  72%, 100% { clip-path: inset(0); }
}

/* Demos of making sense of it (T87): ideas, categories, search. Base
   styles are the moment worth seeing when nothing moves; the keyframes
   play each loop. Percentages are of the scene's loop. */

/* ── Inspire, 12 s: the bulb deals idea cards; one goes on the canvas. ── */
.i-new { left: 14cqw; top: 70cqw; width: 48cqw; rotate: 0.8deg; opacity: 0; }

.i-dim { position: absolute; inset: 0; background: rgba(43, 38, 33, 0.32); z-index: 5; }

.i-card {
  position: absolute;
  left: 7cqw;
  right: 7cqw;
  bottom: 24cqw;
  padding: 5cqw 5cqw 4.6cqw;
  border-radius: 5cqw;
  background: #fffdf8;
  box-shadow: 0 3cqw 8cqw -2cqw rgba(30, 20, 10, 0.45);
  z-index: 6;
}

.i-c1 { opacity: 0; transform: translate(-120%, 0) rotate(-8deg); }

.i-kicker { display: flex; align-items: center; gap: 1.2cqw; margin: 0; font: 700 2.7cqw/1 var(--sans); color: #84620a; }
.i-kicker svg { width: 3.8cqw; height: 3.8cqw; }
.i-related { margin: 3cqw 0 0; padding-left: 2.4cqw; border-left: 0.6cqw solid var(--tone-lilac); font: 400 2.8cqw/1.4 var(--sans); color: #8b8277; }
.i-idea { margin: 3cqw 0 0; font: 400 4.4cqw/1.45 var(--serif); color: #2b2621; }

.i-add {
  position: relative;
  display: inline-block;
  margin: 4cqw 0 0;
  padding: 2.2cqw 4.4cqw;
  border-radius: 9cqw;
  background: #f5c533;
  font: 700 3cqw/1 var(--sans);
}

/* ── Sort, 12 s: scattered stickers gather, get a name, and a story. ── */
.s-n { width: 39cqw; }
.s-n .stk-text { font-size: 3.9cqw; }
.s-n0 { left: 7cqw; top: 31cqw; rotate: -1.4deg; --sx: 4cqw; --sy: 73cqw; --sr: -5deg; }
.s-n1 { left: 50cqw; top: 29cqw; rotate: 1.2deg; --sx: -6cqw; --sy: 11cqw; --sr: 4deg; }
.s-n2 { left: 7cqw; top: 62cqw; rotate: 0.8deg; --sx: 39cqw; --sy: 74cqw; --sr: -3deg; }
.s-n3 { left: 50cqw; top: 60cqw; rotate: -1deg; --sx: -42cqw; --sy: 100cqw; --sr: 4deg; }

.s-lasso { position: absolute; left: 3cqw; top: 24cqw; width: 88cqw; height: 86cqw; overflow: visible; }

.s-lasso path {
  fill: rgba(232, 128, 104, 0.07);
  stroke: #d9775e;
  stroke-width: 0.6;
  stroke-dasharray: 2.4 1.6;
}

.s-label {
  position: absolute;
  left: 8cqw;
  top: 20.5cqw;
  padding: 1cqw 2.4cqw;
  border-radius: 9cqw;
  background: #fffdf8;
  box-shadow: 0 0 0 0.25cqw rgba(217, 119, 94, 0.45);
  font: 700 2.6cqw/1 var(--sans);
  color: #b45c45;
  z-index: 3;
}

.s-label b { margin-left: 0.6cqw; color: #8b8277; font-weight: 600; }

/* ── Search, 8 s: type a word, every sticker that has it shows up. ── */
.q-bar { position: absolute; top: 13cqw; left: 5cqw; right: 5cqw; display: flex; align-items: center; gap: 3cqw; z-index: 4; }
.q-cancel { font: 500 3.6cqw/1 var(--sans); }

.q-field {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1.8cqw;
  height: 10cqw;
  padding: 0 3.4cqw;
  border-radius: 9cqw;
  background: #fffdf8;
  box-shadow: 0 0 0 0.25cqw rgba(43, 38, 33, 0.12);
  font: 500 3.8cqw/1 var(--sans);
}

.q-field svg { flex: none; width: 4.4cqw; height: 4.4cqw; color: #8b8277; }
.q-text { overflow: hidden; white-space: nowrap; max-width: 40cqw; }
.q-ph { position: absolute; left: 9.6cqw; right: 3cqw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #a59c90; opacity: 0; }
.q-caret { width: 0.35cqw; height: 4.6cqw; margin-left: -1.4cqw; background: #c4573d; }

.q-results { position: absolute; top: 27cqw; left: 5cqw; right: 5cqw; }
.q-group + .q-group { margin-top: 4.4cqw; }
.q-scope { margin: 0 0 2.4cqw 2cqw; font: 600 2.9cqw/1 var(--sans); color: #8b8277; }

.q-row {
  display: flex;
  align-items: center;
  gap: 3cqw;
  margin: 0 0 2.2cqw;
  padding: 3.4cqw 4cqw;
  border-radius: 3.2cqw;
  background: #fffdf8;
  box-shadow: 0 1cqw 2.4cqw -1cqw rgba(70, 50, 30, 0.25);
  font: 400 3.9cqw/1.4 var(--serif);
}

.q-ico { display: grid; flex: none; place-items: center; width: 8cqw; height: 8cqw; border-radius: 2cqw; background: var(--tone-sky); }
.q1 .q-ico { background: var(--tone-sage); }
.q2 .q-ico { background: var(--tone-butter); }
.q-ico svg { width: 4.6cqw; height: 4.6cqw; }

.q-row mark {
  padding: 0 0.1em;
  border-radius: 0.6cqw;
  background: linear-gradient(rgba(245, 197, 51, 0.6), rgba(245, 197, 51, 0.6)) no-repeat 0 0 / 100% 100%;
  color: inherit;
}

/* The keyboard stays up while the results come in, as on a phone. */
.q-keys {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 2.6cqw;
  padding: 2.8cqw 1cqw 15cqw;
  background: #dcd6cd;
  z-index: 5;
}

.q-keyrow { display: flex; justify-content: center; gap: 1.4cqw; }

.q-keyrow b {
  display: grid;
  place-items: center;
  width: 7.6cqw;
  height: 10.4cqw;
  border-radius: 1.4cqw;
  background: #fdfbf7;
  box-shadow: 0 0.35cqw 0 rgba(0, 0, 0, 0.16);
  font: 400 4.4cqw/1 var(--sans);
}

.q-keyrow .q-wide { width: 19cqw; background: #c4bdb2; font-size: 3.4cqw; }
.q-keyrow .q-space { flex: 1; max-width: 46cqw; }
.q-keyrow .q-go { background: #f5c533; }
.q-go svg { width: 4.6cqw; height: 4.6cqw; }

@media (prefers-reduced-motion: no-preference) {
  .demo-inspire * { animation-duration: 12s; animation-iteration-count: infinite; }
  .demo-sort * { animation-duration: 12s; animation-iteration-count: infinite; }
  .demo-search * { animation-duration: 8s; animation-iteration-count: infinite; }

  .demo-inspire .dbulb { animation-name: i-bulb; }
  .i-dim { animation-name: i-dim; }
  .i-c1 { animation-name: i-c1; }
  .i-c2 { animation-name: i-c2; }
  .i-c2 .tap { animation-name: tap; animation-delay: 6.7s; }
  .i-new { animation-name: i-new; }

  .s-n { animation-name: s-gather; }
  .s-n1 { animation-delay: 0.24s; }
  .s-n2 { animation-delay: 0.48s; }
  .s-n3 { animation-delay: 0.72s; }
  .s-lasso path { animation-name: s-lasso; }
  .s-label { animation-name: s-label; }

  .q-ph { animation-name: q-ph; }
  .q-text { animation-name: q-type; }
  .demo-search .q-caret { animation: q-blink 1s steps(1) infinite; }
  .q-scope { animation-name: q-show; }
  .q-row { animation-name: q-row; }
  .q1 { animation-delay: 0.3s; }
  .q-g1 .q-scope { animation-delay: 0.5s; }
  .q2 { animation-delay: 0.6s; }
  .q-row mark { animation-name: q-mark; }
}

@keyframes i-bulb {
  0%, 3%, 12%, 100% { box-shadow: 0 0 0 0 rgba(245, 197, 51, 0.5); transform: none; }
  6% { box-shadow: 0 0 0 2cqw rgba(245, 197, 51, 0.45); transform: scale(0.9); }
  10% { box-shadow: 0 0 0 4cqw rgba(245, 197, 51, 0); transform: none; }
}

@keyframes i-dim { 0%, 9% { opacity: 0; } 13%, 64% { opacity: 1; } 70%, 100% { opacity: 0; } }

@keyframes i-c1 {
  0%, 10% { opacity: 0; transform: translate(0, 60cqw) rotate(0); }
  16%, 35% { opacity: 1; transform: translate(0, 0) rotate(0); }
  42%, 100% { opacity: 0; transform: translate(-120%, 0) rotate(-8deg); }
}

@keyframes i-c2 {
  0%, 36% { opacity: 0; transform: translate(120%, 0) rotate(8deg) scale(1); }
  43%, 58% { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); }
  66%, 100% { opacity: 0; transform: translate(0, -42cqw) rotate(0) scale(0.45); }
}

@keyframes i-new {
  0%, 63% { opacity: 0; transform: scale(0.5); }
  68% { opacity: 1; transform: scale(1.08); }
  71%, 95% { opacity: 1; transform: none; }
  99%, 100% { opacity: 0; transform: none; }
}

@keyframes s-gather {
  0% { opacity: 0; transform: translate(var(--sx), var(--sy)) rotate(var(--sr)); }
  4%, 14% { opacity: 1; transform: translate(var(--sx), var(--sy)) rotate(var(--sr)); }
  25%, 93% { opacity: 1; transform: none; }
  97%, 100% { opacity: 0; transform: none; }
}

@keyframes s-lasso {
  0%, 31% { stroke-dashoffset: 100; stroke-dasharray: 100 100; fill-opacity: 0; opacity: 1; }
  43% { stroke-dashoffset: 0; stroke-dasharray: 100 100; fill-opacity: 0; }
  46%, 92% { stroke-dasharray: 2.4 1.6; fill-opacity: 1; opacity: 1; }
  96%, 100% { opacity: 0; }
}

@keyframes s-label {
  0%, 43% { opacity: 0; transform: scale(0.6); }
  46% { opacity: 1; transform: scale(1.1); }
  48%, 92% { opacity: 1; transform: none; }
  96%, 100% { opacity: 0; }
}

@keyframes q-ph { 0%, 12% { opacity: 1; } 13%, 95% { opacity: 0; } 98%, 100% { opacity: 1; } }

@keyframes q-type {
  0%, 14% { max-width: 0; animation-timing-function: steps(10, end); }
  30%, 92% { max-width: 26cqw; }
  95%, 100% { max-width: 0; }
}

@keyframes q-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

@keyframes q-show { 0%, 32% { opacity: 0; } 36%, 92% { opacity: 1; } 95%, 100% { opacity: 0; } }

@keyframes q-row {
  0%, 34% { opacity: 0; transform: translateY(3cqw); }
  40%, 92% { opacity: 1; transform: none; }
  95%, 100% { opacity: 0; transform: none; }
}

@keyframes q-mark {
  0%, 44% { background-size: 0% 100%; }
  54%, 100% { background-size: 100% 100%; }
}

/* Mixed canvas (T91), 16 s: fragments of every kind arrive — plans, a
   photo, a reading note, a voice note, a video, an idea, a family plan —
   then Peloo files them into four categories. Every fragment's place is two
   pairs of variables, after sorting (--x/--y) and on arrival (--ax/--ay), so
   one set of keyframes plays both the wide and the narrow layout. The base
   styles are the sorted canvas. */
.dtab {
  position: relative;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  aspect-ratio: 1194 / 834;
  border-radius: 3.4% / 4.9%;
  background: #211d18;
  box-shadow: 0 50px 90px -50px rgba(42, 38, 31, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.tscreen {
  position: absolute;
  inset: 3.1% 2.2%;
  overflow: hidden;
  border-radius: 1.8% / 2.6%;
  background-color: #f4efe5;
  background-image:
    linear-gradient(rgba(70, 55, 35, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(70, 55, 35, 0.07) 1px, transparent 1px);
  /* One 5.5-world-cqw cell on a 210 × 144 canvas. */
  background-size: 2.62% 3.82%;
}

/* 100 world cqw = 47.6% of the screen: a 41–44cqw sticker is a fifth of it. */
.world {
  --W: 210cqw;
  position: absolute;
  inset: 0 auto 0 0;
  width: 47.62%;
  container-type: inline-size;
  color: #2b2621;
  font-family: var(--sans);
}

.world svg { display: block; }
.demo-mix .dstatus { right: auto; width: var(--W); }
.demo-mix .dbar { right: auto; width: calc(var(--W) - 11cqw); }
.demo-mix .ddock { right: auto; width: calc(var(--W) - 10cqw); }
.m-think { top: 12.4cqw; bottom: auto; left: calc(var(--W) / 2); translate: -50% 0; z-index: 5; }

.m-i { left: var(--x); top: var(--y); width: 46cqw; }

.m-visa { --x: 7cqw; --y: 28cqw; --ax: 112cqw; --ay: 96cqw; --ar: -2deg; }
.m-cat { --x: 109cqw; --y: 26cqw; --ax: 40cqw; --ay: 24cqw; --ar: 3deg; }
.m-book { --x: 58cqw; --y: 28cqw; --ax: 150cqw; --ay: 24cqw; --ar: -1deg; }
.m-voice { --x: 160cqw; --y: 28cqw; --ax: 98cqw; --ay: 30cqw; --ar: 2deg; }
.m-plan { --x: 7cqw; --y: 56cqw; --ax: 6cqw; --ay: 100cqw; --ar: 1.5deg; }
.m-video { --x: 109cqw; --y: 76cqw; --ax: 160cqw; --ay: 64cqw; --ar: -2.5deg; }
.m-idea { --x: 58cqw; --y: 52cqw; --ax: 60cqw; --ay: 80cqw; --ar: 2deg; }
.m-parents { --x: 160cqw; --y: 60cqw; --ax: 6cqw; --ay: 76cqw; --ar: -1.5deg; }

.m-lasso {
  position: absolute;
  left: var(--lx);
  top: var(--ly);
  width: var(--lw);
  height: var(--lh);
  border: 0.45cqw dashed #d9775e;
  border-radius: 4cqw;
  background: rgba(232, 128, 104, 0.06);
}

.m-label {
  position: absolute;
  left: calc(var(--lx) + 3cqw);
  top: calc(var(--ly) - 3.6cqw);
  padding: 1cqw 2.4cqw;
  border-radius: 9cqw;
  background: #fffdf8;
  box-shadow: 0 0 0 0.25cqw rgba(217, 119, 94, 0.45);
  font: 700 2.6cqw/1 var(--sans);
  color: #b45c45;
  /* Past the world box's own width, so it must not shrink to fit it. */
  white-space: nowrap;
  z-index: 3;
}

.m-label b { margin-left: 0.6cqw; color: #8b8277; font-weight: 600; }

.m-g0 { --lx: 3cqw; --ly: 22cqw; --lw: 54cqw; --lh: 60cqw; }
.m-g1 { --lx: 54cqw; --ly: 22cqw; --lw: 54cqw; --lh: 56cqw; }
.m-g2 { --lx: 105cqw; --ly: 21cqw; --lw: 54cqw; --lh: 106cqw; }
.m-g3 { --lx: 156cqw; --ly: 22cqw; --lw: 53cqw; --lh: 58cqw; }

/* Narrow screens: the same canvas upright, as on a phone (112 × 191). */
@media (max-width: 760px) {
  .dtab { max-width: 420px; aspect-ratio: 0.6; border-radius: 9% / 5.4%; }
  .tscreen { inset: 1.8% 3%; border-radius: 7% / 4.2%; background-size: 4.91% 2.88%; }
  .world { --W: 112cqw; width: 89.29%; }

  .m-visa { --x: 5cqw; --y: 25cqw; --ax: 60cqw; --ay: 104cqw; }
  .m-cat { --x: 5cqw; --y: 89cqw; --ax: 60cqw; --ay: 22cqw; }
  .m-book { --x: 5cqw; --y: 57cqw; --ax: 8cqw; --ay: 60cqw; }
  .m-voice { --x: 5cqw; --y: 147cqw; --ax: 6cqw; --ay: 24cqw; }
  .m-plan { --x: 60cqw; --y: 25cqw; --ax: 8cqw; --ay: 146cqw; }
  .m-video { --x: 60cqw; --y: 89cqw; --ax: 4cqw; --ay: 86cqw; }
  .m-idea { --x: 60cqw; --y: 57cqw; --ax: 58cqw; --ay: 72cqw; }
  .m-parents { --x: 60cqw; --y: 147cqw; --ax: 58cqw; --ay: 138cqw; }
  .m-g0 { --lx: 2cqw; --ly: 21cqw; --lw: 108cqw; --lh: 29cqw; }
  .m-g1 { --lx: 2cqw; --ly: 53cqw; --lw: 108cqw; --lh: 29cqw; }
  .m-g2 { --lx: 2cqw; --ly: 85cqw; --lw: 108cqw; --lh: 54cqw; }
  .m-g3 { --lx: 2cqw; --ly: 142cqw; --lw: 108cqw; --lh: 32cqw; }
}

/* Video and voice stickers (clip() and voiceRow() in demo-chrome.mjs). */
.pol-video video, .pol-still { width: 100%; height: 100%; object-fit: cover; }
.pol-still { display: none; }

@media (prefers-reduced-motion: reduce) {
  .pol-video video { display: none; }
  .pol-still { display: block; }
}

.pol-time {
  position: absolute;
  right: 1.6cqw;
  top: 1.6cqw;
  display: flex;
  align-items: center;
  gap: 0.5cqw;
  padding: 0.7cqw 1.4cqw;
  border-radius: 9cqw;
  background: rgba(20, 16, 12, 0.55);
  color: #fff;
  font: 600 2.2cqw/1 var(--sans);
}

.pol-time svg { width: 2.2cqw; height: 2.2cqw; }

.vnote {
  display: flex;
  align-items: center;
  gap: 1.2cqw;
  margin: 2cqw 0 0;
  padding: 1.2cqw 2cqw;
  border-radius: 9cqw;
  background: rgba(43, 38, 33, 0.08);
  font: 600 2.4cqw/1 var(--sans);
  color: #6f665c;
}

.vnote svg { width: 2.8cqw; height: 2.8cqw; color: #c4573d; }
.vnote-bars { display: flex; flex: 1; align-items: center; gap: 0.5cqw; height: 3.4cqw; }
.vnote-bars i { flex: 1; height: 45%; border-radius: 1cqw; background: #c4573d; opacity: 0.7; }
.vnote-bars i:nth-child(3n) { height: 85%; }
.vnote-bars i:nth-child(4n + 1) { height: 60%; }
.vnote-bars i:nth-child(5n + 2) { height: 100%; }


@media (prefers-reduced-motion: no-preference) {
  .demo-mix * { animation-duration: 16s; animation-iteration-count: infinite; }
  .m-visa { animation-name: m-a0; }
  .m-cat { animation-name: m-a1; }
  .m-book { animation-name: m-a2; }
  .m-voice { animation-name: m-a3; }
  .m-plan { animation-name: m-a4; }
  .m-video { animation-name: m-a5; }
  .m-idea { animation-name: m-a6; }
  .m-parents { animation-name: m-a7; }
  .m-lasso { animation-name: m-lasso; }
  .m-label { animation-name: m-label; }
  .m-think { animation-name: m-think; }
}

@keyframes m-a0 {
  0%, 2% { opacity: 0; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(0.5); }
  4.4% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1.05); }
  5.6%, 44% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1); }
  53%, 90% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  95%, 100% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(1); }
}

@keyframes m-a1 {
  0%, 6.6% { opacity: 0; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(0.5); }
  9% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1.05); }
  10.2%, 44.6% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1); }
  53.6%, 90% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  95%, 100% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(1); }
}

@keyframes m-a2 {
  0%, 11.2% { opacity: 0; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(0.5); }
  13.6% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1.05); }
  14.8%, 45.2% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1); }
  54.2%, 90% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  95%, 100% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(1); }
}

@keyframes m-a3 {
  0%, 15.8% { opacity: 0; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(0.5); }
  18.2% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1.05); }
  19.4%, 45.8% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1); }
  54.8%, 90% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  95%, 100% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(1); }
}

@keyframes m-a4 {
  0%, 20.4% { opacity: 0; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(0.5); }
  22.8% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1.05); }
  24%, 46.4% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1); }
  55.4%, 90% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  95%, 100% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(1); }
}

@keyframes m-a5 {
  0%, 25% { opacity: 0; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(0.5); }
  27.4% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1.05); }
  28.6%, 47% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1); }
  56%, 90% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  95%, 100% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(1); }
}

@keyframes m-a6 {
  0%, 29.6% { opacity: 0; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(0.5); }
  32% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1.05); }
  33.2%, 47.6% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1); }
  56.6%, 90% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  95%, 100% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(1); }
}

@keyframes m-a7 {
  0%, 34.2% { opacity: 0; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(0.5); }
  36.6% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1.05); }
  37.8%, 48.2% { opacity: 1; transform: translate(calc(var(--ax) - var(--x)), calc(var(--ay) - var(--y))) rotate(var(--ar, 0deg)) scale(1); }
  57.2%, 90% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  95%, 100% { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(1); }
}

@keyframes m-lasso {
  0%, 59% { opacity: 0; clip-path: inset(0 100% 100% 0 round 4cqw); }
  60% { opacity: 1; clip-path: inset(0 100% 100% 0 round 4cqw); }
  66%, 90% { opacity: 1; clip-path: inset(0 round 4cqw); }
  95%, 100% { opacity: 0; clip-path: inset(0 round 4cqw); }
}

@keyframes m-label {
  0%, 65% { opacity: 0; transform: scale(0.6); }
  68% { opacity: 1; transform: scale(1.1); }
  70%, 90% { opacity: 1; transform: none; }
  95%, 100% { opacity: 0; }
}

@keyframes m-think {
  0%, 41% { opacity: 0; }
  43%, 56% { opacity: 1; }
  59%, 100% { opacity: 0; }
}

/* Insights demo (T87), 13 s: Peloo reads every sticker, then "About you"
   scrolls by to its end (the page is 190cqw tall; 100% is the portrait's
   own height, so every language scrolls exactly to its last line). The
   base styles are the portrait at its top. */
.demo-insights .dscreen { background-image: none; background-color: #f7f1e6; }

.n-bar {
  position: absolute;
  top: 13cqw;
  left: 5cqw;
  right: 5cqw;
  display: flex;
  align-items: center;
  gap: 2cqw;
  font: 600 3.9cqw/1 var(--sans);
  z-index: 4;
}

.n-bar svg { width: 4.6cqw; height: 4.6cqw; }

.n-page { position: absolute; inset: 21cqw 0 0; overflow: hidden; }
.n-scroll { padding: 2cqw 6cqw 20cqw; }

.n-title { margin: 0; font: 700 7cqw/1.15 var(--serif); }
.n-meta { margin: 1.4cqw 0 0; font: 500 2.7cqw/1.3 var(--sans); color: #8b8277; }
.n-quote { margin: 4cqw 0 0; padding-left: 3cqw; border-left: 0.9cqw solid #f5c533; font: 400 4.5cqw/1.42 var(--serif); }

.n-sec { display: flex; align-items: center; gap: 1.4cqw; margin: 6cqw 0 2.4cqw; font: 700 3.1cqw/1 var(--sans); color: #5e564c; }
.n-sec svg { width: 3.6cqw; height: 3.6cqw; }

.n-card {
  margin: 0 0 2.6cqw;
  padding: 3.6cqw 4cqw;
  border-radius: 3cqw;
  background: #fffdf8;
  box-shadow: 0 1cqw 2.4cqw -1.4cqw rgba(70, 50, 30, 0.3);
}

.n-card-title { margin: 0; font: 700 3.6cqw/1.3 var(--sans); }
.n-card-body { margin: 1.2cqw 0 0; font: 400 3.2cqw/1.5 var(--sans); color: #4a453c; }
.n-chips { display: flex; flex-wrap: wrap; gap: 1.4cqw; margin: 2.2cqw 0 0; }

.n-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.8cqw;
  max-width: 100%;
  padding: 0.9cqw 2cqw;
  border-radius: 9cqw;
  background: rgba(43, 38, 33, 0.06);
  font: 500 2.5cqw/1.2 var(--sans);
  color: #6f665c;
  white-space: nowrap;
}

.n-chip svg { flex: none; width: 2.6cqw; height: 2.6cqw; }
.n-chip span { overflow: hidden; text-overflow: ellipsis; }

.n-rhythm { padding: 3.6cqw 4cqw 2.2cqw; border-radius: 3cqw; background: #efe4cf; }
.n-rhythm p { margin: 0 0 1.4cqw; font: 400 3.2cqw/1.4 var(--sans); }

/* Reading: Peloo thinking, one step of the reading at a time. */
.n-load {
  position: absolute;
  inset: 21cqw 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-bottom: 20cqw;
  background: #f7f1e6;
  z-index: 3;
  opacity: 0;
}

.n-face { position: relative; width: 22cqw; }
.n-face img { width: 100%; }

.n-face i {
  position: absolute;
  border: 0.5cqw solid #2b2621;
  border-radius: 50%;
  background: #fffdf8;
}

.n-face i:nth-of-type(1) { right: -4cqw; top: 1cqw; width: 2.2cqw; height: 2.2cqw; }
.n-face i:nth-of-type(2) { right: -9cqw; top: -4cqw; width: 3.2cqw; height: 3.2cqw; }
.n-face i:nth-of-type(3) { right: -16cqw; top: -11cqw; width: 5cqw; height: 5cqw; }

.n-reading { margin: 6cqw 0 0; font: 700 3.9cqw/1.3 var(--sans); }
.n-steps { display: grid; margin: 2cqw 0 0; font: 400 3cqw/1.3 var(--sans); color: #8b8277; text-align: center; }
.n-steps span { grid-area: 1 / 1; opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .demo-insights * { animation-duration: 13s; animation-iteration-count: infinite; }

  .n-load { animation-name: n-load; }
  .demo-insights .n-face img { animation: n-bob 1.4s ease-in-out infinite alternate; }
  .demo-insights .n-face i { animation: n-dot 1.2s ease-in-out infinite; }
  .demo-insights .n-face i:nth-of-type(2) { animation-delay: 0.2s; }
  .demo-insights .n-face i:nth-of-type(3) { animation-delay: 0.4s; }
  .n-s1 { animation-name: n-s1; }
  .n-s2 { animation-name: n-s2; }
  .n-s3 { animation-name: n-s3; }
  .n-scroll { animation-name: n-scroll; }
}

@keyframes n-load { 0%, 26% { opacity: 1; } 30%, 95% { opacity: 0; } 99%, 100% { opacity: 1; } }
@keyframes n-bob { to { transform: translateY(-1.6cqw) rotate(-3deg); } }
@keyframes n-dot { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }

@keyframes n-s1 { 0%, 9% { opacity: 1; } 10%, 100% { opacity: 0; } }
@keyframes n-s2 { 0%, 9% { opacity: 0; } 10%, 18% { opacity: 1; } 19%, 100% { opacity: 0; } }
@keyframes n-s3 { 0%, 18% { opacity: 0; } 19%, 28% { opacity: 1; } 29%, 100% { opacity: 0; } }

@keyframes n-scroll {
  0%, 28% { opacity: 0; transform: translateY(6cqw); }
  34%, 44% { opacity: 1; transform: none; }
  76%, 92% { opacity: 1; transform: translateY(calc(190cqw - 100%)); }
  96%, 100% { opacity: 0; transform: translateY(calc(190cqw - 100%)); }
}
