/* The public-domain-stories-to-adapt page: a library of the year. On top of
   formatter-page.css (the base, .wrap, .section, .pitch, .others, .btn).
   A linen wall, walnut shelves, and piles of cloth-bound books lying flat so
   their titles read left to right; the colour says the form of the work
   (novel, stories, stage, poetry, children's, comics, nonfiction, other
   books; a charcoal can with a tape label for a film) and the length says how
   often it has been filmed. page.js repeats the hex values for the share image, which is
   drawn on a canvas that cannot read CSS. Change one, change both.
   See .claude/data-pages-registry.md, "Per page". */

.pd-body {
  --linen: #efe9dc;
  --linen-2: #e6dfcf;
  --linen-3: #d8cfba;
  --paper: #fbf7ee;
  --rule: rgba(60, 45, 25, 0.16);
  --rule-2: rgba(60, 45, 25, 0.34);
  --ink: #27211a;
  --ink-2: #5b5245;
  --ink-3: #8b8070;
  --board: #5a4030;
  --board-edge: #7d5d46;
  --board-shadow: rgba(60, 40, 20, 0.28);
  --cream: #f6f0e3;
  --novel: #8b3a33;
  --story: #6b4a70;
  --stage: #2f5f4b;
  --poem: #3d5a7b;
  --children: #8f6a1b;
  --comic: #2b7a78;
  --nonfiction: #5f6b2c;
  --other: #7d6b4c;
  --film: #3b3b40;
  --tape: #efe3bf;
  background: var(--linen);
  color: var(--ink);
}
.pd-body ::selection { background: var(--board); color: var(--cream); }
.pd { min-width: 0; }
.pd .wrap { max-width: 1140px; }

/* ───────────────────── the head ───────────────────── */
.pd-room { padding: 60px 0 48px; }
.pd-head { max-width: 780px; }
.pd-room h1 {
  font-family: var(--serif);
  font-size: clamp(40px, 5.6vw, 68px);
  font-weight: 500; letter-spacing: -0.02em; line-height: 1.02;
  margin: 0; text-wrap: balance;
}
.pd-lede { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin: 22px 0 0; max-width: 64ch; }

/* The hero: the title beside a leaf of a desk calendar on the coming 1 January. */
.pd-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 56px; align-items: start; }
.pd-cal {
  position: relative; display: grid; justify-items: center; width: 172px; margin: 14px 8px 0 0; padding: 0 0 16px;
  background: var(--paper); border-radius: 6px; text-align: center; transform: rotate(2.5deg);
  box-shadow: 0 1px 0 var(--rule-2), 0 18px 30px -18px rgba(40, 25, 10, 0.55);
}
.pd-cal-rings { position: absolute; top: -7px; left: 0; right: 0; height: 14px; }
.pd-cal-rings::before, .pd-cal-rings::after {
  content: ""; position: absolute; top: 0; width: 10px; height: 14px; border-radius: 5px; background: var(--ink-2); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25);
}
.pd-cal-rings::before { left: 40px; }
.pd-cal-rings::after { right: 40px; }
.pd-cal-month {
  width: 100%; padding: 16px 0 9px; border-radius: 6px 6px 0 0; background: var(--novel); color: var(--cream);
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
}
.pd-cal-day { margin-top: 6px; font-family: var(--serif); font-size: 98px; font-weight: 500; line-height: 0.95; letter-spacing: -0.03em; }
.pd-cal-year { font-family: var(--serif); font-size: 21px; color: var(--ink-2); }
.pd-cal-left { margin-top: 12px; padding: 4px 12px; border-radius: 999px; background: var(--board); color: var(--cream); font-size: 13px; font-weight: 600; }
.pd-cal-left:empty { display: none; }
.pd-cal-name { margin-top: 8px; font-size: 12px; color: var(--ink-3); }

/* The front table: the best known titles face out on a ledge, scrolled sideways. */
.pd-front { margin-top: 38px; }
.pd-front[hidden] { display: none; }
.pd-front-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
.pd-front-head h2 { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); font-weight: 500; letter-spacing: -0.012em; }
.pd-front-head p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.pd-covers {
  display: flex; gap: 24px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  padding: 26px 18px 0; margin: 0; border-bottom: 12px solid var(--board);
  box-shadow: 0 3px 0 var(--board-edge), 0 16px 12px -10px var(--board-shadow); scrollbar-width: thin; scrollbar-color: var(--linen-3) transparent;
}
.pd-covers > div { flex: none; scroll-snap-align: start; padding-bottom: 0; display: flex; align-items: flex-end; }
.pd-cover {
  --cloth: var(--other);
  position: relative; display: block; width: 152px; aspect-ratio: 2 / 3; padding: 0; border: none; cursor: pointer;
  font: inherit; color: var(--cream); text-align: center; background: var(--cloth); border-radius: 2px 5px 5px 2px;
  background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.26), rgba(255, 255, 255, 0.1) 5%, rgba(0, 0, 0, 0) 12%, rgba(0, 0, 0, 0) 80%, rgba(0, 0, 0, 0.14));
  box-shadow: 0 12px 18px -12px rgba(40, 25, 10, 0.7), 0 1px 0 rgba(0, 0, 0, 0.2);
}
/* Title at the head, clear of the corner sticker; author, form and year at the foot. */
.pd-cover-in { position: absolute; inset: 34px 12px 14px 19px; display: flex; flex-direction: column; align-items: center; gap: 8px; overflow: hidden; }
.pd-cover-kind { order: 9; margin-top: -3px; font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
.pd-cover-l { order: 10; }
.pd-cover-t {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; width: 100%;
  font-family: var(--serif); font-weight: 500; line-height: 1.08; letter-spacing: -0.005em; text-wrap: balance; overflow-wrap: anywhere;
}
.pd-cover.is-short .pd-cover-t { font-size: 23px; }
.pd-cover.is-mid .pd-cover-t { font-size: 18.5px; }
.pd-cover.is-long .pd-cover-t { font-size: 15.5px; }
.pd-cover.is-longer .pd-cover-t { font-size: 13.5px; }
.pd-cover-rule { width: 26px; height: 1.5px; background: rgba(246, 240, 227, 0.6); flex: none; }
.pd-cover-a { margin-top: auto; font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.25; opacity: 0.9; }
.pd-cover-l { font-family: var(--serif); font-style: italic; font-size: 13px; opacity: 0.75; margin-top: -4px; }
/* Four bindings, chosen by the id: a gilt frame, a paper label, two bands, a roundel. */
.pd-bind-0 .pd-cover-in { inset: 14px 12px 14px 19px; box-shadow: inset 0 0 0 1px rgba(246, 240, 227, 0.5); padding: 22px 9px 10px; }
.pd-bind-1 .pd-cover-t { padding: 12px 8px; background: var(--paper); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(60, 45, 25, 0.2), 0 0 0 3px rgba(246, 240, 227, 0.35); }
.pd-bind-2 { background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.26), rgba(255, 255, 255, 0.1) 5%, rgba(0, 0, 0, 0) 12%), linear-gradient(180deg, transparent 0 15%, rgba(0, 0, 0, 0.2) 15% 18%, transparent 18% 82%, rgba(0, 0, 0, 0.2) 82% 85%, transparent 85%); }
.pd-bind-2 .pd-cover-in { inset: 21% 12px 18% 19px; justify-content: center; }
.pd-bind-2 .pd-cover-a { margin-top: 4px; }
.pd-bind-3 { background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.26), rgba(255, 255, 255, 0.1) 5%, rgba(0, 0, 0, 0) 12%), radial-gradient(circle at 54% 76%, rgba(246, 240, 227, 0.16) 0 26px, transparent 27px); }
.pd-bind-3 .pd-cover-t { font-style: italic; }
/* The marks: a round sticker when never filmed, a slip when it has been. */
.pd-cover-sticker {
  position: absolute; top: -14px; right: -14px; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--cream); color: var(--ink); font-family: var(--serif); font-size: 13px; font-weight: 500; line-height: 1.05;
  transform: rotate(12deg); box-shadow: 0 0 0 2px var(--cloth), 0 5px 9px -5px rgba(0, 0, 0, 0.45);
}
.pd-cover-band {
  position: absolute; top: -14px; right: -14px; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; padding: 0 6px;
  background: var(--ink); color: var(--cream); font-size: 10.5px; font-weight: 600; line-height: 1.1;
  transform: rotate(-10deg); box-shadow: 0 0 0 2px var(--cream), 0 5px 9px -5px rgba(0, 0, 0, 0.45);
}
.pd-cover:hover, .pd-cover:focus-visible, .pd-cover[aria-expanded="true"] { transform: translateY(-9px) rotate(-1deg); box-shadow: 0 22px 24px -14px rgba(40, 25, 10, 0.75), 0 1px 0 rgba(0, 0, 0, 0.2); }
.pd-cover:focus-visible, .pd-cover[aria-expanded="true"] { outline: 2px solid var(--ink); outline-offset: 3px; }

/* The headline, worked out from the data: a line in Newsreader with the counts set bold. */
.pd-headline {
  margin: 40px 0 0; padding-top: 20px; border-top: 1px solid var(--rule-2);
  font-family: var(--serif); font-size: clamp(22px, 2.6vw, 31px); font-weight: 400; line-height: 1.3;
  letter-spacing: -0.012em; max-width: 30em; min-height: 1.3em; text-wrap: pretty;
}
.pd-headline b { font-weight: 600; }

/* ───────────────────── controls ───────────────────── */
.pd-controls { margin-top: 30px; display: grid; gap: 14px; }
.pd-where { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--rule-2); border-radius: 8px; overflow: hidden; width: max-content; max-width: 100%; }
.pd-where-btn {
  font: inherit; font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  background: var(--linen-2); border: none; border-right: 1px solid var(--rule-2);
  padding: 10px 16px; cursor: pointer; text-align: left;
}
.pd-where-btn:last-child { border-right: none; }
.pd-where-btn small { display: block; font-size: 11.5px; font-weight: 400; color: var(--ink-3); margin-top: 1px; }
.pd-where-btn:hover { color: var(--ink); background: var(--linen-3); }
.pd-where-btn[aria-pressed="true"] { background: var(--board); color: var(--cream); font-weight: 600; }
.pd-where-btn[aria-pressed="true"] small { color: rgba(246, 240, 227, 0.72); }
.pd-where-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; position: relative; z-index: 1; }

.pd-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pd-forms { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-chip {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-2);
  background: transparent; border: 1px solid var(--rule-2); border-radius: 999px; padding: 6px 12px 6px 9px; cursor: pointer;
}
.pd-chip i { width: 10px; height: 16px; border-radius: 1px; background: var(--swatch, var(--ink)); flex: none; }
.pd-chip:hover { color: var(--ink); border-color: var(--ink); }
.pd-chip[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.pd-chip[aria-pressed="true"] i { outline: 1px solid var(--cream); }
.pd-chip.is-off { opacity: 0.45; }
.pd-chip[hidden] { display: none; }
.pd-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.pd-chip-both { padding-left: 12px; }
.pd-chip small { font-weight: 400; color: var(--ink-3); }
.pd-chip[aria-pressed="true"] small { color: rgba(246, 240, 227, 0.72); }
.pd-find { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-2); margin-left: auto; }
.pd-find input {
  font: inherit; font-size: 14.5px; color: var(--ink); background: transparent; border: none; border-bottom: 1px solid var(--rule-2);
  padding: 6px 2px; width: 220px; max-width: 100%; border-radius: 0;
}
.pd-find input:focus { outline: none; border-bottom-color: var(--ink); }
.pd-find input::placeholder { color: var(--ink-3); }

/* The choosers: language, genre, country and order, each a labelled select
   whose options carry the count they would give. */
.pd-refine { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.pd-refine[hidden] { display: none; }
.pd-pick { display: grid; gap: 3px; min-width: 0; }
.pd-pick span { font-size: 12px; color: var(--ink-3); padding-left: 2px; }
.pd-pick select {
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); max-width: 230px;
  background: var(--paper); border: 1px solid var(--rule-2); border-radius: 8px; padding: 7px 30px 7px 11px; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b5245' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.pd-pick select:hover { border-color: var(--ink); }
.pd-pick select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pd-pick.is-set select { background-color: var(--board); color: var(--cream); border-color: var(--board); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f6f0e3' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
.pd-pick.is-set select option { background: var(--paper); color: var(--ink); }
.pd-pick-sort { margin-left: auto; }
/* Shelves or catalogue. */
.pd-view { display: inline-flex; border: 1px solid var(--rule-2); border-radius: 8px; overflow: hidden; }
.pd-view button { font: inherit; font-size: 14px; font-weight: 500; color: var(--ink-2); background: var(--paper); border: none; padding: 7px 13px; cursor: pointer; }
.pd-view button + button { border-left: 1px solid var(--rule-2); }
.pd-view button:hover { color: var(--ink); }
.pd-view button[aria-pressed="true"] { background: var(--board); color: var(--cream); font-weight: 600; }
.pd-view button:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }

/* The catalogue: one ruled line per title on a paper ledger, every fact in its column. */
.pd-cat { display: grid; margin: 0 0 18px; background: var(--paper); border-top: 3px solid var(--board); border-radius: 0 0 3px 3px; box-shadow: 0 1px 0 var(--rule-2), 4px 4px 0 var(--linen-3); }
.pd-cat-head, .pd-line { display: grid; align-items: center; gap: 0 12px; padding: 7px 14px; }
.pd-cat-works { grid-template-columns: 8px minmax(0, 2.4fr) minmax(0, 1.3fr) 52px minmax(0, 0.8fr) minmax(0, 1fr) 64px 70px 70px 70px; }
.pd-cat-films { grid-template-columns: 8px minmax(0, 2.4fr) minmax(0, 1.3fr) 52px minmax(0, 0.8fr) minmax(0, 1fr) minmax(0, 1fr) 84px; }
.pd-cat-head { padding-top: 10px; padding-bottom: 9px; font-size: 12px; color: var(--ink-3); border-bottom: 1px solid var(--rule-2); }
.pd-cat-sort { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 0.22em; }
.pd-cat-sort:hover { color: var(--ink); }
.pd-cat-sort[aria-pressed="true"] { color: var(--ink); font-weight: 600; text-decoration: underline; }
.pd-cat-sort:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pd-line { width: 100%; font: inherit; font-size: 13.5px; color: var(--ink-2); background: none; border: none; border-bottom: 1px solid var(--rule); text-align: left; cursor: pointer; }
.pd-line:hover { background: var(--cream); }
.pd-line[aria-expanded="true"] { background: var(--linen-2); }
.pd-line:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.pd-sw { width: 8px; height: 24px; border-radius: 1px; background: var(--cloth); }
.pd-c-t { min-width: 0; }
.pd-c-t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); font-size: 16px; font-weight: 500; color: var(--ink); }
.pd-c-t small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--serif); font-size: 13px; font-style: italic; color: var(--ink-3); }
.pd-c-a, .pd-c-m { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-c-n { font-variant-numeric: tabular-nums; }
.pd-c-n.is-never { color: var(--ink-3); font-style: italic; }
.pd-y { font-family: var(--serif); font-size: 15.5px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.pd-y.is-open { color: var(--stage); }
.pd-y.is-later { color: var(--ink-3); }
.pd-y.is-none { font-family: var(--sans); font-size: 11.5px; color: var(--ink-3); }
.pd-y.is-mine { font-weight: 600; }
.pd-y.is-mine.is-soon { color: var(--ink); }
.pd-cat > [role="listitem"] { min-width: 0; }
.pd-cat > .pd-card { margin: 12px 14px 18px; }

/* ───────────────────── the shelves ───────────────────── */
.pd-shelves { margin-top: 34px; display: grid; gap: 34px; }
.pd-shelf { min-width: 0; }
.pd-plate { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin: 0 0 16px; }
.pd-plate h2 { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 28px); font-weight: 500; letter-spacing: -0.012em; line-height: 1.2; }
.pd-plate h2 small { display: inline; font-size: 0.72em; color: var(--ink-2); font-weight: 400; margin-left: 10px; font-style: italic; }
.pd-plate .pd-plate-n { font-size: 14px; color: var(--ink-2); }
.pd-plate .pd-plate-n b { color: var(--ink); font-weight: 600; }

/* One row of piles on one board. The board is the row's bottom border; a
   second, lighter line is its front edge and the shadow is the room's light.
   --piles comes from the script (as many piles as the shelf is wide). */
.pd-row {
  display: grid; grid-template-columns: repeat(var(--piles, 3), minmax(0, 1fr)); align-items: end; gap: 0 22px; padding: 0 14px;
  border-bottom: 12px solid var(--board); position: relative; margin-bottom: 30px;
}
.pd-row::before { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 3px; background: var(--board-edge); }
.pd-row::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: -22px; height: 10px; background: linear-gradient(var(--board-shadow), transparent); pointer-events: none; }
.pd-row:last-child { margin-bottom: 0; }
.pd-row.is-empty { min-height: 72px; display: block; }
.pd-row.is-empty + .pd-row.is-empty { margin-top: 26px; }

/* A pile: books lying flat, the first on top, sitting on the board. */
.pd-pile { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }

/* A book lying flat, its spine to the room: the title reads left to right,
   the author after it in small capitals. --lw (length by adaptations), --th
   (thickness) and --dx (the hand-stacked offset) come from the script; the
   colour from the form class. The two thin lines are the spine's head and
   tail bands. */
.pd-book {
  --cloth: var(--other);
  position: relative; display: block; flex: none; width: var(--lw, 80%); height: var(--th, 26px); max-width: 100%;
  margin: 0 0 1px; transform: translateX(var(--dx, 0));
  font: inherit; color: var(--cream); background: var(--cloth);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 38%, rgba(0, 0, 0, 0) 66%, rgba(0, 0, 0, 0.24));
  border: none; border-radius: 1px; padding: 0; cursor: pointer; text-align: left;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}
.pd-book:last-child { margin-bottom: 0; }
.pd-book::before, .pd-book::after { content: ""; position: absolute; top: 3px; bottom: 3px; width: 1px; background: rgba(246, 240, 227, 0.42); }
.pd-book::before { left: 6px; }
.pd-book::after { right: 6px; }
.pd-book.is-novel { --cloth: var(--novel); }
.pd-book.is-story { --cloth: var(--story); }
.pd-book.is-stage { --cloth: var(--stage); }
.pd-book.is-poem { --cloth: var(--poem); }
.pd-book.is-children { --cloth: var(--children); }
.pd-book.is-comic { --cloth: var(--comic); }
.pd-book.is-nonfiction { --cloth: var(--nonfiction); }
.pd-book.is-other { --cloth: var(--other); }
.pd-book-in, .pd-tape { position: absolute; inset: 0 13px; display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; }
.pd-book.has-stamp .pd-book-in { right: 28px; }
/* The title keeps its whole room and never shrinks for the author; the
   author takes what is left, right-aligned, and the script hides it when it
   does not fit whole. */
.pd-book-t {
  flex: 0 0 auto; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--serif); font-size: 14px; font-weight: 500; line-height: 1.15; letter-spacing: 0.005em; text-shadow: 0 0 1px rgba(0, 0, 0, 0.25);
}
.pd-book-a {
  flex: 1 1 0; min-width: 0; overflow: hidden; white-space: nowrap; text-align: right;
  font-size: 10px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; opacity: 0.74; line-height: 1;
}
.pd-book-a[hidden] { display: none; }
/* The dot at the end: never filmed. */
.pd-stamp {
  position: absolute; right: 12px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: var(--cream); box-shadow: inset 0 0 0 1.5px var(--cloth), 0 0 0 1px rgba(246, 240, 227, 0.5);
}
/* A film: a flat can, charcoal and ridged, with a strip of tape for its label. */
.pd-book.is-film {
  --cloth: var(--film);
  border-radius: 7px;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 30%, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.34)), repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 6px);
}
.pd-book.is-film::before, .pd-book.is-film::after { display: none; }
.pd-tape {
  inset: 4px 16px; padding: 0 9px; background: var(--tape); color: var(--ink); border-radius: 1px;
  box-shadow: 0 0 0 1px rgba(60, 45, 25, 0.12); gap: 8px;
}
.pd-tape .pd-book-t { font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-shadow: none; }
.pd-tape .pd-book-a { font-size: 10px; color: var(--ink-2); opacity: 1; letter-spacing: 0.04em; }
/* Pulled from the pile. */
.pd-book:hover, .pd-book:focus-visible, .pd-book[aria-expanded="true"] {
  transform: translateX(calc(var(--dx, 0px) + 10px)); z-index: 2;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.22), 0 6px 10px -6px rgba(40, 25, 10, 0.55);
}
.pd-book:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pd-book[aria-expanded="true"] { outline: 2px solid var(--ink); outline-offset: 1px; }

/* The rest of a long shelf waits behind a button on the board. */
.pd-more { display: flex; justify-content: flex-end; margin: -14px 0 0; }
.pd-more button {
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: var(--paper); border: 1px solid var(--rule-2);
  border-radius: 999px; padding: 6px 14px; cursor: pointer;
}
.pd-more button:hover { color: var(--ink); border-color: var(--ink); }
.pd-more button:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.pd-shelf-empty { margin: 0; padding: 22px 16px 0; font-size: 15.5px; color: var(--ink-2); line-height: 1.55; font-style: italic; font-family: var(--serif); font-size: 18px; }
.pd-shelf-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 18px 0 0; }
.pd-shelf-foot .pd-btn { padding: 8px 14px; font-size: 13.5px; }

.pd-count { margin: 26px 0 0; font-size: 15.5px; line-height: 1.6; color: var(--ink-2); max-width: 72ch; }
.pd-count b { color: var(--ink); font-weight: 600; }

.pd-key { margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; color: var(--ink-2); }
.pd-key span { display: inline-flex; align-items: center; gap: 9px; }
.pd-key i { display: inline-block; flex: none; }
.pd-k-long { width: 34px; height: 7px; background: var(--novel); border-radius: 1px; box-shadow: -6px -9px 0 0 var(--story), 4px 9px 0 -1px var(--stage); margin: 9px 6px 9px 10px; }
.pd-k-stamp { width: 9px; height: 9px; border-radius: 50%; background: var(--cream); box-shadow: inset 0 0 0 1.5px var(--novel), 0 0 0 1px var(--rule-2); }
.pd-k-film { width: 30px; height: 12px; background: var(--film); border-radius: 4px; background-image: linear-gradient(var(--tape), var(--tape)); background-size: 18px 6px; background-position: center; background-repeat: no-repeat; }

/* ───────────────────── share ───────────────────── */
.pd-share { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.pd-btn {
  display: inline-flex; align-items: center; gap: 9px; font: inherit; font-size: 14.5px; font-weight: 600;
  color: var(--ink); background: transparent; border: 1px solid var(--rule-2); border-radius: 999px;
  padding: 10px 18px; cursor: pointer;
}
.pd-btn:hover { border-color: var(--ink); }
.pd-btn:disabled { opacity: 0.6; cursor: default; }
.pd-btn-ink { background: var(--board); color: var(--cream); border-color: var(--board); }
.pd-btn-ink:hover { background: var(--ink); border-color: var(--ink); }
.pd-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.pd-reset { color: var(--ink-2); border-style: dashed; }
.pd-reset[hidden] { display: none; }
.pd-share-note { font-size: 14px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; min-height: 20px; }
.pd-share-note svg { color: var(--stage); }

/* ───────────────────── the open book ───────────────────── */
.pd-card {
  position: relative; margin: 10px 0 30px; padding: 24px 56px 24px 26px; background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule-2); border-left: 10px solid var(--cloth, var(--other)); border-radius: 3px;
  box-shadow: 4px 4px 0 var(--linen-3); max-width: 760px;
}
.pd-card[hidden] { display: none; }
.pd-card-close {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; display: grid; place-items: center;
  font: inherit; color: var(--ink-2); background: transparent; border: 1px solid transparent; border-radius: 50%; cursor: pointer;
}
.pd-card-close:hover { color: var(--ink); border-color: var(--rule-2); }
.pd-card-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pd-card-form { margin: 0; font-size: 13px; font-weight: 600; color: var(--cloth, var(--ink-2)); }
.pd-card-title { margin: 4px 0 0; font-family: var(--serif); font-size: clamp(24px, 2.6vw, 32px); font-weight: 500; line-height: 1.15; letter-spacing: -0.014em; }
.pd-card-orig { margin: 4px 0 0; font-family: var(--serif); font-size: 18px; font-style: italic; color: var(--ink-2); }
.pd-card-orig[hidden] { display: none; }
.pd-card-by { margin: 8px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.pd-card-by b { color: var(--ink); font-weight: 600; }
/* Set in, characters, about, running time. */
.pd-card-facts { margin: 16px 0 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 18px; }
.pd-card-facts[hidden] { display: none; }
.pd-card-facts div { display: contents; }
.pd-card-facts dt { margin: 0; padding-top: 2px; font-size: 12.5px; color: var(--ink-3); }
.pd-card-facts dd { margin: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
.pd-card-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.pd-card-share .pd-btn { padding: 7px 13px; font-size: 13.5px; }
/* Its language, genres and countries: each a button that narrows the shelves to its kind. */
.pd-card-tags { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pd-card-tags[hidden] { display: none; }
.pd-tag {
  font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2); background: var(--linen);
  border: 1px solid var(--rule); border-radius: 999px; padding: 4px 11px; cursor: pointer;
}
.pd-tag:hover { color: var(--ink); border-color: var(--ink); }
.pd-tag:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pd-card-rules { margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.pd-card-rules div { min-width: 0; }
.pd-card-rules dt { font-size: 12.5px; color: var(--ink-3); margin: 0; }
.pd-card-rules dd { margin: 2px 0 0; font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pd-card-rules dd.is-open { color: var(--stage); }
.pd-card-rules dd.is-soon { color: var(--ink); }
.pd-card-rules dd.is-later { color: var(--ink-3); }
.pd-card-rules dd small { display: block; font-family: var(--sans); font-size: 12.5px; font-weight: 400; color: var(--ink-3); margin-top: 3px; line-height: 1.35; }
.pd-card-screen { margin: 18px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }
.pd-card-screen b { color: var(--ink); font-weight: 600; }
.pd-card-screen ul { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.pd-card-screen li { white-space: nowrap; }
.pd-card-screen li small { color: var(--ink-3); margin-left: 4px; }
.pd-card-links { margin: 14px 0 0; font-size: 13.5px; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pd-card-links a { color: var(--ink-2); font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 0.18em; }
.pd-card-links a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ───────────────────── the chapters ───────────────────── */
.pd-chapters { padding: 24px 0 40px; }
.pd-ch { padding: 48px 0 10px; border-top: 1px solid var(--rule-2); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px 56px; align-items: start; }
.pd-ch-head { grid-column: 1; font-family: var(--serif); font-size: clamp(26px, 2.8vw, 34px); font-weight: 500; letter-spacing: -0.016em; line-height: 1.15; margin: 0; text-wrap: balance; }
.pd-ch-body { grid-column: 1; font-size: 16px; line-height: 1.65; color: var(--ink-2); margin: 0; max-width: 54ch; }
.pd-ch-chart { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
.pd-ch-foot { margin: 14px 0 0; font-size: 13px; color: var(--ink-3); line-height: 1.5; }

/* Forms: two stacks of little books, one per rule. */
.pd-stacks { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 36px; }
.pd-stack h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.pd-stack ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.pd-stack li { display: grid; grid-template-columns: 128px minmax(0, 1fr) 40px; align-items: center; gap: 0 10px; font-size: 14px; }
.pd-stack li span { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-stack li i { display: block; height: 14px; background: var(--cloth, var(--other)); border-radius: 1px; width: var(--w); min-width: 2px; background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.18)); }
.pd-stack li b { font-family: var(--serif); font-size: 18px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
/* Languages and genres: the same rows as buttons that put those works on the shelves. */
.pd-stack li:has(> .pd-bar) { display: block; }
.pd-bar {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 40px; align-items: center; gap: 0 10px; width: 100%;
  font: inherit; font-size: 14px; color: inherit; background: none; border: none; padding: 2px 0; cursor: pointer; text-align: left; border-radius: 3px;
}
.pd-stack .pd-bar span { color: var(--ink-2); line-height: 1.25; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.pd-bar i { display: block; height: 14px; background: var(--board); border-radius: 1px; width: var(--w); min-width: 2px; background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.18)); }
.pd-bar b { font-family: var(--serif); font-size: 18px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
.pd-stack .pd-bar:hover span, .pd-stack .pd-bar:focus-visible span { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 0.16em; }
.pd-bar:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Unfilmed and filmed: lists of titles. */
.pd-titles { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.pd-titles li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: baseline; gap: 0 12px; font-size: 15px; line-height: 1.4; }
.pd-titles li i { display: block; width: 8px; height: 20px; align-self: center; background: var(--cloth, var(--other)); border-radius: 1px; }
.pd-titles li .pd-t { min-width: 0; }
.pd-titles li .pd-t button {
  font: inherit; font-family: var(--serif); font-size: 17px; font-weight: 500; color: var(--ink); background: none; border: none; padding: 0; cursor: pointer; text-align: left;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.16em;
}
.pd-titles li .pd-t button:hover, .pd-titles li .pd-t button:focus-visible { text-decoration-color: var(--rule-2); outline: none; }
.pd-titles li .pd-t small { display: block; font-size: 13px; color: var(--ink-2); }
.pd-titles li .pd-n { font-family: var(--serif); font-size: 18px; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-titles li .pd-n small { font-family: var(--sans); font-size: 12px; color: var(--ink-3); margin-left: 4px; }

/* Authors: two columns of names with their counts as little rows of spines. */
.pd-names { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px 36px; }
.pd-names h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.pd-names ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.pd-names li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; font-size: 15px; align-items: baseline; }
.pd-names li .pd-a { font-family: var(--serif); font-size: 17px; font-weight: 500; }
.pd-names li .pd-a small { font-family: var(--sans); font-size: 12.5px; color: var(--ink-3); margin-left: 6px; font-weight: 400; }
.pd-names li .pd-books { grid-column: 1 / -1; display: flex; gap: 2px; }
.pd-names li .pd-books i { display: block; width: 7px; height: 16px; background: var(--cloth, var(--other)); border-radius: 1px; }
.pd-names li .pd-n { font-family: var(--serif); font-size: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Places: a chapter whose chart runs the full width under its text. */
.pd-ch-wide .pd-ch-head { grid-column: 1; grid-row: 1; }
.pd-ch-wide .pd-ch-body { grid-column: 2; grid-row: 1; align-self: end; }
.pd-ch-wide .pd-ch-chart { grid-column: 1 / -1; grid-row: 2; }
.pd-map { display: block; width: 100%; height: auto; background: var(--paper); border: 1px solid var(--rule); border-radius: 4px; }
.pd-land { fill: var(--linen-3); stroke: var(--paper); stroke-width: 0.8; vector-effect: non-scaling-stroke; }
.pd-dot { fill: rgba(90, 64, 48, 0.72); stroke: var(--paper); stroke-width: 1.2; cursor: pointer; vector-effect: non-scaling-stroke; }
.pd-dot.is-via { fill: rgba(251, 247, 238, 0.4); stroke: rgba(90, 64, 48, 0.8); stroke-width: 1.6; }
.pd-map-zoom { display: inline-flex; margin: 0 0 10px; border: 1px solid var(--rule-2); border-radius: 8px; overflow: hidden; }
.pd-map-zoom button { font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-2); background: var(--paper); border: none; padding: 6px 12px; cursor: pointer; }
.pd-map-zoom button + button { border-left: 1px solid var(--rule-2); }
.pd-map-zoom button[aria-pressed="true"] { background: var(--board); color: var(--cream); font-weight: 600; }
.pd-map-zoom button:focus-visible { outline: 2px solid var(--ink); outline-offset: -3px; }
.pd-dot:hover, .pd-dot:focus-visible, .pd-dot.is-on { fill: var(--novel); stroke: var(--ink); outline: none; }
.pd-place-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pd-place-chip {
  font: inherit; font-size: 13px; font-weight: 500; color: var(--ink-2); background: var(--paper);
  border: 1px solid var(--rule-2); border-radius: 999px; padding: 4px 11px; cursor: pointer;
}
.pd-place-chip small { color: var(--ink-3); font-weight: 400; margin-left: 2px; }
.pd-place-chip:hover { color: var(--ink); border-color: var(--ink); }
.pd-place-chip.is-on { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.pd-place-chip.is-on small { color: rgba(246, 240, 227, 0.72); }
.pd-place-chip:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pd-place-list h3 { margin: 22px 0 12px; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.pd-place-list:empty { display: none; }
.pd-place-list .pd-titles { columns: 2 320px; column-gap: 40px; display: block; }
.pd-place-list .pd-titles li { break-inside: avoid; margin-bottom: 9px; }

/* Characters: name, the work and the rule years. */
.pd-chars { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.pd-chars li { font-size: 15px; line-height: 1.45; color: var(--ink-2); padding-left: 16px; border-left: 3px solid var(--cloth, var(--other)); }
.pd-chars li b { font-family: var(--serif); font-size: 17px; font-weight: 500; color: var(--ink); }

/* ───────────────────── the rules and about ───────────────────── */
.pd-rules, .pd-about { padding-top: 56px; border-top: 1px solid var(--rule-2); }
.pd-rules h2, .pd-about h2 { font-family: var(--serif); font-size: clamp(30px, 3.6vw, 42px); font-weight: 500; letter-spacing: -0.018em; margin: 0; }
.pd-rules .intro { color: var(--ink-2); }
.pd-rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 48px; margin-top: 28px; }
.pd-rules h3 { font-size: 17px; font-weight: 600; margin: 0; padding-top: 12px; border-top: 3px solid var(--board); }
.pd-rules p { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); margin: 10px 0 0; }
.pd-rules-note { font-size: 15.5px; line-height: 1.65; color: var(--ink-2); margin: 28px 0 0; max-width: 72ch; padding: 16px 20px; background: var(--paper); border: 1px solid var(--rule); border-radius: 3px; }
.pd-about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 56px; margin-top: 6px; }
.pd-about h3 { font-size: 17px; font-weight: 600; margin: 26px 0 0; }
.pd-about p, .pd-about li { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.pd-about p { margin: 10px 0 0; max-width: 62ch; }
.pd-about ul { margin: 12px 0 0; padding: 0 0 0 18px; }
.pd-about li { margin: 6px 0 0; }
.pd-about li strong { color: var(--ink); font-weight: 600; }
.pd-about a:not(.btn), .pd-rules a { color: var(--stage); font-weight: 600; }
.pd-about a:not(.btn):hover, .pd-rules a:hover { text-decoration: underline; }
.pd-about p.pd-download { margin-top: 24px; }
.pd-about p.pd-small { font-size: 14px; color: var(--ink-3); }

/* The base's buttons on linen. */
.pd .btn-primary { background: var(--board); color: var(--cream); box-shadow: none; }
.pd .btn-primary:hover { background: var(--ink); box-shadow: none; }
.pd .btn-ghost:hover { border-color: var(--ink); }
.pd .pitch { background: var(--paper); border-color: var(--rule); }
.pd .pitch li svg { color: var(--stage); }
.pd .pitch .btn:focus-visible, .pd-about .btn:focus-visible { outline-color: var(--ink); }
.pd .section h2 { font-family: var(--serif); font-weight: 500; }

/* ───────────────────── narrow screens ───────────────────── */
@media (max-width: 900px) {
  .pd-ch { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .pd-ch-chart { grid-column: 1; grid-row: auto; margin-top: 8px; }
  .pd-about-grid, .pd-rules-grid { grid-template-columns: minmax(0, 1fr); }
  .pd-find { margin-left: 0; flex-basis: 100%; }
  .pd-find input { width: 100%; }
  .pd-pick-sort { margin-left: 0; }
  .pd-ch-wide .pd-ch-body { grid-column: 1; grid-row: auto; }
  .pd-ch-wide .pd-ch-chart { grid-row: auto; }
  /* The catalogue keeps the title, the author and this rule's year. */
  .pd-cat-head { display: none; }
  .pd-cat-works, .pd-cat-films { grid-template-columns: 8px minmax(0, 1fr) auto; row-gap: 2px; }
  .pd-line .pd-sw { grid-row: span 2; align-self: stretch; height: auto; }
  .pd-line .pd-c-t { grid-column: 2; grid-row: 1; }
  .pd-line .pd-c-a { grid-column: 2; grid-row: 2; font-size: 12.5px; }
  .pd-line .pd-c-n, .pd-line .pd-c-m, .pd-line .pd-y { display: none; }
  .pd-line .pd-y.is-mine { display: block; grid-column: 3; grid-row: 1 / span 2; }
}

/* Phones: one pile a board (the script asks for it), the choosers two to a row. */
@media (max-width: 640px) {
  .pd-hero { grid-template-columns: minmax(0, 1fr); }
  /* The calendar as a small leaf beside its words, not a whole screen. */
  .pd-cal {
    justify-self: start; width: auto; margin: 6px 0 0 4px; padding: 0 18px 0 0; transform: rotate(-1.5deg);
    grid-template-columns: 84px auto; grid-template-areas: "m y" "d l" "d n"; justify-items: start; align-items: center; column-gap: 14px; text-align: left;
  }
  .pd-cal-rings::before { left: 18px; }
  .pd-cal-rings::after { right: auto; left: 56px; }
  .pd-cal-month { grid-area: m; width: 84px; padding: 11px 0 6px; border-radius: 6px 0 0 0; font-size: 11px; text-align: center; }
  .pd-cal-day { grid-area: d; width: 84px; margin: 0; padding: 2px 0 10px; font-size: 56px; text-align: center; }
  .pd-cal-year { grid-area: y; padding-top: 6px; font-size: 18px; }
  .pd-cal-left { grid-area: l; margin: 2px 0 0; }
  .pd-cal-name { grid-area: n; margin: 4px 0 10px; }
  .pd-cover { width: 128px; }
  .pd-cover.is-short .pd-cover-t { font-size: 20px; }
  .pd-cover.is-mid .pd-cover-t { font-size: 16px; }
  .pd-cover.is-long .pd-cover-t { font-size: 14px; }
  .pd-cover.is-longer .pd-cover-t { font-size: 12.5px; }
  .pd-covers { gap: 18px; padding: 24px 14px 0; }
  .pd-refine { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-refine[hidden] { display: none; }
  .pd-pick select { max-width: none; width: 100%; }
  .pd-row { padding: 0 8px; }
  .pd-bar { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 36px; }
  .pd-room { padding: 40px 0 40px; }
  .pd-lede { font-size: 16.5px; }
  .pd-headline { margin-top: 30px; font-size: 21px; }
  .pd-where { width: 100%; }
  .pd-where-btn { flex: 1 1 45%; padding: 9px 12px; font-size: 13.5px; border-bottom: 1px solid var(--rule-2); }
  .pd-where-btn:nth-child(n+3) { border-bottom: none; }
  .pd-where-btn:nth-child(2n) { border-right: none; }
  .pd-shelves { gap: 30px; }
  .pd-card { padding: 20px 48px 20px 18px; }
  .pd-card-rules dd { font-size: 21px; }
  .pd-stack li { grid-template-columns: 100px minmax(0, 1fr) 36px; }
  .pd-share .pd-btn { flex: 1 1 100%; justify-content: center; }
  .pd-key { font-size: 12.5px; gap: 6px 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .pd-chip, .pd-where-btn, .pd-btn { transition: background 0.15s, color 0.15s, border-color 0.15s; }
  .pd-book { transition: transform 0.12s; }
  .pd-cover { transition: transform 0.18s, box-shadow 0.18s; }
  /* Re-shelving: the books slide in pile by pile, the catalogue lines fade in. */
  .pd-shelves.is-fresh .pd-book { animation: pd-shelve 0.34s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 11ms); }
  .pd-shelves.is-fresh .pd-line { animation: pd-fade 0.24s ease-out both; }
  @keyframes pd-shelve { from { opacity: 0; translate: -18px 0; } to { opacity: 1; translate: 0 0; } }
  @keyframes pd-fade { from { opacity: 0; } to { opacity: 1; } }
}
