/* One thumb-reachable floating menu; the phone header stays quiet. */
.floating-navigation,.mobile-menu,.mobile-menu-backdrop{display:none}
@media(max-width:800px){
  :root{--mobile-menu-bottom:calc(16px + env(safe-area-inset-bottom,0px) + var(--mobile-keyboard-offset,0px));--mobile-menu-right:calc(16px + env(safe-area-inset-right,0px))}
  .dashboard-intro{display:none!important}
  #content:has(.dashboard-intro){padding-top:17px}
  main{padding-bottom:calc(100px + env(safe-area-inset-bottom,0px))}
  .topbar>.mobile-brand{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;pointer-events:none}
  .topbar>.mobile-brand img{width:32px;height:32px}
  .mobile-brand-title{display:block;min-width:0;font-size:13px;line-height:1.15;color:var(--forest);letter-spacing:-.3px}
  .mobile-brand-title strong{font-weight:750;white-space:nowrap}
  .floating-navigation{display:block}
  #mobile-menu-toggle{position:fixed;right:var(--mobile-menu-right);bottom:var(--mobile-menu-bottom);z-index:55;display:grid;place-items:center;width:58px;height:58px;min-height:58px;padding:0;border:1px solid #ffffff25;border-radius:50%;background:var(--forest);color:white;box-shadow:0 5px 22px #00000038;touch-action:manipulation}
  #mobile-menu-toggle[aria-expanded=true]{background:var(--ink);color:var(--cream)}
  .floating-menu-glyph{display:flex;flex-direction:column;gap:5px;align-items:center;width:24px}
  .floating-menu-glyph i{display:block;width:23px;height:2px;border-radius:2px;background:currentColor;transform-origin:center}
  #mobile-menu-toggle[aria-expanded=true] i:first-child{transform:translateY(7px) rotate(45deg)}
  #mobile-menu-toggle[aria-expanded=true] i:nth-child(2){opacity:0}
  #mobile-menu-toggle[aria-expanded=true] i:last-child{transform:translateY(-7px) rotate(-45deg)}
  .mobile-menu-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:53;background:#00000066;backdrop-filter:blur(3px)}
  .mobile-menu:not([hidden]){display:flex;flex-direction:column;position:fixed;top:auto;bottom:calc(var(--mobile-menu-bottom) + 70px);right:var(--mobile-menu-right);width:min(320px,calc(100vw - 32px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px)));max-height:calc(var(--mobile-viewport-height,100dvh) - 102px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));padding:14px;background:#fffef9;border:1px solid #d6e1cf;border-radius:22px;box-shadow:0 18px 55px #00000030;z-index:54;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
  .mobile-menu-caption{padding:7px 12px 12px;font-size:10px;letter-spacing:1.6px;font-weight:700;color:var(--muted)}
  .mobile-menu a{display:flex;gap:12px;align-items:center;min-height:48px;padding:11px 13px;border-radius:12px;color:var(--forest);font-size:14px;line-height:1.4;overflow-wrap:anywhere}
  .mobile-menu-icon{width:21px;height:21px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
  .mobile-menu a:hover,.mobile-menu a.active{background:#eaf1e4;text-decoration:none}.mobile-menu a.active{font-weight:700}
  .mobile-menu .mobile-menu-account{border-top:1px solid var(--line);border-radius:0;margin-top:6px;padding-top:14px;font-weight:600}
  body.mobile-menu-open{overflow:hidden;overscroll-behavior:none}
  .mobile-menu-open .toast{visibility:hidden}
  .toast{bottom:calc(var(--mobile-menu-bottom) + 74px)}
  .auth-mode .floating-navigation,.auth-mode .mobile-menu-backdrop{display:none!important}
  .auth-mode main{padding-bottom:30px}
}
@media(prefers-reduced-motion:no-preference){.floating-menu-glyph i{transition:transform .2s ease,opacity .15s ease}}
@media(max-width:800px){
  [data-theme=dark] #mobile-menu-toggle{background:#303236;border-color:#55585e;color:#f1f2f3;box-shadow:0 5px 24px #00000060}
  [data-theme=dark] #mobile-menu-toggle[aria-expanded=true]{background:#e8e9eb;color:#202123}
}
/* Compact notifications in the corner; on phones beside the floating menu button. */
#toast.toast{left:auto;right:calc(20px + env(safe-area-inset-right,0px));bottom:calc(20px + env(safe-area-inset-bottom,0px));transform:none;max-width:min(340px,calc(100vw - 40px));padding:9px 14px;border-radius:10px;font-size:13px;line-height:1.4;box-shadow:0 6px 20px #193f3229}
@media(max-width:800px){#toast.toast{right:auto;left:calc(16px + env(safe-area-inset-left,0px));bottom:calc(var(--mobile-menu-bottom) + 11px);max-width:calc(100vw - 106px - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px))}.auth-mode #toast.toast{bottom:calc(16px + env(safe-area-inset-bottom,0px))}}
@media(max-width:800px){.auth-mode:has(#offline-status:not([hidden])) #toast.toast{bottom:calc(66px + env(safe-area-inset-bottom,0px))}}
