.mobile-menu-trigger,.mobile-menu-heading,.mobile-menu-backdrop{display:none}
@media(max-width:980px){
    html{scroll-padding-top:76px}
    body{--mobile-header:64px;--mobile-bottom:calc(68px + env(safe-area-inset-bottom));padding-top:var(--mobile-header);padding-bottom:var(--mobile-bottom)}
    body header.larche-top{display:flex!important;align-items:center!important;gap:8px!important;height:var(--mobile-header)!important;padding:0 12px!important;grid-template-columns:none!important}
    body header.larche-top .larche-brand{flex:1 1 0!important;width:auto!important;max-width:none!important;min-width:0!important;gap:8px!important;overflow:hidden}
    body header.larche-top .brand-wordmark{display:grid!important;min-width:0;overflow:hidden}
    body header.larche-top .brand-wordmark b{display:block;font-size:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    body header.larche-top .brand-wordmark small{display:none}
    body header.larche-top .brand-logo-uploaded,body header.larche-top .arch-mark{width:38px!important;height:38px!important;flex:0 0 38px!important;max-width:none!important}
    body header.larche-top .brand-logo-uploaded{display:flex!important;align-items:center;justify-content:center}
    body header.larche-top .brand-logo-uploaded img{display:block;width:34px!important;height:34px!important;max-width:34px;flex:none;object-fit:contain;padding:2px}
    body header.larche-top .larche-tabs,body header.larche-top .larche-search,body header.larche-top .superadmin-access,body header.larche-top .icon-action[href$="#composer"]{display:none!important}
    body header.larche-top .larche-actions{display:flex!important;gap:4px!important;flex:0 0 auto!important;min-width:0!important;margin:0!important}
    body header.larche-top .top-icon,body header.larche-top .icon-action{display:grid;place-items:center;width:40px;height:44px;font-size:20px}
    body header.larche-top .user-chip{padding:0;background:transparent;flex:none}
    body header.larche-top .user-chip b{display:none}
    .mobile-menu-trigger{display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;padding:0;border:0;border-radius:12px;background:color-mix(in srgb,var(--brand) 8%,white);color:var(--brand);font-size:24px;cursor:pointer}
    body .mobile-nav{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));height:auto;min-height:68px;padding:6px 4px calc(6px + env(safe-area-inset-bottom));gap:0;z-index:1000;background:#fff;box-shadow:0 -4px 24px #163b650d}
    .mobile-nav a,.mobile-nav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:52px;margin:0;padding:4px 0;border:0;border-radius:12px;background:transparent;color:#64748b;font:inherit;cursor:pointer;text-decoration:none}
    .mobile-nav i{font-size:21px;line-height:1.2}.mobile-nav small{font-size:10px;font-weight:600}
    .mobile-nav .mobile-create{background:color-mix(in srgb,var(--brand) 9%,white);color:var(--brand)}
    .mobile-nav a[aria-current="page"]{background:color-mix(in srgb,var(--brand) 9%,white);color:var(--brand)}
    body .global-sidebar,body.sidebar-compact .global-sidebar{display:block!important;position:fixed!important;inset:0 auto 0 0!important;width:min(340px,88vw)!important;height:100dvh!important;padding:calc(16px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom))!important;margin:0!important;overflow-y:auto!important;overscroll-behavior:contain;border:0!important;border-radius:0 24px 24px 0;background:#fff!important;box-shadow:12px 0 48px #0f172a26!important;z-index:1400!important;transform:translateX(-110%);visibility:hidden;transition:transform .23s ease,visibility .23s}
    body.mobile-menu-open .global-sidebar{transform:translateX(0);visibility:visible}
    .mobile-menu-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;color:var(--brand)}
    .mobile-menu-heading div{display:grid;gap:4px}.mobile-menu-heading strong{font-size:21px}.mobile-menu-heading small{font-size:12px;color:#64748b}
    .mobile-menu-heading button{width:44px;height:44px;padding:0;border:0;border-radius:50%;background:#f1f5f9;color:#334155;font-size:23px;cursor:pointer}
    .mobile-menu-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:1300;background:#0f172a73;backdrop-filter:blur(3px);border:0;padding:0}
    body.mobile-menu-open{overflow:hidden}
    body .global-sidebar .sidebar-toggle{display:none!important}
    body .global-sidebar .sidebar-search{display:flex!important;height:46px;margin-bottom:14px}
    body .global-sidebar .global-me{display:flex!important;justify-content:flex-start!important;gap:12px;padding:12px!important;margin-bottom:12px;border-radius:14px;background:#f8fafc}
    body .global-sidebar .global-me b{display:block!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    body .global-sidebar nav{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:3px;margin:0}
    body .global-sidebar nav a{display:flex!important;justify-content:flex-start!important;gap:13px!important;width:100%!important;height:auto!important;min-height:48px;padding:10px 12px!important;border-radius:12px;font-size:14px}
    body .global-sidebar nav a i{flex:0 0 28px!important;width:28px!important;min-width:28px!important;font-size:21px!important;text-align:center}
    body .global-sidebar nav a span{display:block!important;white-space:normal!important;visibility:visible!important;opacity:1!important}
    .global-sidebar nav a[aria-current="page"]{background:color-mix(in srgb,var(--brand) 10%,white);color:var(--brand)}
    body .page.with-global-sidebar,body.sidebar-compact .page.with-global-sidebar{margin-left:0!important;width:100%!important;min-width:0;padding:16px 12px 24px!important}
    .page>*{min-width:0;max-width:100%}.network-shell,.larche-shell,.profile-layout,.church-layout,.admin-main-grid{grid-template-columns:minmax(0,1fr)!important;gap:16px!important;min-width:0}
    .larche-main-feed,.feed-column,.profile-layout>main,.church-layout>main{width:100%;min-width:0;max-width:100%}
    .cards,.feature-grid,.reel-grid{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}
    .page .surface,.card,.auth-card{border-radius:18px!important}.page .row{flex-wrap:wrap}.page .row>*{min-width:0;flex:1 1 160px}
    .page input,.page select,.page textarea{min-width:0;max-width:100%;font-size:16px}
    .page input[type=checkbox],.page input[type=radio]{width:auto;flex:none}
    .page p,.post-copy,.post-body,.comment-bubble{overflow-wrap:anywhere}
    .post-menu-box{max-width:calc(100vw - 36px)!important;max-height:70dvh;overflow-y:auto}
    .stories-row{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;padding-bottom:8px}
    .stories-row .story{flex-shrink:0;scroll-snap-align:start}
    .quick-tabs,.profile-tabs,.admin-console-nav{max-width:100%;overflow-x:auto;white-space:nowrap;overscroll-behavior-x:contain}
    .quick-tabs a,.profile-tabs a,.admin-console-nav a{flex-shrink:0;min-height:44px}
    .composer-tools{flex-wrap:wrap;gap:10px}.composer-tools>label,.composer-tools>select{min-width:0;max-width:100%}.composer-tools .publish{min-height:44px;margin-left:auto}
    .post-advanced-actions button,.comment-form button,.reply-form button{min-height:44px}
    .profile-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));width:100%;gap:8px}.profile-actions .logout-button{width:100%;min-height:44px;padding:8px;font-size:12px}
    .profile-actions form{min-width:0}.profile-actions .btn{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;min-height:44px;padding:8px;font-size:12px}
    .admin-table-wrap{max-width:100%;overflow-x:auto}.admin-user-id{min-width:0}.admin-setting-actions{flex-wrap:wrap}
    body .larche-messenger,body.sidebar-compact .larche-messenger{left:0!important;right:0;top:var(--mobile-header)!important;bottom:var(--mobile-bottom)!important}
    .auth-card{width:calc(100% - 24px);margin:28px auto;padding:28px 22px}.auth-card h1{font-size:26px}
    .login-shell{width:100%;margin:20px auto}.login-card{width:100%;margin:0}
    button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}
}
@media(max-width:600px){
    .cards,.feature-grid,.reel-grid{grid-template-columns:minmax(0,1fr)}
    .profile-hero .profile-head{padding:16px;gap:12px}.profile-cover,.church-cover{height:180px!important}
    .profile-head h1,.church-head h1{font-size:25px;overflow-wrap:anywhere}.church-head{gap:12px;flex-wrap:wrap;padding:16px}
    .profile-panel,.church-post,.composer-pro{padding:16px}.profile-post-head,.panel-title{flex-wrap:wrap;gap:8px}
    .profile-head{padding:16px!important}.profile-identity{min-width:0;max-width:100%}.profile-identity p{font-size:12px;white-space:normal;overflow-wrap:anywhere}.stats{grid-template-columns:repeat(2,minmax(0,1fr))}.engagement{flex-wrap:wrap;gap:8px}
    .comment-actions{flex-wrap:wrap}.comment-form input,.reply-form input{min-width:0}
    .admin-console{padding:0!important}.admin-setting-field{min-width:0}
}
@media(prefers-reduced-motion:reduce){.global-sidebar{transition:none!important}}

@media(max-width:359px){.profile-actions{grid-template-columns:minmax(0,1fr)}}
