/* Standalone iOS/PWA polish. Browser and desktop layouts remain unchanged. */
.ios-bottom-nav,.ios-more-sheet{display:none}

@media (display-mode: standalone) and (max-width: 760px){
  html{background:#eef2ee}
  body.premium{padding-bottom:calc(70px + env(safe-area-inset-bottom,0px));background:#eef2ee}
  body.premium .page-shell,body.premium .home-shell{margin-top:max(6px,env(safe-area-inset-top,0px));margin-bottom:8px}
  body.premium .site-header{min-height:56px;padding-inline:14px}
  body.premium .brand-mark{width:34px;height:34px;border-radius:10px}
  body.premium .brand-mark svg{width:20px;height:20px}
  body.premium .brand-name{font-size:.96rem;letter-spacing:-.02em}
  body.premium .brand-subtitle{display:none}

  /* The installed app uses the bottom navigation as its primary navigation.
     Keep only Back + Refresh in the header to avoid duplicate navigation. */
  body.premium .mobile-site-nav-menu{display:none!important}

  /* The header overlays the photographic hero in the standalone shell. Give
     homepage copy enough top clearance so the title never sits underneath it. */
  body.premium.page-overview .simplified-hero .premium-hero-content{
    padding-top:112px!important;
  }
  body.premium.page-overview .simplified-hero{
    min-height:390px;
  }

  body.premium:not(.page-overview) .site-status-strip{
    display:grid;
    grid-template-columns:1fr auto;
    grid-template-areas:'primary time' 'secondary secondary';
    gap:3px 10px;
    min-height:0;
    margin:0 0 8px;
    padding:9px 16px 10px;
    border-top:1px solid var(--rw-line);
    border-bottom:1px solid var(--rw-line);
    border-radius:0;
    background:#f8faf8;
    line-height:1.3;
  }
  body.premium .site-status-primary{grid-area:primary;display:flex;align-items:center;gap:6px;min-width:0}
  body.premium .site-status-label{display:none}
  body.premium .site-status-copy{display:block;overflow:hidden;color:var(--rw-ink);font-size:.77rem;font-weight:680;text-overflow:ellipsis;white-space:nowrap}
  body.premium .site-status-secondary{grid-area:secondary;color:var(--rw-muted);font-size:.7rem;font-weight:600}
  body.premium .site-status-time{grid-area:time;align-self:center;color:var(--rw-muted);font-size:.68rem;font-weight:650;white-space:nowrap}

  .ios-bottom-nav{
    position:fixed;
    z-index:6000;
    right:0;
    bottom:0;
    left:0;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    padding:7px 8px calc(7px + env(safe-area-inset-bottom,0px));
    border-top:1px solid rgba(16,35,26,.11);
    background:rgba(250,252,250,.96);
    -webkit-backdrop-filter:blur(18px) saturate(150%);
    backdrop-filter:blur(18px) saturate(150%);
  }
  .ios-bottom-nav a,.ios-bottom-nav button{
    -webkit-appearance:none;
    appearance:none;
    display:flex;
    min-width:0;
    min-height:50px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    margin:0;
    padding:0;
    border:0;
    border-radius:12px;
    color:var(--rw-muted);
    background:transparent;
    font:inherit;
    text-decoration:none;
    -webkit-tap-highlight-color:transparent;
  }
  .ios-bottom-nav svg{width:20px;height:20px}
  .ios-bottom-nav span{font-size:.62rem;font-weight:700;line-height:1}
  .ios-bottom-nav [aria-current='page']{color:var(--rw-green);background:var(--rw-green-soft)}
  .ios-bottom-nav [data-ios-more][aria-expanded='true']{color:var(--rw-green);background:var(--rw-green-soft)}

  .ios-more-sheet:not([hidden]){position:fixed;z-index:7000;inset:0;display:block}
  .ios-more-backdrop{position:absolute;inset:0;width:100%;height:100%;border:0;background:rgba(8,20,14,.28);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}
  .ios-more-panel{position:absolute;right:0;bottom:0;left:0;padding:10px 14px calc(18px + env(safe-area-inset-bottom,0px));border-radius:22px 22px 0 0;background:#fff;box-shadow:0 -18px 48px rgba(15,38,27,.18)}
  .ios-more-handle{width:38px;height:4px;margin:0 auto 12px;border-radius:999px;background:rgba(16,35,26,.18)}
  .ios-more-links{display:grid;gap:4px}
  .ios-more-links a{display:flex;min-height:48px;align-items:center;padding:0 15px;border-radius:12px;color:var(--rw-ink);font-size:.92rem;font-weight:680;text-decoration:none}
  .ios-more-links a:active{background:var(--rw-green-soft);color:var(--rw-green)}
  body.ios-more-open{overflow:hidden}

  body.premium .offline-status-banner{left:12px;right:12px;bottom:calc(76px + env(safe-area-inset-bottom,0px));border-radius:12px}
  body.premium .site-footer{padding-bottom:18px}
}

@media (display-mode: standalone) and (max-width:390px){
  body.premium .brand-name{font-size:.9rem}
  body.premium .site-header-actions{gap:5px!important}
}
