/* Device frames for the screenshots in shared/shots: pure CSS, no pictures of devices.
   Each frame is as wide as its container (or give it a width) and keeps its own proportions,
   so it scales with the page. Put one <img> inside .dv-screen.

     <div class="dv dv-window"><div class="dv-screen"><img src="…/mac_reader_1600.webp" alt="…"></div></div>
     <div class="dv dv-macbook"><div class="dv-lid"><div class="dv-screen"><img …></div></div><div class="dv-base"></div></div>
     <div class="dv dv-ipad"><div class="dv-screen"><img src="…/ipad_summary_1600.webp" alt="…"></div></div>
     <div class="dv dv-iphone"><div class="dv-screen"><img src="…/iphone_library_800.webp" alt="…"></div></div>

   Never set a height on a frame: its height follows from its width (the screen keeps the
   screenshot's proportions, the frame adds its bezel), so nothing is cropped.
   Finishes: add .dv-silver (light frames) or leave the default (dark). Shadows: --dv-shadow.
   Proportions (from the screenshots): Mac 2560×1720 (1.4884), iPad sideways 2360×1640 (1.4390),
   iPhone 1206×2622 (0.4600). The Mac captures already carry the app's title bar and the window's
   three buttons, so .dv-window draws only the window's edge and corners. */

.dv {
  --dv-frame: #1c1c1e;
  --dv-frame-hi: #3a3a3c;
  --dv-edge: rgba(255, 255, 255, 0.10);
  --dv-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.45), 0 18px 36px -18px rgba(0, 0, 0, 0.35);
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
}
.dv *, .dv *::before, .dv *::after { box-sizing: border-box; }
.dv-screen {
  position: relative;
  overflow: hidden;
  /* Dark, not white: at a tilted frame's edge the background shows through the picture's
     anti-aliased edge, and white drew a dashed line between screen and bezel (owner, 2026-11-27). */
  background: #0b0b0c;
}
.dv-screen > img,
.dv-screen > picture > img,
.dv-screen > video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.dv-silver {
  --dv-frame: #e3e4e6;
  --dv-frame-hi: #f7f7f8;
  --dv-edge: rgba(0, 0, 0, 0.12);
}

/* A Mac window, floating. Corners circular: horizontal % / vertical % of the box. */
.dv-window {
  border-radius: 1.25% / 1.86%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.16), 0 0 0 1.5px rgba(255, 255, 255, 0.06) inset, var(--dv-shadow);
  overflow: hidden;
}
.dv-window > .dv-screen { width: 100%; aspect-ratio: 2560 / 1720; border-radius: inherit; }

/* A laptop: the lid holds the screen, the base is a thin deck below it. */
.dv-macbook {
  padding: 0 5.5% 2.8%; /* room for the base's overhang and depth */
}
.dv-macbook .dv-lid {
  position: relative;
  aspect-ratio: 1.4294; /* screen 2560×1720 plus the bezel */
  padding: 2.4% 2.4% 3.6%;
  background: linear-gradient(180deg, var(--dv-frame-hi), var(--dv-frame) 12%);
  border-radius: 3.2% / 4.57%;
  box-shadow: 0 0 0 1px var(--dv-edge) inset, var(--dv-shadow);
}
.dv-macbook .dv-lid::before { /* camera */
  content: "";
  position: absolute;
  top: 0.9%;
  left: 50%;
  width: 0.5%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #0b0b0c;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.dv-macbook .dv-screen {
  width: 100%;
  aspect-ratio: 2560 / 1720;
  border-radius: 0.6% / 0.9%;
}
.dv-macbook .dv-base {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  aspect-ratio: 29.4; /* 3.4% of the width high; it overlaps the lid's lower edge a little */
  z-index: 1;
  background: linear-gradient(180deg, #d9dadc 0%, #c4c5c8 38%, #9c9ea2 100%);
  border-radius: 0 0 46% 46% / 0 0 100% 100%;
  box-shadow: 0 18px 30px -12px rgba(0, 0, 0, 0.45);
}
.dv-macbook .dv-base::before { /* the thumb notch in the deck's front edge */
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 13%;
  height: 38%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #a9abaf, #c9cacd);
  border-radius: 0 0 40% 40% / 0 0 100% 100%;
}
.dv-macbook.dv-dark-base .dv-base { background: linear-gradient(180deg, #4a4b4e 0%, #2f3033 40%, #1a1b1d 100%); }
.dv-macbook.dv-dark-base .dv-base::before { background: linear-gradient(180deg, #1c1d1f, #333437); }

/* An iPad held sideways. Bezel 3.4% of the width; screen corners as the display's. */
.dv-ipad {
  padding: 3.4%; /* the frame's height follows from the screen's proportions (1.3973 overall) */
  background: var(--dv-frame);
  border-radius: 4.83% / 6.75%;
  box-shadow: 0 0 0 1px var(--dv-edge) inset, 0 0 0 0.35em rgba(0, 0, 0, 0.02), var(--dv-shadow);
}
.dv-ipad::before { /* front camera, on the long edge */
  content: "";
  position: absolute;
  top: 1.45%;
  left: 50%;
  width: 0.55%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #0b0b0c;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.07);
}
.dv-silver.dv-ipad::before { background: #2a2a2c; }
.dv-ipad > .dv-screen {
  width: 100%;
  aspect-ratio: 2360 / 1640;
  border-radius: 1.53% / 2.2%;
}

/* An iPhone. Bezel 3.6% of the width; the Dynamic Island drawn over the status bar. */
.dv-iphone {
  padding: 3.6%; /* the frame's height follows from the screen's proportions (0.4786 overall) */
  background: var(--dv-frame);
  border-radius: 16.3% / 7.8%;
  box-shadow: 0 0 0 1px var(--dv-edge) inset, 0 0 0 2px rgba(0, 0, 0, 0.04), var(--dv-shadow);
}
.dv-iphone::before, .dv-iphone::after { /* side buttons: the action button and the volume on the left, the side button on the right */
  content: "";
  position: absolute;
  width: 1.1%;
  border-radius: 2px;
  filter: brightness(0.82);
}
.dv-iphone::before {
  left: -0.9%;
  top: 17%;
  height: 22%;
  background: linear-gradient(to bottom, var(--dv-frame) 0 13%, transparent 13% 29%, var(--dv-frame) 29% 59%, transparent 59% 70%, var(--dv-frame) 70% 100%);
}
.dv-iphone::after { right: -0.9%; top: 26%; height: 10%; background: var(--dv-frame); }
.dv-iphone > .dv-screen {
  width: 100%;
  aspect-ratio: 1206 / 2622;
  border-radius: 13.7% / 6.3%;
}
.dv-iphone > .dv-screen::after { /* Dynamic Island */
  content: "";
  position: absolute;
  top: 1.33%;
  left: 50%;
  width: 30.5%;
  height: 4.14%;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
}

/* Turn off the island where a picture is not of the whole screen. */
.dv-iphone.dv-no-island > .dv-screen::after { display: none; }

@media (prefers-reduced-motion: reduce) {
  .dv, .dv * { transition: none !important; animation: none !important; }
}
