/* The table: the light surface the book lies on, its paper, its pieces, the tray, the dots and the hands */
/* the table's tone follows the book's paper (table.js, colour.js tableFor): registered, so a new look eases it over */
@property --tb-table {
  syntax: '<color>';
  inherits: true;
  initial-value: #ece8e1;
}
@property --tb-table-light {
  syntax: '<color>';
  inherits: true;
  initial-value: #f6f2eb;
}
/* the soft paper card the closed tray's stack stands on (a wide stage's shelf, the corner, the dock's tile) and the
   dock's Ontwerpen tile (agent.css .agent-design), one card wherever it stands; lit: pointed at */
:root {
  --card-round: 22px;
  --card-paper: rgb(250 248 244 / 0.72);
  --card-paper-lit: rgb(252 250 246 / 0.95);
  --card-edge: 1px solid rgb(36 34 31 / 0.08);
  --card-shadow: 0 10px 28px -16px rgb(40 30 20 / 0.3);
}
.tb {
  position: absolute;
  inset: 0;
  /* clip, not hidden: the closed tray reaches past the edge, and a focused title must never scroll the table */
  overflow: hidden;
  overflow: clip;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  --tb-table-surface: radial-gradient(120% 90% at 50% 40%, var(--tb-table-light), var(--tb-table) 70%);
  background: var(--tb-table-surface);
  transition:
    --tb-table 0.9s ease,
    --tb-table-light 0.9s ease;
  --tb-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* a quick spring with a small settle: the selection's ring and its actions */
  --tb-spring: cubic-bezier(0.3, 1.4, 0.5, 1);
  --tb-ring: var(--accent, #24221f);
  /* the book's one pen: writing the pages while it's made, and on a drawing drawn again */
  --tb-pen: 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.2' stroke-linejoin='round'%3E%3Cpath d='M4 20l1.2-4.6L16.5 4.1a2 2 0 0 1 2.8 0l.6.6a2 2 0 0 1 0 2.8L8.6 18.8 4 20Z' fill='%23f2c14e'/%3E%3Cpath d='M14.5 6.1l3.4 3.4'/%3E%3C/svg%3E");
}

.tb-stage {
  position: absolute;
  inset: 0;
  touch-action: none;
  /* The book's pages take none of the room the dock leaves under it (app.js frameTable writes it on the table, for the
     layers beside the stage that read it): kept from the stage, a change of it, which comes with every change of the
     dock's height, restyles those layers alone, not every element of the book (116 ms against 6 on a cheap phone
     with a 150-photo book) */
  --table-bottom: initial;
  --table-bottom-quiet: initial;
  --words-room: initial;
}
/* The overview is a page that scrolls: the browser's own scroll, momentum and bounce, a finger stopping it; nothing of
   ours moves it (table.js frameOverview). Its rows go out of sight under the top bar and run on to the screen's foot
   under the agent's floating bar; the scroll's end leaves the last row clear of both (framing.js overviewHeight) */
.tb.is-scrolling .tb-stage {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  clip-path: inset(calc(var(--table-top, 0px) - var(--table-notice, 0px)) 0 0 0);
}
/* zooming in, the rows keep their scroll till the spread is in (table.js zoomIn): no finger scrolls them meanwhile */
.tb.is-scrolling.is-zooming .tb-stage {
  touch-action: none;
}
/* a piece new to the book while it's made develops where it lands (arrange.js developIn) */
.tb-item.is-developing {
  animation: tb-develop 0.8s ease-out backwards;
}
@keyframes tb-develop {
  from {
    opacity: 0;
  }
}
.tb-room {
  width: 1px;
  height: 0;
  pointer-events: none;
}
.tb.is-overview .tb-sheet,
.tb.is-overview .tb-item {
  cursor: pointer;
}

.tb-world,
.tb-sheets,
.tb-items {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}
.tb-world.is-gliding {
  will-change: transform;
}
/* zooming between the overview and a spread (zoom.js), the spread glides by itself over the empty table. The table
   lies over the rest of the book at the overview's scale. A drawing stays on the photos it touches. */
.tb-veil {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  pointer-events: none;
  background: var(--tb-table-surface);
}
.tb-world .tb-sheet.is-gliding,
.tb-world .tb-item.is-gliding {
  z-index: 5;
}
.tb-world .tb-drawing.is-gliding {
  z-index: 6;
}
/* the camera moves the world and the zoom its spread (camera.js), never a transition: with reduced motion every change
   gets a short one (app.css), which glided the whole book big on a zoom's every camera change */
@media (prefers-reduced-motion: reduce) {
  .tb-world,
  .tb-room,
  .tb-veil {
    transition: none !important;
  }
  .tb-sheet,
  .tb-item {
    transition-property: opacity, visibility !important;
  }
}
/* the rest lies under it, so the cover folds or opens at once there. Its shadow redrawn every frame of the zoom was
   most of what the GPU still had to do. */
.tb.is-zooming .tb-sheet:not(.is-gliding)::before,
.tb.is-zooming .tb-sheet:not(.is-gliding) .tb-page-left,
.tb.is-zooming .tb-sheet:not(.is-gliding) .tb-spine,
.tb.is-zooming .tb-item.is-wrap:not(.is-gliding) {
  transition: none;
}

/* ---- the paper */
.tb-sheet {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}
.tb-sheet::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1px 2px 2px 1px;
  box-shadow:
    0 1px 2px rgb(40 30 20 / 0.1),
    0 18px 40px -18px rgb(60 40 20 / 0.38);
}
.tb-page {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}
.tb-page-left {
  left: 0;
}
.tb-page-right {
  left: 50%;
}
.tb-page i {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.6s var(--tb-ease);
}
/* the fold: its own piece over everything on the spread (paper.js foldElement), so a photo across both pages of a soft-
   or hardcover shows the crease it gets in print: the pages curving down into the binding, darkest in the fold, and the
   light catching the page rising out of it. Shade and light only, so the photo under it stays whole. Over the drawings
   (3) and a piece gliding to its place (2), under the zoom's table (.tb-veil, 4, after it) and what glides with it. */
.tb-fold {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  transform-origin: 0 0;
  pointer-events: none;
}
.tb-world .tb-fold.is-gliding {
  z-index: 7;
}
.tb-fold::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 43%;
  width: 14%;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(30 20 10 / 0.03) 22%,
    rgb(30 20 10 / 0.09) 36%,
    rgb(30 20 10 / 0.2) 45%,
    rgb(30 20 10 / 0.36) 49.4%,
    rgb(30 20 10 / 0.42) 49.9%,
    rgb(255 250 240 / 0.3) 50.5%,
    rgb(30 20 10 / 0.22) 51.6%,
    rgb(30 20 10 / 0.09) 58%,
    rgb(30 20 10 / 0.03) 72%,
    transparent
  );
}
/* a lay-flat book's pages lie flat to the fold: only its fine line, over a photo too (nearly seamless, not quite) */
.tb.is-flat .tb-fold::before {
  left: 49.5%;
  width: 1%;
  background: linear-gradient(90deg, transparent, rgb(30 20 10 / 0.1) 45% 55%, transparent);
}

/* the page edges: thicker on the side with more pages, none on the spine's side of the closed cover and back
   (paper.js --edge-before, --edge-after) */
.tb-edges {
  position: absolute;
  top: 0.4%;
  bottom: 0.4%;
  background: repeating-linear-gradient(90deg, #f7f3ec 0 1px, #ddd6ca 1px 1.7px);
  box-shadow: 0 6px 14px -8px rgb(60 40 20 / 0.4);
}
.tb-edges-before {
  right: 100%;
  width: var(--edge-before, 2px);
  border-radius: 2px 0 0 2px;
}
.tb-edges-after {
  left: 100%;
  width: var(--edge-after, 2px);
  border-radius: 0 2px 2px 0;
}

/* the cover: a closed book, its front only; in the overview it lies open, the back left of the spine (--spine: its
   width, paper.js), so the whole cover shows as it's printed. The front stays where it is either way. */
.tb-sheet.is-cover::before {
  left: 50%;
  border-radius: 2px 4px 4px 2px;
  box-shadow:
    -3px 0 0 rgb(0 0 0 / 0.08),
    0 2px 3px rgb(40 30 20 / 0.12),
    0 24px 44px -18px rgb(60 40 20 / 0.45);
  transition: left 0.38s var(--tb-ease);
}
.tb-spine {
  display: none;
}
.tb-sheet.is-cover .tb-spine {
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - var(--spine, 0px));
  width: var(--spine, 0px);
  /* the hinges either side */
  box-shadow:
    inset 1px 0 rgb(30 20 10 / 0.12),
    inset -1px 0 rgb(30 20 10 / 0.12);
}
.tb-sheet.is-cover .tb-page-left {
  left: calc(-1 * var(--spine, 0px));
  border-radius: 4px 2px 2px 4px;
}
/* (hidden, not only clear: a piece appearing animates its opacity, which would show it for a moment). The is-fading
   line is no duplicate. The fade rule further down wins over the plain wrap line and drops its late hiding, so a wrap
   fading in sight would vanish on the first frame. With it the back cover's words fade with the back page. */
.tb-sheet.is-cover .tb-page-left,
.tb-sheet.is-cover .tb-spine,
.tb-item.is-wrap,
.tb-item.is-wrap.is-fading {
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.38s var(--tb-ease),
    visibility 0s 0.38s;
}
.tb.is-overview .tb-sheet.is-cover .tb-page-left,
.tb.is-overview .tb-sheet.is-cover .tb-spine,
.tb.is-overview .tb-item.is-wrap {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.38s var(--tb-ease);
}
/* and under the empty table while a zoom runs, unless the cover is the spread zooming. It opens there at once, as the
   zooming rules above say. */
.tb.is-zooming .tb-sheet.is-cover:not(.is-gliding) .tb-page-left,
.tb.is-zooming .tb-sheet.is-cover:not(.is-gliding) .tb-spine,
.tb.is-zooming .tb-item.is-wrap:not(.is-gliding) {
  visibility: visible;
  opacity: 1;
}
.tb.is-overview .tb-sheet.is-cover::before,
.tb.is-zooming .tb-sheet.is-cover:not(.is-gliding)::before {
  left: calc(-1 * var(--spine, 0px));
  border-radius: 4px;
}
.tb-sheet.is-cover .tb-page-right {
  border-radius: 2px 4px 4px 2px;
}
.tb-sheet.is-cover .tb-page-right::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4%;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.14), rgb(255 255 255 / 0.12) 40%, transparent);
  pointer-events: none;
}

/* the back cover closed, the book's last spread (backcover.js): the cover's mirror, its back only, the spine's hinge
   on its right. It lies over the open cover's back, so the overview never shows it (but while it zooms in or out), and
   its pieces are copies, never touched. */
.tb-sheet.is-back .tb-page-right,
.tb-sheet.is-back .tb-gutter {
  display: none;
}
.tb-sheet.is-back::before {
  right: 50%;
  border-radius: 4px 2px 2px 4px;
  box-shadow:
    3px 0 0 rgb(0 0 0 / 0.08),
    0 2px 3px rgb(40 30 20 / 0.12),
    0 24px 44px -18px rgb(60 40 20 / 0.45);
}
.tb-sheet.is-back .tb-page-left {
  border-radius: 4px 2px 2px 4px;
}
.tb-sheet.is-back .tb-page-left::after {
  content: '';
  position: absolute;
  inset: 0 0 0 auto;
  width: 4%;
  background: linear-gradient(270deg, rgb(0 0 0 / 0.14), rgb(255 255 255 / 0.12) 40%, transparent);
  pointer-events: none;
}
.tb.is-overview .tb-sheet.is-back:not(.is-gliding),
.tb.is-overview .tb-item.is-back:not(.is-gliding) {
  visibility: hidden;
  opacity: 0;
}
.tb-item.is-back {
  pointer-events: none;
}

/* while the book is made, the one pen (making.js): on the spread the story has reached, writing */
.tb-pencil {
  display: none;
}
.tb.is-making .tb-sheet.is-building .tb-pencil {
  display: block;
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 16%;
  aspect-ratio: 1;
  translate: -30% -70%;
  background: var(--tb-pen) center / contain no-repeat;
  transform-origin: 15% 85%;
  animation: tb-write-page 1.1s ease-in-out infinite;
  pointer-events: none;
}
@keyframes tb-write-page {
  50% {
    transform: translate(10%, -4%) rotate(6deg);
  }
}

.is-away {
  opacity: 0 !important;
  pointer-events: none;
}
/* only a piece in sight fades as it steps back or comes back (away.ts markAway): the rest change at once; a photo
   lifted fades with its ring and mark */
.tb-sheet.is-fading,
.tb-item.is-fading,
.tb-fold.is-fading,
.tb-photo.is-lifted,
.tb-photo.is-lifted + .tb-over,
.tb-drawing.is-lifted {
  transition: opacity 0.38s var(--tb-ease);
}

/* ---- the pieces */
.tb-item {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}
.tb-item.is-moving {
  will-change: transform;
  z-index: 2;
}

.tb-frame {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
}
.tb-pic {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #ddd5ca;
}
.tb-pic img {
  position: absolute;
  display: block;
  max-width: none;
  pointer-events: none;
  transition: opacity 0.35s var(--tb-ease);
}
.tb-pic img.is-mono {
  filter: grayscale(1);
}
.tb-pic img:not(.is-loaded) {
  opacity: 0;
}
.tb-photo.has-shadow:not(.is-shaped) .tb-frame {
  box-shadow:
    0 1px 1px rgb(30 20 10 / 0.14),
    0 6px 14px -6px rgb(30 20 10 / 0.35);
}
.tb-photo.has-shadow.is-shaped {
  filter: drop-shadow(0 3px 5px rgb(30 20 10 / 0.25));
}
.tb-tape {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -48%) rotate(-3deg);
  pointer-events: none;
}
.tb-tape svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* the ring: a book photo's on its over-piece (dpimark.js overOf, over every drawing), a tray photo's and a drawing's on
   their own piece */
.tb-over::after,
.tb-tray .tb-photo::after,
.tb-drawing.is-touchable::after {
  content: '';
  position: absolute;
  inset: -7px;
  border: 3px solid var(--tb-ring);
  border-radius: 7px;
  box-shadow: 0 0 0 3px rgb(255 255 255 / 0.85);
  opacity: 0;
  transform: scale(1.04);
  transition:
    opacity 0.12s ease-out,
    transform 0.2s var(--tb-spring);
  pointer-events: none;
}
.tb-photo.is-selected + .tb-over::after,
.tb-tray .tb-photo.is-selected::after,
.tb-drawing.is-selected::after,
.tb-photo.is-target + .tb-over::after,
.tb-tray .tb-photo.is-target::after {
  opacity: 1;
  transform: none;
}
.tb-photo.is-target + .tb-over::after,
.tb-tray .tb-photo.is-target::after {
  border-style: dashed;
}
/* a book photo's over-piece: its sharpness mark and ring (dpimark.js overOf), over the drawings (3) and the fold, under
   the zoom's table (.tb-veil, after it); gliding with its spread, over what glides with it */
.tb-over {
  z-index: 4;
  pointer-events: none;
}
.tb-world .tb-over.is-gliding {
  z-index: 7;
}
/* its ring round what shows of the photo: a photo printed to the edge is trimmed where the paper ends (dpimark.js
   showOver) */
.tb-over::after {
  inset: calc(var(--tb-trim-top, 0px) - 7px) calc(var(--tb-trim-right, 0px) - 7px)
    calc(var(--tb-trim-bottom, 0px) - 7px) calc(var(--tb-trim-left, 0px) - 7px);
}
.tb-photo.is-lifted,
.tb-photo.is-lifted + .tb-over,
.tb-drawing.is-lifted {
  opacity: 0.3;
}
.tb-photo.is-kept::before {
  content: '';
  position: absolute;
  z-index: 1;
  right: 6px;
  top: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20s-7-4.4-7-9.6A3.9 3.9 0 0 1 12 8a3.9 3.9 0 0 1 7 2.4C19 15.6 12 20 12 20Z' fill='%23e2603a'/%3E%3C/svg%3E")
    center / 14px no-repeat;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2);
}
.tb-photo.in-tray .tb-frame {
  background: #fffdf8;
}
/* ---- how sharp a photo prints where it is (dpimark.js): frosted glass over the photo, like the selection's ring,
   never paper's. It rises in as the photo is pointed at or selected; a photo printing so soft its pixels show wears
   it on its own, folded to its red exclamation mark, and opens it to its word and dpi when it's pointed at or
   selected. */
/* the mark's room: the photo's width less the insets, in the mark's own px (scaled like it: dpimark.js sizeMarks),
   so what folds away below is measured against what the mark can hold */
.tb-dpi-room {
  position: absolute;
  z-index: 2;
  width: calc((100% - 12px * var(--tb-mark, 1)) / var(--tb-mark, 1));
  container-type: inline-size;
  pointer-events: none;
  scale: var(--tb-mark, 1);
  transform-origin: 0 100%;
}
.tb-dpi {
  display: flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px 4px 7px;
  border-radius: 999px;
  background: rgb(26 24 22 / 0.4);
  backdrop-filter: blur(12px) saturate(1.6);
  -webkit-backdrop-filter: blur(12px) saturate(1.6);
  box-shadow: inset 0 0 0 0.5px rgb(255 255 255 / 0.22);
  color: #fff;
  font: 600 12px/1.2 var(--ui-font, system-ui);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px) scale(0.94);
  transform-origin: 0 100%;
  transition:
    opacity 0.18s ease-out,
    transform 0.32s var(--tb-spring),
    padding 0.32s var(--tb-spring);
}
.tb-dpi > b,
.tb-dpi-n {
  max-width: 10em;
  margin-left: 5px;
  overflow: hidden;
  font-weight: 600;
  transition:
    max-width 0.32s var(--tb-spring),
    margin 0.32s var(--tb-spring),
    opacity 0.2s ease-out;
}
.tb-dpi-n {
  margin-left: 4px;
  font-weight: 500;
  opacity: 0.72;
  font-variant-numeric: tabular-nums;
}
.tb-dpi-bars {
  display: flex;
  flex: none;
  align-items: flex-end;
  gap: 1.5px;
  height: 10px;
}
.tb-dpi-bars i {
  width: 2.5px;
  border-radius: 1px;
  background: currentColor;
  opacity: 0.3;
}
.tb-dpi-bars i:nth-child(1) {
  height: 35%;
}
.tb-dpi-bars i:nth-child(2) {
  height: 57%;
}
.tb-dpi-bars i:nth-child(3) {
  height: 79%;
}
.tb-dpi-bars i:nth-child(4) {
  height: 100%;
}
.tb-dpi[data-grade='sharp'] i,
.tb-dpi[data-grade='good'] i:nth-child(-n + 3),
.tb-dpi[data-grade='fine'] i:nth-child(-n + 2) {
  opacity: 1;
}
/* a print so soft its pixels show: a red exclamation mark where the bars stand */
.tb-dpi-alert {
  display: none;
  flex: none;
  place-items: center;
  width: 16px;
  height: 16px;
  margin: -2px -1px;
  border-radius: 50%;
  background: #e5402f;
  box-shadow: 0 0 0 1.5px #fff;
  color: #fff;
  font: 800 11.5px/1 var(--ui-font, system-ui);
}
.tb-dpi[data-grade='low'] .tb-dpi-bars {
  display: none;
}
.tb-dpi[data-grade='low'] .tb-dpi-alert {
  display: grid;
}
/* a small photo keeps its bars and its number, a tiny one its bars, and one too small for those none: the mark is under
   152 px with its longest word and number ("Redelijk 149 dpi"), 80 without the word (Chromium's system-ui), 30 its bars
   alone, with room for wider fonts */
@container (max-width: 160px) {
  .tb-dpi > b {
    display: none;
  }
}
@container (max-width: 88px) {
  .tb-dpi-n {
    display: none;
  }
}
@container (max-width: 30px) {
  .tb-dpi {
    display: none;
  }
}
.tb:not(.is-overview) .tb-photo:not(.is-lifted) + .tb-over .tb-dpi[data-grade='low'] {
  opacity: 1;
  transform: none;
}
/* on its own it's the mark alone, no glass round it; pointed at or selected it opens to its word and dpi */
.tb-photo:not(.is-selected, :hover) + .tb-over .tb-dpi[data-grade='low'] {
  padding: 2px;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.tb-photo:not(.is-selected, :hover) + .tb-over .tb-dpi[data-grade='low'] .tb-dpi-alert {
  box-shadow:
    0 0 0 1.5px #fff,
    0 2px 6px rgb(0 0 0 / 0.35);
}
.tb-photo:not(.is-selected, :hover) + .tb-over .tb-dpi[data-grade='low'] > b,
.tb-photo:not(.is-selected, :hover) + .tb-over .tb-dpi[data-grade='low'] > .tb-dpi-n {
  max-width: 0;
  margin-left: 0;
  opacity: 0;
}
.tb:not(.is-overview) .tb-photo.is-selected:not(.is-lifted) + .tb-over .tb-dpi {
  opacity: 1;
  transform: none;
  padding-right: 8px;
}
@media (hover: hover) {
  .tb:not(.is-overview) .tb-photo:hover:not(.is-lifted) + .tb-over .tb-dpi {
    opacity: 1;
    transform: none;
    padding-right: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tb-dpi,
  .tb-dpi > b,
  .tb-dpi-n {
    transition: opacity 0.18s ease-out;
  }
}

.tb-words {
  white-space: pre;
  outline: none;
  overflow-wrap: break-word;
}
.tb-words[contenteditable='plaintext-only'],
.tb-words[contenteditable='true'] {
  white-space: pre-wrap;
  user-select: text;
  -webkit-user-select: text;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.45);
  box-shadow: 0 0 0 2px var(--tb-ring);
}
.tb-text {
  /* words lie over a photo they share a place with (a caption on a photo printed to the edge, a cover's title) */
  z-index: 1;
}
.tb-text .tb-ghost {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* a drawing lies on the paper over any photo it touches (the cover's sticker, one tucked on a print's corner),
   whichever came onto the table first, and over one gliding to its place (is-moving). One the customer can change
   (pieces.js is-touchable) takes a tap or a right-click, and gets the photos' ring when selected; any other drawing
   leaves a tap to the photo or page under it. Only the table's own (in .tb-items) take one: a picture of a book (a style
   card's, the start's cover) is only looked at */
.tb-drawing {
  z-index: 3;
  pointer-events: none;
}
/* one laid under the words (a cover's band: coverphotos.js) */
.tb-drawing.is-under {
  z-index: 0;
}
.tb-items .tb-drawing.is-touchable {
  pointer-events: auto;
  cursor: pointer;
}
/* a mouse over one says it's a thing of its own, to take in hand (drag.js) or tap for Groter and Kleiner: its ring
   shows faintly */
@media (hover: hover) {
  .tb:not(.is-overview) .tb-items .tb-drawing.is-movable {
    cursor: grab;
  }
  .tb:not(.is-overview) .tb-items .tb-drawing.is-touchable:not(.is-selected, .is-lifted):hover::after {
    opacity: 0.45;
    transform: none;
  }
}
.tb-drawing svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* where the shell's bars reach over the table (framing.js barsOf reads it) */
.tb-bars {
  position: absolute;
  left: 0;
  width: 0;
  top: var(--table-top, 0px);
  bottom: var(--table-bottom, 0px);
  visibility: hidden;
  pointer-events: none;
}

/* where the agent's dock reaches at its quietest, without its line and chips (framing.js steadyFit) */
.tb-quiet {
  position: absolute;
  left: 0;
  width: 0;
  top: var(--table-top, 0px);
  bottom: var(--table-bottom-quiet, var(--table-bottom, 0px));
  visibility: hidden;
  pointer-events: none;
}

/* the room a side panel takes on the right (--table-right) */
.tb-side {
  position: absolute;
  right: 0;
  width: var(--table-right, 0px);
  top: 0;
  height: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ---- the arrows beside the book (a wide stage with a pointer: table.js shows them, framing.js turnersShown) */
.tb-turn {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: none;
  place-items: center;
  /* as big as the chrome is (framing.js wideTurn; app.css --ui, 1 where the table stands without the app's chrome) */
  width: calc(48px * var(--ui, 1));
  height: calc(48px * var(--ui, 1));
  padding: 0;
  border: 1px solid rgb(36 34 31 / 0.1);
  border-radius: 50%;
  background: rgb(255 253 249 / 0.9);
  color: #24221f;
  box-shadow: 0 8px 22px -10px rgb(40 30 20 / 0.35);
  cursor: pointer;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}
.tb-turn svg {
  width: calc(22px * var(--ui, 1));
  height: calc(22px * var(--ui, 1));
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tb-turn:not([hidden]) {
  display: grid;
}
@media (hover: hover) {
  .tb-turn:hover {
    background: #fff;
    box-shadow: 0 10px 26px -10px rgb(40 30 20 / 0.5);
  }
}
.tv .tb-turn {
  display: none !important;
}
.join .tb-turn {
  display: none !important;
}
/* a wide stage's open tray reaches over the room beside the book where the next arrow stands (framing.js safeArea
   leaves it the closed shelf's width): the drawer lies over it until it closes; the dots still turn the book */
.has-shelf .tb-tray.is-open ~ .tb-turn-on {
  visibility: hidden;
}

/* ---- the magnifier's buttons (magnifier.js): a pointer's desktop, low on the left beside the chat field at any width
   (agent.css leaves that corner free), quiet as the arrows */
.tb-zoom {
  position: absolute;
  left: 12px;
  bottom: 16px;
  z-index: 2;
  display: flex;
  padding: 3px;
  border: 1px solid rgb(36 34 31 / 0.1);
  border-radius: 24px;
  background: rgb(255 253 249 / 0.9);
  box-shadow: 0 8px 22px -10px rgb(40 30 20 / 0.35);
}
/* over the table, as big as the chrome is (app.css --ui); in the dock's row (controlrow.js), the dock's own zoom */
.tb > .tb-zoom {
  zoom: var(--ui, 1);
}
.tb-zoom[hidden],
.tv .tb-zoom,
.join .tb-zoom {
  display: none;
}
.tb-zoom button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #24221f;
  cursor: pointer;
  transition:
    background 0.2s,
    opacity 0.2s;
}
.tb-zoom button:disabled {
  opacity: 0.3;
  cursor: default;
}
.tb-zoom button:not(:disabled):hover {
  background: rgb(36 34 31 / 0.07);
}
.tb-zoom svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
/* close up, the paper shows only in the room the controls leave it (magnifier.js showNear, turners.js closeRoom) */
.tb.is-near:not(.is-scrolling) .tb-stage {
  clip-path: var(--near);
}
/* close up, the paper moves under a drag */
.tb.is-close .tb-stage {
  cursor: grab;
}
.tb.is-close .tb-stage:active {
  cursor: grabbing;
}

/* ---- the tray: photos not in the book */
.tb-tray {
  position: absolute;
  /* its stack's ranks (--tray-rank) stay inside the tray, also where the shelf drops its transform: they'd rise over
     Je foto's otherwise, and a tap there would open the tray behind it */
  isolation: isolate;
  right: 0;
  top: var(--table-top, 0px);
  bottom: var(--table-bottom, 0px);
  width: 172px;
  overflow: hidden;
  scrollbar-width: none;
  touch-action: pan-y;
  transform: translateX(calc(172px - 54px));
  cursor: pointer;
}
/* closed in an upright stage's top corner: its stack whole on a card of its own, as the shelf's (below), its width
   drawer.js writes (tray.js CORNER_PX) */
.has-corner .tb-tray:not(.is-open) {
  right: 10px;
  transform: none;
  border-radius: var(--card-round);
  background: var(--card-paper);
  border: var(--card-edge);
  box-shadow: var(--card-shadow);
}
/* closed in the dock's row of controls (tray.js pileLayout): the row's own glass pill, its photos and count side by
   side, its words as the row's (agent.css stacked). drawer.js writes its slot's place and width onto it */
.has-pile .tb-tray:not(.is-open) {
  right: auto;
  transform: none;
  box-sizing: border-box;
  border: 1px solid var(--line, rgb(36 34 31 / 0.1));
  border-radius: 22px;
  background: var(--glass, rgb(255 253 249 / 0.85));
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 8px 22px -12px rgb(40 30 20 / 0.35);
}
.has-pile .tb-tray:not(.is-open) .tb-tray-line {
  color: var(--text, #24221f);
  font: 600 14px/18px var(--ui-font, system-ui);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* open: a drawer of soft paper over the table's edge */
.tb-tray.is-open {
  overflow: hidden auto;
  /* open, its bar shows how many photos lie above and below */
  scrollbar-width: thin;
  transform: none;
  cursor: default;
  border-radius: 20px 0 0 20px;
  background: rgb(250 248 244 / 0.9);
  box-shadow: -10px 0 30px -12px rgb(40 30 20 / 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: tb-drawer 0.32s var(--tb-ease);
}
@keyframes tb-drawer {
  from {
    background: rgb(250 248 244 / 0);
    box-shadow: none;
  }
}
.tb-tray:not(.is-open)::-webkit-scrollbar {
  display: none;
}
/* a wide stage: the closed tray is a shelf beside the book, a small card of soft paper with its stack and count, as big
   as the chrome is (--ui); open, the same card grows into the drawer (tray.js trayFrame says where and how big) */
.has-shelf .tb-tray {
  right: calc(var(--table-right, 0px) + 10px * var(--ui, 1));
  width: 96px;
  transform: none;
  border-radius: var(--card-round);
  background: var(--card-paper);
  border: var(--card-edge);
  box-shadow: var(--card-shadow);
}
/* the stack peeking at a narrow sideways stage's edge: its count on a slip of the card's paper, so it reads over
   whatever lies under it */
.tb:not(.has-shelf, .has-corner, .has-pile, .has-tile) .tb-tray:not(.is-open) .tb-tray-line {
  box-sizing: border-box;
  padding: 1px 0;
  border-radius: 8px;
  background: rgb(250 248 244 / 0.9);
  color: var(--text, #24221f);
  font: 600 12px/16px var(--ui-font, system-ui);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* closed on the dock's tile beside Ontwerpen (agent.css .agent-tray-tile): Ontwerpen's own card (--card-*), drawer.js
   writes its place and size */
.has-tile .tb-tray:not(.is-open) {
  right: auto;
  transform: none;
  box-sizing: border-box;
  border-radius: var(--card-round);
  background: var(--card-paper);
  border: var(--card-edge);
  box-shadow: var(--card-shadow);
}
/* a card's count, in the dock's row's type, dark on the card's paper (a shelf's as big as the chrome: tray.js) */
.has-shelf .tb-tray:not(.is-open) .tb-tray-line,
.has-corner .tb-tray:not(.is-open) .tb-tray-line,
.has-tile .tb-tray:not(.is-open) .tb-tray-line {
  color: var(--text, #24221f);
  font: 600 14px/18px var(--ui-font, system-ui);
  font-variant-numeric: tabular-nums;
}
.has-shelf .tb-tray:not(.is-open) .tb-tray-line {
  font-size: calc(14px * var(--ui, 1));
  line-height: calc(18px * var(--ui, 1));
}
.has-shelf .tb-tray:hover,
.has-corner .tb-tray:not(.is-open):hover,
.has-tile .tb-tray:not(.is-open):hover {
  background: var(--card-paper-lit);
}
.has-shelf .tb-tray.is-open {
  width: 172px;
  border-radius: var(--card-round);
  border-color: transparent;
  background: rgb(250 248 244 / 0.92);
  box-shadow: 0 14px 40px -14px rgb(40 30 20 / 0.35);
}
.tb-tray-roll {
  position: relative;
  width: 100%;
}
.tb-tray .tb-photo {
  cursor: pointer;
}
/* the tray's stack, its first photo on top (drawer.js placeTray), only while the photo lies in the tray: one gone onto a
   page lies among the book's pieces again, under the empty table a zoom lays over the rest (zoom.js cover) */
.tb-tray .tb-photo.in-tray {
  z-index: var(--tray-rank, auto);
}
.tb-tray .tb-photo.is-buried {
  opacity: 0;
  pointer-events: none;
}
/* the open drawer's ×, pinned to its top while it scrolls (a line of no height, so the photos keep their places) */
.tb-tray-close {
  position: sticky;
  top: 0;
  z-index: 100000;
  height: 0;
}
.tb-tray:not(.is-open) .tb-tray-close {
  display: none;
}
.tb-tray-close button {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgb(36 34 31 / 0.1);
  border-radius: 50%;
  background: rgb(255 253 249 / 0.95);
  color: #24221f;
  box-shadow: 0 6px 16px -8px rgb(40 30 20 / 0.4);
  animation: tb-rise 0.32s var(--tb-ease);
}
.tb-tray-close svg,
.tb-held-cancel svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}
/* a tray photo in hand (hold.js): a small card at the table's foot with the photo, what to do, and a × to put it back */
.tb-held {
  position: absolute;
  inset: auto 12px calc(var(--table-bottom, 0px) + 14px);
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: min(calc(100% - 24px), 420px);
  margin: 0 auto;
  padding: 8px 8px 8px 10px;
  border-radius: 18px;
  background: rgb(255 253 249 / 0.96);
  color: #24221f;
  box-shadow: 0 14px 36px -12px rgb(40 30 20 / 0.45);
  animation: tb-held-in 0.36s var(--tb-ease);
}
.tb-held[hidden] {
  display: none;
}
@keyframes tb-held-in {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
}
/* a tap beside the pages: the card shakes its head */
.tb-held.is-nudged {
  animation: tb-held-nudge 0.42s var(--tb-ease);
}
@keyframes tb-held-nudge {
  25% {
    transform: translateX(-7px);
  }
  60% {
    transform: translateX(5px);
  }
}
/* the photo held a little tilted, lifting gently, as if between two fingers */
.tb-held-photo {
  flex: none;
  width: 52px;
  height: 52px;
  padding: 3px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 6px 14px -6px rgb(40 30 20 / 0.5);
  animation: tb-held-lift 2.4s ease-in-out infinite;
}
.tb-held-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@keyframes tb-held-lift {
  0%,
  100% {
    transform: rotate(-5deg) translateY(0);
  }
  50% {
    transform: rotate(-3deg) translateY(-3px);
  }
}
.tb-held-words {
  font: 600 14px/1.3 var(--ui-font, system-ui);
}
.tb-held-cancel {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(36 34 31 / 0.07);
  color: #24221f;
}
/* while a photo is in hand, the pages are where it goes */
.tb.is-holding .tb-stage {
  cursor: copy;
}
@media (prefers-reduced-motion: reduce) {
  .tb-held,
  .tb-held-photo {
    animation: none;
  }
}
/* the tray's quiet lines: the closed stack's count, a stack's, why one was left out */
.tb-tray-line {
  position: absolute;
  left: 0;
  top: 0;
  color: rgb(36 34 31 / 0.55);
  font: 500 11px/1.3 var(--ui-font, system-ui);
  text-align: center;
  pointer-events: none;
  animation: tb-rise 0.32s var(--tb-ease);
}

/* ---- the dots: one per spread */
.tb-dots {
  position: absolute;
  left: 50%;
  top: var(--table-top, 0px);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  max-width: calc(100% - 140px);
  height: 24px;
}
.tb-dot {
  position: relative;
  flex: 0 1 18px;
  min-width: 4px;
  height: 24px;
  padding: 0 2px;
  border: 0;
  background: none;
}
.tb-dot::before {
  content: '';
  display: block;
  height: 4px;
  border-radius: 2px;
  background: rgb(36 34 31 / 0.28);
  transition:
    background 0.3s,
    transform 0.3s var(--tb-ease);
}
.tb-dot.is-empty::before {
  background: transparent;
  box-shadow: inset 0 0 0 1px rgb(36 34 31 / 0.3);
}
.tb-dot.is-cover::before {
  width: 60%;
  margin-left: 40%;
}
.tb-dot.is-back::before {
  width: 60%;
}
.tb-dot.is-current::before {
  background: var(--tb-ring);
  transform: scaleY(1.6);
}

/* ---- the hands: a selected photo's actions, a photo being dragged */
.tb-hands {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.tb-actions[hidden],
.tb-menu[hidden] {
  display: none;
}
.tb-actions,
.tb-menu {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  gap: 8px;
  /* (more chips than a phone's width: a second row, never past its edge) */
  flex-wrap: wrap;
  justify-content: center;
  max-width: calc(100vw - 16px);
  row-gap: 10px;
  align-items: flex-start;
  pointer-events: auto;
  animation: tb-rise 0.2s var(--tb-spring);
}
@keyframes tb-rise {
  from {
    opacity: 0;
    translate: 0 8px;
  }
}
.tb-act {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 64px;
  padding: 0;
  border: 0;
  background: none;
  font: 500 12px/1.2 var(--ui-font, system-ui);
  color: var(--text, #24221f);
}
.tb-act-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--glass, rgb(255 253 249 / 0.9)) center / 22px no-repeat;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgb(36 34 31 / 0.08),
    0 6px 16px -6px rgb(30 20 10 / 0.35);
  transition: transform 0.2s var(--tb-ease);
}
.tb-act:active .tb-act-icon {
  transform: scale(0.92);
}
.tb-act-word {
  padding: 1px 6px;
  /* two short words (Blijft erin) stay on one line, a hair past the button into the gap */
  white-space: nowrap;
  border-radius: 6px;
  background: rgb(255 253 249 / 0.8);
}
.tb-act-grow .tb-act-icon {
  background-image: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-7 7M4 20l7-7'/%3E%3C/svg%3E");
}
.tb-act-swap .tb-act-icon {
  background-image: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h14l-4-4M20 16H6l4 4'/%3E%3C/svg%3E");
}
.tb-act-away .tb-act-icon {
  background-image: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
}
/* a photo in a shape straightened (a plain rectangle), its shape back (an arch), its band off (a photo in its band)
   and on again (the photo, its band dashed round it): actions.js */
.tb-act-shape .tb-act-icon {
  background-image: 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' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='14' height='14' rx='1'/%3E%3C/svg%3E");
}
.tb-act-shape.is-back .tb-act-icon {
  background-image: 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' stroke-linejoin='round'%3E%3Cpath d='M6 19v-8a6 6 0 0 1 12 0v8Z'/%3E%3C/svg%3E");
}
.tb-act-frame .tb-act-icon {
  background-image: 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' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='8' height='8' rx='0.5' fill='%2324221f' fill-opacity='.25'/%3E%3Crect x='4' y='4' width='16' height='16' rx='1' stroke-dasharray='2.5 2.5'/%3E%3C/svg%3E");
}
.tb-act-frame.is-on .tb-act-icon {
  background-image: 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' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='1'/%3E%3Crect x='8' y='8' width='8' height='8' rx='0.5' fill='%2324221f' fill-opacity='.25' stroke-width='1.5'/%3E%3C/svg%3E");
}
/* their words are longer than the others', and their buttons grow with them */
.tb-act-shape,
.tb-act-frame {
  width: auto;
  min-width: 64px;
}
.tb-act-keep .tb-act-icon {
  background-image: 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' stroke-linejoin='round'%3E%3Cpath d='M12 20s-7-4.4-7-9.6A3.9 3.9 0 0 1 12 8a3.9 3.9 0 0 1 7 2.4C19 15.6 12 20 12 20Z'/%3E%3C/svg%3E");
}
/* the book a size smaller: its word is longer than the others', and its button grows with it */
.tb-act-smaller {
  width: auto;
  min-width: 64px;
}
.tb-act-smaller .tb-act-icon {
  background-image: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4' stroke-dasharray='2 3'/%3E%3Crect x='4' y='13' width='7' height='7' rx='1'/%3E%3Cpath d='m19 5-5 5m0-3.5V10h3.5'/%3E%3C/svg%3E");
}
/* a drawing's thumbs: up fills once given; down breathes while the new drawing is made, and the drawing with it */
.tb-act-up .tb-act-icon {
  background-image: var(--thumb-up);
}
.tb-act-up.is-on .tb-act-icon {
  background-image: var(--thumb-up-on);
}
.tb-act-down .tb-act-icon {
  background-image: var(--thumb-down);
}
.tb-act-down.is-busy .tb-act-icon {
  background-image: var(--thumb-down-on);
  animation: tb-breathe 1.2s ease-in-out infinite;
}
/* a drawing not yet drawn in waits hidden till its spread opens (ink.js inkOnce): a turn's copy carries it hidden too,
   so it's drawn in as the page lands, never shown whole first. The overview shows it as it lies. */
.tb:not(.is-overview) .tb-drawing.is-uninked > svg {
  visibility: hidden;
}
/* a drawing drawn again in the new style (designer.js restyle, a thumb down): held faded with the book's one pen
   writing on it, the sign that the book is being drawn (.tb-pencil), so it reads at a glance as being redrawn */
.tb-drawing.is-redrawing > * {
  opacity: 0.4;
  transition: opacity 0.3s;
}
.tb-drawing.is-redrawing::before {
  content: '';
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: clamp(18px, 40%, 34px);
  aspect-ratio: 1;
  translate: -30% -70%;
  background: var(--tb-pen) center / contain no-repeat;
  transform-origin: 15% 85%;
  animation: tb-write-page 1.1s ease-in-out infinite;
  pointer-events: none;
}
@keyframes tb-breathe {
  50% {
    opacity: 0.45;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tb-act-down.is-busy .tb-act-icon,
  .tb-drawing.is-redrawing::before {
    animation: none;
  }
  .tb-act-down.is-busy .tb-act-icon {
    opacity: 0.6;
  }
}
.tb-act-keep.is-on .tb-act-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23e2603a' stroke='%23e2603a' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 20s-7-4.4-7-9.6A3.9 3.9 0 0 1 12 8a3.9 3.9 0 0 1 7 2.4C19 15.6 12 20 12 20Z'/%3E%3C/svg%3E");
}
.tb-hint {
  display: none;
  margin: 0;
  align-self: center;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--tb-ring);
  color: #fff;
  font: 500 13px/1.3 var(--ui-font, system-ui);
  max-width: 220px;
}
.tb-actions.is-swapping .tb-act {
  display: none;
}
.tb-actions.is-swapping .tb-hint {
  display: block;
}
/* while Wissel waits for the photo to trade with (hands.js), one under the mouse shows it's one: the hand, and the
   dashed ring a photo carried over it shows (drag.js landing) */
@media (hover: hover) {
  .tb.is-swapping .tb-photo:not(.is-selected) {
    cursor: pointer;
  }
  .tb.is-swapping .tb-photo:not(.is-selected):hover + .tb-over::after,
  .tb.is-swapping .tb-tray .tb-photo:not(.is-selected):hover::after {
    opacity: 1;
    transform: none;
    border-style: dashed;
  }
}
.tb-act-grow.is-shrink .tb-act-icon,
.tb-act-shrink .tb-act-icon {
  background-image: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 14h6v6M20 10h-6V4M14 10l6-6M10 14l-6 6'/%3E%3C/svg%3E");
}
.tb-act[hidden] {
  display: none;
}
/* the context menu (menu.js): the same chips, at the pointer; its longer words make a chip wider */
.tb-menu .tb-act {
  width: auto;
  min-width: 64px;
}
.tb-act-open .tb-act-icon {
  background-image: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4a7 7 0 1 0 0 14 7 7 0 0 0 0-14ZM20 20l-4-4M11 8v6M8 11h6'/%3E%3C/svg%3E");
}
.tb-act-overview .tb-act-icon {
  background-image: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h7v7H4zM13 4h7v7h-7zM4 13h7v7H4zM13 13h7v7h-7z'/%3E%3C/svg%3E");
}
.tb-act-put-in .tb-act-icon {
  background-image: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
}
.tb-ghost-photo {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  pointer-events: none;
  filter: drop-shadow(0 18px 24px rgb(30 20 10 / 0.35));
  animation: tb-lift 0.2s var(--tb-ease);
}
/* lifted off the page or out of the tray: its shadow falls away beneath it (drag.js) */
@keyframes tb-lift {
  from {
    filter: drop-shadow(0 2px 3px rgb(30 20 10 / 0.3));
  }
}
.tb-ghost-photo::after {
  display: none;
}

/* ---- a style card's small book */
.tb.tb-preview {
  position: relative;
  inset: auto;
  width: 100%;
  background: none;
  overflow: visible;
}
.tb-preview-book {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
}
.tb-preview .tb-edges {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .tb-sheet,
  .tb-item,
  .tb-page i {
    transition-duration: 0.15s;
  }
  .tb-sheet.is-building .tb-pencil {
    animation: none;
  }
}

/* ---- the agent's "which one?": numbered rings (marks.js) */
.tb-photo.is-marked + .tb-over::after {
  opacity: 1;
  transform: none;
  border-color: var(--tb-accent, #e2603a);
  animation: tb-mark-pulse 1.8s ease-in-out infinite;
}
@keyframes tb-mark-pulse {
  50% {
    box-shadow: 0 0 0 7px rgb(255 255 255 / 0.55);
  }
}
.tb-mark {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--tb-accent, #e2603a);
  color: #fff;
  font: 700 16px/1 var(--font, system-ui, sans-serif);
  box-shadow:
    0 0 0 3px rgb(255 255 255 / 0.95),
    0 4px 10px rgb(30 20 10 / 0.3);
  pointer-events: none;
  animation: tb-rise 0.32s var(--tb-ease);
}

/* The overview's page numbers, under each page (paper.js showFolios): about 11 px on screen at the overview's scale,
   where a spread shows some 340 px wide */
.tb-folio {
  position: absolute;
  top: 100%;
  width: 50%;
  padding-top: calc(var(--sheet-w) * 0.022);
  font-size: calc(var(--sheet-w) * 0.034);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: center;
  color: rgb(60 45 30 / 0.55);
  opacity: 0;
  transition: opacity 0.3s var(--tb-ease);
  pointer-events: none;
}
.tb-folio + .tb-folio {
  left: 50%;
}
.tb.is-overview:not(.is-zooming) .tb-folio {
  opacity: 1;
}
/* "Rug" under the laid-open cover's spine, as quiet as "Omslag" beside it, only where the spine is thick enough for
   words: a tap on it (or on the spine) opens the field for its words (spinefield.js) */
.tb-folio.tb-folio-spine {
  display: none;
  left: calc(50% - var(--spine, 0px) / 2);
  width: auto;
  margin: 0;
  border: 0;
  padding: calc(var(--sheet-w) * 0.022) calc(var(--sheet-w) * 0.03) calc(var(--sheet-w) * 0.03);
  background: none;
  font-family: inherit;
  transform: translateX(-50%);
  cursor: text;
}
.tb-sheet.is-cover.has-spine-words .tb-folio-spine {
  display: block;
}
/* (hidden, not only clear, outside the overview: a button there would still take a tab or a tap) */
.tb-folio-spine {
  visibility: hidden;
}
.tb.is-overview:not(.is-zooming) .tb-folio-spine {
  visibility: visible;
  pointer-events: auto;
}
/* the field for the spine's words, just under the cover (spinefield.js keeps it there): 16 px, so a phone doesn't zoom
   in on it */
.tb-spinefield {
  position: fixed;
  z-index: 40;
  width: min(280px, calc(100vw - 16px));
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px -12px rgb(60 40 20 / 0.35);
  font: 16px/1.25 var(--ui-font);
  color: var(--text);
  text-align: center;
  transform: translateX(-50%);
  outline: none;
  animation: tb-rise 0.22s var(--tb-ease);
}
.tb-spinefield::placeholder {
  color: var(--quiet);
}

/* The spread or page that was open, lit in the overview with its numbers (pagelabel.js lightOpen), so whoever comes
   back to the rows sees where they were */
.tb.is-overview:not(.is-zooming) .tb-sheet.is-here,
.tb.is-overview:not(.is-zooming) .tb-page.is-here {
  outline: calc(var(--sheet-w) * 0.008) solid var(--tb-ring);
  outline-offset: calc(var(--sheet-w) * 0.012);
}
.tb-folio.is-here {
  color: var(--tb-ring);
  font-weight: 700;
}

/* The open pages' numbers under the paper in view (pagelabel.js showPageLabel) */
.tb-pages {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  margin: 0;
  /* as big as the chrome is (pagelabel.js, app.css --ui) */
  padding: 0 calc(10px * var(--ui, 1));
  height: calc(22px * var(--ui, 1));
  border-radius: calc(11px * var(--ui, 1));
  background: rgb(255 253 249 / 0.8);
  font-size: calc(12px * var(--ui, 1));
  font-variant-numeric: tabular-nums;
  line-height: calc(22px * var(--ui, 1));
  white-space: nowrap;
  color: rgb(36 34 31 / 0.72);
  pointer-events: none;
}
.tb-pages[hidden],
.tv .tb-pages,
.join .tb-pages {
  display: none;
}

/* By the page's outer edge a mouse takes the page to turn it (drag.js atEdge), not the photo lying there */
.tb.at-edge .tb-stage,
.tb.at-edge .tb-item {
  cursor: grab;
}
.tb.is-turning .tb-stage {
  cursor: grabbing;
}

/* Where a carried photo lands (drag.js landing): the page it joins, lit and ringed as a photo it would trade with is,
   and the tray it goes into */
.tb-page::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 4%;
  border: 3px dashed var(--tb-ring);
  border-radius: 10px;
  background: color-mix(in srgb, var(--tb-ring) 8%, transparent);
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 0.12s ease-out,
    transform 0.2s var(--tb-spring);
  pointer-events: none;
}
.tb-page.is-target::before {
  opacity: 1;
  transform: none;
}
.tb-tray.is-open.is-target {
  box-shadow:
    inset 0 0 0 3px var(--tb-ring),
    -10px 0 30px -12px rgb(40 30 20 / 0.25);
}

/* A narrow stage's arrows, under the paper's corners (turners.js smallArrows) */
.tb-turn.is-small {
  width: 40px;
  height: 40px;
}
.tb-turn.is-small svg {
  width: 18px;
  height: 18px;
}

/* a piece out of sight that a render left for later (catchup.ts) hides where it lay till it's placed, its insides
   skipped by the browser's styles and paint meanwhile (a new theme's colours restyle only what shows) */
.tb-item.is-later {
  visibility: hidden;
  content-visibility: hidden;
}
