/* Massage New source grid — additive layout repair, November 10.
   The eight source sections, their dividers, photos, copy and links stay intact.
   Only the restored main is affected; header/footer and other systems are not. */

body[data-riot-layout~="massage-new"] #page.massage-source .page-section {
  min-height: 0 !important; /* Replace the inherited 33vh / 66vh spacers. */
}

body[data-riot-layout~="massage-new"] #page.massage-source .page-section > .content-wrapper {
  padding: clamp(2.5rem, 5vw, 4.5rem) clamp(1.125rem, 4vw, 4rem) !important;
}

/* Exact source grids: hero, introduction, Erin, specialties, pricing,
   recovery packs, FAQ and closing booking section. No fixed empty rows. */
body[data-riot-layout~="massage-new"] #page.massage-source :is(
  .fe-6acd6eb5bda6c03329cb7399,
  .fe-6acd6eb5bda6c03329cb739d,
  .fe-6acd6eb5bda6c03329cb73a1,
  .fe-6acd6eb5bda6c03329cb73a5,
  .fe-6acd6eb5bda6c03329cb73ad,
  .fe-6acd6eb5bda6c03329cb73b1,
  .fe-6acd7129ccbc221607fda124,
  .fe-6acd6eb5bda6c03329cb73b9
) {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: none;
  grid-auto-rows: auto;
  gap: 1.25rem;
  overflow: visible;
}

body[data-riot-layout~="massage-new"] #page.massage-source :where(.fluid-engine) > .fe-block {
  grid-area: auto;
  min-width: 0;
  min-height: 0;
  height: auto;
}

body[data-riot-layout~="massage-new"] #page.massage-source .fluid-engine > .fe-block > .sqs-block {
  display: block;
  height: auto !important;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

body[data-riot-layout~="massage-new"] #page.massage-source .fluid-engine .sqs-block-content {
  width: 100%;
  min-width: 0;
  height: auto;
}

body[data-riot-layout~="massage-new"] #page.massage-source .sqs-html-content > :first-child {
  margin-top: 0;
}

body[data-riot-layout~="massage-new"] #page.massage-source .sqs-html-content > :last-child {
  margin-bottom: 0;
}

/* These five blocks are the actual source photographs, not icons or logos.
   Undo absolute fill wrappers and the captured 253px container heights;
   the existing width/height attributes supply each image's natural ratio. */
body[data-riot-layout~="massage-new"] #page.massage-source :is(
  #block-25ea358537a3af33f579,
  #block-0dde51bed531bdd2660b,
  #block-3c7f661912a5a1f73bf4,
  #block-9780398dd861e03b2c2a,
  #block-29e2ecf0a5fba1d29bb2
) :is(
  .fluid-image-component-root,
  .fluid-image-animation-wrapper,
  .fluid-image-container,
  .js-content-mode-element-wrapper,
  .js-content-mode-element
) {
  --image-component-container-height: auto !important;
  --image-component-container-width: 100% !important;
  display: block;
  position: relative;
  inset: auto;
  width: 100%;
  height: auto !important;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
}

body[data-riot-layout~="massage-new"] #page.massage-source :is(
  #block-25ea358537a3af33f579,
  #block-0dde51bed531bdd2660b,
  #block-3c7f661912a5a1f73bf4,
  #block-9780398dd861e03b2c2a,
  #block-29e2ecf0a5fba1d29bb2
) img {
  position: relative !important;
  inset: auto !important;
  display: block;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  object-fit: contain !important;
}

/* Keep the original centered photo-background hero and header reservation. */
body[data-riot-layout~="massage-new"] #page.massage-source .fe-6acd6eb5bda6c03329cb7399 {
  max-width: 720px;
  gap: 1.75rem;
}

body[data-riot-layout~="massage-new"] #page.massage-source :is(
  #block-777a013efdc06d9da988,
  #block-b928656465c60a5a6df4,
  #block-501af1e690e4bfe67e9a
) {
  max-width: 26rem;
  margin-inline: auto;
}

body[data-riot-layout~="massage-new"] #page.massage-source .fe-6acd6eb5bda6c03329cb73b9 {
  max-width: 1000px;
}

body[data-riot-layout~="massage-new"] #page.massage-source .sqs-block-button-element {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
  overflow-wrap: normal;
}

/* FAQ questions were 22–42px tall in the supplied measurements. */
body[data-riot-layout~="massage-new"] #page.massage-source #block-8e2177c8be676250b7ae .accordion-item__click-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-width: 44px;
  min-height: 44px;
  padding-block: .75rem;
  box-sizing: border-box;
  text-align: left;
}

body[data-riot-layout~="massage-new"] #page.massage-source #block-8e2177c8be676250b7ae .accordion-item__title {
  min-width: 0;
  white-space: normal;
}

body[data-riot-layout~="massage-new"] #page.massage-source #block-8e2177c8be676250b7ae .accordion-icon-container {
  flex-shrink: 0;
}

@media (min-width: 900px) {
  /* Preserve introduction copy on the left and the two source portraits
     side by side on the right, without the old 20-row whitespace. */
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-6acd6eb5bda6c03329cb739d {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: clamp(1rem, 2.5vw, 2rem);
  }

  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-7a9baead45d1df8daa07 { grid-area: 1 / 1 / 2 / 3; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-aad8ec1a9310b31cce06 { grid-area: 2 / 1 / 3 / 3; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-5a2e9f939402a12d45e7 { grid-area: 3 / 1 / 4 / 3; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-ab294b4371bba4ec2ab3 { grid-area: 4 / 1 / 5 / 3; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-25ea358537a3af33f579 { grid-area: 1 / 3 / 5 / 4; align-self: center; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-0dde51bed531bdd2660b { grid-area: 1 / 4 / 5 / 5; align-self: center; }

  body[data-riot-layout~="massage-new"] #page.massage-source :is(
    #block-7a9baead45d1df8daa07,
    #block-346ea334362b2fbc24c5
  ) h2 {
    font-size: clamp(2.75rem, 4.6vw, 4.25rem);
    line-height: 1.02;
  }

  /* Erin remains on the left; heading, name and complete biography now
     occupy separate content-sized rows rather than overlapping grid rows. */
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-6acd6eb5bda6c03329cb73a1 {
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    column-gap: clamp(2rem, 5vw, 4.5rem);
    align-content: center;
  }

  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-3c7f661912a5a1f73bf4 {
    grid-area: 1 / 1 / 4 / 2;
    width: 100%;
    max-width: 26rem;
    justify-self: center;
  }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-d865328ffc6ccc3bdfa1 { grid-area: 1 / 2 / 2 / 3; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-2ad4ef1512cd48d2eaa3 { grid-area: 2 / 2 / 3 / 3; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-d15ad87b6283114a464c { grid-area: 3 / 2 / 4 / 3; }

  /* Keep the original two-column specialty cards and Ashiatsu photo at
     right, including the centered Prenatal card. Text determines row size. */
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-6acd6eb5bda6c03329cb73a5 {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 1.25rem;
  }

  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-346ea334362b2fbc24c5 { grid-area: 1 / 1 / 2 / 3; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-9780398dd861e03b2c2a { grid-area: 2 / 3 / 5 / 4; align-self: center; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-9601953281dd152dacb8 { grid-area: 2 / 1 / 3 / 2; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-55e1e575d615be11ec90 { grid-area: 3 / 1 / 4 / 2; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-80380b08169ad0d66142 { grid-area: 2 / 2 / 3 / 3; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-c0caa3bbe85051a6c8c4 { grid-area: 3 / 2 / 4 / 3; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-2dc5c03472acafc3fe69 {
    grid-area: 4 / 1 / 5 / 3;
    width: calc((100% - 1.25rem) / 2);
    justify-self: center;
  }

  /* Pricing stays a complete list. Recovery retains copy/buttons at left
     and the original landscape treatment photograph at right. */
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-6acd6eb5bda6c03329cb73ad {
    max-width: 48rem;
  }

  body[data-riot-layout~="massage-new"] #page.massage-source .fe-6acd6eb5bda6c03329cb73b1 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 5vw, 4.5rem);
  }

  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-4c3db8082f98c2e528f0 { grid-area: 1 / 1 / 2 / 2; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-0692937ca1670cea14e6 { grid-area: 2 / 1 / 3 / 2; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-231ea595013b5e45d151 { grid-area: 3 / 1 / 4 / 2; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-21cec8f520ceba06f3f3 { grid-area: 4 / 1 / 5 / 2; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-382ed1e11e20383e02fd { grid-area: 5 / 1 / 6 / 2; }
  body[data-riot-layout~="massage-new"] #page.massage-source .fe-block-29e2ecf0a5fba1d29bb2 { grid-area: 1 / 2 / 6 / 3; align-self: center; }

  body[data-riot-layout~="massage-new"] #page.massage-source .fe-6acd7129ccbc221607fda124 {
    grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
    gap: clamp(2rem, 5vw, 4.5rem);
  }
}

@media (max-width: 899px) {
  /* All blocks follow their original DOM sequence on phones/tablets. */
  body[data-riot-layout~="massage-new"] #page.massage-source .page-section > .content-wrapper {
    padding-block: clamp(2rem, 6vw, 3rem) !important;
  }

  body[data-riot-layout~="massage-new"] #page.massage-source :is(
    #block-d1e4c4287023b74c5995,
    #block-7a9baead45d1df8daa07,
    #block-346ea334362b2fbc24c5,
    #block-755bde39b4dc5f2112ac
  ) h2 {
    font-size: clamp(2.25rem, 10vw, 3.4rem);
    line-height: 1.03;
    overflow-wrap: normal;
    word-break: normal;
  }

  body[data-riot-layout~="massage-new"] #page.massage-source #block-d865328ffc6ccc3bdfa1 h3 {
    font-size: clamp(1.6rem, 6.6vw, 2rem);
    line-height: 1.15;
  }

  body[data-riot-layout~="massage-new"] #page.massage-source :is(
    .fe-block-25ea358537a3af33f579,
    .fe-block-0dde51bed531bdd2660b,
    .fe-block-3c7f661912a5a1f73bf4,
    .fe-block-9780398dd861e03b2c2a
  ) {
    width: 100%;
    max-width: 21rem;
    justify-self: center;
  }

  body[data-riot-layout~="massage-new"] #page.massage-source .sqs-block-button-element {
    width: 100%;
    padding-inline: 1rem;
  }
}
