/* 2026-06-22: site-wide heading and intermediate-layout normalization. */

/* Shared scale: ordinary page and section headings should stay near the home-page system. */
.page-plan,
.page-facility,
.page-access,
.page-contact {
  --type-page-title: clamp(1.85rem, 1.48rem + 1.12vw, 2.5rem);
  --type-section-title: clamp(1.55rem, 1.34rem + .66vw, 2rem);
}

/* Plan: use the same current typography and color hierarchy as the facility page. */
.page-plan {
  font-family: var(--font-body);
}

.page-plan .section__title {
  color: var(--color-deep);
  font-family: var(--font-display);
  font-size: var(--type-section-title);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0;
}

.page-plan .section__lead,
.page-plan p,
.page-plan dt,
.page-plan dd {
  font-family: var(--font-body);
}

.page-plan main h3 {
  color: var(--color-ink);
  font-family: var(--font-display);
  font-weight: 900;
}

/* Neutralize hard-coded line breaks that create unnatural phrases. */
.page-home .home-guide-copy .section__title br,
.page-home .home-free-space .section__title br,
.page-home .home-local-board__title .section__title br,
.page-home .home-farm-note .section__title br {
  display: none;
}
.page-home .route-guide-head .section__title span,
.page-home .home-story__copy .section__title span {
  display: inline;
}
/* Home: remove oversized editorial type and give headings usable measure. */
.page-home .hero-lab--fresh-beach .hero-lab__mark,
.page-home .hero-lab__mark {
  max-width: 760px;
  font-size: clamp(3.4rem, 4.7vw, 4.25rem);
  line-height: 1.04;
}

.page-home .home-guide-layout {
  grid-template-columns: minmax(300px, .88fr) minmax(330px, 1fr) minmax(260px, .78fr);
}

.page-home .home-guide-copy .section__title {
  max-width: 17em;
  font-size: clamp(1.45rem, 1.75vw, 1.78rem);
  line-height: 1.5;
  text-wrap: pretty;
}

.page-home .home-story__copy .section__title,
.page-home .home-free-space .free-space-copy .section__title,
.page-home .home-local-card .section__title {
  max-width: 22em;
  font-size: clamp(1.55rem, 1.8vw, 1.95rem);
  line-height: 1.45;
  text-wrap: pretty;
}

.page-home .home-local-board__notebook {
  grid-template-columns: minmax(330px, .9fr) minmax(400px, 1.2fr) minmax(230px, .66fr);
}

.page-home .home-local-board__title .section__title {
  max-width: 18em;
  font-size: clamp(1.65rem, 2vw, 2rem);
  line-height: 1.48;
  text-wrap: pretty;
}

.page-home .home-farm-note .section__title {
  max-width: 19em;
  font-size: clamp(1.8rem, 2.4vw, 2.25rem);
  line-height: 1.42;
  text-wrap: pretty;
}

.page-home .home-album-gateway .section__title,
.page-home .home-reservation-slip h2 {
  font-size: clamp(1.7rem, 2.2vw, 2.1rem);
}

/* Plan: use the available width and let the phrase wrap naturally. */
.page-plan .food-source-intro {
  grid-template-columns: minmax(560px, 1.05fr) minmax(0, .95fr);
}
.page-plan .section__title--food-source {
  max-width: none;
  text-wrap: pretty;
}

/* Archive: retain the editorial system, but bring headings back into the shared hierarchy. */
.page-archive-system .archive-system-head h1 {
  font-size: clamp(2.25rem, 3vw, 2.75rem);
  line-height: 1.16;
  letter-spacing: -.025em;
}
.page-archive-gateway .archive-system-head h1 { white-space: nowrap; }
.page-archive-gateway .archive-system-head { gap: 28px; }
@media (min-width: 1101px) {
  .page-archive-gateway .archive-system-head {
    grid-template-columns: minmax(0, 1.35fr) minmax(430px, .65fr);
  }
}
.page-archive-system .archive-detail-head h1 {
  font-size: clamp(2.15rem, 2.65vw, 2.5rem);
}
.page-archive-system .archive-cover__voice h2 {
  font-size: clamp(1.4rem, 1.75vw, 1.85rem);
}
.page-archive-system .archive-photo-flow h2,
.page-archive-system .archive-detail-lead h2 {
  font-size: clamp(1.75rem, 2.2vw, 2.15rem);
  line-height: 1.42;
}

/* Rakkyo: keep the page character without letting it overpower the rest of the site. */

/* Intermediate widths: preserve useful horizontal relationships until phone widths. */
@media (min-width: 641px) and (max-width: 1100px) {
  .page-home .home-guide-layout {
    grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
    grid-template-areas:
      "copy main"
      "sea main"
      "notes notes";
    gap: 20px 26px;
  }
  .page-home .home-guide-copy .section__title {
    max-width: 18em;
    font-size: clamp(1.45rem, 2.55vw, 1.72rem);
  }
  .page-home .route-guide-head {
    grid-template-columns: minmax(300px, .82fr) minmax(0, 1.18fr);
  }
  .page-home .route-guide-head .section__eyebrow { grid-column: 1 / -1; }
  .page-home .home-local-board__notebook {
    grid-template-columns: minmax(0, 1fr) minmax(285px, .82fr);
    grid-template-areas:
      "title title"
      "route notes"
      "actions notes";
  }
  .page-home .home-local-board__title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, .52fr);
  }
  .page-home .home-farm-note__card,
  .page-home .home-album-gateway .voice-highlight {
    grid-template-columns: minmax(280px, .85fr) minmax(0, 1.15fr);
    gap: 28px;
  }
  .page-home .home-album-gateway .voice-highlight > div {
    padding-left: 24px;
    border-left: 1px solid rgba(74, 144, 226, .22);
  }
  .page-home .home-reservation-slip .home-closing-cta__inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (min-width: 641px) and (max-width: 940px) {
  .page-plan .food-source-intro {
    grid-template-columns: 1fr;
  }

  .page-facility .facility-stop {
    grid-template-columns: minmax(0, 1fr) minmax(285px, .82fr);
  }
  .page-facility .facility-stop--reverse .facility-stop__photo { order: 2; }
  .page-facility .facility-stop--reverse .facility-stop__copy { order: 1; }
  .page-facility .facility-stop__photo img { min-height: 280px; }
  .page-facility .facility-free-space .free-space-layout {
    grid-template-columns: minmax(0, .92fr) minmax(300px, 1.08fr);
    grid-template-areas:
      "copy visual"
      "panel panel";
  }
  .page-facility .facility-free-space .free-space-panel {
    grid-template-columns: minmax(340px, 1.05fr) minmax(0, .95fr);
  }
  .page-facility .facility-equipment {
    grid-template-columns: minmax(280px, .78fr) minmax(0, 1.22fr);
  }
  .page-facility .facility-equipment__photos {
    border-right: 1px solid rgba(36, 71, 95, .2);
    border-bottom: 0;
  }

  .page-access .access-arrival__layout {
    grid-template-columns: minmax(0, 1fr) minmax(290px, .78fr);
  }
  .page-access .access-map {
    border-right: 1px solid rgba(36, 71, 95, .2);
    border-bottom: 0;
  }
  .page-access .access-feature,
  .page-access .access-feature--cave {
    grid-template-columns: minmax(0, 1fr) minmax(280px, .78fr);
  }
  .page-access .access-feature--cave {
    grid-template-columns: minmax(280px, .78fr) minmax(0, 1fr);
  }
  .page-access .access-feature--cave .access-feature__photo { order: 2; }
  .page-access .access-feature--cave .access-feature__copy { order: 1; }
  .page-access .access-feature__photo {
    border-right: 1px solid rgba(36, 71, 95, .18);
    border-bottom: 0;
  }
  .page-access .access-feature--cave .access-feature__photo {
    border-right: 0;
    border-left: 1px solid rgba(36, 71, 95, .18);
  }
  .page-access .access-feature__photo img {
    min-height: 300px;
    aspect-ratio: auto;
  }

  .page-archive-system .archive-system-head {
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
    gap: 28px;
  }
  .page-archive-system .archive-system-head h1 {
    font-size: clamp(2.15rem, 4.3vw, 2.45rem);
  }
  .page-archive-system .archive-detail-head h1 {
    font-size: clamp(2rem, 4vw, 2.3rem);
  }
  .page-archive-system .archive-detail-lead {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .page-archive-system[data-archive-category="voice"] .archive-entry-feed,
  body.page-archive-system[data-archive-category="voice"] .archive-entry-feed {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 30px;
  }
  body.page-archive-system[data-archive-category="voice"] .archive-entry,
  body.page-archive-system[data-archive-category="voice"] .archive-entry:nth-child(3n) {
    grid-column: auto;
    display: block;
  }
  body.page-archive-system[data-archive-category="voice"] .archive-entry__photos,
  body.page-archive-system[data-archive-category="voice"] .archive-entry:nth-child(3n) .archive-entry__photos,
  body.page-archive-system[data-archive-category="voice"] .archive-entry:nth-child(3n) .archive-entry__head,
  body.page-archive-system[data-archive-category="voice"] .archive-entry:nth-child(3n) .archive-entry__body {
    grid-column: auto;
    grid-row: auto;
  }
  body.page-archive-system[data-archive-category="voice"] .archive-entry__photos {
    margin-top: 12px;
  }
}

@media (max-width: 640px) {
  .page-home .home-guide-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "copy"
      "main"
      "sea"
      "notes";
  }
  .page-home .hero-lab--fresh-beach .hero-lab__mark,
  .page-home .hero-lab__mark {
    font-size: clamp(2.45rem, 10.5vw, 2.75rem);
  }
  .page-home .home-guide-copy .section__title,
  .page-home .home-story__copy .section__title,
  .page-home .home-free-space .free-space-copy .section__title,
  .page-home .home-local-board__title .section__title,
  .page-home .home-farm-note .section__title,
  .page-home .home-album-gateway .section__title {
    font-size: clamp(1.42rem, 6.2vw, 1.7rem);
    line-height: 1.5;
  }
  .page-plan .food-source-intro { grid-template-columns: 1fr; }
  .page-plan .section__title--food-source {
    font-size: 1.42rem;
    line-height: 1.45;
  }
  .page-archive-system .archive-system-head h1,
  .page-archive-system .archive-detail-head h1 { font-size: 2rem; }
  .page-archive-gateway .archive-system-head h1 {
    font-size: clamp(.95rem, 5.15vw, 2rem);
    line-height: 1.3;
    white-space: nowrap;
  }
  .page-archive-system .archive-photo-flow h2,
  .page-archive-system .archive-detail-lead h2 { font-size: 1.65rem; }
}

@media (min-width: 641px) and (max-width: 820px) {
  .page-access .access-feature,
  .page-access .access-feature--cave {
    grid-template-columns: 1fr;
  }
  .page-access .access-feature--cave .access-feature__photo,
  .page-access .access-feature--cave .access-feature__copy {
    order: initial;
  }
  .page-access .access-feature__photo,
  .page-access .access-feature--cave .access-feature__photo {
    border-right: 0;
    border-left: 0;
    border-bottom: 1px solid rgba(36, 71, 95, .18);
  }
}
/* Final corrections from the 52-condition audit. */
.page-home .home-local-board__notebook {
  grid-template-columns: minmax(380px, 1fr) minmax(350px, 1.08fr) minmax(220px, .62fr);
}
.page-home .home-local-board__title .section__title {
  font-size: clamp(1.5rem, 1.72vw, 1.75rem);
}

@media (min-width: 641px) and (max-width: 1100px) {
  .page-home .home-local-board__title {
    grid-template-columns: minmax(0, 1.35fr) minmax(190px, .65fr);
  }
  .page-home .home-local-board__title .section__title {
    font-size: 1.5rem;
  }
  .page-home .home-farm-note .section__title {
    font-size: 1.6rem;
  }
}

@media (min-width: 641px) and (max-width: 940px) {
  .page-facility .facility-stop {
    grid-template-columns: minmax(270px, .78fr) minmax(340px, 1.22fr);
  }
  .page-facility .facility-stop--reverse {
    grid-template-columns: minmax(340px, 1.22fr) minmax(270px, .78fr);
  }
}

@media (max-width: 640px) {
  .page-home .home-local-board__title .section__title {
    font-size: 1.35rem;
  }
}
/* Two-line cap for the longest editorial headings. */
.page-home .home-local-board__title .section__title {
  font-size: 1.25rem;
  line-height: 1.52;
}
@media (max-width: 940px) {
  .page-facility .facility-stop__copy .section__title {
    font-size: 1.35rem;
    line-height: 1.5;
  }
}
@media (max-width: 640px) {
  .page-facility .facility-stop__copy .section__title {
    font-size: 1.25rem;
  }
}
/* Cascade-safe final layout for the home local board. */
@media (min-width: 641px) and (max-width: 1100px) {
  .page-home .home-local-board__notebook {
    grid-template-columns: minmax(0, 1fr) minmax(250px, .72fr);
    grid-template-areas:
      "title title"
      "route notes"
      "actions notes";
  }
  .page-home .home-local-board__title {
    min-width: 0;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(180px, .5fr);
  }
  .page-home .local-memo-route,
  .page-home .local-memo-notes,
  .page-home .local-memo-seascape {
    min-width: 0;
    max-width: 100%;
  }
}
@media (min-width: 641px) and (max-width: 860px) {
  .page-home .home-local-board__notebook {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "title"
      "route"
      "notes"
      "actions";
  }
}
@media (max-width: 640px) {
  .page-home .home-local-board__notebook {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "route"
      "actions"
      "notes";
  }
  .page-home .home-local-board__title {
    display: block;
    min-width: 0;
    width: 100%;
  }
  .page-home .home-local-board__title .section__title,
  .page-home .home-local-board__lead,
  .page-home .local-memo-route,
  .page-home .local-memo-notes,
  .page-home .local-memo-actions,
  .page-home .local-memo-seascape {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .page-home .local-memo-seascape {
    margin-top: 24px;
    transform: none;
  }
}
/* Keep archive voice photos inside the flexible photo column at 1024px. */
body.page-archive-system[data-archive-category="voice"] .archive-entry__photos {
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 1fr);
}
body.page-archive-system[data-archive-category="voice"] .archive-entry__photos--many {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 980px) {
  body.page-archive-system[data-archive-category="voice"] .archive-entry__photos--many {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Keep the long owner invitation to two readable lines on phone widths. */
@media (max-width: 640px) {
}

/* Prevent mobile hero wash from using viewport width inside a scrollbar-reduced layout. */
@media (max-width: 640px) {
  .page-plan .page-hero__heading::before,
  .page-facility .page-hero__heading::before,
  .page-access .page-hero__heading::before,
  .page-contact .page-hero__heading::before {
    width: calc(100% + 18px);
  }
  .page-access .access-arrival__head .section__title {
    font-size: 1.3rem;
    line-height: 1.5;
  }
}
@media (max-width: 640px) {
  .page-access .access-wayfinding__head .section__title {
    font-size: 1.3rem;
    line-height: 1.5;
  }
}

/* Plan: keep the four included-service cards separate on the sand background. */
.page-plan .section--plan-included .info-grid {
  background: transparent;
}

.page-plan .section--plan-included .info-card {
  background: #fff;
}

/* Keep the archive gateway heading on one natural line wherever the width allows it. */
@media (min-width: 641px) and (max-width: 1100px) {
  .page-archive-gateway .archive-system-head { grid-template-columns: 1fr; }
}


/* Center the mobile reservation label inside its circular button. */
@media (max-width: 940px) {
  .floating-cta {
    display: grid;
    place-items: center;
    gap: 0;
    text-align: center;
  }
  .floating-cta::after {
    display: block;
    margin: 0;
    line-height: 1;
    transform: none;
  }
}

/* Absolute centering avoids the hidden original link text creating a second grid row. */
@media (max-width: 940px) {
  .floating-cta::after {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
  }
}

/* Home: preserve the requested phrase boundaries without splitting inside a phrase. */
.page-home .home-guide-title {
  margin-inline: 0;
  text-align: left;
}

.page-home .home-guide-copy .home-guide-title br {
  display: inline;
}

.page-home .price-board__season-title {
  text-align: center;
}

.page-home .home-story__copy .home-story-title span {
  display: block;
  white-space: nowrap;
}

.page-home .route-guide-head .route-guide-title span,
.page-home .home-local-board__title .home-local-board-title span {
  display: inline-block;
  white-space: nowrap;
}

.page-home .home-local-board__title .home-local-board-title {
  max-width: 19em;
}

/* Facility: use the photo width so the free-space caption does not orphan punctuation. */
.page-facility .facility-free-space .free-space-visual figcaption {
  left: 12px;
  right: 12px;
  padding-inline: 12px;
}

@media (max-width: 640px) {
  .page-facility .facility-free-space .free-space-visual figcaption {
    left: 14px;
    right: 14px;
    padding-inline: 14px;
  }
}

/* 2026-07-27: prelaunch boundary-width and phrase-integrity corrections. */
.page-plan .section__title--plan-choice span,
.page-facility .facility-stop__copy .section__title span,
.page-home .home-free-space .free-space-copy .section__title span,
.page-home .local-memo-step__body h3 {
  display: inline-block;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .page-facility .facility-stop {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-facility .facility-stop--reverse .facility-stop__photo,
  .page-facility .facility-stop--reverse .facility-stop__copy {
    order: initial;
  }

  .page-facility .facility-free-space .free-space-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-facility .facility-free-space .free-space-specs div {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .page-facility .facility-free-space .free-space-specs dt {
    white-space: normal;
  }
}

@media (max-width: 700px) {
  .page-home .home-free-space .free-space-copy .section__title {
    word-break: keep-all;
    overflow-wrap: normal;
  }

  .page-home .home-free-space .free-space-copy .section__title br {
    display: block;
  }

  .page-home .home-story__copy .home-story-title span {
    white-space: normal;
  }

  .page-home .home-story__sheet {
    grid-template-columns: minmax(0, 1fr);
    gap: 38px;
    min-height: 0;
    padding: 46px 28px 38px;
  }

  .page-home .home-story__copy {
    grid-column: 1;
    grid-row: auto;
  }

  .page-home .home-story__copy,
  .page-home .home-story__essay {
    min-width: 0;
    max-width: 100%;
  }

  .page-home .home-story__essay {
    display: grid;
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 22px;
    min-height: 0;
    pointer-events: auto;
  }

  .page-home .home-story__essay::before,
  .page-home .home-story__essay::after {
    content: none;
  }

  .page-home .home-story__essay .home-story-photo,
  .page-home .home-story__essay .home-story-scene {
    position: relative;
    inset: auto;
    width: auto;
    min-width: 0;
  }

  .page-home .home-story-photo--main,
  .page-home .home-story-photo--sunset {
    transform: rotate(-1deg);
  }

  .page-home .home-story-photo--bbq,
  .page-home .home-story-scene--bbq {
    transform: rotate(1deg);
  }

  .page-home .home-story-scene--sea,
  .page-home .home-story-scene--evening {
    transform: rotate(-.7deg);
  }
}

@media (max-width: 480px) {
  .page-home .home-story__sheet {
    gap: 34px;
    padding: 46px 22px 38px;
  }

  .page-home .home-story__essay {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
}

@media (max-width: 360px) {
  .page-home .local-memo-step {
    grid-template-columns: 62px minmax(0, 1fr);
    column-gap: 10px;
    padding-right: 10px;
  }

  .page-home .local-memo-step__body h3 {
    font-size: 1.05rem;
  }
}
