:root{font-family:'Microsoft YaHei',Arial,sans-serif;color:#253246;background:#f5f1ea;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer;border:0;border-radius:7px;padding:10px 14px;background:#a66a2e;color:white}button:hover{filter:brightness(.95)}button:disabled{opacity:.5;cursor:not-allowed}.ghost{background:#e8edf4;color:#34445b}.danger{background:#c44e57}.row{display:flex;align-items:center;gap:9px}.wrap{flex-wrap:wrap}.between{justify-content:space-between}.muted{color:#8793a4;font-size:12px}.card{background:#fff;border:1px solid #e6ebf1;border-radius:12px;padding:20px}.field{border:1px solid #d7dfe9;border-radius:7px;padding:10px;background:#fff;color:#253246;min-width:0}h2,h3{margin:0 0 15px}.hidden{display:none!important}.notice{padding:10px;background:#e9f2fc;border-radius:8px;color:#32618e;margin:10px 0}.app{display:flex;height:100vh;min-height:530px;overflow:hidden}.rail{width:90px;background:#ebe5db;display:flex;align-items:center;flex-direction:column;gap:13px;padding:18px 6px;border-right:1px solid #dfe6f0}.brand{font-weight:800;color:#76522f;margin-bottom:14px}.navbtn{width:72px;padding:11px 5px;background:transparent;color:#62594e}.navbtn.active{background:#dfc8a9;color:#694624}.navbtn span{display:block;font-size:12px;margin-top:3px}.navbtn i{font-size:20px;font-style:normal}.grow{flex:1}.side{width:340px;flex-shrink:0;border-right:1px solid #dfe5ed;background:#fbf8f3;display:flex;flex-direction:column}.sideHead{padding:22px 18px 12px}.sideHead h2{margin:0}.search{width:100%;margin:13px 0 4px}.sideList{overflow:auto;flex:1}.entry{padding:14px 17px;border-bottom:1px solid #edf0f5;cursor:pointer;display:flex;gap:12px;align-items:center}.entry:hover,.entry.selected{background:#f1e4d2}.avatar{width:44px;height:44px;display:grid;place-items:center;border-radius:12px;background:#efdec5;color:#855827;font-weight:bold;flex-shrink:0}.entryTitle{font-weight:650}.main{flex:1;display:flex;flex-direction:column;min-width:0;background:#fff}.chatHead{padding:17px 25px;border-bottom:1px solid #e7ecf2;min-height:77px}.messages{flex:1;overflow:auto;background:#f8f5ef;padding:22px}.bubbleRow{display:flex;gap:10px;margin:13px 0;align-items:flex-end}.bubbleRow.mine{justify-content:flex-end}.bubble{background:white;border:1px solid #e8edf3;padding:12px 15px;border-radius:12px;max-width:70%;white-space:pre-wrap;overflow-wrap:anywhere}.mine .bubble{background:#ecd9be;border-color:#e6ceb1}.bubble img{max-width:280px;max-height:280px;cursor:zoom-in;border-radius:8px}.composer{border-top:1px solid #e7ecf2;padding:12px 20px;min-height:170px}.composer textarea{width:100%;height:75px;border:0;resize:none;outline:0;background:transparent}.toolbar{display:flex;gap:10px}.toolbar button{background:transparent;color:#5d7795;padding:6px;font-size:19px}.sendrow{display:flex;justify-content:space-between;align-items:center}.modalBack{position:fixed;inset:0;background:#0007;display:grid;place-items:center;z-index:20}.modal{width:min(530px,92vw);background:white;border-radius:12px;padding:24px;max-height:85vh;overflow:auto}.modal input,.modal textarea,.modal select{width:100%;margin:7px 0}.login{max-width:430px;margin:10vh auto}.login .field{width:100%;margin:7px 0}.login button{width:100%;margin-top:8px}.adminHeader{background:#1e385c;color:white;padding:20px 32px}.adminLayout{max-width:1250px;margin:26px auto;padding:0 20px}.tabs{display:flex;flex-wrap:wrap;gap:8px;margin:15px 0}.tabs button.active{background:#194f96}.tableWrap{overflow:auto}table{border-collapse:collapse;width:100%;white-space:nowrap}th,td{text-align:left;padding:13px;border-bottom:1px solid #e5ebf2}th{background:#f6f8fb}.compact .entry{padding:7px 14px}.compact .avatar{width:34px;height:34px}.dark{color:#e2eaf5;background:#201d1a}.dark .rail{background:#332d28;border-color:#28415f}.dark .brand,.dark .navbtn{color:#c5d8f1}.dark .navbtn.active{background:#634b35;color:white}.dark .side{background:#2a2521;border-color:#2c415a}.dark .main,.dark .card,.dark .modal{background:#292521;color:#e2eaf5;border-color:#33485f}.dark .messages{background:#211d19}.dark .entry{border-color:#31435a}.dark .entry:hover,.dark .entry.selected{background:#2b4360}.dark .bubble{background:#253950;border-color:#38506c}.dark .mine .bubble{background:#705035}.dark .field,.dark textarea{background:#22364e;color:#e2eaf5;border-color:#3a516e}.dark .chatHead,.dark .composer{border-color:#34465c}.dark .ghost{background:#344c67;color:#e2eaf5}.dark .avatar{background:#314e71;color:#e2eaf5}.dark .notice{background:#2c4563;color:#c8dffb}@media(max-width:700px){.rail{width:60px}.navbtn{width:50px}.side{width:190px}.sideHead{padding:12px}.entry{padding:9px}.avatar{width:32px;height:32px}.composer{padding:8px}}

.rail{width:82px}.side{width:300px}.brand{letter-spacing:.5px}.navbtn{width:68px}.login{box-shadow:0 12px 36px #52402b12}.dark .brand,.dark .navbtn{color:#efded0}
/* v0.9: independent warm-white / amber visual language. */
.avatar img{width:100%;height:100%;border-radius:inherit;object-fit:cover}.entryInfo{flex:1;min-width:0}.ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.timeSmall{font-size:10px}.unread{background:#c74842;color:#fff;font-size:11px;border-radius:16px;padding:2px 6px;white-space:nowrap}.pad{padding:18px}.profileCard,.settingsCard{margin:12px;padding:16px}.profileCard .avatar{width:60px;height:60px;margin-bottom:12px}.profileCard button{margin:5px 3px}.settingsCard h3{margin-top:18px}.settingsCard h3:first-child{margin-top:0}.bubbleMeta{gap:12px;margin-top:5px}.messageAction{font-size:11px;padding:1px 5px;opacity:.8}.messageAction:hover{opacity:1}.bubble audio{width:min(250px,100%)}.mentionLabel{font-size:11px;color:#a66a2e;font-weight:bold}.groupBanner{background:#f5e8d5;border-bottom:1px solid #dfc8a9;padding:6px 20px;color:#825021;font-size:12px}.ticker{overflow:hidden;white-space:nowrap}.ticker span{display:inline-block;padding-left:100%;animation:scrollNotice 22s linear infinite}.ticker:hover span{animation-play-state:paused}@keyframes scrollNotice{from{transform:translateX(0)}to{transform:translateX(-100%)}}@media(prefers-reduced-motion:reduce){.ticker span{animation:none;padding-left:0;white-space:normal}}.pick{display:flex;align-items:center;gap:8px;padding:6px}.pick .avatar,.memberRow .avatar{width:32px;height:32px}.pickList{max-height:180px;overflow:auto}.memberRow{display:flex;align-items:center;gap:8px;padding:6px;border-bottom:1px solid #ded7cf}.actionStack{display:grid;gap:8px}.emojiGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(66px,1fr));gap:5px}.emojiGrid button{padding:4px;font-size:19px}.emojiGrid .star{font-size:13px}.forwardChoice{display:block;width:100%;margin:5px 0}.older{display:block;margin:0 auto;font-size:12px}.toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);background:#322d26;color:#fff;max-width:90vw;padding:13px 20px;border-radius:10px;z-index:1000;box-shadow:0 5px 20px #0003}.callPanel{position:fixed;bottom:28px;right:24px;width:310px;padding:20px;background:#29251f;color:white;border:1px solid #b28c5a;border-radius:16px;box-shadow:0 12px 40px #0005;z-index:900}.callPanel button{margin:4px}.callPanel .muted{color:#dfd6ca}.callPanel.small{width:220px;padding:10px}.callPanel.small .callDetails{display:none}.shaking{animation:sxlShake .35s ease-in-out 2}@keyframes sxlShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}.mobileOnly{display:none}.dark .groupBanner{background:#493726;color:#efcf9d;border-color:#705035}.dark .entry:hover,.dark .entry.selected{background:#463a2f}.dark .bubble{background:#39322d;border-color:#4c4136}.dark .field,.dark textarea{background:#39322d;border-color:#4c4136}.dark .avatar{background:#51402f;color:#efd1a9}.dark .ghost{background:#51473e}.dark .muted{color:#b7aa9c}
@media(max-width:759px){.app{height:100dvh;min-height:0;flex-direction:column-reverse}.rail{height:66px;width:100%;flex-direction:row;justify-content:space-around;gap:0;padding:4px;flex-shrink:0;border-top:1px solid #e1d9cc}.rail .brand,.rail .avatar,.rail .grow{display:none}.rail .navbtn{width:auto;flex:1;padding:5px 1px}.rail .navbtn span{font-size:10px}.side{width:100%;flex:1;min-height:0}.main{display:none}.chatOpen .main{display:flex;flex:1;min-height:0}.chatOpen .side,.chatOpen .rail{display:none}.chatHead{padding:9px 12px;min-height:58px}.chatHead button{padding:6px}.messages{padding:10px}.bubble{max-width:83%}.bubble img{max-width:100%}.composer{min-height:130px;padding:8px}.toolbar{gap:5px}.toolbar button{font-size:17px}.composer textarea{height:52px}.mobileOnly{display:block}.login{width:min(92vw,440px);margin:24px auto}.callPanel{right:10px;bottom:12px;width:min(310px,94vw)}.modal{max-width:96vw;max-height:88dvh;overflow:auto}}

/* Group identity and non-destructive crop editor */
.chatIdentity{gap:12px;min-width:0}.chatIdentity #chatAvatar .avatar{width:38px;height:38px;flex-shrink:0}.groupProfile{gap:12px;padding:8px 0}.groupProfile .avatar{width:56px;height:56px;font-size:24px}.avatarActions{margin:6px 0 16px;flex-wrap:wrap}.cropArea{margin:16px auto;width:min(256px,100%);aspect-ratio:1;background:#e3ddd3;border:1px solid #b9a991;border-radius:12px;overflow:hidden}.cropArea canvas{display:block;width:100%;height:100%}.cropControls{display:grid;gap:10px;margin:12px 0}.cropControls label{display:flex;align-items:center;gap:12px}.cropControls input{flex:1;min-width:0}

.maintenanceNotice{padding:10px 14px;background:#fff0d8;color:#754518;border-bottom:1px solid #d1ae78;font-size:13px}.maintenanceNotice:empty{display:none}body.dark .maintenanceNotice{background:#49341d;color:#ffe5c2}

/* v0.19: independent warm ivory + bronze design, with accessible line icons. */
:root{font-family:"Microsoft YaHei","Noto Sans CJK SC",Arial,sans-serif;color:#302c28;background:#f6f3ee}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #a66a2e;outline-offset:2px}.rail{width:78px;background:#eae5dd;gap:9px;padding:17px 7px;border-color:#dfd8cc}.brand{display:flex;flex-direction:column;align-items:center;gap:7px;font-size:12px;margin-bottom:6px;color:#59432f}.brand img{width:38px;height:38px;border-radius:10px}.navbtn{width:62px;border-radius:10px;padding:10px 3px;color:#65594e}.navbtn i{display:flex;align-items:center;justify-content:center}.navbtn.active{background:#d9c5a8;color:#543619}.navbtn span{font-size:11px}.rail #selfAvatar{width:42px;height:42px;border-radius:50%;margin-bottom:6px}.side{width:296px;background:#fdfbf7;border-color:#e3ded5}.sideHead{padding:23px 16px 12px}.sideHead h2{font-size:23px;color:inherit}.field{border-color:#ded9d1}.ghost{background:#f0ebe3;color:#675c4f}.sideHead .ghost{padding:6px}.entry{padding:14px 14px;border-bottom:1px solid #eee9e2;gap:10px}.entry.selected,.entry:hover{background:#f0e4d2}.entry.selected{box-shadow:inset 3px 0 #ad7b47}.entry .avatar{width:43px;height:43px;border-radius:12px}.entryTitle{font-size:14px;max-width:calc(100% - 42px);font-weight:650}.timeSmall{font-size:10px;flex:none;white-space:nowrap}.entryPreview{margin-top:7px;gap:4px}.entryPreview .ellipsis{flex:1;min-width:0}.pinTag{font-size:10px;font-weight:500;color:#8c5b2e}.muted{color:#77736c}.chatHead{border-color:#e9e3da;background:#fffcf8;padding:14px 20px;min-height:74px}.chatHead b{font-size:16px}.chatHead .ghost{display:inline-flex;align-items:center;justify-content:center;padding:8px;min-height:36px}.messages{background:#f5f2ed;padding:22px 28px}.bubbleRow{align-items:flex-start;gap:10px;margin:14px 0}.bubbleRow>.avatar{width:35px;height:35px;border-radius:10px}.bubble{font-size:1rem;line-height:1.6;max-width:76%;background:#fffefc;border-color:#e9e4dd;border-radius:3px 13px 13px 13px;padding:10px 14px;box-shadow:0 1px 2px #55442c08}.mine .bubble{border-radius:13px 3px 13px 13px;background:#ead9be;border-color:#e2cfb1}.senderName{font-weight:600;color:#7a674f;font-size:12px;margin-bottom:3px}.bubbleMeta .muted{font-size:10px;color:#827b71}.messageAction{background:transparent;color:#887c70;opacity:.55}.composer{background:#fffdf9;border-color:#e6e0d7;padding:12px 20px;min-height:156px}.toolbar{gap:12px;margin-bottom:8px}.toolbar button{display:grid;place-items:center;color:#746656;padding:6px;min-width:32px}.toolbar button:hover{background:#f0e7d9}.composer textarea{height:68px;color:inherit;line-height:1.5}.composer textarea::placeholder{color:#8a8276}.sendrow button{min-width:84px}.loginBrand{display:flex;align-items:center;gap:14px}.loginBrand img{width:58px;height:58px;border-radius:14px}.loginBrand h2{margin:0}.groupMembers{width:232px;flex:none;display:flex;flex-direction:column;background:#fffdf9;border-left:1px solid #e3ded5;padding:0 14px}.memberHead{height:74px;border-bottom:1px solid #e9e3da}.memberHead .ghost{padding:5px 10px}.memberHead b{font-size:14px}.memberPreview{display:flex;align-items:center;gap:9px;padding:9px 1px;font-size:13px}.memberPreview .avatar{width:32px;height:32px;border-radius:9px}.memberPreview .ellipsis{flex:1}.memberRole{padding:2px 5px;background:#f0e5d5;color:#825021;border-radius:5px;font-size:10px}.memberFoot{margin-top:auto;padding:12px 0;border-top:1px solid #e6e0d7;font-size:11px}#memberList{overflow:auto;flex:1;padding-top:8px}.compact .entry{padding:7px 12px}.compact .entry .avatar{width:34px;height:34px}.dark .rail{background:#342f2a;border-color:#494038}.dark .side{background:#292623;border-color:#494038}.dark .chatHead,.dark .composer,.dark .groupMembers{background:#2d2824;border-color:#494038}.dark .messages{background:#24211e}.dark .bubble{background:#39332d;border-color:#4b4238}.dark .mine .bubble{background:#62492f;border-color:#735639}.dark .entry{border-color:#403832}.dark .entry.selected,.dark .entry:hover{background:#45382a}.dark .muted,.dark .pinTag,.dark .senderName,.dark .bubbleMeta .muted{color:#c6b7a5}.dark .toolbar button{color:#d5c3ab}.dark .toolbar button:hover{background:#4a3c30}.dark .memberHead,.dark .memberFoot{border-color:#494038}.dark .memberRole{background:#59432e;color:#f0d8b4}.dark .messageAction{color:#d9c8b5}.dark .composer textarea{background:transparent}.dark .composer textarea::placeholder{color:#b5a999}.dark .brand{color:#e7d6c0}.dark .entry .avatar,.dark .avatar{background:#57412c;color:#eed4b4}
@media(max-width:1099px){.groupMembers{display:none!important}.side{width:270px}}@media(max-width:759px){.rail{width:100%;height:65px;gap:0;padding:4px;flex-direction:row}.rail .brand,.rail #selfAvatar{display:none}.navbtn{width:auto}.navbtn span{font-size:10px}.navbtn i svg{width:20px;height:20px}.side{width:100%}.chatHead{padding:9px 12px;min-height:58px}.chatHead .ghost{min-height:30px;padding:5px}.chatHead .mobileOnly{display:inline-flex}.messages{padding:12px}.bubble{max-width:83%}.composer{padding:8px;min-height:120px}.toolbar{gap:6px;margin-bottom:4px}.toolbar button svg{width:20px;height:20px}.composer textarea{height:45px}.bubbleRow>.avatar{width:28px;height:28px}}@media(min-width:760px){.chatHead .mobileOnly{display:none}}

/* v0.36: aggregate unread indicators on the existing navigation rail. */
.navbtn{position:relative}.navbtn .navUnread{position:absolute;top:3px;right:3px;min-width:18px;height:18px;line-height:18px;padding:0 4px;border-radius:10px;background:#cf3d42;color:#fff;font-size:10px;font-weight:700;white-space:nowrap;box-shadow:0 0 0 1px var(--rail-bg,transparent)}.navbtn .navUnread.hidden{display:none!important}@media(max-width:759px){.navbtn .navUnread{top:0;right:0;}}

.searchResult{padding:12px 4px;border-bottom:1px solid #aaa5;overflow-wrap:anywhere;white-space:pre-wrap}.searchResult small{opacity:.7;display:block;margin-bottom:5px}#historyResults{max-height:45vh;overflow:auto}
