/* Phone overrides live together, after the desktop theme. */
.mobile-backdrop,#mobile-more,.mobile-action-label,.message-more{display:none}
#mobile-header-menu[hidden]{display:none}
@media(max-width:700px){
 body.mobile-session{overflow:hidden;overscroll-behavior:none}
 .app-shell,.app-shell.members-hidden{position:fixed;inset:0 0 auto;height:calc(var(--mobile-height,100dvh) - 58px - env(safe-area-inset-bottom));grid-template-columns:minmax(0,1fr);width:100%}
 .app-shell .chat{grid-column:1;grid-row:1;min-width:0}
 .app-shell .rail{position:fixed;left:0;top:0;bottom:calc(58px + env(safe-area-inset-bottom));width:56px;z-index:42;transform:translateX(-110%);visibility:hidden;transition:transform .15s}
 .app-shell .sidebar{left:56px;top:0;bottom:calc(58px + env(safe-area-inset-bottom));width:min(272px,calc(100vw - 88px));z-index:42;transform:translateX(-135%);visibility:hidden;box-shadow:none}
 .app-shell.show-sidebar .rail,.app-shell.show-sidebar .sidebar{transform:none;visibility:visible}
 .mobile-backdrop{position:fixed;inset:0;background:#0009;z-index:40;border:0}
 .show-sidebar .mobile-backdrop,.members-open .mobile-backdrop{display:block}
 .app-shell.members-open>.members{z-index:42;top:0;bottom:calc(58px + env(safe-area-inset-bottom));width:min(300px,85vw);padding-top:20px}
 .your-bar{top:calc(var(--mobile-height,100dvh) - 58px - env(safe-area-inset-bottom));bottom:auto;height:calc(58px + env(safe-area-inset-bottom));padding-bottom:calc(6px + env(safe-area-inset-bottom));z-index:44}
 .your-bar button{font-size:12px;min-height:44px}
 .your-bar button[aria-expanded=true]{background:var(--raised);color:var(--accent)}
 .mobile-keyboard .app-shell{height:var(--mobile-height,100dvh)}
 .mobile-keyboard .your-bar{display:none}
 .has-client-status .app-shell{top:42px;height:calc(var(--mobile-height,100dvh) - 100px - env(safe-area-inset-bottom))}
 .has-client-status.mobile-keyboard .app-shell{height:calc(var(--mobile-height,100dvh) - 42px)}
 .chat-header{position:relative;z-index:36;flex:0 0 auto;min-height:56px;padding:8px 10px;gap:8px;padding-top:max(8px,env(safe-area-inset-top))}
 #mobile-menu,#mobile-more{display:grid;place-items:center;width:36px;min-width:36px;height:40px;font-size:23px}
 #mobile-menu{font-size:19px}
 .channel-label{flex:1;gap:7px;min-width:0}
 .channel-label #channel-name{max-width:none;font-size:15px;overflow:hidden;text-overflow:ellipsis}
 .channel-label #channel-description{display:none}
 .channel-label #channel-icon{font-size:21px;flex-shrink:0}
 .header-actions{flex-shrink:0;gap:3px;margin-left:0}
 .header-actions #connection{display:none}
 .server-latency{padding:4px;min-width:0;font-size:11px;gap:4px}
 .server-latency .signal-art{width:17px;height:19px}
 #mobile-header-menu{display:flex;flex-direction:column;position:absolute;top:54px;right:10px;z-index:35;min-width:220px;padding:7px;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:0 16px 40px #0008}
 #mobile-header-menu button{display:flex;justify-content:flex-start;align-items:center;gap:12px;width:100%;height:44px;min-height:44px;margin:0;padding:10px 12px;border:0;font-size:13px}
 #mobile-header-menu button:after{content:attr(data-mobile-label)}
 #mobile-header-menu #history-search>span:not(.mobile-action-label){display:none}
 #mobile-header-menu svg{flex:0 0 20px;width:20px;height:20px}
 .community-toolbar{padding:5px 10px;gap:4px;flex-shrink:0;scrollbar-width:none;overscroll-behavior-x:contain}
 .community-toolbar button{height:36px;min-height:36px;flex-shrink:0;padding:0 12px;font-size:12px}
 .messages{padding:12px 8px 76px;overscroll-behavior:contain;scrollbar-width:thin}
 .message{margin:0;padding:8px 34px 8px 46px;min-height:54px}
 .message-avatar{left:2px;top:10px;width:34px;height:34px}
 .message-avatar .avatar{width:34px;height:34px;min-width:34px}
 .message-header{gap:7px;flex-wrap:wrap;line-height:1.5}
 .message-name{font-size:14px;max-width:100%;overflow-wrap:anywhere;text-align:left}
 .message-header time{font-size:10px}
 .message-body{font-size:15px;line-height:1.55}
 .message-more{display:grid;place-items:center;position:absolute;right:0;top:4px;width:32px;height:36px;font-size:24px;color:var(--quiet);border-radius:7px}
 .message-more[aria-expanded=true]{background:var(--raised);color:var(--text)}
 .message .message-actions,.message:hover .message-actions,.message:focus-within .message-actions{display:none}
 .message.actions-open .message-actions{display:flex;position:static;flex-wrap:wrap;gap:2px;width:fit-content;max-width:100%;margin-top:8px;padding:3px;background:var(--panel);border:1px solid var(--line);opacity:1;pointer-events:auto}
 .message-actions button{width:36px;height:38px;min-width:36px}
 .reaction-list:empty{display:none}.date-divider{margin:16px 8px 10px}
 .composer-area{flex-shrink:0;padding:6px 8px 5px;min-width:0}
 #composer{min-width:0;display:grid;grid-template-columns:36px minmax(0,1fr) 36px 36px;gap:2px;padding:4px;min-height:54px;align-items:end}
 #composer #message-input{grid-column:2;grid-row:1;width:100%;min-width:0;min-height:44px;max-height:130px;padding:11px 6px;font-size:16px;line-height:22px}
 #composer #attach{grid-column:1;grid-row:1}#composer #emoji{grid-column:3;grid-row:1}#composer #send{grid-column:4;grid-row:1}
 #composer #record-voice{grid-column:auto;grid-row:auto}
 #composer #record-voice{position:absolute;left:0;bottom:calc(100% + 7px);background:var(--panel);border:1px solid var(--line);border-radius:50%;z-index:3}
 #composer button,#composer #attach,#composer #emoji,#composer #send{width:36px;height:44px;min-width:36px;margin:0;padding:7px}
 #composer #record-voice{width:36px;height:36px;min-width:36px}
 .composer-footer{padding-top:2px;min-height:16px;font-size:10px}.composer-footer #compose-hint{display:none}
 .cat-companion{width:78px;height:71px;left:32px}
 .reply-bar,.pending-files{max-width:100%;overflow-x:auto}.reply-bar{padding:6px;font-size:12px}
 .emoji-popover{max-width:calc(100vw - 16px);max-height:55dvh}
 .welcome-channel{padding:20px 8px}.welcome-channel h2{font-size:24px;overflow-wrap:anywhere}.welcome-channel p{font-size:14px}
 .auth-main{padding:16px}.auth-card{padding:20px;max-width:100%}.auth-card input,dialog input,dialog select,.watch-login input{font-size:16px}
 dialog{width:calc(100vw - 20px);padding:18px;max-height:calc(var(--mobile-height,100dvh) - 24px);overflow:auto}.modal-header h2{font-size:21px}.modal-actions>button{font-size:13px;min-height:44px}
 .settings-dialog{max-width:calc(100vw - 20px)}.settings-layout,.settings-content{min-width:0}.settings-nav{gap:4px}
 .watch-heading{margin-bottom:16px;gap:10px}.yukiflix-stage{padding:16px 12px;overscroll-behavior:contain}
 .watch-account{margin-bottom:0;gap:8px;flex-wrap:wrap}.watch-account>span{flex-basis:100%}
 .watch-party{padding:12px}.watch-party-heading{gap:8px}.watch-party-heading>div{flex-basis:100%;min-width:0}.watch-party-heading strong{overflow-wrap:anywhere}
 .watch-party-heading button,.watch-account button{font-size:12px;min-height:40px;padding:8px 10px}
 .watch-player-options{gap:8px}.watch-player-options label{flex:1;justify-content:space-between}.watch-player-options select{min-height:44px;min-width:0;max-width:70%}.watch-player-options [data-watch-subtitle-note]{flex-basis:100%}.watch-party-heading [data-watch-back]{margin-left:0}
 .watch-screen video{width:100%;max-height:55dvh}.watch-library,.watch-library-wide{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 10px}
 .watch-browser-tools{min-width:0}.watch-browser .watch-search{width:100%;flex-basis:100%;min-width:0}.watch-sort{max-width:150px}
 .watch-breadcrumbs{gap:3px;min-width:0}.watch-breadcrumbs button{max-width:100%;white-space:normal;text-align:left}
 .watch-invitation-popup{left:12px;right:12px;bottom:calc(74px + env(safe-area-inset-bottom));width:auto;max-width:none;max-height:60dvh;overflow:auto}
 .watch-invitation-popup button{min-height:44px}.watch-invitation-popup h3,.watch-invitation-popup p{overflow-wrap:anywhere}
 .voice-controls{gap:8px}.voice-controls button{font-size:13px;min-height:44px}.voice-person{min-width:0}.studio-controls{flex-wrap:wrap}
 #toast{bottom:calc(72px + env(safe-area-inset-bottom));width:max-content;max-width:calc(100vw - 24px);padding:10px 14px}
}
@media(max-width:360px){.watch-library-wide{grid-template-columns:minmax(0,1fr)}.chat-header{gap:4px;padding-left:6px;padding-right:6px}.server-latency .signal-art{display:none}}

@media(max-width:700px){.watch-player-options>label{flex-basis:100%;flex-direction:column;align-items:stretch}.watch-player-options>label select{width:100%;max-width:100%;min-height:44px}.watch-subtitle-timing{width:100%}.watch-timing-controls button,.watch-timing-value input{min-height:44px}.watch-timing-controls{flex-wrap:wrap}.watch-timing-controls .watch-timing-value{flex:0;justify-content:flex-start}}
