/* ============================================================
   移动坐席 · 样式
   桌面浏览时渲染成手机外壳，真机上铺满全屏
   ============================================================ */

:root {
  --brand: #FF4C2B;
  --brand-soft: #FFF0EB;

  --ink: #16161A;
  --ink-2: #4C4841;
  --ink-3: #67635C;
  --ink-4: #75706A;

  --line: #ECEAE5;
  --line-2: #F4F2ED;
  --surface: #F7F6F3;
  --canvas: #EAE8E2;

  --green: #16A34A;
  --green-soft: #E9F6EE;

  --font: "Noto Sans SC", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.22, .8, .28, 1);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

button { font-family: inherit; }

/* ---------- 展示外壳 ---------- */
.stage {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 32px 20px 40px;
}

.stage-head {
  max-width: 420px;
  text-align: center;
}

.sh-pill {
  display: inline-block;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 100px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.stage-head h1 {
  margin: 12px 0 8px;
  font-size: 24px;
  letter-spacing: -.02em;
}

.stage-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--ink-2);
}

.sh-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.sh-links a {
  font-size: 11px;
  color: var(--ink-2);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, .7);
}

.sh-links a:hover { background: #fff; color: var(--ink); }

/* ---------- 手机外壳 ---------- */
.phone {
  position: relative;
  width: 390px;
  height: 844px;
  border-radius: 44px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  box-shadow: 0 40px 80px -50px rgba(20, 18, 14, .6), 0 2px 8px rgba(20, 18, 14, .06);
  overflow: hidden;
  flex: none;
}

.statusbar {
  height: 44px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
}

.sb-icons { display: flex; }
.sb-icons svg { width: 62px; height: 12px; }

.screen {
  position: relative;
  height: calc(100% - 44px);
  overflow: hidden;
  background: var(--surface);
}

/* ---------- 视图切换 ---------- */
.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  transition: transform .3s var(--ease);
  will-change: transform;
}

.view-list { transform: translateX(0); }
.view-chat { transform: translateX(100%); background: #fff; }

.phone.is-chat .view-list { transform: translateX(-24%); }
.phone.is-chat .view-chat { transform: translateX(0); }

/* ---------- 列表页 ---------- */
.mhead {
  flex: none;
  padding: 6px 16px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.mhead-l h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.01em;
}

.mhead-l p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 5px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  flex: none;
}

.plat {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 100px;
  font-size: 11px;
  color: var(--ink-2);
  cursor: pointer;
  flex: none;
  transition: .16s;
}

.plat:active { transform: scale(.97); }
.plat i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.plat svg { width: 10px; height: 10px; color: var(--ink-4); }

.kpis {
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 0 16px 12px;
}

.kpi {
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kpi b {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.kpi span {
  font-size: 10px;
  color: var(--ink-3);
}

.filters {
  flex: none;
  display: flex;
  gap: 6px;
  padding: 0 16px 10px;
}

.f {
  border: 0;
  background: rgba(255, 255, 255, .8);
  color: var(--ink-2);
  font-size: 11px;
  height: 28px;
  padding: 0 11px;
  border-radius: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: .16s;
}

.f b { font-weight: 600; color: var(--ink-3); }
.f.is-on { background: var(--brand); color: #fff; }
.f.is-on b { color: rgba(255, 255, 255, .82); }

.conv-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.conv {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  background: #fff;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
  transition: transform .16s var(--ease), box-shadow .16s;
}

.conv:active { transform: scale(.985); }

.conv-av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: none;
  background: linear-gradient(140deg, var(--a1, #d9d5cd), var(--a2, #b3aea3));
  background-size: cover;
  background-position: center;
}

.conv-main { flex: 1; min-width: 0; }

.conv-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.conv-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-time { font-size: 10px; color: var(--ink-4); flex: none; }

.conv-prev {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.conv-foot {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
}

.chip-tag {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink-3);
}

.chip-tag.ai { background: var(--brand-soft); color: var(--brand); }
.chip-tag.wait { background: var(--green-soft); color: var(--green); }

.conv-badge {
  margin-left: auto;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  display: grid;
  place-items: center;
}

/* ---------- 底部 Tab ---------- */
.tabbar {
  flex: none;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}

.tb {
  border: 0;
  background: none;
  color: var(--ink-4);
  font-size: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 18px;
  cursor: pointer;
  text-decoration: none;
  transition: color .16s;
}

.tb svg { width: 20px; height: 20px; }
.tb.is-on { color: var(--brand); }

/* ---------- 对话页 ---------- */
.chead {
  flex: none;
  height: 56px;
  padding: 0 8px 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.cbtn {
  width: 36px;
  height: 36px;
  border: 0;
  background: none;
  color: var(--ink);
  border-radius: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}

.cbtn:active { background: var(--surface); }
.cbtn svg { width: 20px; height: 20px; }

.chead-info {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.chead-info h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chead-info p {
  margin: 2px 0 0;
  font-size: 10px;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chead-info p.live { color: var(--green); }

.m-msg {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--surface);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 16px);
}

.m-msg-list {
  padding: 14px 12px 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mm {
  display: flex;
  gap: 8px;
  animation: rise .26s var(--ease) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.mm-user { justify-content: flex-end; }
.mm-sys { justify-content: center; }
.mm-sys span,
.mm-time span {
  font-size: 10px;
  color: var(--ink-4);
  background: rgba(255, 255, 255, .7);
  padding: 3px 10px;
  border-radius: 100px;
}

.mm-time { justify-content: center; }
.mm-time span { background: none; }

/* 人机分界线 */
.mm-boundary {
  flex-direction: column;
  gap: 4px;
  margin: 2px 0;
}

.mbd-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mbd-line {
  flex: 1;
  height: 1px;
  background: #E2DFD8;
}

.mbd-pill {
  flex: none;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--ink-2);
  background: #fff;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap;
}

.mbd-pill em { font-style: normal; color: var(--ink-4); margin: 0 2px; }

.mbd-why {
  margin: 0;
  text-align: center;
  font-size: 10px;
  line-height: 1.5;
  color: var(--ink-3);
  padding: 0 6px;
}

.mm-av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: none;
  background: url('assets/ai-avatar.jpg') center/cover;
}

.mm-av.human {
  background: linear-gradient(140deg, #97A3B0, #55606D) center/cover;
}

.mm-body {
  max-width: 268px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.mm-user .mm-body { align-items: flex-end; }

.mm-tagrow {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.mtag {
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 600;
}

.mtag.ai { background: var(--brand-soft); color: var(--brand); }
.mtag.auto { background: var(--green-soft); color: var(--green); }
.mtag.human { background: #EEF1F4; color: #5A6572; }

.msrc { font-size: 9px; color: var(--ink-4); }

.mb {
  background: #fff;
  border: 1px solid #F0EEE9;
  border-radius: 14px;
  padding: 9px 11px;
  font-size: 13.5px;
  line-height: 1.66;
  word-break: break-word;
}

.mm-user .mb {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.typing-m {
  display: flex;
  gap: 4px;
  padding: 12px 13px;
  align-items: center;
}

.typing-m i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ink-4);
  animation: blink 1.1s infinite;
}

.typing-m i:nth-child(2) { animation-delay: .16s; }
.typing-m i:nth-child(3) { animation-delay: .32s; }

@keyframes blink {
  0%, 60%, 100% { opacity: .28; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* 移动端卡片 */
.mm-card { padding-left: 36px; }

.mcard {
  background: #fff;
  border: 1px solid #F0EEE9;
  border-radius: 14px;
  padding: 10px;
  width: 288px;
  max-width: 100%;
}

.mc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.mc-t { font-size: 10.5px; color: var(--ink-3); }

.mtag-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green);
}

.mtag-status.wait { background: var(--brand-soft); color: var(--brand); }

/* 交接摘要（窄屏版）：三行标签值，省掉图标和多余的线 */
.mb-row {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 2px 0;
}

.mb-row span {
  flex: none;
  width: 26px;
  font-size: 10px;
  color: var(--ink-4);
}

.mb-row b {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  word-break: break-word;
}

.mb-foot {
  margin: 8px 0 0;
  font-size: 10px;
  color: var(--ink-4);
}

.mbrief.is-misfire .mtag-status { background: var(--surface); color: var(--ink-3); }

.mc-prod { display: flex; align-items: center; gap: 9px; }

.mc-thumb {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  flex: none;
  background: linear-gradient(140deg, #E6D7C1, #B99B79) center/cover;
}

.mc-thumb.sm { width: 36px; height: 36px; border-radius: 6px; }

.mc-info { flex: 1; min-width: 0; }
.mc-name { margin: 0; font-size: 12px; line-height: 1.45; }
.mc-spec { margin: 2px 0 0; font-size: 10px; color: var(--ink-3); }
.mc-price { margin: 4px 0 0; font-size: 12px; font-weight: 600; color: var(--brand); }

.mc-acts { display: flex; gap: 7px; margin-top: 9px; }
.mc-acts .mbtn { flex: 1; justify-content: center; }

.mbtn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mbtn:active { transform: scale(.98); }

.mbtn.brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 500;
}

.mbtn.soft { background: var(--brand-soft); border-color: transparent; color: var(--brand); font-weight: 600; }

.mtrack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mtrack li { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--ink-3); }
.mtrack .n { width: 6px; height: 6px; border-radius: 50%; background: #E4E1DA; flex: none; }
.mtrack li.done { color: var(--ink-2); }
.mtrack li.done .n { background: var(--brand); }
.mtrack li.now { color: var(--ink); font-weight: 500; }
.mtrack li.now .n { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.mtrack .tm { margin-left: auto; font-size: 9.5px; color: var(--ink-4); }

.mkv { display: flex; justify-content: space-between; font-size: 10.5px; padding: 2px 0; }
.mkv span { color: var(--ink-3); }
.mkv b { font-weight: 500; }
.mkv b.accent { color: var(--brand); font-weight: 600; font-size: 11.5px; }

/* 评价卡 */
.mrating { text-align: center; }

.mrating h4 { margin: 0 0 9px; font-size: 12.5px; }

.mstars { display: flex; justify-content: center; gap: 5px; margin-bottom: 9px; }

.mstar {
  width: 22px;
  height: 22px;
  border: 0;
  background: none;
  padding: 0;
  color: #DDDBD4;
  cursor: pointer;
  transition: transform .14s var(--ease), color .14s;
}

.mstar svg { width: 100%; height: 100%; fill: currentColor; display: block; }
.mstar.on { color: var(--brand); }
.mstar:active { transform: scale(1.15); }

.mrchips { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-bottom: 9px; }

.mrchip {
  font-size: 10.5px;
  padding: 3px 8px;
  border-radius: 100px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  cursor: pointer;
}

.mrchip.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

/* ---------- 建议 / 输入 ---------- */
.m-suggest {
  flex: none;
  background: #FFFBF9;
  border-top: 1px solid var(--line);
  padding: 8px 12px 10px;
}

.ms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.ms-title { font-size: 10.5px; font-weight: 600; color: var(--brand); }

.ms-refresh {
  border: 0;
  background: none;
  font-size: 10px;
  color: var(--ink-3);
  padding: 2px 0;
  cursor: pointer;
}

.ms-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.ms-scroll::-webkit-scrollbar { display: none; }

.ms-card {
  scroll-snap-align: start;
  flex: 0 0 232px;
  background: #fff;
  border: 1px solid #EFEDE7;
  border-radius: 12px;
  padding: 8px 9px;
  font-size: 11.5px;
  line-height: 1.6;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.ms-card.best { border-color: rgba(255, 76, 43, .45); }

.ms-card em {
  font-style: normal;
  font-size: 9px;
  color: var(--brand);
  background: var(--brand-soft);
  padding: 1px 5px;
  border-radius: 4px;
  align-self: flex-start;
  font-weight: 600;
}

.ms-card:active { transform: scale(.99); }

.m-composer {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 7px;
  padding: 9px 10px;
  padding-bottom: calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
  position: relative;
}

.mico {
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: var(--ink-3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}

.mico:active { background: var(--surface); }
.mico svg { width: 21px; height: 21px; }
.mico.rec-on { color: var(--brand); }

.minput {
  flex: 1;
  min-width: 0;
  position: relative;
  background: var(--surface);
  border-radius: 18px;
  border: 1px solid transparent;
  transition: .16s;
}

.minput:focus-within {
  background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.minput textarea {
  display: block;
  width: 100%;
  border: 0;
  background: none;
  outline: none;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  padding: 8px 12px;
  resize: none;
  max-height: 88px;
  min-height: 34px;
}

.minput textarea::placeholder { color: var(--ink-4); }

.rec {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: var(--brand-soft);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  font-size: 12px;
  color: var(--brand);
}

.rec em { font-style: normal; }

.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .35; transform: scale(.8); }
}

.msend {
  flex: none;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 16px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity .16s;
}

.msend:disabled { opacity: .38; }

/* ---------- 托管态 ---------- */
.m-auto {
  flex: none;
  background: #FBFFFC;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ma-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ma-row b { font-size: 12px; color: var(--green); }
.ma-row em { font-style: normal; font-size: 10px; color: #8FA396; }

.ma-actions { display: flex; gap: 7px; }
.ma-actions .mbtn { flex: 1; justify-content: center; }

.ma-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.ma-chip {
  flex: none;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 100px;
  border: 1px solid #DCE9DF;
  background: #fff;
  color: #2F6B45;
  cursor: pointer;
}

/* ---------- 抽屉 ---------- */
.mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 14, .34);
  z-index: 20;
  animation: fade .2s ease both;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 8px 14px calc(14px + env(safe-area-inset-bottom));
  z-index: 21;
  animation: slideUp .26s var(--ease) both;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: none; }
}

.sheet-bar {
  width: 34px;
  height: 4px;
  border-radius: 2px;
  background: #E4E1DA;
  margin: 0 auto 12px;
}

.sheet h3 {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  text-align: center;
}

.sheet-body { display: flex; flex-direction: column; gap: 6px; }

.sheet-item {
  border: 0;
  background: var(--surface);
  border-radius: 10px;
  height: 44px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.sheet-item.danger { color: var(--brand); }
.sheet-item.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.sheet-cancel {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  border: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 10px);
  background: rgba(22, 22, 26, .92);
  color: #fff;
  font-size: 12px;
  padding: 9px 15px;
  border-radius: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease);
  z-index: 60;
  max-width: 86vw;
  text-align: center;
}

.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 显隐（必须覆盖 flex 布局） ---------- */
[hidden] { display: none !important; }

/* ---------- 滚动条 ---------- */
.conv-list::-webkit-scrollbar,
.m-msg::-webkit-scrollbar,
.ms-scroll::-webkit-scrollbar,
.ma-chips::-webkit-scrollbar { width: 0; height: 0; }

/* ---------- 真机：铺满 ---------- */
@media (max-width: 560px) {
  body { background: #fff; }

  .stage { padding: 0; gap: 0; display: block; }

  .stage-head { display: none; }

  .phone {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }

  .statusbar { display: none; }

  .screen { height: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   消息级操作：引用 / 内部备注 / 转发（移动端）
   ============================================================ */

/* ---------- 长按反馈 ---------- */
.mm[data-mi] {
  position: relative;
  border-radius: 12px;
  transition: background .15s;
}

.mm.is-pressing {
  background: #FFF6F2;
  box-shadow: 0 0 0 5px #FFF6F2;
}

/* ---------- 引用块 ---------- */
.mq {
  margin: 0 0 6px;
  padding: 5px 8px;
  border-left: 2px solid var(--ink-4);
  background: rgba(22, 22, 26, .045);
  border-radius: 0 5px 5px 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mq b {
  display: block;
  font-size: 9.5px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: 1px;
}

.mm-user .mq b { color: rgba(255, 255, 255, .72); }

.mm-user .mq {
  border-left-color: rgba(255, 255, 255, .6);
  background: rgba(255, 255, 255, .17);
  color: rgba(255, 255, 255, .92);
}

/* ---------- 内部备注 ---------- */
.mnote {
  margin-left: 36px;
  margin-right: 8px;
  padding: 7px 9px 8px;
  border-radius: 8px;
  background: #FFFAE9;
  border: 1px dashed #E4C877;
  animation: rise .22s var(--ease) both;
}

.mnote-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9.5px;
  color: #A2853C;
  margin-bottom: 2px;
}

.mnote-head b {
  font-weight: 600;
  color: #8A6E28;
}

.mnote-x {
  margin-left: auto;
  border: 0;
  background: none;
  color: #C0A96A;
  font-size: 13px;
  line-height: 1;
  padding: 0 2px;
}

.mnote-body {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: #6C5A2E;
}

/* ---------- 转发消息 ---------- */
.mm-av.fwd {
  background: #EEF1F4;
  color: #5A6572;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.mtag.fwd { background: #EEF1F4; color: #5A6572; }

.mb-fwd {
  background: #FBFAFE;
  border: 1px dashed #DFDCEC;
}

/* ---------- 备注模式 / 引用条 ---------- */
.m-modebar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  background: #FFFAE9;
  border-top: 1px dashed #E4C877;
  font-size: 11px;
  color: #8A6E28;
}

.mm-tag {
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: #F6E6B4;
  color: #7A5F1E;
}

.mm-x {
  margin-left: auto;
  border: 0;
  background: none;
  color: #B99C55;
  font-size: 15px;
  line-height: 1;
  padding: 0 3px;
}

.m-quotebar {
  flex: none;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
  border-left: 2px solid var(--brand);
}

.mq-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mq-body b {
  font-size: 9.5px;
  color: var(--brand);
  font-weight: 600;
}

.mq-body span {
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mq-x {
  border: 0;
  background: none;
  color: var(--ink-4);
  font-size: 15px;
  line-height: 1;
  padding: 0 3px;
}

/* 备注模式：输入区整体转琥珀 */
.m-composer.is-note .minput {
  background: #FFFDF4;
  border-color: #E4C877;
}

.m-composer.is-note .msend {
  background: #C79A2E;
}

/* 转发抽屉里的会话行 */
.sheet-item.fwd-row {
  justify-content: flex-start;
  gap: 10px;
  padding: 0 12px;
  height: 52px;
}

.fwd-av {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  background-size: cover;
  background-position: center;
  background-color: #E2DED6;
}

.fwd-txt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  text-align: left;
}

.fwd-txt b {
  font-size: 12.5px;
  font-weight: 500;
}

.fwd-txt em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--ink-4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 备注模式下只保留一条 ×：退出备注即放弃引用 */
.m-quotebar.no-x .mq-x { display: none; }

/* ============================================================
   我的（个人中心）
   版式：无边框无投影，靠 --surface 底 + 纯白卡 + 留白分层
   字号阶梯只有四档：21（姓名）/ 18（指标数字）/ 13（行文字）/ 10.5（标签与组标题），
   另有 12 / 11 / 10 三个注释级小字（副行、行右值、指标副文）。
   品牌色全页只出现在 tabbar 选中态一处。
   ============================================================ */

/* ---------- 视图切换（与 .view-chat 同一套过渡） ---------- */
.view-me { transform: translateX(100%); }

.phone.is-me .view-list { transform: translateX(-24%); }
.phone.is-me .view-me { transform: translateX(0); }

/* ---------- 顶部标题 ---------- */
.me-head {
  flex: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 16px 0;
}

.me-head h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.me-stamp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: .04em;
  color: var(--ink-4);
  white-space: nowrap;
}

/* ---------- 滚动区 ---------- */
.me-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}

.me-scroll::-webkit-scrollbar { width: 0; height: 0; }

/* ---------- A 身份区 ---------- */
.me-id {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 14px;
}

.me-av {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  flex: none;
  background: url('assets/agent.jpg') center 22% / cover;
}

.me-id-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.me-name {
  margin: 0 0 2px;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--ink);
}

/* 副行纯文字：胶囊在这套系统里只表示「状态 / 可点」，不装静态头衔 */
.me-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.me-meta {
  font-size: 12px;
  color: var(--ink-3);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 上下文行：在哪个平台、谁在替我接（唯一会随状态变化的身份信息） */
.me-ctx {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-3);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-online {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  font-size: 11px;
  line-height: 1.55;
  color: var(--green);
  background: var(--green-soft);
  border-radius: 100px;
  padding: 1px 8px 1px 6px;
}

.me-online i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}

/* ---------- B 今日三指标：量 → 效 → 质 ----------
   只有「采纳率」是天然比例，只有它带填充；另两格只留空槽，
   保证三格基线对齐、节奏不断，同时诚实表达「这项没有基准」。
   注意：不复用 .mini-bar（dashboard.css）——它 track 是 --line-2、
   fill 是 --brand，套过来会变成橙色细线，在「今日数据」里会被读成警示。 */
.me-stats {
  display: flex;
  margin: 0 16px 16px;
  padding: 12px 0;
  background: #fff;
  border-radius: 12px;
}

.me-stat {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 12px;
}

.me-stat + .me-stat { border-left: 1px solid var(--line-2); }

.me-stat-l {
  font-size: 10.5px;
  color: var(--ink-3);
  line-height: 1.4;
}

.me-stat-n {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1.25;
}

/* 取不到上游值时显示「—」并退成弱色，避免被读成 0 */
.me-stat-n.is-empty { color: var(--ink-4); }

.me-track {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  overflow: hidden;
}

.me-track i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--ink);
}

.me-stat-f {
  font-size: 10px;
  color: var(--ink-4);
  line-height: 1.4;
  min-height: 14px;
  white-space: nowrap;
}

/* ---------- C 分组卡片 ---------- */
.me-group { margin: 0 16px 16px; }

.me-gl {
  margin: 0;
  padding: 0 4px 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: .06em;
  line-height: 1.4;
}

.me-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.me-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  padding: 0 12px 0 14px;
  border: 0;
  background: #fff;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background .14s;
}

/* 首行无上边线、末行无下边线 */
.me-row + .me-row { border-top: 1px solid var(--line-2); }

button.me-row:active { background: var(--surface); }

/* 不可点的行：不给箭头 + aria-disabled，避免假承诺 */
.me-row.is-static { cursor: default; }

.me-row-l {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.me-row-r {
  flex: none;
  font-size: 11px;
  color: var(--ink-4);
}

.me-ar {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--ink-4);
}

/* ---------- E 跨端入口 ---------- */
.me-cross {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 16px 16px;
  padding: 0 14px;
  min-height: 56px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .14s;
}

.me-cross:active { background: var(--surface); }

.me-cross-main {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
}

.me-cross-t {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.me-cross-s {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-3);
}

/* ---------- 抽屉里的说明文字 ---------- */
.sheet-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

