.model > div { position: relative; }
.footer-legal-links {
  border: 0;
  display: flex;
  flex-direction: row !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  padding: 0;
  margin: 0 18px 0 0;
  order: 2;
  flex: 0 0 auto;
  white-space: nowrap;
}
.footer-bottom .footer-legal-links a {
  display: inline;
  min-height: 0;
  border: 0;
  align-items: initial;
}
.footer-legal-links a {
  color: #a8a8a3;
  font-size: 11px;
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-underline-offset: 4px;
}
.footer-legal-links a + a::before {
  content: " · ";
  color: #82827e;
  text-decoration: none;
  padding: 0 8px;
}
.footer-bottom {
  justify-content: flex-start;
}
.footer-bottom > span:first-child {
  order: 1;
  flex: 0 0 auto;
}
.footer-credit {
  order: 3;
  margin-left: auto;
}
.footer-top {
  order: 4;
}
.footer-legal-links a:hover { color: var(--lime); }
.model-cover > figure { min-height: 700px; }

.model-plan {
  position: absolute;
  top: 58px;
  right: clamp(18px, 2.4vw, 42px);
  width: min(58%, 230px);
  height: 205px;
  display: grid;
  place-items: center;
  margin: 0;
  pointer-events: none;
}

.model-plan img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.model-pilates .model-plan { width: min(62%, 240px); }

.history-gallery.history-gallery-three figure:nth-child(3) { grid-column: span 12; }
.history-gallery.history-gallery-three figure:nth-child(3) img { aspect-ratio: 21 / 8; }

@media (max-width: 1180px) {
  .model-cover > figure { min-height: 680px; }
  .model-plan { top: 54px; width: min(52%, 205px); height: 185px; }
}

@media (max-width: 820px) {
  .model-cover > figure { min-height: 430px; }
  .model-plan,
  .model-pilates .model-plan {
    position: static;
    width: 100%;
    height: 230px;
    min-height: 230px;
    flex: 0 0 230px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(5, 5, 5, .2);
    overflow: visible;
  }

  .model-plan img {
    width: min(100%, 250px);
    height: 205px;
    max-width: 250px;
    max-height: 205px;
    object-fit: contain;
    flex: 0 0 auto;
  }
  .model > div { overflow: visible; }
  .history-gallery.history-gallery-three figure:nth-child(3) { grid-column: 1; }
  .history-gallery.history-gallery-three figure:nth-child(3) img { aspect-ratio: 16 / 10; }

  /* The mobile menu lives inside the blurred fixed header. Absolute sizing
     keeps the overlay and sheet at viewport height on mobile browsers. */
  .mobile-overlay {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100vw;
    height: 100dvh;
    min-height: 100dvh;
  }
  .mobile-sheet {
    position: absolute;
    inset: 0 0 auto auto;
    height: 100dvh;
    max-height: 100dvh;
  }

  /* Preserve the official 1615×396 logo ratio; the HTML height attribute
     must not constrain the mobile menu image to a squashed rectangle. */
  .mobile-sheet-head img {
    width: 155px;
    height: auto;
    aspect-ratio: 1615 / 396;
    object-fit: contain;
  }
}

@media (max-width: 560px) {
  .model-cover > figure { min-height: 310px; }
  .model-plan,
  .model-pilates .model-plan {
    height: 205px;
    min-height: 205px;
    flex-basis: 205px;
  }
  .model-plan img {
    width: min(100%, 220px);
    height: 180px;
    max-width: 220px;
    max-height: 180px;
  }
}
