*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",Arial,sans-serif;color:#222;background:#ededed}button,input{font:inherit}button{-webkit-tap-highlight-color:transparent;cursor:pointer}.app{width:100%;max-width:760px;height:100vh;height:100dvh;margin:0 auto;background:#f5f5f5;display:flex;flex-direction:column;overflow:hidden}.topbar{height:56px;min-height:56px;background:#fff;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 14px;border-bottom:1px solid #e5e5e5;font-weight:600}.topbar-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.header-btn{height:36px;padding:0 12px;border:0;border-radius:8px;background:#07c160;color:#fff;white-space:nowrap}.messages{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px 12px 18px;overscroll-behavior:contain}.msg{display:flex;width:100%;margin:10px 0}.msg.me{justify-content:flex-end}.bubble{max-width:min(78%,520px);padding:10px 12px;border-radius:9px;background:#fff;line-height:1.5;word-break:break-word;overflow-wrap:anywhere;box-shadow:0 1px 1px rgba(0,0,0,.03)}.me .bubble{background:#95ec69}.bubble img{display:block;max-width:100%;max-height:55vh;width:auto;height:auto;border-radius:7px}.bubble audio{display:block;width:240px;max-width:100%;height:40px}.composer{flex:none;background:#fff;border-top:1px solid #e2e2e2;padding:8px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));display:flex;align-items:center;gap:7px;min-height:60px}.composer-input{flex:1;min-width:0;height:42px;border:1px solid #d8d8d8;border-radius:8px;background:#fff;padding:0 11px;font-size:16px;line-height:42px;outline:none}.composer-input:focus{border-color:#07c160}.tool-btn,.send-btn,.plus{height:42px;min-height:42px;border:0;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;flex:none}.plus{width:42px;padding:0;background:#f1f1f1;color:#333;font-size:25px;font-weight:400;line-height:1}.tool-btn{padding:0 11px;background:#f1f1f1;color:#333;font-size:14px}.send-btn{padding:0 15px;background:#07c160;color:#fff;font-weight:600}.admin{width:100%;height:100vh;height:100dvh;display:flex;background:#fff;overflow:hidden}.admin-sidebar{width:310px;flex:none;border-right:1px solid #ddd;background:#fff;display:flex;flex-direction:column;min-height:0}.side-head{padding:14px 12px 10px;border-bottom:1px solid #eee}.side-title{font-size:18px;font-weight:700;margin-bottom:10px}.invite-btn{width:100%;height:38px;border:0;border-radius:8px;background:#07c160;color:#fff}.users{flex:1;min-height:0;overflow-y:auto}.user{padding:12px;border-bottom:1px solid #eee;cursor:pointer;min-height:68px}.user.active{background:#e9e9e9}.user small{display:block;margin-top:5px;color:#888;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.badge{background:#fa5151;color:#fff;border-radius:12px;padding:2px 7px;float:right;font-size:12px}.admin-panel{flex:1;min-width:0;display:flex;flex-direction:column;background:#f5f5f5}.back-btn{display:none;height:36px;padding:0 10px;border:0;border-radius:8px;background:#f1f1f1;color:#333}.empty-tip{color:#999;text-align:center;margin-top:35vh}.voice-recording{background:#fa5151!important;color:#fff!important}@media(max-width:700px){.app{max-width:none}.topbar{height:52px;min-height:52px;padding:0 12px}.messages{padding:12px 10px 16px}.bubble{max-width:84%}.composer{gap:6px;padding-top:7px}.composer-input{height:40px;line-height:40px}.tool-btn,.send-btn,.plus{height:40px;min-height:40px}.plus{width:40px}.tool-btn{padding:0 9px;font-size:13px}.send-btn{padding:0 13px}.admin-sidebar{width:100%;border-right:0}.admin-panel{display:none;width:100%}.admin.chat-open .admin-sidebar{display:none}.admin.chat-open .admin-panel{display:flex}.admin .back-btn{display:inline-flex;align-items:center;justify-content:center}.admin .topbar{justify-content:flex-start}.admin .topbar-title{flex:1;text-align:center;padding-right:42px}.admin .composer .tool-btn{display:none}}@media(max-width:390px){.composer{gap:5px}.tool-btn{padding:0 7px}.send-btn{padding:0 11px}.bubble{max-width:88%}}@media(max-width:350px){.tool-btn{font-size:0;width:40px;padding:0}.tool-btn:after{content:'🎙';font-size:17px}.send-btn{padding:0 9px}}
