/* Keep the desktop screenshots and their live overlays; only crop the phone view. */
.feature-mobile-only { display: none; }

@media (max-width: 768px) {
  #features .feature-visual {
    container-type: inline-size;
    width: 100%;
    max-width: 310px;
    height: auto;
    max-height: none;
    margin: 18px auto 0;
    overflow: hidden;
  }
  #features .iphone-frame {
    width: 100%;
    max-width: 310px;
    padding: 7px 7px 0;
    border-bottom: 0;
    border-radius: 38px 38px 0 0;
  }
  #features .iphone-screen {
    /* Artwork is 780px wide. Measure against the screen inside the 8px bezel. */
    height: calc(30px + (100cqw - 16px) * var(--phone-art-crop) + var(--phone-after-crop, 0px));
    border-radius: 30px 30px 0 0;
    overflow: hidden;
  }
  #features .iphone-status { height: 30px; }
  #features .iphone-home { display: none; }

  /* Leave a little room under the last visible app panel, with no dead space. */
  #features [aria-labelledby="today-feature-title"] { --phone-art-crop: calc(966 / 780); }
  #features [aria-labelledby="jobs-feature-title"] { --phone-art-crop: calc(1370 / 780); }
  #features [aria-labelledby="resume-feature-title"] { --phone-art-crop: calc(1440 / 780); }
  #features [aria-labelledby="reply-feature-title"] {
    --phone-art-crop: calc(960 / 780);
    --phone-after-crop: 20px;
  }
}
