/* 天下无疾 · 网站版 全局样式（浅蓝白 · 品牌蓝 #2F6BE4 · 红角标 #FF4D4F） */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(180deg, #EAF2FF 0%, #F5F7FB 320px, #F5F7FB 100%);
  background-attachment: fixed;
  color: #1F2329;
  font-size: 15px;
  line-height: 1.6;
}
a { color: #2F6BE4; text-decoration: none; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; font-size: 15px; }

#app { display: flex; flex-direction: column; min-height: 100vh; }
#page { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 20px 16px 40px; }
@media (min-width: 768px) { #page { padding: 28px 24px 56px; } }

/* ---------- 顶部导航 ---------- */
#navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(47,107,228,.10);
}
.nav-inner { max-width: 1080px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 20px; }
.nav-logo { font-size: 19px; font-weight: 700; color: #2F6BE4; letter-spacing: .5px; display: flex; align-items: center; gap: 4px; }
.logo-star { color: #FF4D4F; font-size: 14px; }
.nav-links { display: flex; gap: 4px; margin-left: 12px; flex: 1; }
.nav-links a { color: #4E5566; padding: 6px 14px; border-radius: 999px; font-size: 15px; position: relative; transition: all .15s; }
.nav-links a:hover { background: #EDF3FF; color: #2F6BE4; }
.nav-links a.active { background: #2F6BE4; color: #fff; font-weight: 600; }
.badge-new { position: absolute; top: -1px; right: 4px; background: #FF4D4F; color: #fff; font-size: 9px; font-style: normal; line-height: 1; padding: 2px 4px; border-radius: 6px 6px 6px 0; transform: scale(.9); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-points { background: #FFF4E8; color: #C4730A; font-size: 13px; padding: 4px 12px; border-radius: 999px; font-weight: 600; }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; background: #2F6BE4; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; cursor: pointer; }
.nav-login-btn { padding: 6px 16px; border-radius: 999px; background: #2F6BE4; color: #fff; font-size: 14px; }
@media (max-width: 640px) {
  .nav-links { gap: 0; }
  .nav-links a { padding: 6px 9px; font-size: 14px; }
  .nav-logo { font-size: 17px; }
}

/* ---------- 页脚 ---------- */
#foot { text-align: center; padding: 22px 16px 30px; color: #8A8F99; font-size: 12.5px; line-height: 1.9; border-top: 1px solid rgba(47,107,228,.08); }
#foot .dim { opacity: .7; }
/* ICP 备案号：底部悬挂，按监管要求链接到工信部备案管理系统 */
#foot .beian { opacity: .8; }
#foot .beian a { color: inherit; text-decoration: none; }
#foot .beian a:hover { color: #2F6BE4; }
#foot .beian-sep { margin: 0 6px; opacity: .45; }
#foot .beian-badge { width: 15px; height: auto; vertical-align: -4px; margin-right: 3px; }

/* ---------- 通用卡片 / 按钮 / 表单 ---------- */
.card { background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 4px 20px rgba(31,58,109,.06); border: 1px solid rgba(47,107,228,.06); margin-bottom: 14px; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.card-title .sub { font-weight: 400; font-size: 12.5px; color: #8A8F99; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; cursor: pointer; border-radius: 12px; font-size: 15px; padding: 11px 22px; background: #2F6BE4; color: #fff; font-weight: 600; transition: opacity .15s, transform .1s; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: #EDF3FF; color: #2F6BE4; }
.btn.plain { background: #F2F4F8; color: #4E5566; font-weight: 500; }
.btn.danger { background: #FF4D4F; }
.btn.big { width: 100%; padding: 14px; font-size: 16px; border-radius: 14px; }
.btn.sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.input, textarea.input, select.input { width: 100%; border: 1.5px solid #E4E9F2; border-radius: 12px; padding: 11px 14px; background: #FAFBFD; outline: none; transition: border .15s; }
.input:focus { border-color: #2F6BE4; background: #fff; }
textarea.input { resize: vertical; min-height: 74px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13.5px; color: #4E5566; margin-bottom: 6px; font-weight: 600; }
.field .req { color: #FF4D4F; margin-left: 2px; }
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; }
.hint { font-size: 12.5px; color: #8A8F99; }
.empty { text-align: center; color: #A5ABB8; padding: 36px 0; font-size: 14px; }
.empty .ico { font-size: 34px; display: block; margin-bottom: 8px; opacity: .5; }
.loading { text-align: center; color: #8A8F99; padding: 30px 0; }
.link-more { font-size: 13px; color: #2F6BE4; cursor: pointer; }
.tag { display: inline-block; font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: #EDF3FF; color: #2F6BE4; margin-right: 6px; }
.tag.warn { background: #FFF4E8; color: #C4730A; }
.tag.ok { background: #E8F7EF; color: #1E8E5A; }
.divider { height: 1px; background: #EEF1F6; margin: 14px 0; }
.mt8 { margin-top: 8px; } .mt14 { margin-top: 14px; } .mb14 { margin-bottom: 14px; }

/* ---------- Toast / Modal / ActionSheet ---------- */
#toast-wrap { position: fixed; top: 70px; left: 0; right: 0; z-index: 999; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: rgba(20,26,40,.88); color: #fff; padding: 10px 20px; border-radius: 12px; font-size: 14px; max-width: 86vw; animation: fadeIn .2s; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; } }
#modal-root, #sheet-root { position: fixed; inset: 0; z-index: 500; pointer-events: none; }
#modal-root .mask, #modal-root .modal, #sheet-root .mask, #sheet-root .sheet { pointer-events: auto; }
.mask { position: absolute; inset: 0; background: rgba(15,23,42,.45); animation: fadeIn .18s; }
.modal { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: #fff; border-radius: 18px; padding: 24px; width: min(92vw, 430px); max-height: 82vh; overflow: auto; animation: popIn .2s; }
@keyframes popIn { from { opacity: 0; transform: translate(-50%,-46%) scale(.96); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
.modal h3 { font-size: 17px; margin-bottom: 12px; padding-right: 30px; }
.modal-close { position: absolute; top: 14px; right: 16px; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #8A8F99; cursor: pointer; background: #F2F4F8; transition: all .15s; }
.modal-close:hover { background: #E4E9F2; color: #3D4350; }
.modal .modal-body { font-size: 14.5px; color: #3D4350; white-space: pre-wrap; word-break: break-word; }
.modal .modal-foot { display: flex; gap: 10px; margin-top: 20px; }
.modal .modal-foot .btn { flex: 1; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 76vh; overflow: auto; animation: slideUp .22s; }
@keyframes slideUp { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
.sheet h3 { font-size: 16px; margin-bottom: 14px; text-align: center; }
.sheet-item { padding: 13px 8px; border-bottom: 1px solid #F0F2F6; cursor: pointer; font-size: 15px; }
.sheet-item:last-child { border-bottom: none; }
.sheet-item:hover { background: #F6F9FF; }
.sheet-cancel { margin-top: 12px; text-align: center; color: #8A8F99; padding: 10px; cursor: pointer; }

/* ---------- 首页 ---------- */
.hero-greet { text-align: center; font-size: 26px; font-weight: 800; margin: 26px 0 18px; letter-spacing: 1px; }
.hero-greet .star { color: #FF4D4F; }
.ask-card { background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 6px 26px rgba(31,58,109,.08); }
.ask-card textarea { width: 100%; border: none; outline: none; resize: vertical; min-height: 86px; font-size: 16px; line-height: 1.7; background: transparent; }
/* 两行式：说明文案独占一行，第二行才是按钮（面诊/舌诊靠左，发送顶到最右） */
.ask-bar { display: flex; flex-direction: column; align-items: stretch; gap: 9px; margin-top: 10px; }
/* 文案独占一行后宽度充裕，只在极端窄屏才轮到省略号 */
.ask-bar .hint { min-width: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask-row { display: flex; align-items: center; gap: 8px; }
.ask-tools { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.ask-spacer { flex: 1 1 auto; min-width: 20px; }   /* 把发送钮顶到最右，并保证最小留白 */
/* 面诊 / 舌诊 / 病历：32×32 纯图标方块钮（原为带文字、独占一行的大按钮）。
   挂在 .ask-bar（首页提问卡）或 .ask-tools（对话页底部）下都算，两处同一尺寸。 */
.ask-bar .btn-face, .ask-bar .btn-tongue, .ask-bar .btn-medical,
.ask-tools .btn-face, .ask-tools .btn-tongue, .ask-tools .btn-medical {
  width: 32px; height: 32px; padding: 0; justify-content: center;
  font-size: 13px; gap: 5px; flex: 0 0 auto; border-radius: 10px; position: relative;
}
/* 视觉做小、热区不小：向外扩 7px，实际可点区域 46×46，仍不占布局 */
.ask-bar .btn-face::after, .ask-bar .btn-tongue::after, .ask-bar .btn-medical::after,
.ask-tools .btn-face::after, .ask-tools .btn-tongue::after, .ask-tools .btn-medical::after {
  content: ''; position: absolute; top: -7px; right: -7px; bottom: -7px; left: -7px;
}
.ask-bar .btn-face .ico, .ask-bar .btn-tongue .ico, .ask-bar .btn-medical .ico,
.ask-tools .btn-face .ico, .ask-tools .btn-tongue .ico, .ask-tools .btn-medical .ico { font-size: 16px; line-height: 1; }
/* 对话页底部：三个入口与输入框之间留一口气 */
.chat-foot .chat-tools { margin-bottom: 8px; }
.ask-send { width: 38px; height: 38px; border-radius: 50%; background: #2F6BE4; color: #fff; border: none; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .1s, opacity .15s; flex: none; }
.ask-send:hover { opacity: .9; } .ask-send:active { transform: scale(.92); }
.ask-send:disabled { background: #C6D4F2; cursor: not-allowed; }
.grid-entries { display: none; }   /* 首页宫格入口已下线，保留类名兼容 */
.sample-list .sample { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px dashed #ECF0F7; cursor: pointer; font-size: 14.5px; color: #3D4350; }
.sample-list .sample:last-child { border-bottom: none; }
.sample-list .sample:hover { color: #2F6BE4; }
.sample-list .dot { color: #2F6BE4; flex: none; }
.expert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.expert-item { text-align: center; cursor: pointer; padding: 10px 4px; border-radius: 14px; transition: background .15s; }
.expert-item:hover { background: #F0F5FF; }
.expert-item img, .expert-item .av { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; margin-bottom: 6px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; font-weight: 700; }
.expert-item .nm { font-size: 13.5px; font-weight: 600; color: #2A3040; }
.expert-item .era { font-size: 11px; color: #8A8F99; }
.disclaimer { text-align: center; font-size: 12px; color: #A5ABB8; margin-top: 18px; }

/* ---------- 首页 · 针刺-DNA 处方推理卡 + 结构化处方单弹层 ---------- */
/* 与上方提问卡拉开间距，形成两个功能区的视觉呼吸感 */
#acu-card { margin-top: 26px; }
#acu-card .card-title .sub { margin-left: 8px; }
.acu-samples { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.acu-modal { width: min(94vw, 620px); padding: 20px 18px; }
.acu-modal h3 { padding-right: 30px; font-size: 16px; }
.acu-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-bottom: 6px; }
.acu-plan-id { margin-left: auto; }
.acu-sec { font-size: 13.5px; font-weight: 700; color: #2F6BE4; margin: 14px 0 8px; display: flex; align-items: center; gap: 7px; }
.acu-sec::before { content: ''; width: 3.5px; height: 14px; background: #2F6BE4; border-radius: 3px; }
.acu-point { border: 1px solid #E9EEF6; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.acu-pt-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 14.5px; }
.acu-kv { display: flex; gap: 8px; font-size: 13px; padding: 5px 0; border-bottom: 1px dashed #F0F2F6; }
.acu-kv:last-child { border-bottom: none; }
.acu-kv .k { color: #8A8F99; flex: none; width: 6.5em; font-weight: 600; }
.acu-kv .v { color: #2A3040; flex: 1; word-break: break-word; }
.acu-methods { font-size: 13px; line-height: 1.8; color: #2A3040; }
.acu-body { font-size: 13px; color: #3D4350; line-height: 1.7; }
.acu-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.acu-chain { font-size: 12.5px; color: #5B6474; padding-left: 18px; line-height: 1.9; }
.acu-fb { margin-top: 16px; background: #F7FAFF; border: 1px solid #D9E7FB; border-radius: 12px; padding: 12px; }
.acu-fb-row { display: flex; gap: 8px; margin-top: 8px; }
.acu-fb-row .input { padding: 8px 10px; font-size: 13.5px; border-radius: 10px; }
.acu-fb-row .btn { flex: none; }
@media (max-width: 640px) { .acu-fb-row { flex-wrap: wrap; } .acu-fb-row .input { flex: 1 1 44%; } .acu-fb-row .btn { flex: 1 1 100%; } }
.acu-disclaimer { font-size: 11.5px; color: #A08C6B; background: #FBF7EE; border: 1px solid #E8DCC3; border-radius: 10px; padding: 9px 11px; margin-top: 12px; line-height: 1.7; }

/* ---------- 登录（一体化布局：左品牌面板 + 右表单） ---------- */
.auth-shell { display: flex; max-width: 860px; margin: 4vh auto; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 12px 44px rgba(31,58,109,.13); border: 1px solid rgba(47,107,228,.06); }
.auth-side { flex: 1.05; background: linear-gradient(160deg, #2F6BE4 0%, #4C7DF0 60%, #5B8DEF 100%); color: #fff; padding: 44px 38px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.auth-brand { font-size: 25px; font-weight: 800; letter-spacing: 1px; display: flex; align-items: center; gap: 7px; }
.auth-brand .star { color: #FFD34D; font-size: 17px; }
.auth-slogan { font-size: 16.5px; line-height: 1.85; font-weight: 600; opacity: .96; }
.auth-feat { list-style: none; font-size: 13.5px; line-height: 1.6; opacity: .88; display: flex; flex-direction: column; gap: 12px; }
.auth-feat li { display: flex; align-items: flex-start; gap: 9px; }
.auth-feat i { font-style: normal; color: #FFD34D; font-size: 11px; margin-top: 4px; }
.auth-main { flex: 1; padding: 40px 38px 32px; display: flex; flex-direction: column; justify-content: center; }
.auth-main h2 { font-size: 22px; font-weight: 800; color: #1F2329; }
.auth-sub { font-size: 13px; color: #8A8F99; margin: 6px 0 20px; line-height: 1.6; }
.auth-tabs { display: flex; background: #EEF2F8; border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.auth-tabs button { flex: 1; border: none; background: transparent; padding: 10px 4px; border-radius: 9px; font-size: 14.5px; color: #5B6474; cursor: pointer; transition: all .15s; }
.auth-tabs button.on { background: #fff; color: #2F6BE4; font-weight: 700; box-shadow: 0 2px 8px rgba(31,58,109,.10); }
.auth-main .input { padding: 13px 15px; border-radius: 12px; background: #F5F7FA; border-color: transparent; }
.auth-main .input:focus { background: #fff; }
.auth-main .field label { font-size: 13px; color: #6B7385; }
.auth-submit { margin-top: 4px; letter-spacing: 2px; }
.auth-agree { margin-top: 16px; font-size: 11.5px; color: #A5ABB8; text-align: center; line-height: 1.8; }
.sms-row { display: flex; gap: 10px; }
.sms-row .input { flex: 1; min-width: 0; }
.sms-row .sms-send { flex: none; min-width: 112px; padding: 12px; font-size: 14px; }
.sms-row .sms-send:disabled { opacity: .6; }
@media (max-width: 768px) {
  .auth-shell { flex-direction: column; margin: 0 auto; border-radius: 18px; box-shadow: 0 6px 30px rgba(31,58,109,.10); }
  .auth-side { padding: 24px 22px 22px; gap: 0; }
  .auth-brand { font-size: 20px; }
  .auth-slogan { font-size: 13.5px; margin-top: 8px; line-height: 1.7; }
  .auth-feat { display: none; }
  .auth-main { padding: 24px 22px 22px; }
  .auth-main h2 { font-size: 19px; }
  .auth-sub { margin-bottom: 16px; }
  .sms-row .sms-send { min-width: 102px; padding: 12px 8px; font-size: 13px; }
}

/* ---------- 研习页 ---------- */
.person-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.p-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: #F2F5FA; border-radius: 999px; font-size: 14px; cursor: pointer; border: 1.5px solid transparent; transition: all .15s; }
.p-chip .pv { width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.p-chip.on { background: #EDF3FF; border-color: #2F6BE4; color: #2F6BE4; font-weight: 600; }
.person-info { display: flex; gap: 12px; align-items: center; background: #F6F9FF; border-radius: 14px; padding: 12px 14px; }
.person-info .pv { width: 44px; height: 44px; border-radius: 50%; color: #fff; font-size: 18px; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.hist-item { display: flex; gap: 10px; padding: 11px 4px; border-bottom: 1px dashed #ECF0F7; cursor: pointer; align-items: flex-start; }
.hist-item:last-child { border-bottom: none; }
.hist-item .cb { width: 19px; height: 19px; border-radius: 6px; border: 2px solid #C9D4E8; flex: none; margin-top: 2px; position: relative; transition: all .12s; }
.hist-item.on .cb { background: #2F6BE4; border-color: #2F6BE4; }
.hist-item.on .cb::after { content: '✓'; color: #fff; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.hist-item .txt { flex: 1; min-width: 0; }
.hist-item .t1 { font-size: 14px; font-weight: 600; color: #2A3040; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-item .t2 { font-size: 12px; color: #8A8F99; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match-main { display: flex; gap: 14px; align-items: center; background: linear-gradient(135deg, #EDF3FF, #F6FBFF); border-radius: 16px; padding: 16px; }
.match-main .av, .match-main img { width: 62px; height: 62px; border-radius: 50%; flex: none; object-fit: cover; }
.match-main .nm { font-size: 18px; font-weight: 800; }
.match-main .sp { font-size: 12.5px; color: #5B6474; margin: 2px 0 6px; }
.alt-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.alt-item { background: #F2F5FA; padding: 7px 13px; border-radius: 10px; font-size: 13px; cursor: pointer; }
.alt-item:hover { background: #EDF3FF; color: #2F6BE4; }

/* ---------- 对话页 ---------- */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 56px - 56px); max-width: 860px; margin: 0 auto; padding: 0 12px; }
@media (max-width: 640px) { .chat-wrap { height: calc(100vh - 56px - 46px); } }
/* 头部两行：第一行居中标题「正在请教 X 祖师」，第二行按钮组右对齐。
   原先头像 + 名字 + 按钮挤一行，名字被按钮抢掉宽度直接看不见。 */
.chat-head { display: flex; align-items: center; flex-wrap: wrap; row-gap: 8px; padding: 12px 4px; border-bottom: 1px solid #E9EEF6; position: relative; }
.chat-head .chat-back { position: absolute; left: 2px; top: 12px; color: #8A8F99; font-size: 20px; line-height: 1; text-decoration: none; }
.chat-title { width: 100%; text-align: center; font-size: 16px; font-weight: 700; color: #2B3446; }
.chat-head .av, .chat-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.chat-head .nm { font-size: 16px; font-weight: 700; }
.chat-head .sp { font-size: 12px; color: #8A8F99; }
.chat-head .spacer { flex: 1; }
/* 空间不足时先压缩祖师名（超出省略），按钮组必须保住完整一行——
   否则按钮被压窄后内部文字会折行，整个头部被撑成两行 */
.chat-head .who { min-width: 0; }
.chat-head .nm, .chat-head .sp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-acts { display: flex; flex-wrap: wrap; gap: 6px; flex: none; width: 100%; justify-content: flex-start; }
.chat-acts .btn { white-space: nowrap; }
.msg-list { flex: 1; overflow-y: auto; padding: 16px 2px; scroll-behavior: auto; }
.msg-row { display: flex; gap: 10px; margin-bottom: 16px; }
.msg-row.mine { flex-direction: row-reverse; }
.msg-av { width: 34px; height: 34px; border-radius: 8px; flex: none; object-fit: cover; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.msg-body { max-width: 78%; }
.msg-meta { font-size: 10.5px; color: #A5ABB8; margin-bottom: 3px; }
.mine .msg-meta { text-align: right; }
.bubble { background: #fff; border-radius: 4px 14px 14px 14px; padding: 10px 13px; font-size: 14px; line-height: 1.72; white-space: pre-wrap; word-break: break-word; box-shadow: 0 2px 10px rgba(31,58,109,.05); }
.mine .bubble { background: #2F6BE4; color: #fff; border-radius: 14px 4px 14px 14px; font-size: 14px; padding: 10px 13px; }
.bubble .cursor { display: inline-block; width: 2px; height: 15px; background: #2F6BE4; vertical-align: -2px; margin-left: 2px; animation: blink .8s infinite; }
@keyframes blink { 50% { opacity: 0; } }
.chat-foot { border-top: 1px solid #E9EEF6; padding: 10px 0 12px; }
.chat-inputbar { display: flex; gap: 10px; align-items: flex-end; }
.chat-inputbar textarea { flex: 1; border: 1.5px solid #E4E9F2; border-radius: 14px; padding: 11px 14px; font-size: 15px; resize: none; height: 46px; max-height: 130px; outline: none; background: #FAFBFD; line-height: 1.5; }
.chat-inputbar textarea:focus { border-color: #2F6BE4; background: #fff; }
.chat-foot .foot-acts { display: flex; justify-content: space-between; margin-bottom: 8px; }
.foot-acts .l { display: flex; gap: 8px; }
/* 发送按钮停止态：流式生成中点击即中止 */
#btn-send.stopping { background: #D9363E; letter-spacing: 1px; }
#btn-send.stopping:active { background: #B02A37; }

/* ---------- 圆桌 ---------- */
.rt-wrap { background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 2px 10px rgba(31,58,109,.05); }
.rt-stage { font-size: 13px; color: #5B6474; background: #F2F5FA; border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; }
.rt-card { border: 1px solid #E9EEF6; border-radius: 14px; padding: 13px 14px; margin-bottom: 10px; }
.rt-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rt-card-head .av, .rt-card-head img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.rt-card-head .nm { font-weight: 700; font-size: 14.5px; }
.rt-card-head .rd { font-size: 11px; color: #8A8F99; }
.stance { font-size: 11.5px; padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.stance.agree { background: #E8F7EF; color: #1E8E5A; }
.stance.against { background: #FDECEC; color: #D9363E; }
.stance.partial { background: #FFF6E6; color: #C4730A; }
.rt-obj { background: #F8FAFD; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 13.5px; }
.rt-obj .h { font-weight: 700; color: #D9363E; margin-bottom: 3px; }
.rt-obj .b { color: #5B6474; }
.rt-sug { color: #1E8E5A; margin-top: 3px; }
.rt-final { background: linear-gradient(135deg, #FFF9F2, #FFF4F4); border: 1px solid #F5DFC3; border-radius: 14px; padding: 14px; margin-top: 4px; }
.rt-final .h { font-weight: 800; color: #B4530A; margin-bottom: 6px; font-size: 14.5px; }
.rt-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; max-height: 46vh; overflow: auto; padding: 2px; }
.rt-pick { text-align: center; border: 2px solid #EEF1F6; border-radius: 14px; padding: 10px 4px; cursor: pointer; transition: all .12s; }
.rt-pick.on { border-color: #2F6BE4; background: #EDF3FF; }
.rt-pick .av, .rt-pick img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; margin-bottom: 4px; }
.rt-pick .nm { font-size: 12.5px; font-weight: 600; }
.rt-pick .era { font-size: 10.5px; color: #8A8F99; }

/* ---------- 人员 / 档案 ---------- */
.person-card { display: flex; gap: 13px; align-items: center; background: #fff; border-radius: 16px; padding: 15px; margin-bottom: 11px; cursor: pointer; border: 1px solid rgba(47,107,228,.06); box-shadow: 0 3px 14px rgba(31,58,109,.05); transition: transform .12s; }
.person-card:hover { transform: translateY(-1px); }
.person-card .pv { width: 48px; height: 48px; border-radius: 50%; color: #fff; font-size: 19px; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.person-card .info { flex: 1; min-width: 0; }
.person-card .nm { font-size: 16px; font-weight: 700; }
.person-card .meta { font-size: 12.5px; color: #8A8F99; margin-top: 2px; }
.person-card .ops { display: flex; gap: 8px; align-items: center; }
.rcnt { background: #EDF3FF; color: #2F6BE4; font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.line-head { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; }
.line-head .lt { font-weight: 700; font-size: 15px; }
.line-head .lc { font-size: 12px; color: #8A8F99; }
.rec-item { background: #fff; border-radius: 14px; border: 1px solid #E9EEF6; margin-bottom: 9px; overflow: hidden; }
.rec-head { display: flex; align-items: center; gap: 10px; padding: 11px 13px; cursor: pointer; }
.rec-head .cb { width: 19px; height: 19px; border-radius: 6px; border: 2px solid #C9D4E8; flex: none; position: relative; transition: all .12s; }
.rec-item.on .cb { background: #2F6BE4; border-color: #2F6BE4; }
.rec-item.on .cb::after { content: '✓'; color: #fff; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.rec-head .rt { flex: 1; min-width: 0; }
.rec-head .seq { font-size: 13.5px; font-weight: 700; color: #2A3040; }
.rec-head .dt { font-size: 12px; color: #8A8F99; }
.rec-head .arrow { color: #C0C8D6; font-size: 12px; transition: transform .15s; }
.rec-item.expanded .rec-head .arrow { transform: rotate(90deg); }
.rec-detail { display: none; border-top: 1px dashed #ECF0F7; padding: 12px 14px; font-size: 13.5px; }
.rec-item.expanded .rec-detail { display: block; }
.rec-detail .kv { display: flex; gap: 8px; margin-bottom: 4px; }
.rec-detail .k { color: #8A8F99; flex: none; width: 5em; }
.rec-detail .v { color: #2A3040; word-break: break-word; }
.rec-detail .rec-ops { display: flex; gap: 8px; margin-top: 10px; }

/* ---------- 四诊表单 ---------- */
.opt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip { padding: 7px 14px; background: #F2F5FA; border-radius: 999px; font-size: 13.5px; cursor: pointer; border: 1.5px solid transparent; transition: all .12s; color: #3D4350; }
.opt-chip.on { background: #EDF3FF; border-color: #2F6BE4; color: #2F6BE4; font-weight: 600; }
.opt-chip.legacy { background: #FFF6E6; border-color: #F0D9AC; color: #B4530A; }
.pulse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.pulse-card { border: 1.5px solid #EEF1F6; border-radius: 12px; padding: 9px 10px; cursor: pointer; text-align: center; transition: all .12s; }
.pulse-card.on { border-color: #2F6BE4; background: #EDF3FF; }
.pulse-card .pn { font-size: 15px; font-weight: 700; color: #2A3040; }
.pulse-card .pd { font-size: 11px; color: #8A8F99; }
.pulse-card .pf { font-size: 11px; color: #2F6BE4; }
/* 脉象标题行：左侧标题 + 右侧阴阳脉法入口 */
.pulse-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pulse-head label { margin-bottom: 0; }
/* 阴阳脉法已录入提示条 */
.yy-bar { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 7px 10px; font-size: 12.5px; color: #2F6BE4; background: #EDF3FF; border-radius: 10px; }
.yy-bar .yy-bar-t { flex: 1; }
.yy-bar button { border: none; background: #fff; color: #2F6BE4; font-size: 12.5px; padding: 4px 10px; border-radius: 8px; cursor: pointer; }
/* 脉象输入框：高度随内容自适应，由 JS 设置 style.height */
textarea.pulse-input { min-height: 96px; line-height: 1.7; overflow-y: auto; }
.severity-bar { display: flex; align-items: center; gap: 12px; }
.severity-bar input[type=range] { flex: 1; accent-color: #2F6BE4; }
.severity-bar .sv { min-width: 44px; text-align: center; font-weight: 700; color: #2F6BE4; }
.sug-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
/* 记一诊·主诉框下方的面诊 / 舌诊 / 病历三个入口：窄屏自动折行 */
.cc-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.sug-chip { font-size: 12.5px; color: #2F6BE4; background: #F0F6FF; border: 1px dashed #BCD0F5; padding: 4px 11px; border-radius: 999px; cursor: pointer; }
.sug-chip:hover { background: #E0EDFF; }

/* ---------- 主诉智能提示面板（对齐 energy-portal 四诊合参页） ---------- */
.hint-panel { margin-top: 10px; background: #F7FAFF; border: 1px solid #D9E7FB; border-radius: 12px; padding: 12px; font-size: 12.5px; display: none; }
.hint-panel.show { display: block; }
.hint-title { color: #2F6BE4; font-weight: 600; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: center; }
.hint-close { background: none; border: none; color: #9AB0CC; font-size: 16px; cursor: pointer; padding: 0 2px; line-height: 1; }
.hint-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.hint-chip { background: #EAF2FF; color: #2F6BE4; border: 1px solid #BCD0F5; border-radius: 14px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; font-family: inherit; transition: all .15s; }
.hint-chip:hover { background: #2F6BE4; color: #fff; }
.hint-warn { background: #FFF7EC; border: 1px solid #F2DDB5; color: #C07A1E; border-radius: 8px; padding: 7px 10px; margin-bottom: 6px; line-height: 1.5; }
.hint-pattern { color: #7A8AA0; line-height: 1.6; border-top: 1px dashed #E3EAF2; padding-top: 8px; margin-top: 2px; }
.hint-empty { color: #A5B3C4; text-align: center; padding: 12px 0; }

/* ---------- 太素命理·古籍参阅（会员专享只读提示，宣纸暖色与智能提示区分） ---------- */
.destiny-panel { margin-top: 10px; background: #FBF7EE; border: 1px solid #E8DCC3; border-radius: 12px; padding: 12px; font-size: 12.5px; display: none; }
.destiny-panel.show { display: block; }
.destiny-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.destiny-title { color: #8A6D3B; font-weight: 600; letter-spacing: .5px; }
.destiny-note { color: #A08C6B; font-size: 12px; background: #F5EEDF; border-radius: 6px; padding: 4px 8px; margin-bottom: 8px; }
.destiny-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.destiny-k { color: #8A6D3B; font-weight: 600; flex: 0 0 auto; margin-right: 2px; }
.destiny-chip { background: #F1E7D2; color: #7A5F33; border: 1px solid #E2D3B4; border-radius: 12px; padding: 3px 10px; font-size: 12.5px; }
.destiny-dom { border-top: 1px dashed #E2D3B4; padding-top: 8px; margin-top: 2px; }
.destiny-dom-h { color: #6B5327; font-weight: 600; margin-bottom: 5px; }
.destiny-claim { color: #55432A; line-height: 1.6; margin-bottom: 2px; }
.destiny-evid { color: #A08C6B; font-size: 11.5px; line-height: 1.5; margin-bottom: 5px; }
.destiny-meta { color: #B3A284; font-size: 11.5px; border-top: 1px dashed #E2D3B4; padding-top: 6px; margin-top: 4px; }
.form-sec-title { font-size: 14px; font-weight: 700; color: #2F6BE4; margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; }
.form-sec-title::before { content: ''; width: 4px; height: 15px; background: #2F6BE4; border-radius: 3px; }
.birth-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.birth-picker select { flex: 1; min-width: 72px; }

/* ---------- 我的 ---------- */
.mine-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.mine-head .av { width: 58px; height: 58px; border-radius: 50%; background: #2F6BE4; color: #fff; font-size: 24px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.mine-head .nm { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.mine-head .edit-ico { font-size: 13px; color: #2F6BE4; cursor: pointer; font-weight: 400; }
.mine-head .sub { font-size: 12.5px; color: #8A8F99; margin-top: 2px; }
.points-hero { background: linear-gradient(135deg, #2F6BE4 0%, #5B8DEF 100%); color: #fff; border-radius: 18px; padding: 18px 20px; margin-bottom: 14px; }
.points-hero .pv { font-size: 34px; font-weight: 800; line-height: 1.2; }
.points-hero .pl { font-size: 12.5px; opacity: .85; }
.member-card { background: linear-gradient(135deg, #3A2F1D, #6B5426); color: #F5E9CF; border-radius: 18px; padding: 16px 20px; margin-bottom: 14px; }
.member-card .mt { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.member-card .mn { font-weight: 800; font-size: 16px; letter-spacing: 1px; }
.member-card .me { font-size: 12px; opacity: .8; }
.quota-bar { height: 8px; background: rgba(255,255,255,.18); border-radius: 999px; overflow: hidden; margin: 8px 0 6px; }
.quota-bar i { display: block; height: 100%; background: linear-gradient(90deg, #F0C987, #E8B96A); border-radius: 999px; }
.member-card .qd { font-size: 12px; opacity: .9; display: flex; justify-content: space-between; }
.cell { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid #F0F2F6; cursor: pointer; }
.cell:last-child { border-bottom: none; }
.cell .ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: #fff; flex: none; }
.cell .txt { flex: 1; font-size: 15px; }
.cell .arrow { color: #C0C8D6; }
.log-item { display: flex; justify-content: space-between; align-items: center; padding: 11px 2px; border-bottom: 1px dashed #ECF0F7; font-size: 13.5px; }
.log-item:last-child { border-bottom: none; }
.log-item .lt .d { color: #2A3040; }
.log-item .lt .t { font-size: 11.5px; color: #A5ABB8; }
.log-item .amt { font-weight: 700; }
.log-item .amt.plus { color: #1E8E5A; }
.log-item .amt.minus { color: #D9363E; }
/* 我的导出：操作区 */
.exp-ops { display: flex; gap: 12px; flex: none; font-size: 12.5px; }
.exp-ops span { color: #2F6BE4; cursor: pointer; padding: 3px 2px; }
.exp-ops span:active { opacity: .6; }
.exp-ops span.del { color: #D9363E; }
/* 面诊记录：删除入口（独立类名，避免与导出区的 .exp-ops span 事件混淆） */
.face-del { flex: none; font-size: 12.5px; color: #D9363E; cursor: pointer;
            padding: 3px 2px 3px 10px; }
.face-del:active { opacity: .6; }
/* 面诊记录：导出入口（与删除并列，蓝色区分于红色的删除） */
.face-act { flex: none; font-size: 12.5px; color: #2F6BE4; cursor: pointer;
            padding: 3px 2px 3px 10px; }
.face-act:active { opacity: .6; }
/* 面诊记录：分页（每页 5 条） */
.face-pager { display: flex; align-items: center; justify-content: center;
              gap: 16px; padding: 10px 0 2px; font-size: 13px; }
.face-pager .pg { color: #2F6BE4; cursor: pointer; }
.face-pager .pg.off { color: #B9BEC9; cursor: default; }
.face-pager .pg-num { color: #8A8F99; font-size: 12.5px; }
.date-q { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.date-q input { border: 1.5px solid #E4E9F2; border-radius: 10px; padding: 7px 10px; font-size: 13.5px; background: #FAFBFD; }

/* ---------- 历史 ---------- */
/* 四类记录的分类切换（祖师问诊 / 面诊 / 舌诊 / 我的导出） */
.hist-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.hist-tabs .ht { flex: 1; text-align: center; padding: 9px 0; font-size: 13.5px;
                 border-radius: 10px; background: #F2F5FA; color: #5A6270;
                 cursor: pointer; user-select: none;
                 -webkit-tap-highlight-color: transparent; }
.hist-tabs .ht.on { background: #2F6BE4; color: #fff; font-weight: 600; }
.hist-card { background: #fff; border-radius: 16px; padding: 15px; margin-bottom: 11px; border: 1px solid rgba(47,107,228,.06); box-shadow: 0 3px 14px rgba(31,58,109,.05); }
.hist-card .hh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.hist-card .ex { font-size: 13.5px; font-weight: 700; color: #2F6BE4; }
.hist-card .q { font-size: 14px; color: #2A3040; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-card .a { display: none; font-size: 13.5px; color: #5B6474; white-space: pre-wrap; word-break: break-word; max-height: 260px; overflow: auto; background: #F8FAFD; border-radius: 10px; padding: 10px; margin-top: 8px; }
.hist-card.expanded .a { display: block; }
.hist-card .ft { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: #A5ABB8; }
.hist-card .ops { display: flex; gap: 12px; }
.hist-card .ops span { color: #2F6BE4; cursor: pointer; font-size: 12.5px; }
.hist-card .ops .del { color: #FF4D4F; }

/* ---------- 选人弹层 / 祖师选择 ---------- */
.expert-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 52vh; overflow: auto; padding: 2px; }
.md-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.md-actions .btn { width: 100%; }

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #C9D4E8; border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================
   移动端适配（≤640px / ≤480px 两档）
   关键点：iOS 输入框 ≥16px 防聚焦自动缩放、dvh 防地址栏跳动、
   导航压缩、表单竖排、弹层与气泡加宽、底部安全区
   ============================================ */
@media (max-width: 640px) {
  /* 表单行（如生日年/月/日）竖排 */
  .form-row { flex-direction: column; }
  .form-row > * { width: 100%; }

  /* iOS Safari：输入框字号 <16px 聚焦时会整页放大 */
  .input, input, textarea, select { font-size: 16px !important; }

  /* 卡片与页面留白收紧 */
  #page { padding: 14px 12px 32px; }
  .card { padding: 14px; border-radius: 14px; }
  .hero-greet { font-size: 21px; margin: 16px 0 12px; }
  .points-hero .pv { font-size: 28px; }

  /* 对话页：dvh 解决手机地址栏伸缩导致的高度跳动 */
  .chat-wrap { height: calc(100dvh - 102px); padding: 0 6px; }
  @supports not (height: 100dvh) { .chat-wrap { height: calc(100vh - 102px); } }
  .chat-head { padding: 10px 2px; gap: 6px; }
  .chat-head .av, .chat-head img { width: 34px; height: 34px; }
  .chat-head .nm { font-size: 15px; }
  .chat-head .sp { display: none; }              /* 小屏隐藏副标题，避免挤压 */
  .msg-row { gap: 8px; margin-bottom: 12px; }
  .msg-av { width: 30px; height: 30px; font-size: 12.5px; border-radius: 7px; }
  .msg-body { max-width: 84%; }                  /* 头像缩小后气泡可更宽，单屏字数更多 */
  .bubble, .mine .bubble { font-size: 14px; line-height: 1.68; padding: 9px 12px; border-radius: 4px 12px 12px 12px; }
  .mine .bubble { border-radius: 12px 4px 12px 12px; }
  .msg-meta { font-size: 10px; }
  .msg-list { padding: 12px 2px; }
  .rt-card { padding: 11px 12px; }
  .rt-obj { font-size: 13px; padding: 9px 10px; }
  .rt-final { padding: 12px; }
  .rt-final .h { font-size: 14px; }
  .chat-acts { gap: 4px; }
  .chat-acts .btn { padding: 6px 7px; font-size: 12.5px; }

  .foot-acts { flex-wrap: wrap; gap: 6px; }

  /* 弹层 */
  .modal { width: 94vw; padding: 18px 14px; }
  .sheet { padding: 16px 12px calc(16px + env(safe-area-inset-bottom)); }

  /* 底部悬浮操作条 + 安全区 */
  .card > div[style*="position:sticky"] { padding-bottom: 4px; }

  /* 列表操作区允许换行 */
  .person-card .ops { flex-wrap: wrap; justify-content: flex-end; }
  .hist-card .ft { flex-wrap: wrap; gap: 6px; }

  /* 圆桌/祖师选择网格更密 */
  .rt-pick-grid, .expert-pick-grid { max-height: 56vh; }
}

@media (max-width: 480px) {
  /* 导航极限压缩：隐藏点数胶囊与"新"角标，字号微降，5 个入口 + 品牌可容纳于 360px 屏 */
  .nav-inner { gap: 8px; padding: 0 8px; }
  .nav-logo { font-size: 15px; letter-spacing: 0; gap: 2px; }
  .nav-links { gap: 0; margin-left: 4px; }
  .nav-links a { padding: 6px 5px; font-size: 13px; }
  .nav-links a.active { padding: 6px 7px; }
  .badge-new { display: none; }
  .nav-points { display: none; }
  .nav-login-btn { padding: 5px 10px; font-size: 12.5px; }

  .auth-tabs button { font-size: 13.5px; padding: 9px 2px; }
  .chat-inputbar textarea { height: 42px; }

}

/* ---- 针刺-DNA 报告上传与解读 ---- */
.acu-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.acu-thumb { position: relative; width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line, #e3e6ea); }
.acu-thumb img { width: 100%; height: 100%; object-fit: cover; }
.acu-thumb-x { position: absolute; top: 0; right: 0; width: 18px; height: 18px; line-height: 18px; text-align: center; background: rgba(0,0,0,.55); color: #fff; border-radius: 0 0 0 8px; font-size: 12px; cursor: pointer; }
.acu-clip { cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 4px; user-select: none; }
.acu-lab { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.acu-lab th, .acu-lab td { padding: 5px 6px; text-align: left; border-bottom: 1px solid var(--line, #eef0f3); }
.acu-lab th { color: var(--muted, #8a919c); font-weight: 500; }

/* ---- 针刺-DNA 过程对话（祖师式） ---- */
.acu-chat-modal { width: min(94vw, 640px); height: min(86vh, 720px); display: flex; flex-direction: column; padding: 16px 14px; }
.acu-chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #E9EEF6; }
.acu-chat-head .modal-close { position: static; }
.acu-chat-list { flex: 1; overflow-y: auto; padding: 12px 2px; }
.acu-chat-list .msg-body { max-width: 82%; }
.acu-bubble { font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.acu-bubble .acu-kv .k { min-width: 90px; }
.acu-muted { background: #F6F7FA !important; color: #8A8F99; }
.acu-chat-imgs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.acu-chat-imgs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid #E9EEF6; }
.acu-chat-imgs .tag { max-width: 100%; white-space: normal; line-height: 1.5; }
.acu-waiting { color: #8A8F99; }
.acu-waiting b { color: #2F6BE4; }
.acu-chat-list .bubble { background: #F6F8FB; }
.acu-chat-foot { display: flex; gap: 8px; align-items: flex-end; padding: 10px 2px 2px; border-top: 1px solid #E9EEF6; }
.acu-chat-foot textarea { flex: 1; resize: none; border: 1px solid #E1E6EF; border-radius: 12px; padding: 9px 12px; font-size: 14px; font-family: inherit; line-height: 1.5; max-height: 96px; outline: none; }
.acu-chat-foot textarea:focus { border-color: #2F6BE4; }
.acu-chat-foot .ask-send { width: 38px; height: 38px; font-size: 16px; flex: none; }

/* ---------- 移动端底部 tabbar（≤768px：导航固定底部，长页面菜单拇指可达） ----------
   置于文件末尾以覆盖上方 640/480 断点的 .nav-* 规则；
   chat 视图自带底部输入栏 → body.no-tabbar 时隐藏（见 app.js route()） */
@media (max-width: 768px) {
  /* 关键：祖先 backdrop-filter 会为 fixed 子元素建立包含块，
     使 .nav-links 固定到 header 而非视口 → 移动端关闭模糊改用纯白底 */
  #navbar { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-links {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    margin: 0; margin-left: 0; gap: 0;
    justify-content: space-around;
    background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(47,107,228,.12);
    padding: 3px 4px calc(3px + env(safe-area-inset-bottom));
  }
  .nav-links a {
    flex: 1; text-align: center; padding: 8px 2px;
    font-size: 13.5px; border-radius: 10px;
  }
  .nav-links a.active { background: #EDF3FF; color: #2F6BE4; font-weight: 600; }
  body.no-tabbar .nav-links { display: none; }

  /* 内容底部让位 tabbar（约56px + 安全区） */
  #page { padding-bottom: calc(40px + 62px + env(safe-area-inset-bottom)); }
  #foot { padding-bottom: calc(30px + 62px + env(safe-area-inset-bottom)); }

  /* 卡片内 sticky 操作条抬高避开 tabbar（内联 bottom 需要 !important） */
  .card > div[style*="position:sticky"] { bottom: calc(14px + 62px + env(safe-area-inset-bottom)) !important; }
}

/* ---- 首页针灸基因靶向卡：小屏标题换行防挤压（主标题+副标题竖排） ---- */
@media (max-width: 640px) {
  #acu-card .card-title { flex-direction: column; align-items: flex-start; gap: 2px; }
  #acu-card .card-title .sub { margin-left: 0; font-size: 12px; }
}

/* 极窄屏兜底：四个按钮在 380px 以下仍可能挤 */
@media (max-width: 380px) {
  .chat-acts { gap: 3px; }
  .chat-acts .btn { padding: 5px 6px; font-size: 12px; }
}
