.back-to-top { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 100; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; border: 1px solid #11110f; border-radius: 50%; background: #11110f; color: #f5f2e8; cursor: pointer; }
.back-to-top[hidden] { display: none; }
.back-to-top:hover { color: #d9ff63; }
.back-to-top:focus-visible { outline: 2px solid #d9ff63; outline-offset: 4px; }
@media (max-width: 760px) { .back-to-top { right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); } }

/* Programmatic focus after a tap should not leave Safari's blue ring behind. */
@media (max-width: 760px), (pointer: coarse) and (max-width: 1100px) {
  html[data-focus-input="pointer"] h1:focus,
  html[data-focus-input="pointer"] [data-case-media]:focus {
    outline: none;
  }
}
