/* Shared illustrated iPhone for the card, guide and menu. */
.mt-iphone-device__frame {
  position: relative; width: min(284px,88%); margin-inline: auto; padding: 8px;
  border: 1px solid #a4b0bd; border-radius: 43px;
  background: linear-gradient(115deg,#33424e,#131c24 35%,#263540 80%,#44535e);
  box-shadow: inset 0 0 0 2px #9ca8b466, inset 0 0 0 4px #0d1720,
    0 24px 38px -16px #000b;
}
.mt-iphone-device__window {
  position: relative; width: 100%; aspect-ratio: 1170 / 2532; overflow: hidden;
  border: 1px solid #080e15; border-radius: 34px; background: #e3eef9;
}
.mt-iphone-device__camera {
  position: absolute; top: 16px; left: 50%; width: 66px; height: 17px;
  transform: translateX(-50%); border-radius: 20px; background: #080d13;
  box-shadow: inset 0 1px 2px #000; pointer-events: none;
}
.mt-iphone-device__camera::after {
  content: ''; position: absolute; top: 5px; right: 8px; width: 6px; height: 6px;
  border-radius: 50%; background: #17283b; box-shadow: inset 0 0 0 1px #253c51;
}
.mt-iphone-device__buttons {
  position: absolute; top: 95px; left: -3px; width: 3px; height: 29px;
  border-radius: 2px 0 0 2px; background: #455561; box-shadow: 0 43px #455561;
}
.mt-iphone-device__frame::after {
  content: ''; position: absolute; right: -3px; top: 122px; width: 3px; height: 47px;
  border-radius: 0 2px 2px 0; background: #455561;
}
.mt-iphone-device .mt-iphone-device__camera { top: 13px; width: 48px; height: 12px; }
.mt-iphone-device .mt-iphone-device__camera::after { top: 4px; right: 6px; width: 4px; height: 4px; }
/* Scale iPhone side details with the handset, including its compact preview. */
.mt-iphone-device .mt-iphone-device__buttons {
  top: 21%; left: -3px; width: 3px; height: 14%;
  background: transparent; box-shadow: none; pointer-events: none;
}
.mt-iphone-device .mt-iphone-device__buttons::before,
.mt-iphone-device .mt-iphone-device__buttons::after {
  content: ''; position: absolute; left: 0; width: 100%; height: 40%;
  border-radius: 2px 0 0 2px; background: #455561; pointer-events: none;
}
.mt-iphone-device .mt-iphone-device__buttons::before { top: 0; }
.mt-iphone-device .mt-iphone-device__buttons::after { bottom: 0; }
.mt-iphone-device .mt-iphone-device__frame::before {
  content: ''; position: absolute; top: 13%; left: -3px; width: 3px; height: 3%;
  border-radius: 2px 0 0 2px; background: #455561; pointer-events: none;
}
.mt-iphone-device .mt-iphone-device__frame::after {
  top: 24%; right: -3px; width: 3px; height: 10%; pointer-events: none;
}
/* Illustrated home screen: familiar phone cues without third-party app artwork. */
.mt-iphone-device .mt-iphone-device__camera { display: block; }
.mt-iphone-device .mt-neutral-screen {
  position: absolute; inset: 0; overflow: hidden; container-type: inline-size;
  background: linear-gradient(155deg,#2f78a7 0%,#1a568d 44%,#103b72 72%,#1b6094 100%);
}
.mt-iphone-device .mt-neutral-screen__grid {
  position: absolute; z-index: 1; top: 17%; left: 11%; width: 78%;
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
  column-gap: 6cqw; row-gap: 13cqw;
}
.mt-iphone-device .mt-neutral-screen__ghost {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden;
  border: 1px solid #e9f2f8a8; border-radius: 27%;
  background: linear-gradient(145deg,#e3e9f6,#8daed6);
  box-shadow: 0 5px 11px -7px #07182b88;
  filter: blur(clamp(1px,.7cqw,2.5px)); opacity: .88;
}
.mt-iphone-device .mt-neutral-screen__ghost--1 {
  background: linear-gradient(150deg,#e5f7ef,#6fc9b8);
}
.mt-iphone-device .mt-neutral-screen__ghost--2 {
  background: linear-gradient(145deg,#fceaca,#dea883);
}
.mt-iphone-device .mt-neutral-screen__ghost--3 {
  background: linear-gradient(145deg,#f4e3f1,#b28ac5);
}
.mt-iphone-device .mt-neutral-screen__ghost--4 {
  background: linear-gradient(145deg,#e5f7fc,#76bfd4);
}
.mt-iphone-device .mt-neutral-screen__ghost--5 {
  background: linear-gradient(145deg,#f8f2e4,#b9baa4);
}
.mt-iphone-device .mt-neutral-screen__ghost--6 {
  background: linear-gradient(145deg,#e4eaf1,#768fae);
}
.mt-iphone-device .mt-neutral-screen__ghost--7 {
  background: linear-gradient(145deg,#ffedea,#d69d9b);
}
.mt-iphone-device .mt-neutral-screen__ghost::before,
.mt-iphone-device .mt-neutral-screen__ghost::after {
  content: ''; position: absolute; display: block; background: #f9fcff9c;
}
.mt-iphone-device .mt-neutral-screen__ghost::before {
  width: 43%; height: 43%; top: 18%; left: 29%; border-radius: 50%;
}
.mt-iphone-device .mt-neutral-screen__ghost::after {
  width: 48%; height: 8%; bottom: 17%; left: 26%; border-radius: 999px;
}
.mt-iphone-device .mt-neutral-screen__ghost--1::before {
  width: 52%; height: 37%; top: 25%; left: 24%; border-radius: 24%;
}
.mt-iphone-device .mt-neutral-screen__ghost--2::before {
  width: 40%; height: 40%; top: 24%; left: 30%; border-radius: 18%; transform: rotate(35deg);
}
.mt-iphone-device .mt-neutral-screen__ghost--3::before {
  width: 18%; height: 54%; top: 17%; left: 42%; border-radius: 999px;
}
.mt-iphone-device .mt-neutral-screen__ghost--4::before {
  width: 54%; height: 28%; top: 34%; left: 23%; border-radius: 999px;
}
.mt-iphone-device .mt-neutral-screen__ghost--5::before {
  width: 40%; height: 40%; top: 22%; left: 30%; border-radius: 50%;
  box-shadow: 0 0 0 2px #f9fcff6b;
}
.mt-iphone-device .mt-neutral-screen__ghost--6::before {
  width: 45%; height: 45%; top: 22%; left: 28%; border-radius: 25%;
}
.mt-iphone-device .mt-neutral-screen__ghost--7::before {
  width: 18%; height: 18%; top: 24%; left: 25%; border-radius: 50%;
  box-shadow: 8px 0 #f9fcff9c, 4px 8px #f9fcff9c;
}
.mt-iphone-device .mt-neutral-screen__app {
  position: relative; z-index: 2; display: grid; place-items: center; overflow: hidden;
  aspect-ratio: 1; transform: scale(1.32);
  border-radius: 24%; background: #edf3f7;
}
.mt-iphone-device .mt-iphone-device__window .mt-neutral-screen__app img {
  display: block; width: 88%; height: 88%; object-fit: contain;
}
.mt-iphone-device:not(.mt-iphone-device--compact) .mt-neutral-screen__app {
  background: #f3f7fa;
}
.mt-iphone-device .mt-neutral-screen__dock {
  position: absolute; z-index: 2; left: 7%; right: 7%; bottom: 5%;
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: center;
  gap: 5%; padding: 4% 6%; border: 1px solid #d7e8f271;
  border-radius: 24cqw; background: #d5e8f542;
  box-shadow: 0 8px 20px -12px #031d4490, inset 0 1px #ffffff48;
}
.mt-iphone-device .mt-neutral-screen__dock span {
  display: block; aspect-ratio: 1; border-radius: 26%;
  background: linear-gradient(145deg,#e4f8ee,#32bc76);
  box-shadow: inset 0 1px 1px #fff9, 0 3px 8px -5px #092a52;
  filter: blur(clamp(.5px,.45cqw,1.5px));
}
.mt-iphone-device .mt-neutral-screen__dock span:nth-child(2) { background: linear-gradient(145deg,#eaf4ff,#76b0e4); }
.mt-iphone-device .mt-neutral-screen__dock span:nth-child(3) { background: linear-gradient(145deg,#fff2e4,#f5a97a); }
.mt-iphone-device .mt-neutral-screen__dock span:nth-child(4) { background: linear-gradient(145deg,#f0eaff,#ad91e9); }
/* The menu reuses the full illustrated handset at a smaller optical size. */
.mt-iphone-device--compact { width: 100%; margin: 0; }
.mt-iphone-device--compact .mt-iphone-device__frame {
  width: 100%; max-width: 100%; padding: 2px; border-radius: 15% / 7.5%;
  border-color: #7e94a3; background: #172a39;
  box-shadow: 0 5px 10px -7px #102b49a0;
}
.mt-iphone-device--compact .mt-iphone-device__window { border-radius: 13% / 6%; }
.mt-iphone-device--compact .mt-iphone-device__window { border: 0; }
.mt-iphone-device--compact .mt-iphone-device__camera { top: 3px; width: 12px; height: 3px; }
.mt-iphone-device--compact .mt-iphone-device__camera::after { top: 0; right: 2px; width: 2px; height: 2px; }
/* Side hardware and stacked rims become visual noise at 28-50px. */
.mt-iphone-device--compact .mt-iphone-device__buttons,
.mt-iphone-device--compact .mt-iphone-device__frame::before,
.mt-iphone-device--compact .mt-iphone-device__frame::after { display: none; }
.mt-iphone-device--compact:not(.mt-iphone-device--menu) .mt-neutral-screen__app { transform: scale(2.35); }
.mt-iphone-device--compact:not(.mt-iphone-device--menu) .mt-neutral-screen__ghost { filter: blur(.75px) saturate(.5); opacity: .52; }
.mt-iphone-device--compact:not(.mt-iphone-device--menu) .mt-neutral-screen__dock span { filter: blur(.5px) saturate(.7); opacity: .72; }

/* The menu keeps the shared handset but removes screen details too small to read. */
.mt-iphone-device--menu { display: block; flex: none; width: 28px; margin: 0; }
.mt-iphone-device--menu .mt-iphone-device__frame {
  width: 100%; padding: 1.5px; border: 1.5px solid #7c95a5;
  background: #0d1b27; box-shadow: 0 3px 6px -4px #06192599;
}
.mt-iphone-device--menu .mt-iphone-device__window { border: 0; }
.mt-iphone-device--menu .mt-iphone-device__buttons,
.mt-iphone-device--menu .mt-iphone-device__frame::before,
.mt-iphone-device--menu .mt-iphone-device__frame::after { display: none; }
.mt-iphone-device--menu .mt-neutral-screen__ghost,
.mt-iphone-device--menu .mt-neutral-screen__dock { display: none; }
.mt-iphone-device--menu .mt-neutral-screen__grid {
  inset: 0; width: 100%; height: 100%;
  grid-template-columns: 1fr; gap: 0; place-items: center;
}
.mt-iphone-device--menu .mt-neutral-screen__app {
  width: 74%; transform: none;
}
.mt-iphone-device--menu .mt-iphone-device__window .mt-neutral-screen__app img { width: 84%; height: 84%; }

@media (forced-colors: active) {
  .mt-iphone-device__frame, .mt-iphone-device__window { border-color: CanvasText; box-shadow: none; }
  .mt-iphone-device--compact .mt-iphone-device__frame { border-color: CanvasText; background: Canvas; box-shadow: none; }
  .mt-iphone-device__buttons::before, .mt-iphone-device__buttons::after,
  .mt-iphone-device__frame::before, .mt-iphone-device__frame::after { background: CanvasText; box-shadow: none; }
}
