/* Floating "Get the app" QR / install widget */
a.get-the-app {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  top: max(1.25rem, env(safe-area-inset-top, 0px));
  right: max(1.25rem, env(safe-area-inset-right, 0px));
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  width: 118px;
  padding: 0.85rem 0.85rem 0.75rem;
  border-radius: 18px;
  background: rgba(22, 22, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  text-decoration: none;
  color: #e0e0e0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 10px, 0);
  -webkit-transform: translate3d(0, 10px, 0);
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0.4s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
  /* Keep the fixed layer stable on iOS Safari */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

a.get-the-app.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

a.get-the-app.is-visible:hover {
  transform: translate3d(0, -3px, 0) scale(1.03);
  -webkit-transform: translate3d(0, -3px, 0) scale(1.03);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  background: rgba(28, 28, 28, 0.82);
  color: #e0e0e0;
  opacity: 1;
  text-decoration: none;
}

a.get-the-app.is-visible:focus-visible {
  outline: none;
  transform: translate3d(0, -3px, 0) scale(1.03);
  -webkit-transform: translate3d(0, -3px, 0) scale(1.03);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.55),
    0 0 0 2px rgba(136, 200, 232, 0.75);
  color: #e0e0e0;
  opacity: 1;
  text-decoration: none;
}

a.get-the-app.is-visible:active {
  transform: translate3d(0, -1px, 0) scale(1.01);
  -webkit-transform: translate3d(0, -1px, 0) scale(1.01);
}

.get-the-app__qr {
  display: block;
  width: 88px;
  height: 88px;
  line-height: 0;
  pointer-events: none;
}

.get-the-app__qr svg {
  display: block;
  width: 100%;
  height: 100%;
}

.get-the-app__caption {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #e8e8e8;
  white-space: nowrap;
  pointer-events: none;
}

/* Tablet — slightly smaller */
@media (max-width: 1024px) {
  a.get-the-app {
    top: 1rem;
    right: 1rem;
    top: max(1rem, env(safe-area-inset-top, 0px));
    right: max(1rem, env(safe-area-inset-right, 0px));
    width: 100px;
    padding: 0.7rem 0.7rem 0.6rem;
    gap: 0.45rem;
    border-radius: 16px;
  }

  .get-the-app__qr {
    width: 72px;
    height: 72px;
  }

  .get-the-app__caption {
    font-size: 0.65rem;
  }
}

/* Mobile — compact install shortcut (opens the App Store) */
@media (max-width: 767px) {
  a.get-the-app {
    top: 0.85rem;
    right: 0.85rem;
    top: max(0.85rem, env(safe-area-inset-top, 0px));
    right: max(0.85rem, env(safe-area-inset-right, 0px));
    width: 88px;
    padding: 0.55rem 0.55rem 0.5rem;
    gap: 0.35rem;
    border-radius: 14px;
  }

  .get-the-app__qr {
    width: 60px;
    height: 60px;
  }

  .get-the-app__caption {
    font-size: 0.6rem;
  }
}
