/*
  naualo.com in Bedside, the app's look since #587, as approved for the site on 2026-11-10 in docs/design/website/
  (#605): its boards are the target. As in the app, everything lies in a room under a lamp: the dark room (#12100E,
  the lamp's glow #3B2A1B) or the light one, Lamp-lit day (#F3EBDD, amber's light tint as the glow). Cream paper
  (#FFF4DE) holds a Message and the long texts, in its ink (#2A1E12) in both. Amber (#F2B544) is the Accent, the only
  one the site has: the Question's slip, the photo circles, the main button; drawn straight on the light room it's the
  deep accent ink (#845600). The colours are copied from src/ui/theme.ts and src/ui/bedside-theme/accents.ts (amber),
  in light and dark as the visitor's setting is, until they choose one with the switch in the header (theme.js, which
  every page loads before this file). Each page's theme-color metas repeat the room, which the web lint checks.

  Every page has a header with the wordmark and the light/dark switch, a footer with Legal notice, Privacy, Child
  safety and support, and takes one of three layouts:
  - Home (index.html): in a 1120 column of two halves, the headline beside a phone with the Widget, then How it works
    in four steps, each drawn on the phone's screen as the app's How it works pages are, the phone taking turns at the
    right and the left (on a phone, the words over it); then Around each message, Just for the people close to you and
    Get Naualo, divided by hairlines.
  - The text page (FAQ, terms, privacy, legal notice, delete account, child safety): the title, the date, the notice
    and the section chips in the room, then the text on a cream page as wide as the content, with a dog-ear.
  - The status page (the Invite landing page and the 404): a note in the middle of the room.

  The note is the one shared component: cream paper with 6px corners, turned, a crease, and a dog-ear cut out of the
  paper with clip-path. Its shadow is cast by the paper's shape (filter: drop-shadow), so nothing outlines the missing
  corner, as a box-shadow would.

  What moves, and when:
  - The opened Invite unfolds, once, after the page loads. Home's first screen stands still.
  - How it works plays only the step in focus, the one most in view, from its start and then again and again, as the
    app's How it works pages loop (home.js): a line types out behind a caret, a pack opens into a Question that gets its
    answer, a note folds onto the pile, the last step's widget fades between two Messages. Moving on to another step
    takes the one playing back to its start. The widget's style, Light or Dark, changes when a button is
    pressed, its colours fading to the other.
  Reduce Motion stops all of it: notes show open, steps at their end, and a button changes the widget's style at once.

  Titles, Messages (in italic) and headings are in Gelasio, everything else in Hanken Grotesk, as in the app, served
  from /fonts so no visitor's address reaches another company. Phones (720px and narrower) take the app's measures.
*/

@font-face {
  font-family: 'Gelasio';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/gelasio-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Gelasio';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/gelasio-600-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/hanken-grotesk-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/hanken-grotesk-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/hanken-grotesk-700.woff2') format('woff2');
}

:root {
  /* Each colour is written light, then dark: var(--light, a) var(--dark, b) is a in light mode and b in dark mode, as
     the scheme below sets it. */
  --room: var(--light, #f3ebdd) var(--dark, #12100e);
  /* The lamp's glow: amber's light tint in the light room. */
  --lamp: var(--light, #fbe3b8) var(--dark, #3b2a1b);
  /* What stands a step out of the room: chips, the notice in the room, the hovered switch. */
  --raised: var(--light, #e9ddc8) var(--dark, #241c15);
  --on-room: var(--light, #2a1e12) var(--dark, #f5e9d5);
  --on-room-soft: var(--light, #6a5a47) var(--dark, #c9bca6);
  --hair: var(--light, rgba(42, 30, 18, 0.14)) var(--dark, rgba(245, 233, 213, 0.14));
  --line: var(--light, rgba(42, 30, 18, 0.3)) var(--dark, rgba(245, 233, 213, 0.3));
  /* Amber, and its deep ink where it's drawn straight on the light room; on the dark room the fill is the ink. */
  --accent: #f2b544;
  --on-accent: #2a1e12;
  --accent-ink: var(--light, #845600) var(--dark, #f2b544);
  /* The paper is the same cream, in the same ink, in light and dark. */
  --paper: #fff4de;
  --ink: #2a1e12;
  --ink-soft: #6a5a47;
  --crease: rgba(42, 30, 18, 0.14);
  --paper-link: #845600;
  --flap: var(--light, #e6d1ac) var(--dark, #efdfc2);
  --flap-shadow: var(--light, drop-shadow(-0.5px 1px 1px rgba(70, 45, 15, 0.14))) var(--dark, none);
  --error: #c4251b;
  /* A slip's shadow, as the app's: the paper's in the light room, a deep one in the dark room. */
  --slip-shadow: var(--light, 0 1px 2px rgba(0, 0, 0, 0.08), 0 14px 30px -12px rgba(0, 0, 0, 0.32)) var(--dark, 0 18px 18px rgba(0, 0, 0, 0.6));
  /* Paper casts the soft paper shadow in the light room, a deep one in the dark room. */
  --note-shadow:
    var(--light, drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08)) drop-shadow(0 10px 12px rgba(70, 45, 15, 0.2)))
    var(--dark, drop-shadow(0 14px 16px rgba(0, 0, 0, 0.55)));
  --note-shadow-big:
    var(--light, drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08)) drop-shadow(0 18px 22px rgba(70, 45, 15, 0.22)))
    var(--dark, drop-shadow(0 22px 26px rgba(0, 0, 0, 0.6)));
  --paper-shadow:
    var(--light, 0 1px 2px rgba(0, 0, 0, 0.08), 0 14px 30px -12px rgba(0, 0, 0, 0.32))
    var(--dark, 0 18px 36px rgba(0, 0, 0, 0.6));
  /* A phone: its frame, with an edge on the dark room, and its home screen's wallpaper, as the app's drawings of one. */
  --bezel: var(--light, #1e1813) var(--dark, #0b0908);
  --bezel-edge: var(--light, rgba(42, 30, 18, 0)) var(--dark, rgba(245, 233, 213, 0.16));
  --wall-top: var(--light, #eed6cc) var(--dark, #27303f);
  --wall-bottom: var(--light, #cda59f) var(--dark, #14161c);
  --wall-app: var(--light, rgba(255, 255, 255, 0.55)) var(--dark, rgba(255, 255, 255, 0.2));
  --wall-ink: var(--light, #2a1e12) var(--dark, #f5f3f0);
  /* Form controls and scrollbars too. */
  color-scheme: var(--light, light) var(--dark, dark);

  --sans: 'Hanken Grotesk', system-ui, sans-serif;
  --serif: 'Gelasio', Georgia, serif;
  --margin: 64px;
  /* The space beside the content: the margin, and on screens wider than 1440 whatever centres 1312 of content. In
     padding, the % is of the page's width. Home and the status pages take a 1120 column. */
  --gutter: max(var(--margin), calc((100% - 1312px) / 2));
  --head-pad: 32px;
  --ear: 32px;
  /* The lamp: where its glow is, and how far it reaches. */
  --glow-size: 1000px 560px;
  --glow-at: 18% 150px;
}

/* The scheme: the visitor's setting, until they choose one with the switch in the header, which theme.js keeps as
   data-theme on <html>. Both ways to dark mode set the same two switches, so the colours above are written once. A
   switch set to initial counts as missing, so var() takes its fallback; a switch set to nothing adds nothing. */
:root {
  --light: initial;
  --dark: ;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --light: ;
    --dark: initial;
  }
}
:root[data-theme='dark'] {
  --light: ;
  --dark: initial;
}

.home,
.status {
  --gutter: max(var(--margin), calc((100% - 1120px) / 2));
}
.home {
  --glow-size: 1100px 780px;
  --glow-at: 71% 440px;
}
.status {
  --glow-size: 900px 680px;
  --glow-at: 50% 44%;
}

/* Phones: the app's measures, 20 from each edge. */
@media (max-width: 720px) {
  :root {
    --margin: 20px;
    --head-pad: 20px;
    --ear: 24px;
    --glow-size: 600px 420px;
    --glow-at: 30% 120px;
  }
  .home {
    --glow-size: 620px 560px;
    --glow-at: 50% 640px;
  }
  .status {
    --glow-size: 600px 520px;
    --glow-at: 50% 44%;
  }
}

html {
  background: var(--room);
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(var(--glow-size) at var(--glow-at), var(--lamp), var(--room)) no-repeat, var(--room);
  color: var(--on-room);
  font: 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
}
/* On the cream paper, amber is too faint for a ring. */
.paper-page a:focus-visible,
.note a:focus-visible {
  outline-color: var(--ink);
}

[hidden] {
  display: none !important;
}

.icon {
  display: block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Shown in one scheme only: the wordmark, black or white, and the switch's moon or sun. */
.light-only {
  display: var(--light, block) var(--dark, none);
}
.dark-only {
  display: var(--light, none) var(--dark, block);
}

/* ---------- The header: the wordmark, back to the home page, and the light/dark switch at the right end. ---------- */

.site-header {
  display: flex;
  align-items: center;
  padding: var(--head-pad) var(--gutter);
}
.site-header a {
  display: flex;
  border-radius: 6px;
}
.site-header img {
  height: 30px;
}
/* The moon in light mode, the sun in dark mode. It does nothing without theme.js, so it shows only once that has run.
   It takes no more height than the wordmark, and its icon lines up with the gutter. */
.theme-switch {
  display: none;
}
.can-switch .theme-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  margin: -10px -11px -10px auto;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--on-room);
  cursor: pointer;
}
@media (hover: hover) {
  .can-switch .theme-switch:hover {
    background: var(--raised);
  }
}
@media (max-width: 720px) {
  .site-header img {
    height: 24px;
  }
}

/* ---------- The footer: Legal notice, Privacy, Child safety and support; with store badges, the stores' trademark
   lines too. In the room, under a hairline across the content. ---------- */

.site-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
  margin: 0 var(--gutter);
  padding: 28px 0 32px;
  border-top: 1px solid var(--hair);
  color: var(--on-room-soft);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 14px;
  line-height: 20px;
}
.site-footer nav a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}
.trademarks {
  max-width: 560px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}
@media (hover: hover) {
  .site-footer nav a:hover {
    color: var(--on-room);
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}
/* Until the links and the trademark lines fit side by side, one above the other. */
@media (max-width: 1100px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .trademarks {
    text-align: left;
  }
}
@media (max-width: 720px) {
  .site-footer {
    padding: 24px 0 28px;
  }
}

/* ---------- Buttons, chips and badges ---------- */

/* One main button per page, amber as the app's: "Try again" and "Go to the home page". On Home and the Invite the
   store badges are the main action, so "I have the app · Open invite" is outlined. */
.plate,
.button {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 14px;
  font: 600 17px/22px var(--sans);
  text-decoration: none;
  cursor: pointer;
}
.plate {
  background: var(--accent);
  color: var(--on-accent);
}
.button {
  box-shadow: inset 0 0 0 1.5px var(--on-room-soft);
  color: var(--on-room);
}
.plate:active {
  box-shadow: inset 0 0 0 100vmax rgba(0, 0, 0, 0.12);
}
.button:active {
  background: var(--raised);
}
@media (hover: hover) {
  .plate:hover {
    box-shadow: inset 0 0 0 100vmax rgba(0, 0, 0, 0.06);
  }
  .button:hover {
    background: var(--raised);
  }
}
@media (max-width: 720px) {
  .plate,
  .button {
    align-self: stretch;
  }
}

/* The stores' badges: their own artwork, black with a grey rim that holds on the dark room too. */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}
.badges a {
  display: flex;
  border-radius: 8px;
}
.badges img {
  display: block;
  height: 48px;
}
@media (max-width: 720px) {
  .badges img {
    height: 44px;
  }
}

/* ---------- The note ----------
   .note > .note-top (> .note-ear, the words)
         > .note-fold > .note-turn > .note-bottom (the words under the crease) + .note-outside (what shows folded)
   Set --turn to turn it, --ear for the dog-ear's size. */

.note {
  position: relative;
  box-sizing: border-box;
  flex: none;
  max-width: 100%;
  margin: 0;
  color: var(--ink);
  transform: rotate(var(--turn, -1.5deg));
  filter: var(--note-shadow);
  font-weight: inherit;
}
.note-top {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: var(--paper);
  border-radius: 6px 6px 0 0;
  clip-path: polygon(0 0, calc(100% - var(--ear)) 0, 100% var(--ear), 100% 100%, 0 100%);
}
.note-ear {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  width: var(--ear);
  height: var(--ear);
  background: linear-gradient(to top right, var(--flap) 50%, rgba(0, 0, 0, 0) 50%);
  border-bottom-left-radius: calc(var(--ear) / 6);
  filter: var(--flap-shadow);
}
.note-fold {
  position: relative;
  z-index: 2;
  display: block;
  perspective: 1600px;
}
.note-turn {
  position: relative;
  display: block;
  transform-origin: 50% 0;
  transform-style: preserve-3d;
}
.note-bottom {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  background: var(--paper);
  border-radius: 0 0 6px 6px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* The crease. */
.note-bottom::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--crease);
}
/* What shows folded: who it's for, in the names' Hanken. */
.note-outside {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border-radius: 6px;
  font: 600 28px/1.15 var(--sans);
  transform: rotateX(180deg);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* The words on a note's top: "for Mom · Tomorrow". */
.note-label {
  color: var(--ink-soft);
  font: 600 14px/20px var(--sans);
}

/* Unfolds once, --unfold-delay after it shows (0.8s after the page loads). */
@keyframes unfold {
  from {
    transform: rotateX(180deg);
  }
  to {
    transform: rotateX(0deg);
  }
}
.unfold .note-turn {
  animation: unfold 0.52s cubic-bezier(0.16, 1, 0.3, 1) var(--unfold-delay, 0.8s) both;
}
@media (prefers-reduced-motion: reduce) {
  .unfold .note-turn {
    animation: none;
  }
}

/* A folded note: only its outside shows, with its crease near the foot. */
.folded {
  position: relative;
  box-sizing: border-box;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  width: 210px;
  height: 128px;
  padding: 0 18px 10px;
  background: var(--paper);
  border-radius: 6px;
  box-shadow: var(--paper-shadow);
  color: var(--ink);
  transform: rotate(var(--turn, 0deg));
}
.folded::after {
  content: '';
  position: absolute;
  right: 10px;
  bottom: 14px;
  left: 10px;
  height: 1px;
  background: var(--crease);
}
.folded b {
  font: 600 22px/1.2 var(--sans);
}
.folded span {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 18px;
}

/* ---------- Home ---------- */

/* The first screen: the headline beside a phone with the Widget on it, each in its half. */
.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 72px;
  padding: 24px var(--gutter) 112px;
}
.hero-words {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}
.hero h1 {
  margin: 0;
  font: 600 clamp(44px, 5vw, 72px) / 1.06 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.lead {
  max-width: 34ch;
  margin: 0;
  color: var(--on-room-soft);
  font-size: 21px;
  line-height: 1.5;
}

/* A phone at 4:00: its home screen's wallpaper, the clock, the Widget and a row of apps. */
.phone {
  box-sizing: border-box;
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 22px;
  justify-self: center;
  width: 380px;
  height: 600px;
  padding: 26px 18px;
  overflow: hidden;
  border: 10px solid var(--bezel);
  border-radius: 54px;
  background: linear-gradient(var(--wall-top), var(--wall-bottom));
  box-shadow: 0 0 0 1px var(--bezel-edge), 0 34px 60px -24px rgba(0, 0, 0, 0.5);
}
.clock {
  color: var(--wall-ink);
  font: 600 44px/1 var(--sans);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.phone .widget {
  align-self: center;
}
/* A widget drawn smaller than its 320 by 170, scaled from its top so what's under it follows it up. */
.phone .widget,
.screen .widget {
  transform-origin: 50% 0;
  transform: scale(var(--wz, 1));
  margin-bottom: calc(170px * (var(--wz, 1) - 1));
}
.phone-apps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.phone-apps span {
  aspect-ratio: 1;
  border-radius: 16px;
  background: var(--wall-app);
}
@media (max-width: 720px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 32px;
    padding: 8px var(--gutter) 56px;
  }
  .hero-words {
    gap: 18px;
  }
  .hero h1 {
    font-size: 44px;
    line-height: 1.08;
  }
  .lead {
    max-width: none;
    font-size: 17px;
  }
  /* It ends at the height of its first row of apps. */
  .phone {
    align-self: center;
    gap: 16px;
    width: min(calc(100vw - 40px), 335px);
    height: 400px;
    padding: 20px 12px;
    border-width: 8px;
    border-radius: 46px;
  }
  .phone .clock {
    padding-left: 6px;
    font-size: 34px;
  }
  .phone .widget {
    --wz: 0.92;
  }
}

/* A section title on Home. */
.section-title {
  margin: 0 0 40px;
  font: 600 clamp(36px, 4.4vw, 64px) / 1.05 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* How it works: the four pages of the app's How it works, drawn on the phone's screen, each beside its words, the phone
   right, then left, and so on; on a phone, the words over it. Each step plays once as it scrolls into view: home.js
   adds .ready to a step, so it shows where it starts, and .play once it's in view. Without them (Reduce Motion, or no
   script) each shows its end. */
.how {
  padding: 32px var(--gutter) 128px;
}
.steps {
  display: flex;
  flex-direction: column;
  gap: 72px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.step {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 72px;
}
.step:nth-child(odd) .words {
  order: -1;
}
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.step h3 {
  margin: 0;
  font: 600 clamp(36px, 3.9vw, 56px) / 1.06 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.step p {
  max-width: 28ch;
  margin: 16px 0 0;
  color: var(--on-room-soft);
  font-size: 22px;
  line-height: 1.45;
}
/* The phone's screen: the app's room under its lamp, the drawing in the middle of it. */
.screen {
  --z: 0.76;
  box-sizing: border-box;
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 320px;
  height: 560px;
  overflow: hidden;
  border: 10px solid var(--bezel);
  border-radius: 50px;
  background: radial-gradient(95% 55% at 50% 40%, var(--lamp), var(--room));
  box-shadow: 0 0 0 1px var(--bezel-edge), 0 34px 60px -24px rgba(0, 0, 0, 0.5);
}
.drawing {
  /* Scaled to the screen with a transform, which every browser applies the same way to the moves inside it, rather
     than zoom, which Firefox doesn't. Its box keeps its size, and the screen centres it. */
  flex: none;
  transform: scale(var(--z));
}
/* The last step's screen is the home screen at 4:00, the Widget on it. */
.screen.home {
  justify-content: flex-start;
  align-items: stretch;
  gap: 18px;
  padding: 24px 12px;
  background: linear-gradient(var(--wall-top), var(--wall-bottom));
}
.screen .clock {
  padding-left: 6px;
  font-size: 36px;
}
.screen .widget {
  --wz: 0.84;
  align-self: center;
}
.screen .phone-apps {
  gap: 18px;
  padding: 0 4px;
}
@media (max-width: 720px) {
  .how {
    padding: 24px var(--gutter) 72px;
  }
  .how .section-title {
    margin-bottom: 24px;
  }
  .steps {
    gap: 80px;
  }
  .step {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
  }
  .step .words {
    order: -1;
  }
  .step h3 {
    font-size: 30px;
    line-height: 1.12;
  }
  .step p {
    max-width: none;
    margin-top: 8px;
    font-size: 17px;
  }
  .screen {
    --z: 0.66;
    width: 280px;
    height: 460px;
    border-width: 8px;
    border-radius: 44px;
  }
  .screen.home {
    padding: 20px 10px;
  }
  .screen .clock {
    font-size: 30px;
  }
  .screen .widget {
    --wz: 0.74;
  }
}

/* Between a phone and a wide window, a half is narrower than a phone: the headline, then the phone; each step's words,
   then its phone. */
@media (min-width: 721px) and (max-width: 960px) {
  .hero,
  .step {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .hero h1 {
    max-width: 12em;
  }
  .step .words {
    order: -1;
  }
  .step h3,
  .step p {
    max-width: none;
  }
}

/* One short line: a note being written, as the app's How it works page 1. It types itself out behind its caret, and the
   counter counts up. */
.writing {
  --ear: 22px;
  width: 346px;
}
.writing .note-top {
  padding: 16px 18px 10px;
}
.writing .note-bottom {
  padding: 14px 18px 16px;
}
.typed {
  display: block;
  white-space: nowrap;
  font: italic 600 27px/32px var(--serif);
  letter-spacing: -0.005em;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.15em;
  background: var(--ink);
}
.counter {
  align-self: flex-end;
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
}
/* The caret stands still: a blinking one would be a second thing moving while another step plays. */

/* Stuck for words?: as the app's How it works page 2 (src/ui/how-it-works-drawings.tsx), on its 7 s loop. "Random
   question" and the other packs lie over the empty note; at 1 s "Random question" opens into the Question's slip, at
   Write a message's pace slowed 2.5 times, as the others go aside; the answer is typed from 2 s; at 6 s it all fades,
   and the packs come back. Without .ready (Reduce Motion, or no script) it stands as the app's does: the slip open,
   the answer written. A first play stops at 6 s; a play again starts there (.again), so its loop goes on unbroken. */
.draw {
  position: relative;
  width: 346px;
}
.over-note {
  position: relative;
  height: 84px;
}
.packs {
  position: absolute;
  top: 0;
  left: 88.5px;
  display: flex;
  gap: 8px;
  opacity: 0;
}
.pack,
.pack-face {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  width: 80.5px;
  min-height: 72px;
  padding: 8px;
  color: var(--on-accent);
  font: 600 13px/16px var(--serif);
}
.pack {
  border-radius: 8px;
  background: var(--accent);
}
.pack:nth-child(1) {
  transform: rotate(0.63deg);
}
.pack:nth-child(2) {
  transform: rotate(-0.405deg);
}
.pack:nth-child(3) {
  transform: rotate(0.99deg);
}
/* "Random question", which is the slip: it opens from the pack's place and size into its own. */
.slip {
  position: absolute;
  top: 16px;
  left: 8px;
  width: 308px;
  height: 80px;
  border-radius: 6px;
  background: var(--accent);
  box-shadow: var(--slip-shadow);
  color: var(--on-accent);
  transform: rotate(0.54deg);
}
.slip-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}
.slip-body {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  gap: 9px;
  width: 308px;
  padding: 12px 14px 0;
  box-sizing: border-box;
  font: 600 17px/22px var(--serif);
}
.pack-face {
  position: absolute;
  top: 0;
  left: 0;
  height: 72px;
  opacity: 0;
}
.draw .note {
  --turn: 0.63deg;
  z-index: 1;
  width: 346px;
}
.draw .typed {
  /* Two lines from the start, so the note keeps its size as the answer takes its second line (the app's answer has
     one). */
  min-height: 66px;
  white-space: normal;
}
/* How it works' notes have no crease line, as the app's drawings. And their two halves overlap, as the app's
   (foldOverlap), so no seam shows between them where a phone's browser draws a turned note's halves apart: by 2px, as
   the drawings are scaled down. The notes that don't fold are flat, so Safari draws them as one picture. */
.how .note-bottom::before {
  content: none;
}
.how .note-fold {
  margin-top: -2px;
}
.writing .note-fold {
  perspective: none;
}
.writing .note-turn {
  transform-style: flat;
}
/* Before it plays: the packs over the empty note. */
.ready:not(.play) .slip {
  top: 0;
  left: 0;
  width: 80.5px;
  height: 72px;
  border-radius: 8px;
  transform: rotate(-0.9deg);
}
.ready:not(.play) .pack-face,
.ready:not(.play) .packs {
  opacity: 1;
}
.ready:not(.play) .slip-body {
  opacity: 0;
}
/* The loop, at 1000 ms = 14.2857%. The opening's ease is the drop's ease-in-out. */
@keyframes slip-loop {
  0%,
  14.2857% {
    top: 0;
    left: 0;
    width: 80.5px;
    height: 72px;
    border-radius: 8px;
    transform: rotate(-0.9deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.5, 0, 0.2, 1);
  }
  25%,
  85.7143% {
    top: 16px;
    left: 8px;
    width: 308px;
    height: 80px;
    border-radius: 6px;
    transform: rotate(0.54deg);
    opacity: 1;
    animation-timing-function: linear;
  }
  91.4286% {
    top: 16px;
    left: 8px;
    width: 308px;
    height: 80px;
    border-radius: 6px;
    transform: rotate(0.54deg);
    opacity: 0;
  }
  91.43% {
    top: 0;
    left: 0;
    width: 80.5px;
    height: 72px;
    border-radius: 8px;
    transform: rotate(-0.9deg);
    opacity: 0;
  }
  100% {
    top: 0;
    left: 0;
    width: 80.5px;
    height: 72px;
    border-radius: 8px;
    transform: rotate(-0.9deg);
    opacity: 1;
  }
}
@keyframes face-loop {
  0%,
  14.2857% {
    opacity: 1;
    animation-timing-function: cubic-bezier(0.5, 0, 0.2, 1);
  }
  18.5714%,
  91.4286% {
    opacity: 0;
  }
  91.43%,
  100% {
    opacity: 1;
  }
}
@keyframes question-loop {
  0%,
  17.8571% {
    opacity: 0;
    animation-timing-function: cubic-bezier(0.5, 0, 0.2, 1);
  }
  24.2857%,
  91.4286% {
    opacity: 1;
  }
  91.43%,
  100% {
    opacity: 0;
  }
}
@keyframes others-loop {
  0%,
  14.2857% {
    opacity: 1;
    transform: translateX(0);
    animation-timing-function: cubic-bezier(0.5, 0, 0.2, 1);
  }
  20%,
  91.4286% {
    opacity: 0;
    transform: translateX(40px);
    animation-timing-function: linear;
  }
  91.43% {
    opacity: 0;
    transform: translateX(0);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes answer-loop {
  0%,
  85.7143% {
    opacity: 1;
  }
  91.4286%,
  94.2856% {
    opacity: 0;
  }
  94.2857%,
  100% {
    opacity: 1;
  }
}
.ready.play .slip {
  animation: slip-loop 7s linear 0s 0.857143 both;
}
.ready.play .pack-face {
  animation: face-loop 7s linear 0s 0.857143 both;
}
.ready.play .slip-body {
  animation: question-loop 7s linear 0s 0.857143 both;
}
.ready.play .packs {
  animation: others-loop 7s linear 0s 0.857143 both;
}
.ready.play .draw .typed {
  animation: answer-loop 7s linear 0s 0.857143 both;
}
.ready.play.again .slip,
.ready.play.again .pack-face,
.ready.play.again .slip-body,
.ready.play.again .packs,
.ready.play.again .draw .typed {
  animation-delay: -6s;
  animation-iteration-count: 1.857143;
}

/* Folded for tomorrow: as the app's How it works page 3, on its 6 s loop. The note for three days on lies open, the
   Message across its crease; at 1.32 s its bottom half folds up over its top, and at 2.16 s the folded note drops onto
   the ones for the days before, where it lies as the pile's top note; at 5.16 s it goes from the pile, and the open
   note comes back. Without .ready (Reduce Motion, or no script) it stands as the app's does at first: open, over the
   pile. A first play stops at 5.16 s, lying on the pile; a play again starts there (.again), so its loop goes on
   unbroken. */
.folding {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 346px;
}
.sending {
  --ear: 22px;
  z-index: 1;
  width: 346px;
  /* It turns and shrinks about the middle of its top half, which is the folded note as it drops. */
  transform-origin: 50% 25%;
  transform: translateY(0) scale(1) rotate(-2deg);
}
.sending .note-top,
.sending .note-bottom {
  height: 69px;
  overflow: hidden;
}
.sending .note-bottom {
  height: 71px;
}
/* The whole note's words in each half, each half showing its own part of them: the Message lies across the fold. */
.sending-words {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 138px;
  padding: 16px 16px 0 18px;
}
.note-bottom .sending-words {
  top: -67px;
}
/* Flat: the bottom half shortens toward the crease, and the outside, over the top half, grows up from it. */
.sending .note-fold {
  perspective: none;
}
.sending .note-turn {
  transform-style: flat;
}
.sending .note-bottom {
  transform-origin: 50% 0;
  -webkit-backface-visibility: visible;
  backface-visibility: visible;
}
.sending .note-outside {
  inset: auto;
  top: -67px;
  right: 0;
  left: 0;
  height: 69px;
  z-index: 1;
  transform-origin: 50% 100%;
  transform: scaleY(0);
  -webkit-backface-visibility: visible;
  backface-visibility: visible;
}
.sending .note-label {
  margin-bottom: 10px;
}
.planned {
  white-space: nowrap;
  font: italic 600 28px/33px var(--serif);
  letter-spacing: -0.14px;
}
.shows {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 18px;
}
/* The outside of a folded note: plain paper, as the app's, who it's for and its day. */
.pile .folded::after {
  content: none;
}
.sending .note-outside,
.pile .folded {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 0 18px;
}
.sending .note-outside b,
.pile b {
  font: 600 22px/28px var(--sans);
}
.sending .note-outside span,
.pile span {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 18px;
}
.pile {
  position: relative;
  width: 346px;
  height: 86px;
  margin-top: 14px;
}
/* The notes for the days before, from the bottom up, the folding note's outside made smaller. Their words stand at
   their top, so the strip of each that shows under the one over it is plain paper. */
.pile .folded {
  justify-content: flex-start;
  padding-top: 6px;
  position: absolute;
  width: 346px;
  height: 69px;
  transform: scale(0.75) rotate(var(--turn));
}
/* The bottom one always lies under the others: only its edge shows, so its words would only show cut. */
.pile .folded:nth-child(1) > * {
  visibility: hidden;
}
.pile .folded:nth-child(1) {
  --turn: -3deg;
  top: 17px;
  left: -4px;
}
.pile .folded:nth-child(2) {
  --turn: 2deg;
  top: 8px;
  left: 1px;
}
/* The fold eases in, as DESIGN.md's fold; the drop goes from rest into place, onto the pile's top: 2 halves and the
   gap down, less 6, so it lies 14 over the note under it, smaller, and turned 1° less. */
/* The fold drawn as it looks from the front, as the app draws it (no 3D turn, which Safari draws through a turned
   half): the front half shortens toward the crease as it turns up, then its outside grows up from the crease over the
   top half, each as high as the turn's cosine, on the fold's ease-in from 1.32 s to 2.16 s. */
@keyframes front-loop {
  0% {
    transform: scaleY(1);
  }
  22% {
    transform: scaleY(1.000);
  }
  22.5% {
    transform: scaleY(1.000);
  }
  23% {
    transform: scaleY(1.000);
  }
  23.5% {
    transform: scaleY(1.000);
  }
  24% {
    transform: scaleY(1.000);
  }
  24.5% {
    transform: scaleY(1.000);
  }
  25% {
    transform: scaleY(0.999);
  }
  25.5% {
    transform: scaleY(0.998);
  }
  26% {
    transform: scaleY(0.997);
  }
  26.5% {
    transform: scaleY(0.995);
  }
  27% {
    transform: scaleY(0.991);
  }
  27.5% {
    transform: scaleY(0.985);
  }
  28% {
    transform: scaleY(0.977);
  }
  28.5% {
    transform: scaleY(0.965);
  }
  29% {
    transform: scaleY(0.949);
  }
  29.5% {
    transform: scaleY(0.925);
  }
  30% {
    transform: scaleY(0.892);
  }
  30.5% {
    transform: scaleY(0.848);
  }
  31% {
    transform: scaleY(0.787);
  }
  31.5% {
    transform: scaleY(0.707);
  }
  32% {
    transform: scaleY(0.601);
  }
  32.5% {
    transform: scaleY(0.465);
  }
  33% {
    transform: scaleY(0.293);
  }
  33.5% {
    transform: scaleY(0.082);
  }
  34% {
    transform: scaleY(0.000);
  }
  34.5% {
    transform: scaleY(0.000);
  }
  35% {
    transform: scaleY(0.000);
  }
  35.5% {
    transform: scaleY(0.000);
  }
  36% {
    transform: scaleY(0.000);
  }
  92% {
    transform: scaleY(0);
  }
  92.01%,
  100% {
    transform: scaleY(1);
  }
}
@keyframes outside-loop {
  0% {
    transform: scaleY(0);
  }
  22% {
    transform: scaleY(0.000);
  }
  22.5% {
    transform: scaleY(0.000);
  }
  23% {
    transform: scaleY(0.000);
  }
  23.5% {
    transform: scaleY(0.000);
  }
  24% {
    transform: scaleY(0.000);
  }
  24.5% {
    transform: scaleY(0.000);
  }
  25% {
    transform: scaleY(0.000);
  }
  25.5% {
    transform: scaleY(0.000);
  }
  26% {
    transform: scaleY(0.000);
  }
  26.5% {
    transform: scaleY(0.000);
  }
  27% {
    transform: scaleY(0.000);
  }
  27.5% {
    transform: scaleY(0.000);
  }
  28% {
    transform: scaleY(0.000);
  }
  28.5% {
    transform: scaleY(0.000);
  }
  29% {
    transform: scaleY(0.000);
  }
  29.5% {
    transform: scaleY(0.000);
  }
  30% {
    transform: scaleY(0.000);
  }
  30.5% {
    transform: scaleY(0.000);
  }
  31% {
    transform: scaleY(0.000);
  }
  31.5% {
    transform: scaleY(0.000);
  }
  32% {
    transform: scaleY(0.000);
  }
  32.5% {
    transform: scaleY(0.000);
  }
  33% {
    transform: scaleY(0.000);
  }
  33.5% {
    transform: scaleY(0.000);
  }
  34% {
    transform: scaleY(0.165);
  }
  34.5% {
    transform: scaleY(0.435);
  }
  35% {
    transform: scaleY(0.700);
  }
  35.5% {
    transform: scaleY(0.912);
  }
  36% {
    transform: scaleY(1.000);
  }
  92% {
    transform: scaleY(1);
  }
  92.01%,
  100% {
    transform: scaleY(0);
  }
}
@keyframes send-loop {
  0%,
  36% {
    transform: translateY(0) scale(1) rotate(-2deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.5, 0, 0.2, 1);
  }
  54%,
  86% {
    transform: translateY(146px) scale(0.75) rotate(-1deg);
    opacity: 1;
    animation-timing-function: cubic-bezier(0.5, 0, 0.2, 1);
  }
  /* Taken off the pile: it lifts as it goes, so the note under it doesn't read as this one sinking. */
  92% {
    transform: translateY(126px) scale(0.75) rotate(-1deg);
    opacity: 0;
  }
  92.01% {
    transform: translateY(0) scale(1) rotate(-2deg);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1) rotate(-2deg);
    opacity: 1;
  }
}
/* The words under the outside go once it covers them, as the app's: on a turned note a row of them shows along its edge. */
@keyframes covered-loop {
  0%,
  35.99% {
    opacity: 1;
  }
  36%,
  92% {
    opacity: 0;
  }
  92.01%,
  100% {
    opacity: 1;
  }
}
.ready.play .sending .note-top .sending-words {
  animation: covered-loop 6s linear 0s 0.86 both;
}
.ready.play.again .sending .note-top .sending-words {
  animation-delay: -5.16s;
  animation-iteration-count: 1.86;
}
.ready.play .sending {
  animation: send-loop 6s linear 0s 0.86 both;
}
.ready.play .sending .note-bottom {
  animation: front-loop 6s linear 0s 0.86 both;
}
.ready.play .sending .note-outside {
  animation: outside-loop 6s linear 0s 0.86 both;
}
.ready.play.again .sending,
.ready.play.again .sending .note-bottom,
.ready.play.again .sending .note-outside {
  animation-delay: -5.16s;
  animation-iteration-count: 1.86;
}


/* Shows at 4:00: the medium widget fades between two Messages, as the app's How it works page 4, in the style the
   buttons under the phone pick. */
.widget-styles {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.widget-styles button {
  flex: none;
  box-sizing: border-box;
  min-width: 88px;
  min-height: 44px;
  margin: 0;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--on-room);
  font: 600 15px/20px var(--sans);
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.widget-styles button[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}
.widget-styles button[aria-pressed='false']:active {
  background: var(--raised);
}
@media (hover: hover) {
  .widget-styles button[aria-pressed='false']:hover {
    background: var(--raised);
  }
}

/* The medium Widget as the widgets are since #593, at the app's drawing of it (320 by 170): the room of its style, Light
   or Dark, with the lamp's glow in proportion to its size (widgetGlow), a faint edge, and on it the cream note with
   its dog-ear and its shadow, in amber: the photo circle and the Question's slip. Colours from widgetColors in
   src/ui/theme.ts. The first screen's follows the page; the last step's, the style its buttons pick. */
.widget {
  --w-room: var(--light, #f3ebdd) var(--dark, #12100e);
  --w-lamp: var(--light, #fbe3b8) var(--dark, #3b2a1b);
  --w-text: var(--light, #2a1e12) var(--dark, #f5e9d5);
  --w-muted: var(--light, #6a5a47) var(--dark, #c9bca6);
  --w-faint: var(--light, rgba(42, 30, 18, 0.22)) var(--dark, rgba(245, 233, 213, 0.3));
  --w-dash: var(--light, rgba(42, 30, 18, 0.5)) var(--dark, rgba(245, 233, 213, 0.55));
  --w-edge: var(--light, rgba(42, 30, 18, 0.06)) var(--dark, rgba(245, 233, 213, 0.08));
  --w-flap: var(--light, #e6d1ac) var(--dark, #efdfc2);
  --w-shadow:
    var(--light, drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08)) drop-shadow(0 4px 6px rgba(70, 45, 15, 0.2)))
    var(--dark, drop-shadow(0 4px 7px rgba(0, 0, 0, 0.55)));
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex: none;
  gap: 10px;
  width: 320px;
  height: 170px;
  padding: 10px;
  overflow: hidden;
  border-radius: 22px;
  background: radial-gradient(85% 95% at 50% 32%, var(--w-lamp), var(--w-room));
  color: var(--w-text);
  font-family: var(--sans);
  text-align: left;
}
.widget[data-style='light'] {
  --w-room: #f3ebdd;
  --w-lamp: #fbe3b8;
  --w-text: #2a1e12;
  --w-muted: #6a5a47;
  --w-faint: rgba(42, 30, 18, 0.22);
  --w-dash: rgba(42, 30, 18, 0.5);
  --w-edge: rgba(42, 30, 18, 0.06);
  --w-flap: #e6d1ac;
  --w-shadow: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08)) drop-shadow(0 4px 6px rgba(70, 45, 15, 0.2));
}
.widget[data-style='dark'] {
  --w-room: #12100e;
  --w-lamp: #3b2a1b;
  --w-text: #f5e9d5;
  --w-muted: #c9bca6;
  --w-faint: rgba(245, 233, 213, 0.3);
  --w-dash: rgba(245, 233, 213, 0.55);
  --w-edge: rgba(245, 233, 213, 0.08);
  --w-flap: #efdfc2;
  --w-shadow: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.55));
}
.widget::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--w-edge);
  pointer-events: none;
}
/* Turning to the other style fades its colours. */
.widget,
.widget * {
  transition-duration: 0.4s;
  transition-property: background-color, border-color, color, box-shadow;
  transition-timing-function: ease;
}
@media (prefers-reduced-motion: reduce) {
  .widget,
  .widget * {
    transition: none;
  }
}
.widget-main {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}
/* A Question's slip, tucked 6 under its note, 5 in from its left and ending 30 before its right. */
.widget-slip {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 30px -6px 5px;
  padding: 5px 8px 10px;
  border-radius: 6px 6px 0 0;
  background: #f2b544;
  color: #2a1e12;
  font: 600 11px/14px var(--serif);
}
.widget-slip .icon {
  margin-top: 1px;
}
.widget-note {
  position: relative;
  display: block;
  flex: 1;
  filter: var(--w-shadow);
}
.widget-paper {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff4de;
  color: #2a1e12;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}
.widget-ear {
  position: absolute;
  top: 0;
  right: 0;
  width: 16px;
  height: 16px;
  background: linear-gradient(to top right, var(--w-flap) 50%, rgba(0, 0, 0, 0) 50%);
  border-bottom-left-radius: 3px;
}
.widget-from {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-right: 10px;
}
.widget-photo {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f2b544;
  color: #2a1e12;
  font: 700 10px/1 var(--sans);
}
.widget-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 600 13px/17px var(--sans);
}
.widget-message {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font: italic 600 21px/25px var(--serif);
  letter-spacing: -0.1px;
}
/* Your side: "Tomorrow" over a dashed box with a +, and at its foot the dots and the ring to the next. */
.widget-side {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 6px;
  width: 64px;
}
.widget-tomorrow {
  color: var(--w-muted);
  font: 600 12px/16px var(--sans);
}
.widget-write {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border: 1.5px dashed var(--w-dash);
  border-radius: 8px;
}
.widget-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: auto;
}
.widget-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--w-faint);
}
/* The current one, over the dot. */
.widget-dot::after {
  content: '';
  display: block;
  height: 100%;
  border-radius: 50%;
  background: var(--w-text);
  opacity: 0;
}
.widget-dot:first-child::after {
  opacity: 1;
}
.widget-next {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 2px;
  border: 1.5px solid var(--w-text);
  border-radius: 50%;
}
.widget-next .icon {
  stroke-width: 2.5;
}
/* The two Messages, each over the widget's note side: Lena's, with the Question, and Dad's. One shows for half of the
   loop and the other for the rest, each fading into the next over half a second, and the dots go with them. Without
   .play (Reduce Motion, or no script), Lena's stays. */
.widget-message-one,
.widget-message-two {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.widget-message-two {
  opacity: 0;
}
@keyframes message-one {
  0%,
  44% {
    opacity: 1;
  }
  50%,
  94% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@keyframes message-two {
  0%,
  44% {
    opacity: 0;
  }
  50%,
  94% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
.ready.play .widget-message-one,
.ready.play .widget-dot:first-child::after {
  animation: message-one 8s infinite;
}
.ready.play .widget-message-two,
.ready.play .widget-dot + .widget-dot::after {
  animation: message-two 8s infinite;
}

/* ---------- Home: the rest, in the room, its rows divided by hairlines ---------- */

.around,
.people,
.get {
  padding: 96px var(--gutter);
}
.around {
  padding-top: 32px;
}
.around ul,
.people ul {
  display: grid;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}
/* Four columns, two by two on a narrower window, so a drawing never runs into the next; the people's three. */
.around ul {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.people ul {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (min-width: 721px) and (max-width: 1180px) {
  .around ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.around li,
.people li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding-top: 24px;
  border-top: 1px solid var(--hair);
}
.around h3,
.people h3 {
  margin: 0;
  font: 600 24px/30px var(--serif);
}
.around p,
.people p {
  max-width: 32ch;
  margin: 0;
  color: var(--on-room-soft);
  font-size: 17px;
  line-height: 1.5;
}
/* A drawing of each, over its words. */
.specimen {
  display: flex;
  align-items: center;
  height: 96px;
  margin-bottom: 12px;
}
.reactions {
  gap: 6px;
}
.reactions i {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--raised);
  font-size: 22px;
  font-style: normal;
}
.reactions i:first-child {
  background: var(--accent);
}
.bubbles {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  width: 210px;
}
.bubbles span {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 21px;
}
/* As in a Chat: theirs on the paper, with its faint edge in the light room, yours in amber, each with the paper's
   shadow, so the paper stands out from the light room. */
.bubbles span:first-child {
  border-bottom-left-radius: 4px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--light, rgba(42, 30, 18, 0.12)) var(--dark, rgba(0, 0, 0, 0)), var(--paper-shadow);
  color: var(--ink);
}
.bubbles span:last-child {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: var(--accent);
  box-shadow: var(--paper-shadow);
  color: var(--on-accent);
}
.streak {
  font: 700 34px/1 var(--sans);
  letter-spacing: -0.01em;
}
.memories {
  position: relative;
  width: 200px;
}
.memories span {
  position: absolute;
  box-sizing: border-box;
  width: 160px;
  height: 64px;
  border-radius: 6px;
  background: var(--paper);
  box-shadow: var(--paper-shadow);
}
.memories span:nth-child(1) {
  top: 6px;
  left: 40px;
  transform: rotate(4deg);
}
.memories span:nth-child(2) {
  top: 14px;
  left: 22px;
  transform: rotate(-3deg);
}
.memories span:nth-child(3) {
  top: 24px;
  left: 0;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--ink);
  white-space: nowrap;
  font: italic 600 18px/22px var(--serif);
  transform: rotate(-1deg);
}

.get {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 112px;
}
.get .section-title {
  margin-bottom: 12px;
}
.get p {
  margin: 0;
  color: var(--on-room-soft);
  font-size: 19px;
}
@media (max-width: 720px) {
  /* The column is already a phone's: the words take its whole width rather than breaking early. */
  .around p,
  .people p {
    max-width: none;
  }
  .around,
  .people,
  .get {
    padding: 56px var(--gutter);
  }
  .around {
    padding-top: 16px;
  }
  .around ul,
  .people ul {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .specimen {
    height: 80px;
  }
  /* The notes stand 88 high with their turns, and their shadow under them. */
  .specimen.memories {
    height: 100px;
  }
  .get {
    padding-bottom: 72px;
  }
}

/* ---------- The text page: what it is in the room, the text on a cream page ---------- */

.band {
  padding: 24px var(--gutter) 48px;
}
.band h1 {
  max-width: 1100px;
  margin: 0;
  font: 600 clamp(40px, 4.45vw, 64px) / 1.06 var(--serif);
  letter-spacing: -0.02em;
}
.updated {
  margin: 14px 0 0;
  color: var(--on-room-soft);
  font-size: 15px;
  line-height: 20px;
}
/* The draft notice is a cream slip with an info icon; the emergency one on child safety has a red outline and a red
   alert icon, as the app's Suspension banner. Red on cream is 5.3:1. */
.notice {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 680px;
  margin: 24px 0 0;
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--paper-shadow);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}
.notice .icon {
  margin-top: 2px;
}
.notice.urgent {
  box-shadow: inset 0 0 0 2px var(--error), var(--paper-shadow);
}
.notice.urgent .icon {
  color: var(--error);
}
.notice strong {
  font-weight: 700;
}
/* The sections, as the app's jump chips, raised from the room: they wrap on a screen and scroll sideways on a phone. */
.chips {
  margin-top: 24px;
}
.chips ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 1100px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  flex: none;
}
.chip {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--raised);
  color: var(--on-room);
  font: 600 14px/18px var(--sans);
  text-decoration: none;
  white-space: nowrap;
}
.chip:active {
  background: var(--accent);
  color: var(--on-accent);
}
@media (hover: hover) {
  .chip:hover {
    background: var(--accent);
    color: var(--on-accent);
  }
}
@media (max-width: 720px) {
  .band {
    padding: 8px var(--gutter) 32px;
  }
  .band h1 {
    font-size: 40px;
  }
  .notice {
    padding: 14px 16px;
    font-size: 15px;
  }
  /* Runs to the screen's edge, with room for the focus ring. */
  .chips {
    margin: 19px calc(-1 * var(--gutter)) -5px -5px;
    padding: 5px 0 5px 5px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .chips::-webkit-scrollbar {
    display: none;
  }
  .chips ul {
    flex-wrap: nowrap;
    max-width: none;
    padding-right: var(--gutter);
  }
}

/* The text's page: cream paper as wide as the content, as far in from the right as from the left, with a dog-ear cut
   out of it and its shadow cast by its shape, the text left-aligned across it. */
.paper-page {
  --ear: 40px;
  margin: 0 var(--gutter) 96px;
  filter: var(--note-shadow);
}
.prose {
  position: relative;
  display: block;
  padding: 64px 64px 72px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  clip-path: polygon(0 0, calc(100% - var(--ear)) 0, 100% var(--ear), 100% 100%, 0 100%);
  font-size: 17px;
  line-height: 1.65;
  text-wrap: pretty;
}
.prose::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: var(--ear);
  height: var(--ear);
  background: linear-gradient(to top right, var(--flap) 50%, rgba(0, 0, 0, 0) 50%);
  border-bottom-left-radius: calc(var(--ear) / 6);
  filter: var(--flap-shadow);
}
.prose h2 {
  margin: 56px 0 14px;
  font: 600 30px/1.2 var(--serif);
  letter-spacing: -0.01em;
  scroll-margin-top: 24px;
}
.prose > h2:first-child {
  margin-top: 0;
}
.prose h3 {
  margin: 32px 0 8px;
  font: 600 19px/1.4 var(--sans);
}
.prose p {
  margin: 0 0 16px;
}
.prose ul {
  margin: 0 0 16px;
  padding-left: 22px;
}
.prose li {
  margin: 0 0 10px;
  padding-left: 4px;
}
.prose li::marker {
  color: var(--paper-link);
}
.prose strong {
  font-weight: 700;
}
.prose a {
  border-radius: 2px;
  color: var(--paper-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
@media (max-width: 720px) {
  .paper-page {
    --ear: 26px;
    margin: 0 8px 56px;
  }
  .prose {
    padding: 28px 22px 36px;
  }
  .prose h2 {
    margin: 44px 0 10px;
    font-size: 26px;
  }
  .prose h3 {
    margin-top: 24px;
  }
}

/* ---------- The status page: a note in the middle of the room ---------- */

.status main {
  align-items: center;
  justify-content: center;
  padding: 24px var(--gutter) 64px;
}
/* One of the Invite page's states. */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.card {
  width: min(600px, 100%);
  text-align: center;
}
.card .note-top {
  align-items: center;
  padding: 44px 40px 30px;
}
.card .note-bottom {
  align-items: center;
  padding: 22px 40px 30px;
}
.card.unfold .note-top {
  padding: 40px 40px 30px;
}
/* The note's words in Gelasio italic, as the app's Invite. */
.card h1 {
  margin: 0;
  font: italic 600 clamp(30px, 3.1vw, 44px) / 1.14 var(--serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.card p {
  max-width: 32ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.45;
}
.card.unfold p {
  max-width: 30ch;
}
.card .note-outside {
  font-size: 34px;
}
/* The inviter's initial, never a photo (ADR-0005), on amber as in the app. */
.initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font: 700 30px/1 var(--sans);
}
.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(42, 30, 18, 0.25);
}
.loading {
  --turn: -2deg;
  align-items: center;
  width: 260px;
  height: 156px;
  padding: 0 0 16px;
}
.loading b {
  font-size: 28px;
}
.status-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  margin-top: 48px;
}
.status-actions .badges {
  justify-content: center;
}
.helper {
  max-width: 380px;
  margin: 0;
  color: var(--on-room-soft);
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}
@media (max-width: 720px) {
  .status main {
    padding-bottom: 48px;
  }
  .card .note-top,
  .card.unfold .note-top {
    padding: 28px 22px 22px;
  }
  .card .note-bottom {
    padding: 18px 22px 24px;
  }
  .card h1 {
    font-size: 30px;
  }
  .card p {
    font-size: 17px;
  }
  .card .note-outside {
    font-size: 26px;
  }
  .initial {
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    font-size: 24px;
  }
  .card-icon {
    margin-bottom: 14px;
  }
  .loading {
    width: 220px;
    height: 132px;
  }
  .loading b {
    font-size: 24px;
  }
  .status-actions {
    align-self: stretch;
    gap: 20px;
    margin-top: 40px;
  }
}
