/* The App Store dock, on every page: a slim bar at the foot of the screen on phones, always there, and a small
   floating card on wider screens. On the landing pages the card waits while the page's own App Store badge is in
   view (script.js). Apple's badge is used as supplied (assets/app-store.svg): at least 40 px tall, at its own aspect
   ratio, with a quarter of its height clear around it. */
:root {
  --dock-paper: #f1efea;
  --dock-card: #fff;
  --dock-ink: #121316;
  --dock-muted: #656460;
  --dock-line: #d9d6cf;
  --dock-focus: #b74314;
  --dock-bar: 61px;
  --dock-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --dock-paper: #0e0e10; --dock-card: #1c1c1f; --dock-ink: #f4f4f5; --dock-muted: #aaa8a3; --dock-line: #313135; --dock-focus: #ff9a73; }
}
.store-dock { position: fixed; z-index: 20; font-family: var(--dock-font); }
.store-dock-link { display: flex; align-items: center; gap: 12px; color: var(--dock-ink); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.store-dock-link:focus-visible { outline: 3px solid var(--dock-focus); outline-offset: 4px; border-radius: 12px; }
.store-dock-icon { flex: none; display: block; width: 40px; height: 40px; margin: 0; border-radius: 10px; }
.store-dock-text { display: grid; min-width: 0; margin-right: auto; font-size: 16px; font-weight: 650; line-height: 1.25; letter-spacing: -.01em; white-space: nowrap; }
.store-dock-text, .store-dock-text small { overflow: hidden; text-overflow: ellipsis; }
.store-dock-text small { color: var(--dock-muted); font-size: 13px; font-weight: 450; letter-spacing: 0; }
.store-dock-badge { flex: none; display: block; width: auto; max-width: none; height: 40px; margin: 0 0 0 4px; }
.store-dock-link:hover .store-dock-badge { opacity: .85; }

@media (max-width: 760px) {
  .store-dock {
    left: 0; right: 0; bottom: 0;
    padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--dock-paper);
    background: color-mix(in srgb, var(--dock-paper) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.6) blur(18px);
    backdrop-filter: saturate(1.6) blur(18px);
    border-top: 1px solid var(--dock-line);
  }
  .store-dock-icon { width: 36px; height: 36px; border-radius: 9px; }
  /* The page ends above the bar, so nothing stays under it. */
  body { padding-bottom: calc(var(--dock-bar) + env(safe-area-inset-bottom)); }
}
@media (max-width: 359px) {
  .store-dock-text small { display: none; }
}
@media (min-width: 761px) {
  .store-dock {
    right: max(24px, env(safe-area-inset-right)); bottom: 24px;
    padding: 10px;
    padding-left: 12px;
    background: var(--dock-card);
    border: 1px solid var(--dock-line);
    border-radius: 20px;
    box-shadow: 0 18px 40px -18px #302c3559, 0 2px 8px -3px #302c3524;
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
  }
  .store-dock-text { padding-right: 8px; }
  .store-dock.is-tucked { opacity: 0; transform: translateY(12px); visibility: hidden; pointer-events: none; }
  body { padding-bottom: 96px; }
}
@media (min-width: 761px) and (prefers-color-scheme: dark) {
  .store-dock { box-shadow: 0 18px 40px -16px #000a, 0 0 0 1px #ffffff0d; }
}
@media (prefers-reduced-motion: reduce) {
  .store-dock { transition: none; }
}
@media print {
  .store-dock { display: none; }
  body { padding-bottom: 0; }
}
