:root{--page:#eef3f2;--surface:#fff;--surface-alt:#f5faf8;--ink:#1d292a;--muted:#788588;--line:#e2eae8;--brand:#159d78;--brand-dark:#08795c;--brand-soft:#e2f4ee;--accent:#d87858;--bubble:#fff;--mine:#d9f3e9;--shadow:0 10px 32px #19383112}
*{box-sizing:border-box}
*{transition-timing-function:cubic-bezier(.22,.8,.24,1)}
html,body{height:100%;margin:0}
body{background:var(--page);color:var(--ink);font:15px/1.45 system-ui,"Microsoft YaHei",sans-serif}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #159d7844;outline-offset:2px}
.hidden{display:none!important}
.app{height:100dvh;max-width:1100px;margin:0 auto;display:flex;flex-direction:column;background:var(--surface);overflow:hidden}
.topbar{height:62px;min-height:62px;display:flex;align-items:center;margin:10px 12px 7px;padding:0 14px 0 20px;border:1px solid var(--line);border-radius:25px;background:linear-gradient(105deg,#f0faf6,#fff 58%,#fff6f0);box-shadow:var(--shadow)}
.topbar h1{font-size:19px;margin:0;flex:1}
.top-actions{display:flex;align-items:center;gap:4px}
.icon-button{width:42px;height:42px;border:0;border-radius:50%;display:grid;place-items:center;background:transparent;color:#526365;position:relative}
.icon-button:hover{background:var(--brand-soft);color:var(--brand-dark)}
.icon-button:active,.round-button:active{transform:scale(.9)}
.more-dots,.contact-more{font-size:25px;line-height:1;font-weight:600}
.contact-row{cursor:pointer}
.pin-indicator{font-size:10px;padding:2px 5px;border-radius:7px;background:var(--brand-soft);color:var(--brand-dark);font-weight:500}.pinned-chat{background:var(--surface-alt)}
.chat-list-context-menu{position:fixed;z-index:95;display:none;min-width:130px;padding:5px;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:0 12px 30px #10251f2b}.chat-list-context-menu.open{display:grid;gap:2px}.chat-list-context-menu button{min-height:38px;padding:8px 12px;border:0;border-radius:9px;background:transparent;text-align:left}.chat-list-context-menu button:hover{background:var(--surface-alt)}.chat-list-context-menu .danger{color:#c14f45}
.icon-button svg,.bottom-nav svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.plus-button{color:var(--brand)}
.notice-badge{position:absolute;right:5px;top:5px;min-width:17px;height:17px;padding:0 4px;display:grid;place-items:center;border-radius:9px;background:var(--accent);color:#fff;font-size:10px}
.main-area{position:relative;flex:1;min-height:0}
.view{height:100%;display:none;overflow-y:auto;overscroll-behavior:contain;padding:6px 16px 20px;scrollbar-width:none;-ms-overflow-style:none}
.view::-webkit-scrollbar{display:none;width:0;height:0}
.view.active{display:block;animation:showView .2s ease-out}
@keyframes showView{from{opacity:.45;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes chatEnter{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
@keyframes messageEnter{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
.list{max-width:800px;margin:0 auto}
.row{min-height:72px;display:flex;align-items:center;gap:13px;padding:10px 8px;border-bottom:1px solid var(--line);cursor:pointer;transition:background .18s,transform .18s,opacity .22s}
.row:hover{background:var(--surface-alt)}
.row:active{transform:scale(.992);background:var(--surface-alt)}
.avatar{width:48px;height:48px;flex:none;display:grid;place-items:center;overflow:hidden;border-radius:16px;background:linear-gradient(140deg,#a0dfca,#49b894);color:#fff;font-weight:700;font-size:19px}
.avatar img{width:100%;height:100%;object-fit:cover}
.avatar.online-ring{outline:2px solid #25c879;outline-offset:2px}
.avatar-large{width:76px;height:76px;border-radius:24px;font-size:25px}
.row-main{min-width:0;flex:1}
.row-title{display:flex;align-items:center;gap:7px;font-weight:650}
.row-subtitle{margin-top:4px;color:var(--muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.row-meta{align-self:flex-start;margin:5px 5px 0 auto;color:var(--muted);font-size:12px;white-space:nowrap}
.unread-pill,.count-pill{min-width:18px;padding:1px 6px;border-radius:12px;background:var(--accent);color:#fff;font-size:11px;text-align:center}
.empty-state{padding:55px 18px;text-align:center;color:var(--muted)}
.empty-state strong{display:block;color:var(--ink);font-size:17px}
.empty-state p{margin:7px auto 16px;max-width:320px}
.empty-icon{width:54px;height:54px;margin:0 auto 12px;display:grid;place-items:center;border-radius:18px;background:var(--brand-soft);color:var(--brand);font-size:22px;font-weight:700}
.primary,.secondary{border:0;border-radius:16px;padding:9px 15px;background:var(--brand);color:#fff;font-weight:600;transition:transform .16s,box-shadow .18s,background .18s}
.primary:hover,.secondary:hover{transform:translateY(-1px);box-shadow:0 6px 14px #159d7830}.primary:active,.secondary:active{transform:translateY(1px) scale(.98);box-shadow:none}
.primary:hover{background:var(--brand-dark)}
.secondary{background:var(--brand-soft);color:var(--brand-dark)}
.secondary:hover{background:#d3eee5}
.full{width:100%;min-height:46px;margin-top:10px}
.text-button{display:block;margin:10px auto 0;padding:6px 10px;border:0;background:none;color:var(--brand-dark)}
.guest-button{display:block;margin:4px auto;padding:7px 10px;border:0;background:none;color:var(--muted);font-size:13px}
.auth-screen{position:fixed;inset:0;z-index:100;isolation:isolate;overflow:hidden;background:linear-gradient(145deg,#d4e8e1 0%,#eef3ef 48%,#e7ddd1 100%);display:grid;place-items:center;padding:20px}
.auth-screen:before{content:"";position:absolute;z-index:-1;inset:0;opacity:.55;background:repeating-linear-gradient(135deg,transparent 0 54px,#ffffff35 55px 56px,transparent 57px 112px),linear-gradient(115deg,transparent 0 58%,#426b5d12 58% 59%,transparent 59%)}
.auth-card{width:min(420px,100%);padding:34px 32px 26px;border:1px solid #ffffffb5;border-radius:28px;background:#ffffffed;box-shadow:0 26px 80px #17372e24;text-align:center;backdrop-filter:blur(12px)}
.brand-mark{width:96px;height:96px;margin:0 auto 8px;display:grid;place-items:center;overflow:hidden;border-radius:0;background:transparent;color:#fff;box-shadow:none}.brand-mark img{width:100%;height:100%;object-fit:contain}
.auth-card h1{margin:-6px 0 0;font-size:27px;color:#173b32}
.auth-card form{display:flex;flex-direction:column}.auth-card form #accountLabel{order:1}.auth-card form #nicknameLabel{display:none!important}.auth-card form #authSubmit{order:5}
.auth-subtitle{margin:5px 0 22px;color:#697b75;font-size:14px}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;padding:4px;border-radius:18px;background:var(--surface-alt);margin-bottom:14px}
.auth-tabs button{height:36px;border:0;border-radius:14px;background:transparent;color:var(--muted)}
.auth-tabs button.selected{background:var(--surface);box-shadow:0 2px 9px #18352f12;color:var(--brand-dark);font-weight:650}
.field-label{display:block;margin:10px 0;text-align:left;color:#526365;font-size:13px}
.field-label input,.dialog-input,.dialog-textarea,.dialog-select{display:block;width:100%;margin-top:5px;padding:11px 13px;border:1px solid var(--line);border-radius:14px;background:var(--surface);outline:none}
.form-message{min-height:20px;margin:5px 0 0;color:#be5749;font-size:13px}
.recovery-note{margin:4px 0 0;color:var(--muted);font-size:12px}
.main-area .section-heading{display:flex;align-items:center;justify-content:space-between;margin:13px auto 3px;max-width:800px}
.section-heading h2,.request-section h2,.discover-heading h2{margin:0;font-size:18px}
.muted{color:var(--muted);font-size:13px}
.compact-list .row{min-height:64px}
.blacklist-section{max-width:800px;margin:10px auto 16px;border:1px solid var(--line);border-radius:16px;overflow:hidden}
.blacklist-toggle{width:100%;min-height:48px;padding:0 14px;display:flex;align-items:center;gap:9px;border:0;background:var(--surface-alt);text-align:left}
.blacklist-toggle span:first-child{flex:1;font-weight:600}
#blacklistList .row:last-child{border-bottom:0}
.blacklist-row .avatar{width:40px;height:40px;border-radius:13px}
.request-section{max-width:800px;margin:8px auto 24px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.request-section h2{display:flex;align-items:center;gap:9px;margin-bottom:7px}
.request-card{display:flex;align-items:center;gap:10px;padding:10px 4px;border-top:1px solid var(--line)}
.request-copy{min-width:0;flex:1}
.request-copy strong,.request-copy small{display:block}
.request-copy small{margin-top:4px;color:var(--muted)}
.request-actions{display:flex;gap:6px}
.small-button{padding:7px 10px;border-radius:13px;font-size:12px}
.discover-heading{max-width:800px;margin:8px auto 12px;display:flex;align-items:center;justify-content:space-between}
.discover-heading p{margin:3px 0 0;color:var(--muted);font-size:13px}
.circle-action{width:42px;height:42px;padding:0;border-radius:50%;font-size:24px;font-weight:400}
.moments-feed{max-width:800px;margin:0 auto}
.moment-card{padding:16px 4px;border-bottom:1px solid var(--line)}
.moment-header{display:flex;align-items:center;gap:10px}
.moment-author{flex:1;min-width:0}
.moment-author strong,.moment-author small{display:block}
.moment-author small{color:var(--muted);font-size:12px}
.moment-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:12px 0}
.moment-media{width:min(100%,420px);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;max-width:420px}
.moment-media img,.moment-media video{width:100%;height:auto;aspect-ratio:1;object-fit:cover;border-radius:7px;background:#eef3f2}
.moment-actions{display:flex;gap:8px;margin-top:11px}
.moment-actions button{border:0;border-radius:14px;padding:6px 10px;background:var(--surface-alt);color:#596b6d;font-size:12px}
.moment-comments{margin-top:9px;padding:9px 11px;border-radius:12px;background:var(--surface-alt);font-size:13px}
.moment-comments p{margin:4px 0}
.moment-comment{width:fit-content;max-width:100%;touch-action:pan-y;-webkit-touch-callout:none;user-select:none;cursor:pointer}.moment-comment:active{opacity:.72}.moment-reply-target{color:var(--brand-dark)}
.my-profile-row{max-width:800px;margin:12px auto 14px;display:flex;align-items:center;gap:14px;padding:14px;border:1px solid var(--line);border-radius:20px;background:var(--surface-alt)}
.my-profile-copy{min-width:0;flex:1}.my-profile-copy h2{margin:0;font-size:18px;line-height:1.25}.my-profile-copy p{margin:4px 0 0}.profile-actions{margin-left:auto;display:flex;align-items:center;gap:7px;flex:none}.profile-actions .secondary,.profile-actions .profile-link{height:38px;width:auto;margin:0;padding:8px 12px;border:0;border-radius:18px;background:var(--brand-soft);color:var(--brand-dark);font-size:12px;white-space:nowrap}.profile-actions .profile-link>span:nth-child(2){flex:none}.profile-actions .profile-link small,.profile-actions .profile-link .chevron{display:none}
.my-profile-copy{min-width:0;flex:1}
.my-profile-copy h2{margin:0;font-size:20px}
.my-profile-copy p{margin:4px 0 0}
.signature{color:var(--muted);font-size:13px}
.profile-link{width:min(800px,100%);margin:0 auto 18px;padding:14px 4px;display:flex;align-items:center;gap:12px;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:transparent;text-align:left}
.profile-link>span:nth-child(2){flex:1}
.profile-link strong,.profile-link small{display:block}
.profile-link small{margin-top:4px;color:var(--muted);font-size:12px}
.qr-symbol{width:42px;height:42px;border-radius:14px;background:var(--brand-soft);color:var(--brand-dark);display:grid;place-items:center;font-size:22px}
.chevron{color:var(--muted);font-size:22px}
.settings-heading{max-width:800px;margin:18px auto 6px;color:var(--muted);font-size:13px}
.settings-list{max-width:800px;margin:0 auto;border:1px solid var(--line);border-radius:17px;overflow:hidden}
.setting-row{min-height:54px;padding:10px 15px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}
.setting-row:last-child{border-bottom:0}
.setting-action{width:100%;border-top:0;border-right:0;border-left:0;background:var(--surface);text-align:left;cursor:pointer}
.setting-action-end{display:flex;align-items:center;gap:9px;color:var(--muted)}
.ringtone-list{display:grid;gap:8px}.ringtone-option{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:10px 12px;border:1px solid var(--line);border-radius:14px;background:var(--surface-alt);text-align:left}.ringtone-option span{flex:1;font-weight:600}.ringtone-option small{color:var(--muted)}.ringtone-option b{min-width:42px;color:var(--brand-dark);font-size:12px;text-align:center}.ringtone-option.selected{border-color:var(--brand);background:var(--brand-soft)}
.my-moments-preview{max-width:800px;margin:0 auto 10px;padding:13px 4px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.switch{appearance:none;width:42px;height:24px;border-radius:15px;background:#c7d0d1;position:relative;cursor:pointer;transition:background .18s}
.switch:before{content:"";position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0002;transition:transform .18s}
.switch:checked{background:var(--brand)}
.switch:checked:before{transform:translateX(18px)}
.account-actions{max-width:800px;margin:18px auto;padding:14px 0;display:flex;align-items:center;gap:12px;border-top:1px solid var(--line)}
.account-actions>div{flex:1}
.account-actions strong,.account-actions small{display:block}
.account-actions small{margin-top:4px;color:var(--muted)}
.account-actions.logout-mode{justify-content:stretch}
.account-actions .logout-row{width:100%;min-height:48px;padding:13px 0;border:0;border-radius:0;background:transparent;color:#c44f45;text-align:left;font-weight:650}
.account-actions .logout-row:hover{background:transparent;color:#a83c34}
.chat-screen{position:fixed;inset:0;z-index:50;background:var(--page);display:flex;flex-direction:column;animation:showView .18s ease-out}
.chat-screen{animation:chatEnter .3s cubic-bezier(.2,.85,.25,1) both}
.chat-topbar{height:60px;min-height:60px;margin:6px 8px 0;padding:0 12px;display:flex;align-items:center;gap:8px;background:var(--surface);border:1px solid var(--line);border-radius:22px 22px 0 0}
.chat-heading{min-width:0;flex:1;text-align:center}
.chat-heading strong,.chat-heading small{display:block}
.chat-heading small{font-size:12px;color:var(--muted)}
.chat-heading small.online{color:var(--brand)}
.chat-messages{flex:1;min-height:0;overflow:auto;padding:18px max(18px,calc((100vw - 760px)/2)) 24px;scrollbar-gutter:stable}
.chat-messages .history-page{display:block;margin:8px auto 14px}
.message-row{display:flex;align-items:flex-start;gap:10px;margin:15px 0;touch-action:pan-y;-webkit-touch-callout:none;user-select:none;animation:messageEnter .2s ease-out both}.message-row:nth-child(2){animation-delay:.025s}.message-row:nth-child(3){animation-delay:.05s}.message-row:nth-child(4){animation-delay:.075s}
.message-row.mine{justify-content:flex-end}
.message-row .message-content{display:flex;flex:0 1 auto;flex-direction:column;align-items:flex-start;min-width:0;max-width:calc(100% - 48px)}
.message-bubble{display:block;width:max-content;min-width:52px;max-width:min(calc(15em + 30px),calc(100vw - 86px));padding:11px 15px;border-radius:17px;background:var(--bubble);box-shadow:0 2px 8px #10251f0c;overflow-wrap:break-word;word-break:keep-all;line-height:1.5;white-space:pre-wrap}
.message-row.mine .message-bubble{background:var(--mine)}
.message-row.mine .message-content{align-items:flex-end}
.message-row .avatar{width:34px;height:34px;border-radius:12px;font-size:14px}
.message-row .own-message-avatar{margin-left:0}
.message-media{display:block;max-width:min(260px,60vw);max-height:320px;border-radius:10px}
.voice-message{display:inline-flex;align-items:center;justify-content:flex-start;gap:8px;width:62px;min-width:62px;height:38px;padding:0 12px;border:0;border-radius:9px;background:var(--bubble);color:var(--ink);font-size:14px;cursor:pointer}.message-row.mine .voice-message{flex-direction:row-reverse;background:var(--mine);color:var(--brand-dark)}.voice-icon{width:19px;height:19px;flex:none;overflow:visible;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.message-row.mine .voice-icon{transform:scaleX(-1)}.voice-message.playing .voice-wave{animation:voiceWave .6s ease-in-out infinite alternate}.voice-message.playing .voice-wave-two{animation-delay:.12s}@keyframes voiceWave{from{opacity:.35}to{opacity:1}}.voice-duration{min-width:14px;text-align:center;font-variant-numeric:tabular-nums}.voice-audio{display:none}.message-bubble:has(.voice-message){padding:0;background:transparent;box-shadow:none}
.previewable-image{cursor:zoom-in;touch-action:manipulation;-webkit-touch-callout:default}
.image-viewer{position:fixed;inset:0;z-index:150;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:52px 14px 24px;background:#07100ff5;overscroll-behavior:contain}
.image-viewer-close{position:absolute;top:max(12px,env(safe-area-inset-top));right:14px;width:42px;height:42px;border:0;border-radius:50%;background:#ffffff20;color:#fff;font-size:28px;line-height:1}
.image-viewer-nav{position:absolute;top:50%;z-index:1;width:42px;height:58px;margin-top:-29px;border:0;border-radius:21px;background:#ffffff20;color:#fff;font-size:42px;line-height:1}.image-viewer-prev{left:12px}.image-viewer-next{right:12px}.image-viewer-nav:hover{background:#ffffff38}
.image-viewer-image{display:block;max-width:min(100%,1100px);max-height:calc(100dvh - 130px);object-fit:contain;border-radius:4px;user-select:auto;-webkit-user-select:auto;-webkit-touch-callout:default;touch-action:auto}
.image-viewer-save{min-height:40px;padding:9px 18px;border:1px solid #ffffff55;border-radius:18px;color:#fff;text-decoration:none;font-size:14px}
.image-viewer-save:active{background:#ffffff20}
.message-file{display:flex;align-items:center;gap:8px;color:var(--brand-dark);text-decoration:none}
.message-status{font-size:10px;color:var(--muted);margin:4px 5px 0}
.message-failed{width:17px;height:17px;margin:4px 5px 0;padding:0;border:0;border-radius:50%;background:#d84b45;color:#fff;font-size:12px;font-weight:800;line-height:17px}
.message-failed-wrap{display:flex;align-items:center;justify-content:flex-end;gap:5px;margin:3px 4px 0}
.message-failed-wrap .message-failed{flex:none;margin:0}
.message-failed-label{color:#dc5a50;font-size:11px;line-height:17px}
.message-row.failed .message-bubble{outline:1px solid #d84b4580}
.message-tools{display:none}
.reply-quote{margin-bottom:6px;padding-left:8px;border-left:2px solid var(--brand);color:var(--muted);font-size:12px}
.message-context-menu{position:fixed;z-index:95;display:none;min-width:154px;padding:5px;border:1px solid var(--line);border-radius:15px;background:var(--surface);box-shadow:0 10px 30px #10251f2b;transform-origin:top left;animation:dialogIn .12s ease-out}
.message-context-menu.open{display:grid;gap:2px}
.message-context-menu button{min-height:38px;padding:8px 12px;border:0;border-radius:10px;background:transparent;text-align:left;color:var(--ink);font-size:13px}
.message-context-menu button:hover{background:var(--surface-alt)}
.message-context-menu button.danger{color:#bb5144}
.message-context-menu button:disabled{opacity:.45;cursor:default}
.chat-composer{min-height:72px;margin:0 8px 6px;padding:10px max(10px,calc((100vw - 900px)/2));display:flex;align-items:center;gap:7px;background:var(--surface);border:1px solid var(--line);border-radius:0 0 22px 22px}
.chat-composer input[type=text]{min-width:0;flex:1;height:46px;padding:11px 14px;border:1px solid var(--line);border-radius:23px;background:var(--surface-alt)}
.push-to-talk{min-width:0;flex:1;height:40px;border:1px solid var(--line);border-radius:20px;background:var(--surface-alt);color:var(--ink);font-weight:600;touch-action:none;user-select:none}
.push-to-talk:active{background:var(--brand-soft);color:var(--brand-dark)}
.push-to-talk.canceling{background:#d85b5040;border-color:#d85b50;color:#b8443c}
.voice-record-overlay{position:fixed;inset:0;z-index:145;display:grid;place-items:center;background:#07100f99;backdrop-filter:blur(3px);pointer-events:none;opacity:1;transition:opacity .18s ease}.voice-record-overlay.hidden{display:none;opacity:0}
.voice-record-card{width:min(248px,calc(100vw - 48px));padding:27px 22px 22px;border-radius:25px;background:linear-gradient(145deg,#22b789,#118a6d);color:#fff;text-align:center;box-shadow:0 16px 45px #07100f66,inset 0 1px 0 #ffffff55;animation:voiceRecordIn .2s ease-out}.voice-record-card strong,.voice-record-card small,.voice-record-card b{display:block}.voice-record-card strong{margin-top:14px;font-size:17px}.voice-record-card small{margin-top:6px;color:#d5fff0;font-size:12px}.voice-record-card b{margin-top:12px;font-size:14px;font-variant-numeric:tabular-nums}.voice-record-icon{height:48px;display:flex;align-items:center;justify-content:center;gap:4px}.voice-record-icon span{width:4px;height:18px;border-radius:4px;background:#ecfff8;animation:voiceRecordWave .65s ease-in-out infinite alternate}.voice-record-icon span:nth-child(2){height:31px;animation-delay:-.35s}.voice-record-icon span:nth-child(3){height:45px;animation-delay:-.15s}.voice-record-icon span:nth-child(4){height:27px;animation-delay:-.48s}.voice-record-icon span:nth-child(5){height:17px;animation-delay:-.25s}.voice-record-overlay.canceling .voice-record-card{background:linear-gradient(145deg,#b9655d,#8e3e3a)}.voice-record-overlay.canceling #voiceRecordState{font-size:0}.voice-record-overlay.canceling #voiceRecordState:after{content:'松开取消';font-size:17px}.voice-record-overlay.canceling #voiceRecordHint{color:#ffe1dc}.voice-record-overlay.canceling .voice-record-icon span{animation-play-state:paused;opacity:.45}@keyframes voiceRecordWave{from{transform:scaleY(.55);opacity:.62}to{transform:scaleY(1.08);opacity:1}}@keyframes voiceRecordIn{from{transform:scale(.92);opacity:0}to{transform:scale(1);opacity:1}}
.round-button{width:42px;height:42px;flex:none;border:0;border-radius:50%;background:var(--brand-soft);color:var(--brand-dark);font-size:19px}
.send-button{height:42px;padding:0 15px;border-radius:22px}
.emoji-picker{position:fixed;bottom:72px;left:10px;right:10px;max-width:500px;margin:auto;padding:10px;display:flex;flex-wrap:wrap;gap:4px;border:1px solid var(--line);border-radius:16px;background:var(--surface);box-shadow:var(--shadow)}
.emoji-picker button{width:38px;height:38px;border:0;border-radius:10px;background:transparent;font-size:23px}
.emoji-picker button:hover{background:var(--surface-alt)}
.reply-preview{padding:8px 14px;display:flex;align-items:center;gap:10px;background:var(--surface-alt);color:var(--muted);font-size:12px}
.reply-preview span{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reply-preview button{border:0;background:none;font-size:20px}
.dialog-layer{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:16px;background:#172c2a66}
.dialog-box{width:min(480px,100%);max-height:min(85dvh,760px);overflow:auto;padding:20px;border:1px solid var(--line);border-radius:20px;background:var(--surface);box-shadow:0 22px 70px #13252233;animation:dialogIn .24s cubic-bezier(.2,.85,.25,1) both}
@keyframes dialogIn{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
.dialog-head{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.dialog-head h2{flex:1;margin:0;font-size:18px}
.dialog-close{width:34px;height:34px;border:0;border-radius:50%;background:var(--surface-alt);font-size:21px}
.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.dialog-actions .primary,.dialog-actions .secondary{min-width:86px}
.field-label{display:block;margin:12px 0 0;color:var(--muted);font-size:13px}.field-label .dialog-input{display:block;width:100%;margin-top:6px}
.friend-profile{display:flex;flex-direction:column;gap:16px}
.friend-profile-hero{display:flex;align-items:center;gap:14px;padding:3px 0 15px;border-bottom:1px solid var(--line)}
.friend-profile-hero .avatar{width:64px;height:64px;border-radius:20px}
.friend-profile-identity{min-width:0}
.friend-profile-identity h3{margin:0;font-size:18px}
.friend-account,.friend-signature{margin:3px 0 0;color:var(--muted);font-size:13px;overflow-wrap:anywhere}
.friend-profile-section label{display:block;margin-bottom:7px;color:var(--muted);font-size:13px}
.friend-remark-controls{display:flex;gap:8px}
.friend-remark-controls .dialog-input{min-width:0;flex:1;margin:0}
.friend-remark-controls button{flex:none}
.friend-message-button{width:100%;min-height:44px}
.profile-switch-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px;width:100%}.profile-mute-row{min-width:0;min-height:44px;display:flex;align-items:center;justify-content:space-between;gap:5px;padding:7px 10px;border:1px solid var(--line);border-radius:22px;background:var(--surface-alt);color:var(--ink);font-size:12px;white-space:nowrap}.profile-switch-pair .switch{width:36px;height:21px;flex:none}.profile-switch-pair .switch:before{width:17px;height:17px}.profile-switch-pair .switch:checked:before{transform:translateX(15px)}
.friend-profile-management{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.friend-profile-management button{min-height:40px}
.danger-button{border:1px solid #f1d6d1;border-radius:16px;background:#fff5f3;color:#b34f43;font-weight:600;padding:9px 15px}
.danger-button:hover{background:#fde9e5}
.clear-chat-button{width:100%;min-height:40px;border:1px solid var(--line);border-radius:15px;background:var(--surface-alt);color:var(--muted);font-size:13px}
.clear-chat-button:hover{background:#edf4f1;color:var(--ink)}
.friend-moments{padding-top:14px;border-top:1px solid var(--line)}
.friend-moments>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px}
.friend-moments h3{margin:0;font-size:16px}
.friend-moments>header span{color:var(--muted);font-size:12px}
.friend-moments .moment-card{padding:12px 0}
.friend-moments .moment-card:last-child{border-bottom:0}
.friend-moments-preview{width:100%;display:flex;align-items:center;gap:12px;padding:12px 0;border:0;border-top:1px solid var(--line);background:transparent;text-align:left}
.friend-moments-thumb{width:72px;height:72px;flex:none;display:grid;place-items:center;overflow:hidden;border-radius:12px;background:var(--surface-alt);color:var(--brand-dark);font-size:20px}
.friend-moments-thumb img{width:100%;height:100%;object-fit:cover}
.friend-moments-thumb .moment-preview-text{max-width:64px;overflow:hidden;color:var(--muted);font-size:11px;line-height:1.4}
.friend-moments-preview-copy{min-width:0;flex:1}
.friend-moments-preview-copy strong,.friend-moments-preview-copy small{display:block}
.friend-moments-preview-copy small{margin-top:4px;color:var(--muted);font-size:12px}
.friend-moments-screen{position:fixed;inset:0;z-index:70;display:flex;flex-direction:column;background:var(--page);animation:showView .2s ease-out}
.friend-moments-topbar{height:58px;min-height:58px;display:flex;align-items:center;gap:10px;padding:0 12px;background:var(--surface);border-bottom:1px solid var(--line)}
.friend-moments-topbar .icon-button{width:48px;height:48px;font-size:30px}
.friend-moments-topbar strong{flex:1;text-align:center}
.friend-moments-scroll{flex:1;min-height:0;overflow:auto;scrollbar-width:none;-ms-overflow-style:none}
.friend-moments-scroll::-webkit-scrollbar{display:none;width:0;height:0}
.friend-moments-cover{height:310px;position:relative;overflow:hidden;padding:24px max(20px,calc((100vw - 780px)/2));display:flex;align-items:flex-end;background:linear-gradient(135deg,#214c40,#59786a 55%,#9c9b79)}
.friend-moments-cover-photo,.friend-moments-cover-shade{position:absolute;inset:0;width:100%;height:100%}
.friend-moments-cover-photo{object-fit:cover}
.friend-moments-cover-shade{background:linear-gradient(0deg,#10221ff0 0%,#10221f72 44%,#10221f14 100%)}
.friend-moments-cover-profile{position:relative;z-index:1;display:flex;align-items:flex-end;gap:14px;color:#fff}
.friend-moments-cover-profile .avatar{width:72px;height:72px;border:2px solid #ffffffb0;border-radius:22px;box-shadow:0 5px 18px #0003}
.friend-moments-cover-profile>div:last-child{padding-bottom:5px}
.friend-moments-cover-profile strong,.friend-moments-cover-profile small{display:block}
.friend-moments-cover-profile strong{font-size:18px}
.friend-moments-cover-profile small{margin-top:4px;color:#ffffffc7;font-size:12px}
.moments-cover-edit{position:absolute;z-index:2;top:16px;right:max(16px,calc((100vw - 780px)/2));border:1px solid #ffffff88;border-radius:15px;padding:8px 12px;background:#10221f88;color:#fff;font-size:12px}
.friend-moments-feed{max-width:800px;margin:0 auto;padding:6px 18px 30px}
#mySignature{display:none}
.friend-moments-feed .moment-card{padding:18px 4px}
.friend-moments-feed .moment-author small{font-size:12px}
.global-search-input{position:sticky;top:0;background:var(--surface);z-index:1}
.global-search-group{margin-top:12px}
.global-search-group h3{margin:10px 2px 4px;color:var(--muted);font-size:12px;font-weight:600}
.search-result-row{width:100%;display:flex;align-items:center;gap:11px;padding:9px 5px;border:0;border-bottom:1px solid var(--line);background:transparent;text-align:left}
.search-result-row>span:nth-child(2){min-width:0;flex:1}
.search-result-row strong,.search-result-row small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.search-result-row small{margin-top:3px;color:var(--muted);font-size:12px}
.search-user-profile{text-align:center;padding:8px 0}
.search-user-profile .avatar{margin:0 auto 10px}
.search-user-profile h3{margin:4px}
.search-user-profile p{margin:4px;color:var(--muted);font-size:13px}
.dialog-textarea{min-height:100px;resize:vertical}
.dialog-results{margin-top:10px}
.storage-controls{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.storage-controls .field-label{flex:1 1 100px;min-width:0;margin:0}
.storage-summary{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;padding:10px 12px;border-radius:14px;background:var(--surface-alt);color:var(--muted);font-size:12px}
.storage-list{max-height:360px;overflow:auto;border-top:1px solid var(--line)}
.storage-item{display:flex;align-items:center;gap:9px;padding:10px 2px;border-bottom:1px solid var(--line)}
.storage-item input{width:17px;height:17px;accent-color:var(--brand)}
.storage-item-main{min-width:0;flex:1}
.storage-item-main strong,.storage-item-main small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.storage-item-main small{margin-top:3px;color:var(--muted);font-size:12px}
.storage-empty{padding:24px 8px;text-align:center;color:var(--muted)}
.user-result{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--line)}
.user-result-main{min-width:0;flex:1}
.user-result-main strong,.user-result-main small{display:block}
.user-result-main small{margin-top:3px;color:var(--muted)}
.result-actions{display:flex;gap:5px}
.toast{position:fixed;left:50%;bottom:92px;z-index:120;max-width:calc(100vw - 32px);padding:10px 16px;border-radius:16px;background:#223534;color:#fff;box-shadow:var(--shadow);transform:translate(-50%,12px);opacity:0;pointer-events:none;transition:.2s}
.toast.visible{opacity:1;transform:translate(-50%,0)}
.qr-card{text-align:center}
.qr-code-wrap{position:relative;width:190px;height:190px;margin:0 auto;padding:8px;border:1px solid var(--line);border-radius:12px;background:#fff}.qr-code-wrap>img:first-child{width:100%;height:100%;object-fit:contain}.qr-code-logo{position:absolute;left:50%;top:50%;width:38px;height:38px;transform:translate(-50%,-50%);object-fit:cover;border:4px solid #fff;border-radius:10px;background:#fff}
.qr-card p{color:var(--muted);font-size:13px}
.qr-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:12px}
.qr-actions button{min-width:118px}
.recovery-code{padding:14px;border-radius:14px;background:var(--surface-alt);font:700 22px ui-monospace,monospace;letter-spacing:2px;text-align:center;color:var(--brand-dark)}
.file-preview{display:flex;flex-wrap:wrap;gap:6px;margin:9px 0}
.file-preview img,.file-preview video{width:70px;height:70px;border-radius:8px;object-fit:cover}
.moment-file-preview{position:relative;display:inline-flex;max-width:100%;align-items:center;justify-content:center}.moment-file-preview>button{position:absolute;top:-5px;right:-5px;width:22px;height:22px;padding:0;border:1px solid #fff;border-radius:50%;background:#263633;color:#fff;font-size:17px;line-height:20px}.moment-file-preview>span{max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.dark{--page:#182221;--surface:#202b2a;--surface-alt:#273432;--ink:#e7efec;--muted:#a6b4b0;--line:#354441;--bubble:#293533;--mine:#174d3e;--brand-soft:#1e4439;--shadow:0 10px 32px #0003}
body.dark .topbar{background:linear-gradient(105deg,#233933,#202b2a 58%,#382d28)}
body.dark .auth-screen{background:radial-gradient(ellipse at 12% 14%,#233d34 0,transparent 36%),radial-gradient(ellipse at 92% 88%,#3a2c27 0,transparent 38%),var(--page)}
@media(max-width:600px){.app{width:100%}.topbar{height:56px;min-height:56px;margin:6px 7px;padding:0 10px 0 16px;border-radius:23px}.view{padding-right:12px;padding-left:12px}.bottom-nav{height:68px;min-height:68px;padding:4px 7px env(safe-area-inset-bottom);display:flex;gap:3px;border-top:1px solid var(--line);background:var(--surface)}.bottom-nav button{height:55px;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:0;border-radius:19px;background:transparent;color:#82908f;font-size:11px}.bottom-nav button.active{background:var(--brand-soft);color:var(--brand-dark)}.bottom-nav svg{width:22px;height:22px}.auth-card{padding:26px 22px 20px}.my-profile-row{gap:10px;padding:12px}.avatar-large{width:64px;height:64px;border-radius:18px}.profile-actions{gap:4px}.profile-actions .secondary,.profile-actions .profile-link{height:34px;padding:7px 9px;font-size:11px}.chat-topbar{height:60px;min-height:60px;margin:5px 6px 0;border-radius:20px 20px 0 0}.chat-composer{min-height:72px;margin:0 6px 5px;padding:10px 8px;border-radius:0 0 20px 20px;gap:6px}.chat-composer input[type=text]{height:48px;padding:11px 12px}.round-button{width:40px;height:40px}.send-button{height:40px;padding:0 13px}.dialog-box{padding:17px;border-radius:18px}.friend-profile{gap:14px}.friend-profile-hero .avatar{width:58px;height:58px;border-radius:18px}.friend-remark-controls{align-items:stretch}.friend-remark-controls button{padding:9px 12px}.friend-moments-thumb{width:64px;height:64px}.friend-moments-cover{height:220px;min-height:0}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}
.qr-code-logo{width:56px;height:56px;border:0;background:transparent;object-fit:contain}
.profile-actions{flex-direction:column;align-items:stretch;gap:6px}.profile-actions .secondary,.profile-actions .profile-link{height:34px;min-width:88px;padding:7px 12px;text-align:center}.profile-actions .profile-link .qr-symbol,.profile-actions .profile-link small,.profile-actions .profile-link .chevron{display:none}
.profile-actions .secondary,.profile-actions .profile-link{display:flex;align-items:center;justify-content:center;line-height:1}
.account-actions .logout-row{width:100%;min-height:46px;padding:11px 18px;border:1px solid #d86b6048;border-radius:24px;background:#d86b6018;color:#d85b50;text-align:center;font-weight:700}.account-actions .logout-row:hover{background:#d86b6028;color:#b8443c}
@media(max-width:600px){.bottom-nav{margin:0 6px;border-radius:19px 19px 0 0}.bottom-nav button{position:relative}.nav-badge{position:absolute;z-index:2;left:calc(50% + 5px);top:1px;min-width:16px;height:16px;padding:0 4px;display:grid;place-items:center;border-radius:10px;background:#df594f;color:#fff;font-size:10px;font-style:normal;line-height:16px;box-shadow:0 0 0 2px var(--surface)}}
@media(max-width:600px){.bottom-nav{height:74px;min-height:74px;margin:0 6px 5px;border-radius:18px;padding-top:6px;background:linear-gradient(180deg,var(--surface) 0%,var(--surface-alt) 100%);border:1px solid var(--line);box-shadow:0 -5px 16px #142b2410}.bottom-nav button{height:60px}.chat-topbar{border-radius:20px}.chat-composer{border-radius:20px}}
@media(max-width:600px){.bottom-nav{background:linear-gradient(180deg,#ffffff 0%,#f1f8f5 46%,#dcece6 100%);border-color:#c9ddd6;box-shadow:0 -8px 20px #527f7026,inset 0 1px 0 #ffffffcc,inset 0 -1px 0 #b7d2c8}.bottom-nav button{color:#657a78}.bottom-nav button.active{background:linear-gradient(180deg,#d5f4e8 0%,#a9dfca 100%);box-shadow:inset 0 1px 0 #ffffffb8,0 4px 12px #459b7b26}}
body.dark .bottom-nav{background:linear-gradient(180deg,#2b403d 0%,#20322f 48%,#152320 100%);border-color:#3d5a54;box-shadow:0 -8px 24px #0005,inset 0 1px 0 #ffffff18,inset 0 -1px 0 #091411}body.dark .bottom-nav button{color:#9aafaa}body.dark .bottom-nav button.active{background:linear-gradient(180deg,#286957 0%,#174c3e 100%);box-shadow:inset 0 1px 0 #ffffff20,0 4px 14px #071b1555}
body:not(.dark) .topbar{background:linear-gradient(120deg,#dff4ed 0%,#ffffff 46%,#fff0e7 100%);border-color:#c9dfd7;box-shadow:0 10px 28px #4b81701c,inset 0 1px 0 #ffffff,inset 0 -1px 0 #c5ddd4}
body:not(.dark) .chat-topbar{background:linear-gradient(120deg,#e2f4ee 0%,#ffffff 55%,#fff3eb 100%);border-color:#c9dfd7;box-shadow:0 5px 18px #4b817016,inset 0 1px 0 #ffffff}
body:not(.dark) .chat-composer{background:linear-gradient(180deg,#ffffff 0%,#e6f4ef 100%);border-color:#c9dfd7;box-shadow:0 -6px 18px #4b817018,inset 0 1px 0 #ffffff}
body:not(.dark) .chat-composer input[type=text]{background:linear-gradient(180deg,#f9fffd 0%,#deeee8 100%);border-color:#c4dbd3;box-shadow:inset 0 2px 5px #5a887817,0 1px 0 #ffffff}
body.dark .topbar{background:linear-gradient(120deg,#2b4842 0%,#202f2d 52%,#44332f 100%);border-color:#405c55;box-shadow:0 10px 28px #0006,inset 0 1px 0 #ffffff18,inset 0 -1px 0 #0b1714}
body.dark .chat-topbar{background:linear-gradient(120deg,#2b4842 0%,#202f2d 52%,#3c302d 100%);border-color:#405c55;box-shadow:0 5px 18px #0005,inset 0 1px 0 #ffffff18}
body.dark .chat-composer{background:linear-gradient(180deg,#263b38 0%,#172522 100%);border-color:#405c55;box-shadow:0 -6px 20px #0006,inset 0 1px 0 #ffffff14}
body.dark .chat-composer input[type=text]{background:linear-gradient(180deg,#304540 0%,#233431 100%);border-color:#47635c;box-shadow:inset 0 2px 6px #0004,0 1px 0 #ffffff0a}
.bottom-nav button{transition:background .24s,color .2s,transform .2s,box-shadow .24s}.bottom-nav button:active{transform:scale(.94)}
@media(max-width:600px){.chat-topbar{margin:0;border-radius:0 0 20px 20px}.chat-composer{margin:0 0 8px;border-radius:20px 20px 0 0}}
