/* Keep the existing spacing unless a device's notch needs more room. */
:root {
  --page-safe-left: env(safe-area-inset-left, 0px);
  --page-safe-right: env(safe-area-inset-right, 0px);
}
.wrap {
  padding-left: max(var(--pad), var(--page-safe-left));
  padding-right: max(var(--pad), var(--page-safe-right));
}
.sig > .wrap {
  padding-left: max(clamp(20px, 4vw, 58px), var(--page-safe-left));
  padding-right: max(clamp(20px, 4vw, 58px), var(--page-safe-right));
}
.hero.has-empathy .copy {
  margin-left: max(var(--pad), var(--page-safe-left));
  margin-right: max(var(--pad), var(--page-safe-right));
}
.music-toggle-footer { display: none; }

/* Mobile controls belong to the hero/footer, never over a form or a CTA. */
@media (max-width: 767px), (max-height: 520px) {
  .hero .music-toggle {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: auto;
  }
  .music-toggle-footer {
    position: static;
    display: grid;
    margin: 12px auto 0;
  }
  body.has-music .fab {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  }
}

/* Keep the existing short-phone sizing after the general phone rules. */
@media (max-width: 720px) and (max-height: 600px) and (orientation: portrait) {
  .hero video, .hero .still, .hero .motion-fallback,
  .hero .shade { height: min(110vw, 50svh); }
  .hero h1 { font-size: 28px; }
  .hero-empathy { margin-top: 14px; }
}

/* Landscape can fit the CTA while still growing for larger text. */
@media (max-height: 520px) and (orientation: landscape) {
  .hero.has-empathy { height: auto; min-height: 100svh; }
  .hero.has-empathy .copy { padding: 16px 0; }
  .hero-empathy { margin-top: 10px; font-size: 16px; line-height: 1.6; }
}
@media (max-width: 720px) and (max-height: 520px) and (orientation: landscape) {
  .hero.has-empathy { display: grid; align-items: center; }
  .hero video, .hero .still, .hero .motion-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .hero .shade {
    inset: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(13,13,14,.92) 0%, rgba(13,13,14,.6) 58%, rgba(13,13,14,.2) 100%);
  }
  .hero.has-empathy .copy {
    margin-block: 0;
    width: min(62vw, 440px);
  }
  .hero h1 { font-size: 24px; }
  .hero .acts { margin-top: 12px; }
}
.book label.agree { min-height: 44px; }
