.mobile-only,.mobile-bottom{display:none}
@media(max-width:900px){
 html,body{width:100%;overflow-x:hidden}body{font-size:15px}button{min-height:44px}input,textarea,select{font-size:16px!important;min-width:0}button,input,select,textarea{touch-action:manipulation}.mobile-only{display:inline-flex;align-items:center;justify-content:center}.topbar{height:calc(56px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 12px 0;gap:8px}.topbar .brand{font-size:13px}.topbar .right{gap:0}.topbar .subtitle,.topbar .right>.pill,.topbar #account,.topbar #logout,.topbar #availability-notifications{display:none}.layout{display:block;height:calc(100dvh - 118px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:hidden;min-width:0}.rail,.right-panel,.sidebar{display:none}.main{height:100%;min-width:0;overflow:hidden}.main-head{min-height:64px;padding:8px 12px;gap:8px}.main-head h2{font-size:17px}.main-head p{font-size:11px}.main-head>.pill,.main-head>.icon{display:none}.main-head #chat-people{margin-left:auto}.main-head #archive-dm{font-size:12px;padding:8px}.content{padding:18px 14px;overflow:auto}.messages{padding:12px;overscroll-behavior:contain}.message{gap:9px}.message p{font-size:15px;overflow-wrap:anywhere}.message-author{min-height:32px}.composer-area{padding:6px 10px 8px}.composer textarea{min-height:48px;max-height:130px}.composer{padding:8px}.composer footer{margin-top:4px}.composer footer small,.composer-hint{display:none}.mobile-bottom{display:grid;grid-template-columns:repeat(4,1fr);height:calc(62px + env(safe-area-inset-bottom));padding:4px 4px calc(4px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:#1a1b24;position:fixed;bottom:0;left:0;right:0;z-index:10}.mobile-bottom button{background:transparent;border:0;padding:6px 2px;font-size:12px}.mobile-bottom button:focus{background:#373147}body[data-mobile-panel=chats] .main{display:none}body[data-mobile-panel=chats] .sidebar{display:flex;height:100%;width:100%;border:0;overflow:auto}.sidebar-heading{padding:18px}.nav-group{padding:8px 12px;overflow:auto}.nav-item{min-height:48px;font-size:15px}.sidebar-note,.sidebar-user{display:none}.sidebar .eyebrow{margin-top:18px}.cards{grid-template-columns:1fr}.welcome h1{font-size:25px}.section-title{flex-wrap:wrap}.search{max-width:100%;width:100%}.activity-row{padding:12px 6px}.activity-row p{max-width:100%;overflow-wrap:anywhere}.login{display:block;min-height:100dvh}.login-art{display:none}.login-box{width:100%;max-width:430px;padding:48px 22px}.login-box input{font-size:16px}dialog{width:calc(100vw - 16px);max-width:600px;max-height:calc(100dvh - 24px - env(safe-area-inset-top));padding:16px;margin:auto;border-radius:14px}dialog header{position:sticky;top:-16px;background:#252630;padding:10px 0;z-index:1}dialog header h2{font-size:18px}dialog .scroll{max-height:none;overflow:visible}.tabs{overflow-x:auto;flex-wrap:nowrap;max-width:100%;padding-bottom:5px}.tabs button{flex-shrink:0}.profile-fields{grid-template-columns:105px minmax(0,1fr);gap:10px}.role-choices{grid-template-columns:1fr 1fr}.role-choices label,.check-line{min-height:44px;font-size:14px}.role-choices input,.check-line input{width:22px;height:22px}.admin-member{display:flex;flex-wrap:wrap}.admin-member>div{width:100%}.admin-member fieldset{flex-basis:100%}.admin-member select{width:auto;flex:1}.schedule-columns{grid-template-columns:1fr}.schedule-card{padding:12px}.date-pair{grid-template-columns:1fr}.availability-grid{grid-template-columns:minmax(68px,.85fr) minmax(105px,1.15fr);gap:9px}.availability-heading{display:none}.availability-grid>strong{grid-column:1}.availability-grid input{width:100%;min-height:44px}.calendar-day,.calendar-blank{min-height:76px;padding:4px;gap:3px}.calendar-event{font-size:9px;padding:2px}.weekday{padding:6px 0}.calendar-toolbar{gap:8px}.roster-person{grid-template-columns:1fr}.profile-heading{gap:12px}.profile-heading h2{font-size:20px}.mobile-team-list{display:grid;gap:10px;margin-bottom:20px}.mobile-person{display:block;width:100%;text-align:left;margin-bottom:8px}.mobile-person small{display:block}#toast{bottom:calc(72px + env(safe-area-inset-bottom));width:calc(100vw - 24px);max-height:35vh;overflow:auto;font-size:14px}.score-row{gap:8px;padding:12px}.score-rank{width:32px}.role-rename{flex-wrap:wrap}#mobile-open-profile,#mobile-install,#mobile-signout{display:block;width:100%;margin:10px 0}
}

@media(max-width:900px){#account-security{display:block;width:100%;margin:10px 0}}

/* Long editable product names remain readable on small screens. */
@media(max-width:720px){#modal .profile-tabs{display:flex;flex-wrap:wrap;overflow:visible}#modal .profile-tabs button{flex:1 1 28%;min-width:0;padding:9px 6px}}
@media(max-width:720px){.topbar .brand{min-width:0;letter-spacing:0;font-size:12px;gap:6px}.topbar .brand img{width:28px;height:28px;flex-shrink:0}.topbar #app-refresh{font-size:0;padding:6px;min-width:32px}.topbar #app-refresh::before{content:"↻";font-size:22px}.topbar .right{margin-left:auto}.topbar #mobile-teams{font-size:12px;padding:6px}}

@media(max-width:720px){.calendar-toolbar .tabs{flex-wrap:wrap;overflow:visible}.calendar-toolbar .tabs button{flex:1 1 40%;white-space:normal}}

/* One full-width scroll surface for channels, direct messages and utilities. */
@media(max-width:900px){
 .sidebar-feedback>#report-bug,.sidebar-feedback>#make-suggestion,.sidebar-feedback>#change-log{display:none}
 .mobile-only-settings{display:flex!important}
 body[data-mobile-panel=chats] .sidebar{display:block;position:relative;flex:1 1 auto;min-height:0;height:100%;overflow-y:scroll;overflow-x:hidden;overscroll-behavior-y:contain;touch-action:pan-y pinch-zoom;-webkit-overflow-scrolling:touch;padding:0 max(12px,calc((100vw - 560px)/2)) calc(22px + env(safe-area-inset-bottom));box-sizing:border-box;scrollbar-gutter:stable}
 body[data-mobile-panel=chats] .sidebar>.nav-group{display:block;flex:none;min-height:0;height:auto;overflow:visible;width:100%;padding:6px 0}
 body[data-mobile-panel=chats] .sidebar-heading{padding:20px 4px 12px}
 body[data-mobile-panel=chats] .sidebar-feedback{padding:8px 0;position:static}
 body[data-mobile-panel=chats] .sidebar .nav-item{width:100%;min-height:48px;padding:12px 14px;border-radius:9px}
 body[data-mobile-panel=chats] .sidebar .nav-group,body[data-mobile-panel=chats] .sidebar .sidebar-feedback,body[data-mobile-panel=chats] .sidebar .nav-item{touch-action:pan-y pinch-zoom}
 .sidebar .utilities-divider{margin-top:20px;padding-top:18px}
 .notification-choices .check-line{font-size:14px}.invitation-qr{width:220px}
}

.mobile-photo-attach{display:none}
.test-person{border-top:1px solid var(--line);padding:12px 0}.test-person>summary{cursor:pointer;font-weight:600}.test-person>summary small{color:var(--muted);font-weight:400}.test-person [data-person-results]{padding-top:12px}
@media(max-width:900px){
 .chat-photo-actions>[data-photo-pick],.chat-photo-actions>[data-photo-camera]{display:none}
 .mobile-photo-attach{display:block;position:relative;margin-left:auto}
 .mobile-photo-attach>button{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:10px}
 .composer footer #send{margin-left:0}
 .photo-attachment-menu{position:absolute;bottom:calc(100% + 8px);right:0;min-width:160px;z-index:12;background:var(--raised);border:1px solid var(--line);border-radius:10px;padding:6px;box-shadow:0 6px 18px #0006}
 .photo-attachment-menu button{display:block;width:100%;text-align:left;white-space:nowrap;border:0;background:transparent}
 .schedule-content>.tabs{flex-wrap:wrap;overflow:visible;gap:6px}
 .schedule-content>.tabs button{flex:1 1 auto;white-space:normal}
 [data-schedule-back]{flex-shrink:0;font-size:26px;width:44px}
}

@media(max-width:900px){[data-mobile-back],[data-dialog-back],#chat-back,[data-schedule-back]{flex-shrink:0;font-size:28px;line-height:1;width:44px;min-height:44px;padding:6px}.mobile-back-header{padding-block:4px!important;min-height:48px}dialog>header h2{min-width:0;overflow-wrap:anywhere}}
