/* Keep form text readable without changing the saved text-size preference. */
:root{--mobile-field-size:1rem}
:root[data-text-size="larger"]{--mobile-field-size:1.15rem}
html,body{overscroll-behavior:auto;-webkit-text-size-adjust:100%;text-size-adjust:100%;touch-action:manipulation;max-width:100%;min-height:100dvh}
:root body :is(input,textarea,select),:root[data-text-size] body :is(input,textarea,select){font-size:max(16px,var(--mobile-field-size))!important;box-sizing:border-box;max-width:100%;min-width:0}
button,a,label,summary{touch-action:manipulation}
:where(main,section,article,form,fieldset,.panel,.field,.form-grid,.auth-layout,.auth-form,.settings-group,.settings-actions,.chat-header,.thread-copy){min-width:0;max-width:100%;box-sizing:border-box}
:where(h1,h2,h3,p,label,button,a,summary,small){overflow-wrap:anywhere}
:where(img,video,canvas,iframe){max-width:100%}
:where(.button,.settings-actions,.form-grid,.profile-actions){min-width:0;max-width:100%}
.button{white-space:normal}
:where(dialog,.drawer){max-width:calc(100% - 1rem);max-height:calc(100dvh - 1rem)}
@media(max-width:48rem){
 .auth-layout,.form-grid,.two-columns{grid-template-columns:minmax(0,1fr)}
 .bottom-nav{width:100%;max-width:100%;box-sizing:border-box;grid-template-columns:repeat(4,minmax(0,1fr))}
 .bottom-nav .nav-item{min-width:0;padding-inline:.25rem;text-align:center;white-space:normal}
 .bottom-nav .nav-item>span{max-width:100%;overflow-wrap:anywhere}
 .chat-header>div{min-width:0}
 .chat-header h1{overflow-wrap:anywhere}
 .messenger-compose textarea{flex:1;min-width:0}
 .support-table-scroll{max-width:100%;overflow-x:auto}
 .hero{min-height:100dvh;height:auto}
}

/* Hide the scroll indicator without disabling touch, wheel or keyboard scrolling. */
html,body,body *{scrollbar-width:none}
html::-webkit-scrollbar,body::-webkit-scrollbar,body *::-webkit-scrollbar{display:none;width:0;height:0}
