/* KO_MOBILE_BROWSER_155 — Mobile browser dock and compact homepage cards.
   Scoped to regular mobile browsers only; installed standalone PWA is unchanged.
   Based on the reviewed branch fix/mobile-browser-ui-2026-10-23. */
@media (max-width:760px) and (display-mode:browser){
  body,
  body.portal-authenticated{
    padding-bottom:calc(76px + env(safe-area-inset-bottom, 0px))!important;
  }
  body .mobile-app-nav,
  body.portal-authenticated .mobile-app-nav{
    position:fixed!important;
    z-index:60!important;
    display:grid!important;
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    width:100%!important;
    height:auto!important;
    min-height:64px!important;
    margin:0!important;
    padding:4px 4px max(4px,env(safe-area-inset-bottom, 0px))!important;
    border:0!important;
    border-top:1px solid #dce5de!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:0 -6px 20px rgba(21,44,29,.10)!important;
    backdrop-filter:none!important;
  }
  body .mobile-app-nav>a{
    min-width:0!important;
    min-height:54px!important;
    margin:0!important;
    padding:4px 2px!important;
    border-radius:10px!important;
    transform:none!important;
    box-shadow:none!important;
  }
  body .mobile-app-nav>a.active{
    background:#eaf5e7!important;
    color:#2f6f27!important;
  }
  body .mobile-app-nav>a.active svg,
  body .mobile-app-nav>a.active span{
    color:#2f6f27!important;
    stroke:currentColor!important;
  }
  /* Profile is available from the dock for logged-in visitors. */
  body.portal-authenticated .site-header .header-account-link{
    display:none!important;
  }

  /* Compact public homepage: reduce banner and event cards. */
  body .portal-hero{
    min-height:0!important;
    height:auto!important;
  }
  body .portal-hero-copy{
    padding:16px 14px!important;
  }
  body .portal-hero h1{
    font-size:26px!important;
    line-height:1.07!important;
  }
  body .portal-hero p{
    font-size:13px!important;
    line-height:1.36!important;
  }
  body .portal-hero-actions{
    margin-top:12px!important;
    gap:7px!important;
  }
  body .portal-hero .btn{
    min-height:36px!important;
    padding:7px 9px!important;
    font-size:12px!important;
  }

  /* Whole original card stays clickable; image left and content right. */
  body .homepage-wide-events .featured-event-card{
    display:grid!important;
    grid-template-columns:149px minmax(0,1fr)!important;
    height:84px!important;
    min-height:84px!important;
    max-height:84px!important;
    border-left:4px solid var(--org,#397a2c)!important;
    align-items:stretch!important;
    overflow:hidden!important;
  }
  body .homepage-wide-events .featured-event-media{
    width:149px!important;
    min-width:149px!important;
    max-width:149px!important;
    height:84px!important;
    min-height:84px!important;
    max-height:84px!important;
    aspect-ratio:16/9!important;
    overflow:hidden!important;
  }
  body .homepage-wide-events .featured-event-media img{
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
  }
  body .homepage-wide-events .featured-event-copy{
    min-width:0!important;
    min-height:0!important;
    height:84px!important;
    max-height:84px!important;
    overflow:hidden!important;
    gap:2px!important;
    padding:5px 8px!important;
  }
  body .homepage-wide-events .featured-event-day{
    font-size:10px!important;
    line-height:1.1!important;
  }
  body .homepage-wide-events .featured-event-copy>strong{
    display:-webkit-box!important;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    min-height:0!important;
    margin:0!important;
    overflow:hidden!important;
    font-size:13.5px!important;
    line-height:1.14!important;
  }
  body .homepage-wide-events .featured-event-copy>small{
    min-width:0!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
    font-size:10px!important;
    line-height:1.12!important;
  }
  body .homepage-wide-events .featured-event-org{
    min-width:0!important;
    margin-top:auto!important;
    overflow:hidden!important;
    white-space:nowrap!important;
    font-size:10px!important;
    line-height:1.12!important;
  }
}
@media (max-width:360px) and (display-mode:browser){
  body .homepage-wide-events .featured-event-card{
    grid-template-columns:124px minmax(0,1fr)!important;
    height:70px!important;
    min-height:70px!important;
    max-height:70px!important;
  }
  body .homepage-wide-events .featured-event-media{
    width:124px!important;
    min-width:124px!important;
    max-width:124px!important;
    height:70px!important;
    min-height:70px!important;
    max-height:70px!important;
  }
  body .homepage-wide-events .featured-event-copy{
    height:70px!important;
    max-height:70px!important;
    padding:4px 7px!important;
  }
  body .homepage-wide-events .featured-event-copy>strong{
    font-size:12px!important;
  }
  body .homepage-wide-events .featured-event-org{
    display:none!important;
  }
}
