/* Activavida — Botón único de regreso al inicio.
   Los tonos se adaptan al tema sin alterar el reproductor. */
.av-back-to-top {
  position: fixed;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: calc(128px + env(safe-area-inset-bottom, 0px));
  z-index: 9990;
  width: 54px;
  height: 54px;
  padding: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(25, 32, 45, .56);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 19px;
  box-shadow: 0 12px 34px rgba(8, 14, 24, .22), inset 0 1px rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(20px) saturate(155%);
  backdrop-filter: blur(20px) saturate(155%);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease, background-color .22s ease;
}
.av-back-to-top.is-visible { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.av-back-to-top:hover { background: rgba(35, 45, 61, .76); transform: translateY(-3px); }
.av-back-to-top:focus-visible { outline: 3px solid #f26522; outline-offset: 4px; }
.av-back-to-top svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; fill: none; filter: drop-shadow(0 1px 2px rgba(0,0,0,.14)); }
.av-back-to-top::after { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; pointer-events: none; }
body.av-light .av-back-to-top {
  color: #192332;
  background: rgba(255,255,255,.62);
  border-color: rgba(255,255,255,.78);
  box-shadow: 0 12px 34px rgba(37,48,70,.15), inset 0 1px rgba(255,255,255,.76);
}
body.av-light .av-back-to-top:hover { background: rgba(255,255,255,.84); }
body.av-light .av-back-to-top::after { border-color: rgba(67,84,112,.09); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .av-back-to-top { background: rgba(25,32,45,.93); }
  body.av-light .av-back-to-top { background: rgba(255,255,255,.96); }
}
@media (max-width: 650px) {
  .av-back-to-top { width: 48px; height: 48px; right: 15px; bottom: calc(128px + env(safe-area-inset-bottom, 0px)); border-radius: 16px; }
  .av-back-to-top::after { border-radius: 11px; }
  .av-back-to-top svg { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .av-back-to-top { transition: none; }
  .av-back-to-top:hover { transform: none; }
}
