.mascot-back-to-top {
  position: fixed;
  right: calc(24px + env(safe-area-inset-right, 0px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 1040;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 180ms ease;
}

.mascot-back-to-top[hidden] {
  display: none;
}

.mascot-back-to-top img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.mascot-back-to-top:focus-visible {
  outline: 2px solid #ffc000;
  outline-offset: 4px;
}

.mascot-back-to-top-label {
  position: absolute;
  right: calc(100% + 10px);
  padding: 6px 10px;
  border: 1px solid #3b4444;
  border-radius: 6px;
  color: #fff;
  background: #131b1b;
  font: 500 14px/1.4 'Chivo', sans-serif;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.mascot-back-to-top:focus-visible .mascot-back-to-top-label {
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .mascot-back-to-top:hover {
    transform: translateY(-3px);
  }

  .mascot-back-to-top:hover .mascot-back-to-top-label {
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .mascot-back-to-top {
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    width: 88px;
    height: 88px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mascot-back-to-top,
  .mascot-back-to-top-label {
    transition: none;
  }

  .mascot-back-to-top:hover {
    transform: none;
  }
}
