/*
 * Shared raster iPhone frame for every app screenshot.
 * The screenshot keeps its own dimensions; a transparent PNG frame is
 * overlaid above it at the exact opening ratio used by the frame artwork.
 */
.device-frame {
  --iphone-frame-image: url("assets/iphone-frame-dark.png?v=20260915");
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  overflow: visible !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  filter: none !important;
  line-height: 0;
}

.device-frame::before {
  display: none !important;
  content: none !important;
}

/*
 * Frame artwork: 1368x2784 canvas with a 1206x2622 transparent screen hole.
 * The percentages below map that opening precisely onto the screenshot box.
 */
.device-frame::after,
#hero .hero-phone .phone.device-frame::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: -6.7164% !important;
  top: -3.0892% !important;
  width: 113.4328% !important;
  height: 106.1785% !important;
  z-index: 4 !important;
  pointer-events: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--iphone-frame-image) center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  filter: drop-shadow(0 24px 28px rgba(18, 7, 14, .32));
}

.device-frame > img,
.device-frame > picture,
.device-frame > picture > img {
  position: relative;
  z-index: 1;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 6.45% / 2.96% !important;
  object-fit: contain !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Retired script-generated controls must never duplicate the PNG hardware. */
.device-frame > .iphone-hardware-button {
  display: none !important;
}

/* Older hero rules had their own light frame and pseudo decoration. */
#hero .hero-phone .phone.device-frame {
  overflow: visible !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  filter: none !important;
}

#hero .hero-phone .phone.device-frame > img {
  border-radius: 6.45% / 2.96% !important;
}

/* Fuwa Memo uses the same PNG frame asset as MUTE, with no extra card shell. */
#cute-features .cute-ui-slide.single-ui.device-frame,
#cute-features .cute-ui-slide.single-ui.tall-ui.device-frame {
  overflow: visible !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  box-shadow: none !important;
  filter: none !important;
}

#cute-features .cute-ui-slide.single-ui.device-frame > img,
#cute-features .cute-ui-slide.single-ui.tall-ui.device-frame > img {
  border-radius: 6.45% / 2.96% !important;
  box-shadow: none !important;
}

/* The passcode wrapper follows the screenshot's true width. */
#lock .passcode-unlock.device-frame {
  display: block;
  width: fit-content !important;
  max-width: 100%;
  margin-inline: auto;
  filter: none !important;
}

#lock .passcode-unlock.device-frame > .passcode-img {
  width: auto !important;
  height: min(74vh, 680px) !important;
  max-width: calc(100vw - 48px) !important;
  max-height: none !important;
  object-fit: contain !important;
}

.hero-phone,
.hm-phone,
.lock-scene.lock-scene-asset {
  overflow: visible !important;
}

@media (max-width: 520px) {
  .device-frame::after,
  #hero .hero-phone .phone.device-frame::after {
    filter: drop-shadow(0 16px 20px rgba(18, 7, 14, .28));
  }

  #lock .passcode-unlock.device-frame > .passcode-img {
    width: auto !important;
    height: min(56svh, 520px) !important;
    max-width: calc(100vw - 44px) !important;
  }
}
