/* Mobile and standalone app layout, 20260920 */
.pwa-install{font:inherit;color:inherit;background:transparent;border:1px solid var(--line,#473259);border-radius:10px;padding:10px 12px;cursor:pointer;min-height:44px}
.pwa-help{font-size:12px;line-height:1.6;color:var(--muted,#afa1c3);margin:8px 0;max-width:100%}
.sidebar-backdrop{display:none}
@media(max-width:760px){
 html:has(.workspace),body:has(.workspace){overscroll-behavior:none}
 .workspace{position:fixed;top:var(--viewport-top,0px);left:0;width:100%;height:var(--viewport-height,100dvh)!important;overflow:hidden}
 .workspace main{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
 .workspace header{flex:none;padding:calc(6px + env(safe-area-inset-top)) 12px 6px;min-height:60px;gap:4px 8px}
 .workspace header h1{min-width:0;margin:0;flex:1}
 .workspace .header-actions{flex:none;gap:0}
 .workspace button,.workspace summary{min-height:44px}
 .workspace #menu{flex:none;width:44px;padding:8px}
 .workspace .header-actions .text-button{font-size:12px;padding:6px}
 .workspace .chat-appearance summary{font-size:12px;padding:12px 7px}
 .workspace aside{position:absolute;top:0;bottom:0;width:min(300px,86vw);padding:calc(16px + env(safe-area-inset-top)) 16px calc(12px + env(safe-area-inset-bottom));z-index:30}
 .sidebar-backdrop{position:absolute;inset:0;z-index:20;border:0;border-radius:0;background:#0008;padding:0}
 .menu-open .sidebar-backdrop{display:block}
 .workspace .new-chat{margin:18px 0 12px}.workspace .section-label{margin-top:10px}.workspace .account{margin-top:8px;padding-top:8px}
 .workspace .message-list{padding:20px 14px;overscroll-behavior:contain;scroll-padding-bottom:20px}
 .workspace .turn.user{margin-left:4%;padding:12px 15px}.workspace .turn.assistant{padding:4px 0}.workspace .turn{margin-bottom:24px;min-width:0}
 .workspace .empty{margin:6vh auto 0}.workspace .empty h2{font-size:24px}.workspace .empty p{font-size:13px;line-height:1.7}
 .workspace .composer-wrap{padding:6px 10px calc(8px + env(safe-area-inset-bottom));min-width:0}
 .workspace #composer{padding:10px;border-radius:16px}.workspace #message{font-size:max(16px,1em);min-height:48px;max-height:min(160px,25dvh);resize:none}
 .workspace .composer-actions{gap:6px}.workspace .composer-actions small{font-size:0;flex:1}.workspace .composer-actions small:after{content:'最多 4 张图';font-size:10px}
 .workspace .composer-wrap>.fine{font-size:10px;line-height:1.5;margin-top:5px}
 .workspace .notice:not(:empty){padding:8px 14px;max-height:72px;overflow:auto;flex:none}
 .workspace .image-preview-list{flex-wrap:nowrap;overflow-x:auto;padding:4px}.workspace .image-preview-item{flex:none}.workspace .image-preview-item button{min-height:32px;width:32px;height:32px;top:0;right:0}
 .workspace .chat-appearance-panel{position:fixed;top:calc(var(--viewport-top,0px) + env(safe-area-inset-top) + 60px);right:12px;max-height:calc(var(--viewport-height,100dvh) - 90px);overflow:auto}
 .workspace .account .pwa-install{margin-top:4px}
 .auth{padding:calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom))}.auth-card{padding:70px 22px 24px}
 .auth input,dialog input,.workspace input{font-size:16px}
 dialog{max-height:calc(var(--viewport-height,100dvh) - 32px);overflow:auto;padding:22px}
 body.keyboard-open .composer-wrap>.fine{display:none}
 .shell{padding-left:max(14px,env(safe-area-inset-left));padding-right:max(14px,env(safe-area-inset-right))}
 .shell .topbar{flex-wrap:wrap}.shell .header-actions{flex-direction:row;flex-wrap:wrap;justify-content:flex-start;width:100%;gap:8px}.shell .header-actions .api-link{padding:10px 8px}
 .shell .composer textarea{font-size:16px}.shell .conversation-composer{bottom:env(safe-area-inset-bottom,0px)}
}
@media(max-width:360px){.workspace header h1{flex-basis:calc(100% - 60px)}.workspace .header-actions{margin-left:44px}.workspace .chat-appearance-panel{top:110px}.workspace .composer-wrap>.fine{display:none}}
