/*
 * H5 mode is an alternate viewport for the same homepage DOM.
 * Keep page content and component styling in index.html/styles.css so the
 * device preview and H5 release always move together.
 */

html.view-h5,
html.view-h5 body {
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  background: #f8f7f2;
}

html.view-h5 .stage {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  background: #f8f7f2;
}

html.view-h5 .device-bezel,
html.view-h5 .statusbar {
  display: none;
}

html.view-h5 .device-picker {
  display: flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 253, 0.82);
  box-shadow: 0 0 0 1px rgba(21, 61, 63, 0.08);
  color: rgba(13, 47, 49, 0.82);
}

html.view-h5 .device-picker:hover {
  background: rgba(255, 255, 253, 0.96);
  color: #0d2f31;
}

html.view-h5 .device-shell {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100svh;
  margin: 0;
  aspect-ratio: auto;
  background: #f8f7f2;
}

html.view-h5 .phone {
  position: relative;
  top: auto;
  left: auto;
  width: 100vw;
  max-width: 100vw;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

html.view-h5 .screen-scroll {
  overscroll-behavior-y: auto;
}

html.view-h5 .content {
  padding-bottom: calc(20cqw + env(safe-area-inset-bottom, 0px));
}

html.view-h5 .bottom-nav {
  height: calc(15.8cqw + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

html.view-h5 .bottom-nav::after {
  display: none;
}

html.view-h5 .bottom-nav .publish > span:last-child {
  bottom: 1.3cqw;
}

html.view-h5 .toast {
  bottom: calc(18cqw + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 560px) {
  html.view-h5 .device-picker {
    display: none;
  }
}

@media (min-width: 481px) {
  html.view-h5,
  html.view-h5 body,
  html.view-h5 .stage {
    background:
      radial-gradient(circle at 50% 38%, #e8e7e1 0, #d8d8d3 52%, #cacbc7 100%),
      #d8d8d3;
  }

  html.view-h5 .device-shell {
    box-shadow: 0 0 0 1px rgba(20, 48, 48, 0.08), 0 18px 52px rgba(22, 28, 27, 0.16);
  }
}
