: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;
}

.app-view {
  position: absolute;
  inset: 0;
  min-height: 100%;
  contain: layout paint;
  overflow: hidden;
}

.app-view > .category-shell,
.app-view > .detail-shell {
  width: 100%;
  height: 100%;
  margin: 0;
}

.app-view.is-entering {
  animation: app-view-enter 140ms ease-out;
}

[data-shared-bottom-nav] {
  left: 0;
  right: 0;
  width: 100%;
  transform: none;
}

[data-shared-bottom-nav][hidden] {
  display: none !important;
}

@keyframes app-view-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .app-view,
  .app-view.is-entering {
    animation: none;
    transition: none;
  }
}

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;
}
