/* Familiar messenger layout; the original wallet/account flows remain available. */
:root{--bg:#f3f3f3;--panel:#fff;--line:#dfdfdf;--line2:#ededed;--ink:#252827;--ink2:#737876;--ink3:#a3a7a5;--warm:#159765;--warm2:#d4e9dd;--warm-bg:#eaf5ef;--green:#159765;--shadow:0 18px 65px #1d332521;--radius:9px}
body{background:#dfe4e1;line-height:1.6;font-size:14px}
button:focus-visible,a:focus-visible{outline:2px solid #159765;outline-offset:3px}
button:disabled{cursor:not-allowed;opacity:.5}
.app{max-width:1600px;margin:auto;background:#f3f3f3;box-shadow:0 0 60px #2c3b3310}
.friend-rail{width:68px;flex:0 0 68px;background:#28312e;color:#c6d2cb;display:flex;flex-direction:column;align-items:center;padding:28px 0 18px;gap:20px;z-index:30}
.rail-brand{width:39px;height:39px;border-radius:12px;background:#b9cfb5;color:#284b37;font-size:20px;font-weight:600;margin-bottom:25px}
.rail-item{width:48px;height:45px;position:relative;display:flex;align-items:center;justify-content:center;border-radius:9px;color:#a8b4ad;transition:background .15s}
.rail-item:hover{background:#ffffff0d;color:#fff}.rail-item.on{color:#66d49b}
.rail-item svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.rail-item svg path:last-child:not(:first-child){stroke-width:2.8}
.rail-item>span:last-child:not(.rail-user-avatar){display:none}.rail-me{margin-top:auto}
.rail-user-avatar{width:32px;height:32px;background:#475a4f;color:#f0f5f1;border-radius:9px;display:flex;align-items:center;justify-content:center;font-weight:500}
.side{width:302px;background:#eaecea;border-right:1px solid #dfe2df;position:relative;z-index:20}
.side-head{padding:30px 20px 18px;border-bottom:0}
.friend-list-title{display:flex;align-items:center;gap:10px;justify-content:space-between}.brand{font-size:22px;font-weight:600;letter-spacing:.2px}.brand-sub{font-size:11px;margin-top:3px;color:#8a938c;white-space:nowrap}
.friend-icon-button{display:flex;align-items:center;justify-content:center;width:32px;height:32px;flex:0 0 32px;border-radius:7px;color:#646e67;font-size:23px;line-height:1}
.friend-icon-button:hover{background:#00000008}.friend-list-title .friend-icon-button{background:#dfe3df}
.friend-search{margin-top:22px;display:flex;align-items:center;gap:8px;background:#dfe3df;padding:7px 10px;border-radius:7px;color:#8a928b}
.friend-search svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;flex-shrink:0}
.friend-search input{min-width:0;width:100%;border:0!important;outline:none;background:none!important;padding:0;font-size:12px;height:21px;color:#4e5750;border-radius:0}
.friend-search input::placeholder{color:#8c958e}
.friend-mode-controls{margin-top:17px}.friend-mode-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:#dce3de;border-radius:9px}.friend-mode-tabs button{padding:7px 9px;font-size:12px;border-radius:6px;color:#6d7a71}.friend-mode-tabs button[aria-pressed="true"]{background:#fff;color:#237451;box-shadow:0 1px 4px #203c2510}.friend-mode-description{font-size:10px;color:#829087;line-height:1.65;margin-top:7px}.friend-mode-warning{font-size:10px;line-height:1.65;margin-top:6px;color:#92713f}.friend-mode-controls+.friend-search{margin-top:13px}.friend-editor-mode{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:9px 11px;margin:0 0 18px;background:#f1f6f3;border-radius:7px;font-size:11px;color:#789080}.friend-editor-mode b{font-size:12px;color:#39785a}.friend-online-consent{display:flex;align-items:flex-start;gap:8px;padding:11px;background:#eff5fa;border:1px solid #dce7ef;border-radius:7px;font-size:11px;line-height:1.8;color:#526f87;margin:10px 0 13px}.friend-online-consent input{width:15px;height:15px;margin-top:3px;flex:0 0 auto;accent-color:#4a7ea3}
.side-body{padding:0;display:flex;flex-direction:column}.friend-list-note{font-size:10px;color:#939c95;padding:18px 22px;margin-top:auto}
.friend-row{display:flex;width:100%;align-items:center;gap:12px;padding:18px 20px;text-align:left;border-radius:0;transition:background .15s;position:relative;min-height:84px}
.friend-row:hover{background:#e0e5df}.friend-row.selected{background:#d8e1d7}.friend-row.selected::before{content:"";position:absolute;left:0;top:18px;bottom:18px;width:3px;background:#259867;border-radius:0 3px 3px 0}
.friend-avatar,.friend-header-avatar{width:45px;height:45px;flex:0 0 45px;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-size:19px;font-weight:500;background:var(--friend-color,#5f8c76);box-shadow:inset 0 0 0 1px #00000004}
.friend-avatar-large{width:62px;height:62px;flex-basis:62px;border-radius:17px;font-size:28px;box-shadow:0 6px 20px #233e2610}
.friend-row-copy{min-width:0;flex:1;display:block}.friend-row-top{display:flex;align-items:center;gap:7px;justify-content:space-between}.friend-row-top b{font-weight:500;font-size:14px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.friend-row-badge{font-size:10px;color:#819082;white-space:nowrap}
.friend-row-preview{display:block;color:#8b938c;font-size:11.5px;line-height:1.5;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-top:5px;max-width:195px}
.friend-sidebar-empty{padding:30px 20px;color:#8a958b;font-size:13px;line-height:1.8}.friend-sidebar-empty button{display:block;padding:8px 14px;background:#d8e4d9;color:#397153;border-radius:6px;margin-top:16px}
.side-foot[hidden]{display:none!important}.main{background:#f5f6f5;min-width:0;position:relative}
.main-head{height:91px;min-height:91px;padding:18px 34px;border-bottom:1px solid #e5e8e4;background:#f7f8f7;gap:20px;flex-shrink:0}.head-l{display:flex;align-items:center;gap:12px;min-width:0}.head-r{display:flex;gap:10px;align-items:center;flex-shrink:0}
.friend-header-avatar{width:38px;height:38px;flex-basis:38px;border-radius:10px;font-size:17px}.friend-header-copy{display:flex;flex-direction:column;min-width:0;gap:3px}#convTitle{font-size:16px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#friendHeaderStatus{font-size:10.5px;color:#959d96;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.main-head .mode-btn{font-size:11.5px;padding:5px 10px;background:transparent;border-color:#e0e5df;color:#889189;border-radius:6px}.main-head .mode-btn:hover{color:#35805a;border-color:#bfd2c0}
#friendInfoBtn{font-size:14px;letter-spacing:1px;color:#758077}
.chat{padding:30px 36px 20px;background:#f3f5f2}.chat-inner{max-width:1000px;margin:0 auto}.empty{max-width:560px;margin:10vh auto 0;padding:30px;text-align:center;color:#929b92}.empty h3{font-weight:500;font-size:20px;color:#657569;margin:20px 0 10px}.empty p{font-size:13px;color:#97a098;line-height:1.8}.empty .friend-avatar{margin:0 auto}.empty .btn{margin-top:22px}.friend-welcome-tag{font-size:11px;color:#9aa69c;margin-top:25px}
.msg{gap:13px;align-items:flex-start}.msg .avatar{width:36px;height:36px;flex-basis:36px;border-radius:9px;font-size:15px}.msg.ai .friend-message-avatar{background:var(--friend-color,#5f8c76);color:#fff}.msg.user .avatar{background:#c5d8ba;color:#3e6547}
.msg.ai>div:last-child{max-width:78%;min-width:0}.bubble{font-size:14px;line-height:1.9;padding:11px 15px;border-radius:7px;max-width:78%}.msg.ai .bubble{max-width:100%;background:#fff;border:1px solid #e5e9e2;border-top-left-radius:7px;box-shadow:0 2px 4px #22352402}.msg.user .bubble{background:#b5e6a0;color:#263d28;border:1px solid #acd997;border-top-right-radius:7px;position:relative}.msg.user .bubble::after{content:"";position:absolute;right:-5px;top:13px;width:8px;height:8px;background:#b5e6a0;transform:rotate(45deg);border-right:1px solid #acd997;border-top:1px solid #acd997}.msg.ai .bubble{position:relative}.msg.ai .bubble::before{content:"";position:absolute;left:-5px;top:13px;width:8px;height:8px;background:#fff;transform:rotate(45deg);border-left:1px solid #e5e9e2;border-bottom:1px solid #e5e9e2}
.msg-block{margin-bottom:26px}.msg-time{font-size:9px;color:#b0b6af;padding-left:49px;margin-top:6px}.msg-time.u{padding-right:49px}.src{font-size:10px;color:#a0aaa0!important;margin-top:7px}.fb{gap:7px;margin-top:7px}.fb button{font-size:10px;padding:3px 7px;border:0;border-radius:4px;color:#97a095;background:transparent}.fb button:hover{background:#e6ece2;border:0;color:#5e795f}
.composer{padding:0 32px 22px;background:#fff;border-top:1px solid #e1e5df;flex-shrink:0}.composer-inner{max-width:1000px}.friend-composer-tools{display:flex;align-items:center;gap:18px;min-height:44px;border-bottom:1px solid #f3f5f2}.friend-composer-tools button{font-size:11px;color:#8b968a;padding:7px 0}.friend-composer-tools button:hover{color:#36815a}.friend-composer-tools span{margin-left:auto;font-size:10px;color:#b3bcb1}
.mode-bar{padding:6px 0 0;margin:0;gap:8px;min-height:30px}.mode-bar>span:first-child{font-size:10.5px!important;color:#99a392!important}.mode-bar .mode-btn{border:0;padding:2px 4px;font-size:10px;color:#68a781;background:transparent}.mode-hint{font-size:10px}
.input-row{align-items:flex-end;gap:9px;min-height:87px}.input-row textarea{border:0;border-radius:0;box-shadow:none;background:transparent;font-size:14px;min-height:82px;padding:12px 0 10px;max-height:170px;line-height:1.8}.input-row textarea:focus{border:0;background:transparent}.input-row textarea::placeholder{color:#c0c7bd}.input-row textarea:disabled{background:none;color:#a0a69d}.send{width:62px;height:32px;border-radius:5px;background:#159765;font-size:12px;margin-bottom:5px}.send:hover{background:#0e8053}.send:disabled{background:#d9e5da;color:#9cad9c;opacity:1}.input-row .voice-trigger{border:0;background:none;color:#879785;width:34px;height:34px;margin-bottom:4px;border-radius:5px}.input-row .voice-trigger:hover{background:#eef4eb}.input-row .voice-speed-trigger{border:0;background:none;color:#97a591;font-size:10px;min-width:45px;min-height:32px;margin-bottom:5px;padding:4px}.friend-new-topic{margin-right:10px}
.btn{border-radius:6px}.btn-primary{background:#159765;color:#fff;border:1px solid #159765}.btn-primary:hover{background:#0e8053}.btn-primary:disabled{background:#e1e9e0;border-color:#e1e9e0;color:#9aa596;opacity:1}.btn-ghost{border-color:#dde4da;background:#fff;color:#687866}.btn-ghost:hover{background:#f2f7ef;border-color:#bfd0b9}
.modal{border-radius:14px;box-shadow:0 28px 90px #1937242b}.mask{background:#18231d52;backdrop-filter:blur(3px)}.modal-head{font-size:18px}.modal-sub,.hint{color:#8c978a}.modal input:focus,.modal textarea:focus{border-color:#78ac88;box-shadow:0 0 0 3px #1597650a}.friend-modal-title{display:flex;align-items:center;justify-content:space-between;padding:24px 26px 10px}.friend-modal-title button{font-size:25px;color:#a0aaa0;line-height:1;padding:4px}.friend-editor-body{padding:10px 26px 25px!important}.friend-editor-profile{display:flex;gap:16px;align-items:center;padding:7px 0 24px}.friend-editor-profile b{font-size:15px;font-weight:500}.friend-editor-profile p{font-size:11px;color:#94a18f;margin:6px 0 0;line-height:1.7}.friend-editor-body .field{margin-bottom:13px}.friend-editor-body .field label{font-size:12px;color:#677561}.friend-editor-body .field label span{font-size:10px;font-weight:normal;color:#a0aa9b;margin-left:5px}.friend-editor-body input,.friend-editor-body textarea{border:1px solid #e1e7de;border-radius:6px;width:100%;padding:9px 11px;font-size:13px;background:#fff;min-height:39px}.friend-editor-body textarea{height:70px;resize:vertical}.friend-color-row{display:flex;gap:10px;margin:0 0 18px}.friend-color{width:21px;height:21px;border-radius:50%;background:var(--swatch);position:relative}.friend-color.selected::after{content:"";position:absolute;inset:-4px;border:1px solid var(--swatch);border-radius:50%}.friend-save-profile{width:100%;padding:9px}
.friend-voice-section{border-top:1px solid #e9ede6;margin-top:24px;padding-top:21px}.friend-section-head{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px}.friend-section-head b{font-weight:500}.friend-pill{padding:2px 7px;font-size:10px;color:#86a27d;background:#eff6ec;border-radius:20px}.friend-helper{font-size:11px;color:#97a18f;line-height:1.8;margin:10px 0}.friend-recorder-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:15px 0 10px}.friend-recorder-actions .btn{font-size:12px;border:1px solid #dae4d4;color:#6a8261;background:#f8fbf5;padding:7px 12px}.friend-recorder-actions>span{font-size:11px;color:#9aa98e}.friend-file-pick{display:block;font-size:11px;color:#829175;padding:11px 12px;border:1px dashed #dce5d6;border-radius:7px;cursor:pointer}.friend-file-pick input{display:block;padding:5px 0 0;border:0;font-size:11px;min-height:0;color:#a1ab99;background:none}.friend-editor-body audio{display:block;width:100%;height:40px;margin:15px 0 6px}.friend-selected-audio{font-size:11px;color:#8a967e;word-break:break-word;margin-bottom:10px}.friend-audio-actions{display:flex;gap:8px;flex-wrap:wrap}.friend-audio-actions .btn{font-size:12px;padding:7px 11px}.friend-activation{background:#f4f8f0;border:1px solid #e3eddc;border-radius:9px;padding:17px;margin-top:21px}.friend-price{color:#4e7e4d;font-size:17px;font-weight:600}.friend-price small{font-size:10px;color:#92a186;font-weight:normal}.friend-activation>p{font-size:11px;color:#8b9d7e;line-height:1.8;margin-top:9px}.friend-activation .btn{margin-top:12px;padding:9px}.friend-active-note{font-size:11px;color:#67a067;margin-top:10px}.friend-editor-message{font-size:12px;color:#5f825a;line-height:1.8;margin-top:14px;white-space:pre-wrap}.friend-access-card{margin:25px auto 0;padding:24px;background:#fff;border:1px solid #e2e8dc;border-radius:11px;max-width:350px}.friend-access-card>b{font-size:13px;font-weight:500;color:#84937a}.friend-access-card p{font-size:11px}.friend-access-card .btn{font-size:12px;padding:8px 18px;margin-top:15px}.friend-account .user-chip{border:1px solid #e9eee5;margin-bottom:10px;padding:13px}.friend-account .btn{margin-top:9px!important;padding:9px}.friend-account .lv-tag{border-color:#dce8d5;color:#80a46b;background:#f3f8ed}.friend-account .avatar{border-radius:8px;background:#a9c599;color:#fff}
.friend-history-mask{position:fixed;inset:0;background:#1c2c2250;z-index:90;display:flex;justify-content:flex-end}.friend-history-mask[hidden]{display:none}.friend-history-panel{width:330px;background:#f8faf6;padding:24px;box-shadow:-10px 0 45px #1937241a;display:flex;flex-direction:column;gap:18px;overflow-y:auto}.friend-history-head{display:flex;justify-content:space-between;align-items:center}.friend-history-head b{font-size:17px;font-weight:600}.friend-history-head p{font-size:11px;color:#8c9b82;margin-top:4px}.friend-history-panel #convList{flex:1}.friend-history-panel .conv{border-radius:6px;font-size:12px;background:#fff;margin-bottom:5px;padding:12px}.friend-history-panel .conv.on{background:#e4efdd}.friend-history-panel .dots{opacity:1}.friend-history-panel>.btn{padding:10px}
.friend-editor-body [hidden]{display:none!important}
@media(min-width:1601px){.app{height:calc(100dvh - 48px);margin:24px auto;border-radius:12px;overflow:hidden}}
@media(max-width:1100px){.side{width:266px}.friend-row{padding:17px 16px;gap:10px}.side-head{padding:26px 16px 17px}.main-head{padding-left:24px;padding-right:22px}.main-head .mode-btn{font-size:10px;padding:4px 7px}.chat{padding:24px}.composer{padding-left:24px;padding-right:24px}.friend-row-preview{max-width:170px}}
@media(max-width:820px){
  .app{display:block;height:100dvh;max-width:none;border-radius:0;margin:0}.friend-rail{position:fixed;left:0;bottom:0;right:0;height:68px;padding:5px 40px calc(5px + env(safe-area-inset-bottom));width:auto;display:flex;flex-direction:row;justify-content:space-around;gap:0;background:#f7f9f5;border-top:1px solid #e3e8df;z-index:45}.rail-brand,.rail-create{display:none}.rail-item{height:48px;min-width:90px;flex-direction:column;gap:1px;font-size:10px;color:#9ba694}.rail-item>span:last-child:not(.rail-user-avatar){display:block;font-size:10px}.rail-item.on{color:#328d58}.rail-item svg{width:22px;height:22px}.rail-me{margin:0}.rail-user-avatar{width:23px;height:23px;border-radius:6px;background:#dce6d4;color:#6c875d;font-size:11px}.rail-item:hover{background:#eaf0e4;color:#5d7d4f}
  .side{position:absolute;inset:0 0 68px;width:100%;transform:none!important;display:flex;z-index:20;border:0;background:#f5f7f2}.side-head{padding:calc(20px + env(safe-area-inset-top)) 22px 16px;background:#f3f6ef}.brand{font-size:24px}.brand-sub{font-size:11px}.friend-search{margin-top:17px;background:#e7ece1}.friend-search input{height:24px}.friend-row{padding:18px 22px;min-height:85px;border-bottom:1px solid #e9eee4;background:#f8faf5}.friend-row.selected{background:#eaf0e3}.friend-row.selected::before{display:none}.friend-row-preview{max-width:calc(100vw - 110px)}.friend-row-top b{font-size:15px}.friend-row-badge{font-size:11px}.friend-list-note{padding-bottom:18px}
  .main{display:none;width:100%;height:100dvh}.friend-chat-open .main{display:flex}.friend-chat-open .side,.friend-chat-open .friend-rail{display:none}.friend-chat-open .menu-btn{display:flex;align-items:center;justify-content:center;min-width:28px;width:28px;margin:0;font-size:32px;line-height:1;color:#5b7056}
  .main-head{height:calc(66px + env(safe-area-inset-top));min-height:calc(66px + env(safe-area-inset-top));padding:calc(10px + env(safe-area-inset-top)) 15px 10px 9px;gap:10px}.head-l{gap:8px}.friend-header-avatar{width:32px;height:32px;flex-basis:32px;font-size:15px;border-radius:8px}.main-head #convTitle{font-size:15px}#friendHeaderStatus{font-size:9px}.head-r{margin-left:auto;gap:0}.main-head #walletBtn,.main-head #lvBtn{display:none!important}.chat{padding:22px 16px 12px}.msg{gap:10px}.msg .avatar{width:32px;height:32px;flex-basis:32px;border-radius:8px;font-size:14px}.msg.ai>div:last-child{max-width:calc(100% - 42px)}.bubble{max-width:calc(100% - 42px);font-size:14px;padding:10px 13px;line-height:1.85}.msg.ai .bubble{max-width:100%}.msg-time{padding-left:42px}.msg-time.u{padding-right:42px}.fb button{font-size:9px;padding:3px 4px}.src{font-size:9px}.empty{margin-top:8vh;padding:25px 16px}.empty h3{font-size:18px}.empty p{font-size:12px}
  .composer{padding:0 15px calc(12px + env(safe-area-inset-bottom));background:#fafcf8}.friend-composer-tools{min-height:36px;gap:15px}.friend-composer-tools button{font-size:10px}.friend-composer-tools span{font-size:9px}.input-row{gap:5px;min-height:58px;align-items:flex-end}.input-row textarea{min-height:58px;font-size:14px;padding:10px 0 6px}.send{width:49px;height:31px;font-size:11px;margin-bottom:3px}.input-row .voice-speed-trigger{min-width:37px;padding:2px;font-size:9px;margin-bottom:3px}.input-row .voice-trigger{width:30px;height:31px;margin-bottom:3px}.mode-bar{min-height:25px;padding-top:3px}.mode-hint{font-size:9px;line-height:1.5}.friend-history-panel{width:88vw;max-width:360px}.mask{padding:12px}.modal-wide{max-width:540px}.friend-modal-title{padding:20px 20px 8px}.friend-editor-body{padding:8px 20px 20px!important}.friend-editor-profile{gap:13px;padding-bottom:20px}.friend-editor-profile p{font-size:10px}.friend-avatar-large{width:55px;height:55px;flex-basis:55px;font-size:25px;border-radius:15px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation-duration:0s!important;transition:none!important}}
