/* Load after site.css. The existing story sizing / scroll modes stay in charge. */
.phone {
  --phone-metal: 3px;
  --phone-bezel: 2px;
  --phone-radius: 38px;
  padding: var(--phone-bezel);
  border: var(--phone-metal) solid transparent;
  border-radius: var(--phone-radius);
  overflow: visible;
  background: linear-gradient(#101112, #101112) padding-box,
    linear-gradient(105deg,
    #969995 0%, #e8e9e3 12%, #b7b9b2 30%,
    #d9dad4 62%, #a2a59f 88%, #e5e6e0 100%) border-box;
  box-shadow:
    0 0 0 .75px rgba(59, 63, 59, .6),
    0 18px 38px -18px rgba(20, 23, 20, .36),
    inset 0 0 0 .75px rgba(255, 255, 250, .75);
}

.phone--story {
  --phone-radius: clamp(27px, 4vw, 38px);
}

/* Two volume buttons and the shorter action button: outside the display. */
.phone::before {
  content: "";
  display: block;
  position: absolute;
  top: 18%;
  left: -2px;
  right: auto;
  width: 2px;
  height: 23%;
  border-radius: 2px 0 0 2px;
  transform: none;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    #b9bcb5 0 8%, transparent 8% 24%,
    #a3a79f 24% 48%, transparent 48% 60%,
    #a3a79f 60% 84%, transparent 84%);
}

.phone::after {
  content: "";
  position: absolute;
  top: 30%;
  right: -2px;
  width: 2px;
  height: 11%;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(90deg, #a4a89f, #d9dbd4);
  z-index: -1;
  pointer-events: none;
}

.phone > .phone__screen {
  border-radius: calc(var(--phone-radius) - var(--phone-metal) - var(--phone-bezel));
  box-shadow: none;
}

/* The inspected 349 today/chats assets contain status text, but no island.
   The island sits in that existing blank status area; no extra top strip. */
.phone > .phone__screen::before {
  content: "";
  display: block;
  position: absolute;
  top: 1.3%;
  left: 50%;
  width: 28.5%;
  height: 3.5%;
  min-height: 12px;
  max-height: 24px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 85% 50%, #13202c 0 1px, transparent 2px), #08090a;
  z-index: 5;
  pointer-events: none;
}

/* Opt out only when future source images already include the hardware cutout. */
.phone--island-baked > .phone__screen::before {
  display: none;
}

.phone--story > .phone__screen {
  aspect-ratio: 750 / 1629;
}

.phone--story > .phone__screen > .story__shot {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
