/* Shared mobile header sizing. Keep both stores reachable on small phones. */
@media (max-width: 520px) {
  .phone-caption, .bedtime-tool { min-width: 0; overflow-wrap: anywhere; }
  .sound-center-teaser .btn { max-width: 100%; white-space: normal; justify-content: center; }
  nav { padding: 10px 16px; gap: 8px; }
  nav .nav-wordmark { font-size: 18px; }
  nav .nav-actions { gap: 5px; }
  nav .btn { font-size: 12px; white-space: nowrap; min-height: 44px; min-width: 44px; justify-content: center; }
  nav .nav-wordmark { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; justify-content: center; }
  nav .nav-actions .btn-primary { min-width: 44px !important; padding: 8px 10px; }
  nav .nav-actions .btn-ghost:first-of-type { padding: 8px 6px; }
}
@media (max-width: 360px) {
  nav { padding: 10px 12px; gap: 6px; }
  nav .nav-actions { gap: 4px; }
  nav .nav-actions .btn-primary { padding: 8px 6px; }
  nav .nav-actions .btn-ghost:first-of-type { padding: 8px 4px; }
}
nav a:focus-visible { outline: 2px solid var(--text-primary); outline-offset: 3px; }
/* The nav store button takes the site action fill from site-type.css. */
nav .nav-actions .btn-primary { background: var(--site-action, #B8A8FF); color: var(--site-on-action, #08080F); }
nav .nav-actions .btn-primary:hover { opacity: 1; }

/* Related-page sidebars follow the article when the layout becomes a column. */
@media (max-width: 768px) {
  .page-wrapper > .sidebar {
    order: 2; margin-top: 40px; margin-bottom: 0;
    padding-top: 24px; padding-bottom: 0;
    border-top: 1px solid var(--border); border-bottom: none;
  }
}
.site-footer .sf-grid a { color: var(--text-secondary, #9A98B2); }
.site-footer .sf-grid a:hover { color: var(--text-primary, #F4F3FB); }
.site-footer a:focus-visible { outline: 2px solid var(--text-primary, #F4F3FB); outline-offset: 3px; }

/* Desktop header: both stores, everywhere (2026-10-17).
   At the desktop breakpoint every page shows App Store and Google Play as two
   filled buttons, the home page's header. The pair is written by
   scripts/localize/lib/site-header.mjs with each page's own tracked URLs.
   Below the breakpoint each template keeps its phone control unchanged: the
   article chooser, the player link or a localized page's download link. */
nav .nav-store { display: none; }
.nav-store-note {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (min-width: 769px) {
  nav .nav-actions .nav-store {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 128px;
    min-height: 44px;
    white-space: nowrap;
  }
  nav .nav-actions [data-header-download],
  nav .nav-actions [data-player-download],
  nav .nav-actions [data-nav-download] { display: none; }
}
