/* MagicLotto mobile shell - stage 1, isolated from desktop/admin */
.ml-pwa-bottom-nav { display: none; }
@media (max-width: 767.98px) {
  html { -webkit-text-size-adjust: 100%; }
  body { padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important; }
  /* Use a single compact native-style app header on phones. */
  .ml-site-header .ml-header-row {
    display: flex; min-height: 62px; flex-wrap: nowrap;
    justify-content: space-between; gap: 8px; padding: 7px 0;
  }
  .ml-site-header .ml-header-brand { width: auto; min-width: 0; flex: 0 1 auto; justify-content: flex-start; }
  .ml-site-header .ml-header-brand picture { display: block; }
  .ml-site-header .ml-header-brand img { height: 43px; width: auto; max-width: min(36vw, 138px); object-fit: contain; }
  .ml-site-header .ml-header-actions { width: auto; min-width: 0; flex: 0 0 auto; flex-wrap: nowrap; gap: 6px; justify-content: flex-end; }
  /* Balances continue to be available on the secured My Account page. */
  .ml-site-header .ml-wallet-summary,
  .ml-site-header .ml-user-summary { display: none !important; }
  .ml-site-header .ml-header-btn { min-height: 37px; padding: 0 11px; border-radius: 10px; font-size: 12px; }
  .ml-site-header .ml-header-icon-btn { width: 37px; height: 37px; min-width: 37px; }
  .ml-site-header .ml-nav-shell { width: 100%; border-radius: 0; margin: 0; box-shadow: none; }
  .ml-site-header .ml-main-nav { min-height: 43px; padding: 0 12px; }
  .ml-site-header .ml-navbar-label { font-size: 12px; font-weight: 700; }
  .ml-site-header .navbar-toggler { height: 34px; width: 39px; flex-basis: 39px !important; }
  .ml-pwa-bottom-nav {
    position: fixed; z-index: 950; left: 0; right: 0; bottom: 0;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: start; padding: 5px max(6px, env(safe-area-inset-left, 0px)) calc(5px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-right, 0px));
    min-height: calc(66px + env(safe-area-inset-bottom, 0px));
    background: #fff; border-top: 1px solid #e6ecf2;
    box-shadow: 0 -6px 24px rgba(12, 50, 80, .10);
    -webkit-tap-highlight-color: transparent;
  }
  .ml-pwa-bottom-nav a {
    display: flex; align-items: center; justify-content: center; flex-direction: column;
    gap: 3px; min-width: 0; min-height: 53px;
    padding: 5px 2px; border-radius: 12px;
    background: transparent; color: #657386; text-decoration: none !important;
    font: 700 10px/1.3 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0; white-space: nowrap;
  }
  .ml-pwa-bottom-nav a svg { display: block; width: 23px; height: 23px; flex: none; }
  .ml-pwa-bottom-nav a[aria-current="page"] { color: #075f9d; background: #eaf3fa; }
  .ml-pwa-bottom-nav a:focus-visible { outline: 2px solid #ff8500; outline-offset: -2px; }
  .ml-pwa-bottom-nav a:active { background: #f2f6fb; transform: scale(.98); }
  body .scroll-to-top { bottom: calc(86px + env(safe-area-inset-bottom, 0px)) !important; }
}
@media (max-width: 360px) {
  .ml-site-header .ml-header-brand img { height: 36px; max-width: 108px; }
  .ml-site-header .ml-header-btn { padding: 0 8px; font-size: 11px; }
  .ml-pwa-bottom-nav a { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .ml-pwa-bottom-nav a { transition: none !important; }
}
@media print {
  .ml-pwa-bottom-nav { display: none !important; }
  body { padding-bottom: 0 !important; }
}


/* Private PWA preview: small unobtrusive back-to-top button above tabs. */
@media (max-width: 767.98px) {
  body .scroll-to-top {
    right: 12px !important;
    bottom: calc(82px + env(safe-area-inset-bottom, 0px)) !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  }
  body .scroll-to-top .scroll-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
  }
}
