.dj-back-to-top {
  position: fixed;
  z-index: 35;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--dj-line, #48515d);
  border-radius: 50%;
  background: var(--dj-surface-2, #252a32);
  color: var(--dj-text, #fff);
  box-shadow: 0 3px 12px #0004;
  cursor: pointer;
}
.dj-back-to-top[hidden] { display: none; }
.dj-back-to-top:hover { color: var(--dj-accent, #ffd057); }
.dj-back-to-top:focus-visible { outline: 2px solid var(--dj-accent, #ffd057); outline-offset: 3px; }
.has-app .dj-back-to-top { bottom: calc(116px + env(safe-area-inset-bottom, 0px)); }
.dj-h5 .dj-back-to-top { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
.dj-h5:is(.open, .share-on, .is-controls-clear) .dj-back-to-top,
body:has(.dj-mg-stage.is-controls-clear) .dj-back-to-top { visibility: hidden; }

@media (max-height: 520px) {
  .dj-h5 .dj-back-to-top { right: calc(64px + env(safe-area-inset-right, 0px)); }
}
@media (max-height: 359px) {
  .dj-h5 .dj-back-to-top { right: calc(108px + env(safe-area-inset-right, 0px)); }
}
