/* A porcelain bezel sits on the same warm stock as the other exhibits. */
.phone-frame,
.phone-viewer-bezel {
  --phone-edge: #b6b2a6;
  --phone-rim: #f9f7f1;
  box-sizing: border-box;
  position: relative;
  background: var(--phone-rim);
  border: 1px solid var(--phone-edge);
  box-shadow: inset 0 0 0 2px #fffdf8, 0 2px 4px #453b2a0b, 0 10px 18px -10px #453b2a45;
}
.phone-frame {
  display: block;
  width: min(100%, var(--phone-width, 16.5rem));
  padding: 13px 6px 8px;
  border-radius: 26px;
}
.phone-frame::before,
.phone-viewer-bezel::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 23px;
  height: 3px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: #b4b2a7;
}
.phone-display {
  display: flex;
  align-items: flex-start;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.58;
  overflow: hidden;
  border-radius: 19px;
  background: #fff;
  outline: 1px solid #d9d8d0;
}
.phone-display > .phone-content {
  display: block;
  flex: 0 0 100%;
  min-width: 0;
  position: relative;
  transform: translateY(calc(var(--phone-rest-offset, 0px) + var(--phone-offset, 0px)));
}
.phone-display .phone-content img {
  display: block;
  width: 100%;
  max-width: none;
  height: auto;
  max-height: none;
  margin: 0;
  border-radius: 0;
}
.phone-frame--detail .phone-display { align-items: center; }
.phone-frame--reach .phone-content::after {
  content: "";
  position: absolute;
  top: 40%;
  left: 1%;
  height: 16%;
  width: 2px;
  border-radius: 2px;
  background: var(--signal-active);
  pointer-events: none;
}
.paper-visual .phone-stage,
.paper-visual .phone-pair {
  background: var(--signal-surface);
  padding: clamp(1.1rem, 2.5vw, 2rem);
}
.phone-pair {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  align-items: center;
  justify-items: center;
  gap: clamp(.5rem, 2vw, 1.5rem);
  border: 1px solid #c8c1b2;
  border-radius: 2px;
}
.paper-visual .phone-pair .zoom {
  padding: 0;
  border: 0;
  background: transparent;
  width: min(100%, 12.5rem);
  overflow: visible;
}
.cs-preview:has(.phone-frame) { container-type: size; }
.cs-preview .phone-frame { --phone-width: min(100%, calc(63cqh - 12px)); }
.phone-pair .phone-frame, .cs-preview .phone-frame {
  padding: 11px 4px 6px;
  border-radius: 20px;
}
.phone-pair .phone-display, .cs-preview .phone-display { border-radius: 14px; }
.phone-pair .phone-frame::before, .cs-preview .phone-frame::before { top: 4px; width: 17px; height: 2px; }

/* Keep original pixels available in the image viewer, including the edges of UI crops. */
.enlarged.is-phone .viewer-display { display: grid; align-items: center; background: #fff; }
.phone-viewer-bezel::before { display: none; }
.enlarged.is-phone .phone-viewer-bezel {
  display: block;
  padding: 13px 6px 8px;
  border-radius: 20px;
}
.enlarged.is-phone .phone-viewer-bezel::before { display: block; }
@media (prefers-reduced-motion: reduce) {
  .phone-display > .phone-content { transform: translateY(var(--phone-rest-offset, 0px)); }
}
