.install-figure {
  --ink: #674d68;
  --highlight: #f1dbe9;
  --canvas: #e9dff2;
  --screen: #fbf5fb;
  min-width: 0;
  margin: 0;
}
.install-figure figcaption {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.35;
  text-align: center;
}
.install-art {
  display: grid;
  min-height: 175px;
  padding: 10px;
  place-items: center;
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 20% 15%, #fff9, transparent 62%), var(--canvas);
}
.install-device {
  position: relative;
  width: min(100%, 278px);
  padding: 5px;
  border-radius: 12px;
  background: var(--ink);
  box-shadow: 6px 7px 0 #51374e16;
}
.install-screen {
  position: relative;
  min-height: 150px;
  border-radius: 8px;
  background: var(--screen);
}
.install-toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: #fffafc;
}
.install-address {
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 6px;
  background: #eee8f0;
  color: var(--plum);
  font-size: 0.625rem;
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.install-control {
  position: relative;
  display: grid;
  flex: 0 0 23px;
  height: 23px;
  place-items: center;
  border: 1px solid #a7749c;
  border-radius: 6px;
  background: var(--highlight);
  color: var(--plum);
  line-height: 1;
}
.install-control--share::before {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border: 1px solid currentColor;
  border-radius: 2px;
  content: "";
}
.install-control--share::after {
  position: absolute;
  top: 2px;
  left: 7px;
  width: 7px;
  background: var(--highlight);
  content: "↑";
  font-size: 12px;
  font-weight: 800;
}
.install-control--more::before {
  content: "⋮";
  font-size: 15px;
  font-weight: 800;
}
.install-control--install::before {
  width: 12px;
  height: 8px;
  border: 1px solid currentColor;
  border-radius: 2px;
  content: "";
}
.install-control--install::after {
  position: absolute;
  bottom: 1px;
  width: 8px;
  border-bottom: 1px solid currentColor;
  box-shadow: 0 -2px 0 -0.25px var(--highlight);
  content: "";
}
.install-page-preview {
  position: absolute;
  top: 34%;
  left: 10%;
  display: grid;
  gap: 6px;
  justify-items: center;
}
.install-app-icon {
  display: block;
  width: 25px;
  height: 25px;
  padding: 2px;
  border: 1px solid #dbc3d7;
  border-radius: 7px;
  background: #fff9fd;
  object-fit: contain;
}
.install-page-preview span {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: #d9bfdb;
  box-shadow: 0 8px 0 #dfcedf;
}
.install-menu {
  position: absolute;
  z-index: 1;
  top: 36px;
  right: 5px;
  display: grid;
  gap: 4px;
  width: min(72%, 185px);
  padding: 5px;
  border: 1px solid #d3b4cf;
  border-radius: 8px;
  background: #fffafc;
  box-shadow: 0 4px 10px #51374e19;
}
.install-menu-trail,
.install-system-menu {
  padding-inline: 4px;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.45;
}
.install-menu-action {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 4px 5px;
  border-radius: 5px;
  background: var(--highlight);
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.install-action-icon {
  display: grid;
  flex: 0 0 13px;
  height: 13px;
  place-items: center;
  border: 1px solid #9d6991;
  border-radius: 3px;
  color: var(--plum);
  font-size: 0.7rem;
  line-height: 1;
}
.install-action-icon::before {
  content: "+";
}
.install-launcher {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 26px;
  border-radius: 0 0 8px 8px;
  background: #ded2e8;
}
.install-launcher .install-app-icon {
  width: 19px;
  height: 19px;
  border-radius: 4px;
}
.install-launcher-icon,
.install-launcher-tile {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: #ba9cc8;
}
.install-launcher-tile {
  background: #d8abc7;
}

/* iOS puts the share sheet over a narrow Safari window. */
.install-figure--iphone {
  --canvas: #f0dce5;
  --screen: #f8ecf5;
}
.install-figure--iphone .install-device,
.install-figure--android .install-device {
  width: min(100%, 151px);
  border-radius: 21px;
}
.install-figure--iphone .install-screen,
.install-figure--android .install-screen {
  min-height: 178px;
  border-radius: 16px;
}
.install-figure--iphone .install-screen::before,
.install-figure--android .install-screen::before {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 50%;
  width: 23px;
  height: 5px;
  border-radius: 20px;
  background: var(--ink);
  content: "";
  transform: translateX(-50%);
}
.install-figure--iphone .install-toolbar {
  position: absolute;
  inset: auto 0 11px;
  border: 0;
  border-radius: 0;
}
.install-figure--iphone .install-page-preview {
  top: 19%;
  left: 50%;
  transform: translateX(-50%);
}
.install-figure--iphone .install-menu {
  inset: auto 4px 48px;
  width: auto;
  border-radius: 11px 11px 6px 6px;
}
.install-figure--iphone .install-launcher,
.install-figure--android .install-launcher {
  bottom: 3px;
  min-height: 5px;
  background: none;
}
.install-figure--iphone .install-launcher > *,
.install-figure--android .install-launcher > * {
  display: none;
}
.install-figure--iphone .install-launcher::before,
.install-figure--android .install-launcher::before {
  width: 30%;
  height: 3px;
  border-radius: 20px;
  background: var(--ink);
  content: "";
}

/* iPadOS places the share popover against the top toolbar. */
.install-figure--ipad {
  --canvas: #e8dcf3;
}
.install-figure--ipad .install-device {
  padding: 7px 10px;
  border-radius: 15px;
}
.install-figure--ipad .install-screen {
  min-height: 142px;
}
.install-figure--ipad .install-launcher {
  inset: auto 28% 5px;
  min-height: 25px;
  border-radius: 9px;
}
.install-figure--ipad .install-menu {
  top: 39px;
}

/* Chrome on Android uses a top-right menu and a camera cutout. */
.install-figure--android {
  --canvas: #e0ebeb;
  --screen: #edf4f2;
  --highlight: #deeeea;
}
.install-figure--android .install-device {
  border-radius: 16px;
}
.install-figure--android .install-screen {
  border-radius: 11px;
}
.install-figure--android .install-screen::before {
  top: 5px;
  width: 5px;
}
.install-figure--android .install-toolbar {
  margin-top: 0;
  padding-top: 15px;
}
.install-figure--android .install-menu {
  top: 48px;
  width: 88%;
}
.install-figure--android .install-page-preview {
  top: 65%;
}

/* Windows adds a desktop monitor and a Start button. */
.install-figure--windows {
  --canvas: #dde7f1;
  --highlight: #dfe9f5;
  --screen: #eef3fb;
}
.install-figure--windows .install-device {
  margin-bottom: 15px;
}
.install-figure--windows .install-device::after {
  position: absolute;
  top: 100%;
  left: 35%;
  width: 30%;
  height: 13px;
  border-radius: 0 0 6px 6px;
  background: var(--ink);
  clip-path: polygon(
    40% 0,
    60% 0,
    65% 65%,
    100% 65%,
    100% 100%,
    0 100%,
    0 65%,
    35% 65%
  );
  content: "";
}
.install-figure--windows .install-control--more::before {
  content: "⋯";
}
.install-figure--windows .install-launcher-icon {
  border-radius: 1px;
  background:
    linear-gradient(90deg, transparent 45%, #ded2e8 45% 55%, transparent 55%),
    linear-gradient(0deg, #677ba5 45%, #ded2e8 45% 55%, #677ba5 55%);
}

/* Mac and ChromeOS both use laptop silhouettes; their controls differ. */
.install-figure--mac,
.install-figure--chromeos {
  --screen: #f4ecf8;
}
.install-figure--mac .install-device,
.install-figure--chromeos .install-device {
  margin-bottom: 5px;
  border-radius: 10px 10px 3px 3px;
}
.install-figure--mac .install-device::after,
.install-figure--chromeos .install-device::after {
  position: absolute;
  top: 100%;
  left: -3%;
  width: 106%;
  height: 6px;
  border-radius: 2px 2px 60% 60%;
  background: var(--ink);
  content: "";
}
.install-system-menu {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 21px;
  padding-inline: 7px;
  border-radius: 7px 7px 0 0;
  background: #e5d7eb;
}
.install-system-menu strong {
  padding-inline: 4px;
  border-radius: 3px;
  background: var(--highlight);
}
.install-figure--mac .install-toolbar {
  border-radius: 0;
}
.install-figure--mac .install-page-preview {
  top: 47%;
  right: 13%;
  left: auto;
}
.install-figure--mac .install-menu {
  top: 21px;
  right: auto;
  left: 8px;
  width: 58%;
}
.install-figure--mac .install-launcher {
  inset: auto 25% 5px;
  border-radius: 8px;
}
.install-figure--chromeos {
  --canvas: #e3e0f4;
}
.install-figure--chromeos .install-launcher-icon {
  position: absolute;
  left: 7px;
  border: 2px solid #9e7eae;
  border-radius: 50%;
  background: #f8eff9;
}

/* The Linux panel and application grid show one common desktop layout. */
.install-figure--linux {
  --canvas: #f0e0e2;
  --highlight: #f2dae5;
  --screen: #faf0ee;
}
.install-figure--linux .install-screen {
  padding: 10px 0 0 23px;
  background: linear-gradient(var(--ink) 10px, var(--screen) 10px);
}
.install-figure--linux .install-toolbar {
  border-radius: 0;
}
.install-figure--linux .install-launcher {
  inset: 10px auto 0 0;
  flex-direction: column;
  width: 23px;
  border-radius: 0 0 0 6px;
}
.install-figure--linux .install-launcher-icon {
  order: 1;
  margin-top: auto;
  margin-bottom: 7px;
  border-radius: 1px;
  background: radial-gradient(circle, #7e6387 1px, transparent 1.3px) 0 0 / 4px
    4px;
}
.install-figure--linux .install-launcher .install-app-icon {
  margin-top: 8px;
}
.install-figure--linux .install-page-preview {
  left: 13%;
}
.install-figure--linux .install-menu {
  top: 48px;
  width: 65%;
}

@media (max-width: 760px) {
  .install-figure {
    width: min(100%, 23rem);
    justify-self: center;
  }
}
