/* 宝客来 · 手机竖屏优先。一屏一件事，大字号大按钮。
   主题口径（四哥定稿）：稳重 + 稍喜庆 —— 暖米纸白底、深棕正文、琥珀金主色
   （老字号牌匾感，与米底同族最和谐；调研实锤：收银行业银豹同走暖色）。
   录音态保留红色（录音惯例，不与主色混）。 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --bg: #f7f2ea;        /* 暖米白 */
  --card: #fffdf8;      /* 纸白卡 */
  --card2: #f3ead9;     /* 浅米块 */
  --line: #e4d8c3;      /* 米色描线 */
  --txt: #40342a;       /* 深棕正文 */
  --dim: #8d7d6b;       /* 灰棕辅助 */
  --main: #a0621d;      /* ★主色：琥珀金（按钮/选中态，白字对比 ≈4.8:1） */
  --main-d: #7e4a12;    /* 按下/深一档 */
  --em: #8a5510;        /* 强调文字金（米底对比 ≈4.9:1，过 4.5 线） */
  --red: #c0392b;       /* 录音态/错误 */
  --green: #3e8e5a;
  --r: 14px;
}
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--txt);
  font: 17px/1.65 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
#root { max-width: 520px; margin: 0 auto; padding: 20px 18px 110px; }

/* 底部三 tab（生意 · 收成 · 我）：微信式固定导航，管"找得到"；页内仍一屏一任务 */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; display: flex;
  background: var(--card); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(122,90,32,.07);
  padding-bottom: env(safe-area-inset-bottom); z-index: 50;
}
.tabbar-it {
  flex: 1; min-height: 52px; border: 0; background: transparent;
  color: var(--dim); font-size: 15px; cursor: pointer; letter-spacing: 2px;
}
.tabbar-it.on { color: var(--em); font-weight: 700; box-shadow: inset 0 3px 0 var(--main); }

/* 顶部 */
.top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 22px; }
.brand { font-size: 21px; font-weight: 700; letter-spacing: 2px; color: var(--em); }
.brand small { font-size: 12px; color: var(--dim); letter-spacing: 0; font-weight: 400; margin-left: 8px; }
.who { font-size: 13px; color: var(--dim); }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(122,90,32,.05), 0 6px 18px rgba(122,90,32,.06); }
.card-h { font-size: 15px; color: var(--dim); margin: 0 0 12px; font-weight: 400; letter-spacing: .5px; }
.card-h b { color: var(--em); font-weight: 600; }

/* 大标题 */
h1 { font-size: 27px; line-height: 1.45; margin: 0 0 8px; font-weight: 700; }
h2 { font-size: 20px; margin: 0 0 10px; font-weight: 600; }
.sub { color: var(--dim); font-size: 15px; margin: 0 0 20px; }

/* 按钮：微信绿底白字（微信官方按钮同款） */
.btn {
  display: block; width: 100%; padding: 17px; margin-top: 12px;
  border: 0; border-radius: 12px; background: var(--main); color: #fff;
  font-size: 18px; font-weight: 700; letter-spacing: 1px; cursor: pointer;
  transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
  box-shadow: 0 2px 8px rgba(126,74,18,.18);
}
.btn:active { background: var(--main-d); transform: translateY(1px); box-shadow: 0 1px 3px rgba(126,74,18,.15); }
.btn[disabled] { opacity: .45; }
.btn.ghost { background: transparent; color: var(--txt); border: 1px solid var(--line); font-weight: 500; font-size: 16px; }
.btn.danger { background: transparent; color: var(--red); border: 1px solid #e4c8c0; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* 输入 */
textarea, input {
  width: 100%; padding: 15px; border-radius: 12px;
  background: var(--card2); border: 1px solid var(--line);
  color: var(--txt); font: inherit; font-size: 17px; line-height: 1.7;
  resize: vertical;
}
textarea:focus, input:focus { outline: 2px solid var(--main-d); outline-offset: -1px; }
textarea::placeholder, input::placeholder { color: #a3937f; }
label.f { display: block; font-size: 14px; color: var(--dim); margin: 16px 0 8px; }

/* 选择块 */
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 4px; }
.chip {
  padding: 12px 17px; min-height: 44px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card2); color: var(--txt); font-size: 16px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.chip:active { transform: scale(.97); }
.chip.on { background: var(--main); color: #fff; border-color: var(--main); font-weight: 700; box-shadow: inset 0 -2px 0 rgba(0,0,0,.08); }

/* 人设 7 维：三档 */
.dim { margin-bottom: 18px; }
.dim-t { font-size: 16px; margin-bottom: 9px; }
.dim-t span { color: var(--dim); font-size: 13px; margin-left: 6px; }
.seg { display: flex; gap: 8px; }
.seg button {
  flex: 1; padding: 13px 6px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card2);
  color: var(--dim); font-size: 14px; line-height: 1.4; cursor: pointer;
}
.seg button.on { background: var(--main); color: #fff; border-color: var(--main); font-weight: 700; }

/* 正文展示 */
.body-box {
  background: var(--card2); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; white-space: pre-wrap; font-size: 18px; line-height: 1.9;
  min-height: 90px;
}
.body-box.editable { cursor: text; }
.mark { color: var(--red); text-decoration: underline wavy var(--red); text-underline-offset: 4px; }

/* 提示条 */
.note { font-size: 14px; color: var(--dim); margin-top: 12px; line-height: 1.6; }
.warn { border-left: 3px solid var(--main); background: #faedd6; padding: 13px 15px; border-radius: 8px; font-size: 14px; color: #7a5a20; margin-top: 12px; line-height: 1.7; }
.warn b { color: var(--em); }
.err { color: var(--red); font-size: 14px; margin-top: 10px; }

/* 数字 */
.nums { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.num { background: var(--card2); border-radius: 12px; padding: 15px; text-align: center; }
.num em { display: block; font-size: 27px; font-style: normal; font-weight: 700; color: var(--em); }
.num span { font-size: 13px; color: var(--dim); }

/* 待办 */
.todo { display: flex; gap: 13px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.todo:last-child { border-bottom: 0; }
.todo-i { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--card2); color: var(--em); font-size: 14px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.todo-b { flex: 1; }
.todo-t { font-size: 17px; font-weight: 600; margin-bottom: 3px; }
.todo-s { font-size: 14px; color: var(--dim); line-height: 1.6; }
.todo.done { opacity: .45; }
.todo.done .todo-t { text-decoration: line-through; }

/* 步骤条 */
.steps { display: flex; gap: 6px; margin-bottom: 24px; }
.steps i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.steps i.on { background: var(--main); }
.steps i.sk { background: #e0d2ba; }

/* toast：深棕底白字，浅色页面上反而醒目、稳重 */
.toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%);
  background: #40342a; color: #fff8f0; padding: 13px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; z-index: 99; max-width: 88%; text-align: center;
  box-shadow: 0 8px 30px rgba(64,52,42,.35);
}
.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid #c9b89e; border-top-color: var(--main); border-radius: 50%; animation: sp .7s linear infinite; vertical-align: -2px; margin-right: 8px; }
@keyframes sp { to { transform: rotate(360deg); } }
.hide { display: none !important; }

/* ---- 按住说话（忙人设计：大按钮、录音态看得见、松开即转） ---- */
.mic {
  display: block; width: 100%; min-height: 56px; margin-top: 4px;
  border-radius: 999px; border: 1.5px solid var(--main);
  background: var(--card2); color: var(--em); font-weight: 700;
  font-size: 18px; letter-spacing: 1px;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.mic:active { background: #f1e3cb; }
.mic.rec {
  background: var(--red); border-color: var(--red); color: #fff;
  animation: micPulse 1.1s ease-in-out infinite;
}
.mic:disabled { opacity: .7; }
@keyframes micPulse { 50% { opacity: .72; } }
#sayBox {
  width: 100%; margin: 12px 0 4px; min-height: 44px;
  font-size: 18px; line-height: 1.45; padding: 12px;
  border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--card); color: var(--txt); resize: vertical;
}

/* ---- B2B 客户卡（今天该联系谁） ---- */
.custs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.cust-due {
  font-size: 13px; padding: 2px 9px; border-radius: 999px;
  background: var(--card2); color: var(--em); white-space: nowrap;
}


/* ---- 精修层（2026-10-31 打包版）：过渡、淡入、按压反馈 ---- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#root > * { animation: fadeUp .18s ease; }
.seg button { transition: background .15s ease, color .15s ease; }
textarea, input { transition: border-color .15s ease; }
textarea:focus, input:focus { outline: 2px solid var(--main); outline-offset: -1px; background: var(--card); }

/* ---- 微信内引导页 ---- */
.wg-step { font-size: 21px; font-weight: 700; color: var(--em); margin: 12px 0 2px; }
