/* V17 — smartphone landscape carousel safeguard.
   Applied only to a SHORT + WIDE viewport while held landscape.
   V16 portrait mobile/desktop designs, full-circle source images, and all
   URLs/SEO metadata are unchanged.  Keep this CSS loaded last. */
@media (orientation: landscape) and (min-width: 480px) and (max-width: 1100px) and (max-height: 520px) {
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero {
    /* The old 100svh - 270/482/530px expressions could shrink to zero. */
    --v13-photo:clamp(148px,22vw,212px)!important;
    --v16-grow:0px!important;
    padding:10px 16px 7px!important;
    min-height:0!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
  }

  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .hero-frame.active {
    display:grid!important;
    grid-template-columns:minmax(0,1.2fr) minmax(148px,.8fr)!important;
    grid-template-rows:auto!important;
    gap:12px!important;
    align-items:center!important;
    justify-items:stretch!important;
    min-height:218px!important;
    height:auto!important;
    max-height:none!important;
    padding:6px 0 8px!important;
  }
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .v1-procedure-slide.active {
    grid-template-areas:"text photo"!important;
  }
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .v1-doctor-hero.active {
    grid-template-areas:"portrait doctor"!important;
  }

  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .v1-procedure-slide.active img.hero-backdrop,
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .v1-doctor-hero.active img.doctor-portrait-fill {
    position:static!important;
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    width:var(--v13-photo)!important;
    height:var(--v13-photo)!important;
    min-width:0!important;
    min-height:0!important;
    max-width:var(--v13-photo)!important;
    max-height:var(--v13-photo)!important;
    aspect-ratio:1 / 1!important;
    object-fit:contain!important;
    object-position:center!important;
    margin:0 auto!important;
    padding:0!important;
    transform:none!important;
    scale:1!important;
    filter:none!important;
    clip-path:none!important;
  }
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .v1-procedure-slide.active img.hero-backdrop {
    grid-area:photo!important;
  }
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .v1-doctor-hero.active img.doctor-portrait-fill {
    grid-area:portrait!important;
  }

  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .v1-procedure-slide.active .hero-canvas {
    grid-area:text!important;
    position:static!important;
    min-width:0!important;
    width:100%!important;
    height:auto!important;
    max-height:none!important;
    padding:0!important;
    justify-content:center!important;
  }
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .v1-doctor-hero.active .doctor-hero-copy {
    grid-area:doctor!important;
    position:static!important;
    min-width:0!important;
    width:100%!important;
    height:auto!important;
    max-height:none!important;
    padding:0!important;
    justify-content:center!important;
  }
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .hero-frame.active .hero-heading,
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .hero-frame.active .doctor-hero-title {
    font-size:clamp(28px,3.8vw,40px)!important;
    line-height:1.06!important;
    margin:0 0 6px!important;
  }
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .hero-frame.active .hero-description,
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .hero-frame.active .doctor-hero-description {
    font-size:clamp(12px,1.6vw,14px)!important;
    line-height:1.36!important;
    margin-bottom:6px!important;
  }
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .hero-frame.active .hero-eyebrow,
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .hero-frame.active .doctor-hero-kicker {
    font-size:10px!important;
    margin-bottom:5px!important;
  }
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .hero-frame.active .hero-cta {
    min-height:33px!important;
    padding:6px 12px!important;
    font-size:12px!important;
    margin-top:2px!important;
  }
  html[lang] body.genital-theme .hero-stage-premium.v1-home-hero .hero-bottom-controls {
    position:relative!important;
    grid-row:2!important;
    margin:2px auto 0!important;
  }
}
