:root {
  /* Lets native controls and scrollbars follow the theme instead of staying
     light-mode bright against a dark page. */
  color-scheme: light dark;

  --bg: #f6f7f9;
  --panel: #ffffff;
  --sunken: #f0f2f5;
  --border: #e3e6ea;
  --text: #1c1f23;
  --muted: #7a828c;
  --accent: #2f6fed;
  --accent-soft: #e8f0fe;
  --danger: #d1443c;
  --ok: #2c9c62;
  --line: #b9c1cc;

  /* The ring around a face — the one thing on a card you can read at arm's
     length across four generations. Quiet on purpose: a hint, not a label. */
  --male: #5b8def;
  --female: #d9668f;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.06);

  /* Must match CARD_W and CARD_H in js/layout.js — the layout maths and the
     drawing have to agree on how big a person is. */
  --card-w: 152px;
  --card-h: 148px;
  --avatar: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --panel: #1c1f24;
    --sunken: #23272e;
    --border: #2b3038;
    --text: #e7eaee;
    --muted: #949ca7;
    --accent: #6f9dff;
    --accent-soft: #21304d;
    --danger: #f0736a;
    --ok: #5ac48b;
    --line: #4b5460;
    --male: #6f9dff;
    --female: #e58aa9;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%; /* iOS otherwise inflates text in landscape */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  /* The canvas is dragged, so a drag that runs past the tree must not turn into
     pull-to-refresh or rubber-band the whole app. */
  overscroll-behavior: none;
}

/**
 * The `hidden` attribute is only `display: none` in the UA stylesheet, which any
 * class setting a display loses to — and several here do. Without this, hiding
 * a panel by setting `hidden` leaves it on screen.
 */
[hidden] {
  display: none !important;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Shell ---------- */

.app {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  height: 100dvh; /* follows the mobile toolbars as they hide and reappear */
}

/* ---------- Top bar ---------- */

.topbar {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  grid-column: 1 / -1;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  z-index: 3;
}

.topbar__title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.topbar__identity {
  align-items: center;
  display: flex;
  gap: 10px;
  min-width: 0;
}

.topbar__text-toggle {
  flex: none;
}

.topbar__meta {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 10px;
  min-width: 0;
}

.topbar__actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.status {
  color: var(--muted);
  font-size: 12px;
}

.status--error {
  color: var(--danger);
}

/* ---------- Buttons ---------- */

.btn {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.btn:disabled {
  cursor: default;
  opacity: 0.45;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
}

.btn--primary:hover:not(:disabled) {
  color: #fff;
  filter: brightness(1.08);
}

.btn--quiet {
  background: var(--sunken);
}

.btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.btn--danger {
  color: var(--danger);
  width: 100%;
}

.btn--danger:hover:not(:disabled) {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.icon-btn {
  background: none;
  border: none;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 2px 7px;
}

.icon-btn:hover {
  background: var(--sunken);
  color: var(--text);
}

/* ---------- Canvas ---------- */

.canvas {
  contain: paint;
  cursor: grab;
  grid-column: 2;
  grid-row: 2;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
  /* A drag has to pan the tree, which means the browser must not claim it for
     scrolling first. This also disables the native pinch — see viewport.js. */
  touch-action: none;
}

.canvas.is-panning {
  cursor: grabbing;
}

.stage {
  left: 0;
  position: absolute;
  top: 0;
  transform-origin: 0 0;
}

.links {
  left: 0;
  overflow: visible;
  pointer-events: none;
  position: absolute;
  top: 0;
}

.links line {
  stroke: var(--line);
  stroke-width: 1.5;
}

.links .mark {
  fill: var(--panel);
  stroke: var(--line);
  stroke-width: 1.5;
}

.cards {
  left: 0;
  position: absolute;
  top: 0;
  /* Dragging the canvas must not sweep a selection across every name it passes. */
  user-select: none;
  -webkit-user-select: none;
}

/* ---------- A person ---------- */

.card {
  background: var(--card-bg, var(--panel));
  border: 1px solid var(--card-border, var(--border));
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: var(--card-h);
  left: 0;
  padding: 12px 10px 10px;
  position: absolute;
  text-align: center;
  top: 0;
  transition: opacity 0.15s ease, border-color 0.12s ease;
  width: var(--card-w);
  will-change: transform;
}

.card[data-color='slate'] {
  --card-bg: var(--panel);
  --card-border: var(--border);
}

.card[data-color='red'] {
  --card-bg: #ffe4e6;
  --card-border: #fb7185;
}

.card[data-color='orange'] {
  --card-bg: #ffedd5;
  --card-border: #fb923c;
}

.card[data-color='yellow'] {
  --card-bg: #fef3c7;
  --card-border: #facc15;
}

.card[data-color='green'] {
  --card-bg: #dcfce7;
  --card-border: #4ade80;
}

.card[data-color='blue'] {
  --card-bg: #dbeafe;
  --card-border: #60a5fa;
}

.card[data-color='purple'] {
  --card-bg: #ede9fe;
  --card-border: #a78bfa;
}

.card[data-color='pink'] {
  --card-bg: #fce7f3;
  --card-border: #f472b6;
}

@media (prefers-color-scheme: dark) {
  .card[data-color='red'] {
    --card-bg: #3a2027;
    --card-border: #c94b63;
  }

  .card[data-color='orange'] {
    --card-bg: #382716;
    --card-border: #d97830;
  }

  .card[data-color='yellow'] {
    --card-bg: #34300f;
    --card-border: #d8b41b;
  }

  .card[data-color='green'] {
    --card-bg: #17301f;
    --card-border: #48a968;
  }

  .card[data-color='blue'] {
    --card-bg: #172a44;
    --card-border: #4f83d8;
  }

  .card[data-color='purple'] {
    --card-bg: #282142;
    --card-border: #8266cf;
  }

  .card[data-color='pink'] {
    --card-bg: #3a2034;
    --card-border: #c45b9b;
  }
}

/* Lifted so the "+ spouse" pill, which reaches past the card's own edge, is
   never drawn underneath the neighbour it points at. */
.card:hover,
.card.is-selected {
  z-index: 2;
}

.card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow);
}

.card__face {
  align-items: center;
  background: var(--sunken);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--male);
  display: flex;
  flex: none;
  height: var(--avatar);
  justify-content: center;
  margin: 0 auto;
  overflow: hidden;
  width: var(--avatar);
}

.card__face[data-gender='f'] {
  box-shadow: 0 0 0 2px var(--female);
}

.card__photo {
  display: none;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.card__face.has-photo .card__photo {
  display: block;
}

.card__face.has-photo .card__initials {
  display: none;
}

.card__initials {
  color: var(--muted);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.5px;
  user-select: none;
}

/* Centred in the space under the avatar, which is fixed so that a marriage bar
   always meets two faces at the same height however long the names are. */
.card__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.card__name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  /* Two lines, then an ellipsis. A long name must never push the years out of a
     card whose height the layout has already committed to. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

/* One line, whatever is in it: the note, the off-branch marriage, or both. */
.card__meta {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card__chip {
  color: var(--accent);
}

/* The three ways to grow the tree, sitting on the side the new card appears. */
.card__add {
  background: var(--accent);
  border: none;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  min-height: 38px;
  opacity: 0;
  padding: 10px 16px;
  position: absolute;
  transition: opacity 0.12s ease;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.card:hover .card__add,
.card.is-selected .card__add,
.card__add:focus-visible {
  opacity: 1;
}

.card__add:hover {
  filter: brightness(1.1);
}

.card__add--up {
  left: 50%;
  min-width: 104px;
  top: -19px;
  transform: translateX(-50%);
}

.card__add--down {
  bottom: -19px;
  left: 50%;
  min-width: 90px;
  transform: translateX(-50%);
}

.card__add--side {
  left: 100%;
  margin-left: 10px;
  min-width: 104px;
  top: 50%;
  transform: translateY(-50%);
}

/* ---------- Zoom controls ---------- */

.zoom {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: var(--shadow);
  display: flex;
  left: 16px;
  overflow: hidden;
  position: absolute;
}

.zoom__btn {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  padding: 6px 13px;
  touch-action: manipulation;
}

.zoom__btn:hover {
  background: var(--sunken);
}

.zoom__level {
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  min-width: 62px;
}

/* ---------- Empty state ---------- */

.empty {
  left: 50%;
  max-width: 380px;
  padding: 0 20px;
  position: absolute;
  text-align: center;
  top: 45%;
  transform: translate(-50%, -50%);
}

.empty h2 {
  font-size: 17px;
  margin: 0 0 8px;
}

.empty p {
  color: var(--muted);
  margin: 0 0 16px;
}

/* ---------- Panel ---------- */

.panel {
  background: var(--panel);
  border-left: 1px solid var(--border);
  grid-column: 3;
  grid-row: 2;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  width: 330px;
  z-index: 2;
}

.panel__head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.panel__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}

.panel__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel__adders,
.panel__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.panel__foot {
  margin-top: 4px;
}

/* ---------- The photo, big enough to actually look at ---------- */

.photo {
  align-items: center;
  align-self: center;
  background: var(--sunken);
  border: 2px dashed var(--border);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  height: 128px;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: border-color 0.12s ease;
  width: 128px;
}

.photo:hover,
.photo:focus-visible,
.photo.is-dropping {
  border-color: var(--accent);
  outline: none;
}

.photo__img {
  display: none;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.photo.has-photo .photo__img {
  display: block;
}

.photo.has-photo .photo__initials {
  display: none;
}

.photo__initials {
  color: var(--muted);
  font-size: 34px;
  font-weight: 600;
}

/* An overlay rather than a line of text inside the circle: at 104px there is no
   room beside the initials for a caption, and it landed on top of them. */
.photo__hint {
  align-items: flex-end;
  background: linear-gradient(transparent 35%, rgba(0, 0, 0, 0.55));
  color: #fff;
  display: flex;
  font-size: 10px;
  inset: 0;
  justify-content: center;
  line-height: 1.2;
  opacity: 0;
  padding: 0 12px 14px;
  position: absolute;
  text-align: center;
  transition: opacity 0.12s ease;
}

.photo:hover .photo__hint,
.photo:focus-visible .photo__hint,
.photo.is-dropping .photo__hint {
  opacity: 1;
}

.photo__actions {
  display: flex;
  gap: 6px;
  justify-content: center;
}

/* ---------- Fields ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.field-row {
  display: flex;
  gap: 8px;
}

.field-row .field {
  flex: 1;
}

.field__label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.field__hint {
  color: var(--muted);
  font-size: 11px;
}

.input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: inherit;
  font: inherit;
  font-size: 13px;
  padding: 7px 10px;
  width: 100%;
}

.input:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.input--area {
  line-height: 1.45;
  resize: vertical;
}

.segmented {
  display: flex;
}

.segmented button {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  flex: 1;
  font: inherit;
  font-size: 12px;
  padding: 6px 4px;
  touch-action: manipulation;
}

.segmented button:first-child {
  border-radius: 8px 0 0 8px;
}

.segmented button:last-child {
  border-radius: 0 8px 8px 0;
}

.segmented button + button {
  border-left: none;
}

.segmented button.is-on {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 500;
}

/* Without this the neighbour's left border, removed above, leaves the selected
   button looking open on one side. */
.segmented button.is-on + button {
  border-left: 1px solid var(--accent);
}

.swatches {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatches button {
  background: var(--swatch, var(--panel));
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  flex: none;
  height: 18px;
  padding: 0;
  touch-action: manipulation;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
  width: 18px;
  -webkit-tap-highlight-color: transparent;
}

.swatches button:hover,
.swatches button:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.swatches button.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.swatches button:active {
  transform: scale(0.96);
}

.swatches button[data-color='slate'] {
  --swatch: #cbd5e1;
}

.swatches button[data-color='red'] {
  --swatch: #fb7185;
}

.swatches button[data-color='orange'] {
  --swatch: #fb923c;
}

.swatches button[data-color='yellow'] {
  --swatch: #facc15;
}

.swatches button[data-color='green'] {
  --swatch: #4ade80;
}

.swatches button[data-color='blue'] {
  --swatch: #60a5fa;
}

.swatches button[data-color='purple'] {
  --swatch: #a78bfa;
}

.swatches button[data-color='pink'] {
  --swatch: #f472b6;
}

/* ---------- Relations ---------- */

.section {
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
}

.section__title {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
  text-transform: uppercase;
}

.rel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.rel__item {
  align-items: center;
  display: flex;
  gap: 8px;
}

.rel__kind {
  color: var(--muted);
  flex: none;
  font-size: 11px;
  width: 66px;
}

.rel__name {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  flex: 1;
  font: inherit;
  font-size: 13px;
  overflow: hidden;
  padding: 3px 0;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rel__name:hover {
  color: var(--accent);
  text-decoration: underline;
}

.rel__cut {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  padding: 2px 5px;
}

.rel__item:hover .rel__cut,
.rel__cut:focus-visible {
  opacity: 1;
}

.rel__cut:hover {
  color: var(--danger);
}

.rel__empty {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- Toast ---------- */

.toast {
  background: var(--text);
  border-radius: var(--radius);
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  color: var(--bg);
  font-size: 13px;
  left: 50%;
  max-width: min(420px, calc(100vw - 32px));
  opacity: 0;
  padding: 9px 14px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 8px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 10;
}

.toast[data-tone='error'] {
  background: var(--danger);
  color: #fff;
}

.toast[data-tone='ok'] {
  background: var(--ok);
  color: #fff;
}

.toast.is-up {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- The text editor ---------- */

.editor {
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  overflow: hidden;
  width: min(430px, 38vw);
  z-index: 2;
}

.editor__sheet {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 0;
  padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  width: 100%;
}

.editor__head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.editor__intro {
  margin: 0;
}

.editor__legend {
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  max-height: 34vh;
  overflow: auto;
  padding: 8px 10px;
}

.editor__legend summary {
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.editor__legend p {
  color: var(--muted);
  margin: 8px 0 0;
}

.editor__legend table {
  border-collapse: collapse;
  margin-top: 8px;
  width: 100%;
}

.editor__legend th,
.editor__legend td {
  border-top: 1px solid var(--border);
  padding: 5px 8px 5px 0;
  text-align: left;
  vertical-align: top;
}

.editor__legend th {
  font-weight: 500;
  white-space: nowrap;
}

.editor__legend td {
  color: var(--muted);
  font-weight: 400;
}

.editor__legend code {
  background: var(--sunken);
  border-radius: 4px;
  padding: 1px 4px;
}

/* Monospace, and wrapping is safe now that no line is ever indented: a wrapped
   continuation has no `-` or `&` in front of it, so it cannot be mistaken for a
   line of its own — and nothing has to be scrolled sideways to be read. */
.editor__text {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: inherit;
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  min-height: 0;
  overflow: auto;
  padding: 10px 12px;
  resize: none;
  white-space: pre-wrap;
}

.editor__text:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.editor__report {
  font-size: 12px;
  min-height: 18px;
}

.editor__report--ok {
  color: var(--muted);
}

.editor__report--error {
  color: var(--danger);
}

.editor__foot {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 820px) {
  .app {
    grid-template-columns: 1fr;
  }

  .canvas {
    grid-column: 1;
    grid-row: 2;
  }

  .topbar__meta {
    order: 3;
    width: 100%;
  }

  /* A drawer beside the tree becomes a sheet under it: 330px of panel on a
     phone would leave nothing to look at. */
  .panel {
    border-left: none;
    border-top: 1px solid var(--border);
    bottom: 0;
    box-shadow: var(--shadow);
    left: 0;
    max-height: 62dvh;
    position: fixed;
    right: 0;
    width: auto;
  }

  .photo {
    height: 104px;
    width: 104px;
  }

  .zoom {
    bottom: auto;
    top: 12px;
  }

  .editor {
    border-right: 1px solid var(--border);
    bottom: 0;
    box-shadow: var(--shadow);
    left: 0;
    position: fixed;
    top: 0;
    width: min(420px, 100vw);
    z-index: 6;
  }

  .editor__sheet {
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
  }

  /* The legend is reference material, and on a phone it costs more room than the
     thing it explains. */
  .editor__legend,
  .editor__intro {
    display: none;
  }
}

/* ---------- Printing ---------- */

/**
 * The screen shows a window onto the tree; a printer should get all of it.
 * app.js scales the stage to the page width before the print dialog opens and
 * puts it back afterwards — everything here is about getting the chrome out of
 * the way and forcing the light palette, because a dark card is a black
 * rectangle on paper.
 */
@media print {
  .topbar,
  .editor,
  .panel,
  .zoom,
  .toast,
  .empty,
  .card__add {
    display: none !important;
  }

  :root {
    --bg: #ffffff;
    --panel: #ffffff;
    --sunken: #f2f2f2;
    --border: #cccccc;
    --text: #000000;
    --muted: #555555;
    --line: #888888;
    --shadow: none;
  }

  html,
  body,
  .app {
    background: #fff;
    display: block;
    height: auto;
  }

  .canvas {
    contain: none;
    overflow: visible;
    position: relative;
  }

  .card {
    box-shadow: none;
    /* A card split across two sheets is the one thing that makes a printed
       family tree unreadable. */
    break-inside: avoid;
  }
}
