html:has(.gym-detail) {
  scroll-padding-top: max(92px, 5.75rem);
}

.gym-detail .top-inner {
  justify-content: space-between;
  gap: 16px;
}

.gym-detail .gym-nav {
  width: auto;
  min-width: 0;
  order: 0;
  padding: 0;
  border: 0;
}

.gym-detail :where(h1, h2, h3, .gym-return, th, .gym-contact .button) {
  overflow-wrap: anywhere;
  hyphens: auto;
}

.gym-return {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.gym-hero {
  padding-block: clamp(34px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(ellipse at 77% 0, #272d19, transparent 55%), var(--deep);
}

.gym-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
  align-items: center;
  gap: clamp(28px, 5.6vw, 86px);
}

.gym-hero h1 {
  font-size: clamp(3.1rem, 6.25vw, 6.2rem);
  text-transform: uppercase;
}

.gym-hero h1 em {
  display: block;
}

.gym-price-jump {
  margin-top: 20px;
}

.gym-photo {
  overflow: hidden;
  border: 1px solid #525c3a;
  border-radius: 8px;
  background: var(--panel);
}

.gym-photo img {
  width: 100%;
  height: clamp(235px, 28vw, 380px);
  object-fit: cover;
  object-position: 43% 30%;
  filter: saturate(.76);
}

.gym-prices {
  padding-block: clamp(48px, 7vw, 98px);
}

.gym-prices h2 {
  margin-bottom: clamp(18px, 3vw, 32px);
  font-size: clamp(3rem, 6vw, 5.35rem);
  text-transform: uppercase;
}

.gym-table-panel,
.gym-contact {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: clamp(16px, 3.5vw, 34px);
}

.gym-table-panel table {
  --gym-action-width: 5rem;
  --gym-action-gap: clamp(14px, 3vw, 38px);
  width: 100%;
  border-collapse: collapse;
}

.gym-table-panel th,
.gym-table-panel td {
  padding-block: 9px;
  text-align: left;
}

.gym-table-panel thead {
  color: var(--muted);
  font-size: .875rem;
}

.gym-table-panel thead th:last-child {
  padding-inline-end: calc(var(--gym-action-width) + var(--gym-action-gap));
  text-align: right;
}

.gym-table-panel tbody tr {
  border-top: 1px solid var(--line);
}

.gym-table-panel td {
  padding-inline-start: 12px;
}

.gym-table-panel small {
  display: block;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 600;
}

.gym-price-action {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--gym-action-gap);
  text-align: right;
}

.gym-price-action strong {
  white-space: nowrap;
}

.gym-price-action a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--gym-action-width);
  min-height: 44px;
  margin: 0;
}

.gym-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 28px;
  margin-top: 24px;
}

.gym-contact p {
  max-width: 44ch;
  margin-top: 6px;
  color: var(--muted);
}

@media (max-width: 720px) {
  html:has(.gym-detail) {
    scroll-padding-top: max(80px, 5.75rem);
  }

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

  .gym-photo img {
    height: clamp(176px, 50vw, 260px);
    object-position: 43% 24%;
  }
}

@media (max-width: 520px) {
  .gym-table-panel table {
    table-layout: fixed;
  }

  .gym-table-panel thead th:last-child {
    padding-inline-end: 0;
  }

  .gym-price-action {
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
  }

  .gym-price-action a {
    min-width: 0;
  }

  .gym-price-action strong {
    white-space: normal;
  }

  .gym-contact .button {
    width: 100%;
  }
}
