/* Storybot app — calm, warm, slow. Tokens match the website. */
:root {
  --cream: #f7f1e7;
  --paper: #fffaf2;
  --ink: #23223a;
  --ink-soft: #6a6880;
  --night: #191b38;
  --night-2: #262a55;
  --apricot: #f2a25c;
  --orange: #e98345;
  --sage: #8fb6ad;
  --sage-deep: #4f8177;
  --blush: #f2b9b0;
  --butter: #f5d48a;
  --lilac: #bbb5e2;
  --sky: #a9cfe6;
  --line: rgba(35, 34, 58, 0.08);
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gut: 20px;
  --slow: cubic-bezier(0.22, 0.61, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overscroll-behavior-x: none; } /* no swipe-to-go-back on Chrome/Android */
body {
  margin: 0;
  background: #ebe3d5;
  color: var(--ink);
  font: 400 1rem/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 12px; }

svg { fill: none; stroke: currentColor; stroke-width: 1.800; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }

.app {
  position: relative;
  width: 100%;
  max-width: 440px;
  min-height: 100dvh;
  margin-inline: auto;
  padding: calc(env(safe-area-inset-top) + 14px) 0 calc(env(safe-area-inset-bottom) + 96px);
  background:
    radial-gradient(120% 340px at 50% -60px, #fbe3c4 0%, rgba(251, 227, 196, 0) 70%),
    var(--cream);
  overflow-x: clip;
}
@media (min-width: 500px) {
  body { padding: 28px 0; }
  .app { border-radius: 44px; min-height: calc(100dvh - 56px); box-shadow: 0 30px 80px -30px rgba(25, 27, 56, 0.35); }
}

/* Top bar */
.top { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gut); }
.device {
  display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 16px 0 10px;
  background: rgba(255, 250, 242, 0.8); border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.875rem; font-weight: 500;
}
.device__icon { flex: none; width: 28px; height: 30px; }
.device__icon img { width: 100%; height: 100%; object-fit: contain; }
.avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--lilac); color: var(--night);
}
.avatar svg { width: 22px; height: 22px; }

/* Gettoni: 16-bit coin sprite, kept crisp */
.top__end { display: flex; align-items: center; gap: 8px; }
.coins {
  display: inline-flex; align-items: center; gap: 4px;
  height: 44px; padding: 0 14px 0 7px; border-radius: 999px;
  background: var(--night); color: var(--butter);
  font: 700 1.0625rem/1 var(--sans); font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}
.coins img, .wallet__coin, .cost img { image-rendering: pixelated; }
.coins img { width: 30px; height: 30px; animation: coin-bob 3.2s var(--slow) infinite; }
.coins.is-empty { background: rgba(255, 250, 242, 0.8); color: var(--ink-soft); border: 1px solid var(--line); }
.coins.is-empty img { filter: grayscale(1) opacity(0.6); animation: none; }
@keyframes coin-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .coins img { animation: none; } }

.wallet {
  display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px;
  border-radius: 20px; background: var(--night); color: var(--paper);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25);
}
.wallet__coin { width: 56px; height: 56px; flex: none; }
.wallet__n { font: 400 1rem/1.2 var(--sans); }
.wallet__n b { font: 500 2rem/1 var(--serif); color: var(--butter); margin-right: 2px; }
.wallet__sub { margin-top: 4px; font-size: 0.8125rem; color: #b4b3cc; }

.btn--cost { gap: 10px; }
.cost {
  display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 11px 0 4px; margin-right: -8px;
  border-radius: 999px; background: var(--night); color: var(--butter);
  font-weight: 700; font-size: 0.9375rem; font-variant-numeric: tabular-nums;
}
.cost img { width: 24px; height: 24px; }

/* Greeting */
.hello { padding: 26px var(--gut) 22px; }
.hello__eyebrow { color: var(--ink-soft); font-size: 0.9375rem; font-weight: 500; margin-bottom: 6px; }
h1 {
  font-family: var(--serif); font-weight: 400;
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
  font-size: clamp(2rem, 8.6vw, 2.35rem); line-height: 1.06; letter-spacing: -0.025em;
  text-wrap: balance; max-width: 11em;
}

/* Hero */
.hero {
  position: relative; isolation: isolate;
  margin: 0 var(--gut);
  aspect-ratio: 1 / 1.240;
  border-radius: 36px; overflow: hidden;
  --hero-floor: #212249;
  background: var(--hero-floor); color: var(--paper);
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start;
  padding: 16px;
  box-shadow: 0 24px 40px -24px rgba(25, 27, 56, 0.55);
}
.hero__art { position: absolute; inset: 0 0 auto; width: 100%; height: auto; z-index: -2; }
.hero__shade { position: absolute; inset: 52% 0 0; z-index: -1; background: linear-gradient(to bottom, rgba(31, 33, 78, 0) 0%, var(--hero-floor) 42%); }
.hero__body { width: 100%; padding: 0 6px 6px; }
.hero h2 {
  font-family: var(--serif); font-weight: 400; font-variation-settings: 'SOFT' 100, 'opsz' 144;
  font-size: 1.8rem; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance;
}
.hero__meta { margin-top: 6px; font-size: 0.9375rem; color: rgba(255, 250, 242, 0.76); }
.hero__actions { display: flex; gap: 10px; margin-top: 18px; }

.pill { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.01em; }
.pill--glass { background: rgba(25, 27, 56, 0.45); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--paper); }
.pill--ink { background: var(--night); color: var(--paper); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; border-radius: 999px; font-weight: 600; font-size: 1rem; transition: transform 0.25s var(--slow); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 22px; height: 22px; }
.btn--primary { flex: 1; background: var(--apricot); color: var(--night); }
.btn--ghost { width: 54px; background: rgba(255, 250, 242, 0.16); color: var(--paper); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* Sections */
.block { margin-top: 34px; }
.block__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 0 var(--gut); margin-bottom: 14px; }
.block h2, .custom h2 {
  font-family: var(--serif); font-weight: 450; font-variation-settings: 'SOFT' 100, 'opsz' 60;
  font-size: 1.4rem; line-height: 1.15; letter-spacing: -0.015em;
}
.block__note { color: var(--ink-soft); font-size: 0.875rem; margin-top: 2px; }
.more { flex: none; font-size: 0.875rem; font-weight: 600; color: var(--sage-deep); padding: 6px 0; }

.scroller {
  display: flex; overflow-x: auto; scroll-snap-type: x proximity;
  padding: 2px var(--gut) 6px; scroll-padding-inline: var(--gut);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller > li { flex: none; scroll-snap-align: start; }

/* Topics */
.topics { gap: 12px; }
.topic { display: grid; justify-items: center; gap: 8px; width: 80px; text-align: center; }
.topic img { width: 76px; height: 76px; border-radius: 28px; object-fit: cover; transition: transform 0.3s var(--slow); }
.topic:active img { transform: scale(0.94); }
.topic span { font-size: 0.8125rem; font-weight: 500; line-height: 1.2; }

/* Library screen */
.topics--filter { padding-block: 8px 10px; }
button.topic { text-align: center; }
.topic__all { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 28px; background: var(--lilac); color: var(--night); }
.topic__all svg { width: 34px; height: 34px; }
.topic[aria-pressed] img, .topic[aria-pressed] .topic__all { transition: transform 0.3s var(--slow), outline-color 0.3s var(--slow); outline: 3px solid transparent; outline-offset: 2px; }
.topic[aria-pressed="true"] img, .topic[aria-pressed="true"] .topic__all { outline-color: var(--apricot); }
.topic[aria-pressed="true"] span { font-weight: 700; }
.topic[aria-pressed]:active img, .topic[aria-pressed]:active .topic__all { transform: scale(0.94); }
.library__shelf { padding: 4px var(--gut) 0; }
.libshelf { gap: 8px; padding-right: 8px; }
.libshelf svg { width: 16px; height: 16px; }
.library__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; padding: 18px var(--gut) 0; }
.library__grid .story { width: auto; }
.library__empty { grid-column: 1 / -1; padding: 24px 22px; border-radius: 28px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); color: var(--ink-soft); line-height: 1.45; }

/* Story cards */
.stories { gap: 14px; }
.story { display: block; width: 156px; }
.story__cover { position: relative; display: block; border-radius: 28px; overflow: hidden; aspect-ratio: 1; background: var(--butter); transition: transform 0.3s var(--slow); }
.story:active .story__cover { transform: scale(0.97); }
.story__cover img { width: 100%; height: 100%; object-fit: cover; }
.story__play {
  position: absolute; right: 10px; bottom: 10px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--paper); color: var(--night);
  box-shadow: 0 6px 14px -6px rgba(25, 27, 56, 0.5);
}
.story__play svg { width: 18px; height: 18px; fill: currentColor; stroke: none; margin-left: 1px; }
.story__soon {
  position: absolute; right: 10px; bottom: 10px;
  height: 28px; padding: 0 11px; border-radius: 999px; display: inline-flex; align-items: center;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.01em;
  background: rgba(25, 27, 56, 0.55); color: var(--paper); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.btn--soon { background: rgba(25, 27, 56, 0.45); color: var(--paper); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: default; }
[hidden] { display: none !important; }
.story__title { display: block; margin-top: 10px; font-weight: 600; font-size: 0.9375rem; line-height: 1.25; letter-spacing: -0.005em; }
.story__meta { display: block; margin-top: 3px; font-size: 0.8125rem; color: var(--ink-soft); }

/* Custom story teaser */
.custom {
  position: relative; overflow: hidden;
  margin: 36px var(--gut) 0; padding: 22px 20px;
  border-radius: 32px; background: var(--lilac); color: var(--night);
  display: grid; grid-template-columns: 1fr 92px; align-items: center; gap: 12px;
}
.custom h2 { margin-top: 12px; }
.custom p { margin-top: 6px; font-size: 0.875rem; line-height: 1.4; color: rgba(25, 27, 56, 0.78); }
.custom__art { position: relative; width: 92px; height: 110px; }
.custom__art svg { position: absolute; inset: 0; margin: auto; width: 44px; height: 44px; fill: var(--paper); stroke: none; }
.blob { position: absolute; border-radius: 50%; }
.blob--a { width: 92px; height: 92px; left: 0; top: 9px; background: var(--night-2); }
.blob--b { width: 30px; height: 30px; right: -4px; top: 0; background: var(--butter); }
.blob--c { width: 20px; height: 20px; left: 0; bottom: 0; background: var(--apricot); }

/* Tab bar — solid night sky with a rolling-hill top edge, docked to the bottom */
.tabs {
  position: fixed; z-index: 10;
  left: 0; right: 0; bottom: 0; margin-inline: auto;
  width: min(100%, 440px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  padding: 4px 10px calc(env(safe-area-inset-bottom) + 8px);
  background: var(--night);
}
.tabs::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: calc(100% - 2px); height: 16px;
  background: var(--night);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 440 14' preserveAspectRatio='none'%3E%3Cpath d='M0 14V4C50 0 90 0 140 4s90 5 140 0 100-5 160 0V14z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 440 14' preserveAspectRatio='none'%3E%3Cpath d='M0 14V4C50 0 90 0 140 4s90 5 140 0 100-5 160 0V14z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}
.tab:nth-child(1) { --tab: var(--apricot); }
.tab:nth-child(2) { --tab: var(--sage); }
.tab:nth-child(3) { --tab: var(--lilac); }
.tab:nth-child(4) { --tab: var(--butter); }
.tab {
  position: relative;
  display: grid; justify-items: center; gap: 3px;
  padding: 9px 4px 7px; border-radius: 18px;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.01em;
  color: #b4b3cc;
  transition: background 0.35s var(--slow), color 0.35s var(--slow), transform 0.25s var(--slow);
}
.tab svg { width: 24px; height: 24px; transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.tab:hover { color: var(--paper); }
.tab:active { transform: scale(0.94); }
.tab.is-active { color: var(--night); background: var(--tab); }
.tab.is-active svg { stroke-width: 2.100; transform: translateY(-2px) rotate(-6deg) scale(1.08); }
.tab.is-active::after {
  content: ''; position: absolute; top: -9px; left: 50%; width: 6px; height: 6px; margin-left: -3px;
  border-radius: 50%; background: var(--tab);
}

/* Device view: pre-order status */
.view[hidden] { display: none; }
.pill--sage { background: #dcebe6; color: var(--sage-deep); }
/* Order ticket */
.ticket {
  position: relative; margin: 0 var(--gut); padding: 30px 22px 30px; color: var(--night);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0 0.2  0 0 0 .32 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"), linear-gradient(162deg, #ab9ff2 0%, #dca5e8 34%, #ffa9a2 66%, #ffd47e 100%);
  /* Scalloped top and bottom edges */
  -webkit-mask: radial-gradient(circle 8px at 50% 0, #0000 97%, #000) top / 26px 51% repeat-x,
                radial-gradient(circle 8px at 50% 100%, #0000 97%, #000) bottom / 26px 51% repeat-x;
          mask: radial-gradient(circle 8px at 50% 0, #0000 97%, #000) top / 26px 51% repeat-x,
                radial-gradient(circle 8px at 50% 100%, #0000 97%, #000) bottom / 26px 51% repeat-x;
  border-radius: 18px;
}
.ticket__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ticket__brand { padding: 5px 10px 4px; background: var(--night); color: var(--paper); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.04em; line-height: 1; }
.ticket__no { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; }
.ticket__art { display: block; width: 74%; height: auto; margin: 18px auto 10px; filter: drop-shadow(0 14px 18px rgba(25, 27, 56, 0.25)); }
.ticket__status { display: flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.ticket__status svg { width: 16px; height: 16px; stroke-width: 2.6; }
.ticket__title { margin-top: 4px; font-weight: 600; font-size: 2.3rem; line-height: 0.95; letter-spacing: -0.035em; text-transform: uppercase; text-wrap: balance; }
/* Tear line with a notch cut on each side */
.ticket__tear { position: relative; height: 2px; margin: 22px -22px 18px; background: repeating-linear-gradient(90deg, rgba(25, 27, 56, 0.55) 0 7px, #0000 7px 13px); background-clip: content-box; padding: 0 22px; }
.ticket__tear::before, .ticket__tear::after { content: ''; position: absolute; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: var(--cream); }
.ticket__tear::before { left: -13px; }
.ticket__tear::after { right: -13px; }
.ticket__facts { margin: 0; display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.ticket__facts dt { font-weight: 600; font-size: 1rem; }
.ticket__facts dd { margin: 0; font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.8; }
.ticket__facts div:last-child { text-align: right; }
.ticket__code { margin-top: 20px; padding: 10px 12px 8px; background: var(--paper); border-radius: 6px; }
.ticket__bars {
  display: block; height: 46px;
  background:
    repeating-linear-gradient(90deg, #0000 0 17px, var(--paper) 17px 20px, #0000 20px 31px),
    repeating-linear-gradient(90deg, #0000 0 23px, var(--night) 23px 26px, #0000 26px 41px),
    repeating-linear-gradient(90deg, var(--night) 0 2px, #0000 2px 5px, var(--night) 5px 6px, #0000 6px 9px, var(--night) 9px 12px, #0000 12px 14px);
}
.ticket__codeno { display: block; margin-top: 6px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; text-align: center; }

.steps { list-style: none; margin: 0 var(--gut); padding: 0; }
.step { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 14px; padding-bottom: 22px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: #e3dacb; }
.step:last-child::before { display: none; }
.step.is-done::before { background: var(--sage); }
.step__mark { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); box-shadow: inset 0 0 0 2px #e3dacb; }
.step__mark svg { width: 18px; height: 18px; stroke-width: 2.400; }
.step.is-done .step__mark { background: var(--sage); color: var(--paper); box-shadow: none; }
.step.is-now .step__mark { background: var(--apricot); box-shadow: 0 0 0 6px #fbe1c8; }
.step.is-now .step__mark::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--paper); }
.step h3 { margin: 4px 0 0; font-size: 1rem; font-weight: 600; }
.step p { margin-top: 2px; font-size: 0.875rem; line-height: 1.4; color: var(--ink-soft); }
.step:not(.is-done):not(.is-now) h3 { color: var(--ink-soft); }

.help {
  margin: 36px var(--gut) 0; padding: 22px 20px; border-radius: 32px; background: var(--butter); color: var(--night);
  display: grid; gap: 14px;
}
.help h2 { font-family: var(--serif); font-weight: 450; font-variation-settings: 'SOFT' 100, 'opsz' 60; font-size: 1.3rem; line-height: 1.15; }
.btn--night { background: var(--night); color: var(--paper); height: 50px; }

/* Product page: gallery, benefits, comparison, buy bar */
.po-gallery-wrap { margin-top: 18px; }
.po-gallery {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0 var(--gut); scroll-padding-inline: var(--gut); scrollbar-width: none;
}
.po-gallery::-webkit-scrollbar { display: none; }
.po-slide {
  position: relative; isolation: isolate; flex: none; width: 90%; aspect-ratio: 1 / 1.300; scroll-snap-align: start;
  border-radius: 36px; overflow: hidden; background: var(--night); color: var(--paper);
  display: flex; align-items: flex-end;
}
.po-slide img { position: absolute; inset: 0 0 auto; z-index: -2; width: 100%; height: auto; }
.po-slide::after { content: ''; position: absolute; inset: 52% 0 0; z-index: -1; background: linear-gradient(to bottom, rgba(25, 27, 56, 0), var(--night) 52%); }
.po-slide__text { padding: 20px 22px 22px; }
.po-slide h2 { font-family: var(--serif); font-weight: 400; font-variation-settings: 'SOFT' 100, 'opsz' 144; font-size: 1.55rem; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
.po-slide p { margin-top: 6px; font-size: 0.9375rem; line-height: 1.4; color: rgba(255, 250, 242, 0.82); }
.po-dots { display: flex; justify-content: center; gap: 6px; margin-top: 14px; }
.po-dots i { width: 6px; height: 6px; border-radius: 999px; background: #d9cfbe; transition: width 0.35s var(--slow), background 0.35s var(--slow); }
.po-dots i.on { width: 20px; background: var(--apricot); }

.po-head { padding: 22px var(--gut) 0; }
.po-head h1 { max-width: none; }
.po-head__text { margin-top: 8px; color: var(--ink-soft); line-height: 1.45; }

.po-benefits { margin: 26px var(--gut) 0; display: grid; gap: 18px; }
.po-benefits li { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: start; }
.po-benefit__icon { width: 48px; height: 48px; border-radius: 18px; display: grid; place-items: center; background: var(--butter); color: var(--night); }
.po-benefits li:nth-child(2) .po-benefit__icon { background: var(--sage); }
.po-benefits li:nth-child(3) .po-benefit__icon { background: var(--blush); }
.po-benefits li:nth-child(4) .po-benefit__icon { background: var(--lilac); }
.po-benefit__icon svg { width: 24px; height: 24px; }
.po-benefits h3 { margin: 2px 0 0; font-size: 1rem; font-weight: 600; line-height: 1.3; }
.po-benefits p { margin-top: 2px; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-soft); }

.po-compare { margin: 0 var(--gut); padding: 6px 0 8px 18px; border-radius: 32px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); overflow: hidden; }
.po-compare table { width: 100%; border-collapse: collapse; }
.po-compare thead th { padding: 14px 6px 10px; width: 84px; font-size: 0.8125rem; font-weight: 600; line-height: 1.2; color: var(--ink-soft); vertical-align: bottom; }
.po-compare thead th.is-us { color: var(--night); }
.po-compare tbody th { padding: 12px 10px 12px 0; text-align: left; font-weight: 500; font-size: 0.9375rem; line-height: 1.3; border-top: 1px solid var(--line); }
.po-compare td { padding: 0; text-align: center; border-top: 1px solid var(--line); }
.po-compare thead td { border: 0; }
.po-compare .is-us { background: #fbe8d6; border-top-color: transparent; }
.po-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; vertical-align: middle; }
.po-mark svg { width: 16px; height: 16px; stroke-width: 2.600; }
.po-mark--yes { background: var(--sage-deep); color: var(--paper); }
.po-mark--no { color: #b3ab9c; }

.po-bar {
  /* Separate navy card floating just above the tab bar's wave. */
  position: fixed; z-index: 9; left: 0; right: 0; margin-inline: auto; width: min(100% - 24px, 416px);
  bottom: calc(var(--tabs-h, calc(env(safe-area-inset-bottom) + 70px)) + 26px);
  padding: 10px 10px 10px 22px; border-radius: 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--night); color: var(--paper);
  box-shadow: 0 12px 28px -14px rgba(25, 27, 56, 0.55);
}
#view-preorder { padding-bottom: 110px; }
.po-bar p { display: grid; line-height: 1.15; }
.po-bar p span { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #b4b3cc; }
.po-bar p strong { font-family: var(--serif); font-weight: 450; font-variation-settings: 'SOFT' 100, 'opsz' 60; font-size: 1.6rem; letter-spacing: -0.01em; }
.po-bar .btn { flex: none; height: 50px; padding: 0 28px; }

/* Pre-order page */
.po-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.po-plus h2, .po-sum h2 { font-family: var(--serif); font-weight: 450; font-variation-settings: 'SOFT' 100, 'opsz' 60; font-size: 1.4rem; line-height: 1.15; letter-spacing: -0.015em; }
.po-price { flex: none; font-size: 1.375rem; font-weight: 600; }

.po-covers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 var(--gut); }
.po-cover {
  position: relative; display: grid; gap: 2px; padding: 12px 14px 14px; border-radius: 28px;
  background: var(--paper); cursor: pointer;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.25s var(--slow), background 0.25s var(--slow), transform 0.25s var(--slow);
}
.po-cover:active { transform: scale(0.97); }
.po-cover input, .po-switch input { position: absolute; opacity: 0; pointer-events: none; }
.po-cover img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; margin-bottom: 6px; }
.po-cover__name { font-weight: 600; }
.po-cover__price { font-size: 0.875rem; color: var(--ink-soft); }
.po-cover__check {
  position: absolute; top: 12px; right: 12px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--cream); color: transparent; box-shadow: inset 0 0 0 2px #e3dacb;
  transition: background 0.25s var(--slow), color 0.25s var(--slow);
}
.po-cover__check svg { width: 16px; height: 16px; stroke-width: 2.600; }
.po-cover:has(input:checked) { background: #fbe8d6; box-shadow: inset 0 0 0 2px var(--apricot); }
.po-cover:has(input:checked) .po-cover__check { background: var(--apricot); color: var(--night); box-shadow: none; }
.po-cover:has(input:focus-visible), .po-switch:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 3px; }

.pill--apricot { background: var(--apricot); color: var(--night); }
.po-plus { margin: 34px var(--gut) 0; padding: 22px 20px 20px; border-radius: 32px; background: var(--night); color: var(--paper); }
.po-plus h2 { margin-top: 14px; font-size: 1.6rem; }
.po-plus__lede { margin-top: 6px; font-size: 0.9375rem; color: rgba(255, 250, 242, 0.76); }
.po-plus__list { margin-top: 14px; display: grid; gap: 10px; }
.po-plus__list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 0.9375rem; line-height: 1.4; }
.po-plus__list svg { width: 22px; height: 22px; color: var(--apricot); stroke-width: 2.400; }
.po-switch {
  position: relative; display: grid; grid-template-columns: 52px 1fr; align-items: center; gap: 14px;
  margin-top: 20px; padding: 14px 16px; border-radius: 22px; background: rgba(255, 250, 242, 0.1); cursor: pointer;
  transition: background 0.25s var(--slow);
}
.po-switch b { display: block; font-weight: 600; }
.po-switch small { display: block; margin-top: 2px; font-size: 0.8125rem; line-height: 1.35; color: rgba(255, 250, 242, 0.72); }
.po-switch__track { width: 52px; height: 32px; border-radius: 999px; background: rgba(255, 250, 242, 0.28); position: relative; transition: background 0.25s var(--slow); }
.po-switch__track::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); transition: transform 0.3s var(--slow); }
.po-switch:has(input:checked) { background: rgba(242, 162, 92, 0.2); }
.po-switch:has(input:checked) .po-switch__track { background: var(--apricot); }
.po-switch:has(input:checked) .po-switch__track::after { transform: translateX(20px); }

.po-sum { margin: 34px var(--gut) 0; padding: 22px 20px 20px; border-radius: 32px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.po-lines { margin: 14px 0 0; display: grid; gap: 8px; }
.po-lines div, .po-total { display: flex; justify-content: space-between; gap: 16px; }
.po-lines dt { color: var(--ink-soft); }
.po-lines dd { margin: 0; font-weight: 500; }
.po-total { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 600; font-size: 1.125rem; }
.po-sum__note { margin-top: 8px; font-size: 0.8125rem; color: var(--ink-soft); }

/* Profile sheet */
.sheet {
  position: fixed; inset: auto 0 0; margin: 0 auto;
  width: min(100%, 440px); max-width: none; max-height: none;
  border: 0; border-radius: 28px 28px 0 0;
  padding: 20px var(--gut) calc(env(safe-area-inset-bottom) + 28px);
  background: var(--paper); color: var(--ink);
}
.sheet[open] { animation: sheet-up 0.4s var(--slow); }
.sheet::backdrop { background: rgba(25, 27, 56, 0.45); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.sheet h2 { font-family: var(--serif); font-weight: 450; font-variation-settings: 'SOFT' 100, 'opsz' 60; font-size: 1.5rem; letter-spacing: -0.015em; }
.sheet__close { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); }
.sheet__close svg { width: 20px; height: 20px; }
.langs { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; }
.langs legend { padding: 0; margin-bottom: 10px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); }
.lang {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px;
  background: var(--cream); font-weight: 600; cursor: pointer;
  box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 0.25s var(--slow), background 0.25s var(--slow);
}
.lang input { position: absolute; opacity: 0; pointer-events: none; }
.lang__flag { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 0.75rem; letter-spacing: 0.04em; background: var(--lilac); color: var(--night); }
.lang:has(input:checked) { background: #fbe8d6; box-shadow: inset 0 0 0 2px var(--apricot); }
.lang:has(input:checked) .lang__flag { background: var(--apricot); }
.lang:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Accounts, story flow, player, Prime */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Buttons */
.btn--block { display: flex; width: 100%; flex: none; }
.btn--quiet { height: 44px; padding: 0 14px; background: none; color: var(--sage-deep); font-size: 0.9375rem; }
.btn--danger { color: #b4513f; }
.btn[disabled] { opacity: 0.4; cursor: default; pointer-events: none; }
.custom__cta { height: 44px; margin-top: 14px; padding: 0 20px; font-size: 0.9375rem; }

/* Forms */
.field { display: grid; gap: 6px; margin-top: 14px; }
.field > span { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-soft); }
.field input, .field select, .field__area {
  width: 100%; height: 52px; padding: 0 18px; border: 0; border-radius: 18px;
  background: var(--cream); color: var(--ink); font: 400 1rem/1.3 var(--sans); font-size: max(16px, 1rem);
  box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow 0.25s var(--slow), background 0.25s var(--slow);
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder, .field__area::placeholder { color: #a29fb2; }
.field input:focus, .field select:focus, .field__area:focus { outline: 0; background: var(--paper); box-shadow: inset 0 0 0 2px var(--apricot); }
.field select {
  padding-right: 40px;
  background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2323223a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9.500l6 6 6-6'/%3E%3C/svg%3E") right 14px center / 20px no-repeat;
}
.field__area { display: block; height: auto; min-height: 150px; padding: 16px 18px; margin-top: 14px; line-height: 1.5; resize: vertical; }
.field__hint { margin-top: 6px; font-size: 0.8125rem; color: var(--ink-soft); }
.form__error { margin-top: 12px; padding: 10px 14px; border-radius: 16px; background: #fbe3dc; color: #8f3a29; font-size: 0.9375rem; line-height: 1.35; }
.form__info { margin-top: 12px; padding: 10px 14px; border-radius: 16px; background: #dcebe6; color: #365f56; font-size: 0.9375rem; line-height: 1.35; }
.form__error[hidden], .form__info[hidden], .toast[hidden], .consent[hidden] { display: none; }

/* Sheets */
.sheet { max-height: calc(100dvh - 20px); overflow-y: auto; }
.auth__lede, .pro__lede { color: var(--ink-soft); line-height: 1.45; margin-bottom: 14px; }
.auth__google { display: flex; justify-content: center; min-height: 44px; margin-bottom: 4px; }
.auth__or { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; font-size: 0.8125rem; color: var(--ink-soft); }
.auth__or::before, .auth__or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth__form .btn { margin-top: 18px; }
.auth__links { display: grid; justify-items: center; margin-top: 8px; }

.sheet--night { background: var(--night); color: var(--paper); }
.sheet--night .sheet__close { background: rgba(255, 250, 242, 0.12); color: var(--paper); }
.sheet--night .pro__lede { color: rgba(255, 250, 242, 0.76); }
.pro__price { font-family: var(--serif); font-weight: 450; font-variation-settings: 'SOFT' 100, 'opsz' 60; font-size: 2rem; letter-spacing: -0.02em; color: var(--apricot); }
.sheet--night .po-plus__list { margin: 12px 0 16px; }
.plan { margin-top: 14px; padding: 16px; border-radius: 24px; background: rgba(255, 250, 242, 0.07); }
.plan__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plan__head h3 { font-family: var(--serif); font-weight: 450; font-size: 1.375rem; letter-spacing: -0.01em; }
.plan__price { font-family: var(--serif); font-size: 1.25rem; color: var(--apricot); white-space: nowrap; }
.plan .btn + .btn { margin-top: 10px; }
.plan .btn--ghost { height: 50px; background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.500px rgba(255, 250, 242, 0.35); }
.plan .btn[disabled] { opacity: 0.55; }
.plan__note { margin-top: 14px; font-size: 0.875rem; text-align: center; color: rgba(255, 250, 242, 0.7); }
.story__lock { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(27, 34, 64, 0.72); color: var(--paper); }
.story__lock svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.800; stroke-linecap: round; stroke-linejoin: round; }

/* Account block */
.acct { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.acct__who { display: grid; line-height: 1.3; }
.acct__who span { font-size: 0.875rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.acct__plan { margin-top: 8px; font-size: 0.9375rem; color: var(--ink-soft); }
.acct__btns { display: grid; gap: 10px; margin-top: 16px; justify-items: stretch; }
.acct__btns .btn--quiet { justify-self: center; }

/* Player */
.player__cover { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 32px; background: var(--butter); }
.player h2 { margin: 18px 0 14px; line-height: 1.15; text-wrap: balance; }
.player audio { display: none; }
.pl { margin-top: 4px; }
.pl__seek { --p: 0%; -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 28px; margin: 0; background: none; cursor: pointer; }
.pl__seek::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--apricot) var(--p), rgba(255, 250, 242, 0.16) var(--p)); }
.pl__seek::-moz-range-track { height: 6px; border-radius: 999px; background: linear-gradient(90deg, var(--apricot) var(--p), rgba(255, 250, 242, 0.16) var(--p)); }
.pl__seek::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: var(--paper); border: 0; }
.pl__seek::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--paper); border: 0; }
.pl__times { display: flex; justify-content: space-between; font-size: 0.8125rem; font-variant-numeric: tabular-nums; color: rgba(255, 250, 242, 0.6); }
.pl__btns { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 14px 0 6px; }
.pl__toggle { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; background: var(--apricot); color: var(--night); box-shadow: 0 14px 30px -12px rgba(242, 162, 92, 0.6); transition: transform 0.25s var(--slow); }
.pl__toggle:active, .pl__skip:active { transform: scale(0.94); }
.pl__toggle svg { width: 38px; height: 38px; }
.pl__toggle:not(.is-playing) svg { margin-left: 4px; }
.pl__skip { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; color: var(--paper); background: rgba(255, 250, 242, 0.1); transition: transform 0.25s var(--slow); }
.pl__skip svg { width: 32px; height: 32px; }
.pl__skip text { font: 700 6.5px var(--sans); fill: currentColor; stroke: none; }
/* Night player: dark sheet, near-black backdrop and dark audio controls, so it throws little light in a dark bedroom. */
.player::backdrop { background: rgba(8, 9, 22, 0.82); }
.player audio { color-scheme: dark; border-radius: 999px; }
.player .pill--sage { background: rgba(255, 250, 242, 0.12); color: rgba(255, 250, 242, 0.82); }

/* Toast and consent: floating cards above the tab bar */
.toast, .consent {
  position: fixed; z-index: 30; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabs-h, calc(env(safe-area-inset-bottom) + 70px)) + 26px);
}
.toast {
  top: auto; right: auto; margin: 0; border: 0; overflow: visible; /* reset the popover defaults */
  width: max-content; max-width: min(calc(100% - 32px), 400px);
  padding: 13px 20px; border-radius: 999px; background: var(--night); color: var(--paper);
  font-size: 0.9375rem; font-weight: 500; line-height: 1.3; text-align: center;
  box-shadow: 0 12px 28px -14px rgba(25, 27, 56, 0.55);
  opacity: 0; transition: opacity 0.4s var(--slow), transform 0.4s var(--slow); transform: translate(-50%, 8px);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.consent {
  width: min(calc(100% - 24px), 416px); padding: 16px 16px 14px 20px; border-radius: 26px;
  background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 14px 32px -14px rgba(25, 27, 56, 0.4);
}
.consent p { font-size: 0.875rem; line-height: 1.4; }
.consent div { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.consent .btn { flex: none; height: 44px; padding: 0 20px; font-size: 0.9375rem; }
.consent .btn--quiet { padding: 0 14px; }
.app:has(.consent:not([hidden])) { padding-bottom: calc(env(safe-area-inset-bottom) + 260px); }

/* Create flow */
#view-create { padding-bottom: 20px; }
.flow { padding: 0 var(--gut); }
.flow--script { padding-bottom: 110px; }
.flow__head { display: flex; align-items: center; gap: 14px; padding-top: 14px; }
.flow__back { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 250, 242, 0.8); box-shadow: inset 0 0 0 1px var(--line); }
.flow__back svg { width: 20px; height: 20px; }
.flow__dots { flex: 1; display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.flow__dots li { flex: 1; height: 6px; border-radius: 999px; background: #e3dacb; transition: background 0.5s var(--slow); }
.flow__dots li.is-done { background: var(--sage); }
.flow__dots li.is-now { background: var(--apricot); }
.flow__step { flex: none; font-size: 0.8125rem; font-weight: 600; color: var(--ink-soft); }
.flow__title { margin-top: 24px; max-width: none; font-size: clamp(1.7rem, 7.4vw, 2rem); }
.flow__lede { margin-top: 8px; color: var(--ink-soft); line-height: 1.45; }
.flow__sub { margin: 26px 0 10px; font-family: var(--serif); font-weight: 450; font-variation-settings: 'SOFT' 100, 'opsz' 60; font-size: 1.25rem; letter-spacing: -0.01em; }
.flow__row { display: flex; gap: 12px; align-items: flex-end; }
.field--grow { flex: 1; min-width: 0; }
.field--age { width: 96px; flex: none; }
.flow__next { margin-top: 26px; }
.flow--script .hello__eyebrow { margin-top: 22px; margin-bottom: 0; }
.flow--script .flow__title { margin-top: 4px; }

/* Mic */
.flow__mic { display: grid; justify-items: center; margin-top: 22px; }
.mic { display: grid; justify-items: center; gap: 10px; font-size: 0.9375rem; font-weight: 600; text-align: center; }
.mic__ico { position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: var(--apricot); color: var(--night); transition: transform 0.3s var(--slow), background 0.4s var(--slow); }
.mic__ico svg { width: 34px; height: 34px; }
.mic:active .mic__ico { transform: scale(0.95); }
.mic.is-rec .mic__ico { background: var(--orange); animation: mic-pulse 2.2s var(--slow) infinite; }
.mic[disabled] .mic__ico { opacity: 0.5; }
.mic--small { flex: none; }
.mic--small .mic__ico { width: 52px; height: 52px; background: var(--lilac); }
.mic--small .mic__ico svg { width: 24px; height: 24px; }
.mic--small.is-rec .mic__ico { background: var(--orange); }
@keyframes mic-pulse { 0% { box-shadow: 0 0 0 0 rgba(233, 131, 69, 0.45); } 70%, 100% { box-shadow: 0 0 0 22px rgba(233, 131, 69, 0); } }

/* Chips, cast, length */
.chips { display: grid; gap: 10px; margin-top: 18px; }
.chip, .castcard {
  position: relative; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 12px; width: 100%;
  padding: 14px 16px; border-radius: 22px; background: var(--paper); text-align: left; line-height: 1.35; font-weight: 500;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.3s var(--slow), background 0.3s var(--slow), transform 0.25s var(--slow);
}
.chip:active, .castcard:active { transform: scale(0.98); }
.chip svg, .castcard__tick { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--cream); color: transparent; box-shadow: inset 0 0 0 2px #e3dacb; stroke-width: 2.600; transition: background 0.3s var(--slow), color 0.3s var(--slow); }
.castcard__tick svg { width: 100%; height: 100%; stroke-width: 2.600; }
.chip[aria-pressed="true"], .castcard[aria-pressed="true"] { background: #fbe8d6; box-shadow: inset 0 0 0 2px var(--apricot); }
.chip[aria-pressed="true"] svg, .castcard[aria-pressed="true"] .castcard__tick { background: var(--apricot); color: var(--night); box-shadow: none; }
.castcard { margin-top: 18px; }
.castcard b { display: block; font-weight: 600; }
.castcard small { display: block; margin-top: 1px; font-size: 0.8125rem; color: var(--ink-soft); font-weight: 400; }

.cast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 10px; margin-top: 18px; }
.cast__btn { display: grid; justify-items: center; gap: 8px; }
.cast__img { display: block; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--butter); border: 3px solid var(--cream); box-shadow: 0 0 0 2px transparent; transition: box-shadow 0.3s var(--slow), transform 0.3s var(--slow); }
.cast__img img { width: 100%; height: 100%; object-fit: cover; }
.cast__btn:active .cast__img { transform: scale(0.95); }
.cast__btn[aria-pressed="true"] .cast__img { box-shadow: 0 0 0 3px var(--apricot); }
.cast__name { font-size: 0.8125rem; font-weight: 500; }
.cast__btn[aria-pressed="true"] .cast__name { font-weight: 600; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 5px; border-radius: 24px; background: #ece3d3; }
.seg__opt { display: grid; gap: 1px; padding: 10px 4px; border-radius: 19px; text-align: center; transition: background 0.3s var(--slow), box-shadow 0.3s var(--slow); }
.seg__opt b { font-weight: 600; font-size: 0.9375rem; }
.seg__opt small { font-size: 0.75rem; color: var(--ink-soft); }
.seg__opt[aria-checked="true"] { background: var(--paper); box-shadow: 0 6px 14px -8px rgba(25, 27, 56, 0.4); }

/* Waiting: a slow moon, no spinner */
.wait { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 36px 12px 24px; }
.wait h1 { margin-top: 6px; max-width: 12em; font-size: 1.7rem; }
.wait p { color: var(--ink-soft); line-height: 1.45; max-width: 18em; }
.wait__moon { display: block; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(circle at 36% 32%, #fff3cf, var(--butter) 62%, var(--apricot)); animation: moon 3.8s ease-in-out infinite; }
@keyframes moon { 0%, 100% { transform: scale(0.92); opacity: 0.8; box-shadow: 0 0 0 0 rgba(245, 212, 138, 0.5); } 50% { transform: scale(1.04); opacity: 1; box-shadow: 0 0 0 26px rgba(245, 212, 138, 0); } }

/* Script */
.paper { margin-top: 18px; padding: 24px 22px; border-radius: 28px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); font-family: var(--serif); font-variation-settings: 'SOFT' 50, 'opsz' 14; font-size: 1.125rem; line-height: 1.7; }
.paper p + p { margin-top: 1em; }
.revise__row { display: flex; gap: 10px; align-items: center; }
.revise__row input { flex: 1; min-width: 0; height: 52px; padding: 0 18px; border: 0; border-radius: 18px; background: var(--cream); font: 400 1rem var(--sans); font-size: max(16px, 1rem); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.revise__row input:focus { outline: 0; background: var(--paper); box-shadow: inset 0 0 0 2px var(--apricot); }
.revise__go { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.revise__go small { font-size: 0.8125rem; color: var(--ink-soft); }
.revise__go .btn { height: 46px; padding: 0 22px; font-size: 0.9375rem; }
.flow__bar { align-items: center; }
.flow__hint { font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; color: #b4b3cc; }
.flow__bar-end { display: grid; justify-items: end; gap: 6px; margin-left: auto; }
.flow__bar .btn { flex: none; height: 50px; padding: 0 24px; }
.form__error--bar { margin: 0; padding: 6px 12px; font-size: 0.8125rem; }
/* Something failed: a calm note across the top of the bar, the count and the retry button on their own row below. */
.flow__bar.has-note { flex-wrap: wrap; row-gap: 12px; padding: 16px 12px 12px 18px; }
.flow__note { flex: 0 0 100%; display: flex; align-items: flex-start; gap: 12px; padding: 0 6px 14px 0; border-bottom: 1px solid rgba(255, 250, 242, 0.14); }
.flow__note-moon { flex: none; width: 26px; height: 26px; margin-top: 2px; border-radius: 50%; box-shadow: inset -8px -3px 0 0 var(--butter); transform: rotate(-18deg); }
.flow__bar .flow__note p { display: block; font-size: 0.875rem; line-height: 1.4; color: #d6d4e6; }
.flow__bar .flow__note strong { display: block; margin-bottom: 2px; font-family: var(--serif); font-weight: 450; font-size: 1.0625rem; line-height: 1.25; color: var(--paper); text-transform: none; letter-spacing: 0; }

/* Making and ready */
.making { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 56px 8px 24px; }
.making h1 { margin-top: 14px; max-width: 12em; font-size: 1.8rem; }
.making p { color: var(--ink-soft); line-height: 1.45; max-width: 20em; }
.making__name { font-family: var(--serif); font-size: 1.125rem; color: var(--ink) !important; }
.making__cover { width: 220px; aspect-ratio: 1; border-radius: 44px; overflow: hidden; background: var(--butter); display: grid; place-items: center; box-shadow: 0 24px 40px -24px rgba(25, 27, 56, 0.45); }
.making__cover img { width: 100%; height: 100%; object-fit: cover; }
.making.is-ready { padding-top: 20px; }
.making.is-ready .making__cover { width: min(100%, 360px); border-radius: 48px; }
.making__cover.is-pulse { animation: cover-pulse 3.8s ease-in-out infinite; }
@keyframes cover-pulse { 0%, 100% { transform: scale(0.97); opacity: 0.85; } 50% { transform: scale(1); opacity: 1; } }
.making__btns { display: grid; gap: 8px; justify-items: center; margin-top: 18px; width: 100%; }
.making__btns .btn--primary { width: 100%; flex: none; }
.making__btns .btn--night { padding: 0 28px; white-space: nowrap; }

/* Our stories */
.ours__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 var(--gut); }
.ours__left { font-size: 0.875rem; font-weight: 500; color: var(--ink-soft); }
.ours__top .btn { height: 46px; padding: 0 22px; font-size: 0.9375rem; }
.ours__list { display: grid; gap: 10px; padding: 18px var(--gut) 0; }
.ours__row { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 8px; border-radius: 26px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); }
.ours__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; text-align: left; border-radius: 20px; }
.ours__main img { flex: none; width: 64px; height: 64px; border-radius: 20px; object-fit: cover; background: var(--butter); }
.ours__main span { display: grid; min-width: 0; line-height: 1.3; }
.ours__main b { font-weight: 600; font-size: 0.9375rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ours__main small { margin-top: 2px; font-size: 0.8125rem; color: var(--ink-soft); }
.ours__main small.is-pending { color: var(--sage-deep); font-weight: 600; }
.ours__del { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-soft); }
.ours__del svg { width: 20px; height: 20px; }
.ours__views { display: flex; justify-content: flex-end; gap: 4px; padding: 16px var(--gut) 0; }
.ours__views button { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-soft); }
.ours__views button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.ours__views svg { width: 20px; height: 20px; }
.ours__views + .ours__list { padding-top: 10px; }
.ours__list.is-grid { grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.is-grid .ours__row { position: relative; display: block; padding: 8px; border-radius: 28px; }
.is-grid .ours__main { display: grid; gap: 10px; }
.is-grid .ours__main img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 22px; }
.is-grid .ours__main span { padding: 0 6px 6px; }
.is-grid .ours__del { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; background: rgba(255, 250, 242, 0.9); color: var(--ink); box-shadow: 0 2px 8px rgba(25, 27, 56, 0.18); }
.is-grid .ours__del svg { width: 18px; height: 18px; }
.ours__none, .ours__empty { margin: 22px var(--gut) 0; padding: 24px 22px; border-radius: 28px; background: var(--paper); box-shadow: 0 0 0 1px var(--line); color: var(--ink-soft); line-height: 1.45; }
.ours__empty { display: grid; gap: 16px; justify-items: start; }
.ours__empty .btn { height: 46px; padding: 0 22px; font-size: 0.9375rem; }

@media (prefers-reduced-motion: reduce) {
  .wait__moon, .making__cover.is-pulse, .mic.is-rec .mic__ico { animation: none !important; }
  .toast { transition: none !important; }
}

/* ---- Referrals: profile row, Home card, invite sheet ---- */
.acct-invite {
  display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 12px 14px 12px 12px; text-align: left;
  border-radius: 20px; color: var(--night);
  background: linear-gradient(120deg, #e6defc 0%, #f6dcef 45%, #ffe0d6 75%, #fff0cc 100%);
  box-shadow: inset 0 0 0 1px rgba(25, 27, 56, 0.06);
}
.acct-invite__ico { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 14px; background: var(--night); color: var(--butter); }
.acct-invite__ico svg { width: 22px; height: 22px; }
.acct-invite__txt { flex: 1; display: grid; line-height: 1.25; }
.acct-invite__txt small { font-size: 0.8125rem; color: rgba(25, 27, 56, 0.7); }
.acct-invite > svg { width: 18px; height: 18px; opacity: 0.55; }

/* Home: a slim ticket stub, hidden for good with the × */
.invite-card {
  position: relative; display: flex; align-items: stretch; margin: 18px var(--gut) 0;
  border-radius: 22px; color: var(--night); overflow: hidden;
  background: linear-gradient(110deg, #d9d1fb 0%, #f1d3ef 42%, #ffd6cc 72%, #ffeab8 100%);
  animation: invite-in 0.6s var(--slow) both 0.2s;
}
@keyframes invite-in { from { opacity: 0; transform: translateY(8px); } }
.invite-card__main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 12px 6px 12px 0; text-align: left; }
.invite-card__stub {
  position: relative; align-self: stretch; width: 62px; flex: none; display: grid; place-items: center;
  margin: -12px 0; color: var(--butter); background: var(--night);
}
/* perforation between the stub and the rest of the card */
.invite-card__stub::after {
  content: ''; position: absolute; top: 6px; bottom: 6px; right: -1px; width: 2px;
  background: repeating-linear-gradient(180deg, var(--night) 0 5px, #0000 5px 10px);
}
.invite-card__stub svg { width: 26px; height: 26px; animation: gift-nod 4.5s var(--slow) infinite 1.2s; }
@keyframes gift-nod { 0%, 84%, 100% { transform: rotate(0); } 88% { transform: rotate(-10deg); } 93% { transform: rotate(8deg); } }
.invite-card__txt { display: grid; gap: 1px; line-height: 1.25; }
.invite-card__txt b { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; letter-spacing: -0.01em; }
.invite-card__txt small { font-size: 0.8125rem; color: rgba(25, 27, 56, 0.72); }
.invite-card__x { width: 40px; flex: none; display: grid; place-items: center; color: rgba(25, 27, 56, 0.55); }
.invite-card__x svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) { .invite-card, .invite-card__stub svg { animation: none; } }

/* Invite sheet */
.sheet--invite .pro__lede { margin-bottom: 18px; }
.ticket--mini { margin: 0; padding: 24px 20px 24px; transform: rotate(-1.2deg); box-shadow: none; }
.ticket--mini .ticket__status { margin-top: 18px; }
.ticket--mini .ticket__title { font-size: 2rem; }
.ticket--mini .ticket__tear { margin: 18px -20px 14px; padding: 0 20px; }
.ticket--mini .ticket__tear::before, .ticket--mini .ticket__tear::after { background: var(--paper); }
.ref-note { margin-top: 14px; font-size: 0.875rem; color: var(--ink-soft); text-align: center; }
.ref-msg { margin-top: 20px; }
.ref-msg > span i { font-style: normal; font-weight: 400; letter-spacing: 0; }
.ref-msg .field__area { margin-top: 0; min-height: 168px; font-family: var(--serif); font-size: 1.0625rem; font-variation-settings: 'SOFT' 100; }
.ref-reset { display: block; height: 32px; margin: 4px 0 0 auto; padding: 0 4px; font-size: 0.8125rem; }
.ref-reset[hidden] { display: none; }
.ref-link {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 6px 6px 6px 16px;
  border-radius: 999px; background: var(--cream); box-shadow: inset 0 0 0 1.5px var(--line);
}
.ref-link span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9375rem; color: var(--ink-soft); }
.ref-copy { height: 36px; padding: 0 16px; border-radius: 999px; background: var(--night); color: var(--paper); font-weight: 600; font-size: 0.875rem; }
.ref-copy[disabled], .ref-share[disabled] { opacity: 0.45; }
.ref-share { margin-top: 12px; }
.ref-ch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.ref-ch__btn { display: grid; justify-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 18px; background: var(--cream); font-size: 0.8125rem; font-weight: 600; }
.ref-ch__btn svg { width: 22px; height: 22px; }
.ref-ch__btn[data-ch="whatsapp"] svg { color: #1f9d55; }
.ref-ch__btn[data-ch="telegram"] svg { color: #2a8bd6; }
.ref-ch__btn[data-ch="email"] svg { color: var(--orange); }
.ref-ch__btn.is-wait, .ref-preview.is-wait { opacity: 0.45; pointer-events: none; }
.ref-preview { display: flex; align-items: center; justify-content: center; gap: 2px; margin-top: 14px; font-size: 0.9375rem; font-weight: 600; color: var(--sage-deep); }
.ref-preview svg { width: 16px; height: 16px; }
.ref-h { margin: 26px 0 10px; font-family: var(--serif); font-weight: 450; font-size: 1.15rem; letter-spacing: -0.01em; }
.ref-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ref-stats div { display: grid; justify-items: center; gap: 2px; padding: 12px 4px; border-radius: 16px; background: var(--cream); text-align: center; }
.ref-stats b { font: 500 1.5rem/1 var(--serif); }
.ref-stats span { font-size: 0.6875rem; line-height: 1.2; color: var(--ink-soft); }
.ref-friends { display: grid; gap: 8px; }
.ref-friend { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 8px; border-radius: 16px; background: var(--cream); }
.ref-friend__av { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--lilac); font-weight: 600; }
.ref-friend__txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.ref-friend__txt small { font-size: 0.8125rem; color: var(--ink-soft); }
.ref-fine { margin-top: 22px; font-size: 0.8125rem; line-height: 1.45; color: var(--ink-soft); }

/* Plans sheet: the friend's gift */
.ref-gift {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border-radius: 18px; color: var(--night);
  background: linear-gradient(110deg, #d9d1fb 0%, #f1d3ef 42%, #ffd6cc 72%, #ffeab8 100%); font-size: 0.9375rem; font-weight: 500; line-height: 1.35;
}
.ref-gift svg { width: 24px; height: 24px; flex: none; }

/* Coming Soon (Device tab while the device_page flag is off) */
.soon { padding: 18px var(--gut) 40px; text-align: center; }
.soon__art { mix-blend-mode: multiply; display: block; width: min(68%, 260px); height: auto; margin: 12px auto 18px; }
.soon h1 { margin-bottom: 10px; }
.soon__text { color: var(--ink-soft); line-height: 1.5; max-width: 32ch; margin: 0 auto; text-wrap: pretty; }
.soon__form { max-width: 360px; margin: 22px auto 0; text-align: left; display: grid; gap: 14px; }
.soon__form .field { margin-top: 0; }
.soon__cta { width: 100%; }
.soon__msg { text-align: center; font-weight: 500; color: var(--sage-deep); }
.soon__msg.is-bad { color: #b3402f; }

/* Gift card celebration: the first time the app opens after a card is redeemed */
.celeb { position: fixed; overflow-x: clip; padding-top: 34px; text-align: center; isolation: isolate;
  background: radial-gradient(90% 260px at 50% 60px, rgba(171, 159, 242, 0.32) 0%, rgba(25, 27, 56, 0) 75%), var(--night); }
.celeb[open] { animation: sheet-up 0.7s var(--slow); }
.celeb::backdrop { background: rgba(25, 27, 56, 0.6); }
.celeb [hidden] { display: none; }
.celeb__sky { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.celeb__sky i { position: absolute; left: var(--x); top: var(--y); width: 3px; height: 3px; border-radius: 50%; background: #fbeecb; opacity: 0.5; animation: celeb-twinkle 4.5s ease-in-out var(--d) infinite; }
.celeb__box { position: relative; width: 96px; height: 92px; margin: 18px auto 8px; }
.celeb__glow { position: absolute; left: 50%; top: 40%; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 212, 138, 0.55) 0%, rgba(245, 212, 138, 0) 65%); animation: celeb-glow 1.6s var(--slow) both 0.9s, celeb-breathe 5s ease-in-out infinite 2.5s; }
.celeb__body { position: absolute; left: 10px; right: 10px; bottom: 0; height: 56px; border-radius: 10px;
  background: linear-gradient(90deg, #0000 calc(50% - 7px), var(--butter) calc(50% - 7px) calc(50% + 7px), #0000 calc(50% + 7px)), var(--apricot); }
.celeb__lid { position: absolute; left: 2px; right: 2px; bottom: 54px; height: 20px; border-radius: 8px;
  background: linear-gradient(90deg, #0000 calc(50% - 8px), var(--butter) calc(50% - 8px) calc(50% + 8px), #0000 calc(50% + 8px)), #f7b77a;
  transform-origin: 15% 100%; transform: translateY(-14px) rotate(-10deg); animation: celeb-lid 1.4s var(--slow) both 0.6s; }
.celeb__lid::before, .celeb__lid::after { content: ''; position: absolute; bottom: 100%; left: 50%; width: 20px; height: 14px; border: 4px solid var(--butter); border-radius: 50% 50% 0 50%; }
.celeb__lid::before { margin-left: -22px; }
.celeb__lid::after { margin-left: 2px; border-radius: 50% 50% 50% 0; }
.celeb__star { position: absolute; left: calc(50% + var(--x)); top: calc(40% + var(--y)); width: var(--s); height: var(--s); background: var(--butter);
  clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%);
  animation: celeb-star 1.6s var(--slow) both var(--d), celeb-breathe 5s ease-in-out infinite calc(var(--d) + 1.6s); }
.celeb__kicker { margin-top: 14px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--butter); }
.celeb h2 { margin-top: 8px; font-size: 1.85rem; line-height: 1.1; text-wrap: balance; overflow-wrap: anywhere; }
.celeb__what { margin-top: 10px; font-weight: 600; font-size: 1.0625rem; color: var(--apricot); }
.celeb__sub { margin-top: 4px; color: rgba(255, 250, 242, 0.76); line-height: 1.45; text-wrap: pretty; }
.celeb__note { position: relative; margin: 26px 0 0; padding: 20px 20px 16px; border-radius: 20px; background: var(--paper); color: var(--ink); text-align: left;
  animation: celeb-up 1s var(--slow) both 1.2s; }
.celeb__note::before { content: '“'; position: absolute; left: 14px; top: -20px; font: italic 400 3.6rem/1 var(--serif); color: var(--apricot); }
.celeb__to { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #c9742f; margin-bottom: 6px; overflow-wrap: anywhere; }
.celeb__msg { font-family: var(--serif); font-style: italic; font-variation-settings: 'SOFT' 100, 'opsz' 24; font-size: 1.125rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.celeb__note footer { margin-top: 10px; text-align: right; font: italic 500 1.05rem/1.2 var(--serif); overflow-wrap: anywhere; }
.celeb__start { margin-top: 24px; }
@keyframes celeb-lid { from { transform: translateY(0) rotate(0deg); } }
@keyframes celeb-glow { from { opacity: 0; transform: scale(0.5); } }
@keyframes celeb-star { from { opacity: 0; transform: translateY(18px) scale(0.4); } }
@keyframes celeb-breathe { 0%, 100% { scale: 1; } 50% { scale: 0.9; } }
@keyframes celeb-twinkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.8; } }
@keyframes celeb-up { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .celeb, .celeb *, .celeb *::before, .celeb *::after { animation: none !important; } }

/* ---- Your voice: studio, picker in the create flow, profile card, "read by" ---- */
.vav { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--c, var(--lilac)); color: var(--night); font: 500 1.4rem/1 var(--serif); }
.vav img { width: 100%; height: 100%; object-fit: cover; }
.vav--bot { background: var(--night); }
.vfile { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Studio: a full-height sheet; the text scrolls, the controls stay at the bottom */
.vstudio { height: 100vh; height: 100dvh; max-height: none; overflow: hidden; border-radius: 0; padding: calc(env(safe-area-inset-top) + 14px) var(--gut) 0; }
.vstudio[open] { display: flex; flex-direction: column; }
@media (min-width: 500px) { .vstudio { height: calc(100dvh - 28px); border-radius: 28px 28px 0 0; padding-top: 20px; } }
.vstudio .sheet__head { flex: none; margin-bottom: 4px; }
.vs { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.vs__scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 4px 4px 24px; }
.vs__bar { flex: none; display: grid; gap: 10px; padding: 14px 0 calc(env(safe-area-inset-bottom) + 18px); border-top: 1px solid var(--line); }
.vs__bar .form__error { margin-top: 0; }
.vs__bar .btn--quiet { justify-self: center; }
.vs__promise, .vs__title { margin-top: 10px; font: 400 2rem/1.08 var(--serif); font-variation-settings: 'SOFT' 100, 'opsz' 144; letter-spacing: -0.025em; text-wrap: balance; }
.vs__promise:focus, .vs__title:focus, .vs-script h3:focus, .vs [tabindex="-1"]:focus { outline: 0; }
.vs-steps { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: vs; }
.vs-steps li { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 12px; font-size: 0.9375rem; line-height: 1.35; }
.vs-steps li::before { counter-increment: vs; content: counter(vs); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--butter); color: var(--night); font-size: 0.875rem; font-weight: 600; }
.vs-steps li:nth-child(2)::before { background: var(--sage); }
.vs-steps li:nth-child(3)::before { background: var(--lilac); }
.vs-consent { position: relative; display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 12px; margin-top: 18px; padding: 14px 16px; border-radius: 20px; background: var(--cream); font-weight: 500; line-height: 1.35; cursor: pointer; }
.vs-consent input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.vs-consent__box { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--paper); color: transparent; box-shadow: inset 0 0 0 2px #e3dacb; transition: background 0.25s var(--slow), color 0.25s var(--slow); }
.vs-consent__box svg { width: 18px; height: 18px; stroke-width: 2.600; }
.vs-consent input:checked + .vs-consent__box { background: var(--apricot); color: var(--night); box-shadow: none; }
.vs-consent input:focus-visible + .vs-consent__box { outline: 3px solid var(--orange); outline-offset: 3px; }
.vs__fine { margin-top: 12px; font-size: 0.8125rem; line-height: 1.45; color: var(--ink-soft); }
.vs__hint { margin-top: 4px; color: var(--ink-soft); line-height: 1.45; }
.vs-script { margin-top: 14px; padding: 22px 20px; border-radius: 28px; background: var(--cream); font-family: var(--serif); font-variation-settings: 'SOFT' 50, 'opsz' 24; font-size: 1.3125rem; line-height: 1.65; }
.vs-script h3 { margin: 0 0 12px; font-weight: 500; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.01em; }
.vs-script p + p { margin-top: 0.9em; }
.vs-idle { display: grid; justify-items: center; }
.vs-rec { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 18px; }
.vs-rec__info { display: grid; gap: 10px; min-width: 0; }
.vs-rec__time { font: 500 2.2rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.vs-meter { display: block; height: 8px; border-radius: 999px; background: #ece3d3; overflow: hidden; }
.vs-meter i { display: block; height: 100%; border-radius: inherit; background: var(--sage); transform-origin: left center; transform: scaleX(0.03); transition: transform 0.08s linear; }
.vs-rec .btn--quiet { justify-self: start; height: 32px; padding: 0; }
.vs-rec .mic__label { font-variant-numeric: tabular-nums; }
.vs__working { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 84px; color: var(--ink-soft); font-weight: 500; }
.vs__working::before { content: ''; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 36% 32%, #fff3cf, var(--butter) 62%, var(--apricot)); animation: moon 3.8s ease-in-out infinite; }
.vs-take { display: flex; align-items: center; gap: 14px; }
.vs-take__txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.vs-take__txt small, .vs-sample__txt small { font-size: 0.875rem; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.vs-play { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--night); color: var(--paper); transition: transform 0.25s var(--slow); }
.vs-play:active { transform: scale(0.94); }
.vs-play svg { width: 24px; height: 24px; }
.vs-play:not(.is-playing) svg { margin-left: 3px; }
.vs-sample { display: flex; align-items: center; gap: 14px; margin-top: 18px; padding: 14px 18px 14px 14px; border-radius: 26px; background: var(--night); color: var(--paper); }
.vs-sample .vs-play { width: 64px; height: 64px; background: var(--apricot); color: var(--night); }
.vs-sample__txt { flex: 1; min-width: 0; display: grid; gap: 2px; line-height: 1.25; }
.vs-sample__txt b { font: 500 1.3rem/1.2 var(--serif); overflow-wrap: anywhere; }
.vs-sample__txt small { color: rgba(255, 250, 242, 0.72); }
.vs-pic { display: grid; justify-items: center; gap: 8px; margin-top: 28px; text-align: center; }
.vs-pic__av { position: relative; width: 168px; height: 168px; border-radius: 50%; box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px #e3dacb; }
.vs-pic__av .vav { font-size: 4rem; }
.is-making { position: relative; }
.is-making::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(110deg, rgba(255, 250, 242, 0) 30%, rgba(255, 250, 242, 0.65) 50%, rgba(255, 250, 242, 0) 70%) 0 0 / 250% 100%; animation: vs-draw 2.4s ease-in-out infinite; }
@keyframes vs-draw { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.vs-pic__status { min-height: 1.4em; font-size: 0.875rem; font-weight: 600; color: var(--sage-deep); }
.vs-pic h4 { margin: 0; font: 500 1.25rem/1.2 var(--serif); }
.vs-pic > p:not(.vs-pic__status) { max-width: 24em; font-size: 0.9375rem; line-height: 1.45; color: var(--ink-soft); }
.vs-pic .btn--night { margin-top: 6px; padding: 0 26px; }
.vs-pic .form__error { margin-top: 0; }

/* Picker on the script step */
.vpick { margin-top: 4px; }
.vpick__row { display: flex; gap: 12px; overflow-x: auto; margin: 0 calc(-1 * var(--gut)); padding: 6px var(--gut) 8px; scroll-padding-inline: var(--gut); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.vpick__row::-webkit-scrollbar { display: none; }
.vchip { flex: none; width: 74px; display: grid; justify-items: center; gap: 7px; text-align: center; }
.vchip .vav { width: 62px; height: 62px; box-shadow: 0 0 0 3px var(--cream), 0 0 0 5px transparent; transition: box-shadow 0.3s var(--slow), transform 0.3s var(--slow); }
.vchip:active .vav { transform: scale(0.95); }
.vchip[aria-pressed="true"] .vav { box-shadow: 0 0 0 3px var(--cream), 0 0 0 6px var(--apricot); }
.vchip__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; font-weight: 500; line-height: 1.2; }
.vchip[aria-pressed="true"] .vchip__name { font-weight: 700; }
.vchip--add .vav { background: transparent; color: var(--sage-deep); box-shadow: inset 0 0 0 2px #d9cfbe; }
.vchip--add .vav svg { width: 26px; height: 26px; stroke-width: 2.200; }

/* Profile card */
.vcard { margin-top: 16px; padding: 16px; border-radius: 22px; background: var(--cream); }
.vcard__title { margin: 0; font: 450 1.15rem/1.2 var(--serif); letter-spacing: -0.01em; }
.vcard__note { margin-top: 6px; font-size: 0.875rem; line-height: 1.4; color: var(--ink-soft); }
.vcard__list { display: grid; gap: 10px; margin-top: 12px; }
.vrow { position: relative; padding: 10px 10px 4px; border-radius: 18px; background: var(--paper); }
.vrow__main { display: flex; align-items: center; gap: 12px; }
.vrow__av { flex: none; width: 48px; height: 48px; border-radius: 50%; }
.vrow__av .vav { font-size: 1.25rem; }
.vrow__txt { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.vrow__txt b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.vrow__txt small { margin-top: 2px; font-size: 0.8125rem; color: var(--ink-soft); }
.vrow__txt small.is-pending { color: var(--sage-deep); font-weight: 600; }
.vrow .vs-play { width: 44px; height: 44px; }
.vrow .vs-play svg { width: 20px; height: 20px; }
.vrow__acts { display: flex; flex-wrap: wrap; gap: 0 2px; margin: 4px 0 0 -4px; }
.vrow__acts button { height: 36px; padding: 0 10px; border-radius: 999px; font-size: 0.875rem; font-weight: 600; color: var(--sage-deep); }
.vrow__acts button[disabled] { opacity: 0.4; cursor: default; }
.vrow__acts .is-danger { color: #b4513f; }
.vrow__rename { display: flex; align-items: center; gap: 8px; }
.vrow__rename input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--cream); color: var(--ink); font: 400 1rem var(--sans); font-size: max(16px, 1rem); box-shadow: inset 0 0 0 1.5px var(--line); }
.vrow__rename input:focus { outline: 0; background: var(--paper); box-shadow: inset 0 0 0 2px var(--apricot); }
.vrow__rename .btn { flex: none; height: 44px; padding: 0 16px; font-size: 0.9375rem; }
.vcard__add { margin-top: 12px; height: 48px; }
.vcard__add svg { width: 20px; height: 20px; }

/* "Read by" on a finished story */
.readby { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; font-weight: 500; color: var(--ink-soft); }
.readby .vav { width: 26px; height: 26px; flex: none; font-size: 0.8125rem; }
.player .readby { margin: -6px 0 14px; color: rgba(255, 250, 242, 0.76); }

@media (prefers-reduced-motion: reduce) {
  .is-making::after, .vs__working::before { animation: none !important; }
}

/* The test copy of the app (staging) wears a small label. */
.staging-tag { position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 9999; padding: 2px 10px; border-radius: 0 0 8px 8px; background: #b3261e; color: #fff; font: 700 10px/1.4 'DM Sans', system-ui, sans-serif; letter-spacing: 0.12em; pointer-events: none; }
