/* Family Book mobile Home polish — compact social layout without changing desktop */
@media (max-width:759px){
  #app>.app{
    min-height:100vh!important;
    padding-bottom:0!important;
    background:var(--fb-shell-bg,#f3f0e8)!important;
  }

  /* Compact Facebook-style mobile header */
  #app>.app>.topbar{
    position:sticky!important;
    top:0!important;
    z-index:230!important;
    width:100%!important;
    height:56px!important;
    min-height:56px!important;
    padding:0 10px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    background:color-mix(in srgb,var(--fb-shell-panel,#fffdf8) 98%,transparent)!important;
    border-bottom:1px solid var(--fb-shell-border,rgba(49,92,67,.16))!important;
    backdrop-filter:blur(14px)!important;
    box-shadow:none!important;
  }
  #app>.app>.topbar .brand-home{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:auto!important;
    min-width:0!important;
    max-width:calc(100vw - 104px)!important;
    height:56px!important;
    padding:0!important;
    margin:0!important;
    overflow:hidden!important;
  }
  #app>.app>.topbar .brand-home .brand-logo-wrap{
    display:flex!important;
    align-items:center!important;
    width:auto!important;
    max-width:100%!important;
    height:56px!important;
    overflow:hidden!important;
  }
  #app>.app>.topbar .brand-home .brand-logo-wrap .theme-logo{
    display:block;
    width:auto!important;
    max-width:100%!important;
    height:auto!important;
    max-height:43px!important;
    object-fit:contain!important;
    object-position:left center!important;
    margin:0!important;
  }
  #app>.app>.topbar .brand-home .brand-tagline{display:none!important}
  #app>.app>.topbar .actions{
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
    margin-left:auto!important;
    flex:0 0 auto!important;
  }
  #app>.app>.topbar .circle{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    border-radius:50%!important;
    border:1px solid var(--fb-shell-border,rgba(49,92,67,.16))!important;
    background:var(--fb-shell-panel-2,#f7f4ec)!important;
    color:var(--fb-shell-accent,#315c43)!important;
    box-shadow:none!important;
  }
  #app>.app>.topbar .circle svg{width:18px!important;height:18px!important}
  #app>.app>.topbar .avatar{padding:0!important;overflow:hidden!important}
  #app>.app>.topbar .avatar img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}

  /* Reuse the app nav as a compact top icon row, matching desktop/APK routes */
  #app>.app>.bottom{
    position:fixed!important;
    z-index:225!important;
    left:0!important;
    right:0!important;
    top:56px!important;
    bottom:auto!important;
    transform:none!important;
    width:100%!important;
    height:46px!important;
    min-height:46px!important;
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:0!important;
    padding:0 5px!important;
    border:0!important;
    border-bottom:1px solid var(--fb-shell-border,rgba(49,92,67,.16))!important;
    border-radius:0!important;
    background:color-mix(in srgb,var(--fb-shell-panel,#fffdf8) 98%,transparent)!important;
    box-shadow:none!important;
    backdrop-filter:blur(14px)!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }
  #app>.app>.bottom .nav{
    position:relative!important;
    min-width:0!important;
    width:100%!important;
    height:46px!important;
    padding:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:var(--fb-shell-muted,#738076)!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    overflow:visible!important;
  }
  #app>.app>.bottom .nav[data-r="profile"]{display:none!important}
  #app>.app>.bottom .nav>svg{width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;flex:0 0 22px!important}
  #app>.app>.bottom .nav small{display:none!important}
  #app>.app>.bottom .nav.active{
    background:transparent!important;
    color:var(--fb-shell-accent,#315c43)!important;
  }
  #app>.app>.bottom .nav.active:after{
    content:"";
    position:absolute;
    left:16%;
    right:16%;
    bottom:0;
    height:3px;
    border-radius:999px 999px 0 0;
    background:var(--fb-shell-accent,#315c43);
  }

  /* Main content starts below the fixed icon row */
  #app>.app>.screen{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:56px 11px 18px!important;
    box-sizing:border-box!important;
  }

  /* Home composer */
  .home-status-composer-shell{margin:0 0 11px!important}
  .home-social-compact{
    min-height:52px!important;
    padding:7px 8px!important;
    gap:7px!important;
    border-radius:13px!important;
    box-shadow:none!important;
    background:var(--fb-shell-panel,#fffdf8)!important;
  }
  .home-social-compact-avatar{width:37px!important;height:37px!important;flex:0 0 37px!important}
  .home-social-compact-prompt{
    height:37px!important;
    padding:0 11px!important;
    font-size:.84rem!important;
    background:var(--fb-shell-panel-2,#f7f4ec)!important;
  }
  .home-social-compact-actions{gap:1px!important}
  .home-social-compact-action{width:30px!important;height:30px!important;border-radius:9px!important}
  .home-social-compact-action svg{width:18px!important;height:18px!important}

  /* Family Memories: compact story strip */
  .home-memory-strip-shell{margin:0 0 12px!important}
  .home-memory-strip-head{align-items:center!important;margin:0 2px 7px!important;gap:8px!important}
  .home-memory-strip-head h2{font-size:1.15rem!important;line-height:1.15!important}
  .home-memory-strip-head p{display:none!important}
  .home-memory-strip-viewall{font-size:.82rem!important;padding:4px 2px!important}
  .home-memory-strip-track{
    gap:8px!important;
    margin:0 -11px!important;
    padding:2px 11px 3px!important;
    scrollbar-width:none!important;
    scroll-padding-left:11px!important;
  }
  .home-memory-strip-track::-webkit-scrollbar{display:none!important}
  .home-memory-strip-card,.home-memory-add-card{
    flex:0 0 96px!important;
    width:96px!important;
    height:136px!important;
    border-radius:12px!important;
    box-shadow:none!important;
  }
  .home-memory-strip-card:hover,.home-memory-add-card:hover{transform:none!important;box-shadow:none!important}
  .home-memory-strip-author{top:7px!important;left:7px!important;width:28px!important;height:28px!important}
  .home-memory-strip-caption{left:8px!important;right:7px!important;bottom:7px!important;font-size:.69rem!important}
  .home-memory-add-card{gap:9px!important;font-size:.72rem!important}
  .home-memory-add-avatar,.home-memory-add-avatar-media{width:49px!important;height:49px!important}
  .home-memory-add-plus{width:21px!important;height:21px!important}
  .home-memory-strip-loading,.home-memory-strip-empty{height:136px!important;flex-basis:166px!important}

  /* Family Wall: flatter mobile feed */
  #screen .family-wall-panel{
    margin:9px -11px 0!important;
    padding:11px!important;
    border-left:0!important;
    border-right:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:var(--fb-shell-panel,#fffdf8)!important;
  }
  #screen .family-wall-panel>.section-head.wall-head{margin:0 2px 9px!important;align-items:start!important}
  #screen .family-wall-panel .wall-head h2{font-size:1.24rem!important;line-height:1.15!important;color:var(--fb-shell-accent,#315c43)!important}
  #screen .family-wall-panel .wall-head p{margin-top:3px!important;font-size:.75rem!important;line-height:1.35!important;color:var(--fb-shell-muted,#738076)!important}
  #screen .family-wall-feed{gap:9px!important;margin-top:8px!important}
  #screen .wall-post{border-radius:14px!important;box-shadow:none!important;background:var(--fb-shell-panel,#fffdf8)!important;border-color:var(--fb-shell-border,rgba(49,92,67,.16))!important}
  #screen .wall-post-head{padding:10px 10px 6px!important;gap:8px!important}
  #screen .wall-avatar.small{width:34px!important;height:34px!important}
  #screen .wall-post-head strong{font-size:.82rem!important}
  #screen .wall-post-head span{font-size:.66rem!important}
  #screen .wall-post-body{padding:2px 10px 10px!important}
  #screen .wall-post-body>p{font-size:.88rem!important;line-height:1.4!important}
  #screen .wall-memory-photo{margin-top:8px!important;border-radius:11px!important}
}

@media (max-width:380px){
  #app>.app>.topbar .brand-home{max-width:calc(100vw - 96px)!important}
  #app>.app>.topbar .brand-home .brand-logo-wrap .theme-logo{max-height:39px!important}
  .home-social-compact-action[data-home-activity-composer]{display:none!important}
  .home-memory-strip-card,.home-memory-add-card{flex-basis:90px!important;width:90px!important;height:130px!important}
}