:root {
  --device-frame-width: 498px;
  --device-frame-height: 947px;
  --device-screen-width: 393px;
  --device-screen-height: 852px;
  --device-screen-left: 60px;
  --device-screen-top: 46px;
  --device-screen-scale-x: 1.048;
  --device-screen-scale-y: 1.0493;
  --device-preview-scale: 1;
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 120ms;
  animation-timing-function: ease-out;
}

body.device-preview-visible {
  height: 100dvh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

body.device-preview-visible .device-stage {
  position: fixed;
  left: 50%;
  top: 50%;
  width: var(--device-frame-width);
  height: var(--device-frame-height);
  margin: 0;
  transform: translate(-50%, -50%) scale(var(--device-preview-scale));
  transform-origin: center;
}

body.device-preview-visible .device-stage > .app-shell,
body.device-preview-visible .device-stage > .category-shell,
body.device-preview-visible .device-stage > .detail-shell {
  position: absolute;
  z-index: 1;
  left: var(--device-screen-left);
  top: var(--device-screen-top);
  width: 375px;
  height: 812px;
  margin: 0;
  border-radius: 43px;
  transform: scale(var(--device-screen-scale-x),var(--device-screen-scale-y));
  transform-origin: top left;
  overflow: hidden;
}

body.device-preview-visible .device-frame {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: var(--device-frame-width);
  height: var(--device-frame-height);
  object-fit: fill;
  mix-blend-mode: multiply;
  pointer-events: none;
  user-select: none;
}
