@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/cormorant-cyr.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/cormorant-latin.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/cormorant-italic-cyr.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('assets/fonts/cormorant-italic-latin.woff2') format('woff2');
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Golos Text';
  src: url('assets/fonts/golos-cyr.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Golos Text';
  src: url('assets/fonts/golos-latin.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --paper: #f8f5ed;
  --paper-deep: #f0ebdd;
  --header: #fbf9f3;
  --mat: #fffcf5;
  --sage: #e6ebdf;
  --ink: #26382e;
  --olive: #45634e;
  --olive-deep: #344e3d;
  --muted: #515a4c;
  --line: #c8cbbd;
  --on-olive: #fffdf7;
  --placeholder: #e2ded0;
  --overlay: rgba(25, 33, 27, .96);
  --overlay-line: #9caa9e;
  --shadow: 0 2px 5px rgba(41, 36, 25, .06), 0 14px 32px rgba(41, 36, 25, .10);
  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --body: 'Golos Text', Arial, sans-serif;
  --header-offset: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font: 1rem/1.6 var(--body);
}

body.modal-open,
body.presentation { overflow: hidden; }

h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
button { color: inherit; font: inherit; }
a:focus, button:focus { outline: 3px solid var(--olive); outline-offset: 4px; }
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: none; }
.page h1:focus, .page h2:focus { outline: none; }

.wrap {
  width: calc(100% - 96px);
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
}

.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 10;
  padding: .6rem 1rem;
  transform: translateY(-160%);
  background: var(--mat);
}

.skip-link:focus { transform: translateY(0); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--header);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: calc(var(--header-offset) - 1px);
  gap: 2rem;
}

.brand {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  font: 500 1.56rem/.95 var(--display);
  white-space: nowrap;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 1.95rem;
  height: 1.95rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--olive);
  font: 1.3rem/1 Georgia, serif;
}

.site-nav {
  display: flex;
  gap: 1.9rem;
  color: var(--muted);
  font-size: .875rem;
}

.site-nav a {
  position: relative;
  display: block;
  padding: .75rem 0;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current] { color: var(--ink); }

.site-nav a[aria-current]::after {
  position: absolute;
  right: 0;
  bottom: .42rem;
  left: 0;
  height: 1px;
  background: var(--olive);
  content: '';
}

.button {
  display: inline-flex;
  width: max-content;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: .6em;
  padding: .7em 1.3em;
  border: 1px solid transparent;
  border-radius: .45rem;
  background: transparent;
  color: inherit;
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.button:disabled {
  opacity: .56;
  cursor: default;
}

.primary {
  border-color: var(--olive);
  background: var(--olive);
  color: var(--on-olive);
}

.primary:hover:not(:disabled) {
  border-color: var(--olive-deep);
  background: var(--olive-deep);
}

.outline,
.tv-toggle { border-color: var(--line); }
.tv-toggle-short { display: none; }

.outline:hover:not(:disabled),
.tv-toggle:hover {
  border-color: var(--olive);
  background: var(--paper-deep);
}

.tv-toggle {
  justify-self: end;
  min-height: 43px;
  border-radius: 2em;
  padding-right: 1.1em;
  padding-left: 1.1em;
}

.screen-icon {
  position: relative;
  width: 1.08em;
  height: .72em;
  margin-bottom: .17em;
  border: 1px solid currentColor;
  border-radius: .14em;
}

.screen-icon::after {
  position: absolute;
  right: 23%;
  bottom: -.26em;
  left: 23%;
  height: 1px;
  background: currentColor;
  content: '';
}

.page { scroll-margin-top: var(--header-offset); }
.cover { background: radial-gradient(ellipse at 95% 90%, var(--paper-deep), var(--paper) 65%); }

.cover-inner,
.letter-inner {
  display: grid;
  align-items: center;
}

.cover-inner {
  min-height: 608px;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  gap: 4.3%;
  padding-top: 65px;
  padding-bottom: 73px;
}

.cover-copy { padding-bottom: .5rem; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: .8em;
  margin-bottom: 1.4rem;
  color: var(--olive);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.9em;
  height: 1px;
  background: currentColor;
  content: '';
}

h1, h2 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -.04em;
}

h1 {
  font-size: 5.5rem;
  font-size: clamp(3.6rem, 6.65vw, 6.2rem);
  line-height: .91;
}

h1 em, h2 em { color: var(--olive); }
.cover-subtitle {
  margin-top: 1.62rem;
  color: var(--muted);
  font-size: 1.07rem;
}

.cover-action {
  margin-top: 1.65rem;
  padding: .85em 1.4em;
}

.print {
  --mat-inset: 10px;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: var(--mat-inset);
  padding-bottom: 0;
  border: 1px solid var(--mat);
  border-radius: 3px;
  background: var(--mat);
  box-shadow: var(--shadow);
}

.cover-print,
.letter-print { --mat-inset: 13px; }

.photo-media {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  flex: 1 0 auto;
  overflow: hidden;
  aspect-ratio: 1.5;
  border-radius: 1px;
  background: var(--placeholder);
}

.photo-media picture,
.photo-media img,
.photo-media .photo-bitmap {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.photo-media img,
.photo-media .photo-bitmap {
  color: var(--ink);
  object-fit: cover;
}

.photo-media.is-missing picture,
.lightbox-media.is-missing picture { visibility: hidden; }

[data-photo="greeting"] .photo-media img,
[data-photo="greeting"] .photo-media .photo-bitmap {
  transform: scale(1.15);
  transform-origin: top center;
}

.photo-open {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: zoom-in;
}

.photo-open:focus {
  outline: 3px solid var(--on-olive);
  outline-offset: -6px;
}

.photo-open::after {
  position: absolute;
  top: .65em;
  right: .65em;
  display: grid;
  width: 1.8em;
  height: 1.8em;
  place-items: center;
  border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / .62em 1px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 1px .62em no-repeat,
    var(--mat);
  font-size: 1.15rem;
  content: '';
  opacity: 0;
  transition: opacity .18s ease;
}

@media (hover: hover) {
  .photo-open:hover::after { opacity: 1; }
}

@media (hover: none) {
  .photo-open::after { opacity: 1; }
}

.photo-open:focus-visible::after { opacity: 1; }

.photo-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
}

.print figcaption {
  padding: .7em .28em .75em;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.35;
}

.cover-print figcaption,
.letter-print figcaption {
  padding: .52em .25em .6em;
  font: italic 500 1.26rem/1.15 var(--display);
}

.memories {
  background: var(--sage);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.memories + .memories { border-top: 0; }
.memories:nth-of-type(odd) { background: var(--paper); }

.memories-inner {
  padding-top: 70px;
  padding-bottom: 64px;
}

.memories-heading {
  margin-bottom: 37px;
  text-align: center;
}

h2 {
  font-size: 4rem;
  font-size: clamp(2.8rem, 5.1vw, 4.65rem);
  line-height: .98;
}

.chapter-title {
  font: 500 clamp(2.35rem, 4vw, 3.65rem)/1 var(--display);
}

.memories-title + .chapter-title {
  margin-top: 1.15rem;
  color: var(--olive);
}

.chapter-description {
  max-width: 42rem;
  margin: .7rem auto 0;
  color: var(--muted);
  line-height: 1.5;
  text-wrap: pretty;
}

.edit-photos { margin-top: 1.1rem; }

.memories-heading::after {
  display: block;
  width: 2.9rem;
  height: 1px;
  margin: 1.25rem auto 0;
  background: var(--olive);
  content: '';
}

.chapter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.75rem, 1.6vw, 1.3rem);
}

.chapter-grid[data-count="1"] {
  width: 100%;
  max-width: 50rem;
  grid-template-columns: minmax(0, 1fr);
  margin-inline: auto;
}

.chapter-grid[data-count="2"],
.chapter-grid[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chapter-grid .print,
.letter-print { padding-bottom: var(--mat-inset); }

.chapter-grid .photo-media,
.letter-print .photo-media {
  aspect-ratio: 4 / 3;
  background: var(--paper-deep);
}
.memories-actions { margin-top: 37px; text-align: center; }

.letter-inner {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 8%;
  padding-block: clamp(3rem, 5vw, 4.5rem);
}

.letter-copy { max-width: 33rem; }

.letter-copy h2 { margin-bottom: 1.4rem; }
.letter-copy h2 em { white-space: nowrap; }

.letter-mark {
  display: flex;
  align-items: center;
  gap: .45em;
  margin-bottom: .6em;
  color: var(--olive);
  font: 1.55rem/1 Georgia, serif;
}

.letter-mark::after {
  width: 1.65em;
  height: 1px;
  background: var(--line);
  content: '';
}

.letter-copy p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.letter-copy p + p { margin-top: .85em; }

.letter-copy .signature {
  margin-top: .85em;
  color: var(--olive);
  font: italic 500 1.9rem/1.2 var(--display);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--header);
  color: var(--muted);
  font-size: .875rem;
}

.footer-inner {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-inner a {
  margin-left: auto;
  padding: .65rem 0;
  text-underline-offset: .24em;
}

.footer-inner a:hover { color: var(--ink); }

.photo-editor,
.editor-preview {
  width: min(72rem, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.photo-editor::backdrop,
.editor-preview::backdrop { background: rgba(25, 33, 27, .72); }

.editor-heading,
.editor-footer {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1rem 1.35rem;
  background: var(--mat);
}

.editor-heading {
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}

.editor-heading h2 {
  flex: 1;
  font-size: clamp(2rem, 4vw, 3rem);
}

.editor-heading select {
  min-height: 44px;
  padding: .5em .7em;
  border: 1px solid var(--olive);
  border-radius: .3rem;
  background: var(--mat);
  color: var(--ink);
  font: inherit;
}

.editor-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
}

.editor-pane {
  min-height: 0;
  max-height: 62vh;
  padding: 1.15rem 1.35rem;
  overflow: auto;
}

.editor-pane + .editor-pane { border-left: 1px solid var(--line); }
.editor-pane h3 { font: 500 1.8rem/1.1 var(--display); }
.editor-count { color: var(--muted); font-size: .875rem; }

.editor-selection,
.editor-catalog {
  display: grid;
  gap: .65rem;
  margin: .8rem 0 0;
  padding: 0;
  list-style: none;
}

.editor-selection li,
.editor-catalog li {
  min-width: 0;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: .25rem;
  background: var(--mat);
}

.editor-selection li {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  align-items: center;
  gap: .4rem .6rem;
}

.editor-selection p,
.editor-catalog p { font-size: .875rem; line-height: 1.4; }

.editor-row-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: .3rem;
}

.editor-catalog { grid-template-columns: repeat(auto-fill, minmax(min(100%, 8rem), 1fr)); }
.editor-catalog li {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .4rem;
}

.editor-catalog li.is-selected {
  border-color: var(--olive);
  background: var(--sage);
}

.editor-catalog .button { margin-top: auto; }
.editor-pane .button { min-height: 44px; padding: .4em .65em; }

.editor-thumbnail {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: .15rem;
  background: var(--paper-deep);
  cursor: zoom-in;
}

.editor-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.editor-footer {
  position: sticky;
  bottom: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  border-top: 1px solid var(--line);
}

.editor-footer p {
  flex: 1 1 15rem;
  color: #713e31;
  font-size: .875rem;
}

.editor-preview {
  width: min(58rem, calc(100% - 2rem));
  padding: .85rem;
  text-align: center;
}

.editor-preview form { display: flex; justify-content: flex-end; margin-bottom: .7rem; }
.editor-preview img {
  display: block;
  width: 100%;
  height: min(68vh, 42rem);
  object-fit: contain;
  background: var(--paper-deep);
}

.editor-preview figcaption { margin-top: .55rem; }

.lightbox {
  position: fixed;
  z-index: 5;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow: auto;
  background: var(--overlay);
  color: var(--on-olive);
}

.lightbox-inner {
  display: flex;
  width: 100%;
  max-width: 1320px;
  height: 100%;
  min-height: 250px;
  flex-direction: column;
  gap: .6rem;
}

.lightbox-top { display: flex; justify-content: flex-end; }

.lightbox-figure,
.lightbox-media {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
}

.lightbox-figure { gap: .6rem; }

.lightbox-media { position: relative; }
.lightbox-media picture,
.lightbox-media .photo-bitmap { position: absolute; inset: 0; }

.lightbox-media img,
.lightbox-media .photo-bitmap {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-caption {
  font: italic 500 clamp(1.25rem, 4vw, 1.9rem)/1.15 var(--display);
  text-align: center;
}

.lightbox-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .9rem;
}

.lightbox-button { border-color: var(--overlay-line); }
.lightbox-button:hover { background: var(--olive-deep); }
.lightbox-button:focus { outline-color: var(--on-olive); }
.photo-count { min-width: 4.25em; text-align: center; }

.close-icon {
  position: relative;
  width: .8em;
  height: .8em;
}

.close-icon::before,
.close-icon::after {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  transform: rotate(45deg);
  background: currentColor;
  content: '';
}

.close-icon::after { transform: rotate(-45deg); }

.noscript {
  padding: 1rem;
  color: var(--ink);
  text-align: center;
}

@media (max-width: 1070px) {
  .wrap { width: calc(100% - 64px); }
  .header-inner { gap: 1rem; }
  .site-nav { gap: 1rem; }
  .cover-inner { min-height: 530px; gap: 3.3%; }
  .letter-inner { gap: 6%; }
}

@media (max-width: 840px) {
  .brand { font-size: 1.35rem; }
  .tv-toggle { padding-left: .75em; padding-right: .75em; }
  .chapter-grid .print { --mat-inset: 7px; }
}

@media (max-width: 760px) {
  :root { --header-offset: 110px; }
  .wrap { width: calc(100% - 40px); }
  .header-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 .5rem;
    padding-top: .55rem;
    padding-bottom: .12rem;
  }
  .site-nav { grid-column: 1/-1; grid-row: 2; justify-content: space-between; }
  .site-nav a { padding: .65rem 0; }
  .tv-toggle { min-height: 44px; }
  .cover-inner,
  .letter-inner {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.8rem;
  }
  .cover-inner {
    padding-top: 3.35rem;
    padding-bottom: 3.5rem;
  }
  .cover-copy { padding-bottom: 0; }
  .eyebrow { margin-bottom: 1rem; font-size: .8rem; }
  h1 { font-size: 3.6rem; font-size: clamp(3.5rem, 10.5vw, 5rem); }
  .cover-subtitle { margin-top: 1.12rem; font-size: 1rem; }
  .cover-action { margin-top: 1.2rem; }
  .cover-print, .letter-print { --mat-inset: 9px; }
  .memories-inner { padding-top: 3rem; padding-bottom: 3rem; }
  .memories-heading { margin-bottom: 1.6rem; }
  .memories-heading::after { margin-top: 1rem; }
  .chapter-grid[data-count] { grid-template-columns: minmax(0, 1fr); }
  .memories-actions { margin-top: 1.6rem; }
  .letter-copy { grid-row: 1; }
  .letter-copy h2 { margin-bottom: 1rem; }
  .letter-copy p { font-size: 1rem; }
  .editor-heading,
  .editor-footer,
  .editor-pane { padding-inline: .8rem; }
  .editor-heading h2 { flex-basis: 100%; }
  .editor-content { grid-template-columns: minmax(0, 1fr); }
  .editor-pane { max-height: none; overflow: visible; }
  .editor-pane + .editor-pane { border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 365px) {
  .wrap { width: calc(100% - 32px); }
  .brand { gap: .42rem; font-size: 1.22rem; }
  .brand-mark { width: 1.5rem; height: 1.5rem; font-size: 1.08rem; }
  .tv-toggle { font-size: .82rem; }
  .tv-toggle-label { display: none; }
  .tv-toggle-short { display: inline; }
  .site-nav { gap: .45rem; font-size: .8125rem; }
  h1 { font-size: 3.1rem; }
  .footer-inner { flex-wrap: wrap; gap: 0; padding-top: .8rem; padding-bottom: .35rem; }
}

.presentation {
  --tv-bar: 8.2vh;
  --tv-bar: clamp(66px, 8.2vh, 184px);
  --tv-edge: 6vw;
  --tv-font: 1.25vw;
  --tv-font: clamp(1rem, 1.25vw, 3rem);
}

.presentation .site-header,
.presentation .site-footer,
.presentation .skip-link,
.presentation .cover-action,
.presentation .memories-actions,
.presentation .memories-title,
.presentation .edit-photos,
.presentation .photo-open { display: none; }

.presentation .page { scroll-margin-top: 0; }
.presentation .chapter-title { margin-top: 0; }

.tv-controls {
  display: flex;
  min-height: var(--tv-bar);
  align-items: center;
  justify-content: space-between;
  gap: .6em;
  padding: .45em var(--tv-edge);
  border-top: 1px solid var(--line);
  background: var(--header);
  font-size: var(--tv-font);
}

.tv-nav, .tv-options {
  display: flex;
  align-items: center;
  gap: .7em;
}

.tv-count {
  min-width: 6em;
  color: var(--muted);
  text-align: center;
}

.tv-controls .button {
  min-height: max(44px, 2.3em);
  font-size: 1em;
}

@media (min-width: 761px) and (min-aspect-ratio: 4/3) {
  .presentation .page {
    height: calc(100vh - var(--tv-bar));
    height: calc(100dvh - var(--tv-bar));
    min-height: 0;
    overflow: hidden;
  }

  .presentation .wrap {
    width: calc(100% - 2 * var(--tv-edge));
    max-width: none;
    height: 100%;
  }

  .presentation .cover-inner,
  .presentation .letter-inner {
    min-height: 0;
    padding-top: 5vh;
    padding-bottom: 5vh;
  }

  .presentation .cover-inner { gap: 5%; }
  .presentation .cover-copy { padding: 0; }
  .presentation .eyebrow { margin-bottom: 2.55vh; font-size: var(--tv-font); }
  .presentation h1 { font-size: 6.6vw; }
  .presentation h2 { font-size: 5.2vw; }
  .presentation .cover-subtitle { margin-top: 2.8vh; font-size: 1.65vw; }

  .presentation .print {
    --mat-inset: .62vw;
    border-radius: .15vw;
  }

  .presentation .cover-print,
  .presentation .letter-print { --mat-inset: .85vw; }

  .presentation .cover-print .photo-media { height: 52vh; aspect-ratio: auto; }

  .presentation .letter-print {
    width: 100%;
    max-width: 96vh;
    justify-self: center;
  }

  .presentation .print figcaption { font-size: 1.25vw; }
  .presentation .cover-print figcaption,
  .presentation .letter-print figcaption { font-size: 1.65vw; }

  .presentation .memories-inner {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    padding-top: 4.6vh;
    padding-bottom: 5.6vh;
  }

  .presentation .memories-heading { margin-bottom: 3.1vh; }
  .presentation .chapter-title { font-size: min(4.2vw, 7.5vh); }
  .presentation .chapter-description {
    max-width: 75vw;
    margin-top: .8vh;
    font-size: min(1.45vw, 2.75vh);
  }
  .presentation .memories-heading::after { width: 3.2vw; margin-top: 1.5vh; }
  .presentation .chapter-grid {
    min-height: 0;
    grid-auto-rows: minmax(0, 1fr);
    gap: 1.1vw;
  }
  .presentation .chapter-grid[data-count="1"] { max-width: 68vw; }
  .presentation .chapter-grid .photo-media { flex: 1 1 auto; aspect-ratio: auto; }

  @supports (width: 1cqw) {
    .presentation .chapter-grid .print {
      display: grid;
      place-items: center;
      container-type: size;
      padding: 0;
      border: 0;
      background: transparent;
      box-shadow: none;
    }

    .presentation .chapter-grid .photo-media {
      box-sizing: content-box;
      width: min(
        calc(100cqw - 2 * var(--mat-inset)),
        calc((100cqh - 2 * var(--mat-inset)) * 4 / 3)
      );
      aspect-ratio: 4 / 3;
      border: var(--mat-inset) solid var(--mat);
      border-radius: .15vw;
      box-shadow: var(--shadow);
    }
  }
  .presentation .letter-copy { max-width: none; }
  .presentation .letter-copy h2 { margin-bottom: 2.6vh; }
  .presentation .letter-mark { font-size: 2.1vw; }
  .presentation .letter-copy p { font-size: 1.52vw; }
  .presentation .letter-copy .signature { font-size: 2.45vw; }
}

@media (max-width: 760px), (max-aspect-ratio: 4/3) {
  body.presentation { overflow: auto; }
  .presentation .tv-controls {
    position: sticky;
    bottom: 0;
    z-index: 2;
    flex-wrap: wrap;
    justify-content: center;
    padding: .5rem 1rem;
  }
  .tv-count { min-width: 4.25em; }
  .tv-controls .button { padding: .65em .83em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
