/* 后台和引导的拼装规则。设计变量在 tokens.css，组件在 ui.css；这里只放页面拼装，间距只用 --s1…--s7。 */
body { overflow: hidden; }
#app, .auth, .onb { height: 100%; }
.onb { overflow: auto; }
.brand { display: block; padding: var(--s2) var(--s2) var(--s4); text-decoration: none !important; }
.brand .logo svg { width: 28px; height: 28px; }
.center { text-align: center; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.shrink { min-width: 0; }
.fill { height: 100%; min-height: 0; }
.mt { margin-top: var(--s4); }
.mb { margin-bottom: var(--s5); }
.pad { padding: var(--s3) var(--s4); }
.pad2 { padding-left: var(--s4); padding-right: var(--s4); }
.span { grid-column: 1 / -1; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: var(--s4); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 384px; gap: var(--s6); align-items: start; }
.narrowc { max-width: 640px; }
.wrapr { flex-wrap: wrap; }
.scrollx { overflow-x: auto; }
.inp.hex { width: 120px; }
.inp.days { width: 120px; }
.inp .btn.ghost.sm { margin-right: calc(var(--s2) * -1); }
.seg.full { display: flex; }
.seg.full button { flex: 1; justify-content: center; }
.top .seg { flex: none; }
.search { text-align: left; }
.demo { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3); }
.demo a { color: var(--text-2); }
.setup-card a { color: var(--brand); }
.side .setup-card + .demo { margin-top: 0; }
.bar { border-radius: 0; padding: var(--s3) var(--s5); align-items: center; }
#errorBar:not(:empty) { padding: var(--s3) var(--s5) 0; }
#errorBar .banner { align-items: flex-start; }
.items .item { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; color: inherit; font: inherit; }
.items .item.on { background: var(--brand-soft); }
.item .nm { font-weight: 500; }
.msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .ava .ic { width: 14px; height: 14px; }
.msg.pending .bub { opacity: 0.6; border-style: dashed; }
.msg.pending .btn { align-self: flex-end; }
.locked { margin: 0 var(--s5) var(--s5); padding: var(--s3) var(--s4); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); background: var(--surface); text-align: center; }
.composer { position: relative; }
.menu.quick { bottom: 48px; left: var(--s2); width: 360px; }
.menu.quick .choices button { height: auto; min-height: 32px; padding: var(--s1) var(--s2); text-align: left; }
.menu.quick .choices button[data-value=""] { display: none; }
.menu.quick .choices button[aria-pressed="true"] { background: none; }
.vinfo .kv dd.span { grid-column: 1 / -1; }
.skh { height: 28px; width: 240px; margin-bottom: var(--s4); }
.skb { height: 240px; }
.sk { animation: skin 1s step-end; }
@keyframes skin { from { opacity: 0; } }
.drop { display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s6); border: 1px dashed var(--line-strong); border-radius: var(--r-lg); cursor: pointer; color: var(--text-2); text-align: center; }
.drop:hover { background: var(--surface-2); }
.thumb i:last-child { background: transparent; }
.choice { color: inherit; font: inherit; text-align: left; }
.kpi .v { font-variant-numeric: tabular-nums; }
.plan .t1 { font-family: "Outfit", var(--f-cn); }
#lead { z-index: 80; }
/* 站点外观的实时预览（和访客小窗 frame.css 同一套取值） */
.wprev { width: 384px; max-width: 100%; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-3); overflow: hidden; display: flex; flex-direction: column; }
.wprev-h { height: 64px; display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s4); border-bottom: 1px solid var(--line); }
.wprev-a { width: 36px; height: 36px; border-radius: var(--r-md); background: var(--w); color: var(--w-ink); display: flex; align-items: center; justify-content: center; font-weight: 600; }
.wprev-b { padding: var(--s4); display: flex; flex-direction: column; gap: var(--s3); min-height: 200px; }
.wprev .wb { margin: 0; padding: var(--s2) var(--s3); border-radius: var(--r-lg); background: var(--surface-2); max-width: 85%; line-height: 22px; }
.wprev .wb.me { align-self: flex-end; background: var(--w); color: var(--w-ink); }
.wprev-f { margin: 0 var(--s3); height: 40px; display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s1) 0 var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-lg); }
.wprev-f span { flex: 1; }
.wprev-s { width: 32px; height: 32px; border-radius: var(--r-md); background: var(--w); color: var(--w-ink); display: flex; align-items: center; justify-content: center; }
.wprev > p { padding: var(--s2) 0 var(--s3); }
@media (max-width: 1199px) {
  .demo, .top #demoMember > span:first-child { display: none; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
  .top .search > .sp, .top .search kbd { display: none; }
  .top .search { width: 32px; padding: 0 var(--s2); }
}
/* 手机：只留一栏，点进对话再出详情 */
#backToInbox { display: none; }
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .top { padding: 0 var(--s3); gap: var(--s2); overflow-x: auto; }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .inbox .vinfo { display: none; }
  main:not(.reading) .conv, main.reading .ilist { display: none; }
  #backToInbox { display: inline-flex; }
  .conv-h { padding: 0 var(--s3); }
  .conv-h kbd { display: none; }
  .msgs { padding: var(--s4); }
  .composer, .locked { margin: 0 var(--s3) var(--s3); }
  .ib, .btn { min-height: 44px; }
  .ib { min-width: 44px; }
  input, textarea { font-size: 16px; }
  .wrap { padding: var(--s4); }
  .grid2, .grid3, .kpis, .plans, .set { grid-template-columns: minmax(0, 1fr); }
  .cards { grid-template-columns: minmax(0, 1fr); }
}
/* 接入引导 */
.onb-top .brand { padding: 0; }
.onb-top .steps .ic { width: 12px; height: 12px; }
.mini { position: absolute; right: var(--s5); bottom: var(--s5); display: flex; flex-direction: column; align-items: flex-end; gap: var(--s3); }
.mini-greet { display: flex; align-items: center; gap: var(--s2); padding: var(--s3) var(--s4); background: #fff; color: #07163D; border: 1px solid #E3E6EF; border-radius: var(--r-lg); box-shadow: var(--sh-2); }
.mini-btn { width: 56px; height: 56px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: var(--sh-2); }
.mini-hole { display: flex; align-items: center; gap: var(--s3); }
.mini-hole i { width: 56px; height: 56px; border-radius: 50%; border: 2px dashed var(--line-strong); }
.wprev.tall { height: 560px; }
.wprev.tall .wprev-b { flex: 1; overflow: auto; }
.wprev .wb p { margin: 0; white-space: pre-wrap; }
.wprev .wb .src { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.wprev-in { margin: 0 var(--s3); height: 40px; display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s1) 0 var(--s3); border: 1px solid var(--line-strong); border-radius: var(--r-lg); }
.wprev-in:focus-within { border-color: var(--w); }
.wprev-in input { flex: 1; border: 0; background: none; height: 100%; }
.wprev-in .wprev-s { border: 0; cursor: pointer; }
.sugg { align-items: flex-end; }
.chip { height: 32px; padding: 0 var(--s3); border-radius: var(--r-full); border: 1px solid var(--w); background: var(--surface); color: var(--text); cursor: pointer; }
.chip:hover { background: var(--surface-2); }
.wsys { align-self: center; margin: 0; }
.empty.wide { max-width: 640px; }
.bigok { width: 64px; height: 64px; border-radius: 50%; background: var(--success-soft); color: var(--success); display: flex; align-items: center; justify-content: center; }
.nexts { width: 100%; text-align: left; margin: var(--s2) 0 var(--s4); }
.nexts a { color: inherit; text-decoration: none !important; }
.nexts a:hover { background: var(--surface-2); }
.wprev-in input:focus-visible { box-shadow: none !important; }
.onb-body.solo { grid-template-columns: minmax(0, 1fr); }
.field > .seg, .field > .row > .seg { align-self: flex-start; }
.inp input:focus-visible, .inp textarea:focus-visible, .cmdk-in input:focus-visible { box-shadow: none !important; }
.conv-h .shrink { flex: 1; }
#siteName, #title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#cres { max-height: 60vh; overflow: auto; }
.conv-h > .sp { display: none; }
#siteName { display: block; }
#siteName .dot { display: inline-block; vertical-align: middle; margin-right: var(--s1); }
.search > .sp { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#infoBtn { display: none; }
@media (max-width: 1359px) {
  #infoBtn { display: inline-flex; }
  .inbox.drawer .vinfo { display: flex; position: fixed; right: 0; top: 56px; bottom: 0; width: 296px; z-index: 50; box-shadow: var(--sh-3); }
}
.bigwarn { width: 64px; height: 64px; border-radius: 50%; background: var(--warning-soft); color: var(--warning); display: flex; align-items: center; justify-content: center; }
.setupwarn { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4); background: var(--warning-soft); color: var(--text); border-bottom: 1px solid var(--line); }
.setupwarn .ic { color: var(--warning); }
.setup-card.warn { background: var(--warning-soft); }
.code code { min-width: 0; white-space: pre-wrap; word-break: break-all; }
#offline.auth { background: var(--brand-soft); } #offline.auth .ic { color: var(--brand); }
