/* Desktop chat keeps its existing layout; this panel applies only to small screens. */
#mobile-chat-backdrop{display:none}
@media(max-width:800px){
 .sidebar{display:flex;position:fixed;inset:0 auto auto 0;width:min(380px,100vw);max-width:100vw;height:100vh;height:100dvh;z-index:180;padding:16px 14px calc(76px + env(safe-area-inset-bottom));overflow:hidden;box-shadow:12px 0 40px #0009}
 .sidebar .brand{display:none}
 .sidebar .rain-pool{flex-shrink:0;margin:0 0 10px}
 .sidebar .special-rain{flex-shrink:1;min-height:0;max-height:28dvh;overflow-y:auto}
 .sidebar .community{display:flex;flex:1 1 0;min-height:0;margin-top:0;overflow:hidden}
 .sidebar .community-heading{flex-shrink:0;padding:10px 0}
 .sidebar .chat-messages{flex:1 1 0;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
 .sidebar .chat-status,.sidebar .chat-compose,.sidebar .chat-reply-compose{flex-shrink:0}
 .sidebar .chat-compose input{min-width:0;font-size:16px}
 #chat-toggle,.chat-collapsed #chat-toggle{left:auto;right:16px;top:auto;bottom:calc(16px + env(safe-area-inset-bottom));width:auto;min-width:86px;height:46px;padding:0 16px;border-radius:24px;z-index:181;font-size:14px;font-weight:700;background:#7141b9;border:1px solid #bd91f5;box-shadow:0 4px 20px #0008}
 #mobile-chat-backdrop:not([hidden]){display:block;position:fixed;inset:0;z-index:179;background:#060a12b8;touch-action:none}
 .chat-collapsed .sidebar{visibility:hidden;pointer-events:none}
 body:not(.chat-collapsed){overflow:hidden}
 .page,.chat-collapsed .page{margin-left:0}
}
