/* The app's chrome: quiet and neutral, so a host's accent, font and corners take over (sdk.js's theme) */
/* (a number once computed, so zoom and calc() take it and framing.js reads it as one; a browser that can't work it out
   keeps the chrome at 1) */
@property --ui {
  syntax: '<number>';
  inherits: true;
  initial-value: 1;
}
:root {
  /* the thumbs on a drawing and a design (thumbs.js): a hand's outline, filled once given (up in the heart's coral) */
  --thumb-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324221f' stroke-width='1.8' stroke-linejoin='round'%3E%3Cg%3E%3Cpath d='M3 11a1 1 0 0 1 1-1h3v10H4a1 1 0 0 1-1-1Z'/%3E%3Cpath d='M7 11 11 3.5c1.6 0 2.5 1.1 2.2 2.7l-.6 3.3h5.9c1.4 0 2.4 1.3 2.1 2.7l-1.4 6.4c-.2.9-1 1.4-1.9 1.4H7Z'/%3E%3C/g%3E%3C/svg%3E");
  --thumb-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324221f' stroke-width='1.8' stroke-linejoin='round'%3E%3Cg transform='rotate(180 12 12)'%3E%3Cpath d='M3 11a1 1 0 0 1 1-1h3v10H4a1 1 0 0 1-1-1Z'/%3E%3Cpath d='M7 11 11 3.5c1.6 0 2.5 1.1 2.2 2.7l-.6 3.3h5.9c1.4 0 2.4 1.3 2.1 2.7l-1.4 6.4c-.2.9-1 1.4-1.9 1.4H7Z'/%3E%3C/g%3E%3C/svg%3E");
  --thumb-up-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e2603a' stroke='%23e2603a' stroke-width='1.8' stroke-linejoin='round'%3E%3Cg%3E%3Cpath d='M3 11a1 1 0 0 1 1-1h3v10H4a1 1 0 0 1-1-1Z'/%3E%3Cpath d='M7 11 11 3.5c1.6 0 2.5 1.1 2.2 2.7l-.6 3.3h5.9c1.4 0 2.4 1.3 2.1 2.7l-1.4 6.4c-.2.9-1 1.4-1.9 1.4H7Z'/%3E%3C/g%3E%3C/svg%3E");
  --thumb-down-on: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2324221f' stroke='%2324221f' stroke-width='1.8' stroke-linejoin='round'%3E%3Cg transform='rotate(180 12 12)'%3E%3Cpath d='M3 11a1 1 0 0 1 1-1h3v10H4a1 1 0 0 1-1-1Z'/%3E%3Cpath d='M7 11 11 3.5c1.6 0 2.5 1.1 2.2 2.7l-.6 3.3h5.9c1.4 0 2.4 1.3 2.1 2.7l-1.4 6.4c-.2.9-1 1.4-1.9 1.4H7Z'/%3E%3C/g%3E%3C/svg%3E");
  --accent: var(--host-accent, #24221f);
  --accent-ink: var(--host-accent-ink, #fbf8f3);
  --ui-font: var(--host-font, 'Inter', system-ui, -apple-system, sans-serif);
  --radius: var(--host-radius, 16px);
  --surface: #ece8e1;
  /* the paper of the sheets and dialogs over the book */
  --sheet-paper: #fbf9f5;
  --glass: rgb(255 253 249 / 0.82);
  --line: rgb(36 34 31 / 0.1);
  --text: #24221f;
  --quiet: #77716a;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* the chrome's size (--ui, registered below): 1 up to a screen of 1600 × 1000, and on a bigger one the share it is
     bigger by, its width's or its height's, whichever is less, as the book grows by the less of the two. tan(atan2())
     turns two lengths' ratio into a number. The chrome's layers wear it as zoom (the top bar, the agent's dock, the
     side panel, the making card, the choices, the magnifier's buttons); what the table places itself (the arrows, the
     tray's shelf) is sized by it in framing.js and tray.js, through measureStage's `ui` */
  --ui: max(1, min(tan(atan2(100vw, 1600px)), tan(atan2(100vh, 1000px))));
  /* what at the window's top isn't ours: the phone's notch, and on the book's shelf in our shop the shop's bar, which
     lies in the page's flow above every fixed layer (--shop-bar, products/front/README.md) */
  --safe-top: calc(env(safe-area-inset-top, 0px) + var(--shop-bar, 0px));
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
/* every scroll in the app wears the same quiet thumb on a clear track, not the browser's grey bar (a place that hides
   its bar on purpose, like a row of choices, still says so itself) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgb(40 30 20 / 0.28) transparent;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  font: 15px/1.4 var(--ui-font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* ---- chips: every button of the chrome */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  font-weight: 500;
  white-space: nowrap;
  transition:
    transform 0.25s var(--ease),
    background 0.25s,
    opacity 0.25s;
}
.chip:active {
  transform: scale(0.96);
}
.chip:disabled {
  opacity: 0.35;
  cursor: default;
}
.chip svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chip-accent {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
}
/* Alle pagina's keeps its place before there's a book, unseen, so the title stays put */
.top-side .chip:disabled {
  opacity: 0;
  pointer-events: none;
}
/* Ongedaan maken and its redo: with the book's other changes on the right, away from Alle pagina's, which goes
   somewhere (an arrow beside it read as "terug"). The two stand joined as one pair whenever
   either has a step, so they read as undo and redo, never a lone arrow back; the one without a step shows faint. With
   neither, the pair keeps its place unseen. */
.take-pair {
  display: inline-flex;
}
.take-pair:not(:has(> :enabled)) {
  visibility: hidden;
}
.take-pair > .chip:disabled {
  opacity: 0.38;
  pointer-events: none;
}
.take-pair > .take-undo {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right-width: 0;
}
.take-pair > .take-redo {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  box-shadow: inset 1px 0 0 rgb(36 34 31 / 0.12);
}
/* undo and redo: each its arrow alone, the two the same size, named by their aria-labels and titles (takeback.js), in
   the top bar (by their ids, which outrank the bar's own chip sizes) and wherever they're copied */
#undo,
#redo,
.take-undo,
.take-redo {
  width: 40px;
  padding: 0;
  justify-content: center;
}
/* a chip whose view or sheet is on (Alle pagina's in the overview, Foto's open): pressed into the bar */
.chip[aria-pressed='true'],
.chip:not(.chip-accent)[aria-expanded='true'] {
  background: color-mix(in srgb, var(--accent) 14%, #f3eee7);
  border-color: color-mix(in srgb, var(--accent) 38%, transparent);
  box-shadow: inset 0 1px 3px rgb(36 34 31 / 0.16);
}

/* why the page goes no further: framed by a page that isn't ours or a partner's, or a saved book the device won't read
   back now (app.js stopWith) */
.refused {
  max-width: 32em;
  margin: 20vh auto 0;
  padding: 0 24px;
  text-align: center;
}

/* ---- the start: a closed book on the table whose cover keeps becoming another book (start.js), and one button */
.start,
.ways {
  /* what's above the agent's dock when it speaks over the ways (none kept: app.js measures it, 0 while it's hidden, and
     writes --dock-height on its readers alone, #start, #ways and #choices: a new reader is added there) */
  --above-dock: calc(100dvh - var(--dock-height, 0px) - var(--dock-lift));
  /* how wide the ways may lie: the screen, less the dock where it stands as a column at the right (below) */
  --ways-wide: 100vw;
  /* the height the row under the book takes (Android's tip on picking many, back and without, the samples), with the gap above it:
     ways.js measures the row (--under-height), as it wraps to more lines on a narrow screen; the book is sized to what's
     left, never with less than 120px kept */
  --ways-gap: 40px;
  --under-room: max(120px, var(--under-height, 0px) + var(--ways-gap));
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--ways-gap);
  padding-bottom: calc(var(--dock-height, 0px) + var(--dock-lift));
  background: var(--surface);
  /* how it looks gone, written once: leaving, and the first frame the ways come back in */
  --closed: scale(1.05);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
}
/* a phone held sideways over a book (the photos all refused, or a book begun without them): the dock stands as a
   column at the right (agent.css --dock-side), so the ways take the screen's height beside it rather than what its
   column's height would leave below it */
@media (max-height: 500px) and (min-aspect-ratio: 3/2) and (max-width: 1099px) {
  body.booked .ways {
    --above-dock: calc(100dvh - var(--dock-lift));
    --ways-wide: calc(100vw - var(--dock-column));
    padding: 0 var(--dock-column) var(--dock-lift) 0;
  }
}
.start.leaving,
.ways.leaving {
  opacity: 0;
  transform: var(--closed);
  pointer-events: none;
}
/* the ways come back over a book on the table (ways.js showPhotos: Foto's toevoegen, or every photo refused) the way
   they left, never with their surface over the title and the book in one frame */
@starting-style {
  .ways {
    opacity: 0;
    transform: var(--closed);
  }
}
/* The book stands on the table turned about 16° from you, seen from a little above, so it reads as a real book: its
   spine on the left, the top edges of its pages along the top, the cover turning away to the right, and its shadow on
   the table behind it. Turned enough to show the spine and the page edges, little enough that the cover still reads
   straight on. Each face carries the whole view itself (--view), round the book's middle, and is painted back to
   front in the markup's order: a shared 3D scene (preserve-3d) had Chromium draw the cover blurred, its small type
   jagged. */
.start-stage {
  position: relative;
}
/* the book's shadow on the table: soft, falling back and to the right, away from the light at the top left (the
   order's book, order.css, stands the same way) */
.start-stage::before,
.order-stage::before {
  content: '';
  position: absolute;
  left: 4%;
  right: -14%;
  bottom: -9%;
  height: 26%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(40 30 20 / 0.32), rgb(40 30 20 / 0.12) 60%, transparent);
  filter: blur(10px);
  transform: skewX(-24deg);
  pointer-events: none;
}
.start-book {
  /* the book's size, and its thickness: a photo book of some 40 pages on hard covers */
  --w: min(62vmin, 380px);
  --t: calc(var(--w) * 0.085);
  --h: var(--w);
  --view: perspective(1900px) rotateX(-8deg) rotateY(16deg);
  position: relative;
  width: var(--w);
  aspect-ratio: 1;
}
.start-front,
.order-front {
  position: absolute;
  inset: 0;
  border-radius: 2px 6px 6px 2px;
  overflow: hidden;
  background: #f4efe6;
  transform: var(--view) translateZ(calc(var(--t) / 2));
  box-shadow:
    0 1px 1px rgb(0 0 0 / 0.08),
    18px 26px 50px -18px rgb(40 30 20 / 0.35);
}
/* the hinge's groove beside the spine, and the light from the top left falling off across the turned-away cover */
.start-front::after,
.order-front::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.14), transparent 2.5%, rgb(255 255 255 / 0.14) 3.5%, transparent 6.5%),
    linear-gradient(100deg, rgb(255 255 255 / 0.06), transparent 40%, rgb(40 30 20 / 0.09));
  pointer-events: none;
  z-index: 2;
}
/* the spine: the cover's own paper wrapped round (start.js colours it as each cover comes in), rounded by its light */
.start-spine,
.order-spine {
  position: absolute;
  top: 0;
  left: calc(var(--t) / -2);
  width: var(--t);
  height: 100%;
  border-radius: 3px;
  background-color: #f4efe6;
  background-image: linear-gradient(
    90deg,
    rgb(40 30 20 / 0.28),
    rgb(40 30 20 / 0.08) 22%,
    rgb(255 255 255 / 0.12) 45%,
    rgb(40 30 20 / 0.1) 75%,
    rgb(40 30 20 / 0.3)
  );
  transform-origin: calc(var(--t) / 2 + var(--w) / 2) 50%;
  /* (turned on its own middle, which sits on the book's left edge, as the view turns round the book's middle) */
  transform: var(--view) translateX(calc(var(--w) / -2)) rotateY(-90deg) translateX(calc(var(--w) / 2));
  transition: background-color 0.9s var(--ease);
}
/* the top: the boards' edges at front and back, and the pages' edges between them, a little in from the spine's fold */
.start-pages,
.order-pages {
  position: absolute;
  top: calc(var(--t) / -2);
  left: 1px;
  width: calc(100% - 3px);
  height: var(--t);
  border-radius: 0 3px 3px 0;
  /* (no line per sheet: seen this steeply the edge is a few pixels high, and any fine pattern on it shimmers) */
  background: linear-gradient(180deg, #d3c8b6 0 9%, #efe8dc 9%, #fcf9f3 50%, #efe8dc 91%, #d3c8b6 91%);
  transform-origin: calc(var(--w) / 2 - 1px) calc(var(--t) / 2 + var(--h) / 2);
  transform: var(--view) translateY(calc(var(--h) / -2)) rotateX(90deg) translateY(calc(var(--h) / 2));
}
.start-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.start-cover-inner {
  position: absolute;
  top: 0;
}
.start-polaroid {
  position: absolute;
  z-index: 3;
  width: min(15vmin, 108px);
  margin: calc(min(15vmin, 108px) * -0.6) 0 0 calc(min(15vmin, 108px) * -0.5);
  padding: 5px 5px 16px;
  background: #fffdf8;
  border-radius: 2px;
  box-shadow: 0 8px 20px -6px rgb(40 30 20 / 0.35);
  pointer-events: none;
}
.start-polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
/* ---- the start's slider (slides.js): a frame of the table's colour sliding between the book and two recordings, the
   arrows and bullets under it, the slide's small line under them */
.slides {
  display: grid;
  justify-items: center;
  gap: 10px;
  /* the frame's shape: 4:3, square on a phone, where its recordings are taken to be read at that size (slides.js
     PHONE) */
  --frame: 4 / 3;
  /* as wide as the screen allows, and low enough to leave what's under it in view (the slider's own page sets its own) */
  width: min(92vw, 620px, (100dvh - 250px) * var(--frame));
}
/* on the start the frame alone gives way to a short screen, leaving room for the arrows and line under it, the button
   and the start's lines under that (--below): those keep the slider's width, so the line doesn't wrap to more lines
   as the frame narrows */
.start .slides {
  --below: 250px;
  width: min(92vw, 620px);
}
.start .slides-frame {
  width: min(100%, (100dvh - var(--below)) * var(--frame));
}
/* in Instagram's or Facebook's own browser the line under the button (.start-own) needs its room too, and after a tap
   that opened nothing the address and its button under it: an iPhone SE (375 × 667) still shows the whole start
   (check/ownbrowser-check.mjs) */
.start:has(> .start-own:not([hidden])) .slides {
  --below: 380px;
}
.start:has(> .start-own.is-by-hand:not([hidden])) .slides {
  --below: 450px;
}
@media (max-width: 640px) {
  .slides {
    --frame: 1;
  }
}
.slides-frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--frame);
  overflow: hidden;
  border-radius: 18px;
  background: #e2ddd4;
  box-shadow:
    inset 0 0 0 1px rgb(40 30 20 / 0.06),
    0 18px 40px -26px rgb(40 30 20 / 0.4);
  /* a finger across it swipes (slides.js); up and down still scrolls */
  touch-action: pan-y;
}
.slides-track {
  display: flex;
  height: 100%;
  transition: transform 0.7s var(--ease);
}
.slides.is-still .slides-track {
  transition: none;
}
.slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.slide video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* the TV's slide: the recording on a TV in a living room, drawn in the app's paper (slides.js onTv). Measured on the
   slide's width (cqw), so it's the same drawing at any size, standing on the slide's foot: the wall with a lamp's light from the right, a slim set on
   its foot on a low cabinet, a plant on the floor beside it, the floor */
.slide-tv {
  container-type: size;
}
.tv-room {
  /* the wall a frame taller than 4:3 (a phone's square one) adds above the set */
  --above: calc(100cqh - 75cqw);
  position: absolute;
  inset: 0;
  /* the plant's leaves stay in their own room, never in the slide beside it */
  overflow: hidden;
  background:
    linear-gradient(
      to bottom,
      transparent calc(var(--above) + 66cqw),
      rgb(40 30 20 / 0.12) calc(var(--above) + 66cqw),
      transparent calc(var(--above) + 66.3cqw)
    ),
    linear-gradient(to bottom, transparent calc(var(--above) + 66cqw), #d8cfc2 calc(var(--above) + 66cqw), #cfc5b6),
    radial-gradient(70cqw 55cqw at 96% 8%, rgb(255 236 200 / 0.75), transparent 70%), linear-gradient(#e9e3d9, #e1dacf);
}
.tv-set {
  position: absolute;
  z-index: 2;
  top: calc(var(--above) + 5cqw);
  left: 8cqw;
  width: 84cqw;
  padding: 1cqw;
  border-radius: 1.1cqw;
  background: linear-gradient(#2a2724, #1d1b19);
  box-shadow:
    inset 0 0.12cqw 0 rgb(255 255 255 / 0.12),
    0 2.4cqw 4cqw -2cqw rgb(40 30 20 / 0.55);
}
.tv-screen {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.25cqw;
  background: #0d0c0b;
}
.slide-tv video {
  object-fit: contain;
}
/* the real code over the film's blurred one, where the TV's card holds it (slides.js tvCode places it) */
.tv-screen {
  position: relative;
}
.tv-code {
  position: absolute;
  aspect-ratio: 1;
  pointer-events: none;
}
.tv-code svg {
  display: block;
  width: 100%;
}
/* the set's light, a warm dot under the screen */
.tv-led {
  position: absolute;
  right: 3cqw;
  bottom: 0.35cqw;
  width: 0.45cqw;
  height: 0.45cqw;
  border-radius: 50%;
  background: #ffb36b;
  box-shadow: 0 0 0.6cqw rgb(255 170 90 / 0.8);
}
.tv-foot {
  position: absolute;
  z-index: 1;
  top: calc(var(--above) + 53cqw);
  left: 50%;
  width: 18cqw;
  height: 4cqw;
  translate: -50% 0;
  background: linear-gradient(#3a3632, #24211f);
  clip-path: polygon(42% 0, 58% 0, 60% 62%, 100% 82%, 100% 100%, 0 100%, 0 82%, 40% 62%);
}
.tv-cabinet {
  position: absolute;
  top: calc(var(--above) + 57cqw);
  left: 50%;
  width: 62cqw;
  height: 8.5cqw;
  translate: -50% 0;
  border-radius: 0.5cqw;
  /* its top edge in the lamp's light, two doors' seams */
  background:
    linear-gradient(to right, transparent 33.2%, rgb(80 50 25 / 0.28) 33.2%, transparent 33.6%),
    linear-gradient(to right, transparent 66.4%, rgb(80 50 25 / 0.28) 66.4%, transparent 66.8%),
    linear-gradient(#e2bb8f 0.9cqw, #c99c6e 0.9cqw, #bb8d60);
  box-shadow: 0 1.6cqw 2.4cqw -1.4cqw rgb(40 30 20 / 0.45);
}
/* its legs, standing on the floor */
.tv-cabinet::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 4cqw;
  right: 4cqw;
  height: 2.6cqw;
  background:
    linear-gradient(to right, #8e6640 1.1cqw, transparent 1.1cqw) left / 50% 100% no-repeat,
    linear-gradient(to left, #8e6640 1.1cqw, transparent 1.1cqw) right / 50% 100% no-repeat;
}
/* on the floor beside the cabinet, under the set's edge and wholly in view */
.tv-plant {
  position: absolute;
  z-index: 3;
  left: 2cqw;
  bottom: 4cqw;
  width: 16cqw;
  height: 16cqw;
  overflow: visible;
  filter: drop-shadow(0 0.5cqw 0.6cqw rgb(40 30 20 / 0.25));
}
.tv-plant .leaf {
  fill: #7aa275;
}
.tv-plant .leaf.dark {
  fill: #557f5a;
}
.tv-plant .pot {
  fill: #c9714c;
}
.tv-plant .rim {
  fill: #d9895f;
}
/* the book's slide: the start's book on the table, sized to the frame */
.slide-book {
  container-type: size;
}
.slide-book .start-book {
  --w: min(58cqh, 380px);
}
.slides-under {
  display: flex;
  align-items: center;
  gap: 6px;
}
.slides-step {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  transition: background 0.2s;
}
.slides-step:hover {
  background: rgb(36 34 31 / 0.06);
}
.slides-step svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.slides-dots {
  display: flex;
}
/* a bullet: a dot in a finger-sized button, the slide on show a longer bar */
.slides-dot {
  display: grid;
  place-items: center;
  width: 28px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
}
.slides-dot::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgb(36 34 31 / 0.24);
  transition:
    width 0.35s var(--ease),
    background 0.35s;
}
.slides-dot[aria-current='true']::before {
  width: 22px;
  background: var(--text);
}
.slides-say {
  margin: 0;
  min-height: 1.4em;
  color: var(--quiet);
  font-size: 15px;
  text-align: center;
  text-wrap: balance;
}
.start-begin {
  min-height: 54px;
  padding: 0 34px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 30px -10px rgb(36 34 31 / 0.5);
  transition: transform 0.25s var(--ease);
}
.start-begin:active {
  transform: scale(0.96);
}
/* over the button, the start link's set the book begins from (startlink.js): its pictures as small cards fanned on
   the table, and its name */
.start-set {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: min(30em, 86vw);
  margin: -8px 0 -18px;
  color: var(--quiet);
  font-size: 15px;
  line-height: 1.35;
}
.start-set-pictures {
  display: flex;
  flex: none;
  padding: 4px 0;
}
.start-set-pictures img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border: 3px solid #fff;
  border-radius: 3px;
  box-shadow: 0 4px 10px -4px rgb(36 34 31 / 0.45);
  transform: rotate(calc(var(--at) * 9deg - 3deg)) translateY(calc(var(--at) * var(--at) * 2px));
}
.start-set-pictures img + img {
  margin-left: -30px;
}
.start-set-line {
  text-wrap: balance;
}
/* once the book wears the set's look after all: gone, its room kept so the button stays put */
.start-set.is-worn {
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.4s var(--ease),
    visibility 0s 0.4s;
}
/* or, when the shop couldn't read the set now, that line alone */
.start-set.is-unread {
  text-align: center;
  text-wrap: balance;
}
/* under the button, when the saved book couldn't come back whole (app.js savedBook) */
.start-lost {
  max-width: min(30em, 86vw);
  margin: -16px 0 0;
  text-align: center;
}

/* under the button in Instagram's or Facebook's own browser (ownbrowser.js): one quiet line, its tap a word in it
   that never breaks across lines, and after a tap that opened nothing the address to copy, as the app's other links */
.start-own {
  max-width: min(30em, 86vw);
  margin: -20px 0 0;
  color: var(--quiet);
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}
.start-own-go {
  color: var(--text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.start-own.is-by-hand {
  width: min(24em, 86vw);
}
.start-own .link-share {
  margin-top: 10px;
}
/* 16px, so iOS doesn't zoom the page in as the field takes the tap */
.start-own .link-field {
  color: var(--text);
  font-size: 16px;
}

/* under them, the way into Je boeken (books.ts offerBooks): its words quiet, its taps underlined as the line above's */
.start-books {
  max-width: min(30em, 86vw);
  margin: -20px 0 0;
  color: var(--quiet);
  font-size: 15px;
  line-height: 1.6;
  text-align: center;
  text-wrap: balance;
}
.start-books-go {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* more photos for a made book (ways.js addMore): the same ways over the book and Je foto's, the screen's whole height
   theirs (the dock waits under them), a heading over the book, and the book's own photos on the stack */
.ways.adding {
  z-index: 45;
  --above-dock: calc(100dvh - 180px);
  padding-bottom: 0;
  --ways-gap: clamp(20px, 3.6vmin, 36px);
}
.ways-head {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding-inline: 24px;
  text-align: center;
  animation: ways-head-in 0.6s var(--ease) both;
}
.ways-head[hidden] {
  display: none;
}
.ways-title {
  margin: 0;
  font:
    400 clamp(26px, 4.2vmin, 40px) / 1.1 'Fraunces',
    Georgia,
    serif;
  text-wrap: balance;
}
.ways-line {
  margin: 0;
  max-width: 34ch;
  color: var(--quiet);
  font-size: clamp(14px, 1.9vmin, 17px);
  text-wrap: balance;
}
@keyframes ways-head-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.ways.adding .ways-stack i {
  background-size: cover;
  background-position: center;
}

/* the book opened on the two ways in: the phone's code on the left page, this device's photos on the right */
.ways-book {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* its pages' margins grow with it (cqi: the questions', questions.css) */
  container-type: inline-size;
  width: min(var(--ways-wide) * 0.92, 112vmin, 960px, (var(--above-dock) - var(--under-room)) * 2);
  aspect-ratio: 2 / 1;
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 47%, rgb(0 0 0 / 0.07) 50%, transparent 53%),
    linear-gradient(180deg, #fdfaf4, #f6f1e7);
  box-shadow:
    0 1px 1px rgb(0 0 0 / 0.08),
    0 24px 60px -20px rgb(40 30 20 / 0.4);
  animation: ways-open 0.8s var(--ease) both;
}
/* an upright window (a tablet held upright) has height to spare under a wide book: the two ways' pages stand taller
   (the phone's code on the left keeps its size, in their middle) */
@media (orientation: portrait) {
  .ways:not(.on-phone) #ways-photos {
    aspect-ratio: 4 / 3;
  }
}
/* a page that may hand no link to a phone (a guest's own session on the preview): the photos' page alone, a single page
   lying open where the spread was */
.ways:not(.on-phone) .ways-book:has(> .ways-phone[hidden]) {
  grid-template-columns: 1fr;
  width: min(var(--ways-wide) * 0.46, 56vmin, 430px, var(--above-dock) - var(--under-room));
  aspect-ratio: 1;
  background: linear-gradient(180deg, #fdfaf4, #f6f1e7);
}
@keyframes ways-open {
  from {
    opacity: 0;
    transform: scale(0.92) rotateX(12deg);
  }
}
.ways-page {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  padding: 24px;
  border: 0;
  background: none;
  color: inherit;
  text-align: center;
}
/* this device's page looks like a place to put photos: a dashed frame round the stack, an arrow going up on it, and
   room between the photos and the words; it lights up under a hover and while photos are dragged over the window. The
   whole page picks photos (#drop's ::after lies over it), the folder way over that, inside the frame under the words */
.ways-here {
  position: relative;
  gap: clamp(6px, 1.4vmin, 14px);
  cursor: pointer;
}
.ways-drop {
  display: grid;
  justify-items: center;
  gap: clamp(22px, 4.6vmin, 46px);
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: inherit;
}
.ways-drop::after {
  content: '';
  position: absolute;
  inset: 0;
}
.ways-drop:focus-visible {
  outline: none;
}
.ways-here:has(> .ways-drop:focus-visible)::before {
  border-color: var(--accent);
}
.ways-here::before {
  content: '';
  position: absolute;
  inset: clamp(12px, 2.2vmin, 20px);
  border: 2px dashed rgb(36 34 31 / 0.28);
  border-radius: 14px;
  transition:
    border-color 0.25s,
    background 0.25s;
}
@media (hover: hover) {
  .ways-here:hover::before {
    border-color: var(--accent);
    background: rgb(255 255 255 / 0.55);
  }
  .ways-here:hover .ways-up {
    transform: translateY(-12%);
  }
}
.ways.over .ways-here::before {
  border-color: var(--accent);
  background: rgb(255 255 255 / 0.55);
}
.ways-drop > *,
.ways-here > .ways-folder {
  position: relative;
}
.ways-say {
  margin: 0;
  max-width: 18ch;
  color: var(--text);
  font-size: clamp(15px, 2.1vmin, 19px);
  line-height: 1.35;
  text-wrap: balance;
}
/* the code's card: a square in the light line of this device's frame, with the code across it, so the code's squares
   are big enough for a phone's camera across a desk (about 3.5 to 4.5 px a square: under 2, it has to be zoomed in).
   Its rim is thin for that. It is no bigger than that needs (200 px: 4.5 px a square of the code's 41), a quiet card
   by its line rather than the page's whole height, and on a short page it takes the height left beside the line and
   the link under it, so the book keeps its shape on any screen; the three stand together in the page's middle. Tilted,
   a code's squares blur at their edges, so the card stands straight. Room between the three, the link
   for others a step further off as a way of its own, and clear of the page's edges */
.ways:not(.on-phone) .ways-phone {
  grid-template-rows: minmax(0, 200px) auto auto;
  align-content: center;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  /* a small window's book is short: tight, so the code keeps its size and the link for others stays on the page; the
     room grows with a taller one */
  gap: clamp(8px, 4vmin - 18px, 28px);
  padding: clamp(12px, 4vmin - 14px, 32px) clamp(24px, 3.4vmin, 40px);
}
.ways:not(.on-phone) .ways-phone > .ways-others {
  margin-top: clamp(0px, 2vmin - 10px, 14px);
}
.phone {
  display: grid;
  align-content: center;
  height: 100%;
  max-height: 200px;
  min-height: 0;
  aspect-ratio: 1;
  padding: 6px;
  border: 2px solid rgb(36 34 31 / 0.28);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px -12px rgb(40 30 20 / 0.4);
}
.phone-screen {
  aspect-ratio: 1;
  color: var(--text);
}
.phone-screen svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* the phone that scanned the code is picking (phonecard.js): its code steps back and two small photos stand on its
   screen, turning over while the picker is open ('open') and rising out of the phone while its pick is made ready
   ('preparing'), so the card reads as busy, never as a phone that did nothing. No count: the phone tells none yet */
.phone {
  position: relative;
}
.phone-screen {
  transition: opacity 0.4s var(--ease);
}
.ways-phone.coming .phone-screen {
  opacity: 0.1;
}
.phone::before,
.phone::after {
  content: '';
  position: absolute;
  left: 30%;
  top: 34%;
  width: 40%;
  aspect-ratio: 1;
  border: 4px solid #fff;
  border-bottom-width: 11px;
  border-radius: 2px;
  background: linear-gradient(160deg, #cfe0dc, #e9d6bf);
  box-shadow: 0 6px 12px -6px rgb(40 30 20 / 0.5);
  opacity: 0;
  transform: scale(0.6);
  /* over the code, always: the code fading back is a layer of its own (its opacity), which would cover ::before */
  z-index: 1;
  transition:
    opacity 0.3s var(--ease),
    transform 0.4s var(--ease);
}
.phone::after {
  background: linear-gradient(160deg, #f1c9a5, #d9e4ef);
}
.ways-phone.coming .phone::before,
.ways-phone.coming .phone::after {
  opacity: 1;
  transform: none;
}
.ways-phone[data-step='open'] .phone::before {
  animation: phone-choosing 2.4s var(--ease) infinite;
}
.ways-phone[data-step='open'] .phone::after {
  animation: phone-choosing 2.4s var(--ease) -1.2s infinite;
}
.ways-phone[data-step='preparing'] .phone::before {
  animation: phone-rising 1.8s var(--ease) infinite;
}
.ways-phone[data-step='preparing'] .phone::after {
  animation: phone-rising 1.8s var(--ease) -0.9s infinite;
}
@keyframes phone-choosing {
  0%,
  100% {
    transform: rotate(-8deg) translateX(-14%);
  }
  50% {
    transform: rotate(7deg) translateX(14%) translateY(-6%);
  }
}
@keyframes phone-rising {
  0% {
    opacity: 0;
    transform: translateY(40%) rotate(-6deg) scale(0.8);
  }
  25% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-150%) rotate(8deg) scale(0.9);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ways-phone.coming .phone::before,
  .ways-phone.coming .phone::after {
    animation: none;
  }
  .ways-phone.coming .phone::after {
    transform: rotate(8deg) translate(12%, -10%);
  }
}
/* a small fanned stack of blank photos */
.ways-stack {
  position: relative;
  width: min(19vmin, 150px);
  aspect-ratio: 1;
}
.ways-stack i {
  position: absolute;
  inset: 0;
  border: 7px solid #fff;
  border-bottom-width: 22px;
  border-radius: 2px;
  background: linear-gradient(160deg, #cfe0dc, #e9d6bf);
  box-shadow: 0 8px 18px -8px rgb(40 30 20 / 0.45);
  transition: transform 0.4s var(--ease);
}
.ways-stack i:nth-child(1) {
  transform: rotate(-9deg) translateX(-10%);
}
.ways-stack i:nth-child(2) {
  transform: rotate(6deg) translateX(8%);
  background: linear-gradient(160deg, #f1c9a5, #d9e4ef);
}
.ways-stack i:nth-child(3) {
  transform: rotate(-1deg);
  background: linear-gradient(160deg, #f6dfa5, #bcd3e6);
}
/* the arrow going up, on the stack's front corner: a sticker drawn in the first questions' hand (chromeart.js) */
.ways-up {
  position: absolute;
  right: -14%;
  bottom: -10%;
  width: 42%;
  aspect-ratio: 1;
  filter: drop-shadow(0 6px 6px rgb(40 30 20 / 0.28));
  transition: transform 0.4s var(--ease);
}
.ways-up svg {
  display: block;
  width: 100%;
  height: 100%;
}
.ways.over .ways-up {
  transform: translateY(-12%);
}
.ways-here:hover .ways-stack i:nth-child(1),
.ways.over .ways-stack i:nth-child(1) {
  transform: rotate(-14deg) translateX(-22%);
}
.ways-here:hover .ways-stack i:nth-child(2),
.ways.over .ways-stack i:nth-child(2) {
  transform: rotate(11deg) translateX(20%);
}
/* a phone's picker getting its pick ready (picking.js): the stack fans open as under a drag, and its arrow keeps
   lifting, so the card reads as busy, not as a tap that did nothing */
.ways.coming .ways-here::before {
  border-color: var(--accent);
  background: rgb(255 255 255 / 0.55);
}
.ways.coming .ways-stack i:nth-child(1) {
  transform: rotate(-14deg) translateX(-22%);
}
.ways.coming .ways-stack i:nth-child(2) {
  transform: rotate(11deg) translateX(20%);
}
.ways.coming .ways-up {
  animation: ways-coming 1.1s var(--ease) infinite;
}
@keyframes ways-coming {
  0%,
  100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-22%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ways.coming .ways-up {
    animation: none;
    transform: translateY(-12%);
  }
}
.ways.over .ways-book {
  box-shadow:
    0 0 0 3px var(--accent),
    0 24px 60px -20px rgb(40 30 20 / 0.4);
}
/* asking family and friends for theirs: one big button that says so and hands the link on, the link under it */
.ways-others {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.ways-others[hidden] {
  display: none;
}
.ways-samples {
  display: grid;
  justify-items: center;
  gap: 16px;
}
/* many at once (many.js): a whole folder (on this device's page), as quiet as the samples' way, and the tip on picking
   many on Android (under the book) */
.ways-many {
  display: grid;
  justify-items: center;
  gap: 4px;
  max-width: min(90vw, 420px);
}
.ways-many:not(:has(> :not([hidden]))),
.ways:has(#questions:not([hidden])) .ways-many {
  display: none;
}
.ways-folder {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 2px 16px 2px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--quiet);
  transition:
    color 0.2s,
    background 0.2s;
}
.ways-folder:hover {
  background: rgb(36 34 31 / 0.06);
  color: var(--text);
}
.ways-folder svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}
.ways-folder:hover svg {
  transform: translateY(-2px) rotate(-6deg);
}
.ways-tip {
  margin: 0;
  color: var(--quiet);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  text-wrap: balance;
}
/* the samples' way: two of their photos beside the words, so it looks like what it opens (the trips' piles) */
.ways-demo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 2px 16px 2px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--quiet);
  transition:
    color 0.2s,
    background 0.2s;
}
.ways-demo:hover {
  background: rgb(36 34 31 / 0.06);
  color: var(--text);
}
.ways-demo-pile {
  position: relative;
  width: 44px;
  height: 32px;
}
.ways-demo-pile img {
  position: absolute;
  top: 2px;
  width: 28px;
  height: 28px;
  object-fit: cover;
  border: 2px solid #fff;
  border-bottom-width: 5px;
  border-radius: 2px;
  box-shadow: 0 3px 8px -3px rgb(40 30 20 / 0.45);
  transition: transform 0.3s var(--ease);
}
.ways-demo-pile img:nth-child(1) {
  left: 0;
  transform: rotate(-9deg);
}
.ways-demo-pile img:nth-child(2) {
  right: 0;
  transform: rotate(7deg);
}
.ways-demo:hover .ways-demo-pile img:nth-child(1) {
  transform: rotate(-14deg) translateX(-3px);
}
.ways-demo:hover .ways-demo-pile img:nth-child(2) {
  transform: rotate(12deg) translateX(3px);
}
.ways-trips {
  display: flex;
  gap: 28px;
}
/* a sample trip as a little pile of its photos */
.ways-trip {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 500;
}
.ways-pile {
  position: relative;
  width: 92px;
  aspect-ratio: 1;
}
.ways-pile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 4px solid #fff;
  border-bottom-width: 12px;
  border-radius: 2px;
  box-shadow: 0 6px 14px -6px rgb(40 30 20 / 0.4);
  transition: transform 0.35s var(--ease);
}
.ways-pile img:nth-child(1) {
  transform: rotate(-8deg);
}
.ways-pile img:nth-child(2) {
  transform: rotate(7deg);
}
.ways-trip:hover .ways-pile img:nth-child(1) {
  transform: rotate(-14deg) translateX(-10px);
}
.ways-trip:hover .ways-pile img:nth-child(2) {
  transform: rotate(13deg) translateX(10px);
}
/* on a phone the phone's own photos are the way in: the right page alone, with the left page's link for others
   under it (while the phone way is there: app.js hides it when there's no room) */
.ways.on-phone .ways-book {
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  width: min(var(--ways-wide) * 0.72, 340px, (var(--above-dock) - var(--under-room)) * 0.75);
  aspect-ratio: 3 / 4;
  background: linear-gradient(180deg, #fdfaf4, #f6f1e7);
}
.ways.on-phone .ways-phone:not([hidden]) {
  display: contents;
}
.ways.on-phone .ways-phone > :not(.ways-others) {
  display: none;
}
.ways.on-phone .ways-others {
  grid-row: 2;
  box-sizing: border-box;
  padding: 0 18px;
  margin-bottom: 18px;
}
/* upright, the card has room for a stack big enough to read at a glance */
@media (orientation: portrait) {
  .ways.on-phone .ways-stack {
    width: min(28vmin, 120px);
  }
  .ways.on-phone .ways-drop {
    gap: 34px;
  }
}
/* a phone held sideways: the card lies wide, its stack beside its words, so it fits above the dock */
@media (orientation: landscape) {
  .ways.on-phone .ways-book {
    width: min(var(--ways-wide) * 0.72, 420px, (var(--above-dock) - var(--under-room)) * 2.4);
    aspect-ratio: 12 / 5;
  }
  .ways.on-phone .ways-page {
    grid-auto-flow: column;
    padding: 12px 24px;
    align-items: center;
  }
  .ways.on-phone .ways-drop {
    grid-auto-flow: column;
    align-items: center;
    gap: 26px;
  }
  .ways.on-phone .ways-here::before {
    inset: 6px;
  }
  /* too small a card for the link for others: the Foto's sheet offers it once there's a book */
  .ways.on-phone .ways-others {
    display: none;
  }
}

/* ---- the top bar */
.top {
  position: fixed;
  /* (the safe top is the screen's: zoom would grow it too) */
  inset: calc(var(--safe-top) / var(--ui) + 12px) 12px auto;
  zoom: var(--ui);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 10;
  pointer-events: none;
}
.top > * {
  pointer-events: auto;
}
/* the two sides as wide as each other, so the title sits in the middle */
.top-side,
.top-actions {
  flex: 1 1 0;
  display: flex;
  gap: 8px;
}
.top-actions {
  justify-content: flex-end;
}
.top-title {
  flex: 0 1 auto;
  display: grid;
  justify-items: center;
  text-align: center;
  min-width: 0;
}
.top-name {
  font-weight: 600;
  font-size: 17px;
  padding: 2px 8px;
  border-radius: 8px;
  outline: none;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-name:focus {
  background: var(--glass);
}
/* the book's one line (pages, cover, size, price), a soft pill with a small pen: a tap opens the Je boek sheet (size,
   cover, format, pages) to change them, which rises from the screen's foot or stands at its side, never under the line,
   so nothing on it points down. A control at a glance, still quieter than the chips beside it. The price flashes when
   it moves */
.top-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgb(255 253 249 / 0.55);
  box-shadow: inset 0 0 0 1px rgb(36 34 31 / 0.09);
  color: var(--quiet);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.top-meta-line {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-meta svg {
  flex: none;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}
.top-meta:hover,
.top-meta[aria-expanded='true'] {
  background: var(--glass);
  box-shadow: inset 0 0 0 1px rgb(36 34 31 / 0.16);
}
/* the cover leads the line in the text's own weight: the line is the button, the cover only says what it changes */
.top-cover {
  flex: none;
  color: var(--text);
  font-weight: 600;
}
.top-price {
  flex: none;
  display: inline-block;
  color: var(--text);
  font-weight: 600;
}
.top-price.is-up,
.top-price.is-down {
  animation: price-moved 1.2s var(--ease);
}
@keyframes price-moved {
  20% {
    transform: scale(1.18);
    color: var(--accent);
  }
}
.chip-icon {
  padding: 0;
  width: 40px;
  justify-content: center;
}

/* ---- what the AI is doing while it makes the book (making.js): a card under the top bar, its words over one bar (the
   one pen is on the book) */
.making {
  position: fixed;
  left: 50%;
  /* under the top bar, as tall as it is now (app.js measures it, in the screen's px, which zoom would grow) */
  top: calc(var(--top-bottom, 52px) / var(--ui) + 10px);
  transform: translateX(-50%);
  zoom: var(--ui);
  z-index: 9;
  display: grid;
  row-gap: 8px;
  width: min(100vw / var(--ui) - 24px, 420px);
  padding: 9px 16px 11px;
  border-radius: var(--radius);
  /* solid, not frosted: a blur over the book being drawn under it cost the iPad every frame */
  background: #fbf9f6;
  box-shadow: 0 6px 20px rgb(36 34 31 / 0.08);
  animation: making-in 0.6s var(--ease);
  transition:
    opacity 0.4s,
    translate 0.4s var(--ease);
}
.making.is-leaving {
  opacity: 0;
  translate: 0 -10px;
}
@keyframes making-in {
  from {
    opacity: 0;
    translate: 0 -10px;
  }
}
/* what it does, and under it where it is, whole, never cut off (the book under it moves with the card's height:
   app.js frameTable). The agent's own words are in its dock below: never two cards of news */
.making-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.making-head {
  flex: none;
  font-size: 15px;
}
/* made: a check before its words */
.making.is-done .making-head::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: -3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324221f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.making-now {
  min-width: 0;
  color: var(--quiet);
  font-size: 14px;
  text-wrap: pretty;
}
.making-now:empty {
  display: none;
}
/* the bar: plain at a glance on a phone, its fill the host's ink on a track of the same ink, both rounded */
.making-bar {
  height: 6px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  overflow: hidden;
}
.making-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.9s var(--ease);
}
/* while the model thinks, the estimate's steps run into one another (making.js TICK_MS) */
.making-bar.is-estimating i {
  transition-duration: 1s;
  transition-timing-function: linear;
}

/* ---- the choices that rise above the bar during the intake */
.choices {
  position: fixed;
  left: 50%;
  /* right above the agent's dock as tall as it is now (app.js measures it, in the screen's px): its line wraps, its
     chips come and go */
  bottom: calc(var(--dock-height, 0px) / var(--ui) + 8px);
  transform: translateX(-50%);
  zoom: var(--ui);
  width: min(100vw / var(--ui) - 24px, 920px);
  display: grid;
  justify-items: center;
  gap: 10px;
  z-index: 9;
  animation: rise 0.5s var(--ease);
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
}
.choices-ask {
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--glass);
  font-weight: 600;
}
.choices-ask:empty {
  display: none;
}
.choices-row {
  display: flex;
  gap: 10px;
  max-width: 100%;
  overflow-x: auto;
  padding: 4px 4px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  /* both ways, so a vertical scroll of the sheet can begin on a row's cards */
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  justify-content: safe center;
}
.choice-chip {
  flex: none;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-weight: 500;
  scroll-snap-align: center;
  transition: transform 0.25s var(--ease);
}
.choice-chip:active {
  transform: scale(0.96);
}

/* ---- sheets: Boek, docked at the bottom with the book reframed above them, so every change shows live; on a wide
   landscape screen a panel at the right side instead, the book reframed beside it (app.js frameTable). Any landscape
   window from 1100 px wide is one: a desktop's is often near-square (1440×1168), and a bottom sheet there reads as a
   phone's */
.sheet {
  position: fixed;
  inset: auto 0 0;
  z-index: 30;
  display: grid;
  justify-items: center;
  pointer-events: none;
}
.sheet-card {
  position: relative;
  width: min(100vw, 760px);
  max-height: 46vh;
  /* the browser's own scroll, and nothing of ours handling touch here: the page under it is touch-action none (the
     table's camera), so the sheet says what it allows, and its scroll's end never pulls the page along */
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  /* its padding, which Je boek's head reaches out over (.sheet-head) */
  --pad-y: 18px;
  --pad-x: 20px;
  padding: var(--pad-y) var(--pad-x) calc(var(--safe-bottom) + 22px);
  border-radius: 22px 22px 0 0;
  background: var(--sheet-paper);
  box-shadow: 0 -10px 40px rgb(0 0 0 / 0.12);
  /* where it lies closed, written once: closed, and the first frame it opens in */
  --closed: translateY(100%);
  transform: var(--closed);
  transition: transform 0.38s var(--ease);
  pointer-events: auto;
  /* (its choices lay out by its own width: .sheet-choice) */
  container-type: inline-size;
}
/* where the screen has the height for it (a phone or a tablet held upright), the sheet opens tall enough to show its
   first choices under the book's picture, so it says at once that there's more under them; the book above keeps a
   strip of its own, where a change shows live */
@media (min-height: 640px) {
  .sheet-card {
    max-height: 65vh;
  }
}
.sheet.open .sheet-card {
  transform: none;
}
/* a sheet shown and opened in one frame (sheets.js) still slides in: its first frame is the closed one */
@starting-style {
  .sheet.open .sheet-card {
    transform: var(--closed);
  }
}
@media (min-width: 1100px) and (orientation: landscape) {
  :root {
    --sheet-side: 1;
    --sheet-side-width: 400px;
  }
  .sheet {
    /* (zoomed as the top bar is, so under it by its measured foot, which is the screen's px) */
    inset: calc(var(--top-bottom, 52px) / var(--ui) + 8px) 12px 12px auto;
    width: var(--sheet-side-width);
    zoom: var(--ui);
    align-content: start;
    justify-items: stretch;
  }
  .sheet-card {
    width: auto;
    max-height: 100%;
    padding: var(--pad-y) var(--pad-x) 22px;
    border-radius: 22px;
    box-shadow: 0 14px 44px -12px rgb(40 30 20 / 0.35);
    --closed: translateX(calc(100% + 24px));
  }
}
.sheet-close {
  /* it stays in its corner while the sheet scrolls (with Je boek's head and price beside it: .sheet-head); it takes no
     room of its own, the content under it keeps clear of it */
  position: sticky;
  top: 0;
  z-index: 2;
  display: block;
  width: fit-content;
  --close-h: 36px;
  min-height: var(--close-h);
  margin: -4px -4px calc(4px - var(--close-h)) auto;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.sheet-body {
  display: grid;
  /* (no row widens the sheet past its card: a row too wide for it lays itself out narrower) */
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.sheet-title {
  font-weight: 700;
  font-size: 20px;
}
.sheet-field {
  display: grid;
  gap: 8px;
}
.sheet-name {
  font-weight: 600;
  font-size: 14px;
}
.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.format-shape {
  display: block;
  background: linear-gradient(135deg, #f4efe6, #e2dacb);
  border-radius: 2px 4px 4px 2px;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.15);
}
.format-square {
  width: 46px;
  height: 46px;
}
.format-landscape {
  width: 60px;
  height: 42px;
}
.format-portrait {
  width: 38px;
  height: 54px;
}
/* the sizes as the same shape at four scales */
.format-shape.size-XS {
  scale: 0.55;
}
.format-shape.size-S {
  scale: 0.72;
}
.format-shape.size-L {
  scale: 1.22;
}
.binding-shape {
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 2px 4px 4px 2px;
  background: linear-gradient(135deg, #f4efe6, #e2dacb);
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.15);
}
/* a hardcover: the board's thickness and its hinge */
.binding-hard {
  background:
    linear-gradient(90deg, transparent 6px, rgb(0 0 0 / 0.12) 6px 7px, transparent 7px),
    linear-gradient(135deg, #e9e0cf, #cdbfa6);
  box-shadow:
    3px 3px 0 -1px #d9cfbd,
    0 3px 8px rgb(0 0 0 / 0.2);
}
.sheet-photos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.sheet-qr {
  flex-basis: 100%;
  width: 150px;
  max-width: 150px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
}
.sheet-qr svg {
  display: block;
  width: 100%;
}
.sheet-credits {
  color: var(--quiet);
  font-size: 12px;
  text-underline-offset: 2px;
}
.sheet-line {
  font-size: 18px;
}
.sheet-note,
.sheet-status {
  color: var(--quiet);
  /* (no last word alone on its line) */
  text-wrap: pretty;
}
.sheet-status:empty {
  display: none;
}

/* ---- Je boek: the price once at its head, and each choice a row of segments, its name beside them where the sheet is
   wide enough (a laptop's or a tablet's bottom sheet) and above them where it isn't (the side panel, a phone) */
.sheet-head {
  position: sticky;
  /* it reaches out over the card's padding to its edges, and sticks at the card's top edge */
  top: calc(-1 * var(--pad-y));
  z-index: 1;
  margin: calc(-1 * var(--pad-y)) calc(-1 * var(--pad-x)) 0;
  /* (its right clear of the close button at the card's corner, as long as its word is in the customer's language:
     sheets.js --done-letters) */
  padding: var(--pad-y) calc(var(--done-letters, 5) * 1ch + 52px) 16px var(--pad-x);
  background: var(--sheet-paper);
  /* (the edge the sheet's scrolled content goes under) */
  box-shadow: 0 1px 0 rgb(36 34 31 / 0.07);
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.sheet-price {
  margin-left: auto;
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.sheet-price.is-up,
.sheet-price.is-down {
  animation: price-moved 1.2s var(--ease);
}
.sheet-body:has(.sheet-choice) {
  gap: 12px;
}
.sheet-choice {
  gap: 6px;
}
@container (min-width: 520px) {
  .sheet-choice {
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
  }
}
.segments {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 14px;
  background: rgb(36 34 31 / 0.06);
}
.segment {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 4px 8px;
  border: 0;
  border-radius: 11px;
  background: none;
  color: var(--text);
  transition:
    background 0.25s,
    box-shadow 0.25s,
    transform 0.25s var(--ease);
}
.segment:active {
  transform: scale(0.96);
}
/* the shop's recommendation (sheets.js): a small label on its top edge, the row given the room above it */
.segments:has(.segment-tip) {
  margin-top: 8px;
}
.segment.is-tip {
  position: relative;
}
.segment-tip {
  position: absolute;
  top: -11px;
  left: 50%;
  translate: -50% 0;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
}
.segment.chosen {
  background: #fff;
  box-shadow:
    0 1px 2px rgb(36 34 31 / 0.12),
    0 3px 10px -4px rgb(36 34 31 / 0.18);
}
@media (hover: hover) {
  .segment:not(.chosen, :disabled):hover {
    background: rgb(255 255 255 / 0.55);
  }
}
.segment:disabled {
  opacity: 0.35;
  cursor: default;
}
.segment-words {
  display: grid;
  min-width: 0;
  text-align: left;
  line-height: 1.2;
}
.segment-label {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.segment-more {
  color: var(--quiet);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* what else a choice says: a paper size's measures beside its name */
.segment-note {
  color: var(--quiet);
  font-size: 12px;
  white-space: nowrap;
}
/* the book at its true size beside a phone, from above (sizeview.js): --k is the px a mm of the whole scene, the
   biggest book of its cover and format and the phone fitting the stage, so a size change grows or shrinks the book
   beside the same phone. The drawing takes the scene's own shape, and the room beside it holds its words: the book's
   measures and that it's drawn to scale beside an ordinary phone (no strip of empty table);
   too narrow for both, the words go under it */
.size-view {
  container-type: inline-size;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 4px 22px;
  margin-bottom: 4px;
  padding-right: 22px;
  border-radius: 14px;
  background:
    radial-gradient(120% 100% at 25% 15%, rgb(255 255 255 / 0.5), transparent 60%),
    linear-gradient(160deg, #ece2d0, #ddd0b8);
  overflow: hidden;
  /* the room the book's measures take above, below and left of the scene, in px like their labels (11px type, a 5px
     bracket and the gaps round it), so a small stage never squeezes a label against its edge */
  --room: 28px;
}
/* as tall as the sheet allows, and as wide as the scene drawn that tall with its measures' room */
.sv-stage {
  container-type: size;
  display: grid;
  place-items: center;
  --stage-h: clamp(150px, 24vh, 230px);
  height: var(--stage-h);
  width: calc(var(--room) + (var(--stage-h) - 2 * var(--room)) * var(--scene-w) / var(--scene-h));
}
.sv-words > p {
  margin: 0;
  text-wrap: balance;
}
.sv-size {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.sv-words > .sv-scale {
  margin-top: 6px;
  color: rgb(40 30 20 / 0.62);
  font-size: 12.5px;
  line-height: 1.4;
}
@container (max-width: 420px) {
  .size-view {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    padding: 0 16px 14px;
    text-align: center;
  }
  /* as wide as the sheet, and as tall as the scene drawn that wide with its measures' room */
  .sv-stage {
    width: 100%;
    height: min(210px, 2 * var(--room) + (100cqw - var(--room)) * var(--scene-h) / var(--scene-w));
  }
}
.sv-scene {
  /* the book and phone scale into what the measures' room leaves (sizeview.js sceneOf) */
  --k: min((100cqw - var(--room)) / var(--scene-w), (100cqh - 2 * var(--room)) / var(--scene-h));
  display: flex;
  align-items: center;
  gap: calc(var(--gap) * var(--k));
  padding: var(--room) 0 var(--room) var(--room);
}
.sv-book {
  position: relative;
  flex: none;
  width: calc(var(--book-w) * var(--k));
  height: calc(var(--book-h) * var(--k));
  /* the pages' edge it lies on, as thick as the book, then its shadow on the table */
  box-shadow:
    calc(var(--book-d) * var(--k) * 0.7) calc(var(--book-d) * var(--k) * 0.7) 0 #f7f2e8,
    calc(var(--book-d) * var(--k) * 0.7 + 2px) calc(var(--book-d) * var(--k) * 0.7 + 3px) 8px rgb(60 40 20 / 0.28);
  border-radius: 1px 2px 2px 1px;
}
.sv-cover {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
}
.sv-cover > .tb-preview {
  width: 100%;
}
.sv-measure {
  position: absolute;
  color: rgb(40 30 20 / 0.62);
  font-size: 11px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* the width along the top, the height down the left: a measure line with its ends ticked, its length over it */
.sv-width {
  left: 0;
  right: 0;
  bottom: calc(100% + 6px);
  padding-bottom: 8px;
  text-align: center;
}
.sv-height {
  top: 0;
  bottom: 0;
  right: calc(100% + 6px);
  /* clear of its bracket (5px wide: ::after) */
  padding-left: 9px;
  writing-mode: vertical-rl;
  rotate: 180deg;
  text-align: center;
}
.sv-measure::after {
  content: '';
  position: absolute;
  border: 0 solid rgb(40 30 20 / 0.4);
}
.sv-width::after {
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  border-width: 0 1px 1px;
}
.sv-height::after {
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  border-width: 1px 1px 1px 0;
}
.sv-phone {
  position: relative;
  flex: none;
  width: calc(var(--phone-w) * var(--k));
  height: calc(var(--phone-h) * var(--k));
  border-radius: calc(10.5 * var(--k));
  box-shadow: 2px 3px 8px rgb(60 40 20 / 0.28);
}
/* (its viewBox a mm wider at each side, for the buttons standing out) */
.sv-phone > svg {
  display: block;
  width: calc((var(--phone-w) + 2) * var(--k));
  height: 100%;
  margin-left: calc(-1 * var(--k));
  overflow: visible;
}
/* the book on your table through the camera (ontable.js): under the size view, only where the phone can */
.on-table {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin: 0 0 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  color: var(--text);
  font: 500 15px/1.2 var(--ui-font);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition:
    background 0.2s var(--ease),
    scale 0.2s var(--ease);
}
.on-table[hidden] {
  display: none;
}
.on-table:active {
  scale: 0.98;
}
.on-table svg {
  flex: none;
  width: 22px;
  height: 22px;
}
.on-table.is-busy {
  cursor: progress;
  background: linear-gradient(90deg, #fffdf9 30%, #f3ede3 50%, #fffdf9 70%) 0 0 / 300% 100%;
  animation: on-table-busy 1.6s linear infinite;
}
@keyframes on-table-busy {
  to {
    background-position: -300% 0;
  }
}
/* where the page draws the book's pages to read them back: laid out, never seen (pagepictures.js) */
.snapshot-host {
  position: fixed;
  left: -100000px;
  top: 0;
  pointer-events: none;
}
/* the pages: fewer and more round the count */
.segment-step {
  flex: 0 0 64px;
  font-size: 20px;
  font-weight: 500;
}
.segment-count {
  flex: 1;
  align-self: center;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
/* a narrow sheet (a phone, the side panel): each choice a tile, its shape on its foot above its words, so four sizes or
   three covers share a row */
@container (max-width: 460px) {
  .segment:has(.segment-words) {
    display: grid;
    /* (the tallest shape: a portrait book at .size-L) */
    grid-template-rows: 44px auto;
    align-content: start;
    justify-items: center;
    gap: 5px;
    padding: 8px 4px 7px;
  }
  /* (its shape by class, never :first-child: see agent.css on a :has() rule's subject) */
  .segment:has(.segment-words) > .segment-shape {
    align-self: end;
    transform-origin: 50% 100%;
  }
  .segment-words {
    justify-items: center;
    text-align: center;
  }
  .segment-words > * {
    white-space: normal;
    text-wrap: balance;
  }
}
/* the shapes beside their words: each a little book, large enough to tell the sizes apart (they keep the four scales
   of .size-XS to .size-L) and drawn darker than the grey row they stand in, with an edge and a photo on its cover, so
   it reads as a book on any segment, chosen (white) or not */
.segment .format-shape,
.segment .binding-shape {
  position: relative;
  flex: none;
  background: linear-gradient(135deg, #efe5d3, #d5c6aa);
  box-shadow:
    inset 0 0 0 1px rgb(36 34 31 / 0.2),
    0 1px 3px rgb(0 0 0 / 0.2);
}
.segment .format-shape::after,
.segment .binding-soft::after,
.segment .binding-hard::after {
  content: '';
  position: absolute;
  inset: 16% 16% 40%;
  border-radius: 1px;
  background: linear-gradient(180deg, #a8c4c9 0 55%, #6f9a86 55%);
}
.segment .format-square,
.segment .binding-shape {
  width: 30px;
  height: 30px;
}
.segment .format-landscape {
  width: 38px;
  height: 27px;
}
.segment .format-portrait {
  width: 26px;
  height: 36px;
}
.segment .binding-hard {
  background:
    linear-gradient(90deg, transparent 4px, rgb(0 0 0 / 0.16) 4px 5px, transparent 5px),
    linear-gradient(135deg, #e6dac4, #c6b597);
  box-shadow:
    inset 0 0 0 1px rgb(36 34 31 / 0.22),
    2px 2px 0 -1px #cfc3ad,
    0 1px 3px rgb(0 0 0 / 0.22);
}
/* lay-flat: the book open, its two pages flat with no curve into the fold */
.segment .binding-flat {
  width: 44px;
  height: 26px;
  border-radius: 1px;
  background: linear-gradient(
    90deg,
    #f1e9da 0 calc(50% - 0.5px),
    rgb(0 0 0 / 0.25) calc(50% - 0.5px) calc(50% + 0.5px),
    #e4d9c5 calc(50% + 0.5px)
  );
}

/* ---- modals: Meer and Bestellen (order.js, order.css), a card over the dimmed page. A modal dialog: in the browser's
   top layer over everything, the dock too, and everything under it out of reach. On a phone it rises from the bottom
   like the other sheets. */
.modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  display: grid;
  place-items: center;
  /* clipped, never a scroller: opening, the browser focuses the card's first button while the card still lies closed
     below the screen, and would scroll the dialog to it, so the card stood in place instead of sliding in */
  overflow: clip;
  background: rgb(30 26 22 / 0);
  color: var(--text);
  font: inherit;
  transition: background 0.32s var(--ease);
}
.modal:not([open]) {
  display: none;
}
.modal::backdrop {
  background: none;
}
.modal.open {
  background: rgb(30 26 22 / 0.42);
}
.modal-card {
  position: relative;
  width: min(100%, 440px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 22px 24px 24px;
  border-radius: 24px;
  background: var(--sheet-paper);
  box-shadow: 0 30px 80px -24px rgb(30 20 10 / 0.55);
  /* how it looks closed, written once: closed, and the first frame it opens in */
  --closed-opacity: 0;
  --closed: translateY(16px) scale(0.97);
  opacity: var(--closed-opacity);
  transform: var(--closed);
  transition:
    opacity 0.25s,
    transform 0.38s var(--ease);
}
.modal.open .modal-card {
  opacity: 1;
  transform: none;
}
/* shown and opened in one frame (sheets.js), the dim and the card still come in from their closed look */
@starting-style {
  .modal.open {
    background: rgb(30 26 22 / 0);
  }
  .modal.open .modal-card {
    opacity: var(--closed-opacity);
    transform: var(--closed);
  }
}
/* (focused as it opens, so the keyboard starts inside it: no ring for that) */
.modal-card:focus {
  outline: none;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(36 34 31 / 0.07);
  transition: background 0.2s;
}
.modal-close:hover {
  background: rgb(36 34 31 / 0.13);
}
.modal-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.modal .sheet-title {
  padding-right: 48px;
}
@media (max-width: 640px) {
  .modal {
    padding: 0;
    place-items: end stretch;
  }
  .modal-card {
    width: 100%;
    max-height: 88dvh;
    padding-bottom: calc(var(--safe-bottom) + 24px);
    border-radius: 22px 22px 0 0;
    --closed-opacity: 1;
    --closed: translateY(100%);
  }
}

/* up to a small laptop's or an upright tablet's width the chips share the first row, the title and its line the second:
   between the chips the title would have room for only a few letters */
@media (max-width: 899px) {
  .top {
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 4px;
  }
  .top-title {
    order: 1;
    flex-basis: 100%;
  }
}
@media (max-width: 640px) {
  .top {
    column-gap: 6px;
  }
  .top-side,
  .top-actions {
    gap: 6px;
  }
  .top .chip {
    gap: 5px;
    padding: 0 10px;
    font-size: 14px;
  }
  .top-meta {
    font-size: 12px;
  }
}
/* the chips (with the undo and redo arrows) need 440 px with their words, so on a phone below 440 px Foto's and Alle
   pagina's show only their icons, each named by its aria-label, and the row stays one row */
@media (max-width: 439px) {
  #photos span:not(.chip-badge),
  #overview span {
    display: none;
  }
  /* (and the chips a little closer: the order button's word is longer in French, Commander, and with the undo pair
     beside it the row needs some 370 px of a 390 px phone's 366) */
  .top,
  .top-side,
  .top-actions {
    column-gap: 4px;
  }
}
/* where Foto's is its icon alone (an upright phone, or one held sideways) its count of photos without a sure date sits on
   the icon's corner, so the chip is as narrow as the others and the row keeps its room */
@media (max-width: 439px), (max-height: 500px) {
  #photos {
    position: relative;
  }
  #photos .chip-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    margin: 0;
    padding: 0 5px;
    font-size: 11px;
    box-shadow: 0 0 0 2px var(--surface);
  }
  /* what's still coming from a phone (coming.js) is its sign alone there, the arrow or a stopped phone's two bars, as
     round as the count it stands in for: its count is the chip's tooltip and is read out */
  #photos .chip-coming {
    width: 18px;
    padding: 0;
    justify-content: center;
  }
  #photos .chip-coming b {
    display: none;
  }
}
/* with the TV button beside them the icons need 390 px: below it they're a little smaller and closer, so a 375 or 360 px
   phone keeps one row, and below 350 px smaller still, closer to the screen's edges, so a 320 px one keeps it too: a
   second row of chips would take its height from the spread */
@media (max-width: 389px) {
  .top,
  .top-side,
  .top-actions {
    column-gap: 4px;
  }
  .top .chip {
    min-height: 36px;
    padding: 0 9px;
  }
  .top .chip-icon,
  #overview,
  #undo,
  #redo,
  #photos {
    width: 36px;
    padding: 0;
    justify-content: center;
  }
}
@media (max-width: 349px) {
  .top {
    left: 8px;
    right: 8px;
  }
  .top .chip {
    min-height: 34px;
    padding: 0 8px;
  }
  .top .chip-icon,
  #overview,
  #undo,
  #redo,
  #photos {
    width: 32px;
    padding: 0;
  }
}

/* a short screen (a phone held sideways): the bar is one slim row clear of the notch, the book's line on one line under
   the title, so the spread keeps the height. Its chips are icons beside the order button, each named by its aria-label
   (app.js). */
@media (max-height: 500px) {
  .top {
    flex-wrap: nowrap;
    gap: 8px;
    inset: calc(var(--safe-top) + 8px) max(12px, env(safe-area-inset-right, 0px)) auto
      max(12px, env(safe-area-inset-left, 0px));
  }
  .top-title {
    order: 0;
    flex-basis: auto;
  }
  .top .chip {
    min-height: 36px;
    padding: 0 14px;
    font-size: 14px;
  }
  #overview,
  #undo,
  #redo,
  #photos,
  #tv,
  #more {
    width: 36px;
    padding: 0;
    justify-content: center;
  }
  #overview span,
  #photos span:not(.chip-badge) {
    display: none;
  }
  .top-name {
    font-size: 15px;
    line-height: 1.2;
    padding-block: 0;
  }
  .top-meta {
    padding: 0 4px 0 6px;
    font-size: 12px;
    line-height: 1.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.12s !important;
    animation-duration: 0.12s !important;
  }
}

/* ---- a link to hand on (linkshare.js): the link in a field, Kopieer link and Deel (where there's a share sheet) beside
   it, or under it where the row would leave too little of the link to read */
.link-share {
  container-type: inline-size;
  width: 100%;
  max-width: 420px;
}
.link-share[hidden],
.link-send[hidden] {
  display: none;
}
.link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.link-field {
  flex: 1 1 200px;
  width: 0;
  min-width: 0;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgb(36 34 31 / 0.14);
  color: var(--quiet);
  font: 400 13px/1 var(--ui-font);
  text-overflow: ellipsis;
  outline: none;
}
.link-field:focus-visible {
  box-shadow: inset 0 0 0 1.5px var(--accent);
}
.link-copy,
.link-send {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 14px/1 var(--ui-font);
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s;
}
/* the link's one big button (linkshare.js ask): the row's whole width, the link quiet under it */
.link-copy.link-ask {
  flex: 1 1 100%;
  box-sizing: border-box;
  max-width: 100%;
  height: auto;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 15px;
  line-height: 1.25;
  white-space: normal;
  text-wrap: balance;
}
.ways.on-phone .link-copy.link-ask {
  font-size: 14px;
}
.link-ask + .link-field {
  flex-basis: 100%;
  box-sizing: border-box;
  height: 32px;
  background: transparent;
  text-align: center;
}
.link-copy.is-done {
  background: #3d7a4f;
}
.link-send {
  padding: 0 16px 0 13px;
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgb(36 34 31 / 0.14);
}
.link-send svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* a phone's width: the link a row of its own, the buttons side by side under it */
@container (max-width: 400px) {
  .link-field {
    flex-basis: 100%;
  }
  .link-copy,
  .link-send {
    flex: 1;
  }
}
/* too narrow to read any of the link (a desktop window at a phone's width): Kopieer link alone */
@container (max-width: 200px) {
  .link-field {
    display: none;
  }
  .link-copy,
  .link-send {
    height: 30px;
    padding: 0 12px;
    font-size: 13px;
  }
}
