.device-explorer {
  --photo-bg: #eaeaea;
  border-radius: clamp(18px, 2vw, 28px);
  background: var(--photo-bg);
  overflow: hidden;
  isolation: isolate;
  position: relative;
}
.device-explorer__photo {
  display: block;
  width: 100%;
  height: auto;
}
.device-explorer__plate { position: relative; }
.device-explorer [hidden] { display: none !important; }
.device-explorer__controls { display: none; }
.device-explorer.is-ready {
  display: grid;
  grid-template-columns: minmax(124px, 34%) minmax(0, 1fr);
  min-height: 292px;
  aspect-ratio: 4 / 3;
}
.device-explorer.is-ready .device-explorer__controls {
  display: flex;
  z-index: 1;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(3px, .42vw, 8px);
  padding: 12px 0 12px clamp(12px, 1.4vw, 24px);
}
.device-explorer.is-ready .device-explorer__view {
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.device-explorer__film {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease-in-out;
}
.device-explorer__film.is-visible { opacity: 1; }
.device-explorer__film.is-cut { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .device-explorer__film { transition: none; }
}
.device-explorer.is-ready .device-explorer__plate {
  position: absolute;
  width: 151.52%;
  right: 0;
  bottom: 0;
}
.device-explorer__screen, .device-explorer__motion {
  position: absolute;
  left: 46.7%;
  top: 12%;
  width: 36.35%;
  height: 54.55%;
  border-radius: 11.4% / 10.2%;
  object-fit: fill;
  pointer-events: none;
}
.device-explorer__option, .device-explorer__home, .device-explorer__playback {
  font: inherit;
  color: #292b32;
  cursor: pointer;
  background: #fff;
  border: 1px solid #c9cbd0;
}
.device-explorer__option {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  max-width: 100%;
  min-height: clamp(31px, 2.65vw, 42px);
  padding: 4px clamp(8px, .8vw, 13px);
  display: inline-flex;
  align-items: center;
  gap: .5em;
  border-radius: 999px;
  font-size: clamp(12px,.96vw,15px);
  font-weight: 600;
  text-align: left;
  line-height: 1.15;
}
.device-explorer__option::before {
  content: '+';
  content: '+' / '';
  display: grid;
  place-content: center;
  flex: none;
  width: 1.27em;
  height: 1.27em;
  font: 700 1em/1 Arial, sans-serif;
  color: #414650;
  background: #e9ebef;
  border-radius: 50%;
}
.device-explorer__option[data-preview="call-message"] { --option-accent: #c1b7ff; }
.device-explorer__option[data-preview="maps"] { --option-accent: #9bd2ff; }
.device-explorer__option[data-preview="music"] { --option-accent: #ffab91; }
.device-explorer__option[data-preview="rides"] { --option-accent: #d1d6df; }
.device-explorer__option[data-preview="notes"] { --option-accent: #ffd58d; }
.device-explorer__option[data-preview="create"] { --option-accent: #e2bbfb; }
.device-explorer__option:hover, .device-explorer__home:hover { border-color: #767a85; }
.device-explorer__option[aria-pressed="true"] {
  border-color: #385146;
  background: #f3f5f3;
  color: #17241d;
}
.device-explorer__option[aria-pressed="true"]::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #9ae8a4;
  transform: scaleX(var(--demo-progress, 0));
  transform-origin: left;
  pointer-events: none;
}
.device-explorer__option[aria-pressed="true"]::before {
  content: '−';
  content: '−' / '';
  color: #272933;
  background: var(--option-accent, #dde0e6);
}
.device-explorer button:focus-visible { outline: 3px solid #3856ad; outline-offset: 2px; }
.device-explorer__playback {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  min-height: 30px;
  padding: 3px 10px;
  margin-top: 3px;
  border-color: transparent;
  background: transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.device-explorer__playback:hover { background: #fff; }
.device-explorer__playback::before {
  content: '';
  box-sizing: border-box;
  width: 9px;
  height: 10px;
  border-left: 3px solid;
  border-right: 3px solid;
}
.device-explorer__playback[data-action="play"]::before {
  border: solid transparent;
  border-width: 5px 0 5px 8px;
  border-left-color: currentColor;
}
.device-explorer__home {
  position: absolute;
  z-index: 2;
  bottom: 10px;
  right: 10px;
  display: grid;
  place-content: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
@media (max-width: 540px) {
  .device-explorer.is-ready { grid-template-columns: 121px minmax(0,1fr); min-height: 298px; aspect-ratio: auto; background: #f4f4f3; }
  .device-explorer.is-ready .device-explorer__controls { padding: 10px 0 10px 8px; gap: 3px; }
  .device-explorer__option { min-height: 35px; font-size: 12px; padding-inline: 7px; }
  .device-explorer.is-ready .device-explorer__view {
    align-self: center;
    width: 100%;
    aspect-ratio: 3 / 4;
    max-height: 352px;
    background: #e7e7e7;
    border-radius: 14px 0 0 14px;
  }
  .device-explorer.is-ready .device-explorer__plate {
    width: min(183%, 455px);
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-65%, -50%);
    clip-path: inset(0 0 0 32%);
  }
  .device-explorer__home { bottom: 7px; right: 7px; }
}
@media (max-width: 400px) {
  .device-explorer__option::before { display: none; }
  .device-explorer__option { padding-inline: 10px; }
}
@media (min-width: 401px) and (max-width: 540px) {
  .device-explorer.is-ready { grid-template-columns: 148px minmax(0,1fr); }
}
@media (pointer: coarse) {
  .device-explorer__option, .device-explorer__home, .device-explorer__playback { min-height: 44px; }
}
