.history-page {
  overflow: hidden;
}

.history-page .section {
  position: relative;
}

.history-page .history-text-link {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 700;
}

.history-hero__grid,
.history-season__grid,
.history-interior__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-7);
  align-items: center;
}

.history-hero__copy {
  min-width: 0;
  max-width: 35rem;
}

.history-hero__copy .lead {
  max-width: 34rem;
}

.history-hero__actions {
  align-items: center;
}

.history-hero__figure,
.history-season__figure,
.history-interior__figure {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.history-hero__figure {
  margin-top: var(--space-5);
}

.history-hero__figure img,
.history-season__figure img,
.history-interior__figure img,
.history-gallery__item img {
  width: 100%;
  border: 1px solid var(--color-border-paper);
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.history-hero__figure img {
  aspect-ratio: 3 / 2;
}

.history-hero__figure figcaption {
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border-paper);
}

.history-rhythm::before,
.history-tables::before,
.history-private__panel::after,
.history-closing__panel::after {
  position: absolute;
  z-index: 0;
  pointer-events: none;
  content: "";
}

.history-rhythm::before {
  top: 18%;
  right: 8%;
  width: 11rem;
  height: 8rem;
  border-radius: 48% 52% 44% 56%;
  background: rgb(174 185 163 / 0.16);
  transform: rotate(-14deg);
}

.history-rhythm__intro,
.history-options__intro {
  width: min(100%, 38.75rem);
  margin-inline: auto;
  text-align: center;
}

.history-rhythm__cards,
.history-tables__cards,
.history-options__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  margin-top: var(--space-7);
}

.history-rhythm__card,
.history-table-card,
.history-option {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
}

.history-rhythm__card > *,
.history-table-card > *,
.history-option > * {
  margin: 0;
}

.history-rhythm__card:nth-child(2) {
  margin-top: var(--space-5);
}

.history-card-number,
.history-table-card__tag {
  color: var(--color-dusty-rose-dark);
  font-size: var(--text-xs);
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.333;
  text-transform: uppercase;
}

.history-rhythm__card--game {
  position: relative;
  overflow: hidden;
}

.history-rhythm__card--game::after {
  position: absolute;
  right: var(--space-4);
  bottom: var(--space-4);
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--color-sage-wash);
  border-radius: 50% 50% 50% 12%;
  content: "";
  opacity: 0.8;
  transform: rotate(24deg);
}

.history-season__grid {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.history-season__figure img,
.history-interior__figure img {
  aspect-ratio: 4 / 3;
}

.history-season__copy {
  min-width: 0;
  max-width: 32.5rem;
}

.history-season__copy blockquote {
  max-width: 26.25rem;
}

.history-interior {
  overflow: hidden;
}

.history-interior::before {
  position: absolute;
  top: 4rem;
  right: 7%;
  width: 10rem;
  height: 13rem;
  border: 1px solid rgb(53 66 53 / 0.2);
  border-radius: 70% 30% 65% 35%;
  content: "";
  opacity: 0.45;
  transform: rotate(25deg);
}

.history-interior__intro {
  width: min(100%, 40rem);
  min-width: 0;
  margin-bottom: var(--space-7);
}

.history-interior__grid {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.history-interior__notes {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-5);
  width: 100%;
  max-width: 33.75rem;
}

.history-interior__note {
  min-width: 0;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgb(53 66 53 / 0.24);
}

.history-interior__note:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.history-interior__closing {
  margin-bottom: 0;
  font-family: var(--font-heading);
  font-size: var(--text-lead);
  line-height: 1.45;
}

.history-tables {
  overflow: hidden;
}

.history-tables::before {
  top: 7rem;
  right: 10%;
  width: 12rem;
  height: 12rem;
  border: 1px solid rgb(53 66 53 / 0.18);
  border-radius: 48% 52% 45% 55%;
  transform: rotate(-20deg);
}

.history-tables__intro {
  width: min(100%, 36.25rem);
  min-width: 0;
}

.history-table-card {
  border-color: var(--color-border-lavender);
}

.history-table-card--rose {
  border-left: 3px solid var(--color-dusty-rose);
}

.history-tables__footer {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.history-tables__notice {
  width: min(100%, 47.5rem);
  min-width: 0;
  margin: 0;
  background: var(--color-paper-warm);
}

.history-options__cards {
  margin-top: var(--space-7);
}

.history-option__links {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: auto;
}

.history-option__links a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  font-size: var(--text-sm);
  font-weight: 700;
}

.history-rituals__container {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-6);
}

.history-rituals__container > * {
  margin: 0;
}

.history-rituals__quote {
  width: min(100%, 51.25rem);
  margin-inline: auto;
  padding: var(--space-6);
  border: 1px solid var(--color-border-paper);
  border-left: 3px solid var(--color-dusty-rose);
  border-radius: var(--radius-lg);
  background: var(--color-paper-warm);
  color: var(--color-olive-ink);
  font-size: clamp(2rem, 3.4vw, 2.5rem);
  line-height: 1.16;
  text-align: center;
}

.history-rituals__columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-8);
}

.history-rituals__column {
  min-width: 0;
}

.history-rituals__column + .history-rituals__column {
  padding-left: var(--space-8);
  border-left: 1px solid var(--color-border-paper);
}

.history-private__panel {
  position: relative;
  width: min(100%, 62.5rem);
  min-width: 0;
  margin-inline: auto;
  overflow: hidden;
}

.history-private__panel::after {
  right: 5%;
  bottom: -3rem;
  width: 12rem;
  height: 12rem;
  border: 1px solid var(--color-sage-wash);
  border-radius: 72% 28% 64% 36%;
  opacity: 0.7;
  transform: rotate(-18deg);
}

.history-private__copy {
  position: relative;
  z-index: 1;
  width: min(100%, 37.5rem);
  min-width: 0;
}

.history-private__lines {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
  width: min(100%, 31.25rem);
  margin-bottom: var(--space-4);
}

.history-private__lines p {
  margin: 0;
}

.history-private__lines span {
  color: var(--color-dusty-rose-dark);
}

.history-private__actions {
  align-items: center;
}

.history-gallery__intro {
  width: min(100%, 33.75rem);
  min-width: 0;
  margin-bottom: var(--space-6);
}

.history-gallery__track {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr);
  gap: var(--space-5);
  min-width: 0;
}

.history-gallery__item {
  min-width: 0;
  margin: 0;
}

.history-gallery__item img {
  aspect-ratio: 4 / 3;
}

.history-gallery__item--wide img {
  aspect-ratio: 3 / 2;
}

.history-gallery__controls {
  display: none;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.history-gallery__controls button {
  min-width: 0;
}

.history-closing__panel {
  position: relative;
  width: min(100%, 53.75rem);
  min-width: 0;
  margin-inline: auto;
  overflow: hidden;
  border-color: var(--color-olive-ink);
  text-align: center;
}

.history-closing__panel::after {
  top: -3rem;
  right: -2rem;
  width: 8rem;
  height: 8rem;
  border: 1px solid var(--color-sage-wash);
  border-radius: 30% 70% 38% 62%;
  opacity: 0.7;
  transform: rotate(22deg);
}

.history-closing__panel > * {
  position: relative;
  z-index: 1;
}

.history-closing__panel p {
  width: min(100%, 35rem);
  margin-inline: auto;
}

.history-closing__actions {
  justify-content: center;
}

@media (max-width: 61.25rem) {
  .history-hero__grid,
  .history-season__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .history-hero__copy,
  .history-season__copy {
    width: 100%;
    max-width: none;
  }

  .history-hero__copy .lead {
    max-width: 34rem;
  }

  .history-hero__figure {
    margin-top: 0;
  }

  .history-season__figure {
    grid-row: 1;
  }
}

@media (max-width: 60rem) {
  .history-interior__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-6);
  }

  .history-interior__notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
    max-width: none;
  }

  .history-interior__note:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 56.25rem) {
  .history-gallery__track {
    display: flex;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--space-1);
    scrollbar-width: thin;
  }

  .history-gallery__item,
  .history-gallery__item--wide {
    flex: 0 0 72%;
    min-width: 0;
    scroll-snap-align: start;
  }

  .history-gallery__item img,
  .history-gallery__item--wide img {
    aspect-ratio: 4 / 3;
  }

  .history-gallery__controls {
    display: flex;
  }
}

@media (max-width: 55rem) {
  .history-tables__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-tables__cards > :nth-child(3) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 53.75rem) {
  .history-rhythm__cards,
  .history-options__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .history-rhythm__cards > :nth-child(3),
  .history-options__cards > :nth-child(3) {
    grid-column: 1 / -1;
  }

  .history-rhythm__card:nth-child(2) {
    margin-top: 0;
  }
}

@media (max-width: 50rem) {
  .history-private__panel {
    width: 100%;
  }

  .history-private__panel::after {
    right: -4rem;
    bottom: -5rem;
  }
}

@media (max-width: 47.5rem) {
  .history-rituals__columns {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
  }

  .history-rituals__column + .history-rituals__column {
    padding-top: var(--space-5);
    padding-left: 0;
    border-top: 1px solid var(--color-border-paper);
    border-left: 0;
  }
}

@media (max-width: 40rem) {
  .history-hero__copy h1 {
    font-size: clamp(2.5rem, 11vw, 2.875rem);
  }

  .history-hero__actions,
  .history-private__actions,
  .history-closing__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .history-hero__actions > *,
  .history-private__actions > *,
  .history-closing__actions > * {
    width: 100%;
  }

  .history-rhythm__cards,
  .history-tables__cards,
  .history-options__cards,
  .history-interior__notes {
    grid-template-columns: minmax(0, 1fr);
  }

  .history-rhythm__cards > :nth-child(3),
  .history-options__cards > :nth-child(3),
  .history-tables__cards > :nth-child(3),
  .history-interior__note:last-child {
    grid-column: auto;
  }

  .history-rhythm__cards,
  .history-tables__cards,
  .history-options__cards {
    gap: var(--space-4);
    margin-top: var(--space-6);
  }

  .history-interior__notes {
    gap: var(--space-4);
  }

  .history-rituals__quote {
    padding: var(--space-5);
    font-size: clamp(1.75rem, 8vw, 2rem);
  }

  .history-gallery__item,
  .history-gallery__item--wide {
    flex-basis: 86%;
  }

  .history-gallery__controls {
    align-items: stretch;
  }

  .history-gallery__controls button {
    flex: 1 1 12rem;
  }

  .history-closing__panel {
    padding: var(--space-6) var(--space-5);
  }
}

@media (max-width: 26.25rem) {
  .history-private__actions .button {
    width: 100%;
  }
}
