/*
 * 2026 presentation-led visual refresh
 * Reference cues: warm proposal paper, bold grotesk headings, fine modular grids,
 * large photography, brown/orange editorial accents.
 */

:root {
  --paper: #f3eadf;
  --paper-bright: #fffaf3;
  --ink: #4c2b20;
  --muted: #8d6d59;
  --line: #cdbbaa;
  --stone: #eadbca;
  --stone-dark: #d7c0aa;
  --sage: #a6a77a;
  --clay: #98421f;
  --sun: #d8a168;
  --serif: "Arial Black", "Microsoft YaHei", "PingFang SC", sans-serif;
  --sans: Inter, Arial, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  background: var(--paper);
  color: var(--ink);
}

.topbar {
  min-height: 5rem;
  border-color: rgba(76, 43, 32, 0.24);
  background: rgba(255, 250, 243, 0.94);
}

.topbar::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 0.22rem;
  background: var(--clay);
  content: "";
}

.brand-mark {
  color: var(--clay);
  font-family: var(--sans);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.brand-cn {
  color: var(--ink);
  font-weight: 700;
}

.topbar-title,
.menu-toggle {
  color: var(--ink);
  font-weight: 700;
}

.topbar-actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: clamp(0.7rem, 1.5vw, 1.5rem);
}

.partner-entry {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 0.78rem 0.62rem;
  border: 1px solid var(--clay);
  background: var(--clay);
  color: var(--paper-bright);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.partner-entry:hover {
  transform: translateY(-2px);
  background: transparent;
  color: var(--clay);
}

.partner-entry span {
  font-size: 0.85rem;
  letter-spacing: 0;
}

.site-nav {
  inset: 5rem 0 0;
  border-color: var(--ink);
  background: var(--paper-bright);
}

.nav-kicker,
.section-tag,
.eyebrow {
  color: var(--clay);
  font-weight: 800;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: var(--clay);
  color: var(--paper-bright);
}

.hero {
  isolation: isolate;
  display: block;
  width: 100%;
  max-width: none;
  min-height: calc(100svh - 5rem);
  padding: 0;
  background: #574336;
}

.hero::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(48, 24, 16, 0.88) 0%, rgba(61, 33, 23, 0.64) 45%, rgba(61, 33, 23, 0.08) 78%),
    linear-gradient(0deg, rgba(48, 24, 16, 0.72) 0%, transparent 48%);
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  width: min(var(--max), 100%);
  min-height: calc(100svh - 5rem);
  max-width: none;
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7.5rem) var(--gutter) clamp(3.5rem, 7vw, 6rem);
  flex-direction: column;
  justify-content: flex-end;
  color: #fff8ee;
}

.hero .eyebrow {
  color: #f2bf88;
}

.hero h1 {
  max-width: 68rem;
  margin-top: 1.2rem;
  color: #fffaf2;
  font-family: var(--sans);
  font-size: clamp(4.2rem, 9.2vw, 9.6rem);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 0.85;
  text-shadow: 0 0.04em 0.35em rgba(33, 16, 10, 0.2);
}

.hero h1 span {
  margin-bottom: 0.15em;
  font-size: 0.43em;
  font-weight: 800;
  letter-spacing: -0.055em;
}

.hero-position {
  width: fit-content;
  max-width: 48rem;
  margin-top: 1.7rem;
  padding: 0.3rem 0.65rem 0.38rem;
  background: #fff7ec;
  color: var(--clay);
  font-family: var(--sans);
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  font-weight: 900;
  line-height: 1.2;
}

.hero-intro {
  max-width: 48rem;
  margin-top: 1.35rem;
  color: rgba(255, 250, 243, 0.92);
  font-size: clamp(0.92rem, 1vw, 1.02rem);
  line-height: 1.85;
}

.hero-meta {
  width: min(46rem, 100%);
  margin-top: 1.8rem;
  border-color: rgba(255, 250, 243, 0.68);
  background: rgba(255, 250, 243, 0.91);
  color: var(--ink);
  backdrop-filter: blur(10px);
}

.hero-meta div {
  min-height: 5.6rem;
  border-color: rgba(76, 43, 32, 0.42);
}

.hero-meta span {
  color: var(--muted);
  font-weight: 700;
}

.hero-meta strong {
  margin-top: 1.05rem;
  font-family: var(--sans);
  font-weight: 800;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: -1;
  min-height: 0;
  background: #5c483a;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: 52% 56%;
  filter: saturate(0.78) contrast(0.96) sepia(0.08);
}

.hero-visual figcaption {
  position: absolute;
  right: var(--gutter);
  bottom: 1.2rem;
  z-index: 3;
  min-width: 16rem;
  padding: 0.45rem 0;
  border-color: rgba(255, 250, 243, 0.64);
  color: rgba(255, 250, 243, 0.88);
}

.scroll-cue {
  z-index: 3;
  color: #fff8ee;
}

.manifesto {
  background: var(--paper-bright);
}

.display-quote,
.closing-statement {
  color: var(--clay);
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.065em;
}

.manifesto-notes {
  margin-top: clamp(1.75rem, 3vw, 3rem);
  border-color: var(--line);
}

.manifesto-notes p {
  border-color: var(--line);
  color: var(--ink);
  font-weight: 600;
}

.chapter {
  scroll-margin-top: 5rem;
}

.chapter-stone {
  background: #eadbca;
}

.chapter-ink {
  background: #4a2419;
  color: #fff7ed;
}

.chapter-heading {
  position: relative;
  grid-template-columns: 7rem 1fr;
  padding: 1.15rem 0 1.5rem;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}

.chapter-heading::after {
  position: absolute;
  top: 0;
  right: 0;
  width: clamp(5rem, 10vw, 9rem);
  height: 100%;
  border-left: 1px solid currentColor;
  content: "";
  opacity: 0.42;
}

.chapter-number {
  color: var(--clay);
  font-size: 0.72rem;
  font-weight: 800;
}

.chapter-heading h2 {
  max-width: calc(100% - 10rem);
  margin-top: 0.4rem;
  color: var(--clay);
  font-family: var(--sans);
  font-size: clamp(2.8rem, 5.5vw, 5.7rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.94;
}

.chapter-ink .chapter-heading h2 {
  color: #f0b57b;
}

.chapter-ink .section-tag,
.chapter-ink .chapter-number,
.chapter-ink .program-index {
  color: #e3a56d;
}

.lead-text,
.brand-root strong,
.brand-branches h3,
.name-options h4,
.two-column-detail h3,
.subsection-heading h3,
.merchant-title h3,
.workshop-copy h3,
.theme-seed h3,
.program h3,
.communication-grid h3,
.income-layout h3,
.conditions-grid h3,
.phase h3,
.pending-section h3,
.resident-columns h3,
.display-small {
  font-family: var(--sans);
  font-weight: 850;
  letter-spacing: -0.045em;
}

.lead-text {
  color: var(--clay);
}

.lead-grid > p:last-child,
.name-options article > p,
.brand-branches p,
.merchant-copy,
.income-layout dd,
.program-copy > p:not(.program-index, .program-route),
.evaluation-notes {
  color: #684a3d;
}

table {
  border-color: var(--ink);
}

th {
  background: rgba(152, 66, 31, 0.08);
  color: var(--clay);
  font-weight: 800;
}

th,
td {
  border-color: var(--line);
}

td:first-child {
  color: var(--clay);
  font-family: var(--sans);
  font-weight: 800;
}

.brand-root,
.confirmed-line,
.two-column-detail article,
.merchant-mechanism,
.communication-grid,
.income-layout dl,
.conditions-grid article,
.resident-columns {
  border-color: var(--ink);
}

.brand-root strong,
.confirmed-line strong {
  color: var(--clay);
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: -0.06em;
}

.brand-branches article,
.name-options article,
.resident-columns article {
  border-color: var(--line);
}

.name-options article:nth-child(1) {
  background: #fff6e9;
}

.name-options article:nth-child(2) {
  background: #ead9c6;
}

.name-options article:nth-child(3) {
  background: #d9b58f;
}

.content-lines-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.content-lines-grid article {
  min-height: 15rem;
  padding: 1.35rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.content-lines-grid article:nth-child(1) {
  background: #fff6e9;
}

.content-lines-grid article:nth-child(2) {
  background: #f1e2cf;
}

.content-lines-grid article:nth-child(3) {
  background: #e4c9ab;
}

.content-lines-grid article:nth-child(4) {
  background: #d5ae86;
}

.content-lines-grid span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.content-lines-grid h3 {
  margin-top: 3.2rem;
  color: var(--clay);
  font-family: var(--sans);
  font-size: clamp(2rem, 3.4vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1;
}

.content-lines-grid p {
  margin-top: 1.4rem;
  color: var(--ink);
  line-height: 1.75;
}

.full-bleed-posters {
  width: auto;
  max-width: none;
  margin: clamp(3.5rem, 7vw, 7rem) calc(-1 * var(--gutter)) calc(-1 * clamp(5.5rem, 10vw, 10rem));
  background: #28140f;
}

.full-bleed-posters figure,
.full-bleed-posters img {
  display: block;
  width: 100%;
}

.full-bleed-posters figure {
  margin: 0;
}

.full-bleed-posters img {
  height: auto;
}

#chapter-02 .two-column-detail {
  grid-template-columns: 1fr;
  gap: 0;
}

#chapter-02 .two-column-detail article {
  display: grid;
  grid-template-columns: minmax(12rem, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 7vw, 8rem);
  padding: clamp(2rem, 4vw, 3.5rem) 0;
}

#chapter-02 .two-column-detail h3 {
  margin-top: 1rem;
}

#chapter-02 .detail-copy > p {
  margin-top: 0;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.75;
}

#chapter-02 .detail-copy ul {
  margin-top: 1.35rem;
}

.rhythm-heading {
  grid-template-columns: 0.75fr 2.5fr 0.75fr;
}

.rhythm-heading h3 {
  font-size: clamp(2rem, 3.6vw, 3.6rem);
  white-space: nowrap;
}

.status {
  border-color: var(--clay);
  color: var(--clay);
  font-weight: 800;
}

.visual-triptych img {
  filter: saturate(0.72) contrast(0.96) sepia(0.06);
}

.visual-triptych figcaption {
  border-color: var(--ink);
  color: var(--clay);
  font-weight: 700;
}

.agreement-line,
.accounting-line,
.mechanism-note,
.date-note {
  border-color: currentColor;
}

.art-reading {
  background: #d8b28c;
}

.art-bookshop {
  background: #c8b58d;
}

.art-workshop {
  background: #e1b46d;
}

.art-forecourt {
  background: #b4a476;
}

.art-music {
  background: #b76a43;
}

.art-exchange {
  background: #deb47b;
}

.art-family {
  background: #9e9d6f;
}

.program {
  border-color: var(--line);
}

.program h3 {
  color: var(--clay);
}

.program-route {
  color: var(--clay);
  font-family: var(--sans);
  font-weight: 800;
}

.resident-columns article:nth-child(1) {
  background: #fff6e9;
}

.resident-columns article:nth-child(2) {
  background: #e8d7c5;
}

.resident-columns article:nth-child(3) {
  background: #d8b892;
}

.resident-columns h3,
.display-small,
.income-layout h3,
.conditions-grid h3 {
  color: var(--clay);
}

.phase {
  border-color: rgba(255, 247, 237, 0.28);
}

.phase-index strong,
.phase h3 {
  color: #f1b477;
  font-family: var(--sans);
  font-weight: 900;
}

.pending-section {
  background: var(--clay);
  color: #fff7ed;
}

.pending-section h3 {
  color: #fff7ed;
}

.pending-section ul,
.pending-section li {
  border-color: rgba(255, 247, 237, 0.34);
}

.closing {
  background: #fff7ed;
}

.closing-copy {
  display: grid;
  gap: 0.75rem;
  width: min(100%, 54rem);
  margin: clamp(2rem, 4vw, 3.25rem) auto 0;
  color: rgba(74, 36, 25, 0.78);
  font-size: clamp(0.98rem, 1.35vw, 1.16rem);
  line-height: 1.75;
}

.closing-statement span {
  display: inline-block;
  white-space: nowrap;
}

.closing-copy p {
  margin: 0;
}

.closing-copy p:last-child {
  margin-top: 0.45rem;
  color: var(--clay);
  font-weight: 800;
}

.closing a {
  border-color: var(--clay);
  color: var(--clay);
  font-weight: 800;
}

.closing a:hover {
  background: var(--clay);
  color: #fff7ed;
}

footer {
  background: #4a2419;
  color: #e8cdb8;
}

.reading-progress span {
  background: #e58e54;
}

@media (max-width: 780px) {
  .topbar {
    min-height: 4.25rem;
  }

  .topbar-actions {
    gap: 0.65rem;
  }

  .partner-entry {
    padding: 0.5rem 0.58rem 0.54rem;
    font-size: 0.62rem;
    letter-spacing: 0.08em;
  }

  .site-nav {
    inset: 4.25rem 0 0;
  }

  .chapter {
    scroll-margin-top: 4.25rem;
  }

  .hero,
  .hero-copy {
    min-height: calc(100svh - 4.25rem);
  }

  .hero-copy {
    padding-top: 7rem;
    padding-bottom: 2rem;
    justify-content: flex-end;
  }

  .hero::before {
    background:
      linear-gradient(0deg, rgba(48, 24, 16, 0.88) 0%, rgba(48, 24, 16, 0.48) 62%, rgba(48, 24, 16, 0.15) 100%);
  }

  .hero h1 {
    font-size: clamp(3.7rem, 17vw, 6rem);
    line-height: 0.88;
  }

  .hero h1 span {
    font-size: 0.42em;
  }

  .hero-intro {
    display: block;
    overflow: visible;
  }

  .hero-meta {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .hero-meta div {
    min-height: 5.2rem;
    padding: 0.75rem;
  }

  .hero-meta strong {
    font-size: 0.86rem;
    line-height: 1.35;
  }

  .hero-visual,
  .hero-visual img {
    min-height: 0;
  }

  .hero-visual img {
    object-position: 57% center;
  }

  .hero-visual figcaption,
  .scroll-cue {
    display: none;
  }

  .chapter-heading {
    grid-template-columns: 2.6rem 1fr;
  }

  .chapter-heading::after {
    display: none;
  }

  .chapter-heading h2 {
    max-width: none;
    font-size: clamp(2.6rem, 12vw, 4.2rem);
  }

  td::before {
    color: var(--muted);
  }

  td:first-child {
    font-family: var(--sans);
    font-weight: 850;
  }

  .content-lines-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content-lines-grid article {
    min-height: 13rem;
  }

  .rhythm-heading h3 {
    white-space: normal;
  }

  #chapter-02 .two-column-detail article {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-copy {
    padding-top: 5.25rem;
  }

  .hero h1 {
    font-size: clamp(3.3rem, 16vw, 4.7rem);
  }

  .hero-position {
    font-size: 1rem;
  }

  .hero-meta span {
    font-size: 0.56rem;
  }

  .hero-meta strong {
    font-size: 0.72rem;
  }

  .content-lines-grid {
    grid-template-columns: 1fr;
  }

  .content-lines-grid article {
    min-height: 0;
  }
}

/* Full-width source galleries */
.gallery-mount {
  width: 100vw !important;
  max-width: none !important;
  margin: clamp(4rem, 8vw, 8rem) calc(50% - 50vw) 0 !important;
}

.gallery-mount[data-gallery-mount="identity"],
.gallery-mount[data-gallery-mount="landmark"],
.gallery-mount[data-gallery-mount="closing-park"] {
  margin-top: 0 !important;
}

.gallery-mount[data-gallery-mount="boxes"] {
  margin-top: clamp(2.75rem, 5vw, 5rem) !important;
}

.media-gallery {
  --gallery-surface: #d9c1a7;
  --gallery-ink: var(--ink);
  --gallery-line: rgba(76, 43, 32, 0.36);
  overflow: hidden;
  scroll-margin-top: 5rem;
  background: var(--gallery-surface);
  color: var(--gallery-ink);
}

.media-gallery--dark {
  --gallery-surface: #28140f;
  --gallery-ink: #fff7ed;
  --gallery-line: rgba(255, 247, 237, 0.34);
}

.media-gallery__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(2rem, 7vw, 8rem);
  width: min(var(--max), 100%);
  margin: 0 auto;
  padding: clamp(2.6rem, 5vw, 5rem) var(--gutter) clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--gallery-line);
  align-items: end;
}

.media-gallery__heading .section-tag {
  color: inherit;
  opacity: 0.66;
}

.media-gallery__title {
  max-width: 18ch;
  margin-top: 0.9rem;
  font-family: var(--sans);
  font-size: clamp(2.1rem, 4.4vw, 4.8rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.media-gallery__description {
  max-width: 46rem;
  margin-top: 1.35rem;
  color: inherit;
  font-size: clamp(0.95rem, 1.35vw, 1.15rem);
  line-height: 1.7;
  opacity: 0.74;
}

.media-gallery__controls {
  display: grid;
  grid-template-columns: 3.2rem auto 3.2rem;
  gap: 0.6rem;
  align-items: center;
}

.gallery-arrow {
  width: 3.2rem;
  height: 3.2rem;
  border: 1px solid var(--gallery-line);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.gallery-arrow:hover:not(:disabled),
.gallery-arrow:focus-visible {
  background: var(--gallery-ink);
  color: var(--gallery-surface);
  transform: translateY(-2px);
}

.gallery-arrow:disabled {
  cursor: default;
  opacity: 0.26;
}

.media-gallery__count {
  min-width: 4.8rem;
  text-align: center;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em;
}

.media-gallery__viewport {
  width: 100%;
}

.media-gallery__rail {
  display: flex;
  gap: 0;
  align-items: stretch;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-color: currentColor transparent;
  scrollbar-width: thin;
}

.media-gallery__rail:focus-visible {
  outline: 3px solid #e58e54;
  outline-offset: -3px;
}

.media-gallery--triptych .media-gallery__controls {
  display: none;
}

.media-gallery--triptych .media-gallery__rail {
  overflow-x: hidden;
  scroll-snap-type: none;
}

.media-gallery--triptych .gallery-card {
  flex-basis: calc(100% / 3);
  width: auto;
  height: auto;
}

.media-gallery--triptych .gallery-card figcaption {
  display: none;
}

.media-gallery--single-cover .media-gallery__rail {
  overflow-x: hidden;
  scroll-snap-type: none;
}

.media-gallery--single-cover .gallery-card {
  flex-basis: 100vw;
  width: 100vw;
  height: auto;
}

.media-gallery--single-cover .gallery-card img {
  object-fit: cover;
}

.media-gallery--bare .gallery-card figcaption,
.media-gallery--strip .gallery-card figcaption,
.media-gallery--autoplay .gallery-card figcaption {
  display: none;
}

.media-gallery--autoplay .media-gallery__controls {
  display: none;
}

.media-gallery--autoplay .media-gallery__rail {
  overflow-x: auto;
  scroll-behavior: auto;
  scroll-snap-type: none;
  scrollbar-width: none;
}

.media-gallery--autoplay .media-gallery__rail::-webkit-scrollbar {
  display: none;
}

.gallery-card {
  position: relative;
  flex: 0 0 auto;
  width: auto;
  height: clamp(34rem, 78svh, 58rem);
  aspect-ratio: var(--image-ratio, 4 / 3);
  margin: 0;
  background: #120b08;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.gallery-card__open {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  align-items: center;
  justify-content: center;
}

.gallery-card__open:focus-visible {
  outline: 3px solid #e58e54;
  outline-offset: -3px;
}

.gallery-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.gallery-card figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  gap: 1rem;
  min-height: 0;
  padding: clamp(2.6rem, 8vw, 5rem) clamp(1rem, 2vw, 1.5rem) 1rem;
  border: 0;
  background: linear-gradient(to bottom, transparent, rgba(12, 8, 6, 0.78));
  color: #fff7ed;
  pointer-events: none;
  align-items: center;
}

.gallery-card__index {
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.16em;
  opacity: 0.62;
}

.gallery-card__label {
  overflow: hidden;
  font-size: 0.85rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.program.program-text-only {
  grid-template-columns: 1fr;
  min-height: 0;
}

.program-text-only .program-copy {
  width: min(100%, 68rem);
}

.program-text-only:nth-child(even) .program-copy {
  order: initial;
}

/* Full-image inspection keeps every reference uncropped. */
.media-lightbox {
  width: 100vw;
  max-width: none;
  height: 100svh;
  max-height: none;
  padding: 0;
  border: 0;
  background: rgba(24, 12, 9, 0.97);
  color: #fff7ed;
}

.media-lightbox::backdrop {
  background: rgba(24, 12, 9, 0.9);
  backdrop-filter: blur(10px);
}

.media-lightbox[open] {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr) 4.5rem;
  grid-template-rows: 1fr;
  place-items: center;
}

.media-lightbox figure {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 1.5rem 0;
}

.media-lightbox img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.media-lightbox figcaption {
  padding: 1rem;
  text-align: center;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

.media-lightbox button {
  z-index: 1;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid rgba(255, 247, 237, 0.45);
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.media-lightbox button:hover:not(:disabled),
.media-lightbox button:focus-visible {
  background: #fff7ed;
  color: #28140f;
}

.media-lightbox button:disabled {
  opacity: 0.2;
}

.media-lightbox__close {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  width: auto !important;
  padding: 0 1rem;
  border-radius: 999px !important;
}

.reveal-target {
  opacity: 0;
  transform: translateY(1.4rem);
  transition: opacity 560ms ease var(--reveal-delay, 0ms), transform 700ms cubic-bezier(0.2, 0.75, 0.25, 1) var(--reveal-delay, 0ms);
}

.reveal-target.is-revealed {
  opacity: 1;
  transform: none;
}

@media (max-width: 780px) {
  .gallery-mount {
    margin-top: clamp(3.25rem, 12vw, 5rem) !important;
  }

  .media-gallery__heading {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .media-gallery {
    scroll-margin-top: 4.25rem;
  }

  .media-gallery__title {
    max-width: 13ch;
    font-size: clamp(2.2rem, 11vw, 3.6rem);
  }

  .media-gallery__controls {
    justify-content: start;
  }

  .media-gallery--triptych .media-gallery__controls {
    display: grid;
  }

  .media-gallery--triptych .media-gallery__rail {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .media-gallery--triptych .gallery-card {
    flex-basis: 100vw;
  }

  .media-gallery__rail {
    gap: 0;
  }

  .gallery-card {
    height: min(70svh, 42rem);
  }

  .media-lightbox[open] {
    grid-template-columns: 3.4rem minmax(0, 1fr) 3.4rem;
  }

  .media-lightbox button {
    width: 2.8rem;
    height: 2.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .media-gallery__rail {
    scroll-behavior: auto;
  }

  .gallery-arrow,
  .reveal-target {
    transition: none;
  }

  .reveal-target {
    opacity: 1;
    transform: none;
  }
}
