:root{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#34465d;background:#f6f8ff;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;overscroll-behavior:none}body{min-height:100dvh;background:radial-gradient(ellipse at 12% 9%,#ffe5f0 0,transparent 36%),radial-gradient(ellipse at 89% 82%,#d9f8ef 0,transparent 39%),linear-gradient(125deg,#f8f5ff,#f1f8ff 45%,#fbf9ff)}button,textarea,input{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent}button:disabled{cursor:default;opacity:.55}button:focus-visible,textarea:focus-visible,input:focus-visible{outline:3px solid #9cc9ff;outline-offset:2px}
.shell{width:min(100%,850px);height:100dvh;min-height:470px;margin:auto;display:flex;flex-direction:column;background:rgba(255,255,255,.78);box-shadow:0 10px 60px #b9c8df30;overflow:hidden}
.topbar{height:74px;padding:13px 25px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid #eaf0f7;background:rgba(255,255,255,.82);flex:none}.brand{display:flex;align-items:center;gap:10px;min-width:0}.brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:16px;color:#fff;background:linear-gradient(145deg,#a6cbfa,#d1bff8);font-size:23px;font-weight:800;box-shadow:0 5px 10px #a7c4f751}.brand-name{font-size:22px;font-weight:850;letter-spacing:1px;white-space:nowrap}.brand-subtitle{font-size:11px;color:#a6b3c5;margin-left:2px;white-space:nowrap}.status{display:flex;align-items:center;gap:5px;border:1px solid #e5edf6;background:#f7faff;border-radius:100px;padding:8px 12px;font-size:11px;font-weight:700;color:#7a8ea5;white-space:nowrap}.status svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.status-dot{width:7px;height:7px;border-radius:50%;background:#ffc779;box-shadow:0 0 0 3px #fff0d9}.status.ok .status-dot{background:#76d6a7;box-shadow:0 0 0 3px #dff7ec}.status.error .status-dot{background:#f5a7a7;box-shadow:0 0 0 3px #fce7e7}
.panel{display:none;flex:1;min-height:0;overflow:hidden}.panel.active{display:flex;flex-direction:column}.chat-title{padding:24px 28px 17px;display:flex;align-items:center;justify-content:space-between;gap:10px}.chat-title h1,.profile-title h1{font-size:22px;margin:0 0 6px;font-weight:850;letter-spacing:.3px}.chat-title p,.profile-title p{font-size:12px;margin:0;color:#a0adc0;line-height:1.6}.sparkle{color:#ddbcf7;font-size:17px}.tiny-pill{padding:7px 11px;border-radius:40px;background:#eff7fd;color:#87afce;font-size:10px;font-weight:800;white-space:nowrap}
.messages-scroll{overflow-y:auto;flex:1;min-height:0;overscroll-behavior:contain;padding:8px 18px 14px 28px;scroll-behavior:smooth;scrollbar-width:thin;scrollbar-color:#e6ebf1 transparent}.messages{display:flex;flex-direction:column;gap:17px;padding:8px 8px 13px 0}.empty-state{margin:10vh auto;text-align:center;max-width:300px;color:#a3afc0}.empty-illustration{font-size:58px;filter:drop-shadow(0 7px 13px #bed8ec);margin-bottom:15px}.empty-state h2{color:#6f89a5;margin:0 0 7px;font-size:18px}.empty-state p{font-size:12px;line-height:1.9;margin:0}.message-row{display:flex;gap:9px;align-items:flex-start;max-width:100%}.message-row.mine{flex-direction:row-reverse}.avatar{width:37px;height:37px;border-radius:15px;flex:none;display:grid;place-items:center;font-weight:850;font-size:16px;color:var(--avatar-fg);background:var(--avatar-bg);border:1px solid #ffffffad;box-shadow:0 3px 7px #b4c3d327}.message-main{min-width:0;max-width:min(78%,500px)}.message-row.mine .message-main{text-align:right}.message-meta{display:flex;align-items:baseline;gap:9px;margin:0 2px 5px;font-size:11px;color:#8497af}.message-row.mine .message-meta{flex-direction:row-reverse}.message-author{font-weight:750;color:#69809b;overflow-wrap:anywhere}.message-time{font-size:10px;color:#aab6c6}.bubble{display:inline-block;text-align:left;padding:11px 15px;border-radius:5px 18px 18px 18px;background:var(--bubble,#e8f2fc);color:#44586f;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.65;font-size:13px;box-shadow:0 3px 11px #9cbbd01a}.mine .bubble{border-radius:18px 5px 18px 18px;background:#dceffd;color:#345774}.day-separator{text-align:center;color:#b0bece;font-size:10px;font-weight:600;padding:2px 0 4px}.composer-area{border-top:1px solid #e9eef7;background:linear-gradient(180deg,#fdfdff,#fbfcff);padding:13px 22px 10px;flex:none}.composer{min-height:58px;display:flex;align-items:center;gap:9px;border:1px solid #e4ebf4;background:#f7f9ff;border-radius:20px;padding:8px 9px 8px 16px;box-shadow:inset 0 1px #fff}.composer textarea{resize:none;flex:1;min-height:22px;max-height:90px;outline:none;border:none;background:transparent;color:#40556e;padding:7px 0;line-height:1.5;font-size:13px}.composer textarea::placeholder{color:#a9b8c9}.characters{color:#b0bfce;font-size:10px;white-space:nowrap}.composer button{width:39px;height:39px;background:linear-gradient(145deg,#98ccf4,#a6bdf6);border:0;border-radius:14px;color:white;box-shadow:0 5px 11px #a3c7f17d;display:grid;place-items:center}.composer button svg{fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round;stroke-linecap:round;width:22px;height:22px}.compose-hint{height:17px;padding:5px 6px 0;display:flex;align-items:center;justify-content:space-between;color:#aab7c6;font-size:10px}
.bottom-nav{height:65px;padding:6px 12px calc(4px + env(safe-area-inset-bottom));min-height:calc(64px + env(safe-area-inset-bottom));display:flex;justify-content:center;gap:55px;border-top:1px solid #e9eef7;background:#ffffffef;flex:none}.nav-item{min-width:105px;border:0;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#a0b0c4;font-size:11px;font-weight:750;border-radius:16px}.nav-item svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.nav-item.selected{color:#76a7d4;background:linear-gradient(110deg,#eaf5ff,#f4eaff)}
#profileView{overflow-y:auto}.profile-title{padding:26px 28px 18px}.account-content{padding:0 26px;max-width:550px;width:100%;margin:0 auto}.account-hero{display:flex;flex-direction:column;align-items:center;gap:8px;padding:20px 20px 22px;border-radius:24px;background:linear-gradient(125deg,#eaf4ff,#f8eafe 80%);border:1px solid #fff}.account-hero-avatar{display:grid;place-items:center;background:linear-gradient(145deg,#bfd8ff,#e0c9fb);border:4px solid #fff;width:68px;height:68px;border-radius:27px;font-size:26px;color:white;box-shadow:0 8px 18px #b5c8e268}.account-hero strong{font-size:16px}.account-hero span{color:#8399b3;font-size:11px;text-align:center}.form-card{padding:17px 18px 20px;margin-top:17px;border-radius:23px;border:1px solid #eef1f8;background:#fff;box-shadow:0 7px 23px #b5cbe21c}.form-tabs{display:flex;gap:8px;padding:4px;background:#f2f6fc;border-radius:13px;margin-bottom:17px}.form-tabs button{flex:1;border:0;background:transparent;border-radius:10px;padding:10px;font-size:12px;font-weight:800;color:#91a3b7}.form-tabs button.chosen{background:#fff;box-shadow:0 3px 7px #acc0d52e;color:#6f9ec6}.form-card form{display:flex;flex-direction:column}.form-card label{font-size:12px;font-weight:780;margin:6px 3px 8px;color:#627b97}.form-card input{width:100%;border:1px solid #e5edf6;background:#f8fbff;border-radius:13px;padding:13px 14px;margin-bottom:12px;color:#405870;font-size:13px}.form-card input::placeholder{color:#abbaca}.form-hint{font-size:10px;line-height:1.6;color:#a7b4c5;margin:1px 2px 13px}.submit{border:0;border-radius:13px;padding:13px;color:#fff;background:linear-gradient(100deg,#91c4ef,#baa7f1);font-weight:800;box-shadow:0 5px 13px #bac9ef55}.profile-note{font-size:10px;color:#b1bfd1;text-align:center;padding:18px 20px 23px}.signed-card{text-align:center;padding:30px 25px 26px;background:linear-gradient(125deg,#e9f7fc,#f5eafb);border-radius:25px;border:1px solid white}.signed-avatar{width:78px;height:78px;border-radius:30px;font-weight:800;font-size:31px;display:grid;place-items:center;margin:0 auto 16px;background:var(--avatar-bg);color:var(--avatar-fg);box-shadow:0 6px 13px #bcd5e147}.signed-card h2{font-size:20px;margin:0 0 6px}.signed-card p{color:#91a3b9;font-size:12px;margin:0}.signed-actions{margin-top:18px;display:flex;gap:10px}.signed-actions button{flex:1;border:none;border-radius:13px;padding:13px;background:#fff;color:#668cac;font-size:12px;font-weight:800}.signed-actions .logout{color:#bd91a6;background:#ffeef4}.toast{position:fixed;bottom:calc(90px + env(safe-area-inset-bottom));left:50%;transform:translate(-50%,15px);opacity:0;pointer-events:none;background:#4c617a;color:#fff;border-radius:100px;padding:11px 18px;font-size:12px;max-width:min(90vw,420px);text-align:center;z-index:20;box-shadow:0 8px 25px #7991ae66;transition:opacity .18s,transform .18s}.toast.visible{opacity:1;transform:translate(-50%,0)}
@media(max-width:600px){.shell{box-shadow:none}.topbar{height:66px;padding:12px 17px}.brand-mark{width:38px;height:38px;border-radius:14px}.brand-name{font-size:20px}.brand-subtitle{display:none}.chat-title{padding:22px 20px 13px}.chat-title h1,.profile-title h1{font-size:19px}.tiny-pill{font-size:9px}.messages-scroll{padding:6px 12px 12px 17px}.message-main{max-width:79%}.bubble{font-size:13px}.composer-area{padding:10px 13px 9px}.profile-title{padding:23px 22px 18px}.account-content{padding:0 16px}.nav-item{min-width:95px}.bottom-nav{gap:22px}.status{font-size:10px;padding:7px 9px}}
@media(max-height:620px){.chat-title{padding-top:12px;padding-bottom:9px}.topbar{height:58px}.composer-area{padding-top:6px}.bottom-nav{height:57px;min-height:calc(57px + env(safe-area-inset-bottom))}}
