/* Add to home screen — a bar over the shell, never inside it. */

.a2hs {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 40;
  width: min(420px, calc(100vw - 24px));
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 34px rgba(30, 21, 38, 0.18);
  animation: a2hs-in 260ms cubic-bezier(.2, .7, .3, 1) both;
}

@keyframes a2hs-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .a2hs { animation: none; }
}

.a2hs-text { flex-grow: 1; min-width: 0; }

.a2hs-text strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}

.a2hs-text span {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-2);
  margin-top: 2px;
}

.a2hs-text b { font-weight: 600; color: var(--ink); }

.a2hs-share {
  display: inline-block;
  vertical-align: -3px;
  margin: 0 1px;
  color: var(--plum);
}

.a2hs-go {
  flex-shrink: 0;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--plum);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.a2hs-x {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-right: -8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  border-radius: 999px;
}

.a2hs-x:hover { color: var(--ink); }

/* The shell already sits above a tab bar on phones; lift clear of it. */
@media (max-width: 519px) {
  .a2hs { bottom: calc(var(--bar) + 10px + env(safe-area-inset-bottom)); }
}
