.retreat-back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  right: max(24px, calc(env(safe-area-inset-right) + 16px));
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  z-index: 9997;
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(215, 180, 94, 0.62);
  border-radius: 50%;
  background: rgba(24, 47, 43, 0.96);
  color: #f4dfaa;
  box-shadow: 0 10px 28px rgba(11, 24, 22, 0.28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease,
    background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.retreat-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.retreat-back-to-top svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.retreat-back-to-top:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.retreat-cookie-settings-link {
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: inherit;
  text-align: left;
}

.footer-links .retreat-cookie-settings-link {
  display: block;
  padding: 7px 0;
  color: #fff;
  font-size: 14.5px;
  opacity: 0.6;
  text-align: inherit;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.retreat-footer__links .retreat-cookie-settings-link {
  width: fit-content;
  padding: 0;
  color: inherit;
  text-align: inherit;
}

.footer .retreat-cookie-settings-link {
  padding: 0;
  color: inherit;
  text-decoration: underline;
}

.footer-links .retreat-cookie-settings-link:hover,
.footer-links .retreat-cookie-settings-link:focus-visible,
.retreat-footer__links .retreat-cookie-settings-link:hover,
.retreat-footer__links .retreat-cookie-settings-link:focus-visible,
.footer .retreat-cookie-settings-link:hover,
.footer .retreat-cookie-settings-link:focus-visible {
  color: #d7b45e;
  opacity: 1;
  outline: none;
}

@media (hover: hover) {
  .retreat-back-to-top:hover {
    border-color: #d7b45e;
    background: #d7b45e;
    color: #182f2b;
    transform: translateY(-2px);
  }
}

@media (max-width: 640px) {
  .retreat-back-to-top {
    right: 16px;
    bottom: 18px;
    right: max(16px, calc(env(safe-area-inset-right) + 12px));
    bottom: max(18px, calc(env(safe-area-inset-bottom) + 12px));
    width: 46px;
    height: 46px;
  }
}

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