/* Program-page measures and wrapping are isolated from the completed homepage. */
.program-page .page-heading > p {
  width: 100%;
  max-width: 620px;
  text-align: left;
  text-align-last: auto;
  text-justify: none;
  text-wrap: wrap;
}

.program-page .detail-copy h2 {
  width: 100%;
  max-width: none;
  text-wrap: wrap;
}

.program-page .program-overview .detail-copy h2 {
  font-size: clamp(24px, 2.1vw, 28px);
  line-height: 1.6;
  letter-spacing: normal;
}

.program-page main .program-word {
  white-space: nowrap;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

.program-page .program-index {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 10px;
  max-width: 500px;
  margin: 24px auto 0;
}

.program-page .program-index a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #d8cbbb;
  border-radius: 2px;
  background: #f0ebe4;
  color: #74634e;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.5;
  transition: background .18s ease, border-color .18s ease;
}

.program-page .program-index a:hover {
  background: #e8e0d5;
  border-color: #a29482;
}

.program-page .program-index a::after {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  margin: 0 0 3px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

.program-page .program-overview .program-goal-lines {
  margin-bottom: 20px;
}

/* Match the existing homepage closing panel without changing shared code. */
.program-page .program-trial {
  background: #e8e0d5;
}

.program-page .program-trial .section {
  width: min(88%, 800px);
  max-width: 800px;
  margin: 0 auto;
  padding: 85px 0;
  text-align: center;
}

.program-page .program-trial .section-en {
  text-align: center;
}

.program-page .program-trial h2 {
  font: 400 30px/1.9 var(--serif);
  letter-spacing: .04em;
  color: #302a25;
  margin: 0;
  text-align: center;
  text-wrap: balance;
}

.program-page .program-trial .section > p:not(.booking-status) {
  max-width: 640px;
  margin: 25px auto;
  font-size: 13px;
  line-height: 2.3;
  color: var(--text);
  text-align: center;
  text-align-last: auto;
  text-wrap: pretty;
}

.program-page .program-trial .reserve-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 16px;
  width: fit-content;
  min-width: 280px;
  min-height: 54px;
  padding: 15px 25px;
  margin: 30px auto 0;
  font-size: 13px;
  line-height: 1.6;
  border-radius: 3px;
  background: linear-gradient(110deg, #a29482, #857057);
  color: #fff;
}

.program-page .program-trial .booking-status {
  text-align: center;
  text-align-last: auto;
}

@media (max-width: 768px) {
  .program-page {
    --detail-gutter: clamp(20px, 6vw, 24px);
  }

  .program-page .program-index a {
    padding-inline: 11px;
    font-size: clamp(10px, 2.95vw, 12px);
  }

  .program-page .program-overview .detail-copy h2 {
    font-size: clamp(18px, 4.9vw, 22px);
    line-height: 1.6;
    letter-spacing: normal;
  }

  .program-page .program-trial .section {
    padding: 50px 0;
  }

  .program-page .program-trial h2 {
    font-size: clamp(20px, 5.7vw, 26px);
    letter-spacing: normal;
  }

  .program-page .program-trial h2 .phrase {
    display: block;
    white-space: normal;
  }

  .program-page .program-trial .section > p:not(.booking-status) {
    margin: 22px auto;
    font-size: 12px;
    line-height: 2.2;
  }

  .program-page .program-trial .reserve-link {
    width: 100%;
    min-width: 0;
    padding: 15px 17px;
    margin-top: 25px;
    font-size: 12px;
  }
}

/* Retain the former square frame without cropping the supplied stretching photo. */
.program-page .detail-picture .lesson-stretch-photo {
 width:min(100%,460px);height:auto;aspect-ratio:1;
 object-fit:contain;object-position:center;
}
@media(max-width:768px) {
 .program-page .detail-picture .lesson-stretch-photo {
  width:min(100%,280px,65vw);
 }
}
