/* Phone bottom tab bar and its More sheet (built by phone-tabbar.js). Nothing here applies wider than 700px.
   The bar floats a little above the bottom edge (clear of rounded screen corners) and uses plain white icons. */
#lyTabBar,#lyMoreSheet,#lyMoreScrim,#lyTopMe{display:none}

@media (max-width:700px){
 /* Bar: 36px icon buttons on a 4px grid (8px padding, 12px gaps), 20px icons with 1.5px lines. */
 html{--ly-tabbar-gap:calc(6px + env(safe-area-inset-bottom,0px));--ly-tabbar:calc(52px + var(--ly-tabbar-gap));--ly-ease:150ms ease-out}
 /* No sideways rubber-band that could look like a drawer sliding in. */
 html,body{overscroll-behavior-x:none}

 /* The bar replaces the side drawer and its menu button. */
 html body.ly-has-tabbar :is(#lyRail,#lyRailScrim,#lyRailToggle){display:none!important}
 /* Room under every page so nothing ends up hidden behind the bar, and above it for the profile picture. */
 html body.ly-has-tabbar .layout>.main{padding-bottom:calc(var(--ly-tabbar) + 24px)!important;padding-top:calc(56px + env(safe-area-inset-top,0px))!important}

 html body #lyTabBar{position:fixed;left:50%;bottom:var(--ly-tabbar-gap);transform:translateX(-50%);z-index:1400;display:flex;align-items:center;gap:12px;box-sizing:border-box;height:52px;margin:0;padding:8px;border-radius:999px;
  background:rgba(22,24,32,.26);border:0;backdrop-filter:blur(12px) saturate(1.7);-webkit-backdrop-filter:blur(12px) saturate(1.7);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16),0 1px 2px rgba(0,0,0,.45),0 10px 30px rgba(0,0,0,.38)}
 html body #lyTabBar button.ly-tab{display:grid!important;place-items:center;flex:none;width:36px!important;min-width:0!important;height:36px!important;min-height:0!important;margin:0!important;padding:0!important;
  border:0!important;border-radius:12px!important;background:transparent!important;box-shadow:none!important;transform:none!important;color:#fff!important;cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:background-color var(--ly-ease),color var(--ly-ease),scale var(--ly-ease)}
 html body #lyTabBar .ly-tab-label{display:none}
 /* Each section's own colour. The section you're in gets a filled tile in that colour. */
 html body #lyTabBar [data-tab="gym"]{--tc:#a5b4fc}
 html body #lyTabBar [data-tab="macros"]{--tc:#5eead4}
 html body #lyTabBar [data-tab="work"]{--tc:#fbbf24}
 html body #lyTabBar [data-tab="progress"]{--tc:#c4a8ff}
 html body #lyTabBar [data-tab="more"]{--tc:#f4f5f8}
 html body #lyTabBar button.ly-tab.is-active{background:color-mix(in srgb,var(--tc) 22%,transparent)!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--tc) 55%,transparent)!important;color:#fff!important}
 html body #lyTabBar button.ly-tab:active{scale:.92}
 html body #lyTabBar button.ly-tab:focus-visible{outline:2px solid #fff!important;outline-offset:2px}
 #lyTabBar .ly-tab-ico{display:grid;place-items:center;width:20px;height:20px;line-height:0}
 html body #lyTabBar .ly-tab-ico svg{width:20px!important;height:20px!important;transition:color var(--ly-ease)}
 html body #lyTabBar .ly-tab-ico svg.ly-tab-dots{fill:currentColor}

 /* Outline-only icons: thin lines (3.6 units on the 48 grid = 1.5px at 20px) in the section's colour, see-through
    insides. The money icon keeps a white coin with a gold $. */
 html body #lyTabBar .ly-tab-ico svg.lyi{--c:var(--tc)!important;filter:none!important;overflow:hidden}
 html body #lyTabBar .ly-tab-ico svg.lyi :is(.b,.s,.t,[style]){stroke:var(--tc)!important;stroke-width:3.6!important;fill:transparent!important}
 html body #lyTabBar .ly-tab-ico svg.lyi :is(.f,.w){fill:var(--tc)!important;stroke:none!important}
 html body #lyTabBar [data-tab="work"] .ly-tab-ico svg.lyi .mc-squash .b{stroke:#f4f5f8!important}
 html body #lyTabBar .ly-tab-dots{color:var(--tc)}
 html body #lyTabBar .ly-tab-ico svg.lyi :is(.mc-shadow,.mc-ripple,.mc-sparks,.pg-dot,.pg-star,.gy-rep){display:none}

 /* Your profile picture, top left of the page (it scrolls away with the page). */
 html body #lyTopMe{position:absolute;top:calc(10px + env(safe-area-inset-top,0px));left:max(16px,env(safe-area-inset-left,0px));z-index:1300;display:grid!important;place-items:center;width:40px!important;height:40px!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;
  border:0!important;border-radius:50%!important;background:rgba(255,255,255,.08)!important;box-shadow:0 0 0 1.5px rgba(255,255,255,.7)!important;overflow:hidden;cursor:pointer;transition:box-shadow var(--ly-ease),scale var(--ly-ease)}
 html body #lyTopMe:active{scale:.94}
 html body #lyTopMe:focus-visible{outline:2px solid #fff;outline-offset:3px}
 html body #lyTopMe .ly-tab-ico{display:grid;place-items:center;width:40px;height:40px}
 html body #lyTopMe img{display:none;width:40px!important;height:40px!important;object-fit:cover}
 html body #lyTopMe.has-picture img{display:block}
 html body #lyTopMe.has-picture .ly-tab-person{display:none}
 html body #lyTopMe .ly-tab-person{width:22px!important;height:22px!important;fill:none;stroke:#fff;stroke-width:1.5;stroke-linecap:round}

 /* Full-screen windows (the workout screen, confirmations) cover the whole phone, so the bar steps aside. */
 html body.ly-has-tabbar:has(.modal:not(.hidden)) #lyTabBar{display:none}

 /* ---------- More ---------- */
 html body.ly-more-open #lyMoreScrim{display:block;position:fixed;inset:0;z-index:10000;background:rgba(3,4,8,.55)}
 html body.ly-more-open #lyTabBar{z-index:10002}
 html body.ly-more-open #lyMoreSheet{display:grid}
 #lyMoreSheet{position:fixed;left:12px;right:12px;bottom:calc(var(--ly-tabbar) + 10px);z-index:10001;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;box-sizing:border-box;max-height:calc(100dvh - var(--ly-tabbar) - 40px);overflow-y:auto;padding:12px;
  border-radius:24px;background:rgba(18,20,28,.9);border:1px solid rgba(255,255,255,.14);box-shadow:0 24px 60px rgba(0,0,0,.5);backdrop-filter:blur(22px) saturate(1.4);-webkit-backdrop-filter:blur(22px) saturate(1.4)}
 html body #lyMoreSheet button.ly-more-item{display:flex!important;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%!important;min-width:0!important;min-height:94px!important;margin:0!important;padding:12px 8px!important;
  border-radius:16px!important;background:rgba(255,255,255,.05)!important;border:1px solid rgba(255,255,255,.18)!important;box-shadow:none!important;transform:none!important;color:#fff!important;font-size:14px!important;font-weight:800!important;cursor:pointer;transition:background-color var(--ly-ease),border-color var(--ly-ease)}
 html body #lyMoreSheet button.ly-more-item.is-active{background:rgba(255,255,255,.14)!important;border-color:#fff!important}
 html body #lyMoreSheet button.ly-more-item:focus-visible{outline:2px solid #fff!important;outline-offset:2px}
 #lyMoreSheet .ly-tab-ico{display:grid;place-items:center;width:40px;height:40px;line-height:0}
 html body #lyMoreSheet .ly-tab-ico svg{width:36px!important;height:36px!important}
 html body #lyMoreSheet [data-tab="settings"] .ly-tab-ico svg{width:30px!important;height:30px!important;fill:none;stroke:#e6e8f2;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 html body #lyMoreSheet .ly-tab-ico img{width:40px!important;height:40px!important;border-radius:50%;object-fit:cover}
 html body #lyMoreSheet .ly-home-glyph path{fill:#f4f5f8!important}
 html[data-theme="light"] body #lyMoreSheet .ly-home-glyph path{fill:#1b1d24!important}
 html body #lyMoreSheet .ly-tab-ico svg.lyi{--c:#f4f5f8!important;filter:grayscale(1)!important}
 #lyMoreSheet .ly-tab-label{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

 /* ---------- Floating buttons, menus and notices sit above the bar ---------- */
 html body.ly-has-tabbar :is(#mdPlus#mdPlus,#novaPlus#novaPlus,#lyShiftPlus#lyShiftPlus,.ly-alt-plus.ly-alt-plus,#lyToolsPlus#lyToolsPlus#lyToolsPlus){bottom:calc(var(--ly-tabbar) + 14px)!important}
 html body.ly-has-tabbar :is(#mdAddMenu#mdAddMenu,#novaMenu#novaMenu,#lyToolsAddMenu#lyToolsAddMenu#lyToolsAddMenu){bottom:calc(var(--ly-tabbar) + 84px)!important}
 html body.ly-has-tabbar #lifelyzeNotices#lifelyzeNotices{bottom:calc(var(--ly-tabbar) + 12px)!important}
 html body.ly-has-tabbar .ly-dw-bulk.ly-dw-bulk{bottom:calc(var(--ly-tabbar) + 8px)!important}
 html body.ly-has-tabbar .ly-dw-toast.ly-dw-toast{bottom:calc(var(--ly-tabbar) + 72px)!important}
 html body.ly-has-tabbar:not(.ly-settings-open) :is(.ly-profile-save-bar.ly-profile-save-bar,#lyPrefBar#lyPrefBar){bottom:calc(var(--ly-tabbar) + 8px)!important}
 html body.ly-has-tabbar:not(.ly-settings-open):has(#lyProfileSaveBar:not([hidden])) #lyPrefBar#lyPrefBar{bottom:calc(var(--ly-tabbar) + 78px)!important}

 /* ---------- Light theme ---------- */
 html[data-theme="light"] body #lyTabBar{background:rgba(255,255,255,.4);box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 1px 2px rgba(0,0,0,.14),0 10px 30px rgba(0,0,0,.12)}
 html[data-theme="light"] body #lyTabBar button.ly-tab{color:#0b0b0f!important}
 html[data-theme="light"] body #lyTabBar button.ly-tab{--tc-l:color-mix(in srgb,var(--tc) 70%,#000)}
 html[data-theme="light"] body #lyTabBar .ly-tab-ico svg.lyi :is(.b,.s,.t,[style]){stroke:var(--tc-l)!important}
 html[data-theme="light"] body #lyTabBar .ly-tab-ico svg.lyi :is(.f,.w){fill:var(--tc-l)!important}
 html[data-theme="light"] body #lyTabBar [data-tab="work"] .ly-tab-ico svg.lyi .mc-squash .b{stroke:#1b1d24!important}
 html[data-theme="light"] body #lyTabBar [data-tab="more"]{--tc:#1b1d24}
 html[data-theme="light"] body #lyTopMe{background:rgba(0,0,0,.05)!important;box-shadow:0 0 0 1.5px rgba(0,0,0,.5)!important}
 html[data-theme="light"] body #lyTopMe .ly-tab-person{stroke:#0b0b0f}
 html[data-theme="light"] body #lyMoreSheet{background:rgba(255,255,255,.95);border-color:rgba(0,0,0,.12)}
 html[data-theme="light"] body #lyMoreSheet button.ly-more-item{color:#14161d!important}
 html[data-theme="light"] body #lyMoreSheet [data-tab="settings"] .ly-tab-ico svg{stroke:#3a3f4c}
 html[data-theme="light"] body #lyMoreSheet .ly-tab-ico svg.lyi{--c:#1b1d24!important}
}
