:root{--forest:#164d40;--forest-dark:#102c29;--green:#22aa83;--background:#f5f7f6;--text:#1b2a29;--muted:#82908e;--stroke:#e4eae7;--shadow:0 15px 60px rgba(21,56,48,.12);font-family:Inter,"Microsoft YaHei","PingFang SC",system-ui,-apple-system,sans-serif}*{box-sizing:border-box}body{margin:0;color:var(--text);background:var(--background);font-size:14px}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}input,textarea{outline:0;border:1px solid #dce5e0;border-radius:11px;background:#fff;color:var(--text);padding:12px 14px;width:100%;transition:border .15s}input:focus,textarea:focus{border-color:#25a67f;box-shadow:0 0 0 3px #25a67f20}label{display:block;font-weight:600;font-size:13px;margin:18px 0 0}label small{font-weight:400;color:var(--muted)}label input{display:block;margin-top:8px}.hidden{display:none!important}.muted{color:var(--muted)}.primary{background:#198764;color:white;border:1px solid #198764;border-radius:11px;padding:12px 18px;font-weight:700}.primary:hover{background:#116f52}.secondary{background:#fff;color:#176a53;border:1px solid #c7dfd4;border-radius:10px;padding:11px 17px;font-weight:650}.secondary:hover{background:#f1f9f5}.full{width:100%;margin-top:20px}.brand-mark{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:38px;height:38px;border-radius:13px;background:#30c394;color:#fff;font-size:20px;font-weight:800;box-shadow:0 6px 20px #20a77e38}.brand-mark.large{width:60px;height:60px;font-size:30px;border-radius:20px;margin-bottom:45px}.brand{display:flex;gap:12px;align-items:center;font-size:19px;letter-spacing:.05em}.brand small{display:block;font-size:9px;letter-spacing:.16em;margin-top:2px;color:#a6c8bd}.auth-screen{min-height:100vh;display:grid;grid-template-columns:1fr 1fr;align-items:center;background:#fff}.auth-intro{height:100%;min-height:690px;padding:clamp(48px,8vw,130px);background:radial-gradient(circle at 100% 0,#286e59 0,transparent 46%),linear-gradient(135deg,#174a3d,#092d28);color:#fff;display:flex;flex-direction:column;justify-content:center}.eyebrow{color:#8cd9bf;font-weight:700;font-size:11px;letter-spacing:.25em}.auth-intro h1{font-size:clamp(42px,4.3vw,74px);line-height:1.25;letter-spacing:-.05em;margin:22px 0}.auth-intro h1 span{color:#73e0b8}.auth-intro p{line-height:2.1;color:#c0dcd2;font-size:16px}.feature-pills{margin-top:50px;display:flex;flex-wrap:wrap;gap:10px}.feature-pills span{border:1px solid #ffffff33;border-radius:30px;padding:8px 14px;color:#cce9e0;font-size:12px}.auth-card{max-width:430px;width:calc(100% - 64px);margin:auto}.auth-card h2{font-size:29px;margin:28px 0 6px}.auth-card .muted{margin:0}.tab-bar{display:flex;border-bottom:1px solid #e5ebe8;gap:24px}.auth-tab{border:none;background:none;padding:13px 8px;color:#87938e;font-weight:700;border-bottom:3px solid transparent}.auth-tab.active{color:#156f53;border-color:#1fa477}.auth-card form{margin-top:26px}.auth-card .primary{margin-top:27px}.auth-footnote{text-align:center;margin-top:30px;color:#a4aeaa;font-size:12px}.mobile-brand{display:none}.app{width:100%;height:100vh;height:100dvh;display:grid;grid-template-columns:340px minmax(0,1fr);max-width:1640px;margin:auto;box-shadow:0 0 40px #0000000a}.sidebar{display:flex;flex-direction:column;min-height:0;background:#fff;border-right:1px solid var(--stroke)}.sidebar-top{display:flex;align-items:center;justify-content:space-between;padding:27px 23px 19px}.sidebar-top .brand{color:#183c32}.sidebar-top .brand small{color:#7d9990}.icon-button{width:34px;height:34px;border:0;border-radius:10px;font-size:23px;color:#859a90;background:#f3f6f4}.icon-button:hover{background:#e5eee9;color:#3b6b59}.my-account{margin:0 20px 20px;display:flex;align-items:center;gap:12px;padding:13px 12px;background:#f5f8f6;border-radius:15px}.avatar{width:43px;height:43px;display:grid;place-items:center;border-radius:15px;flex-shrink:0;background:#d6f0e4;color:#267e5e;font-weight:800;font-size:17px}.avatar.own{background:#185c48;color:#fff}.my-account-copy{min-width:0;flex:1}.my-account-copy strong,.my-account-copy small{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.my-account-copy small{margin-top:5px;font-size:12px;color:#84958d}.online-dot{width:9px;height:9px;background:#34c98e;border-radius:50%}.sidebar-action{padding:0 20px 24px}.add-button{width:100%;padding:12px;border-radius:11px;background:#165f49;color:#fff;border:0;font-weight:700;display:flex;align-items:center;gap:9px;justify-content:center}.add-button:first-letter{font-size:18px}.side-section-head{display:flex;justify-content:space-between;align-items:center;padding:12px 23px;color:#63776f;font-size:12px;letter-spacing:.02em;font-weight:700}.count{border-radius:6px;background:#edf3ef;padding:3px 7px;color:#699080;margin-left:5px}.text-icon{border:0;background:none;color:#819389;font-size:20px;line-height:1}.friends-list{overflow-y:auto;min-height:60px;flex:1}.friend-item{border:0;background:transparent;width:100%;padding:12px 20px;display:flex;align-items:center;gap:12px;text-align:left;border-left:3px solid transparent}.friend-item:hover{background:#f7faf8}.friend-item.active{background:#e8f5ee;border-left-color:#1a9a6e}.friend-item .friend-copy{min-width:0}.friend-copy strong,.friend-copy small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.friend-copy strong{font-size:14px}.friend-copy small{color:#92a09a;margin-top:6px;font-size:11px}.empty-list{font-size:12px;line-height:1.9;padding:25px;text-align:center;color:#98a59e}.requests-area{border-top:1px solid var(--stroke);max-height:220px;overflow:auto}.request-item{padding:10px 22px;border-bottom:1px solid #f2f4f3;display:flex;gap:8px;align-items:center}.request-item .request-info{flex:1;min-width:0}.request-info strong,.request-info small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.request-info small{color:#84978e;font-size:11px;margin-top:3px}.request-item button{padding:6px 8px;border:0;border-radius:7px;background:#e1f4e9;color:#197b5d;font-size:12px;font-weight:700}.request-item button.reject{background:#f5f5f5;color:#84938d}.sidebar-footer{padding:19px 21px;border-top:1px solid var(--stroke);color:#92a09a;font-size:11px}.status-dot{display:inline-block;background:#50c69b;width:7px;height:7px;border-radius:50%;margin-right:6px}.chat-panel{display:flex;min-width:0;min-height:0;background:#f6f9f7}.welcome{margin:auto;text-align:center;padding:35px}.welcome-icon{height:86px;width:86px;margin:0 auto 23px;border-radius:26px;background:#dcf1e7;color:#28936e;display:grid;place-items:center;font-size:42px}.welcome h2{font-size:27px;letter-spacing:-.02em;margin:10px 0}.welcome p{color:#88958d;margin-bottom:26px}.welcome-tip{color:#9aaba1;font-size:12px;margin-top:47px;line-height:1.8;max-width:360px}.conversation{display:flex;flex-direction:column;min-height:0;width:100%}.chat-header{height:80px;background:#fff;border-bottom:1px solid #eaf0eb;display:flex;gap:13px;align-items:center;padding:0 30px;flex-shrink:0}.chat-heading{flex:1;min-width:0}.chat-heading strong,.chat-heading small{display:block}.chat-heading strong{font-size:16px}.chat-heading small{color:#96a39c;margin-top:5px;font-size:11px}.chat-header-badge{background:#f0f8f3;color:#52927a;padding:7px 11px;border-radius:30px;font-size:11px}.messages{overflow-y:auto;flex:1;min-height:0;padding:23px clamp(14px,4vw,53px);display:flex;flex-direction:column;gap:13px;background:radial-gradient(circle at 50% -30%,#e8f6ee,#f6f9f7 55%)}.day-divider{color:#9bab9e;text-align:center;font-size:11px;margin:13px 0}.message{display:flex;align-items:flex-start;gap:9px;max-width:78%}.message.mine{align-self:flex-end;flex-direction:row-reverse}.message.other{align-self:flex-start}.message-avatar{height:30px;width:30px;border-radius:10px;font-size:12px;background:#dcece2;color:#528c73;display:grid;place-items:center;flex-shrink:0}.message.mine .message-avatar{background:#b8e1cd;color:#308060}.message-body{min-width:0}.bubble{background:#fff;color:#2c3c35;border-radius:14px 14px 14px 4px;box-shadow:0 2px 9px #32544309;padding:11px 14px;white-space:pre-wrap;word-break:break-word;line-height:1.65}.mine .bubble{background:#c9f0dc;border-radius:14px 14px 4px 14px}.msg-time{font-size:10px;color:#9daea4;padding-top:6px}.mine .msg-time{text-align:right}.bubble.image-bubble{padding:5px;line-height:0;overflow:hidden}.image-bubble img{max-width:min(350px,50vw);max-height:310px;border-radius:10px;object-fit:contain;cursor:zoom-in}.bubble.audio-bubble{background:#fff;padding:10px}.mine .audio-bubble{background:#c9f0dc}.audio-bubble audio{max-width:min(270px,50vw);height:42px}.location-card{width:240px;max-width:100%;display:block;white-space:normal;color:#244333;text-decoration:none}.location-map{display:flex;align-items:center;justify-content:center;border-radius:10px;background:linear-gradient(135deg,#d8eee3,#c2e5d8);height:80px;font-size:34px;margin-bottom:11px}.location-card strong{font-size:13px;display:block;line-height:1.5}.location-card small{display:block;color:#729583;margin-top:4px}.no-messages{text-align:center;margin:auto;color:#97ab9c;font-size:13px}.composer{flex-shrink:0;background:#fff;border-top:1px solid #e8efea;padding:12px clamp(16px,3vw,33px) 20px}.tool-row{display:flex;gap:16px;flex-wrap:wrap;margin-bottom:11px}.tool-button{padding:6px 2px;background:none;border:none;color:#677c72;font-size:12px;display:flex;gap:6px;align-items:center}.tool-button span:first-child{color:#2e9d74;font-size:17px}.tool-button:hover{color:#107653}.tool-button.recording,.tool-button.recording span:first-child{color:#e14e56}.recording-note{background:#fff2f1;color:#d54b50;padding:10px 25px;font-size:12px}.send-row{display:flex;gap:13px;align-items:end}.send-row textarea{resize:none;min-height:56px;max-height:115px;flex:1;line-height:1.6;background:#f7faf8;border:1px solid #edf0ed}.send-button{height:48px;padding:0 22px;white-space:nowrap}.send-button span{font-size:13px;margin-left:3px}.toast{position:fixed;top:22px;left:50%;transform:translateX(-50%);background:#1c4639;color:#fff;padding:13px 22px;border-radius:11px;box-shadow:var(--shadow);font-size:13px;z-index:50;max-width:calc(100vw - 25px);text-align:center}.toast.error{background:#a53837}.modal-backdrop{position:fixed;inset:0;background:#10291cb9;display:flex;align-items:center;justify-content:center;z-index:40;padding:20px}.modal{position:relative;background:#fff;border-radius:20px;max-width:450px;width:100%;padding:33px;box-shadow:var(--shadow);max-height:95vh;overflow:auto}.modal h2{font-size:23px;margin:0 0 11px}.modal p{font-size:13px;color:#8a9990;line-height:1.8}.modal-close{position:absolute;right:18px;top:16px;background:#f1f4f2;border:0;border-radius:9px;width:30px;height:30px;color:#80948a;font-size:20px}.coordinate-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.coordinate-row input{min-width:0}.geo-status{font-size:12px;color:#427a5f;padding-top:10px}.modal>.muted{display:block;margin-top:18px;font-size:11px;line-height:1.7}
@media(max-width:800px){.auth-screen{grid-template-columns:1fr}.auth-intro{display:none}.auth-card{padding:25px 0}.mobile-brand{display:flex;margin-bottom:48px}.app{grid-template-columns:260px 1fr}.chat-header{padding:0 17px}.chat-header-badge{display:none}.sidebar-top{padding:20px 12px}.my-account{margin:0 10px 17px}.sidebar-action{padding:0 11px 17px}.friend-item{padding:10px}.sidebar-footer{padding:12px}.tool-row{gap:12px}.message{max-width:90%}}
@media(max-width:560px){.app{grid-template-columns:95px 1fr}.sidebar-top{justify-content:center;padding:15px 0 8px}.sidebar-top .brand>span:not(.brand-mark),.sidebar-top .icon-button,.my-account-copy,.online-dot,.sidebar-action .add-button span,.side-section-head,.friend-copy,.sidebar-footer,.requests-area{display:none!important}.sidebar-top .brand{gap:0}.my-account{justify-content:center;padding:8px;margin:0 8px 16px}.sidebar-action{padding:0 8px 16px}.add-button{font-size:20px}.friend-item{justify-content:center;padding:10px 0;gap:0}.friend-item .avatar{width:40px;height:40px}.chat-header{height:65px;padding:0 10px}.chat-heading strong{font-size:14px}.chat-heading small{font-size:10px}.messages{padding:13px 9px}.message{max-width:97%;gap:5px}.message-avatar{width:22px;height:22px;border-radius:7px}.bubble{padding:9px 10px}.composer{padding:9px 9px 13px}.tool-row{gap:10px;margin-bottom:8px}.tool-button{font-size:10px}.tool-button span:first-child{font-size:13px}.send-row{gap:6px}.send-row textarea{min-height:54px;padding:8px}.send-button{padding:0 9px}.send-button span{display:none}.image-bubble img{max-width:180px}.audio-bubble audio{max-width:175px}.location-card{width:175px}.modal{padding:23px}}
/* 小屏幕仍保留好友申请与退出登录入口 */
@media(max-width:560px){.sidebar-top{flex-direction:column;gap:9px}.sidebar-top .icon-button{display:block!important;width:28px;height:27px;font-size:17px}.requests-area:not(.hidden){display:block!important;max-height:230px}.request-item{flex-direction:column;align-items:stretch;padding:8px 5px;gap:4px}.request-info strong{font-size:11px}.request-info small{font-size:9px;white-space:normal;overflow-wrap:anywhere}.request-item button{width:100%;padding:5px 3px}.request-item .request-info{width:100%}}

/* V1.1: 手机端会话/联系人双页面，避免旧版 95px 窄侧栏遮挡操作 */
.mobile-back{display:none;background:#f0f7f3;border:0;color:#16664f;border-radius:9px;padding:9px 11px;font-size:13px;font-weight:700;white-space:nowrap}
@media(max-width:560px){
  html,body{height:100%;overflow:hidden}
  .app{display:flex;position:relative;width:100%;height:100vh;height:100dvh;min-height:0}
  .sidebar{width:100%;min-width:0;max-width:none;flex:1;display:flex;flex-direction:column;min-height:0}
  .sidebar-top{flex-direction:row;justify-content:space-between;padding:18px 18px 10px}
  .sidebar-top .brand>span:not(.brand-mark){display:inline!important}
  .sidebar-top .icon-button{display:block!important}
  .my-account{margin:0 15px 14px;justify-content:flex-start;padding:12px}
  .my-account-copy{display:block!important}
  .online-dot{display:block!important}
  .sidebar-action{padding:0 16px 15px}
  .sidebar-action .add-button span{display:inline!important}
  .add-button{font-size:14px}
  .side-section-head{display:flex!important;padding:12px 20px}
  .friends-list{flex:1;overflow-y:auto}
  .friend-item{justify-content:flex-start;padding:14px 20px;gap:12px}
  .friend-item .avatar{width:43px;height:43px}
  .friend-copy{display:block!important}
  .sidebar-footer{display:block!important}
  .requests-area:not(.hidden){display:block!important;max-height:34vh;overflow-y:auto}
  .request-item{flex-direction:row;align-items:center;padding:10px 16px;gap:8px}
  .request-info strong{font-size:12px}.request-info small{font-size:11px}
  .request-item button{width:auto;padding:7px 12px}
  .chat-panel{display:none;width:100%;height:100%;min-width:0}
  .app.mobile-in-chat .sidebar{display:none}
  .app.mobile-in-chat .chat-panel{display:flex}
  .mobile-back{display:block}
  .chat-header{height:64px;padding:0 10px;gap:8px}
  .chat-header .avatar{width:33px;height:33px}
  .chat-heading small{font-size:10px}
  .messages{padding:15px 12px}
  .message{max-width:92%}
  .message-avatar{width:27px;height:27px}
  .composer{padding:8px 10px max(10px,env(safe-area-inset-bottom))}
  .tool-row{gap:14px}
  .tool-button{font-size:12px}
  .tool-button span:first-child{font-size:16px}
  .send-button{height:44px;padding:0 14px}
  .image-bubble img{max-width:min(68vw,350px)}
  .audio-bubble audio{max-width:min(61vw,270px)}
  .location-card{width:min(62vw,230px)}
}
