/* Nanaloo — nanaloo.com
   The app's storybook look: a painted starry night for the cover, warm
   parchment for the pages, brown-ink outlines with a hard "printed"
   shadow. Nanaloo, the raccoon who writes the stories, is on every page:
   on the moon in the hero, perched on cards, peeking over their edges,
   and the golden quill marks the lists and the headings (img/nanaloo/ is
   made by backend/scripts/site-art.sh from the app's own cut-outs). Fredoka for headings, Nunito for text, Literata for story and
   legal reading — the app's three fonts, self-hosted (OFL, fonts/).
   Nothing is loaded from another site. */

@font-face { font-family: "Fredoka"; src: url("/fonts/fredoka.woff2") format("woff2"); font-weight: 500 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito.woff2") format("woff2"); font-weight: 500 800; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/fonts/literata.woff2") format("woff2"); font-weight: 400 650; font-display: swap; }
@font-face { font-family: "Literata"; src: url("/fonts/literata-italic.woff2") format("woff2"); font-weight: 400 500; font-style: italic; font-display: swap; }

:root {
  /* Night (the cover, the parents' band, the footer) */
  --night: #141733;
  --sky: #171d3d;
  --dusk: #232746;
  --star: #fff4dc;
  --gold: #ffd98e;
  --mustard: #e2b13c;
  --moonlit: #cbc7e0;

  /* Day pages */
  --page: #faf1e4;
  --cream: #fff8ef;
  --paper: #fffdf9;
  --ink: #3a2e2a;
  --body: #5b4b43;
  --soft: #74645a;
  --peach: #f5a98f;
  --teal: #2f8f8a;
  --butter: #fce6ae;
  --blush: #f9d9cb;
  --lilac: #e5daf5;
  --mint: #cdebe7;
  --rule: rgba(58, 46, 42, 0.16);
  --outline: var(--ink);
  --print: var(--ink);

  --band: #1e2138;
  --display: "Fredoka", "Avenir Next Rounded", ui-rounded, system-ui, sans-serif;
  --text: "Nunito", ui-rounded, system-ui, sans-serif;
  --reading: "Literata", "Iowan Old Style", Georgia, serif;
  --gutter: 16px;
  --wide: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1a1d31;
    --cream: #1e2138;
    --paper: #2b2f4a;
    --ink: #f1ebf8;
    --body: #cbc7e0;
    --soft: #aeabc9;
    --peach: #8c5a6e;
    --teal: #7fcfc7;
    --butter: #5a4e3a;
    --blush: #4b3f58;
    --lilac: #47405f;
    --mint: #2f4f55;
    --rule: rgba(241, 235, 248, 0.16);
    --outline: rgba(241, 235, 248, 0.85);
    --print: rgba(0, 0, 0, 0.45);
    --band: #141733;
    color-scheme: dark;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font: 500 1.0625rem/1.6 var(--text);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.005em;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0 0 1em; }
a { color: inherit; text-decoration-color: var(--peach); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
strong { color: var(--ink); font-weight: 700; }
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 10; background: var(--cream); color: var(--ink); padding: 8px 14px; border-radius: 999px; }
.skip:focus { left: 16px; }

/* ---------- Header (always on the night sky) ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 18px;
  position: relative;
  z-index: 2;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--star);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
}
.brand img { width: auto; height: 46px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35)); }
.top nav { display: flex; align-items: center; gap: 6px 22px; flex-wrap: wrap; justify-content: flex-end; }
.top nav a { color: var(--moonlit); text-decoration: none; font-weight: 700; font-size: 0.98rem; }
.top nav a:hover { color: var(--star); }
.top nav .lang {
  color: var(--star);
  border: 2px solid rgba(255, 244, 220, 0.55);
  border-radius: 999px;
  padding: 4px 14px;
}
.top nav .lang:hover { border-color: var(--star); }
.top nav .sections { display: none; }
@media (min-width: 860px) {
  .top nav .sections { display: flex; gap: 22px; }
}

/* ---------- Hero: the cover of the book ---------- */
.hero {
  position: relative;
  isolation: isolate;
  color: var(--moonlit);
  background: linear-gradient(var(--sky) 0, var(--sky) 72%, var(--page) 90%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(20, 23, 51, 0.5), rgba(20, 23, 51, 0.12) 55%, rgba(20, 23, 51, 0) 70%),
    url("/img/sky-narrow.webp") 50% 100% / cover no-repeat;
  -webkit-mask-image: linear-gradient(#000 88%, transparent 100%);
  mask-image: linear-gradient(#000 88%, transparent 100%);
}
@media (min-width: 900px) {
  .hero::before {
    background:
      linear-gradient(90deg, rgba(20, 23, 51, 0.45), rgba(20, 23, 51, 0) 55%),
      url("/img/sky-wide.webp") 50% 100% / cover no-repeat;
  }
}
/* A few stars that breathe on top of the painted ones. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0 0 30% 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 22%, rgba(255, 236, 190, 0.95) 0 1.5px, transparent 3px),
    radial-gradient(circle at 34% 9%, rgba(255, 236, 190, 0.9) 0 1px, transparent 2.5px),
    radial-gradient(circle at 58% 30%, rgba(255, 250, 235, 0.9) 0 1.5px, transparent 3px),
    radial-gradient(circle at 81% 14%, rgba(255, 236, 190, 0.95) 0 2px, transparent 4px),
    radial-gradient(circle at 92% 46%, rgba(255, 250, 235, 0.85) 0 1px, transparent 2.5px),
    radial-gradient(circle at 6% 58%, rgba(255, 236, 190, 0.85) 0 1px, transparent 2.5px);
  animation: twinkle 5.5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.25; } to { opacity: 1; } }

.hero-body {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  padding-bottom: 72px;
  justify-items: center;
  text-align: center;
}
.hero h1 {
  color: var(--star);
  font-size: clamp(2.45rem, 9.5vw, 4.4rem);
  line-height: 1.03;
  max-width: 13ch;
  text-shadow: 0 2px 22px rgba(10, 12, 40, 0.6);
}
.hero .lede {
  font-size: 1.14rem;
  line-height: 1.55;
  color: #e4def0;
  max-width: 34rem;
  margin: 14px 0 22px;
  text-shadow: 0 1px 12px rgba(10, 12, 40, 0.7);
}
/* Countdown to the release (countdown.js fills and reveals the tiles) */
.countdown { margin: 0 0 20px; }
.countdown [hidden] { display: none; }
.countdown-label,
.countdown-out {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--gold);
  margin: 0 0 10px;
  text-shadow: 0 1px 12px rgba(10, 12, 40, 0.7);
}
.countdown-out { font-size: 1.3rem; margin: 0; }
.countdown-tiles { display: flex; gap: 8px; justify-content: center; }
.cd-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
  padding: 9px 8px 8px;
  color: #fff;
  background: rgba(35, 39, 70, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 18px;
}
.cd-num {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.9rem;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.cd-unit { font-size: 0.82rem; color: #e4def0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1rem;
  color: #fff;
  background: rgba(35, 39, 70, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 9px 22px;
  margin: 0;
}
.soon svg { width: 18px; height: 18px; fill: var(--gold); flex: none; }
a.soon { text-decoration: none; transition: background-color 0.15s ease, border-color 0.15s ease; }
a.soon:hover { background: rgba(35, 39, 70, 0.85); border-color: #fff; }
.watch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  color: #3a2e2a;
  background: #faf1e4;
  border: 2px solid #3a2e2a;
  border-radius: 999px;
  padding: 9px 22px 9px 14px;
  box-shadow: 4px 4px 0 #3a2e2a;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.watch:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #3a2e2a; }
.watch:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #3a2e2a; }
.watch .play {
  width: 26px; height: 26px; border-radius: 50%;
  background: #f5a98f; border: 2px solid #3a2e2a;
  display: grid; place-items: center;
}
.watch .play svg { width: 10px; height: 10px; fill: #3a2e2a; margin-left: 2px; }

/* Nanaloo on the moon, writing: the app's launch picture. */
.cover {
  position: relative;
  width: min(86vw, 400px);
  margin: 18px auto 0;
}
.cover::before {
  content: "";
  position: absolute;
  inset: -14%;
  background: radial-gradient(circle, rgba(255, 217, 142, 0.42), rgba(255, 217, 142, 0) 64%);
  z-index: -1;
}
.cover img {
  width: 100%;
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(-1.2deg); }
}

@media (min-width: 900px) {
  .hero-body {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    justify-items: start;
    text-align: left;
    gap: 40px;
    padding-top: 36px;
    padding-bottom: 150px;
    min-height: min(760px, 86vh);
  }
  .hero h1 { max-width: 12ch; }
  .hero-body { grid-template-columns: 1.05fr 0.95fr; }
  .hero-actions { justify-content: flex-start; }
  .countdown-tiles { justify-content: flex-start; }
  .cover { width: min(100%, 520px); margin: 0 auto; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-head { max-width: 40rem; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 14px; }
.section-head h2::after {
  content: "";
  display: block;
  width: 104px;
  height: 11px;
  margin-top: 12px;
  background: url("/img/squiggle.svg") 0 50% / contain no-repeat;
}
.section-head p { font-size: 1.12rem; margin: 0; }
@media (min-width: 900px) { .section { padding: 104px 0; } }

/* The film */
.film { display: grid; gap: 32px; align-items: center; }
.film .section-head { margin: 0; }
.film .sound-note { color: var(--soft); font-size: 0.98rem; margin-top: 16px; display: flex; gap: 8px; align-items: center; }
.film .sound-note svg { width: 18px; height: 18px; flex: none; fill: currentColor; }
.screen-video {
  width: 100%;
  max-width: 330px;
  margin: 0 auto;
  border-radius: 26px;
  border: 2px solid var(--outline);
  box-shadow: 6px 6px 0 var(--print);
  overflow: hidden;
  background: #171d3d;
}
.screen-video video { width: 100%; aspect-ratio: 9 / 16; background: #171d3d; }
@media (min-width: 900px) {
  .film { grid-template-columns: 0.9fr 1.1fr; gap: 72px; }
  .film .section-head { order: 2; }
}

/* How a story is made: a real sequence, so numbered. */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 56px; counter-reset: step; }
.step { display: grid; gap: 18px; justify-items: center; text-align: center; }
.step-text { max-width: 22rem; }
.step h3 { font-size: 1.45rem; margin: 12px 0 8px; }
.step p { margin: 0; }
.num {
  display: inline-grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--butter);
  border: 2px solid var(--outline);
  box-shadow: 3px 3px 0 var(--print);
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
}
/* The screens come framed (goldie/site/frame-site-screens.mjs: Goldie's
   iPhone 17 Pro bezel on a transparent background); the page only sizes,
   tilts and lifts them. */
.phone {
  width: min(63vw, 250px);
  aspect-ratio: 606 / 1252;
  position: relative;
  filter: drop-shadow(6px 12px 14px rgba(43, 28, 22, 0.28));
}
.phone img { display: block; width: 100%; height: 100%; }
.phone.tilt-l { transform: rotate(-2.5deg); }
.phone.tilt-r { transform: rotate(2deg); }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  .step { grid-template-rows: auto 1fr; }
  .step .phone { order: -1; margin-bottom: 10px; }
  .step:nth-child(2) { margin-top: 48px; }
}

/* A page from a real story: an open book */
.spread {
  display: grid;
  background: var(--paper);
  border: 2px solid var(--outline);
  border-radius: 22px;
  box-shadow: 6px 7px 0 var(--print);
  overflow: hidden;
  position: relative;
}
.spread figure { margin: 0; }
.spread figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.spread .leaf { padding: 28px 22px 26px; }
.leaf .title { font-family: var(--display); font-weight: 600; color: var(--soft); font-size: 1rem; margin: 0 0 14px; }
.leaf blockquote { margin: 0; font-family: var(--reading); font-size: 1.12rem; line-height: 1.8; color: var(--ink); font-weight: 400; }
.leaf blockquote p { margin: 0; }
.leaf blockquote p::first-letter {
  float: left;
  font-family: var(--display);
  font-weight: 600;
  font-size: 3.4em;
  line-height: 0.82;
  margin: 0.08em 0.1em 0 0;
  color: var(--teal);
}
.leaf .folio { margin: 18px 0 0; font-size: 0.9rem; color: var(--soft); text-align: center; font-family: var(--reading); font-style: italic; }
.spread-caption { margin: 18px 4px 0; color: var(--soft); font-size: 0.98rem; max-width: 46rem; }
@media (min-width: 900px) {
  .spread { grid-template-columns: 1.08fr 1fr; }
  .spread figure img { aspect-ratio: auto; min-height: 100%; }
  .spread .leaf { padding: 44px 48px 36px; display: flex; flex-direction: column; justify-content: center; }
  /* the gutter between the two pages */
  .spread::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: calc(100% * 1.08 / 2.08);
    width: 36px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, rgba(58, 46, 42, 0.18) 50%, transparent);
    pointer-events: none;
  }
}

/* The extras */
.extras { display: grid; gap: 44px 40px; }
.extra img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 28px 28px 28px 6px;
  border: 2px solid var(--outline);
  margin-bottom: 18px;
}
.extra:nth-child(even) img { border-radius: 28px 6px 28px 28px; }
.extra h3 { font-size: 1.5rem; margin-bottom: 8px; }
.extra p { margin: 0; max-width: 32rem; }
@media (min-width: 760px) {
  .extras { grid-template-columns: 1fr 1fr; }
  .extra:nth-child(even) { margin-top: 64px; }
}

.also {
  margin-top: 72px;
  display: grid;
  gap: 32px;
  align-items: center;
  background: var(--cream);
  border: 2px solid var(--outline);
  border-radius: 26px;
  padding: 30px 22px;
  box-shadow: 6px 6px 0 var(--print);
}
.also h3 { font-size: 1.6rem; margin-bottom: 14px; }
.also ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.also li { padding-left: 30px; position: relative; }
.also li::before {
  content: "";
  position: absolute; left: 0; top: 0.18em;
  width: 20px; height: 20px;
  background: var(--mustard);
  -webkit-mask: url("/img/quill.svg") center / contain no-repeat;
  mask: url("/img/quill.svg") center / contain no-repeat;
}
.also .phone { margin: 0 auto; width: min(61vw, 240px); }
@media (min-width: 900px) {
  .also { grid-template-columns: 1fr auto; padding: 44px 56px; gap: 56px; }
  .also .phone { margin: -96px 0 -24px; }
}

/* ---------- The parents' band: back under the night sky ---------- */
.band {
  position: relative;
  background: var(--band);
  color: var(--moonlit);
  margin: 40px 0;
}
.band::before, .band::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 28px;
  background: var(--band);
  -webkit-mask: url("/img/edge.svg") 0 0 / 240px 28px repeat-x;
  mask: url("/img/edge.svg") 0 0 / 240px 28px repeat-x;
}
.band::before { bottom: calc(100% - 1px); }
.band::after { top: calc(100% - 1px); transform: scaleY(-1); }
.band h2, .band h3, .band strong { color: var(--star); }
.band a { color: var(--star); }
.trust-head { display: grid; gap: 28px; align-items: center; margin-bottom: 44px; }
.trust-head .section-head { margin: 0; }
.trust-head img { width: min(62%, 290px); justify-self: center; filter: drop-shadow(0 0 34px rgba(255, 217, 142, 0.28)); }
.trust { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px 48px; }
.trust li { padding-left: 40px; position: relative; }
.trust li::before {
  content: "";
  position: absolute; left: 0; top: 0.1em;
  width: 24px; height: 24px;
  background: var(--gold);
  -webkit-mask: url("/img/quill.svg") center / contain no-repeat;
  mask: url("/img/quill.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(255, 217, 142, 0.6));
}
.trust h3 { font-size: 1.3rem; margin-bottom: 6px; }
.trust p { margin: 0; }
.band .more { margin: 44px 0 0; font-weight: 700; }
@media (min-width: 760px) { .trust { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .trust-head { grid-template-columns: 1.2fr 0.8fr; gap: 56px; }
}

/* ---------- Coins ---------- */
.coins { display: grid; gap: 40px; }
.facts { list-style: none; margin: 26px 0 28px; padding: 0; display: grid; gap: 14px; }
.facts li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 14px;
  align-items: baseline;
}
.facts b {
  grid-row: span 2;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.55rem;
  color: var(--ink);
  min-width: 2.2em;
  text-align: center;
  background: var(--butter);
  border-radius: 14px;
  padding: 2px 8px;
}
.facts strong { font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.facts span { color: var(--body); }
.price-card {
  position: relative;
  background: var(--paper);
  border: 2px solid var(--outline);
  border-radius: 22px;
  box-shadow: 6px 6px 0 var(--print);
  padding: 26px 18px 20px;
  margin-top: 104px;
  align-self: start;
}
.price-card .piggy { position: absolute; width: 150px; right: 10px; top: -121px; }
.price-card h3 { font-size: 1.35rem; margin-bottom: 4px; }
.price-card .hint { color: var(--soft); font-size: 0.95rem; margin: 0 0 14px; }
.costs { width: 100%; border-collapse: collapse; font-size: 0.98rem; font-variant-numeric: tabular-nums; }
.costs th, .costs td { padding: 9px 4px; text-align: right; border-bottom: 1px dashed var(--rule); }
.costs th:first-child, .costs td:first-child { text-align: left; }
.costs thead th { font-family: var(--display); font-weight: 600; color: var(--ink); border-bottom: 2px solid var(--outline); vertical-align: bottom; line-height: 1.2; }
.costs thead th small { display: block; white-space: nowrap; font-family: var(--text); font-weight: 600; color: var(--soft); font-size: 0.8rem; }
.costs tbody th { font-weight: 700; color: var(--ink); }
.costs tbody tr:last-child th, .costs tbody tr:last-child td { border-bottom: 0; }
.costs td { color: var(--ink); font-weight: 700; }
.price-card .example { margin: 14px 0 0; font-size: 0.95rem; background: var(--mint); border-radius: 12px; padding: 10px 14px; color: var(--ink); }
@media (min-width: 900px) {
  .coins { grid-template-columns: 1fr 1fr; gap: 72px; }
  .price-card { padding: 32px 30px 26px; margin-top: 96px; }
}

/* ---------- Questions ---------- */
.faq { max-width: 50rem; }
.faq details { border-bottom: 2px dashed var(--rule); }
.faq details:first-of-type { border-top: 2px dashed var(--rule); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 44px 18px 0;
  position: relative;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.22rem;
  color: var(--ink);
  line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 6px; top: 50%;
  width: 22px; height: 22px;
  margin-top: -11px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 14px 2.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2.5px 14px no-repeat;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 20px; max-width: 42rem; }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Coming soon + contact ---------- */
.closing { text-align: center; padding-bottom: 40px; padding-top: 24px; }
.closing .goodnight {
  width: min(100%, 660px);
  margin: 0 auto 40px;
  border: 2px solid var(--outline);
  border-radius: 28px 28px 28px 8px;
  box-shadow: 7px 8px 0 var(--print);
  transform: rotate(-1.2deg);
}
.closing h2 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: 14px; }
.closing p { max-width: 34rem; margin: 0 auto 1em; font-size: 1.1rem; }
.closing .soon { color: var(--ink); background: var(--cream); border-color: var(--outline); margin: 10px 0 28px; }
.closing .soon svg { fill: #e2a93b; }
.closing a.soon:hover { background: #fff; border-color: var(--ink); }

/* Contact form: a sheet of the book, posted without any script. */
.note {
  max-width: 34rem;
  margin: 8px auto 0;
  text-align: left;
  background: var(--paper);
  border: 2px solid var(--outline);
  border-radius: 22px;
  box-shadow: 6px 7px 0 var(--print);
  padding: 22px 20px 24px;
}
@media (min-width: 600px) { .note { padding: 30px 34px 32px; } }
.closing .note p { margin: 0 0 16px; font-size: 1rem; max-width: none; }
.note label { display: block; font-family: var(--display); font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.note .opt { font-family: var(--text); font-weight: 600; color: var(--soft); font-size: 0.92rem; }
.note input, .note textarea {
  display: block;
  width: 100%;
  font: 500 1rem/1.5 var(--text);
  color: var(--ink);
  background: var(--cream);
  border: 2px solid var(--outline);
  border-radius: 14px;
  padding: 10px 14px;
}
.note textarea { resize: vertical; min-height: 9rem; }
.note input:focus-visible, .note textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.note .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.closing .note .note-fine { font-size: 0.92rem; color: var(--soft); }
.nowrap { white-space: nowrap; }
.send {
  display: block;
  margin: 4px auto 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  color: #3a2e2a;
  background: var(--gold);
  border: 2px solid var(--outline);
  border-radius: 999px;
  padding: 10px 28px;
  box-shadow: 4px 4px 0 var(--print);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.send:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--print); }
.send:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--print); }
/* Its radio buttons (the report form): one reason per line, not a text box. */
.note fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.note legend { font-family: var(--display); font-weight: 600; color: var(--ink); margin-bottom: 8px; padding: 0; }
.note .choice { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.note .choice input { display: block; flex: none; width: 1.25rem; height: 1.25rem; margin: 0; padding: 0; accent-color: var(--teal); }
.note .choice label { margin: 0; font-family: var(--text); }

/* ---------- Footer ---------- */
.foot {
  position: relative;
  margin-top: 60px;
  background: var(--night);
  color: var(--moonlit);
  padding: 48px 0 56px;
  font-size: 0.98rem;
}
.foot::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: calc(100% - 1px);
  height: 28px;
  background: var(--night);
  -webkit-mask: url("/img/edge.svg") 0 0 / 240px 28px repeat-x;
  mask: url("/img/edge.svg") 0 0 / 240px 28px repeat-x;
}
.foot .wrap { display: grid; gap: 22px; }
.foot .brand { font-size: 1.3rem; }
.foot nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.foot a { color: var(--star); }
.foot .fine { margin: 0; color: #a8a5c4; font-size: 0.88rem; max-width: 46rem; }
@media (min-width: 900px) {
  .foot .wrap { grid-template-columns: auto 1fr; align-items: center; }
  .foot nav ul { justify-content: flex-end; }
  .foot .fine { grid-column: 1 / -1; }
}

/* ---------- Legal pages: a sheet of the book ---------- */
.mast {
  background:
    linear-gradient(rgba(20, 23, 51, 0.62), rgba(20, 23, 51, 0.62)),
    var(--sky) url("/img/sky-narrow.webp") 50% 0 / cover no-repeat;
  padding-bottom: 176px;
}
@media (min-width: 900px) {
  .mast {
    background:
      linear-gradient(rgba(20, 23, 51, 0.55), rgba(20, 23, 51, 0.55)),
      var(--sky) url("/img/sky-wide.webp") 50% 8% / cover no-repeat;
  }
}
.sheet {
  position: relative;
  max-width: 48rem;
  margin: -72px auto 0;
  background: var(--paper);
  border: 2px solid var(--outline);
  border-radius: 22px;
  box-shadow: 6px 7px 0 var(--print);
  padding: 30px 20px 36px;
}
@media (min-width: 820px) { .sheet { padding: 52px 64px 56px; } }
.page-wrap { padding: 0 var(--gutter); }
.legal { font-family: var(--reading); font-weight: 400; font-size: 1.04rem; line-height: 1.75; color: var(--body); }
.legal h1 { font-size: clamp(2rem, 7vw, 2.6rem); margin: 0 0 6px; }
.legal h2 { font-size: 1.45rem; margin: 2.1em 0 0.5em; }
.legal h3 { font-size: 1.15rem; margin: 1.6em 0 0.4em; }
.legal .updated { font-family: var(--text); font-weight: 600; color: var(--soft); font-size: 0.95rem; margin: 0 0 22px; }
.legal ul { padding-left: 1.2em; }
.legal li { margin: 0.4em 0; }
.legal li::marker { color: var(--teal); }
.legal strong { font-weight: 600; }
.legal .summary {
  font-family: var(--text);
  font-weight: 500;
  line-height: 1.6;
  background: var(--butter);
  border: 2px solid var(--outline);
  border-radius: 16px;
  box-shadow: 4px 4px 0 var(--print);
  padding: 14px 18px;
  margin: 18px 0 8px;
  color: var(--ink);
}
.legal .summary p { margin: 0.3em 0; }
.legal .summary strong { font-weight: 800; }
.legal .table { overflow-x: auto; margin: 14px 0; border: 2px solid var(--rule); border-radius: 14px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 0.95rem; line-height: 1.55; }
.legal th, .legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.legal tbody tr:last-child td { border-bottom: 0; }
.legal th { font-family: var(--display); font-weight: 600; color: var(--ink); background: var(--cream); }
.legal td:first-child { width: 58%; }
.legal-foot-links { text-align: center; margin: 28px 0 0; font-size: 0.98rem; }

/* 404 */
.lost { text-align: center; padding: 8px 0 24px; }
.lost img { width: 190px; margin: 0 auto 12px; }
.lost h1 { font-size: clamp(1.7rem, 7vw, 2.6rem); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Bedtime without a screen: the printed sheet, the black phone on it. */
.paper { display: grid; gap: 40px; align-items: center; }
.paper-art { position: relative; width: min(100%, 440px); margin: 0 auto; padding-bottom: 56px; }
.paper-art .printout { display: block; width: 84%; height: auto; transform: rotate(-4deg); }
.paper-art .phone { position: absolute; right: 0; bottom: 0; width: 42%; transform: rotate(5deg); }
.points { grid-template-columns: 1fr; gap: 24px; }
.points li::before { filter: none; }
@media (min-width: 900px) {
  .paper { grid-template-columns: 0.9fr 1.1fr; gap: 72px; }
  .paper .section-head { margin-bottom: 28px; }
}

/* ---------- A friend's link (s/dragon.html) ----------
   The cover's night sky, the invitation on a sheet of the book. The page
   holds its text in two languages and share.js hides one with `hidden`,
   which must win over the display set by the classes here. */
.gift [hidden] { display: none; }
.gift-body {
  display: grid;
  gap: 30px;
  justify-items: center;
  text-align: center;
  padding-top: 12px;
  padding-bottom: 120px;
}
.gift-text { width: 100%; }
.gift h1 { font-size: clamp(2.1rem, 8vw, 3.5rem); line-height: 1.06; max-width: 15ch; margin: 0 auto; }
.gift .lede { margin: 14px auto 22px; }
.gift .hero-actions { margin: 0; }
.invite {
  max-width: 30rem;
  margin: 28px auto 0;
  text-align: left;
  color: var(--body);
  background: var(--paper);
  border: 2px solid var(--outline);
  border-radius: 22px;
  box-shadow: 6px 7px 0 var(--print);
  padding: 20px 20px 22px;
}
.invite h2 { font-size: 1.1rem; font-weight: 500; color: var(--soft); }
.invite-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 6px; }
.invite-code {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 9.5vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--ink);
  -webkit-user-select: all;
  user-select: all;
}
.invite-copy { margin: 0; font-size: 1rem; padding: 7px 20px; }
.invite-copied { margin: 10px 0 0; font-weight: 800; color: var(--teal); }
.invite-how { margin: 14px 0 0; font-size: 0.98rem; }
.gift-art {
  width: min(100%, 520px);
  margin: 0;
  background: var(--paper);
  border: 2px solid var(--outline);
  border-radius: 22px;
  box-shadow: 6px 7px 0 var(--print);
  overflow: hidden;
}
.gift-art img { width: 100%; }
.gift-art figcaption {
  padding: 14px 18px 16px;
  font-family: var(--reading);
  font-style: italic;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--soft);
}
@media (min-width: 900px) {
  .gift-body {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    justify-items: start;
    text-align: left;
    gap: 56px;
    padding-top: 36px;
    padding-bottom: 170px;
    min-height: min(760px, 86vh);
  }
  .gift h1, .gift .lede, .invite { margin-left: 0; }
  .gift-art { justify-self: center; }
}

/* ---------- A family's shared story (/story/<token>, rendered by the api) ----------
   The cover's night sky with the title, then each page as a sheet of the
   book: its painting, its text in the reading font, its voice. */
.told-head {
  text-align: center;
  padding-top: 8px;
  padding-bottom: 96px;
}
.told-by {
  margin: 0 auto 12px;
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--gold);
  text-shadow: 0 1px 12px rgba(10, 12, 40, 0.7);
}
.told-head h1 {
  color: var(--star);
  font-size: clamp(2.1rem, 8vw, 3.6rem);
  line-height: 1.06;
  max-width: 18ch;
  margin: 0 auto;
  text-shadow: 0 2px 22px rgba(10, 12, 40, 0.6);
}
.told {
  max-width: 46rem;
  display: grid;
  gap: 36px;
  margin-top: -48px;
  position: relative;
}
.told-page {
  background: var(--paper);
  border: 2px solid var(--outline);
  border-radius: 22px;
  box-shadow: 6px 7px 0 var(--print);
  overflow: hidden;
}
.told-art { margin: 0; border-bottom: 2px solid var(--outline); }
.told-art img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.told-leaf { padding: 24px 20px 18px; }
.told-leaf p { font-family: var(--reading); font-weight: 400; font-size: 1.12rem; line-height: 1.8; color: var(--ink); }
.told-plain .told-leaf { padding-top: 30px; }
.told-leaf audio { display: block; width: 100%; margin: 6px 0 4px; }
.told-leaf .folio { margin: 12px 0 0; font-size: 0.9rem; color: var(--soft); text-align: center; font-style: italic; }
.told-report { margin: -16px 0 0; text-align: center; font-size: 0.95rem; }
.told-report a { color: var(--soft); }
/* Reporting it (/story/<token>/report): the contact form's fields, on the sheet itself. */
.report .note { max-width: none; margin: 22px 0 0; padding: 0; background: none; border: 0; box-shadow: none; }
.report .note .field, .report .note .note-fine { margin: 0 0 16px; }
.report .note .note-fine { font-size: 0.92rem; color: var(--soft); }
.told-end { text-align: center; padding: 28px 0 8px; }
.told-end h2 { font-size: clamp(1.7rem, 6vw, 2.4rem); margin-bottom: 12px; }
.told-end > p { max-width: 34rem; margin: 0 auto 1em; font-size: 1.08rem; }
.told-end .hero-actions { margin: 18px 0 0; }
.told-end .soon { color: var(--ink); background: var(--cream); border-color: var(--outline); }
.told-end .soon svg { fill: #e2a93b; }
.told-end a.soon:hover { background: var(--paper); border-color: var(--ink); }
.told-end .invite { margin-top: 32px; }
@media (min-width: 820px) {
  .told-leaf { padding: 34px 48px 24px; }
  .told-head { padding-top: 24px; padding-bottom: 120px; }
}

/* ---------- Nanaloo around the page ----------
   Poses are the app's cut-outs. A pose that speaks stands beside a soft
   paper bubble, without an outline, as in the app. */
.meet { display: grid; grid-template-columns: 104px 1fr; gap: 20px; align-items: center; max-width: 44rem; margin-bottom: 44px; }
.meet img { width: 100%; }
.says {
  position: relative;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.12rem;
  line-height: 1.45;
  border-radius: 24px;
  padding: 16px 20px;
  box-shadow: 0 10px 28px rgba(58, 46, 42, 0.1);
}
.says::before {
  content: "";
  position: absolute;
  left: -8px; top: 50%;
  width: 20px; height: 20px;
  margin-top: -10px;
  background: inherit;
  border-radius: 4px;
  transform: rotate(45deg);
}
@media (min-width: 700px) {
  .meet { grid-template-columns: 150px 1fr; gap: 26px; }
  .says { font-size: 1.22rem; padding: 20px 26px; }
}

/* Perched on a card's top edge, or peeking over it (paws on the edge). */
.has-perch { position: relative; margin-top: 108px; }
.perch { position: absolute; right: 22px; bottom: calc(100% - 20px); width: 128px; z-index: 1; }
.peek-top { position: absolute; left: 26px; bottom: calc(100% - 2px); width: 150px; }
.also { position: relative; margin-top: 150px; }
.sheet .peek-top { left: auto; right: 30px; width: 132px; }
@media (min-width: 900px) {
  .perch { width: 158px; right: 44px; bottom: calc(100% - 24px); }
  .peek-top { width: 180px; left: 48px; }
  .sheet .peek-top { width: 150px; right: 56px; }
}

/* Peeking in from the side of the window, only where there is room. */
.peek-side { display: none; }
@media (min-width: 1180px) {
  #questions { position: relative; }
  .peek-side { display: block; position: absolute; right: 0; top: 50%; width: 168px; margin-top: -150px; }
}

/* Beside the printed sheet, lantern in hand. */
.paper-art .buddy { position: absolute; left: -4%; bottom: 0; width: 36%; filter: drop-shadow(0 0 22px rgba(255, 217, 142, 0.55)); }

/* Asleep on the footer's edge: good night. */
.sleeper { position: absolute; right: max(18px, calc(50% - 530px)); bottom: calc(100% - 34px); width: 132px; z-index: 1; filter: drop-shadow(0 0 18px rgba(255, 217, 142, 0.35)); }
@media (min-width: 900px) { .sleeper { width: 168px; bottom: calc(100% - 42px); } }

/* A friend's link: Nanaloo waves above the title. */
.gift-hello { width: 132px; margin: 0 auto 6px; }
@media (min-width: 900px) { .gift-hello { margin-left: 0; width: 150px; } }
