/* A compact site-wide control; stays above the mobile contact bar. */
.pd-back-to-top {
  position: fixed;
  right: max(24px, env(safe-area-inset-right, 0px));
  bottom: calc(var(--pd-contact-bar-height, 0px) + max(24px, env(safe-area-inset-bottom, 0px)));
  z-index: 45;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--warm, #f7c676);
  border-radius: 50%;
  background: var(--panel, #101724);
  color: var(--warm, #f7c676);
  box-shadow: 0 4px 18px #0004;
  cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.pd-back-to-top[hidden] { display: none; }
.pd-back-to-top svg { display: block; width: 22px; height: 22px; }
.pd-back-to-top:focus-visible { outline: 2px solid var(--warm, #f7c676); outline-offset: 4px; }
@media (hover: hover) {
  .pd-back-to-top:hover { background: var(--warm, #f7c676); color: #101724; box-shadow: 0 4px 22px #0006; }
}
@media (max-width: 640px) {
  .pd-back-to-top {
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(var(--pd-contact-bar-height, 0px) + max(16px, env(safe-area-inset-bottom, 0px)));
  }
}
@media (prefers-reduced-motion: reduce) {
  .pd-back-to-top { transition: none; }
}
