/* Je foto's (timeline.js): the photos by day, the days in a list beside one day's photos (a row above them on a
   phone), each moment's photos in a grid. What to do now stands over both. A photo without a sure date stands at its
   guessed place, lifted, with its guessed day. Foto's nakijken (timereview.js) lies over all of it.
   Made for a phone first: three photos a row at 390 px, more as the screen widens.
   It has the whole screen: the agent's dock waits under it (below), so nothing about the book's pages stands among the
   photos. */
.tl {
  --tl-pad: 20px;
  --tl-cell: 100px;
  position: fixed;
  inset: 0;
  z-index: 40;
  /* its own size, set by its insets alone, decides how much its head's buttons say (.tl-tools) */
  container: timeline / size;
  display: flex;
  flex-direction: column;
  /* the light falls in from the top, as on the table the book lies on */
  background: radial-gradient(130% 60% at 50% 0%, #f7f4ef, var(--surface) 75%) var(--surface);
  user-select: none;
  -webkit-user-select: none;
  /* where it lies closed, written once: closed, and the first frame it opens in */
  --closed: translateY(18px);
  opacity: 0;
  transform: var(--closed);
  transition:
    opacity 0.28s var(--ease),
    transform 0.28s var(--ease);
}
.tl.open {
  opacity: 1;
  transform: none;
}
/* its first frame is its closed one even when it opens in the frame it's shown (timeline.js open): the surface comes in
   with the motion, never over the book's title at once; the same for a card over it (.tl-tell) */
@starting-style {
  .tl.open {
    opacity: 0;
    transform: var(--closed);
  }
}
/* The agent's dock (its bar, its line, the book's zoom and Ontwerpen) is about the book's pages, which lie under here:
   it waits for the book, unseen, while Je foto's is open, as what's done here reaches the agent by itself (timeline.js:
   a drag, a day given, a story told). Hidden, not taken out, so app.js still measures it. Only what speaks with the
   customer here comes over the foot, each part alone: a question the agent asks about photos, numbered on their cards
   here (timeline.js mark), its line and answers; a call still live, the face that listens, its line and the bar whose
   mic shows and ends it. It comes under a card over it (telling.js), and the scroll ends with its room. */
body:has(#timeline:not([hidden])) .agent {
  visibility: hidden;
  z-index: 41;
}
body:has(#timeline:not([hidden])) .agent:has(.agent-chips.is-answers) :is(.agent-line, .agent-chips),
body:has(#timeline:not([hidden])) .agent.is-listening :is(.agent-figure, .agent-line, .agent-bar) {
  visibility: visible;
}
body:has(#timeline:not([hidden])) .agent-chips:not(.is-answers) {
  display: none;
}

/* ---- the head (timeline.js drawHead): two rows, each with one job. Above, what this is (the title, the photos'
   numbers under it) and the way out at the right (Ongedaan maken and redo beside Sluiten or Klaar, its one dark
   button); under them, what can be done with the photos, together at the left in one row of chips alike. The title is
   never broken or covered: the facts under it wrap whole instead. Undo and redo keep their place from the start, so
   the head never changes shape under the person's hand at their first change. */
.tl-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'heading end' 'tools tools';
  align-items: center;
  gap: 12px 8px;
  padding: calc(var(--safe-top) + 12px) var(--tl-pad) 12px;
}
/* on a big screen as big as the chrome is (app.css --ui, over 1 from there), its sides in line with the days and
   photos under it: the head, the notice under it (.tl-top) and the days (timedays.css) alike */
@media (min-width: 1600px) and (min-height: 1000px) {
  .tl > .tl-head {
    zoom: var(--ui);
    padding-top: calc(var(--safe-top) / var(--ui) + 12px);
    padding-inline: calc(var(--tl-pad) / var(--ui));
  }
  .tl > .tl-top {
    zoom: var(--ui);
    padding-inline: calc(var(--tl-pad) / var(--ui));
  }
}
.tl-heading {
  grid-area: heading;
  display: grid;
}
.tl-end {
  grid-area: end;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tl-tools {
  grid-area: tools;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.tl-title {
  margin: 0;
  white-space: nowrap;
  font-size: 22px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
/* the facts (timefacts.js factsOf) wrap whole rather than lose their end beside undo and Klaar, a dot between two on
   one line: each hangs its dot in the gap before it, and the one a line starts with lies past the edge, cut off */
.tl-count {
  --fact-gap: 1.1em;
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--fact-gap);
  overflow: hidden;
  color: var(--quiet);
  font-size: 13.5px;
  line-height: 1.35;
}
.tl-fact {
  white-space: nowrap;
}
.tl-fact::before {
  content: '·';
  display: inline-block;
  width: var(--fact-gap);
  margin-left: calc(-1 * var(--fact-gap));
  text-align: center;
}
/* the top bar's Ongedaan maken and redo (takeback.js), their arrows alone, joined as the bar's pair (app.css .take-pair):
   once either has a step both show, the one without faint; with neither the pair keeps its place unseen */
.tl-head .take-undo,
.tl-head .take-redo {
  width: 38px;
  min-height: 38px;
  padding: 0;
  justify-content: center;
}
.tl-head .take-pair {
  margin-right: 4px;
}
.tl-done {
  min-height: 38px;
  padding: 0 16px;
}
/* Foto's toevoegen beside Klaar, always in reach (timeline.js drawHead), filled as the one thing Je foto's is for besides
   looking (chip-accent). Where the head is short of room, its plus alone, a round button (the head's short forms, below the AI's
   switch) */
.tl-add {
  flex: none;
  gap: 6px;
  min-height: 38px;
  padding: 0 16px 0 12px;
}
.tl-add svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

/* ---- what to do now, over the days and the photos: the photos without a sure date, a tap away from going through
   them one by one */
.tl-top {
  width: 100%;
  padding: 2px var(--tl-pad) 12px;
}
.tl-todo {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 4px 12px;
  padding: 12px 12px 12px 14px;
  border-radius: var(--radius);
  background: #fff7d6;
  box-shadow: inset 0 0 0 1px rgb(150 110 0 / 0.18);
}
.tl-todo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f2c94c;
  color: #3d2f00;
  rotate: -4deg;
}
.tl-todo-mark svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tl-todo-words {
  display: grid;
  gap: 2px;
}
.tl-todo-title {
  font-weight: 650;
}
.tl-todo-sub,
.tl-hint {
  color: var(--quiet);
  font-size: 13.5px;
  line-height: 1.4;
}
/* how to select a run of photos, only where a Shift-click can */
.tl-hint-run {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .tl-hint-run {
    display: inline;
  }
}
.tl-todo-go {
  min-height: 40px;
}
.tl-todo-go-short {
  display: none;
}
/* whether the AI looks along: the tools' last chip (timeline.js drawHead), its word and a small switch that always
   says which */
.tl-switch {
  position: relative;
  flex: none;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px 0 14px;
  color: var(--quiet);
  font-size: 14px;
}
.tl-switch-short {
  display: none;
}
.tl-switch::after {
  content: '';
  width: 32px;
  height: 20px;
  border-radius: 999px;
  background: rgb(36 34 31 / 0.2);
  transition: background 0.2s;
}
/* the knob on the track's left, 3 px in (12 px further when on); the track ends at the chip's 10 px padding */
.tl-switch-knob {
  position: absolute;
  top: calc(50% - 7px);
  right: 25px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.25);
  transition: transform 0.25s var(--ease);
}
.tl-switch[aria-checked='true'] {
  color: var(--text);
}
.tl-switch[aria-checked='true']::after {
  background: var(--accent);
}
.tl-switch[aria-checked='true'] .tl-switch-knob {
  transform: translateX(12px);
}
/* the head's short forms, where the tools' words don't fit their row (a phone, a narrow window: the worded row is about
   500 px), or don't fit beside the title on a timeline too short to give the head a second row: Foto's toevoegen its
   plus, the AI's switch its shortest word, a word still, as it says what the switch is for */
@container timeline (width < 560px) or ((height <= 500px) and (width < 900px)) {
  .tl-add {
    width: 38px;
    padding: 0;
    justify-content: center;
  }
  .tl-add-word,
  .tl-switch-word {
    display: none;
  }
  .tl-switch-short {
    display: inline;
  }
}

/* ---- the moments: plain sections inside their day's card, each its title over its photos, a hairline between two.
   No line down the left (README, The board's rules: No line down the left) */
/* its end leaves room for the dock while it speaks over the timeline's foot (above; app.js --dock-quiet, --dock-over,
   written on #timeline alone) */
.tl-strip {
  position: relative;
  padding-bottom: 24px;
}
body:has(.agent.is-listening, .agent-chips.is-answers) .tl-strip {
  padding-bottom: calc(40px + var(--dock-quiet, 0px) + var(--dock-over, 0px));
}
/* and that room is the timeline's own paper, from the dock's top to the screen's foot, softening in at its top: what
   speaks stands on it, no photo shows between its parts or under where its bar and controls wait unseen, and no photo
   under it takes a tap meant for it (beside the dock's column both are 0) */
body:has(.agent.is-listening, .agent-chips.is-answers) .tl::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  /* over the open day's head (3), under a photo held in a drag (50) and a card over the timeline (.tl-tell) */
  z-index: 4;
  height: calc(var(--dock-quiet, 0px) + var(--dock-over, 0px) + 16px);
  background: linear-gradient(transparent, var(--surface) 16px);
}
/* A moment skips laying out what's out of sight (content-visibility), which clips whatever reaches past it: its
   padding keeps a selected photo's ring and the agent's numbers inside it. The hairline over the next moment stays
   clear of the card's edges */
.tl-moment {
  --tl-inset: 20px;
  position: relative;
  padding: 18px var(--tl-inset) 14px;
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}
.tl-moment + .tl-moment {
  background: linear-gradient(rgb(36 34 31 / 0.09), rgb(36 34 31 / 0.09)) var(--tl-inset) 0 /
    calc(100% - 2 * var(--tl-inset)) 1px no-repeat;
}
@media (max-width: 640px) {
  .tl-moment {
    --tl-inset: 12px;
    padding-top: 14px;
  }
}
.tl-band {
  display: grid;
  justify-items: start;
  gap: 3px;
  padding-bottom: 12px;
}
/* the moment's title leads, the photos' count at the line's end; where under it */
.tl-band-top {
  justify-self: stretch;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.tl-band-when {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.tl-band-count {
  flex: none;
}
.tl-band-count,
.tl-band-title {
  color: var(--quiet);
  font-size: 13px;
}
/* the words the book has for the moment, the one way to tell about it (the invitation to write a memory in their
   place while it has none, a quiet pill as wide as its words). A tap opens the card */
.tl-tell-open {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
  margin-top: 6px;
  padding: 9px 12px 9px 14px;
  border: 1px solid transparent;
  border-radius: 10px;
  /* a soft patch on the day's paper */
  background: #f6f2ea;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.tl-tell-open.is-empty {
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  padding: 4px 12px 4px 13px;
  border: 1px dashed rgb(36 34 31 / 0.24);
  border-radius: 999px;
  background: transparent;
  color: var(--quiet);
  font-size: 13px;
}
.tl-tell-open:hover {
  border-color: rgb(36 34 31 / 0.2);
  background: #f1ebe0;
}
.tl-tell-open:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.tl-tell-words {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.tl-tell-open svg {
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.7;
}
.tl-tell-open.is-empty svg {
  width: 14px;
  height: 14px;
  margin-top: 0;
}
body.busy .tl-tell-open.is-told svg {
  animation: tl-writing 1s ease-in-out infinite;
}
@keyframes tl-writing {
  50% {
    transform: translateY(-2px) rotate(-8deg);
  }
}

/* the photos: a grid, a day's name before each day's first photo */
.tl-lanes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--tl-cell), 1fr));
  gap: 10px;
  padding-top: 4px;
}
/* a guessed day's note hangs under its photo (.tl-guess): its rows leave the room for it, so the row under it doesn't
   cover it, and so does its foot, so the moment's paint (content-visibility) doesn't cut it off */
.tl-lanes:has(.tl-guess) {
  row-gap: 20px;
  padding-bottom: 16px;
}
.tl-slot {
  position: relative;
  min-width: 0;
}
/* each photo pasted flat on its sheet; one without a sure date lifts off it (.is-float) */
.tl-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 2px;
  background: #d9d3ca;
  cursor: pointer;
  touch-action: pan-y;
  -webkit-touch-callout: none;
  outline-offset: 3px;
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.tl-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1px;
  pointer-events: none;
}
.tl-card img:not([src]) {
  visibility: hidden;
}
.tl-card.is-placed {
  cursor: grab;
}
.tl-card-told {
  position: absolute;
  left: 6px;
  bottom: 2px;
  color: #fff;
  font:
    700 26px/1 Georgia,
    serif;
  text-shadow: 0 1px 4px rgb(0 0 0 / 0.5);
  pointer-events: none;
}
/* a photo without a sure date: lifted higher off the grid, standing straight, its guessed day on a yellow note */
.tl-card.is-float {
  z-index: 1;
  cursor: grab;
  box-shadow:
    0 2px 3px rgb(30 20 10 / 0.18),
    0 12px 22px -8px rgb(36 34 31 / 0.5);
}
/* written by hand on a yellow slip, as the note on the photo in the book (guessed.css .tb-guess); tapped, Foto's
   nakijken asks about that photo (timereview.js). Over the actions, which leave it the room (.tl-hover) */
.tl-guess {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: -14px;
  translate: -50% 0;
  rotate: 2deg;
  padding: 4px 8px;
  border-radius: 2px 2px 3px 8px / 2px 2px 3px 5px;
  background: linear-gradient(172deg, #ffe58a, #f2c94c 70%);
  border: 0;
  color: #3d2f00;
  font:
    700 16px/1 'Caveat',
    var(--ui-font);
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.55),
    0 1px 1.5px rgb(40 30 20 / 0.3),
    0 5px 9px -5px rgb(40 30 20 / 0.5);
  cursor: pointer;
  text-box: trim-both cap alphabetic;
  transition: scale 0.15s var(--ease);
}
.tl-guess:hover {
  scale: 1.08;
}
.tl-lifted .tl-guess {
  pointer-events: none;
}
.tl-card.is-landing {
  visibility: hidden;
}

/* what can be done with a photo, over it: Klopt (without a sure date), Herinnering, and the ×; under a pointer over
   it, and on the photo selected (timeselect.js), a touch screen's too. With several selected a pointer shows them on
   the photo it's over, a touch screen on the one tapped last. Above the guessed day's slip */
.tl-hover {
  position: absolute;
  inset: 0;
  display: none;
  flex-wrap: wrap;
  align-content: flex-end;
  gap: 4px;
  padding: 6px;
  border-radius: inherit;
  background: linear-gradient(transparent 50%, rgb(0 0 0 / 0.25));
  transition: opacity 0.15s;
}
.tl-card.is-float .tl-hover {
  padding-bottom: 16px;
}
@media (hover: hover) {
  .tl-hover {
    display: flex;
    opacity: 0;
  }
  .tl-card:hover .tl-hover,
  .tl-card:focus-visible .tl-hover {
    opacity: 1;
  }
}
.tl:not(.is-many) .tl-card.is-selected .tl-hover {
  display: flex;
  opacity: 1;
}
@media (hover: none) {
  .tl-card.is-selected.is-last .tl-hover {
    display: flex;
  }
}

/* the photos selected (timeselect.js), however many: ringed as a photo selected on the book (table.css
   .tb-over::after), a little smaller in their place so two rings side by side keep apart, and ticked. While any is,
   every other photo shows the empty round a tap ticks: on a touch screen all of them, with a pointer the one it's
   over, so a laptop's line stays calm */
.tl-card.is-selected {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  transform: scale(0.92);
}
.tl.is-selecting .tl-card::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.18);
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.35);
  pointer-events: none;
  transition:
    background 0.15s,
    opacity 0.15s,
    transform 0.15s var(--ease);
}
@media (hover: hover) {
  .tl.is-selecting .tl-card:not(.is-selected, :hover)::before {
    opacity: 0;
  }
}
.tl.is-selecting .tl-card.is-selected::before {
  background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 16px no-repeat;
  transform: scale(1.08);
}
.tl-act {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 0 10px 0 7px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.2);
}
.tl-act-fix {
  background: var(--accent);
  color: var(--accent-ink);
}
.tl-act:hover {
  transform: scale(1.04);
}
.tl-act svg,
.tl-remove svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tl-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.2);
}
.tl-remove:hover {
  transform: scale(1.06);
}

/* a photo the day's label brought into view (timecards.js seekUnsure): ringed a moment in its note's yellow, fading */
.tl-card.is-sought {
  animation: tl-sought 1.8s var(--ease);
}
@keyframes tl-sought {
  0% {
    outline: 0 solid rgb(242 201 76 / 0);
    outline-offset: 10px;
  }
  12%,
  55% {
    outline: 5px solid #f2c94c;
    outline-offset: 3px;
  }
  100% {
    outline: 5px solid rgb(242 201 76 / 0);
    outline-offset: 3px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tl-card.is-sought {
    animation: none;
    outline: 5px solid #f2c94c;
  }
}

/* the agent's "which one?" over the photos: ringed and numbered as on the book (table.css .tb-mark), in the colour
   its answers carry their numbers in (agent.css) */
.tl-card.is-marked {
  outline: 3px solid #e2603a;
  outline-offset: 0;
  animation: tl-mark-pulse 1.8s ease-in-out infinite;
}
@keyframes tl-mark-pulse {
  50% {
    outline-color: rgb(226 96 58 / 0.4);
  }
}
.tl-mark {
  position: absolute;
  z-index: 2;
  top: -9px;
  left: -9px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e2603a;
  color: #fff;
  font: 700 14px/1 var(--ui-font);
  box-shadow:
    0 0 0 3px rgb(255 255 255 / 0.95),
    0 4px 10px rgb(30 20 10 / 0.3);
  pointer-events: none;
}

/* a photo being moved: its place faint, the photo in the hand, a bar where it would go */
.tl-card.is-dragging {
  opacity: 0.25;
  animation: none;
}
.tl-card.tl-lifted {
  position: fixed;
  z-index: 50;
  left: 0;
  top: 0;
  margin: 0;
  pointer-events: none;
  animation: none;
  box-shadow: 0 24px 40px -10px rgb(36 34 31 / 0.45);
}
.tl-caret {
  position: absolute;
  top: 0;
  left: -1.5px;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
  pointer-events: none;
  transition:
    transform 0.12s var(--ease),
    height 0.12s var(--ease);
}
.tl-caret.is-here {
  opacity: 0;
}

/* the selected photos (timeselect.js): the bar over the day's photos, there while any is selected, says how many and
   where they go, with Andere dag… for a day the list doesn't have and Alles deselecteren at its end */
.tl-dating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 10px 10px 0;
  padding: 8px 8px 8px 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgb(36 34 31 / 0.08),
    0 10px 24px -14px rgb(36 34 31 / 0.4);
  animation: tl-bar-in 0.28s var(--ease);
}
@keyframes tl-bar-in {
  from {
    opacity: 0;
    translate: 0 -8px;
  }
}
.tl-dating-words {
  flex: 1 1 220px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  font-size: 14px;
  line-height: 1.35;
}
.tl-dating-count {
  font-weight: 700;
}
.tl-dating-ask {
  color: var(--quiet);
}
.tl-dating .chip {
  min-height: 38px;
}
/* letting go: a quiet word with its cross */
.tl-dating-clear {
  gap: 5px;
  padding: 0 12px 0 9px;
  border-color: transparent;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--quiet);
  font-size: 14px;
}
.tl-dating-clear::before {
  content: '';
  width: 14px;
  height: 14px;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E")
    center / contain no-repeat;
}
.tl-dating-clear:hover {
  background: rgb(36 34 31 / 0.06);
  color: var(--text);
}
/* the device's own date picker lies over its chip, so a tap anywhere on it opens the picker */
.tl-dating-other,
.tl-review-day {
  position: relative;
}
:is(.tl-dating-other, .tl-review-day) input {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}
/* the photos a drop on a day takes, counted on the one in the hand while it's over a day (timedrag.js) */
.tl-lifted-count {
  position: absolute;
  top: -9px;
  right: -9px;
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 10px -4px rgb(36 34 31 / 0.6);
}
.tl-lifted-count[hidden] {
  display: none;
}

/* ---- the cards over the photos (telling.js): at the bottom on a phone, in the middle on a wider screen */
.tl-tell {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: end stretch;
  background: rgb(36 34 31 / 0.28);
  opacity: 0;
  transition: opacity 0.22s var(--ease);
}
.tl-tell.open {
  opacity: 1;
}
.tl-tell-card {
  display: grid;
  gap: 12px;
  max-height: calc(100dvh - var(--safe-top) - 24px);
  overflow-y: auto;
  padding: 18px var(--tl-pad) calc(var(--safe-bottom) + 18px);
  border-radius: 22px 22px 0 0;
  background: #fffdf9;
  box-shadow: 0 30px 80px rgb(36 34 31 / 0.3);
  --closed: translateY(24px);
  transform: var(--closed);
  transition: transform 0.28s var(--ease);
}
/* the card holds the keys as it opens (telling.js show): its buttons show where they are, the card needs no ring */
.tl-tell-card:focus {
  outline: none;
}
.tl-tell.open .tl-tell-card {
  transform: none;
}
/* shown and opened in one frame (telling.js), the dim and the card still come in from their closed look; after the
   open rules, as at the same specificity the later rule wins, a first frame's too */
@starting-style {
  .tl-tell.open {
    opacity: 0;
  }
  .tl-tell.open .tl-tell-card {
    transform: var(--closed);
  }
}
@media (min-width: 641px) and (min-height: 501px) {
  .tl-tell {
    place-items: center;
    /* centred below the shop's bar, which lies over every fixed layer; a card at its tallest fits inside */
    padding: calc(var(--safe-top) + 16px) 16px 16px;
  }
  .tl-tell-card {
    width: min(520px, 100%);
    max-height: calc(100dvh - var(--safe-top) - 32px);
    padding: 20px;
    border-radius: 22px;
  }
}
.tl-tell-photos {
  display: flex;
  gap: 6px;
  height: 64px;
}
.tl-tell-photos img {
  height: 100%;
  max-width: 96px;
  border-radius: 8px;
  object-fit: cover;
}
.tl-tell-title {
  font-size: 17px;
  font-weight: 650;
}
.tl-tell-now {
  margin-top: -4px;
  color: #4d4842;
  font-size: 14px;
  font-style: italic;
}
.tl-tell-now:empty {
  display: none;
}
.tl-sheet-photo {
  justify-self: center;
  max-width: 100%;
  max-height: min(34dvh, 320px);
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 6px 20px -8px rgb(36 34 31 / 0.4);
}
.tl-where {
  display: grid;
  gap: 8px;
}
.tl-where.is-unsure {
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff7d6;
}
.tl-where-title {
  font-weight: 650;
}
.tl-where-line {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
.tl-where-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tl-where-actions .chip {
  min-height: 40px;
}
.tl-tell-field {
  width: 100%;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid rgb(36 34 31 / 0.18);
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  font: 16px/1.45 var(--ui-font);
  resize: vertical;
  user-select: text;
  -webkit-user-select: text;
}
.tl-tell-field:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.tl-tell-note {
  margin-top: -4px;
  color: var(--quiet);
  font-size: 12.5px;
}
.tl-tell-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}
.tl-tell-remove {
  min-height: 36px;
  margin-right: auto;
  padding: 0 4px;
  border: 0;
  background: none;
  color: #a2412a;
  font-size: 14px;
}
/* the top bar's Foto's: how many photos have no sure date */
.chip-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-right: -6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #f2c94c;
  color: #3d2f00;
  font-size: 12px;
  font-weight: 700;
}

/* photos still coming from a phone (coming.js): their count in place of the one above, a photo going down into the
   book beside it; a phone that stopped sending turns it amber with two bars (where Foto's is its icon alone, the sign
   alone sits on its corner: app.css) */
#photos.is-coming .chip-badge:not(.chip-coming) {
  display: none;
}
.chip-coming {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0 7px 0 5px;
  background: var(--text);
  color: var(--surface);
  font-variant-numeric: tabular-nums;
  animation: chip-coming-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.chip-coming b {
  font-weight: 700;
}
.chip-coming svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.coming-arrow {
  animation: coming-drop 1.3s ease-in-out infinite;
}
.coming-pause,
#photos.is-paused .coming-arrow {
  display: none;
}
#photos.is-paused .coming-pause {
  display: inline;
}
#photos.is-paused .chip-coming {
  background: #f2c94c;
  color: #3d2f00;
}
@keyframes coming-drop {
  0% {
    transform: translateY(-2px);
    opacity: 0;
  }
  35%,
  70% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(2px);
    opacity: 0;
  }
}
@keyframes chip-coming-in {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .coming-arrow,
  .chip-coming {
    animation: none;
  }
}

/* wider screens: bigger photos, more a row */
@media (min-width: 641px) {
  .tl {
    --tl-cell: 132px;
  }
}
@media (min-width: 1100px) {
  .tl {
    --tl-cell: calc(150px * var(--ui));
  }
}

/* a short screen (a phone held sideways): the head one row, smaller photos so a moment's head and a row of photos
   fit */
@media (max-height: 500px) {
  .tl {
    --tl-cell: 92px;
  }
  .tl-head {
    padding-top: calc(var(--safe-top) + 6px);
    padding-bottom: 6px;
  }
  .tl-title {
    font-size: 18px;
  }
  .tl-tell-words {
    -webkit-line-clamp: 1;
  }
  .tl-top {
    padding-bottom: 6px;
  }
  .tl-dating {
    margin: 6px 6px 0;
    padding: 4px 4px 4px 12px;
  }
  .tl-dating-ask {
    display: none;
  }
  .tl-dating .chip {
    min-height: 34px;
  }
}
/* a short timeline wide enough (a phone held sideways, not while it stands beside the dock's column, below): the head
   one row, the title, the tools, the way out at the right. The tools keep their one row and the title the rest, at
   least its own width: its facts beside it, or wrapped under it first (667 px wide leaves the title about 170 px) */
@container timeline (height <= 500px) and (width >= 560px) {
  .tl-head {
    grid-template-columns: minmax(min-content, 1fr) auto auto;
    grid-template-areas: 'heading tools end';
    column-gap: 16px;
  }
  .tl-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 10px;
  }
}
/* a phone held sideways over its book: the dock is a column at the right (agent.css --dock-column; --dock-quiet is 0
   then), so while it speaks here (above) the timeline lies beside it, the screen's height, and no photo stays under
   it. The top bar it leaves above the column is covered by the timeline's own paper, which takes the taps there. */
@media (max-height: 500px) and (min-aspect-ratio: 3/2) and (max-width: 1099px) {
  body.booked:has(.agent.is-listening, .agent-chips.is-answers) .tl {
    right: var(--dock-column);
  }
  body.booked:has(.agent.is-listening, .agent-chips.is-answers) .tl::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 100%;
    width: var(--dock-column);
    background: var(--surface);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tl-card.is-marked,
  .tl-dating {
    animation: none;
  }
}
