/* Static, resolution-independent shells. The capture sets the screen ratio.
   Captions sit outside the hardware. No screen uses a crop or a mask. */
figure[data-frame] {
  --frame-reflection: color-mix(in srgb, var(--sheet-bg, #f2efe8) 22%, #d4d7da);
  --frame-shadow: 0 2px 3px #00000026, 0 12px 20px -12px #00000070, 0 35px 55px -30px #00000066;
  position: relative;
  isolation: isolate;
  display: block;
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  overflow: visible;
  background: linear-gradient(125deg, #f1f2f3, #aeb0b3 35%, #d9dadd 70%, #85888d);
  border: 1px solid #8c8f93;
  box-shadow: inset 0 1px 1px #ffffffc9, inset 0 -1px 1px #00000040, var(--frame-shadow);
}
figure[data-frame]:has(>figcaption) { margin-bottom: var(--frame-caption-space, 58px); }
figure[data-frame] > img,
figure[data-frame] > video,
figure[data-frame] > picture,
figure[data-frame] > a,
figure[data-frame] > a > picture { display: block; width: 100%; margin: 0; }
figure[data-frame] > iframe {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  border: 0;
  background: #f2efe8;
}
figure[data-frame] > img,
figure[data-frame] > video,
figure[data-frame] > picture > img,
figure[data-frame] > a > img,
figure[data-frame] > a > picture > img {
  display: block;
  position: relative;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}
figure[data-frame] > figcaption {
  position: absolute;
  inset: 100% 0 auto;
  margin: 0;
  padding: 18px 0 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: 1.5;
  box-shadow: none;
}
figure[data-frame]::before,
figure[data-frame]::after { content: ''; position: absolute; pointer-events: none; box-sizing: border-box; }
figure[data-frame="browser"] {
  padding: 32px 1px 7px;
  border-radius: 11px;
  background: linear-gradient(var(--frame-reflection), #e0e2e5 31px, #a8aaad 32px, #e5e7e9 33px, var(--frame-reflection));
}
figure[data-frame="browser"]::before {
  inset: 0 0 auto;
  height: 32px;
  border-radius: 10px 10px 0 0;
  background:
    radial-gradient(circle at 13px 16px, #9c9fa3 0 2.5px, #888c904d 2.6px 3px, transparent 3.1px),
    radial-gradient(circle at 24px 16px, #b2b5b8 0 2.5px, #888c904d 2.6px 3px, transparent 3.1px),
    radial-gradient(circle at 35px 16px, #c1c4c7 0 2.5px, #888c904d 2.6px 3px, transparent 3.1px),
    linear-gradient(#ffffff91, #ffffff91) center / 48% 17px no-repeat;
  box-shadow: inset 0 1px #ffffffcc, inset 0 -1px #00000012;
}
figure[data-frame="browser"]::after {
  inset: auto 1px 0;
  height: 7px;
  border-radius: 0 0 9px 9px;
  background: linear-gradient(#e5e7e9, #d2d4d7 70%, #a3a6aa);
  box-shadow: inset 0 -1px #ffffff80;
}
figure[data-frame="laptop"] {
  padding: 22px 9px 12px;
  margin-inline: 3%;
  border-radius: 2.5% 2.5% 1% 1% / 4% 4% 2% 2%;
  background: linear-gradient(125deg, color-mix(in srgb, var(--sheet-bg, #f2efe8) 15%, #42464a), #17191c 25%, #222529 75%, #45494e);
  border-color: #6e7277;
  box-shadow: inset 0 0 0 1px #ffffff29, inset 0 0 0 3px #090a0c, var(--frame-shadow);
}
figure[data-frame="laptop"]::before {
  width: 5px; height: 5px; top: 9px; left: calc(50% - 2.5px);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #415b72, #101b29 45%, #07090c 55%);
  box-shadow: 0 0 0 1px #ffffff16;
}
figure[data-frame="laptop"]::after {
  top: calc(100% - 1px); left: -3.3%; width: 106.6%; height: 12px;
  border: 1px solid #8b8e92;
  border-radius: 1px 1px 38% 38% / 1px 1px 85% 85%;
  background: linear-gradient(90deg, #a4a7aa, #eceef0 8%, #c4c7ca 43%, #9a9ea2 49%, #bdc0c4 57%, #eef0f1 92%, #8e9296);
  box-shadow: inset 0 2px #ffffffa3, inset 0 -3px 2px #53575c55, 0 7px 8px -5px #0008;
}
figure[data-frame="tablet"] {
  padding: 19px;
  border-radius: 4.5% / 6%;
  border-color: #7b7e82;
  background: linear-gradient(120deg, color-mix(in srgb, var(--sheet-bg, #f2efe8) 15%, #5f6368), #15171a 9%, #111316 88%, #61656a);
  box-shadow: inset 0 0 0 1px #d2d5d8, inset 0 0 0 3px #22252a, var(--frame-shadow);
}
figure[data-frame="tablet"]::before {
  width: 5px; height: 5px; top: 7px; left: calc(50% - 2.5px);
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #435b73, #101820 55%, #050709 65%);
  box-shadow: 0 0 0 1px #ffffff1a;
}
figure[data-frame="tablet"]::after {
  width: 25px; height: 2px; right: 28px; top: -2px;
  background: linear-gradient(#c6c8cb, #5e6267); border-radius: 2px;
}
figure[data-frame="phone"] {
  padding: 28px 9px 19px;
  border-radius: 12% / 7.5%;
  border-color: #777b80;
  background: linear-gradient(115deg, color-mix(in srgb, var(--sheet-bg, #f2efe8) 15%, #6d7278), #181a1d 8%, #080a0c 90%, #72777d);
  box-shadow: inset 0 0 0 1px #c3c8cd, inset 0 0 0 3px #24282d, inset 0 0 0 5px #080a0c, var(--frame-shadow);
}
figure[data-frame="phone"]::before {
  width: 46px; height: 12px; top: 9px; left: calc(50% - 23px);
  border: 1px solid #24272b; border-radius: 20px;
  background: radial-gradient(circle at 37px 5px, #253d55 0 2px, #090d13 2.5px 3px, transparent 3.5px), #030405;
}
figure[data-frame="phone"]::after {
  height: 3px; width: 28%; bottom: 8px; left: 36%;
  border-radius: 8px; background: #a4a7ab;
}
.service-device figure[data-frame] > figcaption {
  left: auto;
  width: max-content;
  max-width: 100%;
}
@media (max-width: 389px) {
  /* Reserve the measured 67px caption without resizing its hardware. */
  figure.live-shop[data-frame],
  figure.live-case[data-frame] { --frame-caption-space: 68px; }
}
@media (max-width: 480px) {
  figure[data-frame="browser"] { padding-top: 27px; }
  figure[data-frame="browser"]::before { height: 27px; background-position-y: -2px, -2px, -2px, center; }
  figure[data-frame="tablet"] { padding: 14px; }
  figure[data-frame="tablet"]::before { top: 5px; width: 4px; height: 4px; }
}
