/* ============================================================
   AI 销售陪练 · H5 演练页
   视觉依据：05_视觉设计规范.md（颜色是信息，不是风格）
   ============================================================ */

:root {
  --brand: #3555F5;
  --brand-deep: #2A46E0;
  --brand-050: #EEF1FF;
  --brand-100: #DCE4FF;
  --accent: #FF7A1A;
  --accent-050: #FEF3E7;
  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #E5484D;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --muted-2: #94A3B8;
  --line: #E6EAF2;
  --line-2: #F4F6FB;
  --bg: #F6F8FC;
  --surface: #FFFFFF;
  --call-bg: #0A1020;
  --call-surface: #131C31;
  --call-text: #E2E8F0;
  --radius-card: 16px;
  --radius-panel: 14px;
  --radius-btn: 12px;
  --radius-tag: 6px;
  --shadow-btn: 0 8px 20px rgba(53, 85, 245, .25);
  --shadow-accent: 0 8px 20px rgba(255, 122, 26, .26);
  --shadow-float: 0 10px 30px rgba(15, 23, 42, .10);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
          "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --mono: "SF Mono", "Roboto Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 620px at 12% -4%, #E9EEFF 0%, rgba(233, 238, 255, 0) 62%),
    radial-gradient(760px 520px at 102% 104%, #FFF1E4 0%, rgba(255, 241, 228, 0) 58%),
    #E8ECF4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  -webkit-font-smoothing: antialiased;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------------- 桌面舞台 + 手机框 ---------------- */

.stage {
  display: flex;
  align-items: center;
  gap: 68px;
  max-width: 1080px;
}

.stage-copy {
  width: 316px;
  flex: none;
  color: var(--ink);
}

.stage-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
}

.stage-copy h1 {
  margin: 16px 0 14px;
  font-size: 34px;
  line-height: 1.28;
  letter-spacing: -.8px;
  font-weight: 700;
}

.stage-copy p {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

.stage-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .66);
  font-size: 11px;
  color: var(--muted);
}

.stage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .12);
}

.phone {
  position: relative;
  width: 390px;
  height: min(844px, calc(100dvh - 56px));
  min-height: 620px;
  border-radius: 44px;
  background: var(--bg);
  box-shadow:
    0 0 0 8px #0B1220,
    0 0 0 9px rgba(255, 255, 255, .10),
    0 34px 70px rgba(15, 23, 42, .30);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.statusbar {
  flex: none;
  height: 30px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink);
  background: transparent;
  transition: color .2s ease;
  z-index: 4;
}

.phone.is-dark .statusbar {
  color: var(--call-text);
  background: var(--call-bg);
}

.statusbar-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.signal {
  width: 13px;
  height: 8px;
  background:
    linear-gradient(to right, currentColor 0 2px, transparent 2px 3px,
    currentColor 3px 5px, transparent 5px 6px, currentColor 6px 8px,
    transparent 8px 9px, currentColor 9px 11px, transparent 11px 12px,
    currentColor 12px 13px);
  -webkit-mask: linear-gradient(to top, transparent 0 45%, #000 45%);
          mask: linear-gradient(to top, transparent 0 45%, #000 45%);
  opacity: .8;
}

.battery {
  position: relative;
  width: 18px;
  height: 9px;
  border: 1px solid currentColor;
  border-radius: 2.5px;
  opacity: .8;
}

.battery::before {
  content: "";
  position: absolute;
  inset: 1.5px 4px 1.5px 1.5px;
  border-radius: 1px;
  background: currentColor;
}

.battery::after {
  content: "";
  position: absolute;
  top: 2px;
  right: -3px;
  width: 2px;
  height: 3px;
  border-radius: 0 1px 1px 0;
  background: currentColor;
}

.app {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ---------------- 通用 ---------------- */

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  animation: screen-in .22s ease-out both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}

.scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.ico {
  width: 18px;
  height: 18px;
  flex: none;
  display: block;
}

.ico-14 { width: 14px; height: 14px; }
.ico-16 { width: 16px; height: 16px; }
.ico-20 { width: 20px; height: 20px; }

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-btn);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .01em;
  transition: opacity .18s ease, transform .12s ease, background-color .18s ease;
  user-select: none;
}

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

.btn.primary {
  color: #fff;
  background: var(--brand);
  box-shadow: var(--shadow-btn);
}

.btn.primary:active { background: var(--brand-deep); }

.btn.accent {
  color: #fff;
  background: var(--accent);
  box-shadow: var(--shadow-accent);
}

.btn.ghost {
  color: var(--ink-2);
  background: var(--line-2);
}

.btn.ghost-light {
  color: var(--brand-deep);
  background: var(--brand-050);
}

.btn.is-locked {
  color: #8D99AE;
  background: #EEF1F7;
  box-shadow: none;
  cursor: pointer;
}

.btn.sm {
  width: auto;
  min-height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 12.5px;
}

.btn[disabled] { opacity: .55; pointer-events: none; }

.link-btn {
  display: inline;
  padding: 3px 2px;
  font-size: inherit;
  font-weight: 600;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: var(--radius-tag);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.b-brand  { color: var(--brand-deep); background: var(--brand-050); }
.b-warm   { color: #B45309; background: var(--accent-050); }
.b-hit    { color: #15803D; background: #E9F7EF; }
.b-part   { color: #B45309; background: #FEF3E7; }
.b-miss   { color: #B91C1C; background: #FDECEC; }
.b-na     { color: var(--muted); background: var(--line-2); }
.b-soft   { color: var(--muted); background: var(--line-2); }
.b-danger-line { color: #B91C1C; background: #FDECEC; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--line-2);
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 14px;
}

.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 2px 10px;
}

.sec-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
}

.sec-head span {
  font-size: 10.5px;
  color: var(--muted);
}

.caption {
  font-size: 10.5px;
  line-height: 1.7;
  color: var(--muted);
}

/* 加载 / 错误 */

.center-screen {
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(140deg, var(--brand), var(--brand-deep));
  box-shadow: var(--shadow-btn);
}

.brand-mark .ico { width: 26px; height: 26px; }

.loading-title {
  margin: 16px 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.loading-sub { font-size: 11.5px; color: var(--muted); }

.loading-bar {
  position: relative;
  width: 132px;
  height: 4px;
  margin-top: 20px;
  border-radius: 999px;
  background: var(--brand-100);
  overflow: hidden;
}

.loading-bar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 42%;
  border-radius: 999px;
  background: var(--brand);
  animation: load-slide 1.6s ease-in-out 3;
}

@keyframes load-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(340%); }
}

.error-title {
  margin: 16px 0 6px;
  font-size: 17px;
  font-weight: 700;
}

.error-text {
  max-width: 24em;
  margin: 0;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

.error-box {
  width: 100%;
  margin: 18px 0 0;
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--line-2);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  text-align: left;
  word-break: break-all;
}

.error-actions {
  display: flex;
  gap: 9px;
  width: 100%;
  margin-top: 16px;
}

.error-actions .btn { width: auto; flex: 1; min-height: 44px; font-size: 13.5px; }

/* Toast */

.toast-host {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(15, 23, 42, .94);
  color: #F8FAFC;
  box-shadow: var(--shadow-float);
  font-size: 12.5px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(7px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }

.toast .ico { width: 16px; height: 16px; margin-top: 1px; }
.toast span { flex: 1; }

.toast-error .ico { color: #FCA5A5; }
.toast-warn .ico { color: #FCD34D; }
.toast-ok .ico { color: #6EE7A8; }
.toast-info .ico { color: #A5B4FC; }

/* ---------------- 入口 ---------------- */

.entry .scroll {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px 22px calc(26px + env(safe-area-inset-bottom));
}

.entry-brand { margin-bottom: 20px; }

.entry h1 {
  margin: 0 0 9px;
  font-size: 25px;
  line-height: 1.3;
  letter-spacing: -.4px;
  font-weight: 700;
}

.entry-sub {
  margin: 0;
  max-width: 24em;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}

.entry-card {
  margin-top: 26px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 8px 30px rgba(15, 23, 42, .04);
}

.entry-label {
  display: block;
  margin: 0 0 8px 2px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--muted);
}

.field {
  display: flex;
  align-items: center;
  height: 48px;
  margin-bottom: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: var(--line-2);
  transition: border-color .18s ease, background-color .18s ease;
}

.field:focus-within {
  border-color: var(--brand);
  background: var(--surface);
}

.field-prefix {
  flex: none;
  padding-right: 10px;
  margin-right: 10px;
  border-right: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted-2);
}

.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13.5px;
  letter-spacing: .01em;
  outline: none;
}

.entry-hint {
  margin-top: 18px;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
  text-align: center;
}

.entry-hint .link-btn { margin-left: 2px; }

.entry-foot {
  margin-top: 26px;
  font-size: 9.5px;
  line-height: 1.8;
  color: var(--muted-2);
  text-align: center;
  word-break: break-all;
}

/* ---------------- 首页 ---------------- */

.home .scroll { padding: 8px 16px calc(24px + env(safe-area-inset-bottom)); }

.home-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 0 12px;
}

.avatar {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-deep);
  background: linear-gradient(135deg, #E4E9FF, #C9D4FF);
  border: 1px solid rgba(53, 85, 245, .12);
}

.home-id { flex: 1; min-width: 0; }

.hi {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.2px;
  line-height: 1.35;
}

.home-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
}

.switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 9px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 10.5px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.switch-btn .ico { width: 13px; height: 13px; }

.quota {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
}

.ring {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring-svg { display: block; transform: rotate(-90deg); }

.ring-fill {
  transition: stroke-dashoffset .6s cubic-bezier(.2, .8, .2, 1);
}

.ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.ring-center b {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.3px;
  font-variant-numeric: tabular-nums;
}

.ring-center span {
  margin-top: 3px;
  font-size: 8px;
  color: var(--muted);
  letter-spacing: .02em;
}

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

.quota-kicker {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--muted);
}

.quota-num {
  margin-top: 5px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.2px;
  font-variant-numeric: tabular-nums;
}

.quota-num em {
  font-style: normal;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 3px;
}

.quota-meta {
  margin-top: 4px;
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid #F7DFBF;
  border-radius: var(--radius-panel);
  background: var(--accent-050);
}

.notice-ico {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: #FFE9D2;
}

.notice-ico .ico { width: 15px; height: 15px; }

.notice b {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #9A4A0B;
}

.notice p {
  margin: 2px 0 0;
  font-size: 10.5px;
  line-height: 1.6;
  color: #B4651F;
}

.hero {
  position: relative;
  margin-top: 11px;
  padding: 15px 15px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--brand);
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--brand);
}

.hero-kicker .ico { width: 12px; height: 12px; }

.hero-top .badge { margin-left: auto; }

.hero h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -.2px;
  font-weight: 700;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 0;
  font-size: 10.5px;
  color: var(--muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-meta .ico { width: 12px; height: 12px; color: var(--muted-2); }

.hero-quote {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-radius: 9px;
  background: var(--line-2);
  font-size: 10.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

.hero-quote b { color: var(--muted); font-weight: 600; }

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 13px;
}

.locked-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  border-radius: var(--radius-btn);
  background: #F0F3F8;
  color: #8D99AE;
  font-size: 12.5px;
  font-weight: 600;
}

.locked-row .ico { width: 13px; height: 13px; }

.scene-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.scene-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.scene-ico {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  background: var(--brand-050);
}

.scene-ico .ico { width: 17px; height: 17px; }

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

.scene-name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.scene-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  font-size: 9.5px;
  color: var(--muted);
}

.scene-row .badge { flex: none; }

.mini-btn {
  flex: none;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 9px;
  background: var(--brand-050);
  color: var(--brand-deep);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color .18s ease, opacity .18s ease;
}

.mini-btn .ico { width: 12px; height: 12px; }

.mini-btn.is-locked {
  background: #EEF1F7;
  color: #8D99AE;
}

/* 小控件补齐 44px 热区 */
.mini-btn, .switch-btn, .nav-back, .nav-link, .link-btn { position: relative; }
.mini-btn::after, .switch-btn::after, .nav-back::after, .nav-link::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 12px;
}

.home-foot {
  margin: 20px 0 0;
  text-align: center;
  font-size: 9.5px;
  line-height: 1.8;
  color: var(--muted-2);
}

/* ---------------- 对话（唯一深色） ---------------- */

.chat {
  background: var(--call-bg);
  color: var(--call-text);
}

.chat-top {
  flex: none;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 15px 11px;
  border-bottom: 1px solid rgba(148, 163, 184, .10);
}

.call-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #DCE4FF;
  background: linear-gradient(145deg, #22305A, #141C33);
  box-shadow:
    0 0 0 3px rgba(53, 85, 245, .26),
    0 0 0 7px rgba(53, 85, 245, .10);
}

.call-avatar .ico { width: 20px; height: 20px; }

.call-who { flex: 1; min-width: 0; }

.call-name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.call-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 2px;
  font-size: 10px;
  color: #93A4C4;
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, .12);
}

.call-timer {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .10);
  color: #B9C6DE;
  font-family: var(--mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.call-timer .ico { width: 12px; height: 12px; }

.call-note {
  flex: none;
  margin: 10px 15px 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(148, 163, 184, .08);
  color: #8C9DBC;
  font-size: 9.5px;
  line-height: 1.55;
  text-align: center;
}

.msgs {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 15px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.msgs::-webkit-scrollbar { display: none; }

.msg {
  display: flex;
  flex-direction: column;
  max-width: 84%;
  animation: msg-in .2s ease-out both;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

.msg.customer { align-self: flex-start; align-items: flex-start; }
.msg.user { align-self: flex-end; align-items: flex-end; }

.bubble {
  max-width: 24em;
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.msg.customer .bubble {
  color: var(--call-text);
  background: var(--call-surface);
  border-radius: 14px 14px 14px 4px;
}

.msg.user .bubble {
  color: #fff;
  background: var(--brand);
  border-radius: 14px 14px 4px 14px;
  box-shadow: 0 6px 16px rgba(53, 85, 245, .22);
}

.msg.is-failed .bubble {
  opacity: .55;
  outline: 1px dashed rgba(229, 72, 77, .7);
  outline-offset: 2px;
}

.msg-meta {
  margin-top: 4px;
  padding: 0 2px;
  font-size: 9px;
  color: #7486A8;
  font-variant-numeric: tabular-nums;
}

.msg.user .msg-meta { text-align: right; }

.msg.system {
  align-self: center;
  max-width: 100%;
  animation: none;
}

.msg.system .bubble {
  padding: 6px 12px;
  border: 1px dashed rgba(148, 163, 184, .28);
  border-radius: 999px;
  background: transparent;
  color: #7486A8;
  font-size: 11.5px;
}

.typing .bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 35px;
  padding: 11px 14px;
}

.typing i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #8FA2C6;
  animation: typing-pulse .8s ease-in-out 3;
}

.typing i:nth-child(2) { animation-delay: .13s; }
.typing i:nth-child(3) { animation-delay: .26s; }

@keyframes typing-pulse {
  0%, 100% { opacity: .3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.composer {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 9px 14px 0;
  background: var(--call-bg);
}

.composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 96px;
  padding: 11px 12px;
  border: 1px solid #22304D;
  border-radius: var(--radius-btn);
  background: var(--call-surface);
  color: var(--call-text);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.55;
  resize: none;
  outline: none;
  overflow-y: hidden;
  scrollbar-width: none;
  transition: border-color .18s ease;
}

.composer textarea::-webkit-scrollbar { width: 0; height: 0; }

.composer textarea::placeholder { color: #6B7C9E; }
.composer textarea:focus { border-color: rgba(53, 85, 245, .75); }

.send-btn {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--radius-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 6px 16px rgba(53, 85, 245, .26);
  transition: opacity .18s ease, transform .12s ease;
}

.send-btn .ico { width: 18px; height: 18px; }
.send-btn:active { transform: scale(.96); }
.send-btn[disabled] { opacity: .38; box-shadow: none; }

.end-bar {
  flex: none;
  padding: 8px 14px calc(10px + env(safe-area-inset-bottom));
  background: var(--call-bg);
}

.end-btn {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #293755;
  border-radius: var(--radius-btn);
  color: #B9C6DE;
  font-size: 12.5px;
  font-weight: 600;
  transition: background-color .18s ease, border-color .18s ease;
}

.end-btn .ico { width: 14px; height: 14px; }
.end-btn:active { background: var(--call-surface); border-color: #3A4A6C; }
.end-btn[disabled] { opacity: .55; }

/* ---------------- 报告 ---------------- */

.report { background: var(--bg); }

.nav {
  flex: none;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line-2);
  background: var(--bg);
}

.nav-back {
  width: 32px;
  height: 32px;
  margin-left: -7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-2);
}

.nav-back .ico { width: 18px; height: 18px; transform: rotate(180deg); }

.nav-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .01em;
}

.nav-link {
  margin-left: auto;
  padding: 6px 2px;
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
}

.report .scroll { padding: 8px 16px calc(92px + env(safe-area-inset-bottom)); }

.score-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 2px;
  text-align: center;
}

.score-ring {
  position: relative;
  width: 132px;
  height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-ring .ring-svg { position: absolute; inset: 0; }

.score-center {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.score-num {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -1.6px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.score-num.is-warm { font-size: 23px; letter-spacing: -.4px; color: var(--brand-deep); }

.score-tag {
  margin-top: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
}

.report-title {
  margin: 10px 0 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.report-sub {
  margin: 4px 0 0;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted);
}

.note-banner {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid #F7DFBF;
  border-radius: var(--radius-panel);
  background: var(--accent-050);
}

.note-banner .ico {
  width: 14px;
  height: 14px;
  margin-top: 1px;
  color: #B45309;
  flex: none;
}

.note-banner p {
  margin: 0;
  font-size: 11px;
  line-height: 1.65;
  color: #9A4A0B;
}

.cov { margin-top: 13px; }

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

.cov-top b { font-size: 12.5px; font-weight: 600; }

.cov-top span {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cov-bar {
  height: 6px;
  margin-top: 9px;
  border-radius: 999px;
  background: var(--brand-100);
  overflow: hidden;
}

.cov-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--brand);
  transition: width .6s cubic-bezier(.2, .8, .2, 1);
}

.cov-counts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 11px;
}

.cov-count {
  padding: 7px 4px 6px;
  border-radius: 9px;
  background: var(--line-2);
  text-align: center;
}

.cov-count b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.cov-count span {
  display: block;
  margin-top: 3px;
  font-size: 9px;
  color: var(--muted);
}

.cov-count.c-hit b { color: var(--success); }
.cov-count.c-part b { color: var(--warning); }
.cov-count.c-miss b { color: var(--danger); }
.cov-count.c-na b { color: var(--muted-2); }

.points {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.point {
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}

.point-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.point-score {
  margin-left: auto;
  flex: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}

.point-title {
  margin: 7px 0 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  max-width: 24em;
}

.point-meta {
  margin-top: 4px;
  font-size: 9.5px;
  line-height: 1.6;
  color: var(--muted);
}

.point-evidence {
  margin: 9px 0 0;
  padding: 8px 10px;
  border-left: 3px solid var(--line);
  border-radius: 0 8px 8px 0;
  background: #FAFBFD;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 24em;
  overflow-wrap: anywhere;
}

.point-evidence.e-hit { border-left-color: var(--success); background: #F7FCF9; }
.point-evidence.e-part { border-left-color: var(--warning); background: #FFFCF5; }
.point-evidence.e-miss { border-left-color: var(--danger); background: #FFF8F8; }

.point-reason {
  margin: 7px 0 0;
  font-size: 9.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 26em;
}

.point-empty {
  margin: 8px 0 0;
  font-size: 10px;
  color: var(--muted-2);
}

.report-foot {
  margin: 16px 2px 0;
  font-size: 9.5px;
  line-height: 1.7;
  color: var(--muted-2);
  text-align: center;
}

.report-cta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(246, 248, 252, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.report-cta .btn { min-height: 48px; }

/* ---------------- 移动端 ---------------- */

@media (max-width: 720px) {
  body {
    padding: 0;
    display: block;
    background: var(--bg);
  }

  .stage { display: block; max-width: none; }
  .stage-copy { display: none; }

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

  .statusbar { display: none; }

  .home .scroll { padding-top: calc(8px + env(safe-area-inset-top)); }
  .chat-top { padding-top: calc(10px + env(safe-area-inset-top)); }
  .report .nav { height: calc(46px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .entry .scroll { padding-top: calc(36px + env(safe-area-inset-top)); }

  .toast-host { bottom: calc(18px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .screen,
  .msg,
  .toast {
    animation: none !important;
    transition: none !important;
  }

  .ring-fill,
  .cov-bar i {
    transition: none !important;
  }

  .loading-bar::after,
  .typing i {
    animation: none !important;
    opacity: 1;
  }
}

/* 今日任务卡 */
.task-card { margin-bottom: 12px; }
.task-top { display: flex; align-items: center; gap: 6px; color: var(--brand); font-size: 12px; font-weight: 600; }
.task-due { margin-left: auto; color: var(--muted); font-weight: 400; font-size: 11px; }
.task-name { font-size: 15px; font-weight: 700; margin: 7px 0 9px; color: var(--ink); }
.task-bar { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; }
.task-bar i { display: block; height: 6px; background: var(--brand); border-radius: 4px; }
.task-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin: 6px 0 11px; }

/* 三个改法 */
.adv-list { display: flex; flex-direction: column; gap: 9px; }
.adv-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; }
.adv-t { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.adv-a { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; line-height: 1.55; }
.adv-w { font-size: 11px; color: var(--muted); margin-top: 5px; }
.adv-empty { background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 14px; text-align: center; font-size: 12px; color: var(--muted); }

.quick-row{display:flex;gap:10px;padding:2px 0 2px}
.quick{flex:1;display:flex;flex-direction:column;gap:3px;padding:12px 14px;border-radius:14px;
  background:#fff;border:1px solid var(--line);text-decoration:none;color:var(--ink)}
.quick b{font-size:13px}
.quick span{font-size:10.5px;color:var(--muted)}
.quick svg{width:16px;height:16px;color:var(--brand)}
