/* 大肥鱼官网 · 对话产品形态 · 浅色设计稿 token */
:root{
  --bg:#FFFFFF;
  --bg-soft:#F9F8F8;
  --surface:#FFFFFF;
  --sunken:#F9F8F8;
  --line:rgba(0,0,0,.06);
  --line-mid:rgba(0,0,0,.10);
  --line-strong:rgba(0,0,0,.18);
  --ink:#1A1615;
  --text-1:#1E232C;
  --ink-mid:rgba(0,0,0,.70);
  --ink-low:#8691A1;
  --accent:#4D6BFE;
  --accent-deep:#3A65C2;
  --accent-soft:#E4EDFD;
  --user-bubble:#EDF3FE;
  --ok:#22C55E;
  --warn-bg:#FEF5E7;
  --warn-line:rgba(245,158,11,.34);
  --warn-ink:#8A5A00;
  --danger:#EC1313;
  --danger-soft:#FEF2F2;
  --r-card:24px;
  --r-bubble:16px;
  --sidebar:260px;
  --panel:380px;
  --ring:0 0 0 3px rgba(77,107,254,.14);
  --shadow-card:0 0 0 1px rgba(0,0,0,.03),0 2px 4px rgba(0,0,0,.04),0 12px 24px rgba(0,0,0,.05);
  --shadow-lift:0 24px 64px rgba(0,0,0,.14),0 0 0 1px rgba(0,0,0,.04);
  --shadow-bubble:none;
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",Inter,Roboto,sans-serif;
  --mono:"SF Mono",ui-monospace,Consolas,"Courier New",monospace;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{
  background:var(--bg);color:var(--text-1);font-family:var(--font);
  font-size:16px;line-height:26px;-webkit-font-smoothing:antialiased;
  overflow:hidden;
}
button,input,textarea{font-family:inherit;font-size:inherit;color:inherit}
button{cursor:pointer;border:0;background:none}
button:disabled{cursor:not-allowed;opacity:.55}
a{color:var(--accent);text-decoration:none}
.sprite{position:absolute;width:0;height:0;overflow:hidden}
[hidden]{display:none !important}
svg{display:block}

/* ---------- 骨架 ---------- */
.app{display:flex;height:100dvh;height:var(--vvh,100dvh);width:100%;overflow:hidden}

/* ---------- 侧栏 ---------- */
.sidebar{
  width:var(--sidebar);flex:0 0 var(--sidebar);height:100%;
  background:var(--bg-soft);border-right:1px solid var(--line);
  display:flex;flex-direction:column;padding:16px 12px 12px;
}
.side-head{display:flex;align-items:center;justify-content:space-between;height:32px;padding:0 8px;margin-bottom:14px}
.brand{display:flex;align-items:center;gap:9px;min-width:0}
.brand-mark{
  width:28px;height:28px;border-radius:8px;background:var(--accent);color:#fff;
  display:grid;place-items:center;flex:0 0 28px
}
.brand-mark svg{width:19px;height:19px}
.brand-text{font-size:14px;font-weight:600;letter-spacing:-.01em;display:flex;align-items:baseline;gap:6px}
.brand-text em{font-style:normal;font-size:11px;font-weight:500;color:var(--ink-low);letter-spacing:.2px}
.new-chat{
  width:100%;height:36px;border-radius:100px;background:var(--surface);border:1px solid var(--line-mid);color:var(--text-1);
  display:flex;align-items:center;justify-content:flex-start;gap:8px;padding:0 13px;
  font-size:13px;font-weight:400;margin:0 0 14px;
  transition:background .15s ease,border-color .15s ease;
}
.new-chat svg{width:14px;height:14px;color:var(--ink-mid)}
.new-chat:hover{background:rgba(0,0,0,.04);border-color:var(--line-strong)}
.side-scroll{flex:1;overflow-y:auto;margin:0 -4px;padding:0 4px}
.side-scroll::-webkit-scrollbar{width:6px}
.side-scroll::-webkit-scrollbar-thumb{background:var(--line-mid);border-radius:3px}
.history{display:flex;flex-direction:column;gap:0}
.h-group{margin:0;padding:12px 8px 6px;font-size:12px;line-height:18px;color:var(--ink-low)}
.h-item{
  display:flex;align-items:center;gap:8px;width:100%;text-align:left;
  height:34px;padding:0 8px;border-radius:8px;font-size:13px;color:var(--ink-mid);
  line-height:20px;
}
.h-item svg{flex:0 0 auto;color:var(--ink-low);width:15px;height:15px}
.h-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.h-item:hover{background:rgba(0,0,0,.04);color:var(--text-1)}
.h-item.active{background:#EBEEF2;color:var(--text-1);font-weight:500}
.side-empty{padding:12px 8px;font-size:12px;line-height:18px;color:var(--ink-low)}
.side-bottom{border-top:1px solid var(--line);padding:12px 6px 2px;margin-top:10px}
.acct-card{
  display:flex;align-items:center;gap:9px;padding:2px 2px;border-radius:8px;
  width:100%;text-align:left;
}
.acct-card:hover{background:rgba(0,0,0,.04)}
.acct-ava{
  width:28px;height:28px;border-radius:50%;background:var(--accent-soft);color:var(--accent);
  display:grid;place-items:center;font-size:12px;font-weight:600;flex:0 0 28px
}
.acct-meta{min-width:0;flex:1}
.acct-meta b{display:block;font-size:12px;line-height:16px;font-weight:500;color:var(--text-1);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.acct-meta span{display:block;font-size:12px;line-height:16px;color:var(--ink-low)}
.acct-chev{color:var(--ink-low)}
.guest-card{padding:2px;border:0;border-radius:0;background:transparent}
.guest-card b{font-size:12px;line-height:16px;display:block;margin-bottom:2px;font-weight:500}
.guest-card p{margin:0 0 8px;font-size:12px;color:var(--ink-low);line-height:16px}

/* ---------- 主区 ---------- */
.main{flex:1;min-width:0;display:flex;flex-direction:column;position:relative;height:100%;background:var(--bg)}
.topbar{
  height:56px;flex:0 0 56px;display:flex;align-items:center;gap:12px;
  padding:0 16px 0 24px;border-bottom:1px solid var(--line);
  background:var(--bg);z-index:6;
}
.topbar-title{min-width:0;flex:1}
.topbar-title h1{margin:0;font-size:14px;line-height:22px;font-weight:500;letter-spacing:-.01em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-title p{margin:0;font-size:12px;line-height:18px;color:var(--ink-low)}
.topbar-actions{display:flex;align-items:center;gap:8px}
.quota-pill{
  height:30px;padding:0 11px;border-radius:100px;border:1px solid var(--line-mid);
  background:var(--bg);font-size:12px;color:var(--ink-low);
  display:inline-flex;align-items:center;gap:6px;white-space:nowrap
}
.quota-pill b{font-size:13px;font-weight:500;color:var(--text-1);font-variant-numeric:tabular-nums}
.quota-pill::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--ok)}
.quota-pill.low{border-color:var(--warn-line);background:var(--warn-bg);color:var(--warn-ink)}
.quota-pill.low::before{background:#C08A19}
.quota-pill.empty{border-color:rgba(236,19,19,.24);background:var(--danger-soft);color:var(--danger)}
.quota-pill.empty::before{background:var(--danger)}
.btn-ghost{
  height:32px;padding:0 10px;border-radius:8px;border:1px solid transparent;
  display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--ink-mid);
}
.btn-ghost:hover{background:rgba(0,0,0,.04);color:var(--text-1)}
.btn-dark{
  height:32px;padding:0 14px;border-radius:100px;background:var(--ink);color:#fff;
  font-size:13px;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:6px
}
.btn-dark:hover{background:#000}
.btn-dark.lg{height:44px;border-radius:100px;font-size:14px}
.btn-dark.sm{height:30px;padding:0 14px;font-size:12.5px;border-radius:100px}
.btn-ghost.sm{height:30px;border:1px solid var(--line-mid);border-radius:100px;background:var(--bg)}
.btn-ghost.lg{height:44px;border-radius:100px;border:1px solid var(--line-mid);background:var(--bg);padding:0 18px;justify-content:center}
.btn-ghost.danger{color:var(--danger);border-color:rgba(236,19,19,.24)}
.btn-ghost.block{width:100%;justify-content:center;margin-top:18px}
.avatar{
  width:28px;height:28px;border-radius:50%;background:#EBEEF2;color:var(--text-1);
  font-size:12px;font-weight:600;display:grid;place-items:center
}
.avatar:hover{background:#E2E6EC}
.icon-btn{
  width:32px;height:32px;border-radius:8px;display:grid;place-items:center;color:var(--ink-mid)
}
.icon-btn:hover{background:rgba(0,0,0,.04);color:var(--text-1)}
.icon-btn.tiny{width:28px;height:28px;border-radius:8px;flex:0 0 auto}
.only-mobile{display:none}
.topbar-actions .btn-ghost{border:0;background:transparent;padding:6px 4px;height:30px}
.topbar-actions .btn-ghost:hover{background:transparent;color:var(--text-1)}
.topbar-actions #btn-login{
  height:30px;padding:0 13px;border-radius:100px;border:1px solid var(--line-mid);
  background:var(--bg);color:var(--text-1);font-size:12px;font-weight:400
}
.topbar-actions #btn-login:hover{background:rgba(0,0,0,.04)}
.topbar-actions #btn-account{border-radius:50%}

/* 邀请条 */
.invite-banner{
  display:flex;align-items:center;gap:10px;width:min(752px,calc(100% - 88px));min-height:44px;
  margin:16px auto 0;padding:0 16px;
  background:rgba(255,255,255,.55);border:1px solid var(--line);border-radius:16px;
  backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  color:var(--text-1);font-size:13px;line-height:20px;flex:0 0 auto
}
.invite-banner p{margin:0;flex:1}
.banner-icon{width:24px;height:24px;border-radius:8px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;flex:0 0 auto}
.invite-banner .icon-btn{color:var(--ink-low)}
.invite-banner .icon-btn:hover{background:rgba(0,0,0,.04)}

/* 提示条 */
.notice{
  display:flex;align-items:center;gap:8px;width:min(752px,calc(100% - 88px));
  margin:8px auto 0;padding:6px 12px;
  background:var(--danger-soft);border:1px solid rgba(236,19,19,.18);border-radius:12px;
  color:var(--danger);font-size:12px;line-height:18px;flex:0 0 auto
}
.notice .notice-text{flex:1}
.notice-action{
  font-size:12px;font-weight:500;color:var(--danger);text-decoration:underline;
  text-underline-offset:3px;flex:0 0 auto;padding:2px
}
.notice .icon-btn{color:var(--danger)}

/* 对话流 */
.stream{
  flex:1;overflow-y:auto;overflow-x:hidden;padding:24px 44px 8px;
  display:flex;flex-direction:column;align-items:center;scroll-behavior:smooth;
}
.stream>*{width:100%;max-width:840px}
.stream::-webkit-scrollbar{width:6px}
.stream::-webkit-scrollbar-thumb{background:var(--line-mid);border-radius:3px}
.empty{
  margin:auto;padding:0 0 56px;max-width:620px;display:flex;flex-direction:column;
  align-items:center;text-align:center;animation:rise .35s ease both
}
.empty-mark{
  width:56px;height:56px;border-radius:16px;background:var(--accent-soft);color:var(--accent);
  display:grid;place-items:center;margin-bottom:20px
}
.empty-mark svg{width:34px;height:34px}
.empty h2{margin:0 0 8px;font-size:28px;line-height:36px;font-weight:600;letter-spacing:-.02em;color:var(--text-1)}
.empty .lead{margin:0;color:var(--ink-mid);font-size:15px;line-height:24px;max-width:560px}
.chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:28px;max-width:620px}
.chip{
  height:36px;padding:0 14px;border-radius:100px;border:1px solid var(--line-mid);
  background:var(--bg);font-size:13px;line-height:20px;color:var(--ink-mid);
  transition:background .15s ease,border-color .15s ease,color .15s ease
}
.chip:hover{border-color:var(--line-strong);color:var(--text-1);background:rgba(0,0,0,.02)}
.guest-note{font-size:12px;line-height:18px;color:var(--ink-low);display:flex;align-items:center;gap:6px;margin-top:24px}
.guest-note::before{content:"";width:5px;height:5px;border-radius:50%;background:var(--accent)}

.msg{display:flex;gap:12px;margin:0;animation:rise .28s ease both}
.msg+.msg{margin-top:8px}
.msg:not(.cont),.msg+.msg:not(.cont){margin-top:20px}
.msg:first-child{margin-top:0}
.msg.user{justify-content:flex-end}
.msg .ava{
  width:28px;height:28px;border-radius:50%;flex:0 0 28px;display:grid;place-items:center;
  font-size:12px;font-weight:600;margin-top:2px
}
.msg.ai .ava{background:var(--accent-soft);color:var(--accent)}
.msg.user .ava{background:#EBEEF2;color:var(--text-1);order:2}
.msg .body{min-width:0;max-width:660px;display:flex;flex-direction:column}
.msg.user .body{align-items:flex-end;max-width:560px}
.msg .who{font-size:12px;line-height:18px;color:var(--ink-low);margin:0 0 4px 0;display:flex;align-items:center;gap:6px}
.msg.user .who{order:0;margin:0 0 4px 0;justify-content:flex-end}
.bubble{
  font-size:16px;line-height:26px;color:var(--text-1);
  white-space:pre-wrap;word-break:break-word
}
.msg.ai .bubble{background:transparent;border:0;padding:0}
.msg.user .bubble{
  background:var(--user-bubble);border:0;border-radius:16px;padding:9px 15px;
  font-size:16px;line-height:26px;color:var(--text-1)
}
.msg.cont{margin-top:8px}
.msg.cont .ava{visibility:hidden;width:0;flex:0 0 0;margin:0}
.msg.cont .who{display:none}
.msg.cont.ai{padding-left:40px}
.msg .note-under{font-size:12px;color:var(--ink-low);margin-top:6px;display:flex;gap:10px}
.typing{display:flex;align-items:center;gap:5px;height:26px}
.typing i{width:6px;height:6px;border-radius:50%;background:var(--ink-low);animation:blink 1.2s infinite}
.typing i:nth-child(2){animation-delay:.18s}
.typing i:nth-child(3){animation-delay:.36s}
@keyframes blink{0%,60%,100%{opacity:.25;transform:translateY(0)}30%{opacity:1;transform:translateY(-2px)}}
@keyframes rise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* 额度条 */
.quota-strip{
  display:flex;align-items:center;gap:9px;width:min(752px,calc(100% - 88px));
  min-height:44px;margin:0 auto 8px;padding:6px 12px;
  border-radius:12px;background:var(--warn-bg);border:1px solid var(--warn-line);border-left:2px solid #F59E0B;
  color:var(--warn-ink);font-size:12px;line-height:18px;flex:0 0 auto
}
.quota-strip .dot{width:7px;height:7px;border-radius:50%;background:#F59E0B;flex:0 0 auto}
.quota-strip p{margin:0;flex:1}
.strip-action{font-size:12px;font-weight:500;color:var(--warn-ink);text-decoration:underline;text-underline-offset:3px;flex:0 0 auto}
.quota-strip.danger{background:var(--danger-soft);border-color:rgba(236,19,19,.18);border-left-color:var(--danger);color:var(--danger)}
.quota-strip.danger .dot{background:var(--danger)}
.quota-strip.danger .strip-action{color:var(--danger)}

/* 输入区 */
.composer{flex:0 0 auto;padding:8px 44px 20px;background:var(--bg)}
.composer-note{
  max-width:752px;margin:0 auto 8px;padding:0 2px;
  font-size:12px;line-height:18px;color:var(--ink-low);text-align:center
}
.composer-box{
  max-width:752px;margin:0 auto;display:flex;flex-direction:column;
  background:var(--surface);border:1px solid var(--line-mid);border-radius:24px;
  padding:14px 14px 10px 18px;
  transition:border-color .15s ease,box-shadow .15s ease
}
.composer-box:focus-within{border-color:var(--accent);box-shadow:var(--ring)}
.composer textarea{
  border:0;outline:none;resize:none;background:transparent;
  font-size:16px;line-height:24px;height:24px;min-height:24px;max-height:120px;
  padding:0;color:var(--text-1)
}
.composer textarea::placeholder{color:var(--ink-low)}
.composer-bar{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-top:8px;min-height:32px}
.composer-hint{font-size:12px;line-height:18px;color:var(--ink-low)}
.send{
  margin-left:auto;width:32px;height:32px;border-radius:50%;background:var(--accent);color:#fff;
  display:grid;place-items:center;flex:0 0 auto;transition:background .15s ease
}
.send svg{width:16px;height:16px}
.send:hover{background:var(--accent-deep)}
.send:disabled{background:var(--line-mid)}
.send.sending svg{animation:pulse .9s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.35}}
.composer-foot{
  max-width:752px;margin:8px auto 0;display:flex;justify-content:space-between;gap:12px;
  font-size:12px;line-height:18px;color:var(--ink-low);padding:0 2px
}
.composer-foot .hint{text-align:right}

/* ---------- 个人中心 ---------- */
.panel{
  width:var(--panel);flex:0 0 var(--panel);height:100%;background:var(--surface);
  border-left:1px solid var(--line);display:flex;flex-direction:column;
  animation:slideIn .22s ease both
}
@keyframes slideIn{from{transform:translateX(12px);opacity:.4}to{transform:none;opacity:1}}
.panel-head{
  height:56px;flex:0 0 56px;display:flex;align-items:center;justify-content:space-between;
  padding:0 12px 0 18px;border-bottom:1px solid var(--line)
}
.tabs{display:flex;gap:2px}
.tab{
  height:30px;padding:0 12px;border-radius:8px;font-size:13px;color:var(--ink-low);font-weight:400
}
.tab:hover{color:var(--text-1);background:rgba(0,0,0,.04)}
.tab.active{background:#EBEEF2;color:var(--text-1);font-weight:500}
.panel-body{flex:1;overflow-y:auto;padding:20px 18px 28px}
.pane-title{margin:0 0 6px;font-size:16px;line-height:24px;font-weight:600}
.muted{margin:8px 0 16px;color:var(--ink-low);font-size:12px;line-height:18px}
.muted.center{text-align:center}
.quota-hero{display:flex;align-items:baseline;gap:8px;margin:6px 0 2px}
.quota-num{font-size:40px;font-weight:600;letter-spacing:-1px;line-height:1.1}
.quota-unit{font-size:13px;color:var(--ink-low)}
.rows{border:1px solid var(--line);border-radius:14px;overflow:hidden;margin:18px 0}
.row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 14px;font-size:13px;background:var(--surface)}
.row+.row{border-top:1px solid var(--line)}
.row span{color:var(--ink-low)}
.row b{font-weight:500;text-align:right;word-break:break-all}
.callout{background:var(--bg-soft);border-radius:14px;padding:14px 15px;margin-top:18px}
.callout b{font-size:13px;font-weight:600}
.callout p{margin:4px 0 12px;font-size:12px;color:var(--ink-mid);line-height:18px}
.callout-actions{display:flex;gap:8px}
.invite-card{display:flex;gap:14px;border:1px solid var(--line);border-radius:16px;padding:14px;margin:16px 0}
.qr-wrap{flex:0 0 auto;text-align:center}
.qr{
  width:104px;height:104px;border-radius:10px;background:#fff;border:1px solid var(--line);
  padding:6px;display:grid;grid-template-columns:repeat(11,1fr);grid-template-rows:repeat(11,1fr);
  gap:1px;overflow:hidden
}
.qr i{background:var(--ink);border-radius:.5px}
.qr i.off{background:transparent}
.qr-cap{font-size:10px;color:var(--ink-low);margin-top:4px;letter-spacing:.2px}
.invite-main{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center}
.field-label{display:block;font-size:12.5px;font-weight:600;color:var(--ink-mid);margin:0 0 6px}
.copy-row{display:flex;gap:6px}
.copy-row input{
  flex:1;min-width:0;height:34px;border:1px solid var(--line);border-radius:9px;
  background:var(--sunken);padding:0 10px;font-size:11.5px;font-family:var(--mono);
  color:var(--ink-mid);outline:none
}
.invite-code{font-size:11.5px;color:var(--ink-low);margin-top:9px}
.invite-code b{font-family:var(--mono);color:var(--ink);font-size:13px;letter-spacing:1.5px}
.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:6px 0 16px}
.metric{border:1px solid var(--line);border-radius:12px;padding:10px 6px;text-align:center;background:var(--surface)}
.metric b{display:block;font-size:18px;font-weight:650;line-height:1.4}
.metric span{font-size:11.5px;color:var(--ink-low)}
.table-wrap{border:1px solid var(--line);border-radius:12px;overflow:hidden}
.irow{display:grid;grid-template-columns:1fr auto auto;gap:8px;padding:10px 12px;font-size:12px;align-items:center}
.irow+.irow{border-top:1px solid var(--line)}
.irow .em{color:var(--ink-mid);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.irow .st{font-size:11px;padding:2px 7px;border-radius:999px;background:var(--sunken);color:var(--ink-low);white-space:nowrap}
.irow .st.ok{background:#E8F4EE;color:#1E7A55}
.irow .st.warn{background:var(--warn-bg);color:var(--warn-ink)}
.irow .st.bad{background:var(--danger-soft);color:var(--danger)}
.irow .amt{font-size:12px;color:var(--ink-mid);min-width:40px;text-align:right}
.tempty{padding:18px 12px;text-align:center;font-size:12px;color:var(--ink-low)}
.footnote{font-size:11px;color:var(--ink-low);line-height:1.65;margin:12px 0 0}

/* ---------- 遮罩 / 弹窗 ---------- */
.overlay{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:24px}
.scrim-2{position:absolute;inset:0;background:rgba(15,17,21,.28);backdrop-filter:blur(6px);animation:fade .2s ease both}
@keyframes fade{from{opacity:0}to{opacity:1}}
.scrim{position:fixed;inset:0;background:rgba(15,17,21,.32);z-index:30;animation:fade .2s ease both}
.card{
  position:relative;z-index:1;width:100%;background:var(--surface);border-radius:24px;
  box-shadow:var(--shadow-lift);padding:24px;animation:pop .24s cubic-bezier(.2,.9,.3,1.1) both
}
@keyframes pop{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
.modal-card{max-width:380px}
.modal-card.wide{max-width:400px}
.modal-close{position:absolute;top:12px;right:12px;z-index:2}
.card h2{margin:0 0 6px;font-size:20px;line-height:28px;font-weight:600;letter-spacing:-.01em}
.card .sub{margin:0 0 20px;font-size:13px;line-height:20px;color:var(--ink-low)}
.input{
  width:100%;height:44px;border:1px solid transparent;border-radius:10px;
  background:var(--bg-soft);padding:0 13px;font-size:15px;outline:none;
  transition:border-color .15s ease,box-shadow .15s ease,background .15s ease
}
.input:focus{border-color:var(--accent);background:var(--surface);box-shadow:var(--ring)}
.input.code{letter-spacing:6px;font-family:var(--mono);font-size:18px;text-align:center}
.pwd-wrap{position:relative}
.pwd-wrap .input{padding-right:44px}
.eye{position:absolute;right:4px;top:4px;width:38px;height:38px;border-radius:9px;display:grid;place-items:center;color:var(--ink-low)}
.eye:hover{color:var(--ink);background:var(--sunken)}
.field-row{display:flex;align-items:center;justify-content:space-between;margin-top:14px}
.field-row .field-label{margin:0}
.field-hint{font-size:11.5px;color:var(--ink-low);margin:7px 0 0;line-height:1.6}
.link{font-size:12.5px;color:var(--accent);font-weight:500;padding:2px 0}
.link:hover{text-decoration:underline;text-underline-offset:3px}
.link.center{display:block;margin:12px auto 0;text-align:center}
.check{display:flex;align-items:center;gap:8px;margin:14px 0 18px;font-size:12.5px;color:var(--ink-mid);cursor:pointer}
.check input{width:16px;height:16px;accent-color:var(--ink)}
.block{width:100%}
.form-error{
  margin:12px 0 0;padding:9px 11px;border-radius:9px;background:var(--danger-soft);
  color:var(--danger);font-size:12.5px;line-height:1.55
}
.switch{margin:18px 0 0;font-size:12.5px;color:var(--ink-low);text-align:center}
.switch .link{margin-left:3px;font-size:12.5px}
.btn-row{display:flex;gap:8px;margin-top:16px}
.btn-row .grow{flex:1}
.steps{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:4px 0 10px}
.steps i{height:3px;border-radius:2px;background:var(--line)}
.steps i.on{background:var(--accent)}
.step-label{font-size:11.5px;color:var(--ink-low);margin-bottom:16px}
.step .input{margin-bottom:2px}
.step .input+.field-label{margin-top:14px}
.step .btn-dark.block{margin-top:20px}
.step .field-hint b{color:var(--ink-mid);font-weight:600}
.done-mark{
  width:54px;height:54px;border-radius:50%;background:#E8F4EE;color:var(--ok);
  display:grid;place-items:center;margin:14px auto 12px
}
.step h3{margin:0 0 6px;font-size:18px;text-align:center;font-weight:650}
.back-line{margin:-6px 0 10px}
.back-line .link{display:inline-flex;align-items:center;gap:2px}

/* 移动端更多菜单 */
.sheet{align-items:flex-end;padding:0}
.sheet-card{
  position:relative;z-index:1;width:100%;max-width:520px;margin:0 auto;
  background:var(--surface);border-radius:22px 22px 0 0;padding:8px 12px calc(16px + env(safe-area-inset-bottom));
  box-shadow:var(--shadow-lift);animation:sheetUp .24s ease both
}
@keyframes sheetUp{from{transform:translateY(100%)}to{transform:none}}
.sheet-handle{width:38px;height:4px;border-radius:2px;background:var(--line-mid);margin:6px auto 10px}
.sheet-item{
  display:flex;align-items:center;gap:12px;width:100%;height:52px;padding:0 14px;
  border-radius:12px;font-size:14.5px;color:var(--ink);text-align:left
}
.sheet-item:hover{background:var(--sunken)}
.sheet-item svg{color:var(--ink-mid)}

/* toast */
.toast{
  position:fixed;left:50%;bottom:calc(28px + env(safe-area-inset-bottom));transform:translateX(-50%);
  background:rgba(27,25,23,.94);color:#fff;font-size:13px;padding:10px 16px;border-radius:10px;
  z-index:80;box-shadow:0 12px 32px rgba(27,25,23,.25);animation:rise .2s ease both;
  max-width:calc(100vw - 40px);text-align:center
}

/* ---------- 平板 ---------- */
@media (max-width:1023px){
  .sidebar{
    position:fixed;left:0;top:0;bottom:0;z-index:40;width:300px;
    transform:translateX(-102%);transition:transform .22s ease;background:var(--bg-soft);
    box-shadow:0 24px 64px rgba(0,0,0,.16)
  }
  .app.drawer-open .sidebar{transform:none}
  .only-mobile{display:grid}
  .only-desktop{display:none !important}
  .topbar-title{flex:1}
  .panel{
    position:fixed;top:0;right:0;bottom:0;z-index:45;width:min(380px,100%);height:100%;
    box-shadow:-16px 0 48px rgba(0,0,0,.12)
  }
  .stream{padding:24px 36px 8px}
  .stream>*{max-width:712px}
  .composer{padding:8px 36px 20px}
  .composer-note,.composer-box,.composer-foot{max-width:640px}
  .invite-banner,.notice,.quota-strip{width:min(640px,calc(100% - 72px))}
}
@media (min-width:1024px){
  .only-mobile{display:none !important}
  .only-desktop{display:inline-flex}
}

/* ---------- 手机 <768 ---------- */
@media (max-width:767px){
  body{font-size:15px;line-height:24px}
  .sidebar{width:300px}
  .topbar{height:48px;flex-basis:48px;padding:0 8px 0 12px;gap:6px}
  .topbar-title h1{font-size:14px}
  .topbar-title p{display:none}
  .topbar-actions{gap:4px}
  .quota-pill{height:28px;padding:0 9px;font-size:11px}
  .avatar{width:26px;height:26px;font-size:11px}
  .topbar-actions #btn-login{height:28px;padding:0 11px;font-size:11.5px}
  .invite-banner{width:calc(100% - 32px);margin:8px 16px 0;border-radius:14px;font-size:12px;padding:0 12px}
  .notice{width:calc(100% - 32px);margin:8px 16px 0}
  .stream{padding:24px 16px 8px}
  .stream>*{max-width:100%}
  .empty{padding:24px 0 40px;max-width:100%}
  .empty-mark{width:56px;height:56px;margin-bottom:16px}
  .empty h2{font-size:24px;line-height:32px;margin-bottom:6px}
  .empty .lead{font-size:14px;line-height:22px;max-width:100%}
  .chips{flex-direction:column;width:100%;margin-top:24px;gap:8px}
  .chip{width:100%;height:44px;font-size:13px}
  .guest-note{margin-top:20px}
  .msg{gap:8px}
  .msg:not(.cont),.msg+.msg:not(.cont){margin-top:16px}
  .msg .ava{width:28px;height:28px;flex-basis:28px}
  .msg .body{max-width:calc(100% - 36px)}
  .msg.user .body{max-width:calc(100% - 36px)}
  .msg.cont.ai{padding-left:36px}
  .bubble{font-size:15px;line-height:24px}
  .msg.user .bubble{font-size:15px;line-height:24px;padding:8px 13px;border-radius:16px}
  .composer{padding:6px 16px calc(12px + env(safe-area-inset-bottom))}
  .composer-note{max-width:100%;margin-bottom:6px}
  .composer-box{max-width:100%;border-radius:20px;padding:10px 10px 10px 16px}
  .composer textarea{font-size:15px;line-height:24px;height:24px;max-height:120px}
  .composer-bar{margin-top:6px}
  .composer-hint{display:none}
  .send{width:32px;height:32px}
  .composer-foot{max-width:100%;margin-top:6px;font-size:11px;line-height:16px}
  .quota-strip{width:calc(100% - 32px);margin:0 16px 8px}
  .overlay{padding:0;align-items:stretch}
  .card{
    border-radius:0;min-height:100%;max-width:none !important;padding:64px 20px calc(24px + env(safe-area-inset-bottom));
    display:flex;flex-direction:column;justify-content:flex-start;overflow-y:auto;
    animation:none
  }
  .card h2{font-size:22px;line-height:30px}
  .modal-close{top:12px;right:10px;width:40px;height:40px}
  .back-line{margin-top:0}
  .input{height:48px;font-size:15px;border-radius:12px}
  .btn-dark.lg,.btn-ghost.lg{height:48px;border-radius:100px;font-size:15px}
  .btn-dark{min-height:32px}
  .btn-ghost{min-height:32px}
  .h-item{min-height:40px}
  .card .switch{margin-top:auto;padding-top:24px}
  .step .btn-row{margin-top:18px}
  .sheet-item{height:52px}
  .toast{bottom:calc(90px + env(safe-area-inset-bottom))}
  .panel{width:100%}
  .panel-head{padding:0 10px 0 14px}
  .panel-body{padding:18px 16px calc(28px + env(safe-area-inset-bottom))}
}
@media (max-width:380px){
  .chip{height:42px;padding:0 11px;font-size:12.5px}
  .empty h2{font-size:22px}
  .quota-pill{padding:0 8px;font-size:11px}
  .btn-dark{padding:0 11px}
}
