/* My Family v2.5.0-r2 — compact native-style mobile layout and navigation repair */
@media (max-width: 900px){
  :root{
    --mf-app-gutter:10px;
    --mf-app-gap:10px;
    --mf-app-radius:16px;
    --mf-app-card-pad:13px;
    --mf-app-font:15px;
    --mf-app-small:12px;
    --mf-app-title:25px;
    --mf-app-control:44px;
    --mf-app-bottom:70px;
  }
  body.mobile-mode-modern{--mf-app-font:14px;--mf-app-small:11px;--mf-app-title:24px;--mf-app-control:42px;--mf-app-card-pad:12px;--mf-app-radius:15px}
  body.mobile-mode-comfortable{--mf-app-font:15px;--mf-app-small:12px;--mf-app-title:25px;--mf-app-control:44px;--mf-app-card-pad:13px;--mf-app-radius:16px}
  body.mobile-mode-large{--mf-app-font:16px;--mf-app-small:12.5px;--mf-app-title:27px;--mf-app-control:46px;--mf-app-card-pad:14px;--mf-app-radius:17px}
  body.mobile-mode-senior{--mf-app-font:17px;--mf-app-small:13.5px;--mf-app-title:29px;--mf-app-control:48px;--mf-app-card-pad:15px;--mf-app-radius:18px}
  body.mobile-mode-xl{--mf-app-font:17px;--mf-app-small:13.5px;--mf-app-title:29px;--mf-app-control:48px;--mf-app-card-pad:15px;--mf-app-radius:18px}

  html,body{
    width:100%!important;
    max-width:100%!important;
    min-height:100dvh!important;
    overflow-x:hidden!important;
    font-size:var(--mf-app-font)!important;
    line-height:1.4!important;
    text-size-adjust:100%!important;
    -webkit-text-size-adjust:100%!important;
  }
  body{background:linear-gradient(180deg,#f8faff 0,#fff9fb 48%,#f6fbff 100%)!important}
  body .app-shell{display:block!important;width:100%!important;max-width:100%!important;min-height:100dvh!important;padding:0!important}
  body .sidebar{display:none!important}
  body .content.app-main,body .content{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    min-height:100dvh!important;
    padding:0 var(--mf-app-gutter) calc(var(--mf-app-bottom) + 14px + env(safe-area-inset-bottom))!important;
    overflow-x:hidden!important;
    overflow-y:visible!important;
  }
  body .page-content,body #content{width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:hidden!important}

  /* Compact dashboard app bar. */
  body .app-topbar.app-topbar-v240{
    position:relative!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:"user actions" "selectors selectors"!important;
    align-items:center!important;
    gap:8px!important;
    width:calc(100% + (var(--mf-app-gutter) * 2))!important;
    max-width:none!important;
    min-height:0!important;
    margin:0 calc(-1 * var(--mf-app-gutter)) 10px!important;
    padding:8px var(--mf-app-gutter) 9px!important;
    border:0!important;
    border-bottom:1px solid rgba(203,213,225,.76)!important;
    border-radius:0 0 18px 18px!important;
    background:rgba(255,255,255,.97)!important;
    box-shadow:0 8px 22px rgba(15,23,42,.08)!important;
    backdrop-filter:blur(16px)!important;
    overflow:visible!important;
  }
  body .app-topbar-v240 .app-header-left{
    grid-area:user!important;
    display:grid!important;
    grid-template-columns:40px minmax(0,1fr)!important;
    align-items:center!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
  }
  body .app-topbar-v240 .sidebar-toggle-top{
    display:grid!important;
    place-items:center!important;
    width:40px!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    padding:0!important;
    border-radius:13px!important;
    font-size:19px!important;
  }
  body .app-topbar-v240 .app-user-compact{display:grid!important;gap:0!important;min-width:0!important;max-width:100%!important}
  body .app-topbar-v240 .app-user-compact b{font-size:17px!important;line-height:1.05!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  body .app-topbar-v240 .app-user-compact span{font-size:12px!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;color:#64748b!important}
  body .app-topbar-v240 .app-header-actions{
    grid-area:actions!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:6px!important;
    width:auto!important;
    min-width:0!important;
  }
  body .app-topbar-v240 .install-app-btn{display:none!important}
  body .app-topbar-v240 .mobile-display-btn,
  body .app-topbar-v240 .header-logout-btn{
    width:auto!important;
    min-width:40px!important;
    height:40px!important;
    min-height:40px!important;
    padding:0 10px!important;
    border-radius:13px!important;
    font-size:13px!important;
    line-height:1!important;
  }
  body .app-topbar-v240 .mobile-display-btn{width:40px!important;padding:0!important}
  body .app-topbar-v240 .header-logout-btn{min-width:66px!important}
  body .app-topbar-v240 .profile-selection-cluster{
    grid-area:selectors!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(104px,126px)!important;
    align-items:center!important;
    gap:7px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
  body .app-topbar-v240 .family-switch,body .app-topbar-v240 .language-switch{display:block!important;width:100%!important;min-width:0!important;margin:0!important}
  body .app-topbar-v240 .family-switch label,body .app-topbar-v240 .language-switch label{display:none!important}
  body .app-topbar-v240 .family-switch select,body .app-topbar-v240 .language-switch select{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:42px!important;
    min-height:42px!important;
    padding:0 11px!important;
    border-radius:13px!important;
    font-size:14px!important;
    line-height:1!important;
    text-overflow:ellipsis!important;
  }

  /* Compact native page headers. */
  body .page-head,body .page-head.compact-page-head{
    position:relative!important;
    top:auto!important;
    z-index:4!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    margin:8px 0 10px!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
  }
  body .page-head .page-title-block{min-width:0!important}
  body .page-head h1,body .page-head.compact-page-head h1{
    margin:0!important;
    max-width:100%!important;
    font-size:var(--mf-app-title)!important;
    line-height:1.08!important;
    letter-spacing:-.5px!important;
    overflow-wrap:anywhere!important;
  }
  body .page-head .actions,body .page-head.compact-page-head .actions{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
    flex-wrap:nowrap!important;
    gap:6px!important;
    width:auto!important;
    max-width:100%!important;
    min-width:0!important;
    padding:0!important;
    overflow:visible!important;
  }
  body .page-head .actions .btn,body .page-head .actions button{
    width:auto!important;
    min-width:0!important;
    min-height:40px!important;
    height:40px!important;
    padding:0 12px!important;
    border-radius:13px!important;
    font-size:13px!important;
    white-space:nowrap!important;
  }

  /* Universal mobile density and containment. */
  body .card,body .feed-post,body .event-card,body .people-card,body .quick-card,body .metric,
  body .photos-hero-card,body .photos-album-card,body .group-card,body .emergency-card{
    min-width:0!important;
    max-width:100%!important;
    padding:var(--mf-app-card-pad)!important;
    border-radius:var(--mf-app-radius)!important;
    box-shadow:0 8px 22px rgba(15,23,42,.07)!important;
    overflow:hidden!important;
  }
  body .cards,body .grid2,body .grid3,body .settings-grid,body .people-responsive-grid,
  body .dashboard-color-grid,body .dashboard-quick-cards,body .quick-cards{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    gap:var(--mf-app-gap)!important;
  }
  body .btn,body button.btn,body input,body select,body textarea{
    max-width:100%!important;
    min-height:var(--mf-app-control)!important;
    font-size:var(--mf-app-font)!important;
    line-height:1.2!important;
    border-radius:13px!important;
  }
  body .btn.small,body button.btn.small{min-height:36px!important;height:auto!important;padding:7px 10px!important;font-size:12px!important;border-radius:11px!important}
  body .muted,body small{font-size:var(--mf-app-small)!important;line-height:1.35!important}
  body .notice,body .warning,body .dangerbox{padding:10px 12px!important;border-radius:13px!important;font-size:13px!important;line-height:1.4!important}
  body .modal{padding:0!important;align-items:end!important;place-items:end center!important;background:rgba(15,23,42,.48)!important}
  body .modal-card{
    width:100vw!important;
    max-width:100vw!important;
    min-height:0!important;
    max-height:92dvh!important;
    margin:0!important;
    padding:14px 13px calc(14px + env(safe-area-inset-bottom))!important;
    border-radius:22px 22px 0 0!important;
    overflow:auto!important;
  }
  body .modal-head{position:sticky!important;top:-14px!important;z-index:8!important;margin:0 -2px 12px!important;padding:12px 2px 8px!important;background:rgba(255,255,255,.97)!important;backdrop-filter:blur(12px)!important}
  body .modal-head h2{font-size:22px!important;line-height:1.15!important}
  body .form-grid{grid-template-columns:1fr!important;gap:10px!important}
  body .field label{font-size:11px!important}

  /* Dashboard becomes a compact two-column app launcher. */
  body .mobile-home-panel{
    width:100%!important;
    max-width:100%!important;
    padding:14px!important;
    border-radius:18px!important;
    background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(241,250,255,.96))!important;
    box-shadow:0 8px 24px rgba(15,23,42,.07)!important;
  }
  body .app-home-head{display:grid!important;grid-template-columns:1fr!important;gap:9px!important;padding:0!important}
  body .app-home-head h2{margin:0!important;font-size:clamp(25px,7vw,29px)!important;line-height:1.08!important;letter-spacing:-.5px!important}
  body .app-home-head p{margin:0!important;font-size:14px!important;line-height:1.4!important}
  body .dashboard-head-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important;width:100%!important}
  body .dashboard-head-actions .btn{width:100%!important;min-height:42px!important;height:42px!important;padding:0 9px!important;font-size:13px!important}
  body .dashboard-color-grid,body .dashboard-quick-cards,body .quick-cards.dashboard-quick-cards{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
    margin-top:11px!important;
  }
  body .dashboard-color-card.quick-card,body .dashboard-shortcut-card.quick-card,body .quick-card{
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr)!important;
    grid-template-rows:auto auto!important;
    align-items:center!important;
    align-content:center!important;
    column-gap:9px!important;
    row-gap:2px!important;
    min-height:82px!important;
    padding:10px!important;
    border-radius:16px!important;
    text-align:left!important;
  }
  body .dashboard-color-card.quick-card:after{width:64px!important;height:64px!important;right:-22px!important;top:-22px!important}
  body .dashboard-color-icon,body .quick-card span{
    grid-row:1/3!important;
    width:42px!important;
    height:42px!important;
    margin:0!important;
    border-radius:13px!important;
    display:grid!important;
    place-items:center!important;
    font-size:23px!important;
  }
  body .dashboard-color-card b,body .quick-card b{font-size:14px!important;line-height:1.12!important;overflow-wrap:anywhere!important}
  body .dashboard-color-card small,body .quick-card small{font-size:10.5px!important;line-height:1.18!important}
  body .dashboard-metrics.cards{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin-top:10px!important}
  body .dashboard-metrics .metric{padding:11px!important}
  body .dashboard-metrics .metric b{font-size:24px!important;line-height:1.1!important}

  /* Family tree app toolbar and canvas. */
  body .tree-page-head-v2424{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:8px!important;
    margin-bottom:8px!important;
  }
  body .tree-page-head-v2424 .page-title-block{grid-column:1/2!important;grid-row:1!important}
  body .tree-page-head-v2424 .tree-header-fullscreen-btn{
    grid-column:2/3!important;
    grid-row:1!important;
    width:auto!important;
    min-height:40px!important;
    height:40px!important;
    padding:0 11px!important;
    border-radius:13px!important;
    font-size:12px!important;
  }
  body .tree-page-head-v2424 .tree-header-controls-v2424{grid-column:1/-1!important;grid-row:2!important;width:100%!important;min-width:0!important}
  body .tree-head-toolbar.tree-options-v249{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    align-items:stretch!important;
    gap:7px!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }
  body .tree-head-toolbar.tree-options-v249 #treeSearch{
    grid-column:1/-1!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:42px!important;
    min-height:42px!important;
    padding:0 11px!important;
    font-size:14px!important;
  }
  body .tree-head-toolbar.tree-options-v249 .tree-lang-select{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:42px!important;
    min-height:42px!important;
    padding:0 28px 0 10px!important;
    font-size:12.5px!important;
    font-weight:800!important;
    text-overflow:ellipsis!important;
  }
  body .tree-head-toolbar.tree-options-v249 .tree-action-menu-v249{grid-column:1/-1!important;width:100%!important;min-width:0!important}
  body .tree-head-toolbar.tree-options-v249 .tree-options-summary{width:100%!important;min-height:40px!important;height:40px!important;padding:0 10px!important;font-size:13px!important;border-radius:13px!important}
  body .tree-action-list-v249{position:fixed!important;left:10px!important;right:10px!important;top:auto!important;bottom:calc(var(--mf-app-bottom) + 10px + env(safe-area-inset-bottom))!important;width:auto!important;min-width:0!important;max-width:none!important;padding:8px!important;border-radius:16px!important}
  body .tree-action-list-v249 .btn{min-height:40px!important;font-size:13px!important}
  body .tree-desktop-layout-v2417{display:block!important;width:100%!important;min-width:0!important}
  body .tree-main-pane{width:100%!important;min-width:0!important}
  body .tree-stage,body .tree-stage-pro{
    width:100%!important;
    max-width:100%!important;
    height:calc(100dvh - 222px - env(safe-area-inset-bottom))!important;
    min-height:430px!important;
    padding:8px!important;
    border-radius:16px!important;
    overflow:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body .tree-pan-help{top:7px!important;left:7px!important;max-width:calc(100% - 14px)!important;padding:5px 8px!important;font-size:10px!important;border-radius:9px!important}
  body .tree-member-panel-v2417{display:none!important}

  /* Events/status cards. */
  body .events-page-head-v240{grid-template-columns:1fr!important;align-items:start!important;gap:8px!important}
  body .events-page-head-v240 .actions,body .events-header-actions{justify-content:flex-start!important;width:100%!important}
  body .events-page-head-v240 .actions .btn{flex:0 1 auto!important;min-height:40px!important;height:40px!important;padding:0 12px!important;font-size:13px!important}
  body .status-card-mobile-v240{padding:13px!important}
  body .status-card-title{display:block!important;margin:0 0 8px!important}
  body .status-card-title h3{margin:0!important;font-size:18px!important;line-height:1.2!important}
  body .status-card-title .status-card-add-btn{display:none!important}
  body .status-strip{gap:10px!important;padding:4px 0 4px!important;min-height:0!important}
  body .status-strip .empty{width:100%!important;min-height:84px!important;padding:22px 12px!important;font-size:13px!important;border-radius:14px!important}
  body .status{width:88px!important;min-width:88px!important}
  body .status-ring{width:66px!important;height:66px!important}
  body .status b{font-size:12px!important;line-height:1.15!important}
  body .event-card{padding:13px!important}
  body .event-card .event-head{gap:10px!important;margin-bottom:7px!important}
  body .event-photo-stack{min-width:52px!important}
  body .event-photo-stack .avatar{width:46px!important;height:46px!important}
  body .event-card h3{margin:5px 0 3px!important;font-size:20px!important;line-height:1.18!important}
  body .event-card p{margin:9px 0!important;font-size:14px!important;line-height:1.4!important}
  body .event-card .pill{padding:5px 9px!important;font-size:10px!important}
  body .event-card .social-actions{gap:6px!important;padding-top:8px!important}
  body .event-card .react-btn{width:34px!important;height:34px!important;font-size:16px!important}

  /* Feed cards match a native social feed. */
  body .feed-layout,body .feed-stream{display:block!important;width:100%!important;max-width:100%!important;margin:0!important}
  body .feed-post{padding:13px!important;margin-bottom:10px!important;border-radius:17px!important}
  body .post-head,body .fb-post-head{align-items:center!important;gap:9px!important}
  body .post-head .post-avatar,body .fb-post-head .post-avatar{width:42px!important;height:42px!important;min-width:42px!important;margin:0!important}
  body .post-head b,body .fb-post-head b{font-size:16px!important;line-height:1.15!important}
  body .post-head .muted,body .fb-post-head .muted{font-size:11.5px!important;line-height:1.35!important}
  body .feed-post>h3{margin:12px 0 7px!important;font-size:21px!important;line-height:1.18!important}
  body .feed-post .post-body{margin:7px 0 10px!important;font-size:15px!important;line-height:1.45!important}
  body .feed-post .media-grid{grid-template-columns:1fr!important;gap:6px!important;margin:9px 0!important}
  body .feed-post .media-tile img,body .feed-post .media-tile video{height:auto!important;max-height:460px!important;border-radius:13px!important}
  body .feed-count-row{font-size:11px!important;gap:7px!important}
  body .feed-actions,body .fb-actions{display:flex!important;flex-wrap:wrap!important;gap:5px!important;margin-top:8px!important}
  body .feed-actions .btn,body .fb-actions .btn{min-height:36px!important;padding:6px 9px!important;font-size:11px!important}
  body .feed-actions .react-btn,body .fb-actions .react-btn{width:34px!important;height:34px!important;min-height:34px!important;padding:0!important}

  /* People and general list pages. */
  body .people-mobile-page{padding:10px!important}
  body .people-filter-row{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important}
  body .people-filter-row input,body .people-filter-row select{width:100%!important;min-width:0!important;height:42px!important;min-height:42px!important;font-size:13px!important}
  body .people-responsive-grid{grid-template-columns:1fr!important;gap:9px!important}
  body .people-card-v240{padding:12px!important}
  body .people-card-main-v240{gap:9px!important}
  body .people-card-v240 .avatar{width:44px!important;height:44px!important}
  body .people-card-info-v240 b{font-size:16px!important}
  body .people-card-info-v240 small{font-size:10.5px!important}
  body .people-actions{display:flex!important;flex-wrap:wrap!important;gap:6px!important}
  body .people-actions .btn{width:auto!important;min-height:36px!important;font-size:11.5px!important;padding:6px 10px!important}

  /* Tamil calendar is a mobile card list instead of a clipped wide table. */
  body .cultural-mobile-controls{margin:0 0 8px!important}
  body .cultural-mobile-controls .cultural-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  body .cultural-mobile-controls .cultural-actions select:first-child{grid-column:1/-1!important}
  body .cultural-mobile-controls select{width:100%!important;min-width:0!important;height:42px!important;min-height:42px!important;font-size:13px!important}
  body .cultural-card{padding:10px!important}
  body .cultural-card .table-scroll{max-height:none!important;overflow:visible!important}
  body .cultural-table{display:block!important;width:100%!important;min-width:0!important;border:0!important}
  body .cultural-table tbody{display:grid!important;gap:8px!important;width:100%!important}
  body .cultural-table tr{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important;width:100%!important;padding:10px!important;border:1px solid var(--line)!important;border-radius:14px!important;background:#fff!important}
  body .cultural-table tr:first-child{display:none!important}
  body .cultural-table td{display:block!important;min-width:0!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;white-space:normal!important;overflow-wrap:anywhere!important;font-size:13px!important}
  body .cultural-table td:first-child{grid-column:1/-1!important;font-size:16px!important;font-weight:900!important;color:#172033!important}
  body .cultural-table td:nth-child(2)::before{content:"DOB"}
  body .cultural-table td:nth-child(3)::before{content:"Wedding"}
  body .cultural-table td:nth-child(4)::before{content:"Raasi"}
  body .cultural-table td:nth-child(5)::before{content:"Natchathiram"}
  body .cultural-table td:nth-child(n+2):nth-child(-n+5)::before{display:block!important;margin-bottom:2px!important;color:#64748b!important;font-size:9px!important;font-weight:900!important;text-transform:uppercase!important;letter-spacing:.03em!important}
  body .cultural-table td:last-child{grid-column:1/-1!important}
  body .cultural-table td:last-child .btn{width:100%!important;min-height:36px!important}

  /* Stable five-item native bottom navigation. */
  body .mobile-bottom-nav-shell{
    display:block!important;
    position:fixed!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    z-index:2147482000!important;
    width:100%!important;
    height:calc(var(--mf-app-bottom) + env(safe-area-inset-bottom))!important;
    pointer-events:none!important;
  }
  body .mobile-bottom-nav-shell .mobile-bottom-nav,body .mobile-bottom-nav-shell #mobileBottomNav{
    pointer-events:auto!important;
    position:relative!important;
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:stretch!important;
    gap:3px!important;
    width:100%!important;
    max-width:100%!important;
    height:calc(var(--mf-app-bottom) + env(safe-area-inset-bottom))!important;
    min-height:calc(var(--mf-app-bottom) + env(safe-area-inset-bottom))!important;
    padding:6px 5px calc(6px + env(safe-area-inset-bottom))!important;
    overflow:hidden!important;
    background:rgba(255,255,255,.97)!important;
    border-top:1px solid rgba(203,213,225,.86)!important;
    box-shadow:0 -8px 24px rgba(15,23,42,.11)!important;
    backdrop-filter:blur(18px)!important;
  }
  body .mobile-bottom-nav-shell #mobileBottomNav button{
    position:relative!important;
    display:grid!important;
    grid-template-rows:28px 14px!important;
    place-items:center!important;
    gap:1px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:56px!important;
    min-height:56px!important;
    padding:4px 1px!important;
    border-radius:13px!important;
    background:transparent!important;
    color:#475569!important;
    overflow:hidden!important;
    transition:background .16s ease,color .16s ease,transform .16s ease!important;
  }
  body .mobile-bottom-nav-shell #mobileBottomNav button span{
    display:grid!important;
    place-items:center!important;
    width:30px!important;
    height:28px!important;
    max-width:30px!important;
    margin:0!important;
    border-radius:10px!important;
    font-size:21px!important;
    line-height:1!important;
    transition:transform .16s ease,background .16s ease!important;
  }
  body .mobile-bottom-nav-shell #mobileBottomNav button small{
    max-width:100%!important;
    font-size:9.5px!important;
    line-height:1!important;
    font-weight:850!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body .mobile-bottom-nav-shell #mobileBottomNav button.active{
    background:linear-gradient(180deg,#eef2ff,#f5f3ff)!important;
    color:#4f46e5!important;
    box-shadow:inset 0 0 0 1px rgba(99,102,241,.12)!important;
  }
  body .mobile-bottom-nav-shell #mobileBottomNav button.active:before{
    content:""!important;
    position:absolute!important;
    top:2px!important;
    left:50%!important;
    width:24px!important;
    height:3px!important;
    border-radius:999px!important;
    background:linear-gradient(90deg,#4f46e5,#8b5cf6)!important;
    transform:translateX(-50%)!important;
  }
  body .mobile-bottom-nav-shell #mobileBottomNav button.active span{
    background:rgba(99,102,241,.10)!important;
    transform:translateY(-1px) scale(1.04)!important;
  }
  body .mobile-bottom-nav-shell .bottom-nav-more,body .mobile-bottom-nav-shell:before{display:none!important}
}

@media (max-width: 380px){
  :root{--mf-app-gutter:8px;--mf-app-gap:8px;--mf-app-card-pad:11px}
  body .app-topbar-v240 .header-logout-btn{min-width:58px!important;padding:0 7px!important;font-size:12px!important}
  body .app-topbar-v240 .profile-selection-cluster{grid-template-columns:minmax(0,1fr) 104px!important}
  body .app-home-head h2{font-size:24px!important}
  body .dashboard-color-card.quick-card,body .quick-card{grid-template-columns:36px minmax(0,1fr)!important;min-height:76px!important;padding:8px!important}
  body .dashboard-color-icon,body .quick-card span{width:36px!important;height:36px!important;font-size:20px!important}
  body .dashboard-color-card b,body .quick-card b{font-size:13px!important}
  body .tree-page-head-v2424{grid-template-columns:1fr!important}
  body .tree-page-head-v2424 .page-title-block,body .tree-page-head-v2424 .tree-header-fullscreen-btn,body .tree-page-head-v2424 .tree-header-controls-v2424{grid-column:1!important;grid-row:auto!important}
  body .tree-page-head-v2424 .tree-header-fullscreen-btn{width:100%!important}
  body .people-filter-row{grid-template-columns:1fr!important}
}

@media (max-height: 640px) and (orientation: landscape) and (max-width: 900px){
  body .app-topbar.app-topbar-v240{grid-template-columns:minmax(0,1fr) auto minmax(250px,1fr)!important;grid-template-areas:"user actions selectors"!important;padding-top:5px!important;padding-bottom:5px!important}
  body .app-topbar-v240 .profile-selection-cluster{grid-template-columns:minmax(0,1fr) 110px!important}
  body .tree-stage,body .tree-stage-pro{height:calc(100dvh - 122px - env(safe-area-inset-bottom))!important;min-height:280px!important}
  body .modal-card{max-height:100dvh!important;border-radius:0!important}
}
