/* Load after styles.css and ui-polish.css. Keeps the existing .phone transform
   and story position while replacing its painted body with the transparent PNG. */
.phone {
  height: min(76svh, 700px);
  width: auto;
  aspect-ratio: 874 / 1800;
  min-height: 0;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.device-display {
  position: absolute;
  z-index: 6;
  left: 9.38%;
  top: 6.39%;
  width: 81.35%;
  height: 88.06%;
  overflow: hidden;
  border-radius: 9% / 4%;
  background: #fff;
}

.device-frame {
  position: absolute;
  z-index: 7;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: fill;
  pointer-events: none;
}

.device-display .island {
  display: none;
}

.device-display .phone-home {
  bottom: 2.2%;
  background: #20231f;
}

.instagram-masthead .instagram-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 22px;
}

.instagram-masthead .instagram-glyph {
  display: block;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.instagram-masthead .instagram-brand > strong {
  font-family: var(--sans);
  font-style: normal;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1;
}

@media (min-width: 768px) and (max-width: 1100px) {
  .phone {
    height: min(68svh, 620px);
    width: auto;
  }
}

@media (max-width: 767px) {
  .phone {
    height: 100%;
    width: auto;
    aspect-ratio: 874 / 1800;
    max-height: 420px;
  }

  .instagram-masthead .instagram-brand {
    gap: 5px;
    min-height: 18px;
  }

  .instagram-masthead .instagram-glyph {
    flex-basis: 18px;
    width: 18px;
    height: 18px;
  }

  .instagram-masthead .instagram-brand > strong {
    font-size: 15px;
  }
}
