/* Phones (720px and narrower), on every page:
   - the top right holds a menu button; the menu lists the pages and the language switch,
   - "Download" (to the App Store) moves from the top bar to a button fixed at the bottom of the screen, on the
     home page only.
   Wider screens keep the top bar as it is. */
.menu-btn, .menu, .store-dock { display: none; }

@media (max-width: 720px) {
  nav .wrap .lang, nav .wrap .pill, .tb-wrap .tb-lang, .tb-wrap .tb-pill { display: none; }

  .menu-btn { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; width: 40px; height: 40px; margin-right: -8px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .menu-btn span { display: block; width: 20px; height: 1.6px; border-radius: 1px; background: #e6ece8; transition: transform .25s ease; }
  .menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.8px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.8px) rotate(-45deg); }

  /* Under the 52px top bar, down to the bottom of the screen */
  .menu { display: block; position: absolute; top: 100%; left: 0; right: 0; height: calc(100vh - 52px); height: calc(100dvh - 52px); overflow-y: auto; padding: 8px 24px 40px; box-sizing: border-box;
    background: #050706; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s; }
  .menu.open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .2s ease; }
  .menu a { display: block; padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); color: #e6ece8; font-size: 22px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; }
  .menu a[aria-current] { color: #86d6a6; }
  .menu .menu-lang { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; padding: 9px 16px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; color: #a3ada8; font-size: 15px; font-weight: 600; }
  html.menu-open { overflow: hidden; }
  html.menu-open nav, html.menu-open .topbar { background: #050706; }

  /* A frosted silver band across the bottom, with the button on it */
  .store-dock { display: flex; justify-content: center; position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(214, 220, 224, .22), rgba(168, 176, 182, .34)); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
    border-top: 1px solid rgba(255, 255, 255, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
  .store-bar { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 30px; border-radius: 999px;
    background: #e6ece8; color: #050706; font-size: 16px; font-weight: 700; text-decoration: none; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
  html.menu-open .store-dock { display: none; }
  /* Room under the last line so the band never covers it (the home page, where the band is) */
  body:has(.store-dock) { padding-bottom: 86px; }
}
