:root {
  --interaction-surface: #f8f3e9;
  --interaction-surface-raised: #fffdf7;
  --interaction-ink: var(--ink, #17212a);
  --interaction-muted: #58636a;
  --interaction-border: rgba(23, 33, 42, 0.2);
  --interaction-border-strong: rgba(23, 33, 42, 0.42);
  --interaction-accent: var(--pilot-blue, #182c3a);
  --interaction-accent-soft: #dfe5e5;
  --interaction-like: #9b5047;
  --interaction-save: #68745f;
  --interaction-radius-sm: 0.22rem;
  --interaction-radius-md: 0.45rem;
  --interaction-shadow: 0 1.2rem 3.5rem rgba(17, 27, 34, 0.24);
  --interaction-control-height: 2.65rem;
  --interaction-focus: 0 0 0 3px rgba(96, 122, 141, 0.32);
}

.family-wall-instruction {
  max-width: 40rem;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.55;
}

.family-wall-invitation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: -2.5rem 0 3rem;
  padding: 1rem 0;
  border-top: 1px solid var(--interaction-border);
  border-bottom: 1px solid var(--interaction-border);
}

.wall-share-button {
  flex: 0 0 auto;
  min-height: 2.7rem;
  padding: 0.68rem 0.85rem;
  border: 1px solid var(--pilot-blue);
  background: var(--pilot-blue);
  color: var(--pilot-cream);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.wall-share-button:hover,
.wall-share-button:focus-visible {
  background: transparent;
  color: var(--pilot-blue);
}

.family-people-registry {
  display: block;
  margin: 0 0 clamp(3rem, 7vw, 5.5rem);
  border: 1px solid var(--interaction-border);
  background: rgba(248, 243, 233, 0.52);
}

.family-people-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  min-height: 4rem;
  align-items: center;
  padding: 0.85rem clamp(1rem, 2.5vw, 1.5rem);
  color: var(--interaction-ink);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  list-style: none;
  text-transform: uppercase;
}

.family-people-summary::-webkit-details-marker {
  display: none;
}

.family-people-summary > span:last-child {
  max-width: min(44vw, 34rem);
  overflow: hidden;
  color: var(--interaction-muted);
  font-size: 0.61rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.family-people-summary::after {
  width: 1.65rem;
  content: "⌄";
  color: var(--interaction-muted);
  font-size: 1rem;
  font-weight: 400;
  text-align: center;
  transition: transform 160ms ease;
}

.family-people-registry[open] > .family-people-summary {
  border-bottom: 1px solid var(--interaction-border);
}

.family-people-registry[open] > .family-people-summary::after {
  transform: rotate(180deg);
}

.family-people-summary:hover,
.family-people-summary:focus-visible {
  background: rgba(223, 229, 229, 0.44);
}

.family-people-summary:focus-visible {
  outline: none;
  box-shadow: var(--interaction-focus);
}

.family-people-registry-body {
  display: grid;
  grid-template-columns: minmax(14rem, 0.72fr) minmax(18rem, 1.28fr);
  gap: 1.4rem clamp(1.5rem, 4vw, 4rem);
  padding: clamp(1.2rem, 3vw, 2rem);
}

.family-people-registry .portrait-carousel {
  margin-bottom: 0;
  padding-top: 0.35rem;
  padding-bottom: 1.25rem;
}

.family-people-copy h3 {
  margin: 0.45rem 0 0.65rem;
  font-size: clamp(1.8rem, 3.2vw, 2.7rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.family-people-copy > p:last-child {
  max-width: 28rem;
  margin: 0;
  color: var(--interaction-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.family-person-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-content: start;
  font-family: var(--sans);
}

.family-person-form .family-field {
  grid-column: 1 / -1;
}

.family-self-choice {
  display: inline-flex;
  min-height: var(--interaction-control-height);
  align-items: center;
  gap: 0.5rem;
  color: var(--interaction-muted);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
}

.family-self-choice input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--interaction-accent);
}

.family-person-add {
  min-height: var(--interaction-control-height);
  padding: 0.65rem 1rem;
  border: 1px solid var(--interaction-accent);
  border-radius: var(--interaction-radius-sm);
  background: var(--interaction-accent);
  color: #fffdf7;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.family-person-list {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0.25rem 0 0;
  list-style: none;
}

.family-person-chip,
.family-person-empty {
  font-family: var(--sans);
  font-size: 0.68rem;
}

.family-person-chip {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--interaction-border);
  border-radius: 2rem;
  background: var(--interaction-surface-raised);
}

.family-person-chip small {
  color: var(--interaction-muted);
  font-size: 0.55rem;
}

.family-person-chip em {
  padding: 0.08rem 0.3rem;
  border-radius: 2rem;
  background: var(--interaction-accent-soft);
  color: var(--interaction-accent);
  font-size: 0.52rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.family-person-name {
  font-weight: 700;
}

.family-person-action {
  min-height: 1.55rem;
  padding: 0.15rem 0.4rem;
  border: 0;
  border-left: 1px solid var(--interaction-border);
  outline: none;
  background: transparent;
  color: var(--interaction-muted);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.55rem;
  font-weight: 700;
}

.family-person-action:hover,
.family-person-action:focus-visible {
  color: var(--interaction-accent);
}

.family-person-action:focus-visible {
  box-shadow: var(--interaction-focus);
}

.family-person-action--delete:hover,
.family-person-action--delete:focus-visible {
  color: var(--interaction-like);
}

.family-person-editor {
  flex: 1 1 100%;
  padding: 0.8rem;
  border: 1px solid var(--interaction-border-strong);
  background: var(--interaction-surface-raised);
}

.family-person-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: end;
  font-family: var(--sans);
}

.family-person-edit-form .family-self-choice {
  align-self: end;
}

.family-person-edit-actions {
  display: flex;
  gap: 0.4rem;
}

.family-person-cancel,
.family-person-save {
  min-height: var(--interaction-control-height);
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--interaction-border-strong);
  border-radius: var(--interaction-radius-sm);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.family-person-cancel {
  background: transparent;
  color: var(--interaction-muted);
}

.family-person-save {
  border-color: var(--interaction-accent);
  background: var(--interaction-accent);
  color: #fffdf7;
}

.family-person-cancel:focus-visible,
.family-person-save:focus-visible {
  box-shadow: var(--interaction-focus);
}

.family-person-empty {
  color: var(--interaction-muted);
  font-style: italic;
}

.portrait-face-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.portrait-card {
  width: clamp(16rem, 22vw, 21rem);
  cursor: default;
}

.portrait-carousel-track {
  grid-auto-columns: max-content;
}

.portrait-card:hover .portrait-face-button picture,
.portrait-face-button:focus-visible picture {
  border-color: #ffffff;
}

.portrait-card--empty {
  width: clamp(7.25rem, 9vw, 9rem);
}

.portrait-card--empty .portrait-card-placeholder {
  aspect-ratio: 1;
  border-width: 0.2rem;
  box-shadow: none;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

.portrait-card--empty .portrait-card-person {
  margin-top: 0.4rem;
  font-size: 0.56rem;
}

.portrait-card--empty .portrait-card-caption {
  margin-top: 0.14rem;
  font-size: 0.62rem;
  line-height: 1.25;
}

.portrait-face-button:focus-visible {
  box-shadow: var(--interaction-focus);
}

.portrait-face-prompt {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  padding: 0.45rem 0.58rem;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(15, 31, 42, 0.82);
  color: #fffdf7;
  font-family: var(--sans);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portrait-name-picker {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.55rem;
  padding: 0.7rem;
  border: 1px solid var(--interaction-border-strong);
  background: var(--interaction-surface-raised);
  font-family: var(--sans);
}

.portrait-name-picker > p {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
}

.portrait-name-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.portrait-name-option,
.portrait-add-person,
.portrait-name-save,
.portrait-open-artwork {
  min-height: 2rem;
  padding: 0.38rem 0.58rem;
  border: 1px solid var(--interaction-border);
  border-radius: 2rem;
  outline: none;
  background: transparent;
  color: var(--interaction-muted);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 700;
}

.portrait-name-option {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
}

.portrait-name-option input {
  width: 0.82rem;
  height: 0.82rem;
  margin: 0;
  accent-color: var(--interaction-accent);
}

.portrait-name-option:has(input:checked) {
  border-color: var(--interaction-accent);
  background: var(--interaction-accent);
  color: #fffdf7;
}

.portrait-name-form {
  display: grid;
  gap: 0.6rem;
}

.portrait-profile-field {
  display: grid;
  gap: 0.3rem;
  color: var(--interaction-muted);
  font-size: 0.58rem;
  font-weight: 700;
}

.portrait-profile-field select {
  min-height: 2.2rem;
  width: 100%;
  border: 1px solid var(--interaction-border);
  border-radius: 0;
  background: var(--interaction-surface-raised);
  color: var(--interaction-ink);
  font: inherit;
}

.portrait-name-save {
  border-color: var(--interaction-accent);
  background: var(--interaction-accent);
  color: #fffdf7;
}

.portrait-name-option:hover,
.portrait-name-option:focus-visible,
.portrait-add-person:hover,
.portrait-add-person:focus-visible,
.portrait-name-save:hover,
.portrait-name-save:focus-visible,
.portrait-open-artwork:hover,
.portrait-open-artwork:focus-visible {
  border-color: var(--interaction-border-strong);
  color: var(--interaction-ink);
}

.portrait-name-option:focus-visible,
.portrait-add-person:focus-visible,
.portrait-name-save:focus-visible,
.portrait-open-artwork:focus-visible {
  box-shadow: var(--interaction-focus);
}

.portrait-card-footer {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.65rem;
}

.portrait-card-footer .portrait-card-caption {
  flex: 1 1 auto;
}

.portrait-open-artwork {
  flex: 0 0 auto;
  min-height: 1.8rem;
  margin-top: 0.45rem;
  border-radius: var(--interaction-radius-sm);
}

.portrait-card-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.portrait-card--empty .portrait-change-photo {
  margin-top: 0.5rem;
}

/* An empty card widens while its chooser is open, so the grid has room. */
.portrait-card--empty:has(.portrait-photo-chooser) {
  width: clamp(16rem, 22vw, 21rem);
}

.portrait-photo-chooser {
  width: 100%;
}

.portrait-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.portrait-choice-grid .family-person-empty {
  grid-column: 1 / -1;
}

.portrait-choice {
  position: relative;
  display: block;
  padding: 0;
  border: 2px solid transparent;
  outline: none;
  background: transparent;
  cursor: pointer;
}

.portrait-choice picture,
.portrait-choice img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.portrait-choice:hover,
.portrait-choice:focus-visible {
  border-color: var(--interaction-border-strong);
}

.portrait-choice:focus-visible {
  box-shadow: var(--interaction-focus);
}

.portrait-choice[aria-pressed="true"] {
  border-color: var(--interaction-accent);
}

.portrait-choice[aria-pressed="true"]::after {
  position: absolute;
  right: 0.2rem;
  bottom: 0.2rem;
  padding: 0.1rem 0.35rem;
  background: var(--interaction-accent);
  color: #fffdf7;
  content: "✓";
  font-size: 0.6rem;
  font-weight: 700;
}

.portrait-choice-more {
  justify-self: start;
}

/* Editorial wall composition */
.finished-grid {
  display: block;
  columns: auto;
}

.family-wall-continuous-grid,
.family-event-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(1.4rem, 3vw, 3.4rem) clamp(1rem, 2.2vw, 2rem);
  align-items: start;
}

.family-wall-continuous-grid > .finished-item,
.family-event-grid > .finished-item {
  display: block;
  width: auto;
  margin: 0;
}

.family-wall-span-2 {
  grid-column: span 2;
}

.family-wall-span-3 {
  grid-column: span 3;
}

.family-wall-span-4 {
  grid-column: span 4;
}

.family-wall-span-6 {
  grid-column: 1 / -1;
}

.family-wall-span-2.family-wall-center {
  grid-column: 3 / span 2;
}

.family-event-sequence {
  grid-column: 1 / -1;
  padding: clamp(0.75rem, 2vw, 1.2rem) 0 0;
  border-top: 1px solid rgba(168, 117, 62, 0.42);
}

.family-event-link {
  margin: 0 0 0.9rem;
  color: #886137;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.family-wall-span-4 > picture img,
.family-wall-span-6 > picture img {
  width: 100%;
}

.finished-collection {
  position: relative;
  width: min(95vw, 110rem);
}

.finished-collection::before {
  position: absolute;
  z-index: -1;
  inset: 18rem -6vw 0;
  content: "";
  background:
    linear-gradient(
      180deg,
      rgba(91, 126, 144, 0.055) 0%,
      rgba(91, 126, 144, 0.018) 28%,
      rgba(187, 145, 82, 0.045) 46%,
      rgba(111, 121, 109, 0.038) 70%,
      rgba(240, 234, 223, 0) 100%
    );
  pointer-events: none;
}

.finished-item picture.family-artwork-trigger {
  position: relative;
  cursor: zoom-in;
  outline: none;
}

.family-wall-continuous-grid > .finished-item,
.family-event-grid > .finished-item {
  padding: clamp(0.35rem, 0.8vw, 0.6rem);
  background: #fbf8f1;
  box-shadow: 0 0.8rem 2.2rem rgba(23, 33, 42, 0.1);
}

.finished-item picture.family-artwork-trigger::after {
  position: absolute;
  right: 0.7rem;
  bottom: 0.7rem;
  padding: 0.45rem 0.55rem;
  content: "View";
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(15, 31, 42, 0.76);
  color: #fffdf7;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0;
  text-transform: uppercase;
  transform: translateY(0.25rem);
  transition: opacity 160ms ease, transform 160ms ease;
}

.finished-item picture.family-artwork-trigger:hover::after,
.finished-item picture.family-artwork-trigger:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.finished-item picture.family-artwork-trigger:focus-visible img {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.finished-item figcaption,
.family-dialog-title {
  cursor: text;
  text-decoration-color: transparent;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.24em;
  transition: text-decoration-color 140ms ease;
}

.finished-item figcaption:hover,
.family-dialog-title:hover {
  text-decoration-color: rgba(23, 33, 42, 0.42);
}

.finished-item figcaption:focus-visible,
.family-dialog-title:focus-visible {
  outline: none;
  box-shadow: var(--interaction-focus);
}

.finished-item figcaption.is-inline-editing,
.family-dialog-title.is-inline-editing {
  min-height: 1.2em;
  padding: 0.08em 0.14em;
  outline: 1px solid var(--interaction-border-strong);
  background: rgba(255, 253, 247, 0.86);
  box-shadow: var(--interaction-focus);
  cursor: text;
  text-decoration: none;
  white-space: pre-wrap;
}

.family-metadata {
  margin-top: 0.75rem;
  border-top: 1px solid var(--interaction-border);
  border-bottom: 1px solid var(--interaction-border);
  font-family: var(--sans);
}

.family-metadata summary {
  display: flex;
  min-height: var(--interaction-control-height);
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  list-style: none;
}

.family-metadata summary::-webkit-details-marker {
  display: none;
}

.family-metadata summary::after {
  content: "+";
  color: var(--interaction-muted);
  font-size: 1rem;
  font-weight: 400;
}

.family-metadata[open] summary::after {
  content: "−";
}

.family-artwork-controls {
  position: relative;
  display: block;
  margin-top: 0.65rem;
  border-top: 1px solid var(--interaction-border);
  font-family: var(--sans);
}

.family-question-card {
  display: grid;
  min-width: 0;
  gap: 0.9rem;
  margin-top: 1rem;
  padding: clamp(1rem, 2.4vw, 1.45rem);
  border: 1px solid rgba(23, 33, 42, 0.22);
  border-top: 0.38rem solid var(--interaction-accent);
  background: rgba(248, 243, 233, 0.88);
  color: var(--interaction-ink);
  font-family: var(--sans);
}

.family-question-header,
.family-question-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.family-question-footer {
  align-items: flex-end;
  flex-direction: column;
}

.family-question-kicker,
.family-question-count {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.family-question-count {
  color: var(--interaction-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
}

.family-question-prompt {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font: italic clamp(1.25rem, 2.2vw, 1.8rem)/1.08 var(--serif);
  letter-spacing: -0.025em;
}

.family-question-replies {
  display: grid;
  gap: 0.55rem;
}

.family-question-reply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.25rem 0.8rem;
  margin: 0;
  padding: 0.75rem;
  border-left: 2px solid var(--interaction-border-strong);
  background: rgba(255, 253, 247, 0.75);
}

.family-question-reply p {
  grid-column: 1 / -1;
  margin: 0;
  font: 0.88rem/1.45 var(--serif);
}

.family-question-reply cite {
  color: var(--interaction-muted);
  font-size: 0.62rem;
  font-style: normal;
}

.family-question-form {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
  grid-template-columns: minmax(6.5rem, 0.35fr) minmax(10rem, 1fr) auto;
  gap: 0.45rem;
}

.family-question-form input,
.family-question-form textarea {
  min-width: 0;
  padding: 0.65rem;
  border: 1px solid var(--interaction-border);
  border-radius: var(--interaction-radius-sm);
  background: var(--interaction-surface-raised);
  color: var(--interaction-ink);
  font: 0.72rem/1.35 var(--sans);
  resize: vertical;
}

.family-question-submit,
.family-question-share,
.family-book-approval {
  padding: 0.62rem 0.72rem;
  border: 1px solid var(--interaction-accent);
  border-radius: var(--interaction-radius-sm);
  background: transparent;
  color: var(--interaction-accent);
  cursor: pointer;
  font: 700 0.56rem/1 var(--sans);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.family-question-submit,
.family-book-approval.is-approved {
  background: var(--interaction-accent);
  color: #fffdf7;
}

.family-question-share {
  flex: 0 0 auto;
}

.family-comment .family-book-approval {
  margin-top: 0.55rem;
}

.book-family-memory-replies {
  display: grid;
  align-content: end;
  gap: 0.8rem;
  min-height: 0;
}

.book-family-memory-reply {
  margin: 0;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(23, 33, 42, 0.22);
}

.book-family-memory-reply p {
  margin: 0 0 0.35rem;
  font: italic clamp(0.88rem, 1.7vw, 1.2rem)/1.3 var(--serif);
}

.book-family-memory-reply cite {
  color: var(--ink-soft);
  font: 600 clamp(0.44rem, 0.75vw, 0.56rem)/1 var(--sans);
}

.book-page--section-facing {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: clamp(1.2rem, 4.5vw, 2.6rem);
  background: #e5ebe8;
  color: var(--ink);
}

.book-section-facing-heading {
  align-self: center;
}

.book-section-facing-kicker {
  display: block;
  margin-bottom: clamp(0.7rem, 2vw, 1.2rem);
  font: 700 clamp(0.46rem, 0.85vw, 0.62rem)/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-section-facing-title {
  max-width: 8em;
  margin: 0;
  font: italic clamp(2rem, 5.2vw, 3.8rem)/0.94 var(--serif);
  letter-spacing: -0.045em;
}

.book-section-facing-title--place {
  color: var(--pilot-blue);
}

.book-page--night .book-section-facing-title--place {
  color: var(--pilot-cream);
}

.book-section-facing-detail {
  max-width: 24em;
  margin: 0;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(23, 33, 42, 0.25);
  color: var(--ink-soft);
  font: clamp(0.55rem, 1vw, 0.72rem)/1.45 var(--sans);
}

.book-page--section-facing.book-section--beach {
  background: #ebe4d7;
}

.book-page--section-facing.book-section--yard-at-277,
.book-page--section-facing.book-section--house-at-277 {
  background: #dfe5dc;
}

.book-page--section-facing.book-section--inside-277 {
  background: #e8e1d7;
}

.book-page--section-facing.book-section--chatham-bars-inn,
.book-page--section-facing.book-section--edge-of-day {
  background: #dce7e6;
}

.book-page--section-opener {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: clamp(1.25rem, 4.5vw, 2.8rem);
  background: #e4ebe8;
  color: var(--ink);
}

.book-section-opener-heading {
  align-self: center;
}

.book-section-opener-kicker,
.book-section-opener-label,
.book-section-opener-place {
  font-family: var(--sans);
}

.book-section-opener-kicker,
.book-section-opener-label {
  font-size: clamp(0.46rem, 0.84vw, 0.62rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-section-opener-place {
  max-width: 15em;
  font-size: clamp(0.54rem, 1vw, 0.72rem);
  line-height: 1.45;
}

.book-section-opener-title {
  max-width: 8em;
  margin: clamp(0.8rem, 2vw, 1.3rem) 0;
  font: italic clamp(2.2rem, 5.5vw, 4rem)/0.92 var(--serif);
  letter-spacing: -0.05em;
}

.book-section-opener-rule {
  display: block;
  width: clamp(3.5rem, 10vw, 6rem);
  border-top: 1px solid currentColor;
}

.book-page--section-opener.book-section--beach {
  background: #ebe4d7;
}

.book-page--section-opener.book-section--yard-at-277,
.book-page--section-opener.book-section--house-at-277 {
  background: #dfe5dc;
}

.book-page--section-opener.book-section--inside-277 {
  background: #e8e1d7;
}

.book-page--section-opener.book-section--chatham-bars-inn,
.book-page--section-opener.book-section--edge-of-day,
.book-page--section-opener.book-section--oyster-pond {
  background: #dce7e6;
}

.book-page--section-opener.book-section--sunset {
  background: #ddd5ca;
}

.book-page--section-opener.book-section--bandstand {
  background: #112430;
  color: #f5efe2;
}

.family-toolbox {
  display: block;
  min-width: 0;
  margin: 0;
  font-family: var(--sans);
}

.family-toolbox summary {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: 2.35rem;
  min-height: 2.35rem;
  align-items: center;
  justify-content: center;
  color: var(--interaction-muted);
  cursor: pointer;
  list-style: none;
}

.family-toolbox summary::-webkit-details-marker {
  display: none;
}

.family-toolbox summary:hover,
.family-toolbox summary:focus-visible,
.family-toolbox[open] summary {
  color: var(--interaction-ink);
}

.family-toolbox summary:focus-visible {
  box-shadow: var(--interaction-focus);
}

.family-toolbox-icon {
  display: grid;
  place-items: center;
}

.family-toolbox-icon svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

/* Field-guide category marks (flora: a leaf sprig; fauna: a standing gull). Monoline
   hairlines that take their color from the text around them, so they read
   as ornament, not logo. Inline SVG survives print as vector. */
.field-guide-emblem {
  display: inline-block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
  vertical-align: -0.1em;
}

.field-guide-emblem--small {
  width: 0.95em;
  height: 0.95em;
  stroke-width: 1.45;
}

/* Species marks: the framed close-up from the specimen plate, reused as a
   small square with a hairline frame, the same shape as the plate's tiles.
   Big enough to read; a circle at caption size was not. */
.species-mark {
  display: inline-block;
  flex: none;
  width: 2.2rem;
  height: 2.2rem;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 42, 0.3);
  border-radius: 0.1rem;
  background: #e7e2d8;
  vertical-align: middle;
}

.species-mark picture,
.species-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.field-guide-emblem--large {
  width: clamp(1.6rem, 3.6vw, 2.2rem);
  height: auto;
  aspect-ratio: 1;
  stroke-width: 1;
}

.family-toolbox[open] summary::before {
  content: "×";
  font-size: 0.9rem;
}

.family-toolbox[open] .family-toolbox-icon {
  display: none;
}

.family-toolbox .family-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0.25rem 0 0.7rem;
}

.family-metadata-summary {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-metadata-form {
  display: grid;
  gap: 0.7rem;
  padding: 0.2rem 0 0.9rem;
}

.family-metadata-form[hidden] {
  display: none;
}

.family-person-tags {
  margin: 0;
  padding: 0;
  border: 0;
}

.family-person-tags legend {
  margin-bottom: 0.45rem;
  color: var(--interaction-muted);
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.family-person-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.family-person-option {
  position: relative;
  cursor: pointer;
}

.family-person-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.family-person-option span {
  display: inline-flex;
  min-height: 2rem;
  align-items: center;
  padding: 0.35rem 0.62rem;
  border: 1px solid var(--interaction-border);
  border-radius: 2rem;
  background: var(--interaction-surface-raised);
  color: var(--interaction-muted);
  font-family: var(--sans);
  font-size: 0.66rem;
}

.family-person-option input:checked + span {
  border-color: var(--interaction-accent);
  background: var(--interaction-accent);
  color: #fffdf7;
}

.family-person-option input:focus-visible + span {
  box-shadow: var(--interaction-focus);
}

.family-person-tags-empty {
  margin: 0;
  color: var(--interaction-muted);
  font-family: var(--sans);
  font-size: 0.7rem;
  font-style: italic;
  line-height: 1.45;
}

.family-field {
  display: grid;
  gap: 0.3rem;
}

.family-field > span {
  color: var(--interaction-muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.family-field input,
.family-field textarea {
  width: 100%;
  min-height: var(--interaction-control-height);
  padding: 0.68rem 0.72rem;
  border: 1px solid var(--interaction-border);
  border-radius: var(--interaction-radius-sm);
  outline: none;
  background: rgba(255, 253, 247, 0.56);
  color: var(--interaction-ink);
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.35;
}

.family-field textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.family-field input:focus,
.family-field textarea:focus {
  border-color: var(--interaction-accent);
  box-shadow: var(--interaction-focus);
}

.family-metadata-save,
.family-comment-submit {
  min-height: var(--interaction-control-height);
  border: 1px solid var(--interaction-accent);
  border-radius: var(--interaction-radius-sm);
  background: var(--interaction-accent);
  color: #fffdf7;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.family-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 0.7rem;
  border: 1px solid var(--interaction-border);
  border-radius: var(--interaction-radius-sm);
  background: rgba(248, 243, 233, 0.44);
  font-family: var(--sans);
}

.family-actions--quick-like {
  display: inline-block;
  margin: 0;
  border: 0;
  background: transparent;
}

.family-actions--quick-like .family-action {
  min-height: 2.35rem;
  justify-content: flex-start;
  padding: 0.35rem 0.55rem 0.35rem 0;
  border-right: 0;
}

.family-action {
  display: inline-flex;
  min-width: 0;
  min-height: var(--interaction-control-height);
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.3rem;
  border: 0;
  border-right: 1px solid var(--interaction-border);
  outline: none;
  background: transparent;
  color: var(--interaction-muted);
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 700;
}

.family-action:last-child {
  border-right: 0;
}

.family-action:hover {
  background: var(--interaction-accent-soft);
  color: var(--interaction-ink);
}

.family-action:focus-visible,
.family-metadata summary:focus-visible,
.family-dialog-close:focus-visible,
.family-metadata-save:focus-visible,
.family-comment-submit:focus-visible {
  box-shadow: var(--interaction-focus);
}

.family-action[aria-pressed="true"][data-family-action="like"] {
  background: rgba(155, 80, 71, 0.12);
  color: var(--interaction-like);
}

.family-action[aria-pressed="true"][data-family-action="save"] {
  background: rgba(104, 116, 95, 0.15);
  color: var(--interaction-save);
}

.family-action-icon {
  font-size: 0.88rem;
  line-height: 1;
}

.family-action-count:empty {
  display: none;
}

.family-action-count {
  min-width: 1.1rem;
  padding: 0.08rem 0.25rem;
  border-radius: 2rem;
  background: rgba(23, 33, 42, 0.09);
  font-size: 0.54rem;
}

.family-art-dialog {
  width: min(96rem, calc(100vw - 2rem));
  height: min(92svh, 64rem);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: var(--interaction-radius-md);
  outline: none;
  background: var(--interaction-surface-raised);
  color: var(--interaction-ink);
  box-shadow: var(--interaction-shadow);
  overflow: hidden;
}

.family-art-dialog::backdrop {
  background: rgba(7, 17, 24, 0.76);
  backdrop-filter: blur(4px);
}

.family-dialog-layout {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 0.48fr);
}

.family-dialog-visual {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 1.75rem);
  overflow: hidden;
  background: #152530;
}

.family-dialog-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  display: grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 253, 247, 0.68);
  border-radius: 50%;
  outline: none;
  background: rgba(15, 31, 42, 0.72);
  color: #fffdf7;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.88;
  transform: translateY(-50%);
  transition: background 140ms ease, opacity 140ms ease, transform 140ms ease;
}

.family-dialog-nav--previous {
  left: clamp(0.6rem, 1.2vw, 1.1rem);
}

.family-dialog-nav--next {
  right: clamp(0.6rem, 1.2vw, 1.1rem);
}

.family-dialog-nav:hover,
.family-dialog-nav:focus-visible {
  background: rgba(15, 31, 42, 0.94);
  opacity: 1;
  transform: translateY(-50%) scale(1.04);
}

.family-dialog-nav:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 253, 247, 0.34);
}

.family-dialog-nav:disabled {
  pointer-events: none;
  opacity: 0;
}

.family-dialog-visual picture {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.family-dialog-visual img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.family-dialog-panel {
  position: relative;
  height: 100%;
  min-height: 0;
  padding: clamp(1.2rem, 3vw, 2.3rem);
  overflow-y: auto;
}

.family-dialog-close {
  position: sticky;
  z-index: 2;
  top: 0;
  left: 100%;
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid var(--interaction-border);
  border-radius: 50%;
  background: var(--interaction-surface-raised);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 1.25rem;
}

.family-dialog-kicker {
  margin: -1.2rem 0 0.6rem;
  color: var(--interaction-muted);
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.family-dialog-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.95;
}

.family-dialog-caption {
  margin: 1rem 0 1.4rem;
  color: var(--interaction-muted);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.55;
}

.family-dialog-panel .family-artwork-controls {
  margin: 0 0 1.2rem;
}

.family-dialog-panel .family-metadata-form {
  padding: 1rem 0 1.4rem;
  border-top: 1px solid var(--interaction-border);
  border-bottom: 1px solid var(--interaction-border);
}

.family-comments {
  padding-top: 1.3rem;
}

.family-comments h3 {
  margin: 0 0 0.9rem;
  font-size: 1.25rem;
  font-weight: 400;
}

.family-comment-list {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
}

.family-comment {
  padding: 0.75rem;
  border-left: 2px solid var(--interaction-border-strong);
  background: var(--interaction-surface);
}

.family-comment strong,
.family-comment time {
  font-family: var(--sans);
  font-size: 0.6rem;
}

.family-comment time {
  margin-left: 0.4rem;
  color: var(--interaction-muted);
}

.family-comment p {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
}

.family-comment-empty {
  color: var(--interaction-muted);
  font-size: 0.8rem;
  font-style: italic;
}

.family-comment-form {
  display: grid;
  gap: 0.65rem;
}

.family-interaction-status {
  min-height: 1.3rem;
  margin: 0.8rem 0 0;
  color: var(--interaction-muted);
  font-family: var(--sans);
  font-size: 0.64rem;
  line-height: 1.4;
}

.family-storage-note {
  margin: 1rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--interaction-border);
  color: var(--interaction-muted);
  font-family: var(--sans);
  font-size: 0.6rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .family-question-header,
  .family-question-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .family-question-form {
    grid-template-columns: 1fr;
  }

  .family-question-share {
    align-self: flex-start;
  }

  .family-wall-instruction {
    margin-top: -1rem;
  }

  .family-people-registry {
    width: 100%;
  }

  .family-people-summary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .family-people-summary > span:last-child {
    display: none;
  }

  .family-people-registry-body {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .family-person-list {
    grid-column: 1;
  }

  .family-person-edit-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .family-person-edit-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .portrait-card {
    width: 78vw;
  }

  .portrait-card--empty {
    width: 7.25rem;
  }

  .family-wall-continuous-grid,
  .family-event-grid {
    grid-template-columns: 1fr;
  }

  .family-wall-span-2,
  .family-wall-span-3,
  .family-wall-span-4,
  .family-wall-span-6 {
    grid-column: 1;
  }

  .family-wall-span-2.family-wall-center {
    grid-column: 1;
  }

  .finished-item picture.family-artwork-trigger::after {
    opacity: 1;
    transform: none;
  }

  .family-action-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .family-action-icon {
    font-size: 1rem;
  }

  .family-actions--quick-like .family-action-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .family-art-dialog {
    width: 100vw;
    height: 100svh;
    max-height: none;
    border-radius: 0;
    overflow-y: auto;
  }

  .family-dialog-layout {
    display: block;
    height: auto;
    min-height: 100svh;
  }

  .family-dialog-visual {
    height: 48svh;
    padding: 0.75rem;
  }

  .family-dialog-nav {
    width: 2.65rem;
    height: 2.65rem;
    background: rgba(15, 31, 42, 0.82);
  }

  .family-dialog-visual img {
    max-height: 100%;
  }

  .family-dialog-panel {
    height: auto;
    min-height: 52svh;
    overflow: visible;
  }

  .family-dialog-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    left: auto;
  }
}

@media (min-width: 761px) and (max-width: 1020px) {
  .family-art-dialog {
    width: calc(100vw - 1rem);
  }

  .family-dialog-layout {
    grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.65fr);
  }

  .family-wall-continuous-grid,
  .family-event-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .family-wall-span-2,
  .family-wall-span-3 {
    grid-column: span 2;
  }

  .family-wall-span-4,
  .family-wall-span-6,
  .family-event-sequence {
    grid-column: 1 / -1;
  }

  .family-wall-span-2.family-wall-center {
    grid-column: 2 / span 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .finished-item picture.family-artwork-trigger::after {
    transition: none;
  }
}

/* One collection, two readings: the working wall and the printable book. */
.pilot-page .header-actions {
  gap: 0.85rem;
}

.collection-view-switch {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem;
  border: 1px solid rgba(243, 236, 220, 0.46);
  border-radius: 2rem;
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.collection-view-switch a {
  min-width: 3.5rem;
  padding: 0.48rem 0.62rem;
  border-radius: 2rem;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

.collection-view-switch a[aria-current="page"] {
  background: var(--pilot-cream);
  color: var(--pilot-blue);
}

.pilot-page[data-family-view="wall"] .book-preview,
.pilot-page[data-family-view="book"] .finished-collection,
.pilot-page[data-family-view="book"] .family-add {
  display: none;
}

.book-heading-copy {
  max-width: 34rem;
}

.book-heading-copy > p:first-child {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.65;
}

.book-edition-status {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.68rem;
  line-height: 1.45;
}

.book-heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.book-print-button {
  min-height: 2.9rem;
  padding: 0.72rem 0.95rem;
  border: 1px solid var(--pilot-blue);
  background: var(--pilot-blue);
  color: var(--pilot-cream);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-print-button:hover,
.book-print-button:focus-visible {
  background: transparent;
  color: var(--pilot-blue);
}

.book-share-button {
  background: transparent;
  color: var(--pilot-blue);
}

.book-share-button:hover,
.book-share-button:focus-visible {
  background: var(--pilot-blue);
  color: var(--pilot-cream);
}

.book-arrange-button {
  background: #9b5b34;
  border-color: #9b5b34;
}

.book-arrange-secondary {
  background: transparent;
  color: var(--pilot-blue);
}

.book-arrange-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.book-arrange-help,
.book-arrange-status {
  max-width: 38rem;
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.72rem;
  line-height: 1.55;
}

.book-arrange-status {
  min-height: 1.15rem;
  color: var(--pilot-blue);
  font-weight: 700;
}

.book-arrange-status-undo {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.book-arrange-page,
.book-arrange-artwork,
.book-arrange-facing-page,
.book-arrange-opener-page {
  position: relative;
}

.book-arrange-handle,
.book-arrange-drop,
.book-arrange-facing-clear,
.book-arrange-opener-clear,
.book-arrange-empty-label {
  display: none;
  position: absolute;
  z-index: 30;
}

.book-arrange-handle,
.book-arrange-drop,
.book-arrange-facing-clear,
.book-arrange-opener-clear {
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(15, 38, 51, 0.94);
  box-shadow: 0 0.3rem 1rem rgba(8, 23, 32, 0.24);
  color: #fff;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.is-arranging-book .book-arrange-handle,
.has-picked-book-artwork .is-picked-book-artwork .book-arrange-handle {
  display: grid;
  top: 0.45rem;
  left: 0.45rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0;
  overflow: hidden;
  font-size: 0;
}

.is-arranging-book .book-arrange-handle::before,
.has-picked-book-artwork .is-picked-book-artwork .book-arrange-handle::before {
  content: "↗";
  font-size: 0.86rem;
  line-height: 1;
}

.has-picked-book-artwork .book-arrange-handle {
  display: none;
}

.has-picked-book-artwork .is-picked-book-artwork .book-arrange-handle {
  display: grid;
  background: #9b5b34;
}

.has-picked-book-artwork .is-picked-book-artwork .book-arrange-handle::before {
  content: "×";
  font-size: 1rem;
}

.has-picked-book-artwork .book-arrange-drop {
  display: block;
}

.has-picked-book-artwork .book-arrange-drop:disabled {
  display: none;
}

.book-arrange-drop:focus-visible,
.book-arrange-handle:focus-visible {
  outline: 3px solid #f5b95c;
  outline-offset: 3px;
}

.book-arrange-drop--page-before,
.book-arrange-drop--page-after {
  top: 50%;
  width: 1.25rem;
  height: min(70%, 18rem);
  padding: 0;
  transform: translateY(-50%);
  border-color: transparent;
  border-radius: 0.2rem;
  background: rgba(15, 38, 51, 0.14);
  font-size: 0;
  opacity: 0.35;
  transition: opacity 140ms ease, background 140ms ease;
}

.book-arrange-drop--page-before::before,
.book-arrange-drop--page-after::before {
  content: "+";
  font-size: 0.72rem;
}

.book-arrange-drop--page-before {
  left: 0.35rem;
}

.book-arrange-drop--page-after {
  right: 0.35rem;
}

.book-arrange-drop--page-into {
  top: 50%;
  left: 50%;
  min-width: 7rem;
  padding: 0.68rem 0.8rem;
  transform: translate(-50%, -50%);
}

.book-arrange-drop--photo-before,
.book-arrange-drop--photo-after {
  top: 50%;
  z-index: 31;
  width: 0.85rem;
  height: 40%;
  min-height: 3.2rem;
  padding: 0;
  transform: translateY(-50%);
  border-color: transparent;
  border-radius: 0;
  background: rgba(15, 38, 51, 0.08);
  font-size: 0;
  opacity: 0.18;
  transition: opacity 140ms ease, background 140ms ease;
}

.book-arrange-drop--photo-before::before,
.book-arrange-drop--photo-after::before {
  content: "";
}

.book-arrange-drop--page-before:hover,
.book-arrange-drop--page-after:hover,
.book-arrange-drop--page-before:focus-visible,
.book-arrange-drop--page-after:focus-visible,
.book-arrange-drop--photo-before:hover,
.book-arrange-drop--photo-after:hover,
.book-arrange-drop--photo-before:focus-visible,
.book-arrange-drop--photo-after:focus-visible {
  background: rgba(15, 38, 51, 0.94);
  opacity: 1;
}

.book-arrange-drop--photo-before {
  left: 0.35rem;
}

.book-arrange-drop--photo-after {
  right: 0.35rem;
}

.book-arrange-artwork.is-picked-book-artwork {
  outline: 3px solid #d89242;
  outline-offset: -3px;
  filter: saturate(0.82);
}

.has-picked-book-artwork .book-arrange-page:not([data-book-structural="true"]) {
  box-shadow: inset 0 0 0 2px rgba(155, 91, 52, 0.2);
}

.book-arrange-drop--facing {
  top: 50%;
  left: 50%;
  min-width: 8rem;
  padding: 0.72rem 0.85rem;
  transform: translate(-50%, -50%);
}

.book-arrange-drop--bump {
  bottom: 0.55rem;
  left: 50%;
  min-width: 7.8rem;
  padding: 0.58rem 0.68rem;
  transform: translateX(-50%);
  font-size: 0.5rem;
}

.book-arrange-drop--opener {
  top: 50%;
  left: 50%;
  min-width: 7.4rem;
  padding: 0.68rem 0.8rem;
  transform: translate(-50%, -50%);
}

.has-picked-book-artwork .is-picked-book-artwork .book-arrange-drop--bump {
  display: none;
}

.book-arrange-artwork.is-book-bump-target {
  outline: 4px solid #d89242;
  outline-offset: -4px;
}

.is-arranging-book .book-arrange-facing-clear {
  display: grid;
  top: 0.7rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0;
  font-size: 1rem;
}

.is-arranging-book .book-arrange-opener-clear {
  display: grid;
  top: 0.7rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  padding: 0;
  font-size: 1rem;
}

.is-arranging-book .book-page--cleared-facing .book-arrange-empty-label {
  display: block;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(23, 33, 42, 0.55);
  font: 700 0.62rem/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book-page--cleared-facing {
  background: #f4f0e7;
}

.book-spread--cover-wide .book-cover > picture {
  width: 200%;
}

.book-spread--cover-wide .book-cover > picture img {
  width: 100%;
}

.book-spread--cover-wide .book-cover--right > picture {
  transform: translateX(-50%);
}

/* Both cover leaves share the same quiet bottom scrim so the painting
   reads continuously across the fold; the gutter alone marks the halves. */

/* Framing panel: opened from a painting's chip. A zoom slider, "Whole
   photo", Reset, and Done sit under the frame; dragging the photo to pan
   stays exactly as it was. */

.book-media-anchor,
.book-zoom-host {
  position: relative;
}

.book-frame-panel {
  position: absolute;
  z-index: 32;
  right: 0.4rem;
  bottom: 0.4rem;
  left: 0.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(23, 33, 42, 0.28);
  border-radius: var(--interaction-radius-md);
  background: rgba(248, 244, 235, 0.97);
  box-shadow: 0 0.3rem 1rem rgba(8, 23, 32, 0.2);
  color: #17212a;
  font-family: var(--sans);
}

.book-frame-slider {
  display: flex;
  flex: 1 1 8rem;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-frame-slider input[type="range"] {
  flex: 1 1 4rem;
  min-width: 3.5rem;
  accent-color: var(--interaction-accent);
}

.book-frame-readout {
  min-width: 2.6rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.book-frame-button {
  min-height: 1.7rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(23, 33, 42, 0.32);
  border-radius: 999px;
  background: #fff;
  color: #17212a;
  cursor: pointer;
  font: 800 0.56rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-frame-button[aria-pressed="true"] {
  background: var(--interaction-accent);
  border-color: var(--interaction-accent);
  color: #fff;
}

.book-frame-button--done {
  margin-left: auto;
  background: #9b5b34;
  border-color: #9b5b34;
  color: #fff;
}

.book-frame-button:focus-visible,
.book-frame-slider input:focus-visible {
  outline: 3px solid #f5b95c;
  outline-offset: 2px;
}

.book-frame-hint {
  flex-basis: 100%;
  margin: 0;
  color: #58636a;
  font-size: 0.6rem;
  line-height: 1.4;
}

.is-book-framing {
  outline: 3px solid #d89242;
  outline-offset: -3px;
}

/* Selection: look, select, act. Hover only hints; a click selects and one
   action bar appears on the selected thing. Hidden while a painting is
   picked up, in Arrange mode, while framing, during inline editing, for
   readers, and in print. */

.is-family-editor[data-book-tool="idle"] .book-media-anchor:hover {
  outline: 1px dashed rgba(23, 33, 42, 0.45);
  outline-offset: -1px;
}

.is-book-selected {
  outline: 3px solid #d89242;
  outline-offset: -3px;
}

.is-book-selected-page {
  outline: 2px solid #d89242;
  outline-offset: -2px;
}

.book-action-bar {
  position: absolute;
  z-index: 31;
  display: flex;
  gap: 0.25rem;
}

.book-action-bar--painting {
  left: 0.45rem;
  bottom: 0.45rem;
}

.book-action-bar--page {
  top: 0.45rem;
  right: 0.45rem;
}

.book-action {
  min-width: 1.75rem;
  min-height: 1.75rem;
  padding: 0.42rem 0.6rem;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  background: rgba(15, 38, 51, 0.92);
  box-shadow: 0 0.3rem 1rem rgba(8, 23, 32, 0.24);
  color: #fff;
  cursor: pointer;
  font: 800 0.56rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-action:hover {
  background: #9b5b34;
}

.book-action--remove:hover {
  background: #9b5047;
}

.book-action:disabled {
  cursor: default;
  opacity: 0.35;
}

.book-action:disabled:hover {
  background: rgba(15, 38, 51, 0.92);
}

.book-action:focus-visible {
  outline: 3px solid #f5b95c;
  outline-offset: 3px;
}

.is-arranging-book .book-action-bar,
.has-picked-book-artwork .book-action-bar,
.is-book-framing .book-action-bar,
[data-book-artwork-id]:has(.is-inline-editing) .book-action-bar,
.book-page:has(.is-inline-editing) .book-action-bar {
  display: none;
}

/* Stacked pages draw the caption as a band under the media box, so
   overlays there sit at the top of the painting instead. */
.book-collection-item .book-action-bar--painting,
.book-collection-item .book-frame-panel {
  top: 0.45rem;
  bottom: auto;
}

.book-collection-item .book-arrange-drop--bump {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
}

/* Room picker: three page icons, a neighbour list for sharing, a warning
   for tall paintings. Lives on the body so previews never rebuild it. */
.book-room-picker {
  position: fixed;
  z-index: 60;
  display: grid;
  gap: 0.2rem;
  min-width: 13rem;
  max-width: 18rem;
  padding: 0.45rem;
  border: 1px solid var(--interaction-border-strong);
  border-radius: var(--interaction-radius-md);
  background: var(--interaction-surface-raised);
  box-shadow: var(--interaction-shadow);
  color: var(--interaction-ink);
  font-family: var(--sans);
}

.book-room-option {
  display: grid;
  grid-template-columns: 2.9rem 1fr;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.35rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: 700 0.6rem/1.2 var(--sans);
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.book-room-option svg {
  display: block;
  width: 100%;
  height: auto;
}

.book-room-option .page {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}

.book-room-option .fill {
  fill: #9b5b34;
  opacity: 0.85;
}

.book-room-option:hover,
.book-room-option:focus-visible {
  border-color: #9b5b34;
  background: rgba(155, 91, 52, 0.1);
  outline: none;
}

.book-room-option[aria-current="true"] {
  border-color: var(--interaction-border-strong);
}

.book-room-option:disabled {
  cursor: default;
  opacity: 0.4;
}

.book-room-neighbours {
  display: grid;
  gap: 0.2rem;
  padding: 0 0 0.2rem 3.4rem;
}

.book-room-with {
  padding: 0.32rem 0.55rem;
  border: 1px dashed var(--interaction-border-strong);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: 600 0.6rem/1.2 var(--sans);
  text-align: left;
}

.book-room-with:hover,
.book-room-with:focus-visible {
  border-style: solid;
  border-color: #9b5b34;
  background: rgba(155, 91, 52, 0.1);
  outline: none;
}

.book-room-with:disabled {
  cursor: default;
  opacity: 0.4;
}

.book-room-warning,
.book-room-note {
  margin: 0.1rem 0 0;
  padding-left: 3.4rem;
  color: #9b5b34;
  font: 600 0.58rem/1.4 var(--sans);
  letter-spacing: 0.04em;
}

.book-room-note {
  color: var(--interaction-muted);
}

/* The pinned toolbar: Arrange, Undo, Redo, Names, Print, and the status
   line stay in reach on every spread. Editor only, book view only. */

.book-toolbar {
  position: fixed;
  z-index: 40;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem max(0.9rem, env(safe-area-inset-right)) max(0.55rem, env(safe-area-inset-bottom)) max(0.9rem, env(safe-area-inset-left));
  border-top: 1px solid rgba(23, 33, 42, 0.28);
  background: rgba(248, 244, 235, 0.96);
  box-shadow: 0 -0.4rem 1.4rem rgba(8, 23, 32, 0.14);
  font-family: var(--sans);
}

.pilot-page.is-family-editor[data-family-view="book"] .book-toolbar {
  display: flex;
}

.pilot-page.is-family-editor[data-family-view="book"] .book-preview {
  padding-bottom: 7rem;
}

/* Programmatic scrolls (focus, scrollIntoView) stop short of the toolbar. */
html:has(.pilot-page.is-family-editor[data-family-view="book"]) {
  scroll-padding-bottom: 6rem;
}

.book-toolbar-group {
  display: flex;
  gap: 0.3rem;
  padding-right: 0.55rem;
  margin-right: 0.15rem;
  border-right: 1px solid rgba(23, 33, 42, 0.18);
}

.book-toolbar-group:last-of-type {
  padding-right: 0;
  margin-right: 0;
  border-right: 0;
}

/* The overflow menu: the rarer proof and state tools, opened from More. */
.book-more-menu {
  position: fixed;
  inset: auto 0.9rem 3.9rem auto;
  margin: 0;
  display: none;
  min-width: 13rem;
  padding: 0.35rem;
  border: 1px solid rgba(23, 33, 42, 0.28);
  border-radius: var(--interaction-radius-md);
  background: rgba(248, 244, 235, 0.98);
  box-shadow: 0 0.6rem 1.6rem rgba(8, 23, 32, 0.22);
  font-family: var(--sans);
}

.book-more-menu:popover-open {
  display: grid;
  gap: 0.15rem;
}

.book-more-item {
  display: block;
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: var(--pilot-blue);
  cursor: pointer;
  font: 700 0.62rem/1.2 var(--sans);
  letter-spacing: 0.1em;
  text-align: left;
  text-decoration: none;
  text-transform: uppercase;
}

.book-more-item:hover,
.book-more-item:focus-visible {
  background: var(--pilot-blue);
  color: var(--pilot-cream);
  outline: none;
}

.book-more-item:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.book-more-item:disabled:hover {
  background: transparent;
  color: var(--pilot-blue);
}

.book-heading-hint {
  max-width: 38rem;
  margin: 0.8rem 0 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.72rem;
  line-height: 1.55;
}

.is-family-viewer .book-heading-hint {
  display: none;
}

.book-toolbar-button {
  min-height: 2.2rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--pilot-blue);
  background: transparent;
  color: var(--pilot-blue);
  cursor: pointer;
  font: 700 0.6rem/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-toolbar-button:hover,
.book-toolbar-button:focus-visible {
  background: var(--pilot-blue);
  color: var(--pilot-cream);
}

.book-toolbar-button:focus-visible {
  outline: 3px solid #f5b95c;
  outline-offset: 2px;
}

.book-toolbar-button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.book-toolbar-button:disabled:hover {
  background: transparent;
  color: var(--pilot-blue);
}

.book-toolbar-button--arrange[aria-pressed="true"] {
  background: #9b5b34;
  border-color: #9b5b34;
  color: #fff;
}

.book-toolbar-button--print {
  background: var(--pilot-blue);
  color: var(--pilot-cream);
}

.book-toolbar-selection {
  margin: 0 0 0 0.4rem;
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.book-toolbar-selection:empty {
  display: none;
}

.book-toolbar-status {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0 0 0 0.4rem;
  overflow: hidden;
  color: var(--pilot-blue);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media print {
  .book-frame-panel,
  .book-action-bar,
  .book-room-picker,
  .book-more-menu,
  .book-bench-dialog,
  .book-heading-hint,
  .book-toolbar,
  .book-page-people-missing,
  .book-page-people--empty,
  .book-family-placeholder,
  .book-family-tools,
  .book-family-portrait-pop {
    display: none !important;
  }
}

.book-reframeable {
  cursor: grab;
  touch-action: none;
}

.book-reframeable:active {
  cursor: grabbing;
}

.book-reframeable:focus-visible {
  outline: 2px dashed rgba(23, 33, 42, 0.55);
  outline-offset: -2px;
}

/* Book text keeps the editor's deliberate line breaks (Shift+Enter),
   for readers and in print alike. */
[data-book-text-key] {
  white-space: pre-line;
}

.book-editable {
  --book-edit-outline: rgba(23, 33, 42, 0.48);
  border-radius: 0.12rem;
  outline: 1px solid transparent;
  outline-offset: 0.18rem;
  cursor: text;
}

.book-cover .book-editable,
.book-page--title .book-editable,
.book-page--chapter .book-editable,
.book-page--portrait-feature .book-editable {
  --book-edit-outline: rgba(248, 244, 235, 0.78);
}

.book-editable:hover,
.book-editable:focus-visible,
.book-editable.is-inline-editing {
  outline-color: var(--book-edit-outline);
  outline-style: dashed;
}

.book-editable.is-inline-editing {
  outline-style: solid;
  outline-width: 2px;
}

.book-inline-field {
  display: inline;
}

.book-spread--generated .book-page {
  min-height: 0;
}

.book-page--generated {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: clamp(0.45rem, 1.4vw, 0.9rem);
}

.book-page-media {
  min-height: 0;
  overflow: hidden;
  background: #e7e2d8;
}

.book-page-media picture,
.book-page-media img {
  width: 100%;
  height: 100%;
}

.book-page--portrait-art .book-page-media {
  background: transparent;
}

.book-page--portrait-art .book-page-media img {
  object-fit: contain;
}

/* A photo whose whole frame matters (data-family-fit="contain") is never
   cover-cropped, whatever its orientation — e.g. the Lighthouse Beach sign. */
.book-page--fit-contain.book-page--generated .book-page-media {
  background: transparent;
}

.book-page--fit-contain.book-page--generated .book-page-media img {
  object-fit: contain;
}

.book-page--landscape-art .book-page-media img {
  object-fit: cover;
}

.book-page--map-feature {
  grid-template-rows: minmax(0, 1fr) auto;
  padding: clamp(0.55rem, 1.5vw, 0.9rem);
  background: #e8dfcc;
  color: #323a36;
}

.book-page--map-feature .book-page-media {
  padding: clamp(0.42rem, 1.2vw, 0.7rem);
  border: 1px solid rgba(76, 72, 58, 0.34);
  outline: 1px solid rgba(166, 137, 73, 0.28);
  outline-offset: clamp(0.18rem, 0.45vw, 0.28rem);
  background: #ddd3bf;
}

.book-page--map-feature .book-page-media img {
  object-fit: contain;
  object-position: center;
}

.book-page--map-feature .book-page-copy {
  position: relative;
  margin-top: clamp(0.35rem, 1vw, 0.6rem);
  padding: clamp(0.6rem, 1.5vw, 0.85rem) clamp(0.15rem, 0.7vw, 0.4rem) clamp(0.1rem, 0.35vw, 0.2rem);
  border-top: 1px solid rgba(76, 72, 58, 0.52);
  background: transparent;
  color: #323a36;
}

.book-page--map-feature .book-page-copy::before {
  position: absolute;
  top: 0.18rem;
  left: 0;
  width: 3.25rem;
  border-top: 2px solid #a88949;
  content: "";
}

.book-page--map-feature .book-running-section,
.book-page--map-feature .book-page-metadata,
.book-page--map-feature .book-page-time-tag {
  color: rgba(50, 58, 54, 0.72);
}

.book-page--map-feature .book-editable {
  --book-edit-outline: rgba(113, 91, 46, 0.62);
}

.book-page--map-feature.book-page--portrait-feature .book-page-copy {
  background: transparent;
  color: #323a36;
}

.book-page--map-feature.book-page--portrait-feature .book-page-media {
  background: #ddd3bf;
}

.book-page--map-feature .book-running-section--lore {
  display: flex;
  gap: 0.38rem;
  align-items: baseline;
}

.book-page--map-feature .book-running-chapter--lore {
  color: #80662f;
  letter-spacing: 0.16em;
}

.book-page--map-feature .book-page-caption {
  color: #303731;
}

.book-page--map-feature .book-page-metadata {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-page--portrait-feature {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  padding: clamp(0.42rem, 1.2vw, 0.7rem);
  background: #e7e2d8;
}

.book-page--portrait-feature .book-page-media {
  position: relative;
  min-height: 0;
  background: #d9e0de;
}

.book-page--portrait-feature .book-page-media img {
  object-fit: contain;
  object-position: center;
}

.book-page--portrait-feature .book-page-copy {
  position: relative;
  padding: clamp(0.5rem, 1.4vw, 0.8rem) clamp(0.1rem, 0.5vw, 0.3rem) clamp(0.1rem, 0.5vw, 0.3rem);
  background: transparent;
  color: var(--ink);
}

.book-page--portrait-feature .book-page-metadata,
.book-page--portrait-feature .book-page-time-tag {
  color: var(--ink-soft);
}

.book-page--collection {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(0.55rem, 1.5vw, 0.9rem);
  padding: clamp(0.7rem, 2vw, 1.2rem);
  background: #f8f4eb;
}

.book-page--interlude {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(0.75rem, 2vw, 1.2rem);
  padding: clamp(0.7rem, 2vw, 1.2rem);
  background: #edf0ec;
}

.book-interlude-body {
  display: grid;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
  gap: clamp(0.7rem, 2vw, 1.2rem);
  padding: clamp(1rem, 4vw, 2.3rem) clamp(0.3rem, 1vw, 0.7rem) clamp(0.3rem, 1vw, 0.7rem);
}

.book-interlude-kicker {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.44rem, 0.78vw, 0.56rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-interlude-title {
  max-width: 14em;
  margin: 0;
  font: italic clamp(1.16rem, 3.5vw, 2.35rem)/1.02 var(--serif);
  letter-spacing: -0.028em;
}

.book-interlude-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: clamp(0.45rem, 1.1vw, 0.7rem) 0;
  border-top: 1px solid rgba(23, 33, 42, 0.22);
  border-bottom: 1px solid rgba(23, 33, 42, 0.22);
}

.book-interlude-share p {
  max-width: 24em;
  margin: 0;
  color: var(--ink-soft);
  font: clamp(0.48rem, 0.84vw, 0.62rem)/1.4 var(--sans);
}

.book-interlude-share-button {
  flex: 0 0 auto;
  padding: 0.48rem 0.58rem;
  border: 1px solid rgba(23, 33, 42, 0.28);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: 700 clamp(0.45rem, 0.78vw, 0.56rem)/1 var(--sans);
}

.book-page--interlude .book-margin-conversation {
  align-self: end;
  min-height: clamp(8rem, 31%, 13rem);
  border-style: solid;
  border-top: 0.36rem solid rgba(23, 33, 42, 0.42);
  background: rgba(251, 248, 241, 0.76);
}

.book-page--interlude.book-section--beach {
  background: #e9e3d7;
}

.book-page--interlude.book-section--oyster-pond,
.book-page--interlude.book-section--chatham-bars-inn {
  background: #d9e2e1;
}

.book-page--interlude.book-section--yard-at-277,
.book-page--interlude.book-section--house-at-277 {
  background: #dde2d8;
}

.book-page--interlude.book-section--inside-277 {
  background: #e5dfd4;
}

.book-collection-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(23, 33, 42, 0.2);
}

.book-running-section {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: center;
  gap: 0.36rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.42rem, 0.74vw, 0.54rem);
  line-height: 1.2;
}

.book-running-chapter {
  flex: 0 0 auto;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* The place line: the place inside the chapter, then the hour after a dot.
   The place keeps its words; the hour gives way first on a narrow leaf. */
.book-running-place {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-running-hour {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-running-hour::before {
  content: "·";
  margin-right: 0.36rem;
}

.book-running-title {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 1.14em;
  font-style: italic;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-page-number {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  color: currentColor;
  font-family: var(--serif);
  font-size: clamp(0.5rem, 0.88vw, 0.64rem);
  font-style: italic;
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 400;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.book-page-number::before {
  width: clamp(0.55rem, 1.2vw, 0.85rem);
  border-top: 1px solid currentColor;
  content: "";
  opacity: 0.65;
}

.book-page-copy-top > .book-running-section {
  grid-column: 2;
  justify-content: flex-start;
}

.book-facing-panorama-foot .book-running-section {
  justify-content: flex-start;
  color: var(--ink-soft);
}

/* Botanical captions: plant studies teach — Latin name, season, and one
   line of natural history beneath the caption. */
.book-botanical-line {
  margin: 0.18rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.58rem, 1vw, 0.76rem);
}

.book-botanical-line em {
  font-style: italic;
}

.book-botanical-line .field-guide-emblem {
  margin-right: 0.3em;
}

.book-botanical-note {
  max-width: 36em;
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.56rem, 0.95vw, 0.72rem);
  line-height: 1.45;
}

/* Title-page plant backdrops: the painting ghosts under a cream wash so the
   opener text keeps its full contrast. */
.book-page--section-opener-art {
  position: relative;
  overflow: hidden;
}

.book-page--section-opener-art .book-section-opener-backdrop {
  position: absolute;
  inset: 0;
}

.book-page--section-opener-art .book-section-opener-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-page--section-opener-art .book-section-opener-backdrop::after {
  position: absolute;
  inset: 0;
  background: rgba(244, 240, 231, 0.38);
  content: "";
}

.book-page--section-opener-art > :not(.book-section-opener-backdrop) {
  position: relative;
  z-index: 1;
}

.book-page--section-opener-art .book-section-opener-title,
.book-page--section-opener-art .book-section-opener-kicker,
.book-page--section-opener-art .book-section-opener-place {
  text-shadow: 0 0 16px rgba(244, 240, 231, 0.95), 0 0 4px rgba(244, 240, 231, 0.9), 0 1px 2px rgba(244, 240, 231, 0.85);
}

/* Dark backdrops flip the whole title block to cream with a dark halo. */
.book-page--opener-art-dark .book-section-opener-backdrop::after {
  background: rgba(16, 27, 37, 0.34);
}

.book-page--opener-art-dark,
.book-page--opener-art-dark .book-section-opener-title,
.book-page--opener-art-dark .book-section-opener-kicker,
.book-page--opener-art-dark .book-section-opener-place {
  color: var(--pilot-cream);
  text-shadow: 0 0 16px rgba(16, 27, 37, 0.9), 0 0 4px rgba(16, 27, 37, 0.85), 0 1px 2px rgba(16, 27, 37, 0.8);
}

.book-page--opener-art-dark .book-section-opener-rule {
  border-color: rgba(248, 244, 235, 0.7);
}

/* The printed representation of people: names only, in the order their
   faces appear left to right. The dropdown below is the screen-only editor. */
.book-page-people {
  margin: 0.18rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.5rem, 0.85vw, 0.62rem);
  font-style: italic;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.book-page--night .book-page-people {
  color: rgba(248, 244, 235, 0.72);
}

/* Names on = the small names line shows on screen exactly as it prints;
   names off = neither. WYSIWYG. */
body.book-names-off .book-page-people {
  display: none !important;
}

/* The names line is editable in place for the editor. An empty line stays
   out of the way until the chip's Names action opens it. */
.book-page-people--empty:not(.is-inline-editing) {
  display: none;
}

.book-page-people.is-inline-editing {
  min-width: 9rem;
  font-style: normal;
  opacity: 1;
}

/* While editing, the names block takes the whole copy row so the caption
   beside it is not squeezed. */
.book-page-copy-top > .book-people-block:has(.is-inline-editing) {
  grid-column: 1 / -1;
}

/* Names editor: pills with the dots drawn between them, an input for the
   next name, one-click roster names, and a hint. */
.book-names-editor {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.15rem;
  max-width: 100%;
  font-style: normal;
}

.book-names-tokens {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0;
}

.book-name-token {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.05rem;
  margin-right: 0.85rem;
  padding: 0.04rem 0.15rem 0.04rem 0.15rem;
  border: 1px solid var(--interaction-border-strong);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.94);
  color: #17212a;
  font-style: italic;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

/* The dots between names belong to the editor, not to the typist. */
.book-name-token + .book-name-token::before {
  content: "·";
  position: absolute;
  left: -0.62rem;
  color: var(--ink-soft);
  font-style: normal;
}

.book-page--night .book-name-token + .book-name-token::before {
  color: rgba(248, 244, 235, 0.72);
}

.book-name-token.is-dragging {
  opacity: 0.6;
  cursor: grabbing;
  box-shadow: 0 0.2rem 0.6rem rgba(8, 23, 32, 0.28);
}

.book-name-token:focus-visible {
  outline: 2px solid #d89242;
  outline-offset: 1px;
}

.book-name-token-move,
.book-name-token-remove {
  padding: 0 0.16rem;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-style: normal;
  line-height: 1;
  opacity: 0.55;
}

.book-name-token-move {
  width: 0.9rem;
  opacity: 0;
  transition: opacity 120ms ease;
}

.book-name-token:hover .book-name-token-move,
.book-name-token:focus-within .book-name-token-move {
  opacity: 0.7;
}

.book-name-token-move:disabled {
  opacity: 0 !important;
  cursor: default;
}

.book-name-token-move:hover,
.book-name-token-remove:hover {
  opacity: 1;
}

@media (hover: none) {
  .book-name-token-move {
    opacity: 0.7;
  }
}

.book-names-input {
  min-width: 7.5rem;
  padding: 0.06rem 0.15rem;
  border: 0;
  border-bottom: 1px solid var(--interaction-border-strong);
  background: rgba(255, 253, 247, 0.6);
  color: #17212a;
  font: inherit;
  font-style: normal;
}

.book-names-input:focus-visible {
  outline: 2px solid #d89242;
  outline-offset: 1px;
}

.book-names-suggestions {
  display: flex;
  flex-basis: 100%;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.1rem;
}

.book-names-suggestion {
  padding: 0.04rem 0.45rem;
  border: 1px dashed var(--interaction-border-strong);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.6);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.92em;
}

.book-names-suggestion:hover,
.book-names-suggestion:focus-visible,
.book-names-suggestion.is-highlighted {
  border-style: solid;
  background: rgba(255, 253, 247, 0.96);
  color: #17212a;
}

.book-names-suggestion--new {
  border-color: #9b5b34;
  color: #9b5b34;
}

.book-names-suggestion--new.is-highlighted {
  background: #9b5b34;
  border-color: #9b5b34;
  color: #fff;
}

.book-names-none {
  font-size: 0.86em;
  opacity: 0.72;
}

.book-names-hint {
  flex-basis: 100%;
  font-size: 0.86em;
  opacity: 0.72;
}

.book-names-count {
  display: inline-flex;
  flex-basis: 100%;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0.1rem;
  font-family: var(--sans);
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.book-names-step,
.book-names-more {
  min-width: 1.2rem;
  padding: 0 0.35rem;
  border: 1px solid var(--interaction-border-strong);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.6);
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: 1.3;
}

.book-names-more {
  border-style: dashed;
  text-transform: none;
  letter-spacing: 0;
}

.book-names-step:hover,
.book-names-more:hover {
  background: rgba(255, 253, 247, 0.96);
  color: #17212a;
}

.book-names-editor.is-complete .book-names-hint {
  display: none;
}

/* Editor-only nudge on the names line: how many faces still need a name. */
.book-page-people-missing {
  font-family: var(--sans);
  font-size: 0.82em;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9b5b34;
}

.book-page--night .book-names-step,
.book-page--night .book-names-more {
  border-color: rgba(248, 244, 235, 0.6);
  background: rgba(15, 38, 51, 0.5);
  color: rgba(248, 244, 235, 0.92);
}

.book-page--night .book-names-input,
.book-page--night .book-names-suggestion {
  border-color: rgba(248, 244, 235, 0.6);
  background: rgba(15, 38, 51, 0.5);
  color: rgba(248, 244, 235, 0.92);
}

.book-page--night {
  background: #101b25;
  color: var(--pilot-cream);
}

.book-page--night .book-page-media,
.book-page--night .book-collection-media {
  background: #172734;
}

.book-page--night .book-page-copy,
.book-page--night.book-page--collection .book-collection-item {
  background: #101b25;
  color: var(--pilot-cream);
}

.book-page--night .book-collection-heading,
.book-page--night .book-twin-heading {
  border-color: rgba(248, 244, 235, 0.24);
}

.book-page--night .book-running-section,
.book-page--night .book-collection-count,
.book-page--night .book-page-metadata,
.book-page--night .book-collection-metadata,
.book-page--night .book-page-time-tag {
  color: rgba(248, 244, 235, 0.72);
}

.book-page--night .book-margin-conversation {
  border-color: rgba(248, 244, 235, 0.24);
  background: rgba(21, 37, 49, 0.95);
  color: var(--pilot-cream);
}

.book-page--night .book-margin-label,
.book-page--night .book-margin-note cite {
  color: rgba(248, 244, 235, 0.68);
}

.book-page--night .book-editable {
  --book-edit-outline: rgba(248, 244, 235, 0.78);
}

.book-page--bandstand-hero {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
}

.book-page--bandstand-hero .book-page-media {
  position: absolute;
  inset: 0;
}

.book-page--bandstand-hero .book-page-media img {
  object-fit: cover;
  object-position: 50% 50%;
}

.book-page--bandstand-hero .book-page-copy {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: clamp(2.8rem, 8vw, 5rem) clamp(0.9rem, 2.6vw, 1.5rem) clamp(0.85rem, 2.3vw, 1.3rem);
  background: linear-gradient(to bottom, transparent, rgba(10, 21, 30, 0.94) 58%);
}

.book-page--bandstand-hero .book-page-copy-top {
  grid-template-columns: auto minmax(0, 1fr);
}

.book-page--bandstand-hero .book-page-caption {
  font-size: clamp(0.82rem, 1.7vw, 1.16rem);
}

.book-page--night .book-folio,
.book-page--night .book-page-number,
.book-page--night .book-running-chapter {
  color: var(--pilot-cream);
}

.book-collection-count {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.46rem, 0.8vw, 0.58rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-collection-grid {
  display: grid;
  min-height: 0;
  gap: clamp(0.55rem, 1.5vw, 0.9rem);
}

.book-page--diptych .book-collection-grid {
  position: relative;
}

.book-page--diptych .book-collection-item {
  position: absolute;
  width: 62%;
  height: calc(50% - 0.28rem);
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 0.28rem;
  background: #fbf8f1;
  box-shadow: 0 0.45rem 1.4rem rgba(23, 33, 42, 0.13);
}

.book-page--diptych .book-collection-item:first-child {
  z-index: 2;
  top: 0;
  left: 0;
}

.book-page--diptych .book-collection-item:nth-of-type(2) {
  right: 0;
  bottom: 0;
  width: 62%;
}

.book-page--diptych.book-page--reverse .book-collection-item:first-child {
  right: 0;
  left: auto;
}

.book-page--diptych.book-page--reverse .book-collection-item:nth-of-type(2) {
  right: auto;
  left: 0;
}

.book-page--diptych .book-collection-media {
  min-height: 0;
  aspect-ratio: auto;
}

.book-page--stacked .book-collection-grid {
  grid-template-rows: repeat(2, minmax(0, 1fr)) auto;
  gap: clamp(0.38rem, 0.9vw, 0.56rem);
}

.book-page--stacked .book-collection-item {
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1.65fr) minmax(7rem, 0.85fr);
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(0.48rem, 1.1vw, 0.7rem);
  padding-bottom: clamp(0.35rem, 0.8vw, 0.5rem);
  border-bottom: 1px solid rgba(248, 244, 235, 0.18);
}

.book-page--stacked .book-collection-item:nth-child(2) {
  grid-template-columns: minmax(7rem, 0.85fr) minmax(0, 1.65fr);
}

.book-page--stacked .book-collection-item:nth-child(2) .book-collection-media {
  grid-column: 2;
  grid-row: 1;
}

.book-page--stacked .book-collection-item:nth-child(2) .book-collection-copy {
  grid-column: 1;
  grid-row: 1;
}

.book-page--stacked .book-collection-media,
.book-page--stacked .book-collection-copy {
  min-height: 0;
}

.book-page--stacked .book-collection-media img {
  object-fit: contain;
}

/* Cover crops bias toward the upper third, where faces live; a wall figure's
   data-family-focus overrides per photo, and data-family-fit="contain" opts a
   photo out of cropping entirely. */
.book-page--stacked .book-collection-media img {
  object-fit: cover;
  object-position: center 30%;
}

.book-page--stacked .book-collection-item--contain .book-collection-media img {
  object-fit: contain;
  object-position: center;
}

/* The photo box ends where the caption band begins. The band used to sit
   over the bottom of the photo box, so the lowest part of a cover-cropped
   photo could never be panned into view; now the whole photo box is
   visible and reframing reaches every edge. */
.book-page--stacked .book-collection-item,
.book-page--stacked .book-collection-item:nth-child(2) {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
}

.book-page--stacked .book-collection-media,
.book-page--stacked .book-collection-item:nth-child(2) .book-collection-media {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  min-height: 0;
}

.book-page--stacked .book-collection-copy,
.book-page--stacked .book-collection-item:nth-child(2) .book-collection-copy {
  position: relative;
  z-index: 2;
  grid-column: 1;
  grid-row: 2;
  display: grid;
  padding: clamp(0.42rem, 0.95vw, 0.6rem);
  background: rgba(248, 244, 235, 0.9);
}

.book-page--stacked .book-collection-copy {
  align-content: end;
  align-self: stretch;
  padding: 0 0 0.12rem;
}

/* Night stacked pages share the full-bleed overlay layout; only the caption
   bar changes — dark glass over the photo instead of cream. The first photo
   carries the page and gets the larger row. */
.book-page--night.book-page--stacked .book-collection-grid {
  grid-template-rows: minmax(0, 1.55fr) minmax(0, 1fr) auto;
}

.book-page--night.book-page--stacked .book-collection-copy,
.book-page--night.book-page--stacked .book-collection-item:nth-child(2) .book-collection-copy {
  background: rgba(11, 20, 30, 0.84);
  color: var(--pilot-cream);
}

.book-page--stacked .book-collection-caption {
  font-size: clamp(0.64rem, 1.12vw, 0.82rem);
}

.book-page--stacked .book-margin-conversation {
  grid-column: 1;
}

.book-page--paired-portrait {
  background: #d9e0de;
}

.book-page--paired-portrait .book-collection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(0.5rem, 1.2vw, 0.75rem);
}

.book-page--paired-portrait .book-collection-item {
  min-height: 0;
  padding: clamp(0.28rem, 0.7vw, 0.45rem);
  background: rgba(248, 244, 235, 0.7);
}

.book-page--paired-portrait .book-collection-media {
  min-height: 0;
  background: #cfd8d7;
}

.book-page--paired-portrait .book-collection-media img {
  object-fit: cover;
  object-position: center 30%;
}

.book-page--paired-portrait .book-collection-item--contain .book-collection-media img {
  object-fit: contain;
  object-position: center;
}

.book-page--paired-portrait .book-collection-copy {
  padding-top: clamp(0.4rem, 0.9vw, 0.58rem);
}

.book-page--paired-portrait .book-collection-caption {
  font-size: clamp(0.66rem, 1.2vw, 0.88rem);
}

.book-page--paired-portrait .book-margin-conversation {
  grid-column: 1 / -1;
}

.book-page--paired-contained {
  background: #d9e0de;
}

.book-page--paired-contained .book-collection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(0.5rem, 1.2vw, 0.75rem);
}

.book-page--paired-contained .book-collection-item {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(0.28rem, 0.7vw, 0.45rem);
  background: rgba(248, 244, 235, 0.72);
}

/* Shrink-wrap the photo: the cell hugs the image and the caption tucks
   directly beneath it, so no letterbox bands read as empty space. */
.book-page--paired-contained .book-collection-media {
  min-height: 0;
  flex: 0 1 auto;
  overflow: hidden;
  background: transparent;
}

.book-page--paired-contained .book-collection-media picture {
  height: auto;
}

.book-page--paired-contained .book-collection-media img {
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.book-page--paired-contained .book-collection-copy {
  flex: 0 0 auto;
}

.book-page--paired-contained .book-collection-copy {
  padding-top: clamp(0.4rem, 0.9vw, 0.58rem);
}

.book-page--paired-contained .book-collection-caption {
  font-size: clamp(0.66rem, 1.2vw, 0.88rem);
}

.book-page--paired-contained .book-margin-conversation {
  grid-column: 1 / -1;
}

.book-page--landscape-primary {
  background: #e5dfd4;
}

.book-page--landscape-primary .book-collection-grid {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  grid-template-rows: minmax(0, 1.2fr) minmax(0, 0.78fr) auto;
  gap: clamp(0.48rem, 1.15vw, 0.72rem);
}

.book-page--landscape-primary .book-collection-item {
  min-height: 0;
  padding: clamp(0.26rem, 0.65vw, 0.42rem);
  background: rgba(248, 244, 235, 0.74);
}

.book-page--landscape-primary .book-collection-item:nth-child(2) {
  grid-column: 1 / -1;
  grid-row: 1;
}

.book-page--landscape-primary .book-collection-item:first-child {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(0.42rem, 1vw, 0.65rem);
}

.book-page--landscape-primary .book-collection-item:first-child .book-collection-media {
  grid-column: 1;
  grid-row: 1;
}

.book-page--landscape-primary .book-collection-item:first-child .book-collection-copy {
  grid-column: 2;
  grid-row: 1;
  align-content: end;
  padding: 0 0.1rem 0.08rem;
}

.book-page--landscape-primary .book-collection-media {
  min-height: 0;
  background: rgba(216, 210, 199, 0.72);
}

.book-page--landscape-primary .book-collection-media img {
  object-fit: contain;
  object-position: center;
}

.book-page--landscape-primary .book-collection-item:nth-child(2) .book-collection-copy {
  padding-top: clamp(0.34rem, 0.78vw, 0.5rem);
}

.book-page--landscape-primary .book-collection-caption {
  font-size: clamp(0.62rem, 1.08vw, 0.8rem);
}

.book-page--landscape-primary .book-margin-conversation {
  grid-column: 1 / -1;
  grid-row: 3;
}

.book-page--portrait-still {
  background: #e5dfd4;
}

.book-page--portrait-still .book-collection-grid {
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(0.48rem, 1.15vw, 0.72rem);
}

.book-page--portrait-still.book-page--reverse .book-collection-grid {
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
}

.book-page--portrait-still.book-page--reverse .book-collection-item:first-child {
  grid-column: 2;
  grid-row: 1;
}

.book-page--portrait-still.book-page--reverse .book-collection-item:nth-child(2) {
  grid-column: 1;
  grid-row: 1;
}

.book-page--portrait-still .book-collection-item {
  min-height: 0;
  padding: clamp(0.26rem, 0.65vw, 0.42rem);
  background: rgba(248, 244, 235, 0.72);
}

.book-page--portrait-still .book-collection-media {
  min-height: 0;
  background: #d8d2c7;
}

.book-page--portrait-still .book-collection-media img {
  object-fit: cover;
  object-position: center;
}

.book-page--portrait-still .book-collection-copy {
  padding-top: clamp(0.38rem, 0.85vw, 0.54rem);
}

.book-page--portrait-still .book-collection-caption {
  font-size: clamp(0.62rem, 1.08vw, 0.8rem);
}

.book-page--portrait-still .book-margin-conversation {
  grid-column: 1 / -1;
}

.book-page--collection.book-section--chatham-bars-inn {
  background: #d6e0df;
}

.book-page--collection.book-section--beach {
  background: #e9e3d7;
}

.book-page--collection.book-section--oyster-pond {
  background: #d9e2e1;
}

.book-page--collection.book-section--yard-at-277 {
  background: #dde2d8;
}

.book-page--collection.book-section--inside-277 {
  background: #e5dfd4;
}

.book-page--paired-portrait .book-margin-conversation.is-empty,
.book-page--paired-contained .book-margin-conversation.is-empty,
.book-page--portrait-still .book-margin-conversation.is-empty,
.book-page--landscape-primary .book-margin-conversation.is-empty,
.book-page--stacked .book-margin-conversation.is-empty {
  display: flex;
  min-height: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding: clamp(0.34rem, 0.78vw, 0.48rem) 0 0;
  border: 0;
  border-top: 1px solid rgba(23, 33, 42, 0.24);
  background: transparent;
}

.book-page--paired-portrait .book-margin-conversation.is-empty .book-margin-label,
.book-page--paired-contained .book-margin-conversation.is-empty .book-margin-label,
.book-page--portrait-still .book-margin-conversation.is-empty .book-margin-label,
.book-page--landscape-primary .book-margin-conversation.is-empty .book-margin-label,
.book-page--stacked .book-margin-conversation.is-empty .book-margin-label {
  font-size: clamp(0.38rem, 0.68vw, 0.48rem);
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.book-page--paired-portrait .book-margin-conversation.is-empty .book-margin-add,
.book-page--paired-contained .book-margin-conversation.is-empty .book-margin-add,
.book-page--portrait-still .book-margin-conversation.is-empty .book-margin-add,
.book-page--landscape-primary .book-margin-conversation.is-empty .book-margin-add,
.book-page--stacked .book-margin-conversation.is-empty .book-margin-add {
  margin-left: auto;
  border-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(0.56rem, 0.95vw, 0.7rem);
  font-style: italic;
  font-weight: 400;
}

.book-page--paired-portrait .book-margin-conversation.is-empty .book-margin-add::before,
.book-page--paired-contained .book-margin-conversation.is-empty .book-margin-add::before,
.book-page--portrait-still .book-margin-conversation.is-empty .book-margin-add::before,
.book-page--landscape-primary .book-margin-conversation.is-empty .book-margin-add::before,
.book-page--stacked .book-margin-conversation.is-empty .book-margin-add::before {
  margin-right: 0.3rem;
  content: "+";
  font-family: var(--sans);
  font-style: normal;
}

.book-page--triptych .book-collection-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.book-page--triptych .book-collection-item:first-child {
  grid-column: auto;
}

.book-page--quartet .book-collection-grid {
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.book-page--sextet .book-collection-grid {
  position: relative;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.book-collection-item {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  margin: 0;
}

.book-collection-media {
  min-height: 0;
  overflow: hidden;
  background: #e4ded2;
}

.book-collection-media picture,
.book-collection-media img {
  width: 100%;
  height: 100%;
}

.book-collection-media img {
  object-fit: contain;
}

.book-margin-conversation {
  z-index: 4;
  display: grid;
  align-content: start;
  gap: 0.38rem;
  min-width: 0;
  padding: clamp(0.48rem, 1.2vw, 0.72rem);
  border: 1px solid rgba(23, 33, 42, 0.2);
  background: rgba(251, 248, 241, 0.94);
  color: var(--ink);
}

.book-page--diptych .book-margin-conversation--top {
  position: absolute;
  top: 0.2rem;
  right: 0;
  width: 34%;
  min-height: 28%;
  max-height: 38%;
  overflow: auto;
}

.book-page--diptych .book-margin-conversation--bottom {
  position: absolute;
  bottom: 0.2rem;
  left: 0;
  width: 38%;
  min-height: 24%;
  max-height: 34%;
  overflow: auto;
}

.book-page--diptych.book-page--reverse .book-margin-conversation--top {
  right: auto;
  left: 0;
}

.book-page--diptych.book-page--reverse .book-margin-conversation--bottom {
  right: 0;
  left: auto;
}

.book-page--triptych .book-margin-conversation {
  position: relative;
  width: auto;
  max-height: none;
  overflow: auto;
}

.book-page--quartet .book-margin-conversation,
.book-page--sextet .book-margin-conversation {
  position: absolute;
  right: 0.4rem;
  bottom: 0.4rem;
  width: min(42%, 12rem);
  max-height: 44%;
  overflow: auto;
}

.book-margin-label {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.42rem, 0.75vw, 0.54rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-margin-conversation.is-empty {
  border-style: dashed;
  background: rgba(251, 248, 241, 0.7);
}

.book-page--night .book-margin-conversation,
.book-page--night .book-margin-conversation.has-notes {
  border: 1px solid rgba(165, 199, 214, 0.42);
  border-top: 0.36rem solid #315568;
  background: rgba(19, 36, 49, 0.98);
  color: var(--pilot-cream);
  box-shadow: inset 0 0 0 1px rgba(248, 244, 235, 0.04);
}

.book-page--night .book-margin-conversation.is-empty {
  display: flex;
  min-height: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  padding: clamp(0.38rem, 0.85vw, 0.52rem) 0 0;
  border: 0;
  border-top: 1px solid rgba(165, 199, 214, 0.34);
  background: transparent;
  box-shadow: none;
}

.book-page--night .book-margin-conversation.is-empty .book-margin-label {
  font-size: clamp(0.4rem, 0.7vw, 0.5rem);
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.book-page--night .book-margin-conversation.is-empty .book-margin-add {
  margin-left: auto;
  border-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(0.58rem, 1vw, 0.74rem);
  font-style: italic;
  font-weight: 400;
}

.book-page--night .book-margin-conversation.is-empty .book-margin-add::before {
  margin-right: 0.32rem;
  content: "+";
  font-family: var(--sans);
  font-style: normal;
}

.book-page--night .book-margin-label,
.book-page--night .book-margin-add,
.book-page--night .book-margin-note cite {
  color: rgba(248, 244, 235, 0.86);
}

.book-margin-notes {
  display: grid;
  gap: 0.4rem;
}

.book-margin-note {
  position: relative;
  margin: 0;
  padding: 0 0 0.38rem;
  border-bottom: 1px solid rgba(23, 33, 42, 0.14);
}

.book-margin-note p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(0.54rem, 0.95vw, 0.72rem);
  font-style: italic;
  line-height: 1.3;
}

.book-margin-note p.is-editing {
  outline: 1px dashed rgba(23, 33, 42, 0.5);
  outline-offset: 0.16rem;
}

.book-margin-note cite {
  display: block;
  margin-top: 0.18rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.4rem, 0.68vw, 0.5rem);
  font-style: normal;
}

.book-margin-note-remove {
  position: absolute;
  top: -0.2rem;
  right: -0.15rem;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}

.book-margin-add {
  justify-self: start;
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--pilot-blue);
  cursor: pointer;
  font-family: var(--sans);
  font-size: clamp(0.44rem, 0.72vw, 0.54rem);
  font-weight: 700;
}

.book-margin-form {
  display: grid;
  gap: 0.34rem;
}

.book-margin-form[hidden] {
  display: none;
}

.book-margin-form input,
.book-margin-form textarea {
  width: 100%;
  min-width: 0;
  padding: 0.34rem;
  border: 1px solid rgba(23, 33, 42, 0.24);
  background: #fffdf8;
  color: var(--ink);
  font: 500 clamp(0.48rem, 0.78vw, 0.58rem)/1.35 var(--sans);
  resize: vertical;
}

.book-margin-form button {
  justify-self: start;
  padding: 0.36rem 0.5rem;
  border: 0;
  background: var(--pilot-blue);
  color: var(--pilot-cream);
  cursor: pointer;
  font-family: var(--sans);
  font-size: clamp(0.42rem, 0.7vw, 0.52rem);
  font-weight: 700;
}

.book-spread--twin {
  background: #d9e0de;
}

.book-page--twin {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: clamp(0.45rem, 1.2vw, 0.75rem);
  padding: clamp(0.65rem, 1.8vw, 1rem);
  background: #d9e0de;
}

.book-twin-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(23, 33, 42, 0.2);
}

.book-twin-label {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.42rem, 0.76vw, 0.54rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* The photo shrink-wraps and the caption tucks directly beneath it; the
   image-plus-caption group centers in the leftover height instead of
   leaving letterbox bands between a stretched media box and a pinned caption. */
.book-twin-media {
  min-height: 0;
  flex: 0 1 auto;
  margin-top: auto;
  overflow: hidden;
}

.book-twin-media picture,
.book-twin-media img {
  width: 100%;
}

.book-twin-media picture {
  height: auto;
}

.book-twin-media img {
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.book-twin-copy {
  min-height: 3.2rem;
  flex: 0 0 auto;
  margin-bottom: auto;
  padding-top: 0.48rem;
  border-top: 1px solid rgba(23, 33, 42, 0.2);
}

.book-twin-caption {
  margin: 0;
  font-size: clamp(0.72rem, 1.35vw, 1rem);
  line-height: 1.15;
}

.book-twin-metadata {
  margin: 0.28rem 0 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.42rem, 0.75vw, 0.54rem);
  line-height: 1.35;
}

.book-spread--sailor-twins {
  background: #d9e0de;
}

.book-page--sailor-twin {
  position: relative;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #d9e0de;
}

/* A quiet paper-tone seam at the gutter so the two full-bleed leaves read
   as facing plates instead of one photo bleeding into the other. */
.book-page--sailor-twin:first-child {
  border-right: 2px solid #f4f1e9;
}

.book-page--sailor-twin:last-child {
  border-left: 2px solid #f4f1e9;
}

.book-page--sailor-twin .book-twin-heading {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  left: 0;
  padding: clamp(0.55rem, 1.4vw, 0.8rem) clamp(0.65rem, 1.7vw, 0.95rem);
  border-bottom: 1px solid rgba(23, 33, 42, 0.18);
  background: rgba(217, 224, 222, 0.92);
  backdrop-filter: blur(8px);
}

.book-page--sailor-twin .book-twin-media {
  position: absolute;
  inset: 0;
}

/* Full-bleed twin portraits: both leaves fill their page so the pair reads
   as one composition with the babies' gazes meeting across the gutter. */
.book-page--sailor-twin .book-twin-media picture,
.book-page--sailor-twin .book-twin-media img {
  height: 100%;
}

.book-page--sailor-twin .book-twin-media img {
  object-fit: cover;
  object-position: center;
}

/* A feature-twin leaf whose whole frame matters (the beach sign's words)
   shows its image as large as the leaf allows without cropping. */
.book-page--sailor-twin.book-page--twin-contain .book-twin-media {
  display: flex;
  align-items: center;
}

.book-page--sailor-twin.book-page--twin-contain .book-twin-media img {
  object-fit: contain;
  object-position: center;
}

.book-page--sailor-twin .book-twin-copy {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  min-height: 0;
  padding: clamp(0.65rem, 1.6vw, 0.95rem) clamp(0.65rem, 1.7vw, 0.95rem);
  border-top: 1px solid rgba(23, 33, 42, 0.18);
  background: rgba(217, 224, 222, 0.94);
  backdrop-filter: blur(8px);
}

.book-page--sailor-twin .book-twin-caption {
  font-size: clamp(0.8rem, 1.55vw, 1.08rem);
}

.book-collection-copy {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  padding-top: 0.42rem;
  border-top: 0;
  font-family: var(--serif);
  font-size: inherit;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  overflow-wrap: anywhere;
}

.book-collection-caption {
  font-size: clamp(0.56rem, 1vw, 0.72rem);
  font-weight: 400;
  line-height: 1.25;
}

.book-collection-metadata {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.4rem, 0.72vw, 0.52rem);
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.book-spread--facing-panorama {
  grid-template-rows: minmax(0, 1fr) auto;
  background: #172532;
}

/* Each leaf spans both rows and takes its row lines from the spread, so
   the two feet are one band across the gutter, as tall as the fuller of
   the two: a plant study's natural history lifts both leaves alike. */
.book-page--panorama-slice {
  position: relative;
  display: grid;
  grid-row: 1 / span 2;
  grid-template-rows: subgrid;
  overflow: hidden;
  background: #172532;
}

.book-page--panorama-left {
  grid-column: 1;
}

.book-page--panorama-right {
  grid-column: 2;
}

.book-facing-panorama-media {
  position: relative;
  grid-row: 1;
  min-height: 0;
  overflow: hidden;
}

.book-facing-panorama-media picture,
.book-facing-panorama-media img {
  display: block;
  width: 200%;
  height: 100%;
}

.book-facing-panorama-media img {
  width: 100%;
  object-fit: cover;
}

.book-page--panorama-right .book-facing-panorama-media picture {
  transform: translateX(-50%);
}

/* The foot: the page's own paper under the painting, so the words never
   sit on the picture. One line on most spreads; the caption side grows
   for a plant study, and the running-head side grows with it. */
.book-facing-panorama-foot {
  grid-row: 2;
  display: grid;
  align-content: start;
  gap: 0.14rem;
  min-width: 0;
  padding: clamp(0.42rem, 1.05vw, 0.64rem) clamp(0.7rem, 1.8vw, 1.1rem) clamp(0.5rem, 1.2vw, 0.75rem);
  background: #fbf8f1;
  color: var(--ink);
}

.book-facing-panorama-foot--left {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.7rem;
  row-gap: 0.1rem;
  /* The running head sits on the caption's first line across the gutter. */
  padding-top: calc(clamp(0.42rem, 1.05vw, 0.64rem) + 0.12em);
}

.book-facing-panorama-foot .book-page-time-tag {
  grid-column: auto;
}

/* Night panoramas keep the dark: the foot is the night bar the stacked
   night pages use, cream type on near-black, not a cream cut into it. */
.book-page--night .book-facing-panorama-foot {
  background: #0f1a24;
  color: var(--pilot-cream);
}

.book-page--night .book-facing-panorama-foot .book-running-section,
.book-page--night .book-facing-panorama-foot .book-running-chapter,
.book-page--night .book-facing-panorama-foot .book-running-title,
.book-page--night .book-facing-panorama-foot .book-folio,
.book-page--night .book-facing-panorama-foot .book-page-number,
.book-page--night .book-facing-panorama-foot .book-page-time-tag,
.book-page--night .book-facing-panorama-foot .book-facing-panorama-metadata {
  color: rgba(238, 231, 216, 0.72);
}

.book-page--night .book-facing-panorama-foot .book-facing-panorama-caption {
  color: var(--pilot-cream);
}

.book-facing-panorama-caption,
.book-facing-panorama-metadata,
.book-facing-panorama-reaction,
.book-facing-panorama-reaction p {
  margin: 0;
}

.book-facing-panorama-caption {
  font-size: clamp(0.74rem, 1.4vw, 0.94rem);
  font-style: italic;
  line-height: 1.3;
}

.book-facing-panorama-metadata {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.44rem, 0.78vw, 0.56rem);
  line-height: 1.35;
}

.book-facing-panorama-reaction {
  padding-top: 0.35rem;
  border-top: 1px solid rgba(23, 33, 42, 0.2);
  font-size: clamp(0.48rem, 0.85vw, 0.62rem);
  line-height: 1.35;
}

.book-facing-panorama-reaction cite {
  display: block;
  margin-top: 0.14rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.82em;
  font-style: normal;
}

.book-facing-panorama-foot .book-editable,
.book-collection-copy .book-editable {
  --book-edit-outline: rgba(23, 33, 42, 0.48);
}

.book-page-copy {
  padding: clamp(0.55rem, 1.6vw, 1rem) clamp(0.15rem, 0.8vw, 0.45rem) 0.1rem;
}

.book-page-copy-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 0.8rem;
  align-items: baseline;
}

/* The first column is sized to the folio. Anything wide that lands there by
   auto-placement (the field-guide block, the names line) would stretch it
   and squeeze the caption to nothing, so both are placed explicitly: the
   field-guide block spans the row, the names sit under the caption. */
.book-page-copy-top > .book-botanical {
  grid-column: 1 / -1;
}

.book-page-copy-top > .book-people-block {
  grid-column: 2;
}

.book-page-caption,
.book-page-metadata {
  margin: 0;
}

.book-page-caption {
  grid-column: 2;
  font-size: clamp(0.72rem, 1.5vw, 1rem);
  font-style: italic;
  line-height: 1.35;
}

.book-page-time-tag {
  grid-column: 2;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.44rem, 0.78vw, 0.56rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book-page-metadata {
  grid-column: 2;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.46rem, 0.8vw, 0.6rem);
  line-height: 1.35;
}

.book-page-reactions {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(23, 33, 42, 0.18);
}

.book-page-reaction {
  margin: 0;
  font-size: clamp(0.52rem, 0.95vw, 0.7rem);
  line-height: 1.35;
}

.book-page-reaction p {
  margin: 0;
}

.book-page-reaction cite {
  display: block;
  margin-top: 0.16rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.82em;
  font-style: normal;
}

.book-page--title,
.book-page--opening {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.4rem, 4vw, 3.2rem);
}

.book-page--title {
  background: var(--pilot-blue);
  color: var(--pilot-cream);
}

/* Title-page texture: the house's own material (a beam, shingles) as a
   ghosted duotone under the navy, so the page has grain instead of a flat
   slide. Type sits above it. */
.book-page--title-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.book-title-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--pilot-blue);
}

.book-title-backdrop picture,
.book-title-backdrop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* The endpaper leaf beside the title page: paper, nothing on it. */
.book-page--endpaper {
  background: #e6dfd0;
}

/* The epigraph leaf facing the ledger. */
.book-page--epigraph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1.4rem, 4vw, 3.2rem);
  background: #f4f0e7;
  color: var(--ink);
}

.book-epigraph {
  max-width: 18em;
  margin: 0;
  font-size: clamp(0.95rem, 2.2vw, 1.4rem);
  font-style: italic;
  line-height: 1.4;
  text-align: center;
}

/* The cover's words on frosted glass: ink type, cream panel, no text-shadow. */
/* The cover is reframed a little tighter and anchored at the lawn, so the
   panel sits low over the grass and the shrubs beneath the windows and the
   house itself stays in the clear. */
.book-spread--cover-wide .book-cover > picture img {
  transform: scale(1.14);
  transform-origin: 50% 100%;
}

.book-cover > .book-cover-panel {
  top: auto;
  right: auto;
  bottom: 4%;
  left: 5%;
  max-width: 50%;
  padding: clamp(0.5rem, 1.3vw, 0.85rem) clamp(0.7rem, 1.6vw, 1.05rem);
  border: 1px solid rgba(248, 244, 235, 0.75);
  border-radius: 0.18rem;
  background: rgba(248, 244, 235, 0.6);
  box-shadow: 0 1px 2px rgba(23, 33, 42, 0.08), 0 10px 28px rgba(23, 33, 42, 0.12);
  color: var(--ink);
  text-shadow: none;
  backdrop-filter: blur(14px) saturate(0.85);
  -webkit-backdrop-filter: blur(14px) saturate(0.85);
}

.book-cover > .book-cover-panel .book-editable {
  --book-edit-outline: rgba(23, 33, 42, 0.48);
}

.book-cover > .book-cover-panel h3 {
  margin: 0.3rem 0;
  font-size: clamp(1.4rem, 4vw, 2.6rem);
}

.book-cover > .book-cover-panel span {
  font-size: 0.54rem;
}

.book-cover > .book-cover-panel p {
  font-size: clamp(0.55rem, 1.4vw, 0.8rem);
}

/* The chapter line: what this one printed volume is, under a hairline so it
   reads as a mark on the object rather than another line of the address. */
.book-cover > .book-cover-panel .book-cover-chapter {
  display: block;
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(23, 33, 42, 0.22);
  /* A wrap here orphans the separator onto its own line; balance splits it
     between the words instead, and the line is short enough not to wrap. */
  text-wrap: balance;
}

/* Plain: the painting as painted, the type in ink on frosted glass. The
   panels are translucent cream with a blur, so the beams stay legible
   through them instead of being covered. */
.book-page--title-plain {
  color: var(--ink);
}

.book-title-panel {
  align-self: flex-start;
  max-width: 100%;
}

.book-page--title-plain .book-title-panel {
  padding: clamp(0.7rem, 1.8vw, 1.15rem) clamp(0.85rem, 2vw, 1.3rem);
  border: 1px solid rgba(248, 244, 235, 0.75);
  border-radius: 0.18rem;
  background: rgba(248, 244, 235, 0.58);
  box-shadow: 0 1px 2px rgba(23, 33, 42, 0.08), 0 10px 28px rgba(23, 33, 42, 0.1);
  backdrop-filter: blur(14px) saturate(0.85);
  -webkit-backdrop-filter: blur(14px) saturate(0.85);
}

.book-page--title .book-title-panel:first-of-type {
  margin-top: auto;
}

.book-page--title .book-title-panel--quote {
  margin: auto 0 0.9rem;
}

.book-page--title .book-title-panel .book-folio {
  margin-top: 0;
}

.book-page--title .book-title-panel .book-title-quote {
  margin: 0;
}

.book-page--title-plain .book-editable {
  --book-edit-outline: rgba(23, 33, 42, 0.48);
}

/* Duotone: ghosted under the navy. */
.book-page--title-duotone .book-title-backdrop img {
  filter: grayscale(1) contrast(1.25) brightness(0.9);
  opacity: 0.34;
}

.book-page--title-duotone .book-title-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(24, 44, 58, 0.35) 0%, rgba(24, 44, 58, 0.7) 45%, rgba(24, 44, 58, 0.92) 100%),
    radial-gradient(120% 80% at 20% 90%, rgba(24, 44, 58, 0.5), transparent 60%);
}

.book-page--title h3 {
  max-width: 9ch;
  margin: 1rem 0;
  font-size: clamp(2rem, 5vw, 3.7rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.92;
}

.book-page--title p,
.book-page--opening p {
  margin: 0;
  font-size: clamp(0.68rem, 1.4vw, 0.95rem);
  line-height: 1.55;
}

.book-page--opening blockquote {
  margin: auto 0 1.5rem;
}

.book-page--title .book-folio {
  margin-top: auto;
}

.book-page--title .book-title-quote {
  margin: auto 0 0.9rem;
  font-size: clamp(0.88rem, 2.1vw, 1.3rem);
  font-style: italic;
  line-height: 1.35;
}

.book-page--title .book-title-opening-body {
  max-width: 30em;
  opacity: 0.82;
}

.book-page--ledger-title .book-contents-list {
  margin-top: clamp(1.2rem, 3.5vw, 2.4rem);
}

.book-page--contents {
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 4vw, 3.2rem);
  background: #f8f4eb;
}

.book-page--contents h3 {
  max-width: 10ch;
  margin: 1rem 0 clamp(1.5rem, 5vw, 3rem);
  font-size: clamp(1.65rem, 4.5vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.book-contents-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.book-contents-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: baseline;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(23, 33, 42, 0.22);
}

.book-contents-number,
.book-contents-season {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.48rem, 0.9vw, 0.66rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-contents-item strong {
  font-size: clamp(0.78rem, 1.5vw, 1.05rem);
  font-weight: 400;
}

.book-contents-note {
  max-width: 25em;
  margin: auto 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.58rem, 1.1vw, 0.76rem);
  font-style: italic;
  line-height: 1.45;
}

/* Field notes: the chapter's naturalist ledger. House plate on the left,
   generated flora/fauna columns on the right. */
/* Both field-notes pages split at the same horizontal: the house and the
   title block above it, the two category blocks below it, so the plate's
   heads and the ledger's heads share one top edge across the gutter. */
.book-page--field-notes-art,
.book-page--field-notes {
  --field-notes-split: 36%;
  --field-notes-flora: #7d8b79;
  --field-notes-fauna: #607a8d;
  display: grid;
  min-height: 0;
}

/* Without the house, the plate has the whole left page under its head. */
.book-page--field-notes-art {
  grid-template-rows: auto minmax(0, 1fr);
  padding: clamp(1.2rem, 3.5vw, 2.6rem);
  background: #f4f0e7;
}

.book-page--field-notes {
  grid-template-rows: auto minmax(0, 1fr);
}

/* With the house, both pages split at the same horizontal instead. */
.book-spread--field-notes-with-house .book-page--field-notes {
  grid-template-rows: var(--field-notes-split) minmax(0, 1fr);
}

.book-spread--field-notes-with-house .book-page--field-notes-art {
  grid-template-rows: var(--field-notes-split) auto minmax(0, 1fr);
}

.book-spread--field-notes-with-house .book-page--field-notes-art {
  padding: clamp(1.2rem, 3.5vw, 2.6rem) clamp(1rem, 3vw, 2rem);
}

.book-field-notes-top {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  padding-bottom: clamp(0.8rem, 2vw, 1.2rem);
}

.book-field-notes-intro {
  min-height: 0;
}

.book-field-notes-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.book-field-notes-foot {
  margin-top: auto;
  padding-top: clamp(0.5rem, 1.4vw, 0.8rem);
}

/* Specimen plate: the field-guide subjects grouped by where they were
   seen, each place a round dish with its medallions packed inside, the
   place's name curved along the rim, the rim marked off like a dial,
   numbered to the ledger opposite. One medallion size across the plate,
   as large as the page allows: a crowded dish owns a row, the others
   pair up beneath it. */
.book-field-notes-plate-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 clamp(0.45rem, 1.2vw, 0.7rem);
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(23, 33, 42, 0.28);
}

.book-field-notes-plate-head > .book-folio {
  margin: 0;
}

.book-field-notes-plate-key {
  display: flex;
  gap: 0.9rem;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.5rem, 0.85vw, 0.62rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-field-notes-plate-key-item {
  display: inline-flex;
  gap: 0.35em;
  align-items: center;
}

.book-field-notes-plate-key-item--flora { color: var(--field-notes-flora); }
.book-field-notes-plate-key-item--fauna { color: var(--field-notes-fauna); }

.book-field-notes-plate {
  --unit: min(calc(100cqh / var(--plate-rows, 6)), calc(100cqw / var(--plate-width, 4)));
  container-type: size;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  min-height: 0;
}

.book-field-notes-plate-row {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: calc(var(--unit) * 0.35);
  width: 100%;
}

/* A dish is so many medallions across (its weight); the plate's unit is
   the medallion, the largest that lets every row fit. */
.book-field-notes-dish {
  position: relative;
  flex: none;
  width: calc(var(--unit) * var(--dish-weight, 3));
  aspect-ratio: 1;
}

.book-field-notes-dish-chart {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: rgba(23, 33, 42, 0.5);
  stroke-linecap: round;
}

.book-field-notes-dish-rim {
  stroke: rgba(23, 33, 42, 0.34);
  stroke-width: 1px;
}

.book-field-notes-dish-tick {
  stroke: rgba(23, 33, 42, 0.42);
  stroke-width: 1px;
}

/* The words on the rim: in the chart's own units, divided by the dish's
   weight so every dish's lettering is the same size on the page. */
.book-field-notes-dish-arc {
  fill: var(--ink-soft);
  stroke: none;
  font-family: var(--sans);
  font-size: calc(11.5px / var(--dish-weight, 3));
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.book-field-notes-dish-arc--tally {
  font-size: calc(9.5px / var(--dish-weight, 3));
  font-weight: 500;
  opacity: 0.85;
}

/* A medallion: placed in its dish by the builder (left, top, width), the
   number tagged on its lower shoulder. */
.book-field-notes-specimen {
  position: absolute;
  margin: 0;
  min-width: 0;
  transform: translate(-50%, -50%);
}

/* Each medallion is mounted: a hairline ring in the category's color, a
   narrow cream mat, then the picture, with a sliver of page around it so
   neighbors never touch. */
.book-field-notes-specimen-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  padding: calc(var(--unit) * 0.035);
  border: 1px solid rgba(23, 33, 42, 0.42);
  border-radius: 50%;
  background: #fbf8f1;
  box-shadow: 0 0 0 calc(var(--unit) * 0.025) #f4f0e7;
}

/* The picture is the clipping circle inside the mat, so a zoomed close-up
   never spills onto the mat and every medallion keeps the same margin. */
.book-field-notes-specimen-frame picture {
  position: absolute;
  inset: calc(var(--unit) * 0.035);
  display: block;
  width: auto;
  height: auto;
  overflow: hidden;
  border-radius: 50%;
}

.book-field-notes-specimen-frame img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}

.book-field-notes-specimen-caption {
  position: absolute;
  top: 85%;
  left: 85%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  transform: translate(-50%, -50%);
  color: var(--ink-soft);
  font-size: clamp(0.46rem, calc(var(--unit) * 0.125), 0.8rem);
  line-height: 1;
}

.book-field-notes-specimen-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7em;
  height: 1.7em;
  padding: 0 0.25em;
  border: 1px solid currentColor;
  border-radius: 1em;
  background: #f4f0e7;
  font-family: var(--sans);
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.book-field-notes-specimen--flora .book-field-notes-specimen-number { color: #5f6f5b; }
.book-field-notes-specimen--fauna .book-field-notes-specimen-number { color: #4e687c; }

/* A place line at the start of each run in a ledger column. */
.book-field-notes-run {
  margin: 0.4rem 0 0.05rem;
  color: var(--ink-soft);
  font-size: 0.86em;
  font-style: italic;
}

.book-field-notes-run:first-child {
  margin-top: 0;
}

.book-field-notes-number {
  display: inline-block;
  min-width: 1.3em;
  margin-right: 0.35em;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.book-field-notes-media {
  display: flex;
  min-height: 0;
  align-items: center;
  overflow: hidden;
}

.book-field-notes-media picture {
  width: 100%;
  height: auto;
}

.book-field-notes-media img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.book-field-notes-house-caption {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.6rem, 1.05vw, 0.78rem);
  font-style: italic;
}

.book-page--field-notes {
  padding: clamp(1.2rem, 3.5vw, 2.6rem);
  background: #f8f4eb;
}

.book-field-notes-title {
  margin: 0.8rem 0 0.3rem;
  font-size: clamp(1.35rem, 3.2vw, 2.3rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.book-field-notes-place {
  margin: 0 0 clamp(0.7rem, 2vw, 1.2rem);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.48rem, 0.85vw, 0.62rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book-field-notes-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.8rem, 2.4vw, 1.4rem);
}

/* Column heads: the category emblem stands above its label, one hairline
   under both. */
.book-field-notes-head {
  display: grid;
  justify-items: start;
  gap: 0.35rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(23, 33, 42, 0.22);
  color: var(--ink-soft);
}

.book-field-notes-head .field-guide-emblem {
  color: var(--ink);
  opacity: 0.72;
}

.book-field-notes-label {
  display: block;
  font-family: var(--sans);
  font-size: clamp(0.46rem, 0.8vw, 0.58rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book-field-notes-list {
  display: grid;
  margin: 0.45rem 0 0;
  padding: 0;
  gap: 0.32rem;
  list-style: none;
  font-size: clamp(0.6rem, 1.05vw, 0.78rem);
  line-height: 1.35;
}

.book-field-notes-list strong {
  font-weight: 400;
}

.book-field-notes-list em {
  color: var(--ink-soft);
  font-size: 0.92em;
}

.book-field-notes-watch {
  max-width: 34em;
  margin: auto 0 0.6rem;
  color: var(--ink-soft);
  font-size: clamp(0.58rem, 1vw, 0.74rem);
  font-style: italic;
  line-height: 1.5;
}

.book-field-notes-tally {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(0.46rem, 0.82vw, 0.6rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-page--ledger-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.4rem, 4vw, 3.2rem);
  background: #d8e0dd;
  color: var(--ink);
}

.book-page--ledger-title h3 {
  max-width: 8ch;
  margin: 1rem 0;
  font-size: clamp(2.2rem, 5.6vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.book-ledger-count {
  margin: 0;
  font-family: var(--sans);
  font-size: clamp(0.58rem, 1vw, 0.76rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-ledger-place {
  margin: auto 0 0;
  font-size: clamp(0.68rem, 1.4vw, 0.95rem);
  font-style: italic;
}

.book-page--chapter::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(90deg, rgba(10, 28, 39, 0.8), rgba(10, 28, 39, 0.08) 84%);
  content: "";
}

.book-page--chapter-right::after {
  background: linear-gradient(0deg, rgba(10, 28, 39, 0.66), rgba(10, 28, 39, 0) 46%);
}

.book-page--chapter-right .book-facing-panorama-media picture {
  transform: translateX(-50%);
}

.book-chapter-copy {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: clamp(1rem, 4vw, 3rem);
  width: min(24rem, 70%);
  color: var(--pilot-cream);
  transform: translateY(-50%);
}

.book-chapter-kicker,
.book-chapter-number {
  display: block;
}

.book-chapter-kicker {
  font-family: var(--sans);
  font-size: clamp(0.5rem, 1vw, 0.7rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.book-chapter-number {
  margin: 0.05em 0 0.12em;
  font-size: clamp(4.5rem, 13vw, 8rem);
  font-weight: 400;
  letter-spacing: -0.08em;
  line-height: 0.72;
}

.book-chapter-copy h3 {
  margin: 0.55rem 0;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 0.92;
}

.book-chapter-artwork-note {
  position: absolute;
  z-index: 1;
  right: clamp(0.8rem, 3vw, 1.6rem);
  bottom: clamp(0.8rem, 3vw, 1.6rem);
  left: clamp(0.8rem, 3vw, 1.6rem);
  display: grid;
  gap: 0.18rem;
  margin: 0;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(248, 244, 235, 0.44);
  color: var(--pilot-cream);
  font-family: var(--sans);
}

.book-chapter-artwork-note strong {
  font-size: clamp(0.54rem, 1.05vw, 0.72rem);
  font-weight: 700;
}

.book-chapter-artwork-note span {
  font-size: clamp(0.46rem, 0.9vw, 0.62rem);
  line-height: 1.35;
  opacity: 0.82;
}

.book-chapter-artwork-note .book-time-tag {
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 1;
}

.book-chapter-copy p {
  position: static;
  right: auto;
  bottom: auto;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: clamp(0.64rem, 1.3vw, 0.9rem);
  font-style: normal;
  line-height: 1.5;
}

.book-page--closing-image,
.book-page--closing-image picture,
.book-page--closing-image img {
  width: 100%;
  height: 100%;
}

.book-page--closing-image img {
  object-fit: cover;
}

/* The studio leaf: the same cream text page as Who is who, so it reads as a
   leaf of this book and not an advert bound into it. The mark keeps the
   studio's own ink and its one orange, the way a printer's mark does. */
.book-page--studio-words .book-studio-steps {
  margin-top: 0.9rem;
  font-variant-numeric: oldstyle-nums;
  font-style: italic;
}

.book-page--studio-mark {
  align-items: center;
  justify-content: center;
  text-align: center;
}

.book-studio-mark-figure {
  width: clamp(3.2rem, 9vw, 5.4rem);
  margin: auto auto 1rem;
}

.book-studio-mark-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.book-page--studio-mark .book-studio-wordmark {
  display: block;
  font-size: clamp(0.62rem, 1.5vw, 0.9rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.book-page--studio-mark .book-studio-product {
  max-width: none;
  margin: 0.55rem 0 0;
  font-size: clamp(1.15rem, 3vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.book-page--studio-mark .book-studio-note {
  margin: 0.6rem auto auto;
  max-width: 22ch;
  font-style: italic;
}

.book-page--closing-words {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.4rem, 4vw, 3.2rem);
  background: var(--pilot-blue);
  color: var(--pilot-cream);
}

.book-page--closing-words h3 {
  max-width: 8ch;
  margin: 1rem 0;
  font-size: clamp(2.2rem, 5.6vw, 4.2rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.92;
}

.book-page--closing-words p {
  margin: 0;
  font-size: clamp(0.68rem, 1.4vw, 0.95rem);
  font-style: italic;
}

.book-closing-mark {
  margin-top: auto;
  font-family: var(--sans);
  font-size: clamp(0.5rem, 0.9vw, 0.66rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.book-page--closing-words .book-editable {
  --book-edit-outline: rgba(248, 244, 235, 0.78);
}

.book-page--blank {
  background: #f8f4eb;
}

@media (min-width: 761px) {
  .book-heading-copy {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
}

@media (max-width: 760px) {
  .pilot-page .header-actions {
    gap: 0.4rem;
  }

  .collection-view-switch {
    font-size: 0.54rem;
  }

  .collection-view-switch a {
    min-width: 2.9rem;
    padding-inline: 0.48rem;
  }

  .header-cta {
    font-size: 0.52rem;
  }

  .book-heading-copy {
    margin-top: 1rem;
  }

  .family-wall-invitation {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media print {
  @page {
    size: 5in 7in;
    margin: 0;
  }

  html,
  body {
    width: 5in;
    height: var(--book-print-height, 7in);
    max-height: var(--book-print-height, 7in);
    margin: 0 !important;
    overflow: hidden !important;
    /* Any sub-pixel remainder on the final imposed leaf belongs to the
       archival end matter, not to the preceding night section. */
    background: #e8dfcc !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .pilot-page > main,
  .pilot-page[data-family-view] .book-preview,
  .book-spreads {
    height: var(--book-print-height, 7in) !important;
    max-height: var(--book-print-height, 7in) !important;
    overflow: hidden !important;
  }

  .pilot-hero,
  .site-header,
  .finished-collection,
  .family-add,
  .book-heading,
  .site-footer,
  .reading-progress,
  .family-art-dialog {
    display: none !important;
  }

  .book-margin-add,
  .book-margin-form,
  .book-margin-note-remove,
  .book-margin-approval,
  .book-margin-conversation:not(.has-approved-notes),
  .book-margin-note:not(.is-approved) {
    display: none !important;
  }

  .book-arrange-handle,
  .book-arrange-drop,
  .book-arrange-facing-clear,
  .book-arrange-opener-clear,
  .book-arrange-empty-label,
  .book-arrange-status,
  .book-arrange-help {
    display: none !important;
  }

  .pilot-page[data-family-view] .book-preview {
    display: block !important;
    width: 5in !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .book-spreads {
    display: block !important;
    width: 5in !important;
    padding: 0 !important;
  }

  .book-spread,
  .book-spread--cover,
  .book-spread--panorama {
    display: block !important;
    width: 5in !important;
    height: auto !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    box-shadow: none !important;
    break-after: auto !important;
  }

  .book-page {
    width: 5in !important;
    height: calc(7in - 1px) !important;
    overflow: hidden !important;
    break-before: auto !important;
    break-after: auto !important;
    break-inside: avoid !important;
  }

  .book-page--closing-words .book-closing-mark {
    margin-bottom: 1rem;
  }

}

/* ---------------------------------------------------------------------
   Reader mode. The plain family link opens the book as a reader: the
   editor's chrome (arranging, reframing, book-text editing, print
   approvals) never appears. Readers open any painting in the book: the
   wall's card for it, with its hearts and comments.
   --------------------------------------------------------------------- */

.is-family-viewer .book-arrange-button,
.is-family-viewer [data-arrange-book],
.is-family-viewer [data-undo-book-arrangement],
.is-family-viewer .book-more-menu,
.is-family-viewer [data-reset-book-arrangement],
.is-family-viewer [data-toggle-print-names],
.is-family-viewer [data-book-toolbar-action="bench"],
.is-family-viewer [data-press-preview],
.is-family-viewer [data-save-book-state],
.is-family-viewer [data-load-book-state-label],
.is-family-viewer .book-arrange-help,
.is-family-viewer .book-arrange-status,
.is-family-viewer .family-book-approval,
.is-family-viewer .book-arrange-handle,
.is-family-viewer .book-arrange-drop,
.is-family-viewer .book-arrange-facing-clear,
.is-family-viewer .book-arrange-opener-clear,
.is-family-viewer .book-frame-panel,
.is-family-viewer .book-action-bar,
.is-family-viewer .book-bench-dialog,
.is-family-viewer .book-toolbar {
  display: none !important;
}

/* For readers every painting in the book opens the wall's card for it:
   the hand says so, and the keyboard can reach it. */
.is-family-viewer [data-book-spreads] img.book-opens-painting {
  cursor: zoom-in;
}

.is-family-viewer [data-book-spreads] img.book-opens-painting:focus-visible {
  outline: 3px solid #d89242;
  outline-offset: -3px;
}

/* The bench: a drawer of paintings over the book. Editor only. */
.book-bench-dialog {
  width: min(96vw, 64rem);
  max-height: 92vh;
  padding: 0;
  border: 1px solid var(--interaction-border-strong);
  background: var(--interaction-surface-raised);
  color: var(--pilot-blue);
  font-family: var(--sans);
  font-size: 0.76rem;
  line-height: 1.5;
  overflow: auto;
}

.book-bench-dialog::backdrop {
  background: rgba(8, 23, 32, 0.52);
}

.book-bench-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem 0.9rem;
  border-bottom: 1px solid var(--interaction-border);
  background: var(--interaction-surface-raised);
}

.book-bench-titles {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.book-bench-label {
  margin: 0;
  font: 700 0.58rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--interaction-muted);
}

.book-bench-title {
  margin: 0;
  font: 400 1.15rem/1.2 var(--serif, Georgia, serif);
  color: var(--interaction-ink);
}

.book-bench-lead,
.book-bench-note,
.book-bench-empty {
  margin: 0;
  color: var(--interaction-muted);
}

.book-bench-note {
  color: var(--interaction-ink);
  font-weight: 600;
}

.book-bench-controls {
  display: flex;
  flex: none;
  gap: 0.4rem;
}

.book-bench-body {
  display: grid;
  gap: 1.1rem;
  padding: 1rem 1.25rem 1.3rem;
}

.book-bench-group-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  font: 700 0.6rem/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pilot-blue);
}

.book-bench-group-count {
  font-weight: 400;
  color: var(--interaction-muted);
}

.book-bench-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.75rem;
}

.book-bench-tile {
  position: relative;
  display: grid;
  gap: 0.3rem;
  align-content: start;
  margin: 0;
  padding: 0 0 0.4rem;
  border: 1px solid var(--interaction-border);
  border-radius: var(--interaction-radius-sm, 4px);
  background: var(--interaction-surface, transparent);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.book-bench-tile:hover:not(:disabled) {
  border-color: var(--pilot-blue);
}

.book-bench-tile:focus-visible {
  outline: 3px solid #f5b95c;
  outline-offset: 2px;
}

.book-bench-tile.is-in-book {
  opacity: 0.42;
  cursor: default;
}

.book-bench-picture {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--pilot-cream);
}

.book-bench-picture picture,
.book-bench-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-bench-caption {
  padding: 0 0.5rem;
  font-size: 0.74rem;
  line-height: 1.3;
  color: var(--interaction-ink);
}

.book-bench-meta {
  padding: 0 0.5rem;
  font-size: 0.62rem;
  color: var(--interaction-muted);
}

.book-bench-kept {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: var(--pilot-blue);
  color: var(--pilot-cream);
  font: 700 0.52rem/1.4 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-editor-note {
  margin: 0;
  color: var(--ink-soft);
}

/* Type controls: classes set from the editor's type bar, saved per text.
   They come last so they win over each text's own size rule. */
.book-text--align-left { text-align: left; }
.book-text--align-center { text-align: center; }
.book-text--align-right { text-align: right; }
.book-text--size-s { zoom: 0.85; }
.book-text--size-m { zoom: 1; }
.book-text--size-l { zoom: 1.25; }
.book-text--size-xl { zoom: 1.6; }
.book-text--leading-tight { line-height: 1.1 !important; }
.book-text--leading-normal { line-height: 1.4 !important; }
.book-text--leading-airy { line-height: 1.8 !important; }
.book-page--epigraph.book-page--place-top { justify-content: flex-start; }
.book-page--epigraph.book-page--place-middle { justify-content: center; }
.book-page--epigraph.book-page--place-bottom { justify-content: flex-end; }
.book-page--epigraph .book-text--align-left,
.book-page--epigraph .book-text--align-right { align-self: stretch; }

/* The type bar, floating while a text is edited. Editor chrome only. */
.book-text-tools {
  position: fixed;
  z-index: 60;
  right: 1rem;
  bottom: 4.6rem; /* clear of the book toolbar pinned beneath it */
  left: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(23, 33, 42, 0.28);
  border-radius: var(--interaction-radius-md, 0.6rem);
  background: rgba(248, 244, 235, 0.97);
  box-shadow: 0 0.4rem 1.4rem rgba(8, 23, 32, 0.22);
  color: #17212a;
  font-family: var(--sans);
}

.book-text-tools-group {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.book-text-tools-label {
  margin-right: 0.3rem;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #34424c;
}

.book-text-tools-button {
  min-height: 1.6rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid rgba(23, 33, 42, 0.28);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 700 0.62rem/1 var(--sans);
  letter-spacing: 0.06em;
  cursor: pointer;
}

.book-text-tools-button[aria-pressed="true"] {
  background: #17212a;
  border-color: #17212a;
  color: #f8f4eb;
}

.book-text-tools-hint {
  flex-basis: 100%;
  text-align: center;
  font-size: 0.6rem;
  color: #34424c;
}

@media print {
  .book-text-tools { display: none !important; }
}

/* The Edit switch in the header: anyone can edit. Pressed while the tools
   are out; a steward's device says so. */

.header-edit-switch {
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  background: transparent;
  color: inherit;
}

.is-family-editor .header-edit-switch {
  background: var(--pilot-cream, #f3ecdc);
  color: var(--pilot-blue, #17212a);
  border-color: var(--pilot-cream, #f3ecdc);
}

.is-steward .header-edit-switch::after {
  content: " · steward";
  opacity: 0.7;
}

.book-toolbar-note {
  display: none;
  flex-basis: 100%;
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  color: #34424c;
}

/* On a phone the book stacks: one leaf per row at the width of the screen,
   the leaves that exist only to face another leaf set aside, and the
   arranging tools left to the desk. The type is already at its small end
   of every clamp here, which is the size the printed page uses. */

@media (max-width: 720px) {
  .pilot-page[data-family-view="book"] .book-spreads {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 0 4vw 1.5rem;
    overflow-x: visible;
    scroll-snap-type: none;
  }

  .pilot-page[data-family-view="book"] .book-spread {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    flex: none;
    width: 92vw;
    aspect-ratio: auto;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    scroll-snap-align: none;
  }

  .pilot-page[data-family-view="book"] .book-spread--cover {
    width: 76vw;
  }

  .pilot-page[data-family-view="book"] .book-page {
    width: 100%;
    aspect-ratio: 5 / 7;
    box-shadow: 0 0.8rem 2rem rgba(23, 33, 42, 0.18);
  }

  .pilot-page[data-family-view="book"] .book-spread:not(.book-spread--cover) .book-page:first-child {
    box-shadow: 0 0.8rem 2rem rgba(23, 33, 42, 0.18);
  }

  .pilot-page[data-family-view="book"] .book-cover--left,
  .pilot-page[data-family-view="book"] .book-page--endpaper,
  .pilot-page[data-family-view="book"] .book-page--blank,
  .pilot-page[data-family-view="book"] .book-page--cleared-facing {
    display: none;
  }

  /* One leaf carries the whole painting on a phone. The right leaf keeps
     only its foot, set directly under the left one's, so the band reads
     as one: running head, then caption. */
  .pilot-page[data-family-view="book"] .book-spread--facing-panorama {
    gap: 0;
    grid-template-rows: none;
  }

  .pilot-page[data-family-view="book"] .book-page--panorama-slice {
    grid-row: auto;
    grid-column: 1;
    grid-template-rows: none;
    aspect-ratio: auto;
  }

  .pilot-page[data-family-view="book"] .book-page--panorama-right {
    box-shadow: none;
  }

  .pilot-page[data-family-view="book"] .book-page--panorama-left .book-facing-panorama-media {
    aspect-ratio: 10 / 7;
  }

  .pilot-page[data-family-view="book"] .book-page--panorama-left .book-facing-panorama-media picture {
    width: 100%;
    transform: none;
  }

  .pilot-page[data-family-view="book"] .book-page--panorama-right .book-facing-panorama-media {
    display: none;
  }

  .pilot-page[data-family-view="book"] .book-facing-panorama-foot--left {
    padding-bottom: 0;
  }

  .pilot-page[data-family-view="book"] .book-facing-panorama-foot--right {
    padding-top: 0.2rem;
  }

  .pilot-page.is-family-editor[data-family-view="book"] .book-toolbar-note {
    display: block;
  }

  .book-action-bar--page,
  .book-arrange-handle,
  .book-arrange-drop,
  .book-arrange-facing-clear,
  .book-arrange-opener-clear,
  .book-frame-panel,
  .book-toolbar-selection,
  [data-arrange-book],
  [data-book-toolbar-action="bench"],
  [data-book-toolbar-action="print"],
  [data-book-chip-action="move"],
  [data-book-chip-action="frame"],
  [data-book-chip-action="room"],
  [data-book-chip-action="page"] {
    display: none !important;
  }
}

/* The shared book: what the log said last, and the name it asks for once. */

.book-sync-status {
  margin: 0.4rem 0 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: #34424c;
}

.book-sync-status-revert,
.book-arrange-status-undo {
  font: inherit;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.family-name-dialog {
  max-width: 24rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid rgba(23, 33, 42, 0.28);
  background: #f8f4eb;
  color: #17212a;
  font-family: var(--serif);
}

.family-name-dialog::backdrop {
  background: rgba(8, 20, 29, 0.45);
}

.family-name-form {
  display: grid;
  gap: 0.9rem;
}

.family-name-lead {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.family-name-field {
  display: grid;
  gap: 0.3rem;
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #34424c;
}

.family-name-field input {
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(23, 33, 42, 0.42);
  background: #fff;
  font: 1rem var(--serif);
  letter-spacing: 0;
  text-transform: none;
  color: #17212a;
}

.family-name-form .book-print-button {
  justify-self: start;
}

/* The book has the whole width; the cover sits centred with a chevron on
   either side, and a line beneath names the open pages. The wall lives off
   the edge of the screen: a tab along the right brings it in as a drawer,
   the book moves over to make room, and Close sends it back. On a phone the
   drawer rises from the bottom instead. Nothing sits beside the book until
   the reader asks for it. */

.book-stage {
  position: relative;
  display: block;
  width: min(100%, 100vw);
  padding: 0;
  box-sizing: border-box;
  transition: padding-right 0.28s ease;
}

/* One spread has the screen, sized from the window's height the way the
   proof viewer sizes its pages: the two pages in focus large, the
   neighbours off the edge, no scrollbar under them. The chevrons, the arrow
   keys, a swipe, and the trackpad turn the page. */
.book-track {
  --book-track-w: 100vw;
  --book-spread-w: min(calc(var(--book-track-w) - 6rem), calc((100vh - 11rem) * 10 / 7), 84rem);
  --book-cover-w: min(calc(var(--book-track-w) - 6rem), calc((100vh - 11rem) * 5 / 7), 36rem);
  --book-half: calc(var(--book-spread-w) / 2);
  position: relative;
}

.book-stage .book-spreads {
  min-width: 0;
  gap: max(2rem, calc(var(--book-track-w) - var(--book-spread-w) + 2rem));
  padding: 0 calc(50% - var(--book-half)) 1.5rem calc(50% - var(--book-cover-w) / 2);
  scroll-padding-inline: 0;
  scrollbar-width: none;
}

.book-stage .book-spreads::-webkit-scrollbar {
  display: none;
}

.book-stage .book-spreads:has(> .book-spread--cover-wide:first-child) {
  padding-left: calc(50% - var(--book-half));
}

.book-stage .book-spread {
  flex-basis: var(--book-spread-w);
}

.book-stage .book-spread--cover {
  flex-basis: var(--book-cover-w);
}

.book-turn {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.9rem;
  min-width: 2.9rem;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 999px;
  background: #17212a;
  color: #f8f4eb;
  box-shadow: 0 0.5rem 1.4rem rgba(23, 33, 42, 0.28);
  cursor: pointer;
  transform: translateY(-50%);
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

/* Each chevron sits just outside its edge of the book and grows away from
   it, so the "Open the book" label never covers the cover. */

.book-turn--prev {
  right: min(calc(50% + var(--book-half) + 0.8rem), calc(100% - 3.4rem));
}

.book-turn--next {
  left: min(calc(50% + var(--book-half) + 0.8rem), calc(100% - 3.4rem));
}

.book-turn:hover,
.book-turn:focus-visible {
  background: #34424c;
}

.book-turn:focus-visible {
  outline: 2px solid #b99a61;
  outline-offset: 2px;
}

.book-turn:disabled {
  opacity: 0.22;
  cursor: default;
}

/* Once a page has turned, the chevrons have done their job and fade out.
   A keyboard user who tabs onto one still sees it. */
/* Once a page has turned the chevrons stay, quieter: on a desk they are
   the way to turn pages, since a mouse wheel does not scroll sideways. */

.book-stage.book-turned .book-turn {
  opacity: 0.72;
}

.book-stage.book-turned .book-turn:hover,
.book-stage.book-turned .book-turn:focus-visible {
  opacity: 1;
}

.book-turn svg {
  flex: none;
}

.book-turn-hint {
  display: none;
  font: 700 0.64rem/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-left: 0.3rem;
}

.book-stage[data-at="cover"] .book-turn--next {
  background: #b99a61;
  color: #17212a;
}

.book-stage[data-at="cover"] .book-turn--next:hover,
.book-stage[data-at="cover"] .book-turn--next:focus-visible {
  background: #c9ac74;
}

.book-stage[data-at="cover"] .book-turn-hint {
  display: inline;
}

.book-turn-where {
  margin: 0;
  text-align: center;
  font: 700 0.62rem/1.4 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4d5a64;
}

/* Beneath the count, once, quietly: the count is the screen's, not the book's. */
.book-turn-note {
  margin: 0.25rem 0 0;
  text-align: center;
  font: italic 0.72rem/1.4 var(--serif, Georgia, serif);
  color: #7a858e;
}

/* The wall's tab and drawer only exist while the book is on screen. */

body:not(.book-on-screen) .book-wall,
body:not(.book-on-screen) .book-wall-tab {
  display: none;
}

.book-wall-tab {
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 44;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 0.55rem;
  border: 0;
  border-radius: 0.4rem 0 0 0.4rem;
  background: #17212a;
  color: #f8f4eb;
  font: 700 0.62rem/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
  box-shadow: 0 0.4rem 1.2rem rgba(23, 33, 42, 0.28);
  cursor: pointer;
}

.book-wall-tab:hover,
.book-wall-tab:focus-visible {
  background: #34424c;
}

.book-wall-tab:focus-visible {
  outline: 2px solid #b99a61;
  outline-offset: 2px;
}

.book-wall-tab-count:not(:empty) {
  color: #b99a61;
}

.book-wall-tab-count:not(:empty)::before {
  content: "· ";
  color: #f8f4eb;
}

.book-stage.wall-open .book-wall-tab {
  display: none;
}

.book-wall {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  width: min(22rem, 90vw);
  overflow: auto;
  padding: 0.9rem 1rem 1.1rem;
  border-left: 1px solid rgba(23, 33, 42, 0.22);
  background: #f8f4eb;
  color: #17212a;
  font-family: var(--sans);
  scrollbar-width: thin;
  box-sizing: border-box;
  box-shadow: -0.6rem 0 2rem rgba(23, 33, 42, 0.16);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s ease, visibility 0.28s;
}

.book-wall.is-open {
  transform: none;
  visibility: visible;
}

@media (min-width: 961px) {
  .book-stage.wall-open {
    padding-right: min(22rem, 90vw);
  }

  .book-stage.wall-open .book-track {
    --book-track-w: calc(100vw - min(22rem, 90vw));
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-stage,
  .book-wall,
  .book-turn {
    transition: none;
  }
}

.book-wall-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.book-wall-title {
  margin: 0;
  font: 700 0.66rem/1.4 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #34424c;
}

.book-wall-where {
  margin: 0;
  flex: 1;
  font: 0.7rem/1.4 var(--sans);
  color: #6b7680;
}

.book-wall-toggle,
.book-wall-small {
  padding: 0.3rem 0.55rem;
  border: 1px solid rgba(23, 33, 42, 0.3);
  border-radius: 999px;
  background: transparent;
  color: #17212a;
  font: 700 0.6rem/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.book-wall-small:disabled {
  opacity: 0.5;
  cursor: default;
}

.book-wall-lead {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: #6b7680;
}

.book-wall-painting {
  padding: 0.8rem 0 0.9rem;
  border-top: 1px solid rgba(23, 33, 42, 0.14);
}

.book-wall-painting:first-child {
  border-top: 0;
  padding-top: 0.2rem;
}

.book-wall-caption {
  margin: 0 0 0.3rem;
  font: 400 0.98rem/1.3 var(--serif);
}

.book-wall-activity {
  margin: 0 0 0.45rem;
  font-size: 0.66rem;
  color: #6b7680;
}

.book-wall-like {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(23, 33, 42, 0.42);
  border-radius: 999px;
  background: transparent;
  color: #17212a;
  font: 700 0.62rem/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.book-wall-like[aria-pressed="true"] {
  background: #17212a;
  color: #f8f4eb;
  border-color: #17212a;
}

.book-wall-like small {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.book-wall-notes {
  list-style: none;
  display: grid;
  gap: 0.4rem;
  margin: 0.6rem 0 0;
  padding: 0;
}

.book-wall-note,
.book-wall-proposal {
  display: grid;
  gap: 0.2rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(23, 33, 42, 0.16);
  background: #f1ece2;
  font: 0.88rem/1.4 var(--serif);
}

.book-wall-proposal {
  border-style: dashed;
}

.book-wall-note b,
.book-wall-proposal b {
  font: 700 0.6rem/1.4 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #34424c;
}

.book-wall-note i,
.book-wall-proposal i {
  font: 0.66rem/1.4 var(--sans);
  font-style: normal;
  color: #6b7680;
}

.book-wall-note.is-in-book {
  border-color: rgba(23, 33, 42, 0.42);
}

.book-wall-note .book-wall-small,
.book-wall-proposal .book-wall-small {
  justify-self: start;
  margin-top: 0.2rem;
}

.book-wall-form {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.book-wall-form input,
.book-wall-form textarea {
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(23, 33, 42, 0.42);
  background: #fff;
  color: #17212a;
  font: 0.88rem/1.4 var(--serif);
}

.book-wall-form textarea {
  resize: vertical;
}

.book-wall-submit {
  justify-self: start;
}

@media (max-width: 960px) {
  .book-wall {
    top: auto;
    left: 0;
    width: auto;
    max-height: 60vh;
    border-left: 0;
    border-top: 1px solid rgba(23, 33, 42, 0.22);
    box-shadow: 0 -0.6rem 2rem rgba(23, 33, 42, 0.16);
    transform: translateY(100%);
  }

  .book-wall.is-open {
    transform: none;
  }

  .book-wall-tab {
    top: auto;
    right: 1rem;
    bottom: 1rem;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    writing-mode: horizontal-tb;
    transform: none;
  }

  .pilot-page.is-family-editor .book-wall {
    bottom: 3.8rem;
  }

  .pilot-page.is-family-editor .book-wall-tab {
    bottom: 4.6rem;
  }
}

@media (max-width: 720px) {
  .book-turn,
  .book-turn-where,
  .book-turn-note {
    display: none;
  }
}

@media print {
  .book-wall,
  .book-wall-tab,
  .book-turn,
  .book-turn-where,
  .book-turn-note,
  .book-wall-toggle { display: none !important; }
  .book-stage { display: block; padding: 0; }
}

/* On the site the page opens on the book; the hero stays in the markup
   (the cover borrows its picture) but out of sight. */

body[data-site] .pilot-hero {
  min-height: min(64vh, 36rem);
  padding: 5.5rem 0 2.5rem;
}

/* The copy sits in flow, so the hero grows to fit it rather than clipping
   the words; the type is sized so that on a desk it stays under a screen. */
body[data-site] .pilot-hero h1 {
  margin: 0.6rem 0 0.9rem;
  font-size: min(clamp(3.4rem, 5.6vw, 5rem), 11svh);
}

body[data-site] .pilot-deck {
  max-width: 36rem;
  font-size: clamp(0.98rem, 1.3vw, 1.1rem);
  line-height: 1.4;
}

body[data-site] .pilot-enter {
  margin-top: 1.1rem;
}

@media (max-width: 720px) {
  body[data-site] .pilot-hero {
    min-height: 34rem;
  }
}

/* The steward's marks: a held page wears a ribbon; a disputed painting a chip. */

.book-page[data-book-held] {
  outline: 2px dashed rgba(185, 154, 97, 0.9);
  outline-offset: -2px;
}

.book-held-ribbon,
.book-dispute-chip {
  position: absolute;
  z-index: 5;
  padding: 0.25rem 0.55rem;
  font: 700 0.58rem/1 var(--sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

.book-held-ribbon {
  top: 0.6rem;
  left: 0.6rem;
  background: #b99a61;
  color: #fff;
}

.book-dispute-chip {
  right: 0.5rem;
  top: 0.5rem;
  background: #8a3b2e;
  color: #fff;
}

[data-book-artwork-id] {
  position: relative;
}

@media print {
  .book-held-ribbon,
  .book-dispute-chip { display: none !important; }
  .book-page[data-book-held] { outline: 0; }
}

/* The log: what has changed, newest first. */

.book-log {
  margin: 0.5rem 0 0;
  font-family: var(--sans);
  font-size: 0.72rem;
  color: #34424c;
}

.book-log summary {
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.62rem;
}

.book-log-count {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: #6b7680;
}

.book-log-list {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  max-height: 14rem;
  overflow: auto;
  display: grid;
  gap: 0.25rem;
}

.book-log-entry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
}

.book-log-entry b {
  font-weight: 700;
}

.book-log-entry i {
  font-style: normal;
  color: #6b7680;
}

@media print {
  .book-log,
  .book-sync-status { display: none !important; }
}

/* The family page, after the ledger: who is who. */
.book-page--family {
  display: flex;
  flex-direction: column;
  padding: clamp(1.4rem, 4vw, 3.2rem);
  background: #f4f0e7;
  color: var(--ink);
}

.book-page--family h3 {
  max-width: 10ch;
  margin: 0.6rem 0 0.4rem;
  font-size: clamp(1.3rem, 3.4vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.book-family-intro {
  max-width: 30em;
  margin: 0 0 clamp(0.5rem, 1.4vw, 1rem);
  color: var(--ink-soft);
  font-size: clamp(0.52rem, 0.95vw, 0.68rem);
  font-style: italic;
  line-height: 1.45;
}

.book-family-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.book-page--family-right .book-family-list {
  margin-top: clamp(1rem, 2.6vw, 2rem);
}

.book-family-item {
  padding: clamp(0.3rem, 0.7vw, 0.5rem) 0;
  border-top: 1px solid rgba(23, 33, 42, 0.22);
}

.book-family-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
  margin: 0;
}

.book-family-name {
  font-size: clamp(0.72rem, 1.4vw, 0.98rem);
  font-weight: 400;
}

.book-family-called {
  color: var(--ink-soft);
  font-size: clamp(0.6rem, 1.15vw, 0.78rem);
  font-style: italic;
}

.book-family-full {
  margin: 0 0 0;
  color: var(--ink-soft);
  font-size: clamp(0.52rem, 0.95vw, 0.68rem);
  font-style: italic;
}

.book-family-relation {
  max-width: 34em;
  margin: 0.1rem 0 0;
  font-size: clamp(0.54rem, 1vw, 0.7rem);
  line-height: 1.35;
}

.book-family-note {
  margin: auto 0 0;
  padding-top: 0.6rem;
  font-size: clamp(0.62rem, 1.2vw, 0.85rem);
  font-style: italic;
}

/* The family page is edited in place. An empty field shows a faint prompt
   on the desk only; each name carries its order and a way off the page on
   hover or focus, and the list ends with a way on. Readers and the press
   see none of it (the viewer rule above hides every action bar; print
   hides the prompts). */
.book-family-item {
  position: relative;
}

.book-family-placeholder {
  color: rgba(23, 33, 42, 0.36);
}

.book-family-name[data-book-opens-painting] {
  cursor: pointer;
}

.book-family-tools {
  position: absolute;
  z-index: 31;
  display: flex;
  gap: 0.25rem;
}

.book-family-tools--person {
  top: 0.3rem;
  right: 0;
  opacity: 0;
  transition: opacity 120ms ease;
}

.book-family-item:hover .book-family-tools--person,
.book-family-item:focus-within .book-family-tools--person {
  opacity: 1;
}

.book-family-tools--person .book-action {
  min-width: 1.5rem;
  min-height: 1.5rem;
  padding: 0.3rem 0.5rem;
  font-size: 0.5rem;
}

.book-family-tools--add {
  position: static;
  margin-top: 0.7rem;
}

.is-family-viewer .book-family-tools,
.is-arranging-book .book-family-tools,
.has-picked-book-artwork .book-family-tools,
.book-page:has(.is-inline-editing) .book-family-tools {
  display: none !important;
}

/* The painting that stands for a name, beside it while the pointer rests
   there. Out of the pointer's way, so the name stays hoverable. */
.book-family-portrait-pop {
  position: fixed;
  z-index: 62;
  width: min(13rem, 42vw);
  padding: 0.4rem 0.4rem 0.5rem;
  border: 1px solid rgba(23, 33, 42, 0.28);
  border-radius: 0.3rem;
  background: rgba(248, 244, 235, 0.98);
  box-shadow: 0 0.5rem 1.6rem rgba(8, 23, 32, 0.26);
  color: #17212a;
  font-family: var(--serif);
  pointer-events: none;
}

.book-family-portrait-pop picture,
.book-family-portrait-pop img {
  display: block;
  width: 100%;
  height: auto;
}

.book-family-portrait-pop img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.book-family-portrait-caption {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  font-style: italic;
  line-height: 1.3;
}

/* Editor-only: how a painting's names print. Only the editor's page has
   it, so it never reaches the reader or the press. */
.book-names-form {
  margin: 0.2rem 0 0;
  padding: 0.1rem 0.45rem;
  border: 1px solid rgba(23, 33, 42, 0.28);
  border-radius: 1rem;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.book-page--night .book-names-form {
  border-color: rgba(248, 244, 235, 0.5);
  color: rgba(248, 244, 235, 0.85);
}

body.book-names-off .book-names-form {
  display: none !important;
}

/* The roster: what the children call a person, beside the name. */
.family-person-called {
  color: var(--ink-soft);
}

.family-person-called::before {
  content: "· ";
}

.family-person-edit-form--full {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.family-person-edit-form--full .family-field--wide,
.family-person-edit-form--full .family-person-edit-actions {
  grid-column: 1 / -1;
}

.family-person-edit-form--full .family-person-edit-actions {
  justify-content: flex-end;
}

/* The book heading points at the cover; asking Franklin folds away. */

.book-begin-row {
  margin: 0.8rem 0 0;
}

.book-begin {
  background: #b99a61;
  border-color: #b99a61;
  color: #17212a;
}

/* The field-notes lens: the field guide's card, opened beside the square
   or the ledger line the pointer rests on. Fixed to the screen, above the
   wall, and never printed. */
.book-field-notes-specimen,
.book-field-notes-entry {
  cursor: pointer;
}

.book-field-notes-specimen.is-lens-target .book-field-notes-specimen-frame {
  outline: 2px solid #b99a61;
  outline-offset: 2px;
}

.book-field-notes-entry.is-lens-target {
  margin: 0 -0.3rem;
  padding: 0 0.3rem;
  border-radius: 0.2rem;
  background: rgba(185, 154, 97, 0.22);
}

.book-field-notes-entry:focus-visible,
.book-field-notes-specimen:focus-visible {
  outline: 2px solid #b99a61;
  outline-offset: 2px;
}

.book-lens {
  position: fixed;
  z-index: 60;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.8rem;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid rgba(23, 33, 42, 0.22);
  border-radius: 0.4rem;
  background: #f8f4eb;
  color: #17212a;
  box-shadow: 0 1.2rem 3rem rgba(23, 33, 42, 0.28);
  opacity: 0;
  transform: translateY(4px) scale(0.985);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.book-lens.is-open {
  opacity: 1;
  transform: none;
}

.book-lens-close {
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  width: 1.8rem;
  height: 1.8rem;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 33, 42, 0.08);
  color: #17212a;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.book-lens-close:hover,
.book-lens-close:focus-visible {
  background: rgba(23, 33, 42, 0.16);
}

.book-lens-media {
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 15rem;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 42, 0.18);
  background: #e7e2d8;
}

.book-lens-media picture,
.book-lens-media img {
  display: block;
  width: 100%;
  max-height: 15rem;
  object-fit: contain;
}

.book-lens-copy {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.book-lens-kicker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-lens-kicker .field-guide-emblem {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--ink);
}

.book-lens-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.book-lens-line {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.book-lens-bio {
  margin: 0.15rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.book-lens-caption {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-style: italic;
}

.book-lens-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.book-lens-button {
  min-height: 2.2rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid #17212a;
  border-radius: 999px;
  background: #17212a;
  color: #f8f4eb;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}

.book-lens-button--quiet {
  background: transparent;
  color: #17212a;
}

.book-lens-button:hover,
.book-lens-button:focus-visible {
  background: #34424c;
  border-color: #34424c;
  color: #f8f4eb;
}

.book-lens.is-compact .book-lens-media,
.book-lens.is-compact .book-lens-media picture,
.book-lens.is-compact .book-lens-media img {
  max-height: 8rem;
}

@media (max-width: 720px) {
  .book-lens {
    max-height: 80vh;
    overflow: auto;
  }
}

@media print {
  .book-lens { display: none !important; }
  .book-field-notes-specimen.is-lens-target .book-field-notes-specimen-frame,
  .book-field-notes-entry.is-lens-target { outline: 0; background: none; }
}

/* Changing view: the incoming section rises in, the header's switch
   glides. Nothing moves for a reader who asked for less motion. */
@keyframes family-view-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.pilot-page.is-switching-view[data-family-view="book"] .book-preview,
.pilot-page.is-switching-view[data-family-view="wall"] .finished-collection {
  animation: family-view-in 0.38s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.collection-view-switch a {
  transition: background-color 0.24s ease, color 0.24s ease;
}

.pilot-enter {
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.pilot-enter:hover {
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  .pilot-page.is-switching-view .book-preview,
  .pilot-page.is-switching-view .finished-collection {
    animation: none;
  }
}

/* Editing in place is the site's: the note under the heading only shows
   where a reader can click a caption, and not once the desk tools are up. */

.book-heading-edit-note {
  max-width: 34rem;
  margin: 0.6rem 0 0;
  font: 0.8rem/1.5 var(--sans);
  color: #4d5a64;
}

body:not(.can-edit-book) .book-heading-edit-note,
body.is-family-editor .book-heading-edit-note {
  display: none;
}

/* Who is in the painting, on its card: a chip per person in the form the
   painting prints, the roster's line about them beneath. */

.family-dialog-people {
  margin: -0.4rem 0 1.2rem;
  padding: 0.8rem 0 0.9rem;
  border-top: 1px solid var(--interaction-border);
  border-bottom: 1px solid var(--interaction-border);
}

.family-dialog-people-label {
  margin: 0 0 0.55rem;
  font: 700 0.58rem/1.4 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--interaction-muted);
}

.family-dialog-people-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
}

.family-dialog-person {
  display: grid;
  gap: 0.1rem;
  max-width: 100%;
  padding: 0.4rem 0.8rem 0.45rem;
  border: 1px solid rgba(185, 154, 97, 0.7);
  border-radius: 0.9rem;
  background: rgba(185, 154, 97, 0.16);
}

.family-dialog-person b {
  font: 400 1.05rem/1.2 var(--serif);
  color: inherit;
}

.family-dialog-person small {
  font: 0.66rem/1.35 var(--sans);
  color: var(--interaction-muted);
}

.family-dialog-person.is-unnamed {
  border-style: dashed;
  background: transparent;
  font: 0.8rem/1.3 var(--sans);
  color: var(--interaction-muted);
  align-self: center;
}

.family-dialog-people-change {
  margin-top: 0.6rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--interaction-border);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: 700 0.6rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.family-dialog-people-change:hover,
.family-dialog-people-change:focus-visible {
  background: rgba(185, 154, 97, 0.16);
}

.family-dialog-people-line {
  display: block;
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
}

.family-dialog-people-line.book-page-people--empty:not(.is-inline-editing) {
  display: none;
}

/* The statement above the book turns with the pages: a short fade as the
   words change, two lines of room kept so the book below never jumps. */
.book-heading h2 {
  min-height: 1.9em;
  text-wrap: balance;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.book-heading h2.is-turning {
  opacity: 0;
  transform: translateY(0.12em);
}

.book-heading h2.book-title--long {
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  min-height: 2.8em;
  letter-spacing: -0.03em;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .book-heading h2 {
    transition: none;
  }
}

/* Photographs for the next chapter: the ask, the form, and the family's feed on the wall. */
.family-photo-intake {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 1.5rem 3rem;
  align-items: start;
  margin: 0 0 3.2rem;
  padding: 1.6rem 0 1.9rem;
  border-top: 1px solid var(--interaction-border);
  border-bottom: 1px solid var(--interaction-border);
}

.family-photo-intake[hidden],
.family-photo-intake-form[hidden],
.family-photo-intake-empty[hidden],
.family-photo-intake-name[hidden] {
  display: none;
}

.family-photo-intake-ask {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.family-photo-intake-ask h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.family-photo-intake-ask h3 em {
  font-style: italic;
  color: var(--pilot-accent);
}

.family-photo-intake-lead,
.family-photo-intake-privacy,
.family-photo-intake-count,
.family-photo-intake-empty {
  max-width: 34rem;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.55;
}

.family-photo-intake-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  justify-self: start;
  min-height: 3rem;
  padding: 0.9rem 1.25rem;
  border: 1px solid var(--pilot-blue);
  background: var(--pilot-blue);
  color: var(--pilot-cream);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.family-photo-intake-button:hover,
.family-photo-intake-button:focus-visible {
  background: transparent;
  color: var(--pilot-blue);
}

.family-photo-intake-button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.family-photo-intake-status {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--interaction-ink);
}

.family-photo-intake-status:empty,
.family-photo-intake-count:empty {
  display: none;
}

.family-photo-intake-form {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--interaction-border);
  background: var(--interaction-surface-raised);
}

.family-photo-intake-form input[type="file"] {
  padding: 0.35rem 0;
  font: 0.82rem/1.4 var(--sans);
}

.family-photo-intake-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem 1rem;
}

.family-photo-intake-privacy {
  flex: 1 1 14rem;
  font-size: 0.7rem;
  color: var(--interaction-muted);
}

.family-photo-intake-feed {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.family-photo-intake-count {
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--interaction-muted);
}

.family-photo-intake-list {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.family-photo-intake-list:empty {
  display: none;
}

.family-photo-intake-card {
  display: grid;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.9rem;
  border: 1px solid var(--interaction-border);
  border-left: 3px solid var(--interaction-border-strong);
  background: var(--interaction-surface-raised);
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--interaction-ink);
}

.family-photo-intake-card.is-painting {
  border-left-color: var(--pilot-accent);
}

.family-photo-intake-card.is-painted {
  border-left-color: var(--interaction-save);
}

/* Each card folds to its head line behind a chevron and opens only when
   asked; the opened ones stay open while the feed refreshes. */
.family-photo-intake-fold {
  display: block;
  margin: -0.85rem -1rem -0.9rem;
}

.family-photo-intake-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.7rem;
  padding: 0.85rem 2.6rem 0.9rem 1rem;
  position: relative;
  cursor: pointer;
  list-style: none;
}

.family-photo-intake-card-head::-webkit-details-marker {
  display: none;
}

.family-photo-intake-card-head::after {
  position: absolute;
  top: 0.75rem;
  right: 0.9rem;
  width: 1.4rem;
  content: "⌄";
  color: var(--interaction-muted);
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  transition: transform 160ms ease;
}

.family-photo-intake-fold[open] > .family-photo-intake-card-head::after {
  transform: rotate(180deg);
}

.family-photo-intake-card-head:hover,
.family-photo-intake-card-head:focus-visible {
  background: rgba(223, 229, 229, 0.3);
}

.family-photo-intake-card-head:focus-visible {
  outline: none;
  box-shadow: inset var(--interaction-focus);
}

.family-photo-intake-glimpse {
  flex-basis: 100%;
  overflow: hidden;
  color: var(--interaction-muted);
  font-family: var(--serif);
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.family-photo-intake-fold[open] > .family-photo-intake-card-head > .family-photo-intake-glimpse {
  display: none;
}

.family-photo-intake-body {
  display: grid;
  gap: 0.5rem;
  padding: 0 1rem 0.9rem;
}

.family-photo-intake-who {
  font-weight: 700;
}

.family-photo-intake-when {
  color: var(--interaction-muted);
  font-size: 0.72rem;
}

.family-photo-intake-state {
  margin-left: auto;
  padding: 0.14rem 0.55rem;
  border: 1px solid var(--interaction-border);
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--interaction-muted);
}

.family-photo-intake-state.is-painting {
  border-color: var(--pilot-accent);
  color: #7d6535;
}

.family-photo-intake-state.is-painted {
  border-color: var(--interaction-save);
  color: var(--interaction-save);
}

.family-photo-intake-state.is-later,
.family-photo-intake-state.is-held {
  border-color: var(--interaction-border-strong);
  color: var(--interaction-ink);
  font-style: normal;
}

.family-photo-intake-form select {
  min-height: 2.2rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(23, 33, 42, 0.42);
  background: #fff;
  color: #17212a;
  font: 0.88rem/1.4 var(--serif);
}

.family-photo-intake-state.is-inbox {
  border-color: var(--interaction-like);
  color: var(--interaction-like);
}

.family-photo-intake-state + .family-photo-intake-state {
  margin-left: 0;
}

.family-photo-intake-note {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--interaction-ink);
}

.family-photo-intake-became {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.5rem;
  border: 1px solid var(--interaction-border);
  background: var(--interaction-surface);
  color: inherit;
  text-decoration: none;
}

.family-photo-intake-became img {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
}

.family-photo-intake-became span {
  font-size: 0.78rem;
  line-height: 1.45;
}

.family-photo-intake-became em {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
}

.family-photo-intake-became:hover em,
.family-photo-intake-became:focus-visible em {
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.family-photo-intake-replies {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.family-photo-intake-replies:empty {
  display: none;
}

.family-photo-intake-reply {
  margin: 0;
  font-size: 0.8rem;
}

.family-photo-intake-reply b {
  font-weight: 700;
  margin-right: 0.35rem;
}

.family-photo-intake-reply-when {
  margin-left: 0.4rem;
  color: var(--interaction-muted);
  font-size: 0.68rem;
}

.family-photo-intake-card-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem;
  align-items: center;
}

.family-photo-intake-cheer {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--interaction-border-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--interaction-ink);
  cursor: pointer;
  font: 700 0.62rem/1 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.family-photo-intake-cheer .heart {
  font-size: 0.9rem;
  line-height: 1;
  color: var(--interaction-like);
}

.family-photo-intake-cheer.is-mine {
  border-color: var(--interaction-like);
  background: rgba(155, 80, 71, 0.08);
}

.family-photo-intake-reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.4rem;
}

.family-photo-intake-reply-form input {
  min-width: 0;
  min-height: 2rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--interaction-border-strong);
  background: #fff;
  color: var(--interaction-ink);
  font: 0.85rem/1.4 var(--serif);
}

.family-photo-intake-name {
  grid-column: 1 / -1;
}

.family-photo-intake-cheerers {
  margin: 0;
  font-size: 0.7rem;
  color: var(--interaction-muted);
}

.book-intake-pointer[hidden] {
  display: none;
}

.book-intake-pointer a {
  color: inherit;
  text-decoration-color: var(--interaction-border-strong);
  text-underline-offset: 0.15em;
}

@media (max-width: 900px) {
  .family-photo-intake {
    grid-template-columns: 1fr;
    gap: 1.4rem;
  }

  .family-photo-intake-state {
    margin-left: 0;
  }

  .family-photo-intake-card-actions {
    grid-template-columns: 1fr;
  }
}

/* Canonical plates: the whole family outside any chapter (September 5,
   2026). The painting is shown whole on a paper ground, never cropped, so
   nobody at the ends of the row leaves the page; the closing plate is a
   night painting and takes the night ground. */
.book-page--canonical .book-page-media {
  background: transparent;
}

.book-page--canonical .book-page-media img {
  object-fit: contain;
}

.book-page--canonical.book-page--night .book-page-media {
  background: transparent;
}

.book-page--canonical-words h3 {
  max-width: 10ch;
}

/* On a canonical plate everyone stands in a line, so the names are a key:
   a small "Left to right" above them, in the order they stand. */
.book-people-order {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--sans);
  font-size: clamp(0.42rem, 0.7vw, 0.52rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0.8;
}

.book-page--night .book-people-order {
  color: rgba(248, 244, 235, 0.72);
}

.book-people-block--in-line .book-page-people {
  margin-top: 0.1rem;
}

/* The steward's door. Quiet by design: the family never opens it, so it has
   no button anywhere on the page and appears only at its own address. */
.family-steward-door {
  position: relative;
  max-width: 30rem;
  padding: clamp(1.4rem, 4vw, 2rem);
  border: 1px solid var(--interaction-border);
  border-radius: 2px;
  background: var(--interaction-surface-raised);
  color: var(--interaction-ink);
  font-family: var(--sans);
}

.family-steward-door::backdrop {
  background: rgba(16, 22, 28, 0.55);
}

.family-steward-title {
  margin: 0 0 0.6rem;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.family-steward-line {
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--interaction-muted);
}

/* The recovery codes, when they are shown the one time they exist. */
.family-steward-line:last-of-type:not(:first-of-type) {
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--interaction-ink);
  word-spacing: 0.5rem;
}

.family-steward-code {
  width: 100%;
  margin: 0 0 0.9rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--interaction-border-strong);
  background: var(--interaction-surface);
  font: 400 0.9rem/1.2 var(--sans);
  color: var(--interaction-ink);
}

.family-steward-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.4rem;
}

.family-steward-close {
  position: absolute;
  top: 0.5rem;
  right: 0.6rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: var(--interaction-muted);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.family-steward-close:hover,
.family-steward-close:focus-visible {
  color: var(--interaction-ink);
}
