/* Phone layout is loaded separately so native and web installations share it. */
.shell{display:flex;flex-direction:column;width:100%;height:var(--app-height,100dvh);overflow:hidden}
.shell>.top,.shell>.bottom,.shell>.legal-footer,.shell>#networkStatus{flex:none}
.shell>#main{flex:1;min-height:0;width:100%}
.shell>.top{min-height:64px}
.shell>.bottom{min-height:66px}
.shell>.legal-footer{padding:8px 16px;text-align:center;font-size:12px}
.nav-icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.bottom button[data-route=more]{display:none}
.header-menu [hidden]{display:none!important}
.header-menu small{display:none}
.header-actions[open]>summary{background:#edf5ef;border-radius:50%}
@media(max-width:900px),(pointer:coarse) and (max-height:600px) and (max-width:1100px){
 html,body{height:100%;width:100%;overflow:hidden}
 body{font-size:16px}
 .shell>.top{min-height:calc(60px + env(safe-area-inset-top,0px));padding:env(safe-area-inset-top,0px) 12px 0;gap:8px}
 .top #brand{gap:8px;min-width:0}
 .top #brand img{width:36px;height:36px}
 .top #brand .brand-wordmark{font-size:22px}
 .top #brand .brand-tagline{font-size:10px}
 .top #profileButton{margin-left:auto;width:40px;height:40px;max-width:40px;padding:0;border-radius:50%;font-size:0;flex:none}
 .top #profileButton::after{content:attr(data-initial);font-size:16px;font-weight:650}
 .header-actions{margin-left:0;flex:none}
 .header-actions summary{width:44px;height:44px}
 .header-menu{top:46px;max-height:calc(var(--app-height,100dvh) - 100px)}
 .legal-footer{display:none}
 .shell>.bottom{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;min-height:calc(74px + env(safe-area-inset-bottom,0px));padding:5px max(12px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left,0px));background:#fff;flex-shrink:0;box-sizing:border-box}
 .bottom button{width:100%;min-width:0;min-height:54px;gap:3px;padding:6px 2px;border-radius:16px}
 .bottom small{font-size:12px;line-height:1.2}
 .bottom button[data-route=groups],.bottom button[data-route=ng]{display:none}
 .bottom button[data-route=more]{display:grid}
 .bottom .selected{background:#e2f3e9}
 .messenger{grid-template-columns:minmax(0,1fr);height:100%;overflow:hidden}
 .inbox{border:0;padding:0 16px;min-width:0}
 .inbox .desktop-tiles,.inbox .market-peek,.mobile-swipes,.inbox-footer{display:none}
 .inbox-head{margin:16px 0 12px;min-height:44px}
 .inbox-head h1{font-size:28px;letter-spacing:-.7px}
 .inbox-head button{min-width:44px;min-height:44px;padding:8px;background:#eff7f1;color:#246947}
 input.search{background:#f3f5f4;border:0;border-radius:16px;min-height:48px;font-size:16px}
 .chat-filters{flex-wrap:nowrap;overflow-x:auto;flex:none;gap:8px;padding:12px 0;scrollbar-width:none}
 .chat-filters button{flex:none;min-height:40px;padding:9px 14px;font-size:14px;white-space:nowrap;border:0;background:#f0f3f1}
 .chat-filters .active{background:#d9efdf;color:#1d6845;font-weight:600}
 .inbox-tools{gap:8px;padding:0 0 10px;overflow-x:auto;flex:none}
 .inbox-tools button{font-size:13px;min-height:40px;padding:8px 12px;white-space:nowrap}
 .inbox-list{overscroll-behavior:contain}
 .chat-row{min-height:82px;padding:12px 0;border-radius:0;border-bottom:1px solid #edf1ef}
 .chat-row .avatar{width:52px;height:52px;font-size:18px}
 .chat-row strong{font-size:16px}
 .chat-row small{font-size:14px}
 .chat-row .chat-meta small{font-size:12px}
 .inbox-list .empty{padding:36px 12px;font-size:15px}
 .chat-space{display:none;min-width:0}
 .messenger.open .inbox{display:none}
 .messenger.open .chat-space{display:flex}
 .shell.thread-open>.top{display:none}
 .shell.thread-open>.bottom{display:grid;flex-shrink:0}
 .chat-head{padding:calc(8px + env(safe-area-inset-top,0px)) 10px 8px;gap:8px;min-height:64px}
 .chat-head .mobile-back{display:block;min-width:44px;min-height:44px;padding:0;font-size:32px}
 .chat-head .avatar{width:40px;height:40px}
 .chat-head strong{font-size:16px}
 .chat-head small{font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .chat-head button{min-height:44px}
 .thread-tools{padding:4px 10px;gap:4px;flex:none}
 .thread-tools input{font-size:16px;min-height:40px}
 .thread-tools button{min-width:44px}
 .messages{padding:12px;gap:10px;overscroll-behavior:contain}
 .bubble{max-width:88%;padding:10px 12px;font-size:16px;line-height:1.45}
 .bubble small{font-size:11px}
 .message-form{gap:6px;padding:8px 8px max(8px,env(safe-area-inset-bottom,0px));flex:none}
 .message-form input{min-height:46px;border-radius:24px;background:#f5f7f5;font-size:16px}
 .message-form button{min-width:44px;min-height:44px;padding:8px;border-radius:50%;font-size:18px}
 .message-form #attachFile{padding:8px;min-width:44px}
 .message-form button[type=submit]{font-size:0;width:46px;flex:none}
 .message-form button[type=submit]::after{content:'➤';font-size:21px}
 .message-media{max-width:100%;min-width:0}
 .message-media audio{max-width:100%}
 .bubble:has(.message-media){min-width:0}
 .page{padding:20px 16px;max-width:100%}
 .page-head h1{font-size:26px}
 .page button,.page a.menu-download{min-height:44px}
 .more-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .more-grid button{font-size:16px;padding:16px;overflow-wrap:anywhere}
 .cards,.profile-grid{grid-template-columns:minmax(0,1fr)}
 .form-row{grid-template-columns:minmax(0,1fr)}
 input,textarea,select{font-size:16px!important}
 dialog{padding:20px;max-height:calc(var(--app-height,100dvh) - 24px);overscroll-behavior:contain}
 #notice{bottom:calc(82px + env(safe-area-inset-bottom,0px));font-size:15px}
 .shell.thread-open~#notice{bottom:90px}
}
@media(pointer:coarse) and (max-height:480px) and (max-width:1100px){
 .shell>.top{min-height:48px}
 .shell>.bottom{min-height:calc(60px + env(safe-area-inset-bottom,0px));padding-top:2px;padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}
 .bottom button{min-height:46px;gap:1px;padding:3px}
 .inbox-head{margin:6px 0}
 .chat-filters{padding:6px 0}
 .inbox-tools{display:none}
}
