/* Safari / LINE: treat the first layout height as fixed, even when browser chrome expands or collapses.
   This is intentionally mobile-only; the moving logo remains untouched. */
@media (max-width:700px) {
  html {
    background-color:#f8f7ef;
    overscroll-behavior-y:none;
  }
  body.eco-home {
    overscroll-behavior-y:none;
    background-color:#f8f7ef;
    -webkit-overflow-scrolling:auto;
  }
  /* Safari was still recomputing the outer hero's min-height (100svh) even after its inner grid was locked.
     This altered the document position of the following card and visually shrank the manager portrait. */
  main > .hero-restored.hero-natural {
    min-height:calc(var(--eco-locked-viewport-height, 760px) - var(--header-height)) !important;
    height:auto;
    padding-top:0;
    padding-bottom:0;
    background:transparent;
  }
  .hero-restored .hero-natural-grid {
    height:calc(var(--eco-locked-viewport-height, 760px) - var(--header-height) - var(--head-gap) - max(8px, env(safe-area-inset-bottom))) !important;
    min-height:430px;
    grid-template-rows:auto auto auto minmax(0,1fr) auto;
  }
  /* Lock the portrait's sizing context and prevent the grid from shrinking the figure in Safari. */
  .hero-restored .hero-natural-person {
    width:min(56vw,calc(var(--eco-locked-viewport-height, 760px) * .44)) !important;
    min-height:0;
    align-self:stretch;
  }
  .hero-restored .hero-natural-person .portrait-faithful {
    height:100%;
    max-height:100%;
    min-height:0;
  }
  /* No svh-driven layout or type sizes within the opening composition. */
  .hero-restored h1 {
    font-size:clamp(32px,min(10.4vw,calc(var(--eco-locked-viewport-height,760px) * .069)),54px);
  }
  .hero-natural-grid .hand-wordmark {
    margin-bottom:min(calc(var(--eco-locked-viewport-height,760px) * .26),40vw);
  }
  .hero-restored .hero-natural-fees > div {
    transition:none;
  }
  /* The background must not extend or recompute when the browser's URL toolbar is scrolled away. */
  body.eco-home::before {
    height:var(--eco-locked-scene-height,760px) !important;
    background-size:cover;
  }
  .hero-restored .hand-consult-card,
  .hero-restored .hand-offer,
  .hero-restored .appraisal-scene {
    transition:none;
  }
  .follow-actions:not([hidden]) {
    -webkit-transform:translateZ(0);
    transform:translateZ(0);
  }
}
