.global-page-back-host {
  --global-page-back-size: 56px;
  --global-page-back-safe-top: env(safe-area-inset-top, 0px);
  --global-page-back-safe-right: env(safe-area-inset-right, 0px);
  --global-page-back-safe-bottom: env(safe-area-inset-bottom, 0px);
  --global-page-back-safe-left: env(safe-area-inset-left, 0px);
  position: fixed;
  z-index: 99999;
  width: var(--global-page-back-size);
  height: var(--global-page-back-size);
  margin: 0;
  opacity: 1;
  transition:
    left .22s cubic-bezier(.22, .8, .32, 1),
    top .22s cubic-bezier(.22, .8, .32, 1),
    opacity .26s ease,
    filter .26s ease,
    transform .26s ease;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  will-change: left, top, opacity, transform;
}

.global-page-back-host[hidden] {
  display: none !important;
}

.global-page-back-host.is-dragging {
  transition: none;
  transform: none !important;
}

.global-page-back-host.is-idle.is-docked {
  opacity: .42;
  filter: saturate(.72);
}

.global-page-back-host.is-free {
  opacity: 1;
  filter: none;
  transform: none;
}

.global-page-back-host.is-idle.is-docked-left { transform: translateX(-50%); }
.global-page-back-host.is-idle.is-docked-right { transform: translateX(50%); }
.global-page-back-host.is-idle.is-docked-top { transform: translateY(-50%); }
.global-page-back-host.is-idle.is-docked-bottom { transform: translateY(50%); }

.global-page-back {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: var(--global-page-back-size);
  height: var(--global-page-back-size);
  min-height: var(--global-page-back-size);
  margin: 0;
  padding: 0;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 255, 255, .94);
  border-radius: 999px;
  background: linear-gradient(155deg, #22977b 0%, #0b6f5b 58%, #075344 100%);
  color: #ffffff;
  box-shadow:
    0 8px 17px rgba(7, 83, 68, .27),
    0 0 0 4px rgba(31, 138, 112, .10),
    inset 0 1px 0 rgba(255, 255, 255, .26);
  line-height: 1;
  touch-action: none;
  cursor: pointer;
}

.global-page-back::after { border: 0; }

.global-page-back-arrow {
  display: block;
  height: 23px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  line-height: 22px;
}

.global-page-back-label {
  display: block;
  max-width: 47px;
  margin-top: 1px;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-page-back:active { transform: scale(.96); }

.global-page-back:focus-visible {
  outline: 3px solid rgba(255, 226, 147, .78);
  outline-offset: 3px;
}

@media (orientation: landscape) {
  .global-page-back-host,
  .global-page-back {
    --global-page-back-size: 64px;
  }

  .global-page-back-arrow {
    height: 24px;
    font-size: 26px;
    line-height: 22px;
  }

  .global-page-back-label {
    max-width: 54px;
    font-size: 13px;
    line-height: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .global-page-back-host { transition: opacity .12s ease; }
}
