/* listl. Copyright © 2026 listl. All rights reserved. */

/* Fredoka (SIL Open Font License, see assets/fonts/Fredoka-OFL.txt): the app icon's font. */
@font-face {
  font-family: "Fredoka";
  src: url("assets/fonts/Fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

/* The app's colours: the icon's aurora (pastels for backgrounds only) and deeper shades for text. */
:root {
  --violet: #b18eff;
  --periwinkle: #b8bafc;
  --sky: #86affd;
  --mint: #7bd7ce;
  --accent: #754ecc;
  --on-accent: #ffffff;
  --savings: #12786e;
  /* iOS's label / secondary label, grouped background and its cards, as in the app. */
  --ink: #000000;
  --ink-soft: rgba(60, 60, 67, 0.7);
  --wordmark: #3c295c;
  --page: #f2f2f7;
  --card: #ffffff;
  --line: rgba(60, 60, 67, 0.12);
  /* The aurora's strength: 0.55 in light mode, 0.35 in dark (AuroraBackground). */
  --aurora-opacity: 0.55;
  --radius: 22px;
  --max: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #b999ff;
    --on-accent: #3c295c;
    --savings: #7bd7ce;
    --ink: #ffffff;
    --ink-soft: rgba(235, 235, 245, 0.7);
    --wordmark: #dbc7ff;
    --page: #000000;
    --card: #1c1c1e;
    --line: rgba(84, 84, 88, 0.6);
    --aurora-opacity: 0.35;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--page);
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 10px;
}
.skip:focus { left: 8px; z-index: 10; }

/* Fredoka is used sparingly, as in the app: the wordmark, headings and money figures. */
.fredoka, h1, h2, h3 { font-family: "Fredoka", -apple-system, sans-serif; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.4em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.35rem; font-weight: 600; }

/* The "li$tl" wordmark, with the icon's soft violet glow. */
.wordmark {
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  color: var(--wordmark);
  text-decoration: none;
  text-shadow: 0 0.08em 0.18em rgba(177, 142, 255, 0.45);
  letter-spacing: -0.01em;
}

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px); background: color-mix(in srgb, var(--page) 72%, transparent);
  border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.site-header .wordmark { font-size: 1.9rem; display: inline-flex; align-items: center; gap: 10px; }
.site-header .wordmark img { width: 34px; height: 34px; border-radius: 8px; }
.site-header nav { display: flex; gap: 22px; }
.site-header nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-header nav a:hover { color: var(--accent); }

/* Stories (owner request 13 Nov 2026): fun walk-throughs of listl, kept apart from the main links as
   a little aurora pill beside the wordmark, with a storybook icon whose sparkle twinkles. */
.site-header .wordmark + .stories { margin-left: 18px; margin-right: auto; }
/* Not one of the page's question cards (details elsewhere on the site). */
details.stories { position: relative; background: none; box-shadow: none; padding: 0; margin: 0; border-radius: 999px; }
.stories .stories-menu p { margin: 6px 10px; }
.site-header nav a { white-space: nowrap; }
.stories summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px 6px 10px; border-radius: 999px; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 0.95rem;
  color: var(--wordmark); background: linear-gradient(90deg, color-mix(in srgb, var(--violet) 45%, var(--card)),
    color-mix(in srgb, var(--sky) 40%, var(--card)), color-mix(in srgb, var(--mint) 45%, var(--card)));
  box-shadow: var(--edge), var(--lift-1); transition: transform 0.2s; }
.stories summary::-webkit-details-marker { display: none; }
.stories summary:hover { transform: translateY(-1px) rotate(-2deg); }
.stories-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; overflow: visible; }
.stories-icon .spark { fill: var(--accent); stroke: none; transform-origin: 19.5px 4px; }
.stories-menu { position: absolute; top: calc(100% + 10px); left: 0; z-index: 10; width: min(270px, 100vw - 40px);
  background: var(--card); border-radius: 18px; padding: 8px; box-shadow: var(--edge), var(--lift-3); }
.stories-title { margin: 6px 10px 6px; font-size: 0.78rem; color: var(--ink-soft); }
.story { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; color: var(--ink); text-decoration: none; }
a.story:hover { background: var(--page); }
.story[aria-current="page"] { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.story b { display: block; font-family: "Fredoka", sans-serif; font-weight: 600; }
.story small { display: block; font-size: 0.8rem; color: var(--ink-soft); }
.story-emoji { font-size: 1.6rem; line-height: 1; }
.story.soon { opacity: 0.55; cursor: default; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes twinkle { 0%, 70%, 100% { transform: scale(1); opacity: 1; } 80% { transform: scale(1.6) rotate(20deg); opacity: 0.6; } }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } }
  .stories-icon .spark { animation: twinkle 3s ease-in-out infinite; }
  .stories[open] .stories-menu { animation: menu-in 0.18s ease-out; transform-origin: top left; }
}
@media (max-width: 480px) {
  .site-header .wordmark + .stories { margin-left: 10px; }
  .stories summary { padding: 5px 10px 5px 8px; font-size: 0.85rem; gap: 4px; }
  .stories-icon { width: 16px; height: 16px; }
}

/* The aurora, as in the app (AuroraBackground): the icon's four colours in a 2×2 mesh (violet top
   left, periwinkle top right, sky bottom left, mint bottom right), fading into the page below.
   The mesh is drawn as two side-to-side gradients, the top one fading out downwards. */
.aurora { position: relative; isolation: isolate; }
.aurora::before,
.aurora::after {
  content: "";
  position: absolute; left: 0; right: 0; top: 0;
  height: var(--aurora-height, 620px);
  z-index: -1;
  pointer-events: none;
  opacity: var(--aurora-opacity);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
  mask-image: linear-gradient(to bottom, #000, transparent);
}
.aurora::before { background: linear-gradient(90deg, var(--sky), var(--mint)); }
.aurora::after {
  background: linear-gradient(90deg, var(--violet), var(--periwinkle));
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 65%);
  mask-image: linear-gradient(to bottom, #000, transparent 65%);
}
/* The closing section's aurora rises from the bottom instead. */
.aurora.rise::before, .aurora.rise::after { top: auto; bottom: 0; transform: scaleY(-1); }

/* Hero */
.hero { padding: clamp(56px, 9vw, 110px) 0 clamp(20px, 3vw, 44px); margin-top: -62px; padding-top: calc(62px + clamp(56px, 9vw, 110px)); --aurora-height: 760px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero .wordmark { font-size: clamp(4rem, 11vw, 7rem); display: block; line-height: 1; }
.tagline { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin: 10px 0 18px; line-height: 1.2; }
/* The landing page's tagline always fits on one line: the paragraph is a container and its text is
   sized to its width (the line is about 18em wide in Fredoka SemiBold, so 5.3% leaves a little room). */
.tagline.fits { container-type: inline-size; }
.tagline.fits span { font-size: min(1.9rem, 5.3cqi); }
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 34ch; margin: 0 0 28px; }
.lede.first { margin-bottom: 14px; }

/* Placeholder until the App Store link exists: swap for Apple's official badge then. */
.store-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: 18px;
  background: var(--accent); color: var(--on-accent);
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
}
.store-button svg { width: 22px; height: 22px; fill: currentColor; }
.store-note { display: block; margin-top: 10px; font-size: 0.9rem; color: var(--ink-soft); }

/* Phone placeholders for screenshots. Replace each .shot's contents with an <img> later. */
.phones { display: flex; justify-content: center; align-items: flex-end; gap: 18px; }
.phone {
  width: 210px; aspect-ratio: 1 / 2.03; /* a little shorter than an iPhone, so the status-bar strip stays slim */
  border-radius: 38px; padding: 6px;
  background: #15101f;
  box-shadow: 0 30px 60px -20px rgba(60, 41, 92, 0.45), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  flex: none;
}
.phone.small { width: 180px; transform: translateY(-24px); }
@media (prefers-color-scheme: dark) { .shot { color: #dbc7ff; } .shot span { background: rgba(0, 0, 0, 0.55); } }
.shot {
  height: 100%; border-radius: 32px; overflow: hidden;
  display: grid; place-items: center; text-align: center;
  padding: 18px; color: #3c295c; font-weight: 600; font-size: 0.95rem;
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--page) 45%, transparent) 0%, var(--page) 70%),
    linear-gradient(90deg, var(--violet), var(--periwinkle)) top / 100% 50% no-repeat,
    linear-gradient(90deg, var(--sky), var(--mint)) bottom / 100% 50% no-repeat;
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
/* Screenshots are light mode. iPhone ones have their status bar cropped off: each sits under a slim strip with a small
   Dynamic Island, which overlaps the screenshot's empty top band between its buttons, so the app starts just under the
   island (owner request 18 Nov 2026: the gap looked too high). The strip is the screenshot itself (`--shot-src`, the
   same file as the <img>), stretched so only its top row shows, so it always matches the image, gradients included
   (19 Nov 2026: hand-picked strip colours went stale when the screenshots were replaced). */
.phone:has(.shot.photo) { aspect-ratio: auto; }
.shot.photo {
  height: auto; padding: 4% 0 0; position: relative; display: block;
  background: var(--shot-src, none) center top / 100% 2000% no-repeat, #f3f2f8; /* the image's own top row */
}
.shot.photo img { height: auto; object-fit: initial; }
.shot.photo::before {
  content: ""; position: absolute; top: 0; margin-top: 2.5%; left: 50%; transform: translateX(-50%);
  width: 20%; aspect-ratio: 10 / 3; border-radius: 999px; background: #000; z-index: 1;
}
/* iPad and iPhone Duo screenshots keep their own status bar, and those screens have no island. */
.shot.photo.whole { padding: 0; }
.shot.photo.whole::before { content: none; }

/* Device switcher (iPhone, iPad, iPhone Duo): radio buttons, so it works without scripts. Each device is drawn at
   its own shape and a size relative to the others. */
/* The three devices share one spot and cross-fade (owner request 18 Nov 2026); the spot is as tall as the tallest,
   so switching doesn't move the page. */
.devices { position: relative; display: grid; justify-items: center; row-gap: 22px; min-width: 0; }
.devices > .phones {
  grid-area: 1 / 1; align-self: center; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 0.45s ease, visibility 0s linear 0.45s;
}
#device-iphone:checked ~ .device-iphone,
#device-ipad:checked ~ .device-ipad,
#device-duo:checked ~ .device-duo { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 0.45s ease; }
@media (prefers-reduced-motion: reduce) {
  .devices > .phones, .device-duo .duo, .device-duo .duo-half, .duo-leaf { transition: none !important; }
}
.device-switch {
  grid-row: 2; display: inline-flex; padding: 2px; gap: 2px; border-radius: 999px;
  background: color-mix(in srgb, var(--card) 80%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent);
}
.device-switch label {
  display: grid; place-items: center; width: 34px; height: 28px; border-radius: 999px; cursor: pointer;
  color: var(--ink-soft);
}
.device-switch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.device-switch svg .dot { fill: currentColor; stroke: none; }
#device-iphone:checked ~ .device-switch [for="device-iphone"],
#device-ipad:checked ~ .device-switch [for="device-ipad"],
#device-duo:checked ~ .device-switch [for="device-duo"] { background: var(--accent); color: var(--on-accent); }
#device-iphone:focus-visible ~ .device-switch [for="device-iphone"],
#device-ipad:focus-visible ~ .device-switch [for="device-ipad"],
#device-duo:focus-visible ~ .device-switch [for="device-duo"] { outline: 2px solid var(--accent); outline-offset: 2px; }
.phone.ipad { width: 330px; max-width: 100%; border-radius: 24px; padding: 7px; }
.phone.ipad .shot { border-radius: 17px; }
/* iPhone Duo, closed: its small outer screen, with the hinge along the left edge. */
.phone.duo { width: var(--duo, 220px); border-radius: 34px; padding: 6px 6px 6px 10px; position: relative; }
.phone.duo .shot { border-radius: 28px; }
/* Tap the closed iPhone Duo to open it half way (a checkbox, so no script; owner request 18 Nov 2026): the inner
   screen in two leaves either side of the hinge, the left one angled towards you like a book half open. Each leaf
   shows its half of the same screenshot. Tap again to close. */
.phone.duo, .duo-half { cursor: pointer; }
.phone.duo { display: block; }
.shot.photo.whole { display: block; }
.device-duo { max-width: 100%; }
/* Closed and half open share one spot and cross over both ways (no display switching, which snapped and left
   a trace of the open screen behind): opening, the outer screen fades as the left leaf swings out; closing, the
   leaf folds back first, then the outer screen eases in. Hidden states use visibility: inherit when shown, so
   nothing shows while another device is picked. */
.phones.device-duo { display: grid; place-items: center; }
.device-duo > label { grid-area: 1 / 1; }
/* No fading on the half-open view itself: opacity there would flatten the leaf's 3D turn mid-way, so it popped.
   Each leaf fades on its own instead, and the left one swings from edge-on (90°) to its half-open angle. */
/* The closed Duo sits where the half-open one's right leaf is, and both slide together by half a leaf as it opens
   (the left leaf swinging out) or closes, so the device glides rather than jumps (owner request 18 Nov 2026). */
.device-duo .duo { left: 0; transition: opacity 0.4s ease 0.3s, left 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.device-duo .duo-half {
  display: flex; position: relative; left: calc(var(--leaf) / -2); visibility: hidden; pointer-events: none;
  transition: visibility 0s linear 0.7s, left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
#duo-open:checked ~ .duo {
  opacity: 0; visibility: hidden; pointer-events: none; left: calc(var(--leaf) / 2);
  transition: opacity 0.3s ease, visibility 0s linear 0.3s, left 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
#duo-open:checked ~ .duo-half {
  visibility: inherit; pointer-events: inherit; left: 0; transition: left 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
#duo-open:focus-visible ~ label { outline: 2px solid var(--accent); outline-offset: 4px; }
/* Each leaf is as tall as the closed outer screen, with the same bezel, so the Duo keeps its size as it opens:
   the closed screen is 1398 × 2034 and each half of the inner one 781.5 × 1100. */
.device-duo { --duo: 220px; --leaf: calc((var(--duo) - 16px) * 1.03366 + 7px); }
.duo-half { perspective: 1100px; max-width: 100%; }
.duo-leaf {
  display: block; width: var(--leaf); padding: 6px; position: relative; opacity: 0;
  background: linear-gradient(145deg, #3a3150, #120d1c 40%, #08060d);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), 0 30px 50px -18px rgba(60, 41, 92, 0.55);
}
.duo-leaf.right { transition: opacity 0.3s ease 0.3s; }
.duo-leaf.left {
  border-radius: 34px 0 0 34px; padding-right: 1px; transform-origin: right center; transform: rotateY(90deg);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.6, 1), opacity 0.2s ease 0.2s;
}
#duo-open:checked ~ .duo-half .duo-leaf { opacity: 1; }
#duo-open:checked ~ .duo-half .duo-leaf.right { transition: opacity 0.3s ease; }
#duo-open:checked ~ .duo-half .duo-leaf.left {
  transform: rotateY(38deg);
  transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s, opacity 0.15s ease 0.1s;
}
.duo-leaf.right { border-radius: 0 34px 34px 0; padding-left: 1px; }
.leaf-screen { display: block; overflow: hidden; aspect-ratio: 1563 / 2200; position: relative; background: #f5f4f9; }
.left .leaf-screen { border-radius: 28px 0 0 28px; }
.right .leaf-screen { border-radius: 0 28px 28px 0; }
.leaf-screen img { position: absolute; top: 0; height: 100%; width: 200%; max-width: none; }
.left .leaf-screen img { left: 0; }
.right .leaf-screen img { left: -100%; }
/* The angled leaf catches a little shade, so the fold reads. */
.duo-leaf.left .leaf-screen::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.12));
}
/* The outer screen's hole-punch camera, above the status column on the right. Placed exactly over the camera the
   simulator draws into captures (centre 89.7% across and 7.03% down, 7.9% wide, of 1398 × 2034), so only one shows
   (19 Nov 2026: a smaller dot higher up showed two). Measure again if the capture's device changes. */
.phone.duo .shot::after {
  content: ""; position: absolute; left: 89.7%; top: 7.03%; transform: translate(-50%, -50%);
  width: 8.2%; aspect-ratio: 1; border-radius: 50%; background: #000; z-index: 1;
}
.phone.duo::before {
  content: ""; position: absolute; left: 3px; top: 18%; bottom: 18%; width: 3px; border-radius: 3px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.05), rgba(255,255,255,0.22), rgba(255,255,255,0.05));
}

/* A screenshot cropped wider than the screen: shown whole, centred, so nothing is cut off. */
.shot.photo.fit { display: flex; align-items: center; }
.shot.photo.fit img { height: auto; object-fit: contain; }
.shot span { background: rgba(255, 255, 255, 0.7); padding: 6px 12px; border-radius: 999px; }

/* Sections */
section { padding: clamp(56px, 8vw, 96px) 0; }
.section-intro { max-width: 44rem; margin-bottom: 36px; }
.section-intro p { color: var(--ink-soft); font-size: 1.15rem; margin: 0; }
.eyebrow, .section-intro .eyebrow { font-family: "Fredoka", sans-serif; font-weight: 600; color: var(--accent);
  text-transform: none; font-size: 1.05rem; margin: 0 0 6px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.card {
  background: color-mix(in srgb, var(--card) 85%, transparent);
  border-radius: var(--radius);
  padding: 24px;
}
.card p { margin: 0; color: var(--ink-soft); }
/* Reason and step tiles: the circle with the title beside it, the words underneath across the tile. */
.grid .card, .steps .step:not(.finale) {
  display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: center; align-content: start;
}
.grid .card h3, .steps .step h3 { margin: 0; }
.grid .card p, .steps .step p { grid-column: 1 / -1; margin-top: 14px; }
.icon {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); flex-shrink: 0;
  font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.4rem;
}
.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round; }

/* How it works */
.steps { counter-reset: step; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
/* One tile per row on phones: more room between them, so each step reads on its own (owner request 18 Nov 2026). */
@media (max-width: 560px) { .steps { gap: 30px; } }
.step::before {
  counter-increment: step; content: counter(step);
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  font-family: "Fredoka", sans-serif; font-weight: 700;
}

/* The example price card, like the product page's top card in the app. */
.example { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.price-card { background: var(--card); border-radius: var(--radius);
  padding: 26px; box-shadow: 0 20px 50px -30px rgba(60, 41, 92, 0.45); }
.price-card .label { color: var(--savings); font-weight: 600; margin: 0; }
.price-card .price { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 3rem;
  color: var(--savings); margin: 0; line-height: 1.1; white-space: nowrap; }
.badge { display: inline-block; font-family: "Fredoka", sans-serif; font-weight: 600;
  background: #12786e; color: #fff; padding: 4px 12px; border-radius: 999px; margin: 6px 0 10px; }
.price-card .where { color: var(--ink-soft); margin: 0 0 16px; }
.breakdown { list-style: none; padding: 16px 0 0; margin: 0; border-top: 1px solid var(--line); }
.breakdown li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; color: var(--ink-soft); }
.breakdown li strong { color: var(--ink); font-weight: 600; }
.breakdown .save { color: var(--savings); }
.fine { font-size: 0.85rem; color: var(--ink-soft); margin-top: 14px; }

/* Pro */
.pro { border-radius: calc(var(--radius) + 8px); padding: clamp(28px, 5vw, 52px); }
/* The Pro card carries the aurora inside it, like the app's Pro explainer. */
.pro.aurora { overflow: hidden; --aurora-height: 100%; }
/* Its aurora leads with mint (owner request 13 Nov 2026): mint top left into sky, over mint into periwinkle. */
.pro.aurora::after { background: linear-gradient(90deg, var(--mint), var(--sky)); }
.pro.aurora::before { background: linear-gradient(90deg, var(--mint), var(--periwinkle)); }
.pro ul { padding-left: 1.2em; margin: 0 0 18px; }
.pro li { margin: 6px 0; }
.pill { display: inline-block; background: var(--accent); color: var(--on-accent); border-radius: 999px;
  padding: 3px 12px; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 0.95rem; }

/* Free and Pro side by side, grouped under Pro's three promises (owner request 16 Nov 2026). */
.compare-wrap { margin: 22px 0 6px; background: color-mix(in srgb, var(--card) 85%, transparent);
  border-radius: var(--radius); padding: 6px clamp(12px, 3vw, 22px) 12px; }
.compare { width: 100%; border-collapse: collapse; }
.compare th, .compare td { padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.compare thead th { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.05rem; text-align: center;
  width: 1%; white-space: nowrap; border-bottom: none; padding: 12px 0 0 14px; }
.compare thead th.pro-col { color: var(--accent); }
.compare thead th:first-child { width: auto; padding-left: 0; }
.compare tbody th[scope="row"] { text-align: left; font-weight: 500; padding-right: 10px;
  padding-left: 28px; text-indent: -28px; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: none; }
.compare .group th { padding: 18px 0 6px; color: var(--ink-soft); font-weight: 400; text-align: left; }
.compare .group span { display: block; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.15rem;
  color: var(--ink); }
.compare td { text-align: center; padding-left: 14px; }
.compare .glyph { width: 18px; height: 18px; margin-right: 10px; vertical-align: -3px; fill: none; stroke: var(--accent);
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.compare .group-head { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; }
.compare .group-head small { font-size: 0.95rem; color: var(--ink-soft); }
.compare .group-icon { grid-row: span 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent); }
.compare .group-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--on-accent); stroke-width: 2.4;
  stroke-linecap: round; stroke-linejoin: round; }
/* A ticked shopping-list box for what's included (not buttons; listl is a shopping list). */
.compare .tick { display: inline-grid; place-items: center; width: 1.3em; height: 1.3em; border-radius: 5px;
  font-size: 0.8rem; font-weight: 800; color: var(--card); background: var(--savings); }
.compare .no { color: var(--ink-soft); }
/* Coming to Pro, set apart from the table above it. */
.compare-wrap.coming { margin-top: 34px; }
.compare .some { color: var(--ink-soft); font-size: 0.85rem; white-space: nowrap; }
.compare .planned { color: var(--ink-soft); font-size: 0.85rem; white-space: nowrap; }
@media (max-width: 480px) { .pro { padding: 24px 16px; } }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Mini mocks of the app's screens under each step (owner request 16 Nov 2026). */
.steps .step:not(.finale) { grid-template-rows: auto auto 1fr; }
/* The mock fills the rest of the card, its contents centred, so shorter steps have no empty band. */
.steps .step .stepmock { grid-column: 1 / -1; align-self: stretch; display: flex; flex-direction: column;
  justify-content: center; margin-top: 16px; padding: 14px; border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--violet) 18%, var(--card)), color-mix(in srgb, var(--mint) 16%, var(--card))); }
/* Step 1: a phone browser on the shop's page, with the share sheet rising over it. */
.steps .step .stepmock.browser { padding: 0; overflow: hidden; justify-content: space-between; gap: 10px;
  background: var(--card); border: 1px solid var(--line); }
.bm-bar { padding: 8px 10px 0; }
.bm-bar span { display: block; text-align: center; font-size: 0.72rem; color: var(--ink-soft); padding: 5px 8px;
  border-radius: 999px; background: color-mix(in srgb, var(--ink-soft) 12%, var(--card)); }
.bm-page { display: flex; gap: 10px; align-items: center; padding: 0 12px; }
.bm-img { width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; font-size: 1.6rem;
  background: color-mix(in srgb, var(--ink-soft) 10%, var(--card)); flex-shrink: 0; }
.bm-page b { display: block; font-size: 0.88rem; }
.bm-page strong { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.15rem; }
.bm-sheet { padding: 6px 10px 12px; border-radius: 16px 16px 0 0;
  background: color-mix(in srgb, var(--violet) 14%, var(--card)); box-shadow: 0 -8px 20px -14px rgba(60, 41, 92, 0.6); }
.bm-grabber { display: block; width: 32px; height: 4px; border-radius: 2px; margin: 0 auto 8px;
  background: color-mix(in srgb, var(--ink-soft) 40%, transparent); }
.share-row { display: flex; justify-content: space-between; gap: 6px; }
.share-app { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-size: 0.72rem; color: var(--ink-soft); white-space: nowrap; }
/* The tiles shrink to fit the card (four side by side on wide screens), never past it. */
.share-app .tile, .share-app img { width: 100%; max-width: 44px; aspect-ratio: 1; height: auto; border-radius: 24%;
  display: grid; place-items: center; font-style: normal; font-size: 1.1rem; }
.share-app .green { background: #34c759; } .share-app .blue { background: #2f8cff; }
.share-app .grey { background: color-mix(in srgb, var(--ink-soft) 25%, var(--card)); color: var(--ink); font-size: 0.8rem; font-weight: 700; }
.share-app.picked { color: var(--accent); font-weight: 700; }
.share-app.picked img { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--accent); }
.steps .step .stepmock-title { margin: 0 0 8px; font-size: 1rem; font-family: "Fredoka", sans-serif; font-weight: 600; color: var(--ink); }
.stepmock-lists { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.stepmock-lists li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px;
  background: var(--card); font-weight: 500; font-size: 0.85rem; white-space: nowrap; }
.stepmock-lists li b { margin-left: auto; font-family: "Fredoka", sans-serif; font-weight: 600; }
.stepmock-lists li.on { box-shadow: 0 0 0 2px var(--accent); }
.stepmock-notif { display: flex; gap: 10px; align-items: center; padding: 9px 11px; border-radius: 14px; background: var(--card);
  box-shadow: 0 6px 18px -10px rgba(60, 41, 92, 0.5); font-size: 0.8rem; }
.stepmock-notif img { width: 28px; height: 28px; border-radius: 7px; }
.stepmock-notif b { display: block; } .stepmock-notif span { color: var(--ink-soft); }
.stepmock-price { margin-top: 10px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.stepmock-price small { width: 100%; color: var(--savings); font-weight: 600; }
.stepmock-price strong { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.7rem; color: var(--savings); line-height: 1; }
.stepmock-price em { font-style: normal; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 0.85rem; color: #fff;
  background: #12786e; padding: 3px 10px; border-radius: 999px; }
.steps .step.finale.party { position: relative; overflow: hidden; min-height: 120px; }
.steps .step.finale.party > * { position: relative; }
.steps .step.finale.party .confetti-dots { position: absolute; inset: 0; pointer-events: none; opacity: 0.9;
  background:
    radial-gradient(circle, #ffd166 0 3px, transparent 3.5px) 12% 24% / 8px 8px no-repeat,
    radial-gradient(circle, #7bd7ce 0 3px, transparent 3.5px) 22% 78% / 8px 8px no-repeat,
    radial-gradient(circle, #ff8fab 0 3px, transparent 3.5px) 40% 14% / 8px 8px no-repeat,
    radial-gradient(circle, #ffd166 0 2.5px, transparent 3px) 58% 86% / 7px 7px no-repeat,
    radial-gradient(circle, #b9f3e4 0 3px, transparent 3.5px) 76% 20% / 8px 8px no-repeat,
    radial-gradient(circle, #ff8fab 0 2.5px, transparent 3px) 88% 70% / 7px 7px no-repeat,
    radial-gradient(circle, #fff 0 2px, transparent 2.5px) 6% 60% / 6px 6px no-repeat,
    radial-gradient(circle, #fff 0 2px, transparent 2.5px) 94% 40% / 6px 6px no-repeat; }

/* Under the steps: privacy in one line. */
.privacy-line { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 26px 0 0;
  color: var(--ink-soft); text-align: center; }
.privacy-line svg { width: 36px; height: 36px; flex-shrink: 0; fill: none; stroke: var(--accent); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
/* On a phone the line wraps: the shield sits beside both lines, the words aligned to it. */
@media (max-width: 560px) { .privacy-line { justify-content: flex-start; text-align: left; gap: 14px; }
  .privacy-line svg { width: 48px; height: 48px; stroke-width: 1.8; } }

/* The "Pro" badge on a card whose feature needs Pro Mode, like the app's (sparkles, violet capsule). */
.pro-badge { font-size: 0.8rem; padding: 2px 10px; margin-left: 6px; vertical-align: middle;
  display: inline-flex; align-items: center; gap: 4px; }
.pro-badge svg { width: 12px; height: 12px; fill: currentColor; }

/* Closing call to action */
.cta { text-align: center; }
.cta .wordmark { font-size: clamp(3rem, 8vw, 4.5rem); display: inline-block; margin: 0; line-height: 1.1; }
.cta .tagline { margin-top: 4px; }

/* Plain text pages: privacy and support */
.page { padding: clamp(40px, 7vw, 80px) 0; --aurora-height: 420px; }
.page .wrap { max-width: 46rem; }
.page h1 { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 600; }
.page h2 { font-size: 1.5rem; margin-top: 1.8em; }
.page .updated { color: var(--ink-soft); margin-top: 0; }
details { background: var(--card); border-radius: 16px; padding: 14px 18px; margin: 10px 0; }
summary { cursor: pointer; font-weight: 600; }
details p { margin: 10px 0 2px; color: var(--ink-soft); }
.contact { font-family: "Fredoka", sans-serif; font-size: 1.4rem; font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 44px; color: var(--ink-soft); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--ink-soft); }

/* Narrow screens */
@media (max-width: 820px) {
  .hero .wrap, .example { grid-template-columns: 1fr; }
  .hero { text-align: center; }
  .lede { margin-inline: auto; }
  .phone { width: 170px; }
  .phone.small { width: 140px; }
  .phone.ipad { width: 300px; }
  .device-duo { --duo: 190px; }
}
@media (max-width: 480px) {
  .phone.small { display: none; }
  .site-header nav { gap: 14px; font-size: 0.95rem; }
}

/* ───────────────────────── Depth ─────────────────────────
   A little more 3D (owner request 12 Nov 2026): layered shadows tinted with the aurora's violet,
   a light top edge on every surface (like the app's glass), spheres for icons, raised buttons, an
   extruded wordmark, and phones and the price card tilted in perspective. Motion is gentle and
   stops with Reduce Motion. */
:root {
  --edge: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  --lift-1: 0 1px 2px rgba(60, 41, 92, 0.06), 0 4px 10px rgba(60, 41, 92, 0.06);
  --lift-2: 0 2px 4px rgba(60, 41, 92, 0.06), 0 12px 24px -6px rgba(60, 41, 92, 0.14), 0 30px 60px -20px rgba(117, 78, 204, 0.22);
  --lift-3: 0 4px 8px rgba(60, 41, 92, 0.08), 0 24px 48px -12px rgba(60, 41, 92, 0.22), 0 60px 100px -30px rgba(117, 78, 204, 0.35);
  --extrude: #a98be6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --edge: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    --lift-1: 0 1px 2px rgba(0, 0, 0, 0.5), 0 4px 10px rgba(0, 0, 0, 0.35);
    --lift-2: 0 2px 4px rgba(0, 0, 0, 0.5), 0 12px 24px -6px rgba(0, 0, 0, 0.55), 0 30px 60px -20px rgba(117, 78, 204, 0.3);
    --lift-3: 0 4px 8px rgba(0, 0, 0, 0.5), 0 24px 48px -12px rgba(0, 0, 0, 0.6), 0 60px 100px -30px rgba(117, 78, 204, 0.4);
    --extrude: #5b3fa6;
  }
}

/* Surfaces: lit from above, resting on the page. */
.card, details, .price-card {
  background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 60%),
    color-mix(in srgb, var(--card) 88%, transparent);
  box-shadow: var(--edge), var(--lift-2);
}
@media (prefers-color-scheme: dark) {
  .card, details, .price-card {
    background:
      linear-gradient(to bottom, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 60%),
      color-mix(in srgb, var(--card) 92%, transparent);
  }
}
.grid .card, .steps .card {
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.35s;
}
.grid .card:hover, .steps .card:hover {
  transform: translateY(-6px);
  box-shadow: var(--edge), var(--lift-3);
}
details { box-shadow: var(--edge), var(--lift-1); }

/* The Pro card: frosted glass over its aurora. */
.pro.card { box-shadow: var(--edge), var(--lift-3); }

/* Icons and step numbers: little violet spheres. */
.icon, .step::before {
  background: radial-gradient(circle at 32% 28%, #a98bf0 0%, var(--accent) 55%, #5a37ad 100%);
  box-shadow: inset 0 -3px 6px rgba(40, 20, 90, 0.35), inset 0 2px 3px rgba(255, 255, 255, 0.45),
              0 6px 14px -4px rgba(117, 78, 204, 0.55);
  color: #fff;
}
@media (prefers-color-scheme: dark) {
  .icon, .step::before {
    background: radial-gradient(circle at 32% 28%, #e2d4ff 0%, var(--accent) 55%, #7c5bd6 100%);
    color: #3c295c;
  }
}

/* The last step, "Buy with a tap!": listl purple, its words centred so it reads almost like a raised
   button (the same edges as .store-button), its number a light sphere. */
.steps .step.finale {
  background: var(--accent);
  color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; gap: 14px; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -3px 0 rgba(0, 0, 0, 0.15),
              0 2px 3px rgba(60, 41, 92, 0.2), 0 14px 30px -10px rgba(117, 78, 204, 0.6);
}
.steps .step.finale h3 { color: var(--on-accent); font-size: 1.6rem; margin: 0; }
.steps .step.finale::before { background: var(--on-accent); color: var(--accent); box-shadow: none; }

/* Raised buttons and pills that press in. */
.store-button, .pill, .badge {
  background: linear-gradient(to bottom, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent) 55%,
              color-mix(in srgb, var(--accent) 85%, #000));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 0 rgba(0, 0, 0, 0.15),
              0 2px 3px rgba(60, 41, 92, 0.2), 0 10px 22px -8px rgba(117, 78, 204, 0.6);
}
.badge {
  background: linear-gradient(to bottom, #2a9b8f, #12786e 60%, #0d5f57);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 6px 14px -6px rgba(18, 120, 110, 0.6);
}
.store-button { transition: transform 0.2s, box-shadow 0.2s; }
.store-button:hover { transform: translateY(-2px); }
.store-button:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2); }

/* The wordmark, extruded like the letters in the icon, with its violet glow. */
.hero .wordmark, .cta .wordmark {
  text-shadow:
    0 1px 0 var(--extrude), 0 2px 0 var(--extrude), 0 3px 0 var(--extrude), 0 4px 0 var(--extrude),
    0 5px 0 var(--extrude), 0 6px 0 var(--extrude),
    0 10px 12px rgba(60, 41, 92, 0.25), 0 18px 40px rgba(177, 142, 255, 0.55);
}

/* Phones in perspective: the side ones turned in, all floating slightly. */
.phones { perspective: 1400px; transform-style: preserve-3d; }
.phone {
  background: linear-gradient(145deg, #3a3150, #120d1c 40%, #08060d);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), inset 0 2px 1px rgba(255, 255, 255, 0.18),
    0 2px 4px rgba(0, 0, 0, 0.2), 0 30px 50px -18px rgba(60, 41, 92, 0.55), 0 70px 90px -40px rgba(117, 78, 204, 0.5);
}
.shot { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.phone.small:first-child { transform: translateY(-24px) translateZ(-60px) rotateY(22deg); }
.phone.small:last-child { transform: translateY(-24px) translateZ(-60px) rotateY(-22deg); }
.phone.ipad, .phone.duo { transform: rotateX(4deg); }
.phone:not(.small) { transform: translateZ(20px) rotateX(4deg); }

/* The example price card, tilted towards the reader. */
.example { perspective: 1600px; }
.price-card {
  transform: rotateY(-10deg) rotateX(5deg);
  box-shadow: var(--edge), var(--lift-3);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.price-card:hover { transform: rotateY(-4deg) rotateX(2deg) translateY(-4px); }

@media (prefers-reduced-motion: no-preference) {
  @keyframes float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -10px; }
  }
  .phone { animation: float 7s ease-in-out infinite; }
  .device-duo .duo-half { animation: float 7s ease-in-out infinite; }
  .phone.small:first-child { animation-delay: -2.3s; }
  .phone.small:last-child { animation-delay: -4.6s; }
}
@media (prefers-reduced-motion: reduce) {
  .grid .card:hover, .steps .card:hover, .store-button:hover { transform: none; }
  .price-card, .price-card:hover { transition: none; }
}

/* Narrow screens: less tilt, so nothing feels off-balance on a phone. */
@media (max-width: 820px) {
  .phone.small:first-child { transform: translateY(-16px) rotateY(16deg); }
  .phone.small:last-child { transform: translateY(-16px) rotateY(-16deg); }
  .price-card, .price-card:hover { transform: rotateX(4deg); }
}

/* ───────────────────────── The Quest (quest.html) ─────────────────────────
   A storybook telling of a real use of listl (owner request 13 Nov 2026): epic-fantasy flavour in the
   site's own look, with parchment for the story bits and app-like mock screens. Talysa is drawn in
   SVG in quest.html. */
:root { --parch: #fbf3e1; --parch-edge: #e6d3a8; --parch-ink: #5a4325; }
@media (prefers-color-scheme: dark) { :root { --parch: #2b2419; --parch-edge: #54432a; --parch-ink: #ecdcb8; } }

.quest-hero { padding: clamp(40px, 7vw, 80px) 0 clamp(24px, 4vw, 40px); --aurora-height: 640px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.quest-hero h1 { font-size: clamp(3rem, 9vw, 5.5rem); font-weight: 700; color: var(--wordmark); margin: 0;
  text-shadow: 0 1px 0 var(--extrude), 0 2px 0 var(--extrude), 0 3px 0 var(--extrude), 0 4px 0 var(--extrude),
    0 10px 12px rgba(60, 41, 92, 0.25), 0 18px 40px rgba(177, 142, 255, 0.55); }
.quest-hero .tagline { margin: 14px 0 4px; }
.quest-sub { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.3rem; color: var(--ink-soft); margin: 0; }
.names-changed { font-size: 0.9rem; color: var(--ink-soft); margin: 18px 0 0; }
.scroll-hint { font-family: "Fredoka", sans-serif; color: var(--accent); margin-top: 28px; font-weight: 600; }
/* A small chevron centred under the hint that gently nudges downwards, so it's clear to scroll (it stays still with Reduce Motion). */
.scroll-hint { display: inline-block; text-align: center; }
.scroll-arrow { display: block; width: 12px; height: 12px; margin: 8px auto 0;
  border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); opacity: 0.8; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes scroll-nudge { 0%, 100% { translate: 0 0; opacity: 0.45; } 50% { translate: 0 7px; opacity: 1; } }
  .scroll-hint .scroll-arrow { animation: scroll-nudge 1.8s ease-in-out infinite; }
}
.hero-scene { position: relative; height: 320px; display: flex; justify-content: center; align-items: flex-end; }
.hero-scene .hill { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 70px; }
.hero-scene .hill path { fill: color-mix(in srgb, var(--mint) 55%, transparent); }
.hero-scene .character { position: relative; width: 170px; margin-bottom: 34px; }

.character { display: block; height: auto; overflow: visible; filter: drop-shadow(0 8px 10px rgba(60, 41, 92, 0.25)); }

/* Chapters: words on one side, the picture on the other, swapping sides as the story goes. */
.chapter { padding: clamp(36px, 6vw, 72px) 0; }
.chapter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.chapter-grid > *, .hero-grid > *, .riddle > * { min-width: 0; }
.chapter-grid.flip .chapter-text { order: 2; }
.chapter-no { font-family: "Fredoka", sans-serif; font-weight: 600; color: var(--accent); margin: 0 0 6px; letter-spacing: 0.04em; }
.chapter-no::before { content: "✦ "; }
.chapter-no::after { content: " ✦"; }
.chapter-text p { color: var(--ink-soft); margin: 0.7em 0; }
.chapter-text p.chapter-no { color: var(--accent); margin: 0 0 6px; }
.chapter-text strong { color: var(--ink); }
.chapter-text .opening { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 1.25rem; color: var(--ink); }
.chapter-text.wide { max-width: 46rem; }
.chapter-text.centred { text-align: center; margin-inline: auto; }
/* The epilogue's lines are longer: room for each on one line on desktop, and balanced lines where they wrap,
   so no word is left on its own. */
.epilogue .chapter-text.centred { max-width: 64rem; }
.chapter-text.centred p { text-wrap: balance; }
.with-character .character.inline { float: right; width: 110px; margin: 0 0 10px 18px; }

figure.art { margin: 0; position: relative; padding-left: 84px; }
figure.art.plain { padding-left: 0; }
figure.art .character.beside { position: absolute; left: -12px; bottom: 30px; width: 112px; z-index: 2; }
/* The prologue: Talysa, bigger and beside herself, while the phone buzzes in bursts. */
figure.art .character.beside.distressed { width: 150px; left: -48px; bottom: 20px; }
.mock-phone.chaos { position: relative; }
.mock-phone.chaos::before, .mock-phone.chaos::after { content: ""; position: absolute; top: 42%; width: 14px; height: 56px;
  border: 3px solid var(--accent); border-radius: 50%; opacity: 0; pointer-events: none; }
.mock-phone.chaos::before { left: -22px; border-right-color: transparent; border-top-color: transparent; border-bottom-color: transparent; }
.mock-phone.chaos::after { right: -22px; border-left-color: transparent; border-top-color: transparent; border-bottom-color: transparent; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes phone-buzz {
    0%, 22%, 100% { transform: none; }
    2%, 10%, 18% { transform: translateX(-3px) rotate(-1.2deg); }
    6%, 14% { transform: translateX(3px) rotate(1.2deg); }
  }
  @keyframes buzz-lines { 0%, 24%, 100% { opacity: 0; } 3%, 19% { opacity: 0.8; } }
  @keyframes tremble { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-1.2px); } 75% { transform: translateX(1.2px); } }
  .mock-phone.chaos { animation: phone-buzz 2.4s ease-in-out infinite; }
  .mock-phone.chaos::before, .mock-phone.chaos::after { animation: buzz-lines 2.4s ease-in-out infinite; }
  figure.art .character.distressed { animation: tremble 0.18s linear infinite; }
  .quest-js .slide:not(.is-active) .mock-phone.chaos, .quest-js .slide:not(.is-active) .mock-phone.chaos::before,
  .quest-js .slide:not(.is-active) .mock-phone.chaos::after, .quest-js .slide:not(.is-active) .character.distressed { animation: none; }
}
figure.art figcaption, .aside { font-family: Georgia, "Times New Roman", serif; font-style: italic; color: var(--ink-soft);
  text-align: center; margin-top: 14px; }
.aside { margin-top: 24px; }

/* Prologue: a phone buried in tabs, ads and pop-ups, which pop in one after another (animated while
   the prologue is on stage; all shown at once with Reduce Motion). Deliberately garish. */
.mock-screen.chaos-screen { position: relative; overflow: hidden; min-height: 480px; padding: 14px 10px; background: #1b1b1f; color: #fff; }
.chaos-bar { display: flex; justify-content: space-between; font-size: 0.8rem; padding: 2px 6px 10px; }
.chaos-bar b { font-variant-numeric: tabular-nums; }
.tab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tab-thumb { background: #fff; color: #111; border-radius: 10px; overflow: hidden; }
.tab-thumb p { margin: 0 !important; font-size: 0.55rem; background: #e5e5ea; padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab-thumb div { height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.tab-thumb span { font-size: 1.35rem; line-height: 1; }
.tab-thumb b { font-family: "Fredoka", sans-serif; font-size: 0.9rem; }
.tab-thumb s { font-size: 0.6rem; color: #8e8e93; }
.tab-thumb em { font-style: normal; font-size: 0.52rem; font-weight: 700; background: #ff2d55; color: #fff; border-radius: 4px; padding: 1px 5px; }
.pop { position: absolute; z-index: 1; }
.pop.notif { top: 6px; left: 6px; right: 6px; display: flex; gap: 8px; align-items: center; background: rgba(245, 245, 247, 0.96);
  color: #111; border-radius: 14px; padding: 8px 10px; font-size: 0.62rem; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.pop.notif span { font-size: 1.2rem; }
.pop.notif p { margin: 0 !important; }
.pop.notif b { display: block; font-size: 0.68rem; }
.pop.flash { top: 118px; left: -12px; right: -12px; text-align: center; padding: 8px 0; --r: -6deg; color: #fff;
  font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.02em;
  background: repeating-linear-gradient(45deg, #ff2d55 0 12px, #ff5a1f 12px 24px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4); }
.pop.spin { top: 158px; right: 4px; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; text-align: center;
  font-size: 0.55rem; font-weight: 800; line-height: 1.2; color: #fff; text-shadow: 0 1px 2px #000; --r: 10deg;
  background: conic-gradient(#ffcc00 0 25%, #ff2d55 0 50%, #34c759 0 75%, #0a84ff 0); box-shadow: 0 0 0 3px #fff, 0 8px 16px rgba(0, 0, 0, 0.5); }
.pop.modal { top: 232px; left: 20px; right: 20px; background: #fff; color: #111; border-radius: 16px; padding: 14px 12px 10px;
  text-align: center; box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.25), 0 20px 40px rgba(0, 0, 0, 0.55); }
.pop.modal b { display: block; font-family: "Fredoka", sans-serif; font-size: 1.05rem; color: #ff2d55; }
.pop.modal p { margin: 2px 0 6px !important; font-size: 0.72rem; }
.pop.modal .email { display: block; border: 1px solid #c7c7cc; border-radius: 8px; padding: 5px; font-size: 0.62rem; color: #8e8e93; }
.pop.modal .go { display: block; margin-top: 6px; background: #111; color: #ffcc00; border-radius: 8px; padding: 6px; font-size: 0.7rem; font-weight: 800; }
.pop.modal small { display: block; margin-top: 4px; font-size: 0.5rem; color: #8e8e93; }
.pop.modal i { position: absolute; top: 5px; right: 9px; font-style: normal; font-size: 0.6rem; color: #c7c7cc; }
.pop.stock { top: 62px; left: 6px; background: #ffcc00; color: #111; font-weight: 800; font-size: 0.7rem; padding: 5px 9px; border-radius: 8px;
  --r: -9deg; box-shadow: 0 6px 12px rgba(0, 0, 0, 0.45); }
.pop.timer { bottom: 54px; right: 8px; background: #111; color: #fff; border: 2px solid #ff2d55; border-radius: 8px; padding: 5px 8px; font-size: 0.62rem; --r: 4deg; }
.pop.timer b { font-family: "Fredoka", sans-serif; color: #ff2d55; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.pop.bnpl { top: 170px; left: 8px; background: #b6f5c9; color: #0b3d1f; font-weight: 800; font-size: 0.66rem; padding: 5px 10px; border-radius: 999px; --r: 6deg; }
.pop.cookie { left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: rgba(20, 20, 24, 0.97); color: #d1d1d6; font-size: 0.6rem; padding: 10px 10px 14px; border-top: 1px solid #3a3a3c; }
.pop.cookie span { background: #0a84ff; color: #fff; border-radius: 6px; padding: 4px 8px; font-weight: 700; white-space: nowrap; }
.pop { transform: rotate(var(--r, 0deg)); }
@media (prefers-reduced-motion: no-preference) {
  @keyframes pop-cycle {
    0% { opacity: 0; transform: scale(0.4) rotate(var(--r, 0deg)); }
    4% { opacity: 1; transform: scale(1.1) rotate(var(--r, 0deg)); }
    7%, 88% { opacity: 1; transform: scale(1) rotate(var(--r, 0deg)); }
    94%, 100% { opacity: 0; transform: scale(0.9) rotate(var(--r, 0deg)); }
  }
  @keyframes tab-jiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-1.2deg); } 75% { transform: rotate(1.2deg); } }
  .pop { animation: pop-cycle 9s var(--d, 0s) infinite both; }
  .tab-thumb { animation: tab-jiggle 0.5s ease-in-out infinite; }
  .tab-thumb:nth-child(2n) { animation-duration: 0.62s; animation-direction: reverse; }
  /* Only while the prologue is on stage, so it starts from the first pop-up each time. */
  .quest-js .slide:not(.is-active) .pop { animation: none; opacity: 0; }
  .quest-js .slide:not(.is-active) .tab-thumb { animation: none; }
}

/* Mock phone screens, drawn in HTML like the app. */
.mock-phone { width: min(270px, 100%); margin-inline: auto; border-radius: 38px; padding: 10px;
  background: linear-gradient(145deg, #3a3150, #120d1c 40%, #08060d);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), 0 30px 50px -18px rgba(60, 41, 92, 0.55); }
.mock-phone.tall { width: min(320px, 100%); }
.mock-screen { border-radius: 29px; min-height: 440px; padding: 26px 14px 16px; display: flex; flex-direction: column;
  background:
    linear-gradient(to bottom, color-mix(in srgb, var(--page) 40%, transparent), var(--page) 40%),
    linear-gradient(90deg, var(--violet), var(--periwinkle)) top / 100% 30% no-repeat; }
.mock-screen p { margin: 0; }
.mock-title { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.7rem; margin-bottom: 12px !important; }
.mock-listcard { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 18px; padding: 14px;
  box-shadow: var(--lift-1); }
.mock-listcard > div { flex: 1; }
.mock-emoji { font-size: 2.4rem; line-height: 1; filter: drop-shadow(0 0 3px rgba(177, 142, 255, 0.9)); }
.mock-emoji.small { font-size: 1.9rem; }
.mock-name { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.mock-detail { font-size: 0.75rem; color: var(--ink-soft); margin: 2px 0 !important; }
.mock-budget { height: 6px; border-radius: 3px; background: var(--line); margin: 8px 0 4px; overflow: hidden; }
.mock-budget span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.mock-buttons { margin-top: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mock-buttons span { text-align: center; padding: 11px 0; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 0.9rem; }
.list-head { display: flex; gap: 10px; align-items: center; }
.list-total { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 2rem; margin-top: 10px !important;
  display: flex; align-items: center; gap: 10px; }
.save-badge { font-size: 0.8rem; color: #fff; background: #12786e; border-radius: 999px; padding: 3px 10px; }
.rows { list-style: none; padding: 0; margin: 12px 0 0; }
.rows li { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; padding: 8px 0;
  border-top: 1px solid var(--line); }
.rows .thumb { width: 34px; height: 34px; border-radius: 9px; background: var(--card); display: grid; place-items: center; font-size: 1.15rem; }
.rows b { display: block; font-size: 0.78rem; font-weight: 600; color: var(--ink); line-height: 1.25; }
.rows small { display: block; font-size: 0.66rem; color: var(--ink-soft); line-height: 1.3; }
.rows .amt { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 0.92rem; text-align: right; }
.rows .amt em { display: block; font-style: normal; font-size: 0.62rem; color: var(--savings); }

/* Chapter Two: the three taps. */
.share-steps { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(3, 1fr); clear: both; }
.share-steps li.card { padding: 16px; }
.share-steps li > p { margin-top: 12px; }
.mini-screen { background: var(--page); border-radius: 16px; padding: 14px; min-height: 180px; position: relative; }
.mini-screen p { margin: 0; }
.mini-shop { font-size: 0.7rem; color: var(--ink-soft); }
.mini-photo { font-size: 2.8rem; text-align: center; margin: 6px 0; }
.mini-name { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.mini-price { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.2rem; color: var(--ink); }
.mini-special { font-size: 0.65rem; background: #c2410c; color: #fff; border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.mini-share { position: absolute; right: 12px; bottom: 12px; background: var(--accent); color: var(--on-accent);
  border-radius: 999px; padding: 4px 12px; font-size: 0.75rem; font-weight: 600; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.mini-sheet-title { font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.app-row { display: flex; justify-content: center; gap: 10px; margin-top: 34px; }
.app { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 0.6rem; color: var(--ink-soft); }
.app i, .app img { width: 42px; height: 42px; border-radius: 11px; display: block; }
.app i { background: linear-gradient(to bottom, #d1d1d6, #aeaeb2); }
.app.glow { color: var(--ink); font-weight: 600; }
.app.glow img { box-shadow: 0 0 0 3px var(--accent), 0 0 18px 4px var(--mint); }
.pick-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--card);
  border-radius: 12px; padding: 10px 12px; margin-top: 10px; font-size: 0.8rem; color: var(--ink); }
.pick-row small { color: var(--ink-soft); font-size: 0.68rem; }
.pick-row.chosen { box-shadow: 0 0 0 2px var(--accent); }
.pick-row b { color: var(--accent); }

/* Small app cards: the merge suggestion, the price check, compare shops. */
.app-card { background: var(--card); border-radius: 20px; padding: 18px; box-shadow: var(--edge), var(--lift-2); }
.app-card p { margin: 0; }
.dup-title { font-weight: 600; color: var(--ink); }
.dup-pair { display: grid; gap: 6px; margin: 12px 0; }
.dup-pair span { background: var(--page); border-radius: 10px; padding: 8px 10px; font-size: 0.85rem; }
.dup-text { font-size: 0.82rem; color: var(--ink-soft); }
.dup-buttons { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.dup-buttons span { padding: 7px 14px; border-radius: 999px; background: var(--page); font-size: 0.85rem; font-weight: 600; color: var(--accent); }
.dup-buttons .primary { background: var(--accent); color: var(--on-accent); }

/* Things the story's words name that are on screen in the app, drawn as the app draws them (as with Manual
   update below): the list, Share and listl in the Share sheet, the Best tag and the Buy item button. */
/* A chip and the punctuation after it stay on one line (Safari would otherwise start a line with the comma). */
.nobr { white-space: nowrap; }
.ui-chip { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; white-space: nowrap;
  padding: 2px 10px; border-radius: 999px; font-size: 0.82em; font-weight: 600; line-height: 1.45; }
.ui-chip svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ui-chip svg .fill { fill: currentColor; stroke: none; }
.ui-list { font-family: "Fredoka", sans-serif; color: var(--ink); background: var(--card); box-shadow: var(--edge), var(--lift-1); padding-left: 7px; }
.ui-share { color: #007aff; background: rgba(120, 120, 128, 0.16); }
.ui-app { color: var(--ink); background: rgba(120, 120, 128, 0.16); padding-left: 3px; }
.ui-app img { width: 1.35em; height: 1.35em; border-radius: 0.32em; }
.ui-best { font-family: "Fredoka", sans-serif; color: #fff; background: #12786e; padding: 1px 9px; }
.ui-buy { color: var(--on-accent); background: var(--accent); padding: 3px 12px 3px 10px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
@media (prefers-color-scheme: dark) { .ui-share { color: #0a84ff; } }
/* Better deals: green like the app's tab (the savings colour), with the app's small Pro capsule after it. */
.ui-deals { color: #fff; background: var(--savings); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.ui-pro { display: inline-block; vertical-align: middle; margin-left: 4px; padding: 0 7px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 0.66em; line-height: 1.6; }
@media (prefers-color-scheme: dark) { .ui-deals { color: #10302c; } }
/* The Game, Level 2: Better deals' private browser, its bar on top (Back, the wordmark, Private, Add) over the shop's page. */
.deals-screen { padding: 0 !important; overflow: hidden; }
.deals-bar { display: grid; gap: 8px; padding: 12px 12px 10px; background: color-mix(in srgb, var(--card) 85%, var(--page)); border-bottom: 1px solid var(--line); }
.deals-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.deals-back { justify-self: start; padding: 3px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.deals-mark { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 1.2rem; color: var(--wordmark); }
.deals-private { justify-self: end; font-size: 0.7rem; font-weight: 600; color: var(--ink-soft); }
.deals-add { display: block; text-align: center; padding: 9px; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 0.9rem; }
.deals-bar small { display: block; text-align: center; font-size: 0.62rem; line-height: 1.35; color: var(--ink-soft); }
.deals-page { padding: 14px 14px 18px; }
/* Chapter Four: the app's Manual update badge (ManualUpdateBadge), shown in the sentence that mentions it. */
.manual-badge { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; white-space: nowrap;
  padding: 3px 11px 3px 9px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: 0.8em; font-weight: 700; line-height: 1.4; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.manual-badge svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes tap-ring { 0%, 55%, 100% { opacity: 0; } 70% { opacity: 1; } }
  .manual-badge .tap { animation: tap-ring 2.2s ease-in-out infinite; }
}
.wednesday { display: flex; gap: 18px; align-items: center; justify-content: center; }
.calendar { flex: none; width: 104px; background: var(--card); border-radius: 18px; overflow: hidden; text-align: center;
  box-shadow: var(--edge), var(--lift-2); transform: rotate(-5deg); }
.calendar span { display: block; background: #d93a32; color: #fff; font-weight: 700; font-size: 0.85rem; padding: 5px 0; letter-spacing: 0.1em; }
.calendar b { display: block; font-family: "Fredoka", sans-serif; font-size: 3rem; padding: 4px 0 8px; }
.refresh { flex: 1; max-width: 270px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); margin: 0 auto 8px; }
.refresh-title { text-align: center; font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 8px !important; }
.refresh-line { display: flex; justify-content: space-between; gap: 8px; font-size: 0.85rem; padding: 6px 0; border-top: 1px solid var(--line); }
.refresh-line b { white-space: nowrap; color: var(--savings); font-family: "Fredoka", sans-serif; font-weight: 600; }
.refresh-line.muted b { color: var(--ink-soft); font-family: inherit; font-weight: 500; }

.riddle { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: center; margin-top: 24px; }
.compare-title { font-weight: 600; margin-bottom: 8px !important; }
.compare-row { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; }
.compare-row + .compare-row { margin-top: 4px; }
.compare-row b { display: block; font-size: 0.95rem; }
.compare-row small { display: block; color: var(--ink-soft); font-size: 0.78rem; }
.compare-row .per { color: var(--ink-soft); font-size: 0.85rem; }
.compare-row .cost { font-family: "Fredoka", sans-serif; font-weight: 600; text-align: right; white-space: nowrap; }
.compare-row.best { background: color-mix(in srgb, var(--savings) 12%, transparent); }
.best-pill { font-style: normal; font-size: 0.7rem; background: #12786e; color: #fff; border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.riddle-answer p { margin: 0.6em 0 0; }
.riddle-answer .answer-lead { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.45rem; color: var(--ink); margin: 0; line-height: 1.25; }

/* Chapter Six: the storybook map (Talysa's own drawing). */
.map { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; color: var(--parch-ink);
  background: radial-gradient(ellipse at center, var(--parch) 55%, color-mix(in srgb, var(--parch-edge) 70%, var(--parch)) 100%);
  box-shadow: inset 0 0 0 2px var(--parch-edge), var(--lift-2); font-family: Georgia, "Times New Roman", serif; }
.map-path { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-path path { fill: none; stroke: var(--parch-ink); stroke-width: 2.5; stroke-dasharray: 4 7; stroke-linecap: round;
  vector-effect: non-scaling-stroke; opacity: 0.7; }
.place { position: absolute; transform: translateX(-50%); text-align: center; font-size: 0.85rem; line-height: 1.3; }
.place span { display: block; font-size: 2rem; }
.place .stall { display: block; width: 52px; height: 44px; margin: 0 auto 2px; filter: drop-shadow(0 3px 3px rgba(60, 41, 92, 0.25)); }
.place b { display: block; font-family: "Fredoka", sans-serif; font-weight: 600; }
.place small { display: block; font-size: 1.05rem; }
.place em { font-family: "Fredoka", sans-serif; font-style: normal; font-weight: 600; color: var(--savings); }
.place.home { left: 50%; top: 79%; }
.place.home span { display: inline; font-size: 1.3rem; margin-right: 4px; }
.place.left { left: 21%; top: 6%; }
.place.right { left: 79%; top: 6%; }
.map-compass { position: absolute; right: 5%; bottom: 3%; margin: 0; font-family: "Fredoka", sans-serif; font-weight: 600; }
/* Talysa stands on the Hilltop route (her feet on the path), beside what it winds around. */
.map .character.walker { position: absolute; width: 40px; left: calc(34.5% - 20px); top: calc(57% - 64px); }
.map-deco { position: absolute; width: 34px; height: 34px; opacity: 0.9; }
.map-deco.small { width: 24px; height: 24px; }
.map-deco.pond { width: 64px; height: 32px; }

/* Epilogue */
.victory { position: relative; width: 170px; margin: 0 auto 12px; }
.victory .character { width: 140px; margin: 0 auto; }
.confetti { position: absolute; inset: -10px -30px 40px; pointer-events: none;
  background:
    radial-gradient(circle, var(--violet) 3px, transparent 4px) 10% 20% / 40px 40px,
    radial-gradient(circle, var(--mint) 3px, transparent 4px) 60% 10% / 52px 46px,
    radial-gradient(circle, var(--sky) 2.5px, transparent 3.5px) 30% 60% / 36px 50px,
    radial-gradient(circle, #f4a261 2.5px, transparent 3.5px) 80% 40% / 46px 38px; opacity: 0.8;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 72%); mask-image: radial-gradient(ellipse at center, #000 40%, transparent 72%); }
.the-end { font-family: "Fredoka", sans-serif; font-weight: 600; color: var(--accent) !important; font-size: 1.2rem; }
.quest-recap { margin-top: 36px; }
.quest-fine { max-width: 44rem; margin: 22px auto 0; }

@media (prefers-reduced-motion: no-preference) {
  @keyframes quest-spin { to { transform: rotate(360deg); } }
  @keyframes quest-glow { 0%, 100% { box-shadow: 0 0 0 3px var(--accent), 0 0 10px 2px var(--mint); }
    50% { box-shadow: 0 0 0 3px var(--accent), 0 0 22px 6px var(--mint); } }
  @keyframes quest-fall { from { background-position-y: 0, 0, 0, 0; } to { background-position-y: 80px, 92px, 100px, 76px; } }
  .spinner { animation: quest-spin 1s linear infinite; }
  .app.glow img { animation: quest-glow 2.4s ease-in-out infinite; }
  .hero-scene .character, .victory .character { animation: float 6s ease-in-out infinite; }
  .confetti { animation: quest-fall 4s linear infinite; }
}

@media (max-width: 820px) {
  .hero-grid, .chapter-grid, .riddle { grid-template-columns: 1fr; }
  .chapter-grid.flip .chapter-text { order: 0; }
  .hero-grid { text-align: center; }
  .hero-scene { height: 250px; }
  .hero-scene .character { width: 130px; }
  .share-steps { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; gap: 12px; }
  /* Phones: each step sits beside its little screen, so the three fit the stage at a readable size. */
  .share-steps li.card { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; align-items: center; padding: 12px; }
  .share-steps li > p { margin-top: 0; font-size: 1.05rem; }
  .mini-screen { min-height: 150px; padding: 12px; }
  .app-row { gap: 7px; margin-top: 26px; }
  .app i, .app img { width: 36px; height: 36px; border-radius: 9px; }
  .pick-row { padding: 9px 10px; font-size: 0.76rem; }
  figure.art { padding-left: 60px; }
  figure.art.plain { padding-left: 0; }
  .map { aspect-ratio: 1 / 1; }
  .wednesday { flex-wrap: wrap; }
  .calendar { width: 84px; }
  .calendar b { font-size: 2.4rem; }
  .refresh { flex-basis: 100%; max-width: none; }
  figure.art .character.beside { width: 84px; left: -8px; }
  figure.art .character.beside.distressed { width: 110px; left: -26px; }
  .with-character .character.inline { width: 84px; }
}

/* The quest's stage (with quest.js): the chapters take turns on one screen that stays in place, and
   each builds piece by piece as you scroll. A trail along the bottom shows how far Talysa has come. */
.quest-js .quest-stage { position: sticky; top: 62px; height: calc(100vh - 62px); height: calc(100svh - 62px); overflow: hidden; }
.quest-js .slide { position: absolute; inset: 0; display: flex; align-items: center; padding: 16px 0 84px;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.quest-js .slide.is-future { opacity: 0; transform: translateY(56px); pointer-events: none; }
.quest-js .slide.is-past { opacity: 0; transform: translateY(-56px); pointer-events: none; }
.quest-js .slide.quest-hero { margin-top: 0; }
.quest-js .slide > .wrap { transform: scale(var(--fit, 1)); transform-origin: center; }
.quest-js .beat { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.quest-js .beat.shown { opacity: 1; transform: none; }
/* Cards and rows inside a picture arrive one after another. */
.quest-js .share-steps.beat li, .quest-js .quest-recap.beat .step, .quest-js figure.beat .rows li {
  opacity: 0; transform: translateY(14px); transition: opacity 0.45s ease, transform 0.45s ease; }
.quest-js .share-steps.shown li, .quest-js .quest-recap.shown .step, .quest-js figure.shown .rows li { opacity: 1; transform: none; }
.quest-js .shown li:nth-child(2), .quest-js .quest-recap.shown .step:nth-child(2) { transition-delay: 0.15s; }
.quest-js .shown li:nth-child(3), .quest-js .quest-recap.shown .step:nth-child(3) { transition-delay: 0.3s; }
.quest-js .shown li:nth-child(4) { transition-delay: 0.45s; }
.quest-js .shown li:nth-child(5) { transition-delay: 0.6s; }
.quest-js .shown li:nth-child(6) { transition-delay: 0.75s; }
@media (max-width: 820px) {
  .quest-js .slide { padding-top: 8px; }
  .quest-js .chapter-grid { gap: 20px; }
  /* The words make way for the last picture, so it fits on a phone, and pieces still to come take no
     room yet, so what's showing isn't shrunk to fit them. */
  .quest-js .slide.last-beat .words { display: none; }
  .quest-js .slide.last-beat .opening, .quest-js .slide.last-beat .with-character .character.inline,
  .quest-js .slide.last-beat .victory { display: none; }
  .quest-js .slide .beat:not(.shown) { display: none; }
  .quest-js .slide.is-active .beat.shown { animation: beat-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
}
@keyframes beat-in { from { opacity: 0; transform: translateY(18px); } }

/* Touch screens (quest.js adds .quest-swipe): the story is swiped left and right, a page at a time. The
   stage is one screen tall and keeps every touch (quest.js turns one page per swipe); chapters and pieces slide in sideways,
   from the left when going back. Back and next buttons sit either side of the trail. */
.quest-swipe .quest-stage { position: relative; top: 0; touch-action: none; }
/* Pages move like a carousel: the old page slides fully off one side as the new one slides in from the
   other, both solid, side by side, so they never fade over each other. Pages off stage are hidden once
   they've gone. While a finger drags, the page follows it a little (--drag, set by quest.js). */
.quest-swipe .slide { opacity: 1; transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0s linear 0.4s; }
.quest-swipe .slide.is-active { transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0s; }
.quest-swipe .slide.is-future { opacity: 1; transform: translateX(100%); visibility: hidden; }
.quest-swipe .slide.is-past { opacity: 1; transform: translateX(-100%); visibility: hidden; }
.quest-swipe .slide > .wrap { translate: var(--drag, 0px) 0; transition: translate 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.quest-swipe .quest-stage.dragging .slide > .wrap { transition: none; }
.quest-js .quest-stage.settling :is(.slide, .slide > .wrap, .beat) { transition: none !important; animation: none !important; }
.quest-swipe .beat { transform: translateX(28px); }
.quest-swipe .going-back .beat { transform: translateX(-28px); }
.quest-swipe .beat.shown { transform: none; }
@keyframes beat-in-next { from { opacity: 0; transform: translateX(28px); } }
@keyframes beat-in-back { from { opacity: 0; transform: translateX(-28px); } }
@media (max-width: 820px) {
  .quest-swipe .slide.is-active .beat.shown { animation-name: beat-in-next; }
  .quest-swipe .going-back .slide.is-active .beat.shown { animation-name: beat-in-back; }
}
.story-arrow { display: none; }
.quest-swipe .story-arrow { display: grid; place-items: center; position: absolute; bottom: 26px; z-index: 3; width: 30px; height: 30px;
  padding: 0; border: 0; border-radius: 50%; background: var(--card); color: var(--accent); cursor: pointer;
  box-shadow: 0 1px 4px rgba(60, 41, 92, 0.18); transition: opacity 0.3s ease; }
.quest-swipe .story-arrow::before { content: ""; width: 8px; height: 8px; border-right: 2.5px solid currentColor;
  border-bottom: 2.5px solid currentColor; transform: translateX(-2px) rotate(-45deg); }
.quest-swipe .story-arrow.back { left: max(4px, calc(50% - 418px)); }
.quest-swipe .story-arrow.back::before { transform: translateX(2px) rotate(135deg); }
.quest-swipe .story-arrow.next { right: max(4px, calc(50% - 418px)); }
.quest-swipe .story-arrow:disabled { opacity: 0.3; cursor: default; }
.game .story-arrow { color: var(--hot); }
/* The title's hint points sideways. */
.quest-swipe .scroll-hint .scroll-arrow { transform: rotate(-45deg); }
@media (prefers-reduced-motion: no-preference) {
  @keyframes swipe-nudge { 0%, 100% { translate: 0 0; opacity: 0.45; } 50% { translate: 7px 0; opacity: 1; } }
  .quest-swipe .scroll-hint .scroll-arrow { animation: swipe-nudge 1.8s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .quest-js .slide, .quest-js .slide.is-future, .quest-js .slide.is-past, .quest-js .beat,
  .quest-js .share-steps.beat li, .quest-js .quest-recap.beat .step, .quest-js figure.beat .rows li { transform: none; transition: opacity 0.3s ease; }
  .quest-swipe .slide.is-future, .quest-swipe .slide.is-past, .quest-swipe .beat, .quest-swipe .going-back .beat { transform: none; }
  .quest-swipe .slide, .quest-swipe .slide.is-active { transition: none; }
  .quest-swipe .slide > .wrap { translate: none; }
}

.trail { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(100% - 72px, 760px); height: 54px; }
.trail-path { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trail-path path { fill: none; stroke-linecap: round; }
.trail-ahead { stroke: color-mix(in srgb, var(--accent) 45%, transparent); stroke-width: 3; stroke-dasharray: 1 7; }
.trail-done { stroke: var(--accent); stroke-width: 3; }
.trail-stop { position: absolute; width: 14px; height: 14px; padding: 0; border-radius: 50%; cursor: pointer; z-index: 2;
  transform: translate(-50%, -50%); border: 2px solid var(--accent); background: var(--page); transition: background 0.3s; }
.trail-stop.reached { background: var(--accent); }
.trail-stop span { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); white-space: nowrap; pointer-events: none;
  font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 0.75rem; color: var(--ink); background: var(--card);
  padding: 3px 9px; border-radius: 999px; box-shadow: var(--lift-1); opacity: 0; transition: opacity 0.2s; }
.trail-stop:hover span, .trail-stop:focus-visible span { opacity: 1; }
/* Obstacles (mountains, trees, rivers…) rise up a little ahead of Talysa and dim once she's past. */
.trail-obstacle { position: absolute; z-index: 1; width: 30px; height: 30px; overflow: visible; pointer-events: none;
  transform: translate(-50%, -92%) scale(0); transform-origin: 50% 100%; opacity: 0;
  transition: transform 0.45s cubic-bezier(0.3, 1.6, 0.5, 1), opacity 0.4s; }
.trail-obstacle.is-mountain { width: 46px; height: 46px; }
.trail-obstacle.is-river { width: 38px; height: 38px; }
.trail-obstacle.appeared { transform: translate(-50%, -92%) scale(1); opacity: 1; }
.trail-obstacle.cleared { opacity: 0.6; }
.trail-walker { position: absolute; z-index: 3; width: 24px; overflow: visible; transform: translate(-50%, -96%);
  transition: transform 0.25s ease-out; filter: drop-shadow(0 3px 4px rgba(60, 41, 92, 0.3)); }
.trail-walker.hop { transform: translate(-50%, -96%) translateY(-12px) rotate(-8deg); }
@media (prefers-reduced-motion: reduce) {
  .trail-obstacle, .trail-walker { transition: opacity 0.3s; }
  .trail-walker.hop { transform: translate(-50%, -96%); }
}

/* The header has three links: on the narrowest phones, drop the little icon so they fit. */
@media (max-width: 420px) {
  .site-header .wordmark img { display: none; }
  .site-header nav { gap: 12px; font-size: 0.9rem; }
}

/* The narrowest phones: the header's links a touch smaller, so they stay on one line beside Stories. */
@media (max-width: 380px) {
  .site-header nav { gap: 10px; font-size: 0.84rem; }
}

/* ───────────────────────── The Game (game.html) ─────────────────────────
   The second story (owner request 13 Nov 2026): Mark's gaming setup, in a sci-fi city with a video game
   finish. It plays on the quest's stage and pieces; this adds its neon colours (orange and cyan at
   dusk), the city, the lock screen, the boss bar and the high score. Mock app screens keep the app's look. */
.game { --hot: #c2410c; --cool: #0e7490; --neon: #ff7a1a; --neon-cool: #22d3ee; --grid: rgba(14, 116, 144, 0.16); }
@media (prefers-color-scheme: dark) { .game { --hot: #ff9a4d; --cool: #5ee7f2; --grid: rgba(94, 231, 242, 0.14); } }

.game .quest-hero.aurora::after { background: linear-gradient(90deg, var(--neon), #e94fd8); }
.game .quest-hero.aurora::before { background: linear-gradient(90deg, var(--neon-cool), #6366f1); }
.game .quest-hero h1 { color: var(--hot); --extrude: #9a3412;
  text-shadow: 0 1px 0 var(--extrude), 0 2px 0 var(--extrude), 0 3px 0 var(--extrude), 0 4px 0 var(--extrude),
    0 10px 12px rgba(124, 45, 18, 0.25), 0 18px 40px rgba(255, 122, 26, 0.5); }
@media (prefers-color-scheme: dark) { .game .quest-hero h1 { --extrude: #7c2d12; } }
.game .eyebrow, .game .scroll-hint { color: var(--hot); }
.game .chapter-no, .game .chapter-text p.chapter-no { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.9rem; color: var(--hot); }
.game .chapter-no::before { content: "▶ "; }
.game .chapter-no::after { content: none; }
.game .the-end { color: var(--hot) !important; }

/* The title's city at dusk: towers, a ringed planet and flying cabs (they stop with Reduce Motion). */
.game-scene { border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 3; max-width: 460px; margin-inline: auto; width: 100%;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.25) inset, 0 24px 50px -18px rgba(124, 45, 18, 0.55), 0 0 60px -10px rgba(255, 122, 26, 0.45); }
.game-scene svg { display: block; width: 100%; height: 100%; }
.sky-lane { transform: translateX(var(--x, 120px)); }
.lane-1 { --x: 60px; } .lane-2 { --x: 300px; } .lane-3 { --x: 220px; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes cab-east { from { transform: translateX(-60px); } to { transform: translateX(440px); } }
  @keyframes cab-west { from { transform: translateX(440px); } to { transform: translateX(-60px); } }
  @keyframes beacon { 0%, 60%, 100% { opacity: 1; } 70%, 90% { opacity: 0.2; } }
  .lane-1 { animation: cab-east 9s linear infinite; }
  .lane-2 { animation: cab-west 12s linear infinite -4s; }
  .lane-3 { animation: cab-east 15s linear infinite -9s; }
  .game-scene .beacon { animation: beacon 2s ease-in-out infinite; }
}

/* Level 2: the Merge button as the app draws it, and the shop under each name. */
.ui-primary { color: var(--on-accent); background: var(--accent); padding: 2px 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.dup-icon { color: var(--accent); margin-right: 2px; }
.dup-pair small { display: block; font-size: 0.72rem; color: var(--ink-soft); margin-top: 1px; }

/* Level 3: the lock screen, with listl's price alerts. */
.mock-screen.lock-screen { color: #fff; text-align: center; padding: 30px 12px 16px; gap: 8px;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 180, 107, 0.7), transparent 45%),
    linear-gradient(to bottom, #1b1446, #6b2f8f 55%, #ff8a3d); }
.lock-date { font-size: 0.85rem; font-weight: 600; opacity: 0.9; }
.lock-time { font-size: 4.2rem; font-weight: 700; line-height: 1; letter-spacing: -0.02em; margin-bottom: 70px !important; }
.lock-note { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 7px; align-items: start; text-align: left;
  background: rgba(245, 245, 250, 0.82); color: #111; border-radius: 18px; padding: 10px 11px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
.lock-note img { width: 28px; height: 28px; border-radius: 7px; }
.lock-note b { display: block; font-size: 0.74rem; padding-right: 34px; }
.lock-note span { display: block; font-size: 0.74rem; line-height: 1.3; }
.lock-note small { position: absolute; top: 10px; right: 11px; font-size: 0.6rem; color: #6c6c70; white-space: nowrap; }
.quest-js .game figure.beat .lock-note { opacity: 0; transform: translateY(-12px) scale(0.96); transition: opacity 0.45s ease, transform 0.45s ease; }
.quest-js .game figure.shown .lock-note { opacity: 1; transform: none; }
.quest-js .game figure.shown .lock-note + .lock-note { transition-delay: 0.35s; }

/* Boss level: Mark punches the Budget Dragon. Its health bar drains, it reels, then keels over with X eyes
   and "K.O.!". Keyframe animations, not transitions, so it plays on phones too, where the picture only
   appears (display) as it arrives. The resting styles are how it ends, for no JavaScript and Reduce Motion. */
.boss-fight { display: block; width: min(330px, 100%); margin: 0 auto 6px; overflow: visible; color: var(--hot); }
.bf-label { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700; font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; fill: currentColor; }
.bf-health { width: 0; }
.bf-shake, .bf-dragon, .bf-mark, .bf-pow, .bf-ko, .bf-coins { transform-box: fill-box; }
.bf-dragon { transform-origin: 70% 100%; transform: translate(8px, -8px) rotate(72deg); }
.bf-eyes { opacity: 0; }
.bf-pow { opacity: 0; transform-origin: center; }
.bf-pow text { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 11px; fill: #c2410c; }
.bf-ko { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 800; font-size: 22px; letter-spacing: 0.06em;
  fill: currentColor; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--neon) 60%, transparent)); }
@media (prefers-reduced-motion: no-preference) {
  .quest-js .game figure.shown .bf-mark { animation: bf-lunge 0.4s cubic-bezier(0.5, 0, 0.75, 0) 0.5s both; }
  .quest-js .game figure.shown .bf-pow { animation: bf-pow 0.75s ease-out 0.88s both; }
  .quest-js .game figure.shown .bf-health { animation: bf-drain 0.8s cubic-bezier(0.3, 0, 0.3, 1) 0.9s both; }
  .quest-js .game figure.shown .bf-shake { animation: bf-reel 0.55s ease-out 0.88s both; }
  .quest-js .game figure.shown .bf-dragon { animation: bf-fall 0.6s cubic-bezier(0.5, 0, 0.8, 0.6) 1.7s both; }
  .quest-js .game figure.shown .bf-eyes { animation: bf-blink-out 1.75s step-end both; }
  .quest-js .game figure.shown .bf-ko-eyes { animation: bf-blink-in 1.75s step-end both; }
  .quest-js .game figure.shown :is(.bf-ko, .bf-coins) { animation: bf-appear 0.4s cubic-bezier(0.2, 0.8, 0.2, 1.4) 2.2s both; }
}
@keyframes bf-lunge { from { transform: translateX(-84px); } }
@keyframes bf-pow { 0% { opacity: 0; transform: scale(0.3); } 25% { opacity: 1; transform: scale(1.2); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.05); } }
@keyframes bf-drain { from { width: 123px; } }
@keyframes bf-reel { 0% { transform: none; } 20% { transform: translateX(8px) rotate(6deg); filter: brightness(1.8); }
  45% { transform: translateX(-4px); filter: none; } 70% { transform: translateX(3px); } 100% { transform: none; } }
@keyframes bf-fall { from { transform: none; } }
@keyframes bf-blink-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes bf-blink-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bf-appear { from { opacity: 0; transform: translateY(-8px) scale(0.6); } }
.quest-js .game figure.shown .rows li:nth-child(7) { transition-delay: 0.9s; }

/* The high score: the new setup, then an arcade screen whose scores count up (quest.js). */
.game .victory { width: min(340px, 100%); }
.game .victory svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 8px 10px rgba(60, 41, 92, 0.2)); }
/* Pixel confetti: one small square per tile (the corner of a conic gradient), in the neon colours. */
.game .confetti { inset: -14px -24px 30px; opacity: 0.8;
  background:
    conic-gradient(from 270deg at 5px 5px, var(--neon) 25%, transparent 0) 10% 20% / 38px 42px,
    conic-gradient(from 270deg at 5px 5px, var(--neon-cool) 25%, transparent 0) 60% 10% / 50px 46px,
    conic-gradient(from 270deg at 4px 4px, #e94fd8 25%, transparent 0) 30% 60% / 36px 52px,
    conic-gradient(from 270deg at 4px 4px, #ffc83d 25%, transparent 0) 80% 40% / 46px 38px; }
.hiscore { max-width: 36rem; margin: 26px auto 0; padding: 26px 32px 24px; border-radius: 20px; text-align: center; position: relative;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; text-transform: uppercase; letter-spacing: 0.1em; color: #e6faff;
  background: radial-gradient(ellipse at 50% 0%, #2b1d6e, #0b0b24 70%);
  box-shadow: 0 0 0 2px #22d3ee, 0 0 0 6px #0b0b24, 0 0 40px -6px rgba(34, 211, 238, 0.7), 0 24px 50px -20px rgba(0, 0, 0, 0.6); }
.hiscore::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px); }
.hiscore p { margin: 0; }
.hs-new { font-family: "Fredoka", sans-serif; font-weight: 700; font-size: clamp(1.9rem, 5vw, 2.6rem); letter-spacing: 0.06em;
  color: #ffc83d; text-shadow: 0 0 12px rgba(255, 122, 26, 0.9), 0 3px 0 #c2410c; }
.hs-player { color: #ffb070; font-weight: 700; margin: 6px 0 14px !important; font-size: 1rem; }
.hiscore dl { margin: 0; text-align: left; }
.hiscore dl div { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; font-size: 1.2rem; font-weight: 600; color: #fff; }
.hiscore dt { flex: none; }
.hiscore dd { margin: 0 0 0 auto; color: #7df3fb; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 0 10px rgba(34, 211, 238, 0.8); }
.hiscore dl div::before { content: ""; order: 1; flex: 1; border-bottom: 2px dotted rgba(230, 250, 255, 0.3); transform: translateY(-4px); }
.hiscore dd { order: 2; }
.hs-approved { margin-top: 14px !important; color: #8ff5b8; font-weight: 700; font-size: 1rem; text-shadow: 0 0 10px rgba(123, 240, 168, 0.7); }
.quest-js .game .hiscore.beat dl div, .quest-js .game .hiscore.beat .hs-approved { opacity: 0; transition: opacity 0.3s ease; }
.quest-js .game .hiscore.shown dl div, .quest-js .game .hiscore.shown .hs-approved { opacity: 1; }
.quest-js .game .hiscore.shown dl div:nth-child(2) { transition-delay: 0.3s; }
.quest-js .game .hiscore.shown dl div:nth-child(3) { transition-delay: 0.6s; }
.quest-js .game .hiscore.shown dl div:nth-child(4) { transition-delay: 0.9s; }
.quest-js .game .hiscore.shown .hs-approved { transition-delay: 1.6s; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes hs-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0.35; } }
  @keyframes boom { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
  .hs-new { animation: hs-blink 1s steps(1) infinite; }
  .game .victory .boom { animation: boom 0.9s ease-in-out infinite; }
}

/* The ending, at every width: pieces still to come take no room, and the setup picture and words step
   aside when the high score arrives, so nothing is shrunk to fit around what isn't showing (on desktop
   the ending was drawn at about 57% size, its words at 10px). */
.quest-js .game .epilogue .beat:not(.shown) { display: none; }
.quest-js .game .epilogue .beat.shown { animation: beat-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.quest-js .game .slide:has(.hiscore.shown) :is(.words, .opening, .victory) { display: none; }

/* The stage: a neon grid floor under the trail, which runs orange over cyan. */
.quest-js .game .quest-stage::before { content: ""; position: absolute; left: -20%; right: -20%; bottom: 0; height: 150px; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1.5px, transparent 1.5px), linear-gradient(90deg, var(--grid) 1.5px, transparent 1.5px);
  background-size: 48px 24px; transform: perspective(260px) rotateX(58deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, #000, transparent); mask-image: linear-gradient(to top, #000, transparent); }
.game .trail-ahead { stroke: color-mix(in srgb, var(--cool) 55%, transparent); }
.game .trail-done { stroke: var(--hot); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--neon) 70%, transparent)); }
.game .trail-stop { border-color: var(--hot); }
.game .trail-stop.reached { background: var(--hot); }
.trail-obstacle.is-pylon { width: 42px; height: 42px; }
.trail-obstacle.is-cab { width: 36px; height: 36px; }

@media (max-width: 820px) {
  .game-scene { max-width: 340px; }
  .lock-time { font-size: 3.4rem; margin-bottom: 40px !important; }
  .hiscore { padding: 18px 18px 16px; letter-spacing: 0.06em; }
  .hiscore dl div { font-size: 1rem; }
  .hs-player, .hs-approved { font-size: 0.9rem; }
  .hs-new { font-size: min(2rem, 7.2vw); white-space: nowrap; }
  /* Phones: the recap tiles get the last step to themselves, after the high score has had its own. */
  .quest-js .game .slide.last-beat .hiscore { display: none; }
}

/* ───────────────────────── The Distance (distance.html) ─────────────────────────
   The third story (owner request 15 Nov 2026), between The Quest and The Game: Alana, far out in the
   country, shares one list with Mum and Dad. A country-road fairy tale: red earth, a long gold road,
   a tornado and Emerald Plaza glittering on the horizon. Chapter numbers are green road signs counting
   down the kilometres. It plays on the quest's stage and pieces; mock app screens keep the app's look. */
.distance { --dust: #a3401e; --road: #e8b04a; --sign: #1f6f43; --emerald: #1f8f63; }
@media (prefers-color-scheme: dark) { .distance { --dust: #f0a070; --road: #f6d58a; --emerald: #5fd6a0; } }

.distance .quest-hero.aurora::after { background: linear-gradient(90deg, #f4b26b, #e8b04a); }
.distance .quest-hero.aurora::before { background: linear-gradient(90deg, #86affd, #3fae86); }
.distance .quest-hero h1 { color: var(--dust); --extrude: #7a2e14;
  text-shadow: 0 1px 0 var(--extrude), 0 2px 0 var(--extrude), 0 3px 0 var(--extrude), 0 4px 0 var(--extrude),
    0 10px 12px rgba(122, 46, 20, 0.25), 0 18px 40px rgba(232, 176, 74, 0.55); }
@media (prefers-color-scheme: dark) { .distance .quest-hero h1 { --extrude: #7a2e14; } }
.distance .eyebrow, .distance .scroll-hint { color: var(--dust); }
.distance .the-end { color: var(--dust) !important; }
.distance .story-arrow { color: var(--dust); }

/* Chapter numbers as green road signs, with the kilometres left to Emerald Plaza (data-km). */
.distance .chapter-no, .distance .chapter-text p.chapter-no { display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 12px; border-radius: 7px; background: var(--sign); color: #fff; font-size: 0.9rem; letter-spacing: 0.03em;
  box-shadow: inset 0 0 0 2px var(--sign), inset 0 0 0 3.5px #fff, 0 2px 4px rgba(0, 0, 0, 0.2); }
.distance .chapter-no::before { content: none; }
.distance .chapter-no::after { content: attr(data-km); padding-left: 8px; border-left: 1.5px solid rgba(255, 255, 255, 0.6); font-weight: 700; }
.distance .chapter-text.centred .chapter-no { margin-inline: auto; }

/* The title: the farm, the road and Emerald Plaza at golden hour (clouds, the tornado, the windmill and
   the plaza's sparkle move; they stop with Reduce Motion). */
.distance-scene { border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 3; max-width: 460px; margin-inline: auto; width: 100%;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.3) inset, 0 24px 50px -18px rgba(122, 46, 20, 0.5), 0 0 60px -14px rgba(232, 176, 74, 0.5); }
.distance-scene svg { display: block; width: 100%; height: 100%; }
.mill-blades, .willy, .twinkle, .f-tail, .drift, .balloon { transform-box: fill-box; }
.mill-blades { transform-origin: center; }
.twinkle { transform-origin: center; }
.f-tail { transform-origin: 0% 100%; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes mill-spin { to { transform: rotate(360deg); } }
  @keyframes willy-wander { 0%, 100% { transform: translateX(0) skewX(0); } 25% { transform: translateX(-14px) skewX(4deg); }
    50% { transform: translateX(-6px) skewX(-3deg); } 75% { transform: translateX(10px) skewX(3deg); } }
  @keyframes twinkle { 0%, 100% { opacity: 0.2; transform: scale(0.6); } 50% { opacity: 1; transform: scale(1.2); } }
  @keyframes wag { from { transform: rotate(-14deg); } to { transform: rotate(16deg); } }
  @keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(30px); } }
  .mill-blades { animation: mill-spin 5s linear infinite; }
  .willy { animation: willy-wander 7s ease-in-out infinite; }
  .twinkle { animation: twinkle 2.2s ease-in-out infinite; }
  .twinkle.t2 { animation-delay: -0.8s; } .twinkle.t3 { animation-delay: -1.5s; }
  .f-tail { animation: wag 0.35s ease-in-out infinite alternate; }
  .drift-1 { animation: drift 18s ease-in-out infinite alternate; }
  .drift-2 { animation: drift 24s ease-in-out infinite alternate-reverse; }
  /* The hot-air balloon bobs as it drifts. */
  @keyframes balloon { 0% { transform: translate(-12px, 0); } 50% { transform: translate(0, -6px); } 100% { transform: translate(12px, 0); } }
  .balloon { animation: balloon 9s ease-in-out infinite alternate; }
  /* Dad's z's drift up and fade, one after another. */
  @keyframes snore { 0%, 100% { opacity: 0.35; transform: translateY(2px); } 50% { opacity: 1; transform: translateY(-2px); } }
  .zzz text { animation: snore 2.4s ease-in-out infinite; }
  .zzz text:nth-child(2) { animation-delay: 0.4s; } .zzz text:nth-child(3) { animation-delay: 0.8s; }
}

/* Prologue: Mum and Dad's texts sit on top, bigger than the shop noise, and their missed calls are a red
   banner across the middle that pulses, so it's clear who keeps ringing. */
.distance .pop.notif.family { font-size: 0.74rem; padding: 9px 11px; border-radius: 16px; z-index: 3;
  box-shadow: 0 0 0 2px #34c759, 0 10px 24px rgba(0, 0, 0, 0.5); }
.distance .pop.notif.family b { display: flex; justify-content: space-between; font-size: 0.82rem; }
.distance .pop.notif.family b small { font-weight: 500; font-size: 0.62rem; color: #6c6c70; }
.distance .pop.notif.family .bubble { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(#5cf777, #0fbc35); font-size: 1rem; }
.distance .pop.notif.family.dad { top: 72px; --r: 2deg; }
.distance .pop.flash { top: 150px; }
.distance .pop.stock { top: 196px; left: auto; right: 6px; }
.distance .pop.bnpl { top: auto; bottom: 96px; left: 8px; }
.pop.missed { top: 236px; left: 6px; right: 6px; z-index: 4; display: grid; justify-items: center; gap: 1px; text-align: center;
  background: #ff3b30; color: #fff; font-size: 0.78rem; font-weight: 600; padding: 9px 10px 10px; border-radius: 16px; --r: -3deg;
  box-shadow: 0 0 0 3px #fff, 0 12px 26px rgba(0, 0, 0, 0.55); }
.pop.missed span { font-size: 1.3rem; line-height: 1; }
.pop.missed b { font-family: "Fredoka", sans-serif; font-size: 1.15rem; letter-spacing: 0.02em; }
.distance .pop.modal { top: 300px; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes ring { 0%, 100% { rotate: 0deg; } 10%, 30% { rotate: -14deg; } 20%, 40% { rotate: 14deg; } 50% { rotate: 0deg; } }
  .pop.missed span { display: inline-block; animation: ring 1.2s ease-in-out infinite; }
}

/* Things on screen: Invite people (a menu item, with its Pro capsule). */
.ui-invite { color: var(--accent); padding-left: 8px; }
.ui-invite svg .fill { fill: var(--accent); }

/* Chapter One: listl's Invite people page, in miniature. */
.mini-invite { text-align: center; background: linear-gradient(to bottom, color-mix(in srgb, var(--violet) 35%, var(--page)), var(--page) 70%); }
.mini-invite .mini-photo { margin: 2px 0 0; }
.mini-invite-title { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.mini-choose { display: block; margin-top: 14px; padding: 6px 0; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: 0.75rem; font-weight: 600; }

/* Chapter Three: the road from home to Emerald Plaza, with listl's price alert above it. */
.road-map { position: relative; border-radius: 22px; overflow: hidden; padding-top: 74px;
  background: radial-gradient(ellipse at 30% 80%, #e7a66e, #d98b4f 60%, #c26a3a);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.25), var(--lift-2); }
.road-map svg { display: block; width: 100%; height: auto; }
.road-edge { fill: none; stroke: #b8822a; stroke-width: 16; stroke-linecap: round; }
.road-fill { fill: none; stroke: #f6d58a; stroke-width: 12; stroke-linecap: round; }
.road-bricks { fill: none; stroke: url(#bricks-big); stroke-width: 12; stroke-linecap: round; }
.map-label { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 11px; fill: #3a1a06; }
.map-km { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 9px; fill: #fff; paint-order: stroke; stroke: var(--sign); stroke-width: 6px; stroke-linejoin: round; }
.road-note { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 1; }
.road-note span + span { margin-top: 2px; }
.ute-parked { display: none; }
@media (prefers-reduced-motion: reduce) { .ute-driving { display: none; } .ute-parked { display: inline; } }
.quest-js .distance figure.beat .road-note { opacity: 0; transform: translateY(-12px) scale(0.96); transition: opacity 0.45s ease 0.6s, transform 0.45s ease 0.6s; }
.quest-js .distance figure.shown .road-note { opacity: 1; transform: none; }

/* Chapter Four: who the list is shared with, under its card, and Mum's candles just arrived. */
.mock-shared { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 600; color: var(--accent); margin-top: 6px !important; }
.mock-shared svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.rows li.just-added { background: color-mix(in srgb, var(--violet) 22%, transparent); border-radius: 10px; padding-inline: 6px; margin-inline: -6px; }
.quest-js .distance figure.shown .rows li:nth-child(7) { transition-delay: 0.9s; }

/* Epilogue: home at sunset, the whole family. */
.distance .victory { width: min(360px, 100%); }
.distance .victory svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 8px 10px rgba(60, 41, 92, 0.2)); }
.distance .confetti { background:
    radial-gradient(circle, #e8b04a 3px, transparent 4px) 10% 20% / 40px 40px,
    radial-gradient(circle, #3fae86 3px, transparent 4px) 60% 10% / 52px 46px,
    radial-gradient(circle, #c8463a 2.5px, transparent 3.5px) 30% 60% / 36px 50px,
    radial-gradient(circle, var(--sky) 2.5px, transparent 3.5px) 80% 40% / 46px 38px; }

/* The trail: a gold dirt road. */
.distance .trail-ahead { stroke: color-mix(in srgb, var(--dust) 50%, transparent); }
.distance .trail-done { stroke: var(--road); stroke-width: 4; filter: drop-shadow(0 1px 0 color-mix(in srgb, var(--dust) 70%, transparent)); }
.distance .trail-stop { border-color: var(--sign); }
.distance .trail-stop.reached { background: var(--sign); }
.trail-obstacle.is-windmill { width: 42px; height: 42px; }
.trail-obstacle.is-gum { width: 36px; height: 36px; }
.distance .trail-walker { width: 28px; }

@media (max-width: 820px) {
  .distance-scene { max-width: 340px; }
  .road-map { padding-top: 84px; }
  /* Frank stands beside Alana, so they sit clear of the caption. */
  .distance figure.art .character.beside { bottom: 64px; }
  /* Chapter Four's seven-item list fills a phone by itself: its caption steps aside and the rows sit closer,
     so it isn't shrunk to an unreadable size. */
  .distance .big-shop figcaption { display: none; }
  .distance .big-shop .rows li { padding: 6px 0; }
  .distance .big-shop .mock-screen { padding-top: 18px; }
}

/* Shared list page (list.html): a list someone shared from listl, like the app's list page.
   The aurora hero with the list's emoji in its circle, the total when shared, then a card per product. */
.shared-hero { text-align: center; padding: clamp(36px, 7vw, 72px) 0 clamp(20px, 4vw, 36px); --aurora-height: 520px; }
.shared-hero .wrap { max-width: 46rem; }
.shared-emoji {
  width: 112px; height: 112px; margin: 0 auto 18px; display: grid; place-items: center;
  font-size: 3.6rem; line-height: 1; border-radius: 50%;
  background: var(--card);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--violet) 35%, transparent), 0 22px 48px -24px rgba(60, 41, 92, 0.55);
}
.shared-hero .eyebrow { margin: 0 0 6px; }
.shared-hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 600; margin: 0 0 6px; overflow-wrap: anywhere; }
.shared-meta { color: var(--ink-soft); margin: 0; font-size: 1.05rem; }
.shared-total {
  display: inline-block; margin-top: 22px; padding: 16px 28px; border-radius: var(--radius);
  background: var(--card); box-shadow: 0 20px 50px -30px rgba(60, 41, 92, 0.45);
}
/* Parts shown only when there's something to show (list.js), whatever their display. */
.shared-hero [hidden], .shared-items [hidden] { display: none; }
.shared-total .label { color: var(--savings); font-weight: 600; margin: 0; font-size: 0.95rem; }
.shared-total .price { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: clamp(2rem, 6vw, 2.6rem);
  color: var(--savings); margin: 0; line-height: 1.15; }

.shared-items { padding: 8px 0 clamp(40px, 6vw, 64px); }
.shared-grid { list-style: none; margin: 0 auto; padding: 0; max-width: 60rem; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.shared-card { background: var(--card); border-radius: 20px; padding: 14px 16px;
  box-shadow: 0 14px 34px -26px rgba(60, 41, 92, 0.5); }
.shared-link { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  color: var(--ink); text-decoration: none; }
.shared-link:hover .shared-title { color: var(--accent); }
.shared-photo { position: relative; width: 76px; height: 76px; border-radius: 14px; overflow: hidden;
  background: #fff; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; }
.shared-photo img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: contain; }
.shared-photo-fallback { font-size: 2rem; line-height: 1; opacity: 0.85; }
.shared-photo.loaded .shared-photo-fallback { visibility: hidden; }
.shared-title { margin: 0; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shared-shop { margin: 2px 0 0; color: var(--ink-soft); font-size: 0.92rem; }
.shared-warning { margin: 4px 0 0; color: #b45309; font-size: 0.88rem; font-weight: 600; }
@media (prefers-color-scheme: dark) { .shared-warning { color: #fbbf24; } }
.shared-price { margin: 0; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 1.35rem; white-space: nowrap; }
.shared-also { margin: 10px 0 0 90px; color: var(--ink-soft); font-size: 0.9rem; }
.shared-also a { text-decoration: none; }
.shared-note { text-align: center; color: var(--ink-soft); font-size: 0.92rem; margin: 22px auto 0; max-width: 34rem; }
.shared-problem { max-width: 34rem; margin: 0 auto; text-align: center; }
.shared-problem h2 { font-size: 1.4rem; }

.shared-cta { padding-top: clamp(40px, 6vw, 64px); }
.shared-pitch { max-width: 32rem; margin: 14px auto 0; color: var(--ink-soft); font-size: 1.1rem; }
.shared-pitch + .shared-pitch { margin-top: 10px; }
.shared-pitch + .store-button { margin-top: 24px; }
.shared-private { text-align: center; margin: 1.6em auto 0; max-width: 34rem; color: var(--ink-soft); font-size: 0.92rem; }

@media (max-width: 480px) {
  .shared-link { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; }
  .shared-photo { width: 64px; height: 64px; }
  .shared-also { margin-left: 76px; }
  .shared-price { font-size: 1.2rem; }
}

/* The cards rise in one after another as the list opens. */
@media (prefers-reduced-motion: no-preference) {
  .shared-ready .shared-card { animation: shared-rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(var(--i, 0) * 45ms + 80ms); }
  .shared-ready .shared-emoji { animation: shared-pop 0.6s cubic-bezier(0.3, 1.5, 0.5, 1) both; }
}
@keyframes shared-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes shared-pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
