/* Keep controls above home gestures/rounded corners, even when inset reports 0.
   Existing content/More/support offsets follow the complete navigation height. */
.mobile-workspace-nav,.mobile-more-overlay {display:none;}
@media(max-width:760px) {
 /* The installed Android wrapper already reserves system bars/IME at its root.
    Every native mode is inset-managed; adding web clearance duplicates it. */
 :root {--mobile-nav-safe-clearance:max(24px,env(safe-area-inset-bottom,0px));}
 :root[data-android-navigation] {--mobile-nav-safe-clearance:0px;}
 body[data-app="dashboard"].mobile-nav-ready {--mobile-nav-clearance:var(--mobile-nav-safe-clearance);--mobile-nav-height:calc(77px + var(--mobile-nav-clearance));}
 body[data-app="dashboard"].mobile-nav-ready .sidebar,body[data-app="dashboard"].mobile-nav-ready .sidebar-scrim,body[data-app="dashboard"].mobile-nav-ready .mobile-menu {display:none;}
 body.mobile-nav-ready>.site-footer {padding-bottom:calc(var(--mobile-nav-height) + 24px);}
 html:has(body.mobile-nav-ready) {scroll-padding-bottom:calc(77px + var(--mobile-nav-safe-clearance) + 16px);}
 .mobile-workspace-nav {position:fixed;z-index:60;left:0;right:0;bottom:0;display:flex;gap:4px;align-items:center;box-sizing:border-box;height:var(--mobile-nav-height);padding:8px max(16px,env(safe-area-inset-right,0px)) calc(8px + var(--mobile-nav-clearance)) max(16px,env(safe-area-inset-left,0px));border-top:1px solid var(--line-2);background:var(--surface-solid);}
 .mobile-nav-item {position:relative;flex:1;min-width:68px;min-height:60px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;padding:8px 4px;border-radius:14px;color:var(--muted);font:600 11px/1.25 var(--font-body);text-align:center;white-space:nowrap;}
 .mobile-nav-item svg {width:23px;height:23px;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;fill:none;flex-shrink:0;}
 .mobile-nav-item.selected {color:var(--brand);background:var(--brand-soft);}
 .mobile-nav-item.selected::before {content:'';position:absolute;width:26px;height:3px;border-radius:0 0 5px 5px;top:-8px;left:calc(50% - 13px);background:var(--gradient-brand);}
 .mobile-nav-item:focus-visible,.mobile-more-tile:focus-visible,.mobile-more-close:focus-visible {outline:2px solid var(--brand);outline-offset:-2px;}
 .mobile-more-overlay:not([hidden]) {display:flex;position:fixed;z-index:59;inset:0 0 var(--mobile-nav-height);align-items:flex-end;justify-content:center;padding:8px;}
 .mobile-more-overlay[hidden] {display:none;}
 .mobile-more-scrim {position:absolute;inset:0;width:100%;height:100%;background:rgba(3,5,12,.64);border:0;border-radius:0;}
 :root[data-theme="light"] .mobile-more-scrim {background:rgba(15,23,42,.3);}
 .mobile-more-sheet {position:relative;display:flex;flex-direction:column;width:100%;max-width:600px;max-height:calc(100vh - var(--mobile-nav-height) - 16px);max-height:calc(100dvh - var(--mobile-nav-height) - 16px);padding:10px 16px 16px;border:1px solid var(--line-2);border-radius:24px;background:var(--surface-solid);box-shadow:var(--shadow);animation:mobile-more-enter .16s ease-out;}
 .mobile-more-sheet:focus {outline:none;}
 .mobile-more-handle {display:block;flex-shrink:0;width:40px;height:4px;background:var(--line-2);border-radius:8px;margin:0 auto 12px;}
 .mobile-more-heading {display:flex;align-items:flex-start;justify-content:space-between;gap:10px;flex-shrink:0;margin-bottom:16px;}
 .mobile-more-heading h2 {font:700 20px/1.3 var(--font-display);letter-spacing:-.5px;margin:0 0 4px;}
 .mobile-more-heading p {font-size:12px;line-height:1.5;color:var(--muted);margin:0;}
 .mobile-more-close {width:36px;height:36px;display:grid;place-items:center;flex-shrink:0;color:var(--muted);border:1px solid var(--line);border-radius:11px;font-size:22px;}
 .mobile-more-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:2px;}
 .mobile-more-tile {position:relative;display:flex;min-width:0;min-height:86px;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px 8px;border:1px solid var(--line-2);border-radius:17px;background:var(--surface-2);color:var(--text);text-align:center;font:600 12px/1.4 var(--font-body);}
 .mobile-more-tile svg {width:24px;height:24px;stroke:var(--brand);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;fill:none;flex-shrink:0;}
 .mobile-more-tile .mobile-nav-label {overflow-wrap:anywhere;}
 .mobile-more-tile.selected {background:var(--brand-soft);border-color:var(--brand-line);color:var(--brand);}
 .mobile-more-signout,.mobile-more-signout svg {color:var(--red);stroke:var(--red);}
 .mobile-support-count {position:absolute;right:7px;top:7px;min-width:17px;height:17px;padding:0 4px;border-radius:10px;background:var(--red);color:#fff;font:600 10px/17px var(--font-body);}
 .mobile-more-notice {position:absolute;right:12px;top:7px;width:6px;height:6px;border-radius:50%;background:var(--red);}
 .mobile-support-count[hidden],.mobile-more-notice[hidden] {display:none;}
 html.mobile-more-open,body.mobile-more-open {overflow:hidden;}
 body.mobile-nav-ready .breadcrumb {min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
 @keyframes mobile-more-enter {from {opacity:.6;transform:translateY(8px);}to {opacity:1;transform:translateY(0);}}
}
@media(max-width:350px) {
 .mobile-more-grid {grid-template-columns:repeat(2,minmax(0,1fr));}
 body.mobile-nav-ready .breadcrumb {font-size:0;}
 body.mobile-nav-ready .breadcrumb>span {display:none;}
 body.mobile-nav-ready .breadcrumb strong {display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;font-size:12px;}
 .mobile-more-sheet {padding:10px 12px 12px;}
}
@media(prefers-reduced-motion:reduce) {.mobile-more-sheet {animation:none;}}
