:root {
  --hsj-safe-top: env(safe-area-inset-top, 0px);
  --hsj-safe-right: env(safe-area-inset-right, 0px);
  --hsj-safe-bottom: env(safe-area-inset-bottom, 0px);
  --hsj-safe-left: env(safe-area-inset-left, 0px);
}

html.hsj-ios-standalone,
html.hsj-ios-standalone body {
  min-height: 100%;
  min-height: 100dvh;
}

html.hsj-ios-standalone body {
  padding-left: var(--hsj-safe-left);
  padding-right: var(--hsj-safe-right);
}

html.hsj-ios-standalone .member-wrap,
html.hsj-ios-standalone .search-hub {
  min-height: 100dvh;
}

html.hsj-ios-standalone #bottomNav,
html.hsj-ios-standalone .foot.foot_nav {
  padding-bottom: var(--hsj-safe-bottom);
}

html.hsj-ios-standalone #play_page .player_video,
html.hsj-ios-standalone #play_page .MacPlayer,
html.hsj-ios-standalone body#play_page .player_video,
html.hsj-ios-standalone body#play_page .MacPlayer {
  max-height: calc(100dvh - var(--hsj-safe-top) - var(--hsj-safe-bottom));
}

@media (max-width: 820px) {
  html.hsj-ios-standalone {
    --hsj-standalone-mobile-head-height: calc(var(--hsj-mobile-head-height, 50px) + var(--hsj-safe-top));
  }

  html.hsj-ios-standalone .head_box.show-mobile.mobile-head,
  html.hsj-ios-standalone .mobile-head {
    box-sizing: border-box !important;
  }

  html.hsj-ios-standalone .mobile-head .mobile-iyf-nav,
  html.hsj-ios-standalone #topnav .mobile-head .mobile-iyf-nav.header {
    box-sizing: border-box !important;
    height: var(--hsj-standalone-mobile-head-height) !important;
    max-height: none !important;
    min-height: var(--hsj-standalone-mobile-head-height) !important;
    padding-top: var(--hsj-safe-top) !important;
  }

  html.hsj-ios-standalone #topnav .head_box.show-mobile.mobile-head {
    height: var(--hsj-standalone-mobile-head-height) !important;
    max-height: none !important;
    min-height: var(--hsj-standalone-mobile-head-height) !important;
  }

  html.hsj-ios-standalone .mac-catalog-filter-head__mobile.head_box.show-mobile.mobile-head {
    padding-top: calc(24px + var(--hsj-safe-top)) !important;
  }

  html.hsj-ios-standalone .mobile-head .mobile-iyf-dropdown {
    top: calc(100% + 1.6vw) !important;
  }
}

.hsj-ios-install {
  align-items: flex-end;
  background: rgba(8, 8, 12, 0.68);
  bottom: 0;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  left: 0;
  opacity: 0;
  padding: 18px 14px calc(18px + var(--hsj-safe-bottom));
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 0;
  transition: opacity .22s ease;
  z-index: 999999;
}

.hsj-ios-install.is-open {
  opacity: 1;
  pointer-events: auto;
}

.hsj-ios-install__panel {
  background: #17171d;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .38);
  box-sizing: border-box;
  color: #f6f7fb;
  max-width: 390px;
  overflow: hidden;
  padding: 18px;
  position: relative;
  transform: translateY(18px) scale(.98);
  transition: transform .22s ease;
  width: min(100%, 390px);
}

.hsj-ios-install.is-open .hsj-ios-install__panel {
  transform: translateY(0) scale(1);
}

.hsj-ios-install__close {
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border: 0;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 22px;
  height: 34px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
}

.hsj-ios-install__title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 38px 8px 0;
}

.hsj-ios-install__desc {
  color: rgba(246, 247, 251, .72);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px;
}

.hsj-ios-install__stage {
  background: linear-gradient(180deg, #20212a, #111217);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  height: 166px;
  overflow: hidden;
  position: relative;
}

.hsj-ios-install__phonebar {
  align-items: center;
  background: rgba(255, 255, 255, .08);
  border-radius: 18px;
  bottom: 14px;
  box-sizing: border-box;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(5, 1fr);
  height: 46px;
  left: 18px;
  padding: 0 16px;
  position: absolute;
  right: 18px;
}

.hsj-ios-install__dot,
.hsj-ios-install__share,
.hsj-ios-install__home {
  background: rgba(255, 255, 255, .28);
  border-radius: 10px;
  height: 16px;
}

.hsj-ios-install__share {
  align-items: center;
  background: #36d399;
  border-radius: 50%;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  justify-self: center;
  position: relative;
  width: 34px;
}

.hsj-ios-install__share::before {
  border: solid #06281d;
  border-width: 0 3px 3px 0;
  content: "";
  height: 10px;
  margin-top: 3px;
  transform: rotate(-135deg);
  width: 10px;
}

.hsj-ios-install__share::after {
  animation: hsjIosPulse 1.45s ease-in-out infinite;
  border: 2px solid rgba(54, 211, 153, .52);
  border-radius: 50%;
  content: "";
  inset: -8px;
  position: absolute;
}

.hsj-ios-install__arrow {
  animation: hsjIosArrow 1.25s ease-in-out infinite;
  border-bottom: 3px solid #fff;
  border-right: 3px solid #fff;
  bottom: 70px;
  height: 24px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%) rotate(45deg);
  width: 24px;
}

.hsj-ios-install__sheet {
  animation: hsjIosSheet 3.4s ease-in-out infinite;
  background: #f7f7fb;
  border-radius: 16px 16px 0 0;
  bottom: -80px;
  box-shadow: 0 -12px 30px rgba(0, 0, 0, .24);
  height: 92px;
  left: 38px;
  position: absolute;
  right: 38px;
}

.hsj-ios-install__sheet-row {
  align-items: center;
  color: #111217;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 10px;
  height: 44px;
  padding: 12px 14px 0;
}

.hsj-ios-install__plus {
  align-items: center;
  background: #111217;
  border-radius: 7px;
  color: #fff;
  display: inline-flex;
  font-size: 20px;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.hsj-ios-install__steps {
  color: rgba(246, 247, 251, .76);
  display: grid;
  font-size: 13px;
  gap: 7px;
  line-height: 1.45;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.hsj-ios-install__steps li {
  align-items: center;
  display: flex;
  gap: 8px;
}

.hsj-ios-install__num {
  align-items: center;
  background: rgba(54, 211, 153, .18);
  border-radius: 50%;
  color: #6ee7b7;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
  width: 22px;
}

@keyframes hsjIosPulse {
  0%, 100% { opacity: .2; transform: scale(.86); }
  45% { opacity: 1; transform: scale(1.08); }
}

@keyframes hsjIosArrow {
  0%, 100% { opacity: .45; transform: translate(-50%, -3px) rotate(45deg); }
  50% { opacity: 1; transform: translate(-50%, 8px) rotate(45deg); }
}

@keyframes hsjIosSheet {
  0%, 35% { transform: translateY(78px); }
  48%, 78% { transform: translateY(0); }
  100% { transform: translateY(78px); }
}

@media (prefers-reduced-motion: reduce) {
  .hsj-ios-install *,
  .hsj-ios-install *::before,
  .hsj-ios-install *::after {
    animation: none !important;
    transition: none !important;
  }
}
