/* B23 改版层：按 B22 改版样稿（01_设计与审查/B22_改版样稿_v01）落实。
   只改外观、排布与可缩放字号；不改问诊、录音、识别、提交或取消逻辑。放在 patient-b22.css 之后加载。 */
:root,
body[data-patient-theme] {
  --ink3:#726B62; --b23-ok:#2B7A57; --b23-ok-soft:#E2F1E9;
  --b23-glass:rgba(255,255,255,.72); --b23-glass-strong:rgba(255,255,255,.82);
  --b23-glass-ring:inset 0 0 0 1px rgba(255,255,255,.55),0 6px 16px -10px rgba(60,40,20,.35);
  --b23-ease:cubic-bezier(.23,1,.32,1);
  --weight-body:400;
}
body[data-patient-theme] { font-weight:400; }

/* ====== 登录页：一屏完成，不用往下滑 ====== */
@media (max-width:899px) {
  body:has(.account-card) .steps { display:none; }
}
body:has(.account-card) .welcome h1 { font-size:1.6875rem; }
body:has(.account-card) .home-footer { display:block; text-align:center; padding:6px 20px 18px; font-size:.75rem; line-height:1.6; color:var(--ink3); }
body:has(.account-card) .home-footer span { display:block; }

/* ====== 聊天页：顶栏 ====== */
body.patient-chat #call-link {
  width:42px; height:42px; min-height:42px; min-width:42px; padding:0; gap:0; flex:none;
  justify-content:center; border-radius:50%; font-size:0; line-height:0;
}
body.patient-chat #call-link .icon { width:22px; height:22px; }
body.patient-chat .state-line { gap:6px; }

/* ====== 聊天页：开场欢迎卡（样稿②） ====== */
body.patient-chat[data-started=false] .chat:not(:has(.history-list > *)) .b22-welcome {
  position:relative; display:block; flex:none; min-height:150px; overflow:hidden;
  padding:18px 150px 16px 18px; border-radius:26px; background:var(--b22-skin); box-shadow:none;
}
.b22-welcome::after {
  content:""; position:absolute; right:-12px; top:6px; bottom:0; width:150px; pointer-events:none;
  background:var(--b22-card-img,none) 50% 0/100% auto no-repeat;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 26%); mask-image:linear-gradient(90deg,transparent,#000 26%);
}
.b22-welcome > div { position:relative; z-index:1; }
.b22-welcome b { font-size:1.1875rem; line-height:1.3; }
.b22-welcome p { margin:4px 0 0; font-size:.8125rem; line-height:1.5; color:#6B574E; }
body.patient-chat .b22-welcome .b22-video-button {
  position:absolute; z-index:1; left:18px; bottom:16px; min-height:38px; padding:0 14px 0 12px;
  background:rgba(255,255,255,.82); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); font-size:.90625rem;
}
@media (max-height:700px) {
  body.patient-chat[data-started=false] .chat:not(:has(.history-list > *)) .b22-welcome { min-height:0; padding:14px 118px 12px 16px; }
  .b22-welcome::after { width:118px; }
  .b22-welcome p { display:none; }
  body.patient-chat .b22-welcome .b22-video-button { position:relative; left:auto; bottom:auto; margin-top:8px; min-height:36px; }
}

/* ====== 聊天页：消息与当前问题 ====== */
body.patient-chat .chat { gap:14px; }
body.patient-chat .msg .bub { font-size:calc(1rem * var(--font-scale,1)); font-weight:400; line-height:1.6; }
body.patient-chat #question-text { font-size:calc(1rem * var(--font-scale,1)); font-weight:400; line-height:1.6; }
body.patient-chat #question-text .message-intro { display:block; font-weight:400; color:var(--ink); }
body.patient-chat #question-text .message-body {
  display:block; margin-top:8px; font-size:calc(1.125rem * var(--font-scale,1)); font-weight:650; line-height:1.45; letter-spacing:.005em; color:var(--ink);
}
body.patient-chat #question-text .message-intro:empty + .message-body,
body.patient-chat #question-text > .message-body:first-child { margin-top:0; }
body.patient-chat #question-text .message-hint {
  display:block; margin-top:6px; font-size:calc(.8125rem * var(--font-scale,1)); font-weight:400; line-height:1.5; color:var(--ink2);
}
body.patient-chat .message-heading { gap:6px; }

/* 快捷回答：与气泡左缘对齐的一行胶囊，提示语只留给读屏 */
body.patient-chat .quick-reply-label {
  position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
}
body.patient-chat #quick-replies:not([hidden]) { margin:-4px -16px 0; padding:2px 16px 4px 54px; }
body.patient-chat .quick-reply-row { display:flex; flex-wrap:nowrap; gap:8px; overflow-x:auto; scrollbar-width:none; }
body.patient-chat .quick-reply-row::-webkit-scrollbar { display:none; }
body.patient-chat .quick-reply-chip, body.patient-chat #answer-actions button {
  flex:none; min-height:40px; padding:0 16px; border:0; border-radius:99px; background:#fff; color:var(--ink);
  font-size:calc(.9375rem * var(--font-scale,1)); font-weight:400; box-shadow:inset 0 0 0 1px var(--line); white-space:nowrap;
}
body.patient-chat .quick-reply-chip:active { background:var(--brand-50); }

/* 开场只留两条小字：演示说明 + 按钮下的核对提示 */
body.patient-chat[data-started=false] .session-note { display:none; }
body.patient-chat[data-state=idle] #composer-status:not(:has(button:not([hidden]))) { display:none; }

/* ====== 聊天页：病历摘要卡（样稿③“小病历”） ====== */
body.patient-chat #summary-entry:not([hidden]) {
  display:grid; grid-template-columns:1fr; gap:10px; padding:15px 16px 14px; border:0; border-radius:24px;
  background:#fff; box-shadow:0 1px 2px rgba(60,40,20,.05),0 10px 24px -12px rgba(60,40,20,.14);
}
body.patient-chat #summary-entry .sc-ic { display:none; }
body.patient-chat #summary-entry .sc-t { font-size:calc(1.03rem * var(--font-scale,1)); font-weight:650; color:var(--ink); }
body.patient-chat #summary-entry .sc-d { font-size:calc(.84rem * var(--font-scale,1)); color:var(--ink2); }
body.patient-chat #summary-review-badge:not([hidden]) {
  display:inline-flex; align-items:center; gap:4px; height:26px; margin-bottom:6px; padding:0 10px; border-radius:99px;
  background:var(--b23-ok-soft); color:var(--b23-ok); font-size:.78rem; font-weight:650;
}
body.patient-chat .summary-preview-text:not([hidden]) {
  margin-top:8px; padding-top:8px; border-top:1px solid var(--line); font-size:calc(.9rem * var(--font-scale,1)); line-height:1.55; color:var(--ink2);
}
body.patient-chat #summary-button {
  width:100%; min-height:44px; border:0; border-radius:14px; background:var(--brand-50); color:var(--brand-d); font-weight:650; box-shadow:none;
}

/* ====== 聊天页：底部输入区（工具 → 按住说话 → 一行提示） ====== */
body.patient-chat .composer { display:flex; flex-direction:column; }
body.patient-chat .composer > .steps { order:1; margin-bottom:10px; }
body.patient-chat .composer > #latest-button { order:0; }
body.patient-chat .composer > #mode-button { order:2; }
body.patient-chat .composer > .composer-row { order:3; }
body.patient-chat .composer > #tip { order:4; margin-top:8px; }
body.patient-chat .composer > #composer-status { order:5; }
body.patient-chat .composer .steps button.st { min-height:34px; padding:0 13px 0 10px; font-size:.84375rem; }
body.patient-chat #tip p { font-size:.71875rem; line-height:1.5; color:var(--ink3); }
body.patient-chat #primary-action.hold { font-size:calc(1.0625rem * var(--font-scale,1)); }


/* ====== 按住说话：底部整块变蓝，边说边出字（样稿③）。聊天页与视频页共用 ====== */
body[data-patient-theme] #voice-overlay:not([data-state=preview]) { background:rgba(30,28,25,.16); }
body[data-patient-theme] #voice-overlay .voice-recording-panel {
  height:auto; max-width:520px; margin:0 8px calc(8px + env(safe-area-inset-bottom)); padding:18px 18px 14px;
  border-radius:34px; background:var(--brand); color:#fff; box-shadow:0 -10px 40px -14px rgba(54,83,201,.6);
  justify-content:flex-start; transition:background-color .15s var(--b23-ease);
}
body[data-patient-theme] #voice-overlay[data-target=cancel] .voice-recording-panel { background:var(--b22-danger); }
body[data-patient-theme] #voice-overlay .voice-recording-panel :is(#voice-instruction,#voice-sub,#voice-time,.voice-slide-hint,#voice-live-note,#voice-live,#voice-live-text,.voice-live-label,.voice-choice-row > div) { color:#fff; }
body[data-patient-theme] #voice-overlay #voice-instruction { order:1; margin:0; font-size:1.0625rem; font-weight:650; }
body[data-patient-theme] #voice-overlay #voice-sub { order:2; min-height:0; margin-top:2px; font-size:.8125rem; opacity:.85; }
body[data-patient-theme] #voice-overlay #voice-live { order:3; margin-top:8px; }
body[data-patient-theme] #voice-overlay .voice-live-label { font-size:.75rem; opacity:.7; }
body[data-patient-theme] #voice-overlay #voice-live-text { font-size:calc(1.1875rem * var(--font-scale,1)); font-weight:650; line-height:1.45; }
body[data-patient-theme] #voice-overlay #voice-live-note { order:4; margin-top:4px; font-size:.75rem; opacity:.8; }
body[data-patient-theme] #voice-overlay[data-target] #voice-waveform { order:5; height:40px; margin-top:10px; padding:0; background:transparent; }
body[data-patient-theme] #voice-overlay #voice-waveform::after { display:none; }
body[data-patient-theme] #voice-overlay .voice-bars { height:34px; }
body[data-patient-theme] #voice-overlay .voice-bars i { background:#fff; }
body[data-patient-theme] #voice-overlay #voice-time { order:6; margin-top:6px; font-size:.78rem; opacity:.85; }
body[data-patient-theme] #voice-overlay .voice-slide-hint { order:7; margin-top:8px; font-size:.78rem; opacity:.85; }
body[data-patient-theme] #voice-overlay .voice-choice-row { order:8; margin-top:10px; }
body[data-patient-theme] #voice-overlay .voice-choice-row > div { width:96px; font-size:.84rem; }
body[data-patient-theme] #voice-overlay .voice-choice-row button {
  width:56px; height:56px; border:0; background:rgba(255,255,255,.16); color:#fff; box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.4);
}
body[data-patient-theme] #voice-overlay[data-target=cancel] #voice-cancel { background:#fff; color:var(--b22-danger); transform:scale(1.1); }
body[data-patient-theme] #voice-overlay[data-target=text] #voice-to-text { background:#fff; color:var(--brand-d); transform:scale(1.1); }
body[data-patient-theme] #voice-overlay #voice-finish {
  order:9; min-height:52px; margin-top:12px; border-radius:99px; background:rgba(255,255,255,.16); color:#fff; box-shadow:inset 0 0 0 1px rgba(255,255,255,.3);
}
body[data-patient-theme] #voice-overlay #voice-finish .voice-icon { color:#fff; }


/* ====== 视频交流（样稿④）：人物铺满整屏，问题是底部半透明字幕卡，大圆麦克风居中 ====== */
body.video-call { display:flex; flex-direction:column; height:100dvh; min-height:100dvh; overflow:hidden; background:var(--b22-skin); }
body.video-call .ctop {
  position:relative; z-index:3; flex:none; display:flex; align-items:center; gap:10px;
  padding:calc(env(safe-area-inset-top) + 6px) 14px 4px; background:transparent; border:0; box-shadow:none;
}
body.video-call .ctop .back {
  display:grid; place-items:center; width:40px; min-width:40px; height:40px; min-height:40px; padding:0; border-radius:50%;
  font-size:0; color:var(--ink); background:var(--b23-glass); -webkit-backdrop-filter:blur(18px) saturate(1.5); backdrop-filter:blur(18px) saturate(1.5); box-shadow:var(--b23-glass-ring);
}
body.video-call .ctop .back .icon { width:22px; height:22px; }
body.video-call .call-header-title { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
body.video-call .ctop .acct { margin-left:auto; }
body.video-call .ctop .acct > summary {
  width:40px; height:40px; min-height:40px; background:var(--b23-glass); -webkit-backdrop-filter:blur(18px) saturate(1.5); backdrop-filter:blur(18px) saturate(1.5); box-shadow:var(--b23-glass-ring);
}
body.video-call main { position:relative; z-index:2; flex:1; min-height:0; display:flex; pointer-events:none; }
body.video-call .stage { flex:1; min-height:0; height:auto; display:flex; flex-direction:column; justify-content:flex-end; background:transparent; pointer-events:none; }

/* 人物层：固定在整屏背后，点人物仍可打断 */
body.video-call .call-portrait { position:fixed; inset:0; z-index:0; width:auto; height:auto; max-height:none; margin:0; border-radius:0; background:var(--b22-skin); pointer-events:auto; }
body.video-call .call-portrait .portrait { position:absolute; inset:0; width:100%; height:100%; max-width:none; max-height:none; aspect-ratio:auto; border-radius:0; background:var(--b22-skin); }
body.video-call #avatar { position:absolute; inset:0; width:100%; height:100%; }
body.video-call #avatar :is(img,video) { width:100%; height:100%; object-fit:cover; object-position:50% 0; }
body.video-call #avatar canvas { width:100% !important; height:100% !important; }
body.video-call .video-presence {
  position:fixed; z-index:4; top:calc(env(safe-area-inset-top) + 9px); left:50%; right:auto; translate:-50% 0;
  display:flex; align-items:center; height:34px; max-width:calc(100% - 128px); padding:0 14px 0 12px; border-radius:99px;
  white-space:nowrap; overflow:hidden; font-size:.84rem; font-weight:650; color:var(--ink); pointer-events:none;
  background:var(--b23-glass); -webkit-backdrop-filter:blur(18px) saturate(1.5); backdrop-filter:blur(18px) saturate(1.5); box-shadow:var(--b23-glass-ring);
}
body.video-call .video-presence :is(.companion-phase,.video-interrupt-tip) { padding:0; background:none; box-shadow:none; -webkit-backdrop-filter:none; backdrop-filter:none; font-size:inherit; }
body.video-call .video-presence .video-interrupt-tip { overflow:hidden; text-overflow:ellipsis; font-weight:500; color:var(--ink2); }
body.video-call .video-presence .video-interrupt-tip::before { content:"·"; margin:0 6px; }

/* 字幕卡上方的两个小按钮 */
body.video-call .b23-side { flex:none; display:flex; justify-content:flex-end; padding:0 14px 10px; pointer-events:auto; }
body.video-call .b23-side .video-utilities { display:flex; gap:8px; padding:0; border:0; }
body.video-call .b23-side .pain-card-head { display:block; padding:0; background:none; border:0; box-shadow:none; }
body.video-call .b23-side :is(.pain-card-icon,.pain-card-main) { display:none; }
body.video-call .b23-side .pain-location { padding:0; margin:0; background:none; border:0; box-shadow:none; }
body.video-call .b23-side :is(#transcript-open,#pain-location-open) {
  min-height:36px; padding:0 13px 0 10px; border:0; border-radius:99px; font-size:.84rem; font-weight:500; color:var(--ink); white-space:nowrap;
  background:var(--b23-glass); -webkit-backdrop-filter:blur(18px) saturate(1.5); backdrop-filter:blur(18px) saturate(1.5); box-shadow:var(--b23-glass-ring);
}

/* 底部字幕卡：字幕 + 控制合成一张 */
body.video-call .b23-sheet {
  flex:none; display:flex; flex-direction:column; max-height:calc(100dvh - 130px); overflow:hidden; pointer-events:auto;
  margin:0 8px calc(6px + env(safe-area-inset-bottom)); border-radius:34px; background:var(--b23-glass-strong);
  -webkit-backdrop-filter:blur(22px) saturate(1.5); backdrop-filter:blur(22px) saturate(1.5); box-shadow:var(--b23-glass-ring);
}
body.video-call .b23-sheet .call-conversation {
  flex:0 1 auto; min-height:0; max-height:none; overflow:auto; margin:0; padding:16px 18px 4px;
  border:0; border-radius:0; background:none; -webkit-backdrop-filter:none; backdrop-filter:none; box-shadow:none;
}
body.video-call .call-message .message-speaker { font-size:.8125rem; font-weight:650; color:var(--brand-d); }
body.video-call #assistant-caption { font-size:calc(1.3125rem * var(--font-scale,1)); font-weight:700; line-height:1.4; letter-spacing:.005em; }
body.video-call #patient-caption { font-size:calc(.875rem * var(--font-scale,1)); color:var(--ink2); }
body.video-call .b23-sheet :is(.quick-reply-chip,#answer-actions button,#connect) {
  min-height:40px; padding:0 15px; border:0; border-radius:99px; background:rgba(255,255,255,.92); color:var(--ink);
  font-size:calc(.9375rem * var(--font-scale,1)); font-weight:400; box-shadow:inset 0 0 0 1px var(--line);
}
body.video-call .quick-reply-label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
body.video-call .quick-reply-row { display:flex; flex-wrap:wrap; gap:8px; }

/* 控制行：打字 / 按住说话 / 结束 */
body.video-call .b23-sheet .cbar {
  flex:none; display:flex; flex-wrap:wrap; align-items:flex-start; justify-content:space-between; gap:4px 6px;
  width:auto; margin:0; padding:10px 18px 12px; border:0; border-radius:0; background:none; -webkit-backdrop-filter:none; backdrop-filter:none; box-shadow:none;
}
body.video-call #type-panel { order:1; flex:0 0 76px; }
body.video-call .cmain { order:2; flex:1 1 0; min-width:0; display:flex; flex-direction:column; align-items:center; }
body.video-call #hangup { order:3; flex:0 0 76px; }
body.video-call #type-panel > summary, body.video-call #hangup {
  display:flex; flex-direction:column; align-items:center; gap:6px; min-height:0; padding:11px 0 0; border:0; background:none; box-shadow:none; list-style:none;
}
body.video-call #type-panel > summary::-webkit-details-marker { display:none; }
body.video-call #record-toggle {
  display:flex; flex-direction:column; align-items:center; gap:6px; width:100%; max-width:150px; height:auto; min-height:0; padding:0;
  border:0; border-radius:0; background:none; box-shadow:none; color:var(--ink); font-size:calc(.84rem * var(--font-scale,1)); font-weight:650;
}
body.video-call #record-toggle::before {
  content:""; display:block; width:76px; height:76px; border-radius:50%;
  background:var(--brand) url(/assets/b23/mic-white_v01.svg) center/30px 30px no-repeat;
  box-shadow:0 0 0 7px rgba(54,83,201,.14),0 16px 26px -12px rgba(54,83,201,.8);
  transition:transform .14s var(--b23-ease),background-color .14s var(--b23-ease),box-shadow .14s var(--b23-ease);
}
body.video-call #record-toggle[aria-pressed=true]::before { background-color:var(--brand-d); box-shadow:0 0 0 11px rgba(54,83,201,.22),0 16px 26px -12px rgba(54,83,201,.8); transform:scale(1.04); }
body.video-call #record-toggle:active:not(:disabled)::before { transform:scale(.97); }
body.video-call #record-toggle:disabled { background:none; box-shadow:none; color:var(--ink3); }
body.video-call #record-toggle:disabled::before { background-color:#A9B4E8; box-shadow:none; }
body.video-call .cmain .sub { margin-top:4px; font-size:.6875rem; line-height:1.4; text-align:center; color:var(--ink3); }
body.video-call #type-panel[open] { order:0; flex:1 1 100%; }
@media (prefers-reduced-motion:reduce) { body.video-call #record-toggle::before { transition:none; transform:none !important; } }

/* 横屏：人物在左，字幕卡在右 */
@media (orientation:landscape) and (max-height:540px) {
  body.video-call .stage { align-items:flex-end; }
  body.video-call :is(.b23-side,.b23-sheet) { width:min(420px,52vw); }
  body.video-call .b23-sheet { max-height:calc(100dvh - 104px); margin-right:8px; }
  body.video-call .b23-side { margin-right:8px; }
  body.video-call .call-portrait .portrait { right:auto; width:calc(100% - min(420px,52vw) - 16px); }
}


/* ====== 第一轮实页复核后的修正 ====== */
body.patient-chat .quick-replies .quick-reply-chip { font-size:calc(.9375rem * var(--font-scale,1)); padding:0 16px; }
body.patient-chat #question-text .message-hint { border-top:0; padding-top:0; }
body[data-patient-theme] #voice-overlay .voice-recording-panel { flex:none; min-height:0; max-height:calc(100dvh - 120px); overflow:auto; }
/* 人物只占上部，底边渐隐进同色背景；字幕卡盖在下方 */
body.video-call .call-portrait .portrait { bottom:auto; height:72dvh; -webkit-mask-image:linear-gradient(#000 80%,transparent); mask-image:linear-gradient(#000 80%,transparent); }
body.video-call .b23-side #pain-location #pain-location-open { min-height:36px; padding:0 13px; border:0; border-radius:99px; color:var(--ink); font-size:.84rem; font-weight:500; background:var(--b23-glass); box-shadow:var(--b23-glass-ring); }
body.video-call .quick-reply-row { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; }
body.video-call .quick-reply-row::-webkit-scrollbar { display:none; }
body.video-call .b23-sheet .quick-reply-chip { flex:0 0 auto; }
body.video-call .cmain .sub { width:max-content; max-width:none; white-space:nowrap; }
@media (orientation:landscape) and (max-height:540px) {
  body.video-call .call-portrait .portrait { height:100%; -webkit-mask-image:none; mask-image:none; }
  body.video-call .b23-sheet { max-height:calc(100dvh - 116px); }
  body.video-call .b23-side { padding-bottom:8px; }
}


/* ====== 第二轮实页复核后的修正 ====== */
/* 空闲/等待回答时，底部只留一条“松开后先核对文字”；其余状态（正在听、正在想、出错重试）照常显示 */
body.patient-chat:is([data-state=idle],[data-state=ready]) #composer-status:not(:has(button:not([hidden]))) { display:none; }
/* 录音块：只留状态、临时文字、声波、手势提示 */
body[data-patient-theme] #voice-overlay #voice-sub { display:none; }
body[data-patient-theme] #voice-overlay #voice-time { margin-top:2px; }
/* 视频页：快捷回答与“听问题”同一行，可横向滑动 */
body.video-call .b23-sheet .call-conversation > #quick-replies:not([hidden]) { flex:1 1 0; min-width:0; }
body.video-call .b23-sheet .call-conversation > .caption-actions { flex:0 0 auto; }
body.video-call #connect { gap:6px; padding:0 14px 0 12px; }
@media (max-height:700px) {
  body.video-call .b23-sheet .call-conversation { padding:12px 16px 2px; }
  body.video-call #assistant-caption { font-size:calc(1.125rem * var(--font-scale,1)); }
  body.video-call .call-message .message-hint { display:none; }
  body.video-call .b23-sheet .cbar { padding:6px 16px 10px; }
  body.video-call #record-toggle::before { width:64px; height:64px; background-size:26px 26px; }
  body.video-call :is(#type-panel > summary,#hangup) { padding-top:5px; }
  body.video-call .cmain .sub { display:none; }
  body.video-call .b23-side { padding-bottom:8px; }
}
@media (orientation:landscape) and (max-height:540px) {
  body.video-call #record-toggle::before { width:60px; height:60px; background-size:24px 24px; }
}


/* ====== 视频页打字展开：盖过旧版 .stage:has(#type-panel[open]) 网格规则 ====== */
body.video-call main .stage,
body.video-call main .stage:has(#type-panel[open]),
body.video-call[data-mobile-keyboard] main .stage:has(#type-panel[open]) {
  display:flex; flex-direction:column; justify-content:flex-end; grid-template-columns:none; grid-template-rows:none; gap:0; height:auto; min-height:0; padding:0;
}
body.video-call main .stage:has(#type-panel[open]) .b23-sheet .call-conversation { min-height:0; max-height:none; height:auto; }
body.video-call[data-mobile-keyboard] { background:var(--b22-skin); }
body.video-call .cbar #type-panel[open] {
  position:relative; inset:auto; order:0; flex:1 1 100%; width:100%; max-height:none; margin:0 0 4px; padding:44px 0 6px;
  border:0; border-radius:0; background:none; box-shadow:none; overflow:visible;
}
body.video-call .cbar #type-panel[open] > summary {
  position:absolute; top:0; right:0; flex-direction:row; gap:2px; min-height:36px; padding:0 12px; border-radius:99px;
  background:var(--fill); color:var(--ink); font-size:.84rem;
}
body.video-call .cbar #type-panel[open] #text-form { display:flex; gap:8px; align-items:flex-end; }
body.video-call .cbar #type-panel[open] #typed-text { flex:1; min-height:52px; border:0; border-radius:18px; background:#fff; box-shadow:inset 0 0 0 1px var(--line); }
body.video-call .cbar #type-panel[open] #text-send { flex:none; min-width:64px; min-height:48px; }

body.video-call main .stage:has(#type-panel[open]) .b23-sheet .call-conversation { padding:16px 18px 4px; height:auto; }
body.video-call:not([data-mobile-keyboard=open]) main .stage:has(#type-panel[open]) .call-portrait {
  position:fixed; inset:0; display:block; width:100vw; height:100dvh; min-height:0; max-height:none; margin:0; grid-row:auto; grid-column:auto;
}
body.video-call .cbar #type-panel[open] > summary { left:auto; width:auto; }

body.video-call main .stage .call-portrait,
body.video-call main .stage:has(#type-panel[open]) .call-portrait { height:100dvh; max-height:none; min-height:0; }

/* ====== 首页响应式（B23）：按屏幕分档，人物不拉伸，内容居中 ====== */
/* 宽手机以上的竖屏（平板竖屏等）：单列居中，人物区限宽 */
@media (min-width:520px) {
  body:has(.account-card)::before { left:50%; right:auto; width:520px; translate:-50% 0; height:500px; }
  body:has(.account-card) .home-header { max-width:440px; margin:0 auto; padding-inline:0; }
  body:has(.account-card) .home-main { width:100%; max-width:440px; margin:0 auto; padding-inline:0; }
  body:has(.account-card) .home-main > .welcome { margin-top:280px; }
  body:has(.account-card) .home-footer { max-width:440px; margin:0 auto; }
}
/* 平板横屏、电脑，以及手机横屏：左右分栏 */
@media (min-width:900px) {
  body:has(.account-card) { --b23-split:50%; min-height:100dvh; }
  body:has(.account-card)::before {
    position:fixed; inset:0 auto 0 0; width:var(--b23-split); height:auto; translate:none;
    background:var(--b22-skin) url(/assets/b22/xiaoyu-hero.jpg) 50% 100%/auto 92% no-repeat;
    -webkit-mask-image:none; mask-image:none;
  }
  body:has(.account-card) .home-header { position:absolute; z-index:3; left:0; top:0; width:var(--b23-split); max-width:none; margin:0; padding:28px 36px 0; }
  body:has(.account-card) .home-main {
    position:relative; z-index:1; display:flex; flex-direction:column; justify-content:center; align-items:center;
    width:calc(100% - var(--b23-split)); max-width:none; min-height:100dvh; margin:0 0 0 var(--b23-split); padding:72px 48px 88px;
  }
  body:has(.account-card) .home-main > * { width:100%; max-width:420px; }
  body:has(.account-card) .home-main > .welcome { margin-top:0; }
  body:has(.account-card) .home-footer { position:absolute; z-index:1; left:var(--b23-split); right:0; bottom:16px; max-width:none; margin:0; }
  body:has(.account-card) .steps { display:none; }
}
@media (min-width:900px) and (min-height:880px) {
  body:has(.account-card) .steps { display:block; }
}
@media (min-width:1400px) {
  body:has(.account-card) { --b23-split:54%; }
  body:has(.account-card) .welcome h1 { font-size:2rem; }
}
/* 手机横屏：左栏收窄，右栏可滚动，整体更紧凑 */
@media (orientation:landscape) and (min-width:560px) and (max-height:540px) {
  body:has(.account-card) { --b23-split:40%; }
  body:has(.account-card)::before { background-size:auto 96%; }
  body:has(.account-card) .home-header { padding:14px 20px 0; }
  body:has(.account-card) .home-main { justify-content:flex-start; padding:20px 28px 56px; }
  body:has(.account-card) .welcome h1 { font-size:1.375rem; }
  body:has(.account-card) .welcome-description { display:none; }
  body:has(.account-card) .home-footer { position:static; margin:0 0 0 var(--b23-split); width:calc(100% - var(--b23-split)); padding-bottom:12px; }
}

/* 首页人物图自带渐变底色：宽屏时人物单独成层并四周渐隐，底板用纯色，看不出图片边框 */
@media (min-width:520px) {
  body:has(.account-card)::before {
    -webkit-mask-image:linear-gradient(90deg,transparent,#000 16%,#000 84%,transparent),linear-gradient(#000 62%,transparent);
    -webkit-mask-composite:source-in; mask-image:linear-gradient(90deg,transparent,#000 16%,#000 84%,transparent),linear-gradient(#000 62%,transparent); mask-composite:intersect;
  }
}
@media (min-width:900px) {
  body:has(.account-card)::before {
    background:url(/assets/b22/xiaoyu-hero.jpg) 50% 100%/auto 92% no-repeat;
    -webkit-mask-image:linear-gradient(90deg,transparent 6%,#000 30%,#000 70%,transparent 94%),linear-gradient(transparent,#000 14%);
    mask-image:linear-gradient(90deg,transparent 6%,#000 30%,#000 70%,transparent 94%),linear-gradient(transparent,#000 14%);
  }
  body:has(.account-card)::after { content:""; position:fixed; z-index:-1; inset:0 auto 0 0; width:var(--b23-split); background:#E7D6CF; pointer-events:none; }
}

/* 分栏时人物铺满左栏（按比例裁切，不出现图片边框），右缘轻微渐隐到表单区；三格说明不再出现 */
@media (min-width:900px) {
  body:has(.account-card)::before {
    background:#E7D6CF url(/assets/b22/xiaoyu-hero.jpg) 50% 12%/cover no-repeat;
    -webkit-mask-image:linear-gradient(90deg,#000 88%,transparent); mask-image:linear-gradient(90deg,#000 88%,transparent);
  }
  body:has(.account-card)::after { content:none; }
  body:has(.account-card) .steps { display:none; }
}
@media (min-width:900px) and (min-height:880px) { body:has(.account-card) .steps { display:none; } }


/* ====== 聊天页响应式（B23） ====== */
/* 宽手机、平板竖屏、手机横屏：内容收进居中的阅读列 */
@media (min-width:600px) {
  body.patient-chat { --b23-col:680px; --b23-gut:max(16px,calc((100vw - var(--b23-col)) / 2)); }
  body.patient-chat .app-head .bar { padding-inline:var(--b23-gut); }
  body.patient-chat #main, body.patient-chat #composer { padding-inline:var(--b23-gut); }
  body.patient-chat #quick-replies:not([hidden]) { margin-inline:0; padding-inline:38px 0; }
}
/* 手机横屏：输入区压成一行（工具在左，按住说话在右），开场卡隐藏 */
@media (orientation:landscape) and (max-height:540px) {
  body.patient-chat .b22-welcome { display:none !important; }
  body.patient-chat .composer { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; column-gap:12px; padding-top:4px; padding-bottom:6px; }
  body.patient-chat .composer > .steps { grid-column:1; grid-row:1; margin:0; padding:0; }
  body.patient-chat .composer > .composer-row { grid-column:2; grid-row:1; padding:0; }
  body.patient-chat .composer > :is(#tip,#composer-status,#mode-button,#latest-button) { grid-column:1 / -1; }
  body.patient-chat .composer > #tip { margin-top:4px; }
  body.patient-chat #view-button, body.patient-chat #primary-action.hold { height:48px; min-height:48px; }
  body.patient-chat #view-button { width:48px; }
}
/* 电脑与平板横屏：左侧大人物卡 + 右侧聊天列，整体居中 */
@media (min-width:1024px) and (min-height:541px) {
  body.patient-chat { --b23-wrap:1160px; --b23-side:300px; --b23-x:max(32px,calc((100vw - var(--b23-wrap)) / 2)); }
  body.patient-chat .app-head .bar { padding-inline:calc(var(--b23-x) + var(--b23-side) + 40px) var(--b23-x); }
  body.patient-chat #main, body.patient-chat #composer { padding-inline:calc(var(--b23-x) + var(--b23-side) + 40px) var(--b23-x); }
  body.patient-chat #main > *, body.patient-chat #composer > * { max-width:760px; }
  body.patient-chat .bar .portrait-stage, body.patient-chat #portrait-stage {
    position:fixed; z-index:2; left:var(--b23-x); top:24px; width:var(--b23-side); height:min(620px,calc(100dvh - 48px));
    display:flex; flex-direction:column; overflow:hidden; border-radius:30px; background:var(--b22-skin);
    box-shadow:0 1px 2px rgba(60,40,20,.05),0 18px 40px -22px rgba(60,40,20,.28);
  }
  body.patient-chat #portrait-stage > #avatar { position:relative; inset:auto; flex:1 1 0; width:100%; height:auto; min-height:0; border-radius:0; box-shadow:none; background-color:var(--b22-skin); }
  body.patient-chat #portrait-stage .portrait-thumbnail { display:none; }
  body.patient-chat #portrait-stage .portrait-caption {
    position:static; display:flex; flex-direction:column; gap:2px; flex:none; padding:16px 20px 18px; background:#fff; border:0;
  }
  body.patient-chat #portrait-stage .portrait-caption strong { font-size:1.0625rem; font-weight:700; color:var(--ink); }
  body.patient-chat #portrait-stage .portrait-caption span { font-size:.8125rem; line-height:1.5; color:var(--ink2); }
  /* 左侧已经能看到人物，顶栏不再重复头像，开场卡也不再放人物图 */
  body.patient-chat .b22-welcome::after { display:none; }
  body.patient-chat[data-started=false] .chat:not(:has(.history-list > *)) .b22-welcome { min-height:0; padding:18px 20px 16px; }
  body.patient-chat .b22-welcome .b22-video-button { position:relative; left:auto; bottom:auto; margin-top:12px; }
  body.patient-chat .b22-welcome p { max-width:none; }
}

/* 宽屏细调：人物卡 + 聊天列作为一个整体居中；顶栏不重复人物信息 */
@media (min-width:1024px) and (min-height:541px) {
  body.patient-chat { --b23-wrap:1100px; --b23-side:300px; --b23-gap:40px; --b23-main:calc(var(--b23-wrap) - var(--b23-side) - var(--b23-gap)); --b23-x:max(32px,calc((100vw - var(--b23-wrap)) / 2)); }
  body.patient-chat .app-head .bar,
  body.patient-chat #main, body.patient-chat #composer {
    padding-left:calc(var(--b23-x) + var(--b23-side) + var(--b23-gap));
    padding-right:max(32px,calc(100vw - var(--b23-x) - var(--b23-wrap)));
  }
  body.patient-chat #main > *, body.patient-chat #composer > * { max-width:none; width:100%; }
  body.patient-chat .app-head .character-identity { display:none; }
  body.patient-chat .app-head .bar { min-height:64px; padding-top:20px; }
}

/* ====== 视频页响应式（B23） ====== */
body.video-call { background:#EBDAD3; }
body.video-call .call-portrait, body.video-call .call-portrait .portrait { background:#EBDAD3; }
/* 平板竖屏、宽手机：字幕卡限宽居中 */
@media (min-width:600px) and (orientation:portrait) {
  body.video-call :is(.b23-side,.b23-sheet) { width:min(560px,calc(100% - 16px)); margin-inline:auto; }
  body.video-call .b23-sheet { margin-bottom:calc(16px + env(safe-area-inset-bottom)); }
}
/* 平板横屏、电脑：人物按竖幅比例居中在左，字幕卡固定在右栏 */
@media (min-width:900px) and (min-height:541px) and (orientation:landscape) {
  body.video-call { --b23-panel:420px; }
  body.video-call .stage { align-items:flex-end; }
  body.video-call :is(.b23-side,.b23-sheet) { width:var(--b23-panel); margin-right:max(24px,calc((100vw - 1280px) / 2)); }
  body.video-call .b23-sheet { max-height:calc(100dvh - 150px); margin-bottom:24px; }
  body.video-call .call-portrait .portrait {
    right:auto; width:calc(100% - var(--b23-panel) - 2 * max(24px,calc((100vw - 1280px) / 2))); height:100%;
    left:max(0px,calc((100vw - 1280px) / 2)); -webkit-mask-image:none; mask-image:none;
  }
  body.video-call #avatar {
    left:50%; right:auto; width:min(100%,calc(100dvh * .75)); translate:-50% 0;
    -webkit-mask-image:linear-gradient(90deg,transparent,#000 14%,#000 86%,transparent); mask-image:linear-gradient(90deg,transparent,#000 14%,#000 86%,transparent);
  }
}


/* ====== 选人页手机横屏（B23）：三位助手一行排开 ====== */
@media (orientation:landscape) and (max-height:540px) and (max-width:1023px) {
  body:has(.doctors) main { max-width:none; padding-inline:max(20px,env(safe-area-inset-left)); }
  body:has(.doctors) main > h1 { font-size:1.375rem; margin-top:4px; }
  body:has(.doctors) .h2sub { margin:4px 0 10px; font-size:.84rem; }
  body:has(.doctors) .h2sub + .h2sub, body:has(.doctors) .how { display:none; }
  body:has(.doctors) .doctors { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
  body:has(.doctors) .dc { padding:10px; gap:10px; border-radius:22px; }
  body:has(.doctors) .dc .ph { width:64px; height:64px; border-radius:18px; }
  body:has(.doctors) .dc .ph img { width:64px; height:64px; }
  body:has(.doctors) .dc .ds { display:none; }
  body:has(.doctors) .dc .ar { width:34px; height:34px; }
}


/* ====== 记录页 / 资料页 / 详情弹窗（B23）：顶栏与内容同宽居中，卡片与按钮按样稿统一 ====== */
body.patient:has(> .htop) .htop,
body.patient:has(> .htop) .layout { width:100%; max-width:760px; margin-inline:auto; padding-inline:20px; box-sizing:border-box; }
body.patient:has(> .htop) .layout { display:block; }
body.patient:has(> .htop) .layout > nav:empty { display:none; }
body.patient:has(> .htop) .layout > main { max-width:none; margin:0; padding-inline:0; }
body.patient:has(> .htop) .htop .rec-link { padding:0 14px; min-height:38px; display:inline-flex; align-items:center; gap:6px; border-radius:99px; background:var(--brand-50); color:var(--brand-d); font-weight:650; }
body.patient:has(> .htop) h1 { font-size:1.625rem; font-weight:700; letter-spacing:.01em; }
body.patient:has(> .htop) .lead, body.patient:has(> .htop) .notice { color:var(--ink2); }
body.patient:has(> .htop) .notice { font-size:.8125rem; line-height:1.6; color:var(--ink3); }
/* 记录卡片：暖色头像，右侧两个按钮做成主次分明的胶囊 */
body.patient:has(> .htop) .visit-card { display:flex; align-items:center; gap:14px; padding:16px; border:0; border-radius:24px; background:#fff; box-shadow:0 1px 2px rgba(60,40,20,.05),0 10px 24px -12px rgba(60,40,20,.14); }
body.patient:has(> .htop) .visit-face { flex:none; width:52px; height:52px; border-radius:50%; object-fit:cover; background:var(--b22-skin); box-shadow:0 0 0 2px #fff,0 2px 8px rgba(60,40,20,.14); }
body.patient:has(> .htop) .visit-face[src*="xiaoyu-face"] { content:url(/assets/b22/xiaoyu-face.jpg); }
body.patient:has(> .htop) .visit-face[src*="yang-face"] { content:url(/assets/b22/yang-face.jpg); }
body.patient:has(> .htop) .visit-face[src*="he-face"] { content:url(/assets/b22/he-face.jpg); }
body.patient:has(> .htop) .visit-main { flex:1; min-width:0; }
body.patient:has(> .htop) .visit-status { border-radius:99px; padding:2px 10px; font-weight:650; background:var(--brand-50); color:var(--brand-d); }
body.patient:has(> .htop) .visit-status[data-review=true] { background:#FDF1E1; color:#8A5413; }
body.patient:has(> .htop) .visit-actions { display:flex; gap:8px; flex-wrap:wrap; }
body.patient:has(> .htop) .visit-actions > :is(a,button) {
  display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:0 16px; border:0; border-radius:99px;
  background:var(--brand-50); color:var(--brand-d); font-weight:650; text-decoration:none; box-shadow:none;
}
body.patient:has(> .htop) .visit-actions > :is(a,button):last-child { background:var(--brand); color:#fff; box-shadow:var(--b22-shadow-cta); }
@media (max-width:599px) {
  body.patient:has(> .htop) .visit-card { flex-wrap:wrap; }
  body.patient:has(> .htop) .visit-actions { flex:1 1 100%; }
  body.patient:has(> .htop) .visit-actions > :is(a,button) { flex:1; }
}
/* 详情弹窗：按钮统一成柔和胶囊，问答记录区分说话人 */
body.patient:has(> .htop) .detail-dialog { border-radius:28px; background:var(--bg); }
body.patient:has(> .htop) .detail-dialog .dialog-head { border-bottom:0; }
body.patient:has(> .htop) #close-detail { min-height:40px; padding:0 16px; border:0; border-radius:99px; background:var(--fill); color:var(--ink); box-shadow:none; }
body.patient:has(> .htop) .detail-dialog .dialog-content :is(button,a):not(#close-detail) {
  min-height:40px; padding:0 16px; border:0; border-radius:99px; background:var(--brand-50); color:var(--brand-d); font-weight:650; box-shadow:none;
}
/* 聊天宽屏：提示条和快捷回答不跟着拉满整列 */
@media (min-width:1024px) and (min-height:541px) {
  body.patient-chat #main > #welcome-note { width:auto; max-width:max-content; align-self:center; }
  body.patient-chat #main > :is(#quick-replies,.pending,#feedback) { width:auto; }
}

/* 资料页：main 直接挂在 body 下，单独给同宽容器（两张卡并排时 960px，手机单列） */
body.patient:has(> .htop):has(> main) > .htop,
body.patient:has(> .htop) > main { width:100%; max-width:960px; margin-inline:auto; padding-inline:20px; box-sizing:border-box; }
body.patient:has(> .htop) > main :is(button[type=submit],.primary-button) { border-radius:99px; min-height:48px; padding:0 22px; box-shadow:var(--b22-shadow-cta); }
@media (max-width:599px) { body.patient:has(> .htop) > main :is(button[type=submit],.primary-button) { width:100%; } }


/* ====== 首页高级感（B23 第四轮） ======
   1) 三位数字人缓慢交替淡入淡出（纯装饰，读屏忽略；减少动画时只显示小愈）
   2) 照片一律通栏铺满并柔和渐隐到页面底色，不再出现两侧空白或硬边
   3) 表单放在半透明毛玻璃卡片上，压住照片渐隐处，形成照片→表单的连续过渡
   4) 进入页面时照片淡入、表单轻轻上浮 */
body:has(.account-card)::before, body:has(.account-card)::after { content:none !important; }
body:has(.account-card) { --b23-hero-h:clamp(300px,50svh,560px); background:var(--bg); overflow-x:hidden; }
.b23-hero { position:absolute; z-index:0; inset:0 0 auto 0; height:var(--b23-hero-h); overflow:hidden; pointer-events:none; background:#E9D8D1;
  -webkit-mask-image:linear-gradient(#000 52%,rgba(0,0,0,.55) 74%,transparent); mask-image:linear-gradient(#000 52%,rgba(0,0,0,.55) 74%,transparent);
  animation:b23-hero-in 1.1s var(--b23-ease) both; }
.b23-hero i { position:absolute; inset:0; opacity:0; background-repeat:no-repeat; background-size:cover; animation:b23-cycle 18s linear infinite both; }
.b23-hero i:nth-child(1) { background-image:url(/assets/b22/xiaoyu-hero.jpg); background-position:50% 6%; animation-delay:-1.2s; }
.b23-hero i:nth-child(2) { background-image:url(/assets/b22/yang-warm.jpg); background-position:50% 8%; animation-delay:4.8s; }
.b23-hero i:nth-child(3) { background-image:url(/assets/b22/he-warm.jpg); background-position:50% 10%; animation-delay:10.8s; }
@keyframes b23-cycle { 0% { opacity:0; transform:scale(1.06); } 7% { opacity:1; } 33% { opacity:1; } 40% { opacity:0; transform:scale(1); } 100% { opacity:0; transform:scale(1); } }
@keyframes b23-hero-in { from { opacity:0; } to { opacity:1; } }
@keyframes b23-rise { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:none; } }
body:has(.account-card) .home-header { position:relative; z-index:3; }
body:has(.account-card) .home-main { position:relative; z-index:1; }
body:has(.account-card) .home-main > .welcome, body:has(.account-card) .home-main > .account-card { animation:b23-rise .7s var(--b23-ease) both; }
body:has(.account-card) .home-main > .account-card { animation-delay:.08s; }
@media (prefers-reduced-motion:reduce) {
  .b23-hero, .b23-hero i, body:has(.account-card) .home-main > * { animation:none !important; }
  .b23-hero i:nth-child(1) { opacity:1; transform:none; }
}

/* 手机竖屏：照片通栏，文字压在渐隐处 */
body:has(.account-card) .home-main > .welcome { margin-top:calc(var(--b23-hero-h) - 132px); }
@media (max-height:700px) and (orientation:portrait) {
  body:has(.account-card) { --b23-hero-h:clamp(240px,44svh,360px); }
  body:has(.account-card) .home-main > .welcome { margin-top:calc(var(--b23-hero-h) - 112px); }
  body:has(.account-card) .welcome h1 { font-size:1.5rem; }
  body:has(.account-card) .welcome-description { font-size:.875rem; }
}

/* 宽手机、平板竖屏：照片仍然通栏，表单放进居中的毛玻璃卡片 */
@media (min-width:600px) and (orientation:portrait) {
  body:has(.account-card) { --b23-hero-h:min(62svh,760px); }
  body:has(.account-card) .home-header { max-width:none; margin:0; padding:24px 32px 0; }
  body:has(.account-card) .home-main { max-width:none; width:100%; padding:0 32px 32px; align-items:center; }
  body:has(.account-card) .home-main > * { width:100%; max-width:520px; margin-inline:auto; }
  body:has(.account-card) .home-main > .welcome { margin-top:calc(var(--b23-hero-h) - 210px); text-align:center; }
  body:has(.account-card) .welcome h1, body:has(.account-card) .welcome-description { text-align:center; }
  body:has(.account-card) .welcome h1 { font-size:2rem; }
  body:has(.account-card) .home-main > .account-card {
    margin-top:22px; padding:22px 24px 24px; border-radius:30px;
    background:rgba(255,255,255,.62); -webkit-backdrop-filter:blur(22px) saturate(1.4); backdrop-filter:blur(22px) saturate(1.4);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.7),0 24px 50px -30px rgba(60,40,20,.35);
  }
  body:has(.account-card) .home-footer { max-width:none; padding-bottom:24px; }
}

/* 横屏（手机横屏、平板横屏、电脑）：照片占左侧整高，向右柔和渐隐进表单区 */
@media (orientation:landscape) and (min-width:700px), (orientation:landscape) and (min-width:560px) and (max-height:540px) {
  body:has(.account-card) { --b23-split:52%; --b23-hero-h:100dvh; min-height:100dvh; }
  .b23-hero { position:fixed; inset:0 auto 0 0; width:calc(var(--b23-split) + 10%); height:100dvh;
    -webkit-mask-image:linear-gradient(90deg,#000 34%,rgba(0,0,0,.86) 52%,rgba(0,0,0,.55) 70%,rgba(0,0,0,.2) 86%,transparent); mask-image:linear-gradient(90deg,#000 34%,rgba(0,0,0,.86) 52%,rgba(0,0,0,.55) 70%,rgba(0,0,0,.2) 86%,transparent); }
  .b23-hero i { background-position:50% 12%; }
  body:has(.account-card) .home-header { position:absolute; left:0; top:0; width:var(--b23-split); max-width:none; margin:0; padding:28px 36px 0; }
  body:has(.account-card) .home-main {
    display:flex; flex-direction:column; justify-content:center; align-items:center;
    width:calc(100% - var(--b23-split)); max-width:none; min-height:100dvh; margin:0 0 0 var(--b23-split); padding:64px 48px 80px;
  }
  body:has(.account-card) .home-main > * { width:100%; max-width:420px; }
  body:has(.account-card) .home-main > .welcome { margin-top:0; text-align:left; }
  body:has(.account-card) .home-main > .account-card {
    margin-top:18px; padding:22px 24px 24px; border-radius:30px;
    background:rgba(255,255,255,.66); -webkit-backdrop-filter:blur(22px) saturate(1.4); backdrop-filter:blur(22px) saturate(1.4);
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.75),0 24px 50px -30px rgba(60,40,20,.32);
  }
  body:has(.account-card) .home-footer { position:absolute; left:var(--b23-split); right:0; bottom:16px; margin:0; max-width:none; width:auto; }
}
@media (orientation:landscape) and (min-width:1400px) {
  body:has(.account-card) { --b23-split:56%; }
  body:has(.account-card) .welcome h1 { font-size:2.125rem; }
  body:has(.account-card) .home-main > * { max-width:440px; }
}
/* 手机横屏：高度很矮，左照片收窄，右侧表单紧凑并可滚动 */
@media (orientation:landscape) and (min-width:560px) and (max-height:540px) {
  body:has(.account-card) { --b23-split:42%; }
  .b23-hero i { background-position:50% 4%; }
  body:has(.account-card) .home-header { padding:14px 20px 0; }
  body:has(.account-card) .home-main { justify-content:flex-start; padding:18px 28px 20px; }
  body:has(.account-card) .home-main > .account-card { margin-top:10px; padding:14px 18px 16px; border-radius:24px; }
  body:has(.account-card) .welcome h1 { font-size:1.375rem; }
  body:has(.account-card) .welcome-description { display:none; }
  body:has(.account-card) #account-form :where(input) { min-height:44px; }
  body:has(.account-card) #account-form label { margin-top:6px; }
  body:has(.account-card) .form-hint { display:none; }
  body:has(.account-card) #submit-account { margin-top:10px; min-height:48px; }
  body:has(.account-card) .home-footer { position:static; margin:0 0 0 var(--b23-split); width:calc(100% - var(--b23-split)); padding:0 28px 14px; text-align:left; }
}

/* 首页细调：竖屏手机照片略矮，按钮留在第一屏；宽屏照片按高度缩放，露出上半身而不是只有一张大脸 */
body:has(.account-card) { --b23-hero-h:clamp(260px,44svh,520px); }
body:has(.account-card) .home-main > .welcome { margin-top:calc(var(--b23-hero-h) - 118px); }
@media (min-width:600px) and (orientation:portrait) {
  body:has(.account-card) { --b23-hero-h:min(60svh,760px); }
  body:has(.account-card) .home-main > .welcome { margin-top:calc(var(--b23-hero-h) - 200px); }
}
@media (orientation:landscape) and (min-width:900px) and (min-height:541px) {
  .b23-hero i { background-size:auto 108%; background-position:50% 0; }
}

@media (orientation:landscape) and (min-width:700px), (orientation:landscape) and (min-width:560px) and (max-height:540px) { body:has(.account-card) .home-main > .welcome { margin-top:0; } }
@media (min-width:600px) and (orientation:portrait) { .b23-hero i { background-size:auto 124%; background-position:50% 0; } }
@media (max-width:389px) and (orientation:portrait) { body:has(.account-card) { --b23-hero-h:clamp(240px,38svh,340px); } body:has(.account-card) .home-main > .welcome { margin-top:calc(var(--b23-hero-h) - 104px); } }


/* ====== 首页第六轮（B23）：三张人物照统一取景，按尺寸分别设计 ======
   三张原图格式不同：小愈 2:3、留白多；杨、何 9:16、肩膀顶到图片左右边。
   现在每张图都先做成同一规格的画布（assets/b23/*-stage_v01.jpg，1440×1280）：
   眼线都在 y=352，脸中心都在 x=720，按脸宽对齐缩放；原图像素完整保留，原图够不到的两侧沿肩线延伸并虚化。
   所以三张图共用一套尺寸和位置，轮换时人的位置和大小一致，不会裁肩膀，也不会出现硬边。 */
.b23-hero i:nth-child(1) { background-image:url(/assets/b23/xiaoyu-stage_v01.jpg); }
.b23-hero i:nth-child(2) { background-image:url(/assets/b23/yang-stage_v01.jpg); }
.b23-hero i:nth-child(3) { background-image:url(/assets/b23/he-stage_v01.jpg); }
/* 手机竖屏：脸宽约为屏宽的 37%，头顶让开品牌字，下巴停在标题上方 */
.b23-hero i:nth-child(n) { background-size:144vw auto; background-position:50% 50px; }
/* 人像椭圆渐隐（画布坐标）：中心在下巴附近 (720,520)，横半径 350——杨、何的原图边缘离脸中心 358，
   所以到原图边缘时已经完全透明；头顶在 72% 以内，保持不透明。遮罩的尺寸和位置跟背景图完全一致。 */
.b23-hero i:nth-child(n) {
  --b23-vig:radial-gradient(ellipse 24.3% 50% at 50% 40.6%,#000 72%,transparent 100%);
  -webkit-mask-image:var(--b23-vig); mask-image:var(--b23-vig); -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat;
  -webkit-mask-size:144vw 128vw; mask-size:144vw 128vw; -webkit-mask-position:50% 50px; mask-position:50% 50px;
}
@media (orientation:portrait) and (max-width:599px) {
  .b23-hero { -webkit-mask-image:linear-gradient(#000 70%,rgba(0,0,0,.35) 80%,transparent 88%); mask-image:linear-gradient(#000 70%,rgba(0,0,0,.35) 80%,transparent 88%); }
}
/* 宽手机、平板竖屏：人居中，露出头和肩，标题压在渐隐处 */
@media (min-width:600px) and (orientation:portrait) {
  .b23-hero i:nth-child(n) { background-size:auto 110%; background-position:50% 24px;
    -webkit-mask-size:calc(var(--b23-hero-h) * 1.2375) calc(var(--b23-hero-h) * 1.1); mask-size:calc(var(--b23-hero-h) * 1.2375) calc(var(--b23-hero-h) * 1.1);
    -webkit-mask-position:50% 24px; mask-position:50% 24px; }
  .b23-hero { -webkit-mask-image:linear-gradient(#000 52%,rgba(0,0,0,.4) 67%,transparent 79%); mask-image:linear-gradient(#000 52%,rgba(0,0,0,.4) 67%,transparent 79%); }
}
/* 平板横屏、电脑：人居中在左栏，头顶留 56px（让开左上角品牌字），小愈的衣摆正好落在屏幕底边 */
@media (orientation:landscape) and (min-width:700px) and (min-height:541px) {
  body:has(.account-card) { --b23-col:26vw; }
  .b23-hero i:nth-child(n) { background-size:auto calc((100dvh - 56px) * 1.1819); background-position:calc(var(--b23-col) - (100dvh - 56px) * .6648) 56px;
    -webkit-mask-size:calc((100dvh - 56px) * 1.3296) calc((100dvh - 56px) * 1.1819); mask-size:calc((100dvh - 56px) * 1.3296) calc((100dvh - 56px) * 1.1819);
    -webkit-mask-position:calc(var(--b23-col) - (100dvh - 56px) * .6648) 56px; mask-position:calc(var(--b23-col) - (100dvh - 56px) * .6648) 56px; }
}
@media (orientation:landscape) and (min-width:1400px) and (min-height:541px) { body:has(.account-card) { --b23-col:28vw; } }
/* 手机横屏：左栏 42%，人居中在左栏，头顶让开品牌字 */
@media (orientation:landscape) and (min-width:560px) and (max-height:540px) {
  .b23-hero i:nth-child(n) { background-size:auto 125%; background-position:calc(21vw - 70.15dvh) 50px;
    -webkit-mask-size:140.625dvh 125dvh; mask-size:140.625dvh 125dvh; -webkit-mask-position:calc(21vw - 70.15dvh) 50px; mask-position:calc(21vw - 70.15dvh) 50px; }
}

/* ====== 登录 / 注册：同一张卡片内切换，不跳 ====== */
/* 分段按钮：白色滑块滑过去，而不是两个按钮各自变色 */
body:has(.account-card) .auth-tabs { position:relative; isolation:isolate; }
body:has(.account-card) .auth-tabs::before {
  content:""; position:absolute; z-index:-1; top:4px; bottom:4px; left:4px; width:calc(50% - 4px); border-radius:11px;
  background:#fff; box-shadow:0 1px 3px rgba(60,40,20,.12),0 6px 16px -10px rgba(60,40,20,.25);
  transition:transform .34s var(--b23-ease);
}
body:has(.account-card) .auth-tabs:has(#register-tab[aria-selected=true])::before { transform:translateX(100%); }
body:has(.account-card) .auth-tabs [role=tab], body:has(.account-card) .auth-tabs [aria-selected=true] { background:transparent; box-shadow:none; transition:color .2s ease; }
/* 确认密码：高度平滑展开/收起，下面的内容跟着滑动，不再整块跳出 */
body:has(.account-card) #confirm-group { display:grid; grid-template-rows:1fr; opacity:1; visibility:visible;
  transition:grid-template-rows .34s var(--b23-ease), opacity .24s ease .08s, visibility 0s; }
body:has(.account-card) #confirm-group[hidden] { display:grid !important; grid-template-rows:0fr; opacity:0; visibility:hidden;
  transition:grid-template-rows .3s var(--b23-ease), opacity .12s ease, visibility 0s .3s; }
body:has(.account-card) #confirm-group > .confirm-inner { min-height:0; overflow:hidden; }
/* 两种模式的提示文字行数一致：窄屏固定留两行 */
@media (max-width:379px) { body:has(.account-card) .form-hint { min-height:2lh; } }
/* 手机：内容列撑满左右边距。原来主列是 align-items:start，标题和卡片按文字长短收缩，
   390 以上的手机右边空得比左边多，切到注册时卡片宽度还会跟着提示文字变 */
@media (orientation:portrait) and (max-width:599px), (orientation:landscape) and (max-width:559px) {
  body:has(.account-card) .home-main { align-items:stretch; }
}
/* 选人、记录、资料页：滚动条预留两侧对称，内容不再整体偏左 7–8px */
html:has(body.patient), html:has(.doctors) { scrollbar-gutter:stable both-edges; }
/* 宽屏左右分栏：右栏从固定高度开始排，不再上下居中——切到注册时上面的内容一动不动，只往下展开 */
@media (orientation:landscape) and (min-width:700px) and (min-height:541px) {
  body:has(.account-card) .home-main { justify-content:flex-start; padding-top:max(72px, calc(50dvh - var(--b23-col-h, 250px))); padding-bottom:56px; }
}

/* ====== 进页面时不跳：先按登录卡片的尺寸占好位置，确认登录状态后淡入 ====== */
body:has(.account-card) .account-card { position:relative; }
body:has(.account-card) #account-loading:not([hidden]) ~ #auth-pane[hidden] { display:block !important; visibility:hidden; }
body:has(.account-card) #account-loading:not([hidden]) ~ #auth-pane { opacity:0; }
body:has(.account-card) #auth-pane, body:has(.account-card) #signed-in-pane { transition:opacity .32s ease; }
body:has(.account-card) #account-loading:not([hidden]) {
  position:absolute; inset:0; z-index:2; display:grid; place-items:center; margin:0; font-size:.875rem; color:var(--ink3);
  opacity:0; animation:b23-fade-in .2s ease .6s forwards; /* 确认得快就根本不出现这行字 */
}
@keyframes b23-fade-in { to { opacity:1; } }
@media (prefers-reduced-motion:reduce) {
  body:has(.account-card) .auth-tabs::before, body:has(.account-card) #confirm-group, body:has(.account-card) #confirm-group[hidden],
  body:has(.account-card) #auth-pane, body:has(.account-card) #signed-in-pane { transition:none; }
}

/* ====== 页面切换（B23）：顶栏不动，内容按方向进出；手机和大屏分别设计 ======
   浏览器原生跨页过渡（patient-motion.css 已开启 @view-transition）。原来整页一起平移 22px，
   顶栏也跟着晃，看起来只是"闪一下"。现在：
   - 顶栏单独成层，位置不动，只做内容的交叉淡化；
   - 手机：像系统导航一样横向推入，前进从右进、后退从左进；
   - 平板和电脑：内容轻轻上浮淡入，不做大幅横移；
   - 首页照片离开时轻微放大淡出。 */
/* 只有选人、记录、资料三页的顶栏结构相同，才让顶栏保持不动；首页和聊天页顶栏不同，硬做形变会出现两层文字重影 */
.htop { view-transition-name:patient-head; }
.b23-hero { view-transition-name:patient-hero; }
:root { --b23-vt-in:36px; --b23-vt-out:-18px; }
html[data-route-direction="back"] { --b23-vt-in:-36px; --b23-vt-out:18px; }
html[data-route-direction="same"] { --b23-vt-in:0px; --b23-vt-out:0px; }
/* 先出后进：旧页 160ms 内淡出，新页 110ms 后才进来，两页几乎不重叠，不会出现重影 */
::view-transition-old(root) { animation:b23-vt-out 160ms cubic-bezier(.4,0,1,1) both; }
::view-transition-new(root) { animation:b23-vt-in 360ms var(--b23-ease) 110ms both; }
::view-transition-group(patient-head) { animation-duration:340ms; animation-timing-function:var(--b23-ease); }
::view-transition-old(patient-head) { animation:b23-vt-fade-out 120ms ease-in both; }
::view-transition-new(patient-head) { animation:b23-vt-fade-in 220ms ease-out 110ms both; }
::view-transition-old(patient-hero) { animation:b23-vt-hero-out 200ms ease-in both; }
::view-transition-new(patient-hero) { animation:b23-vt-fade-in 420ms ease both; }
@keyframes b23-vt-out { to { opacity:0; transform:translateX(var(--b23-vt-out)); } }
@keyframes b23-vt-in { from { opacity:0; transform:translateX(var(--b23-vt-in)); } }
@keyframes b23-vt-fade-out { to { opacity:0; } }
@keyframes b23-vt-fade-in { from { opacity:0; } }
@keyframes b23-vt-hero-out { to { opacity:0; transform:scale(1.03); } }
@keyframes b23-vt-rise { from { opacity:0; transform:translateY(16px); } }
@keyframes b23-vt-sink { to { opacity:0; transform:translateY(-8px); } }
@media (min-width:768px) and (min-height:541px) {
  ::view-transition-old(root) { animation:b23-vt-sink 160ms cubic-bezier(.4,0,1,1) both; }
  ::view-transition-new(root) { animation:b23-vt-rise 440ms var(--b23-ease) 110ms both; }
}

/* 标题和说明：中文末行不留单字（“摘 / 要。”） */
body[data-patient-theme] :is(h1,h2,h3) { text-wrap:balance; }
body[data-patient-theme] :is(p,li,figcaption,.form-hint) { text-wrap:pretty; }.b23-phrase { display:inline-block; }
/* 中文界面文案：优先在标点处换行（keep-all），一句话太长时再按字断开（anywhere 兜底）。
   只用于标题、说明、提示、卡片短句和当前问题，不用于聊天正文长段落。 */
body[data-patient-theme] :is(h1,h2,h3,.h2sub,.resume-status,.ds,.how,.lead,.notice,.form-hint,.card-description,.welcome-description,.question-text,.b22-welcome p,.records-empty p) {
  word-break:keep-all; overflow-wrap:anywhere;
}

/* ====== 选人页（B23 第六轮）：同一取景、照片贴边、顶栏与内容对齐 ======
   原来：卡片里再套一个圆角照片框；小愈是整张大脸、杨/何是头肩，三张取景不一致；顶栏比内容宽、左边对不齐；
   每张卡都有淡紫圆形箭头和淡紫标签，显得像套模板。
   现在：照片改用首页同一套统一取景画布（眼线、脸宽一致），直接铺满卡片的照片区，被卡片圆角裁切；
   箭头只留一个细的 >，整张卡就是按钮（按下轻微缩小，电脑上悬停微微抬起）。 */
body:has(.doctors) { --b23-gutter:20px; --b23-wrap:1040px; }
@media (min-width:768px) { body:has(.doctors) { --b23-gutter:32px; } }
body:has(.doctors) .htop, body:has(.doctors) main, body:has(.doctors) > footer {
  width:100%; max-width:calc(var(--b23-wrap) + 2 * var(--b23-gutter)); margin-inline:auto; padding-inline:var(--b23-gutter); box-sizing:border-box;
}
body:has(.doctors) .htop .rec-link { background:rgba(255,255,255,.72); color:var(--ink); box-shadow:inset 0 0 0 1px var(--line); }
body:has(.doctors) .htop .rec-link .icon { color:var(--brand); }
body:has(.doctors) main > h1 { font-size:1.625rem; line-height:1.3; margin:8px 0 6px; }
body:has(.doctors) .h2sub { margin:0 0 4px; font-size:.9375rem; line-height:1.6; }
body:has(.doctors) .resume-status { margin:0 0 16px; font-size:.875rem; color:var(--ink3); }
body:has(.doctors) .doctors { display:grid; grid-template-columns:minmax(0,1fr); gap:12px; }
body:has(.doctors) .dc {
  position:relative; display:grid; grid-template-columns:108px minmax(0,1fr) 28px; align-items:center; gap:0 14px;
  min-height:116px; padding:0 14px 0 0; overflow:hidden; border:0; border-radius:24px; background:#fff; color:var(--ink);
  box-shadow:0 1px 2px rgba(60,40,20,.05),0 14px 30px -20px rgba(60,40,20,.3);
  transition:transform .28s var(--b23-ease),box-shadow .28s var(--b23-ease);
}
body:has(.doctors) .dc:active { transform:scale(.985); }
@media (hover:hover) {
  body:has(.doctors) .dc:hover { transform:translateY(-2px); box-shadow:0 1px 2px rgba(60,40,20,.05),0 22px 40px -22px rgba(60,40,20,.38); }
  body:has(.doctors) .dc:hover .ar { color:var(--brand); transform:translateX(3px); }
}
/* 照片区：用统一取景画布当背景，按画布坐标取“头顶到领口” */
body:has(.doctors) .dc .ph {
  display:block; align-self:stretch; width:auto; height:auto; min-height:116px; border-radius:0; box-shadow:none;
  background:var(--b22-skin) no-repeat 50% 3.4% / auto 183%;
}
body:has(.doctors) .dc .ph img { visibility:hidden; }
body:has(.doctors) .dc[data-avatar^="xiaoyu"] .ph { background-image:url(/assets/b23/xiaoyu-stage_v01.jpg); }
body:has(.doctors) .dc[data-avatar^="yang"] .ph { background-image:url(/assets/b23/yang-stage_v01.jpg); }
body:has(.doctors) .dc[data-avatar^="he"] .ph { background-image:url(/assets/b23/he-stage_v01.jpg); }
body:has(.doctors) .dc .dm { display:grid; gap:4px; padding:14px 0; min-width:0; }
body:has(.doctors) .dc .nm { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
body:has(.doctors) .dc .nm b { font-size:1.1875rem; font-weight:700; }
body:has(.doctors) .dc .tag { padding:1px 8px; border-radius:99px; background:var(--fill); color:var(--ink2); font-size:.75rem; font-weight:500; }
body:has(.doctors) .dc .ds { display:block; color:var(--ink2); font-size:.875rem; line-height:1.5; text-wrap:pretty; }
body:has(.doctors) .dc .lastt { justify-self:start; color:var(--brand-d); font-size:.75rem; font-weight:650; }
body:has(.doctors) .dc .ar { width:28px; height:28px; background:none; color:var(--ink3); border-radius:0; transition:transform .28s var(--b23-ease),color .2s; }
body:has(.doctors) .how { display:block; margin:20px 0 0; color:var(--ink3); font-size:.8125rem; line-height:1.7; }
/* 平板竖屏、电脑：三张卡并排，照片在上（5:6），名字和说明在下 */
@media (min-width:600px) and (orientation:portrait), (orientation:landscape) and (min-width:900px) and (min-height:541px) {
  body:has(.doctors) main > h1 { font-size:1.875rem; margin-top:20px; }
  body:has(.doctors) .doctors { grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin-top:8px; }
  body:has(.doctors) .dc { grid-template-columns:minmax(0,1fr) 28px; grid-template-rows:auto auto; padding:0; min-height:0; gap:0; align-items:end; }
  body:has(.doctors) .dc .ph { grid-column:1 / -1; aspect-ratio:5 / 6; min-height:0; background-size:auto 151%; background-position:50% 4.6%; }
  body:has(.doctors) .dc .dm { padding:16px 0 18px 20px; }
  body:has(.doctors) .dc .ar { margin:0 16px 20px 0; }
}
/* 手机横屏：矮，三张小卡并排，照片在左 */
@media (orientation:landscape) and (max-height:540px) {
  body:has(.doctors) .doctors { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
  body:has(.doctors) .dc { grid-template-columns:72px minmax(0,1fr) 22px; min-height:76px; gap:0 10px; padding-right:8px; border-radius:20px; }
  body:has(.doctors) .dc .ph { min-height:76px; background-size:auto 188%; }
  body:has(.doctors) .dc .dm { padding:10px 0; }
  body:has(.doctors) .dc .ds { display:none; }
  body:has(.doctors) .how { display:none; }
}
@media (prefers-reduced-motion:reduce) { body:has(.doctors) .dc, body:has(.doctors) .dc .ar { transition:none; } }

/* 电脑横屏：照片 1:1，保证名字和说明在第一屏内 */
@media (orientation:landscape) and (min-width:900px) and (min-height:541px) {
  body:has(.doctors) main > h1 { margin-top:8px; }
  body:has(.doctors) .resume-status { margin-bottom:12px; }
  body:has(.doctors) .dc .ph { aspect-ratio:1 / 1; background-size:auto 188%; background-position:50% 3.3%; }
}
/* 聊天页快捷回答：手机上换行全部显示，不再横向滚动、最后一个被屏幕边缘切掉 */
@media (max-width:599px) {
  body.patient-chat #quick-replies .quick-reply-row { flex-wrap:wrap; overflow:visible; row-gap:8px; -webkit-mask-image:none; mask-image:none; }
}
/* 记录页空状态：按钮和其它主按钮同一形状；没有记录时不显示分页 */
body.patient .records-empty :is(a,button) { display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:0 26px; border-radius:99px; box-shadow:var(--b22-shadow-cta); }
body.patient:has(.records-empty) .pager { display:none; }/* 各页顶栏右侧入口（我的记录 / 选助手）：统一为白底细边胶囊，和选人页一致 */
body[data-patient-theme]:has(> .htop) .htop .rec-link { background:rgba(255,255,255,.72); color:var(--ink); box-shadow:inset 0 0 0 1px var(--line); }
body[data-patient-theme]:has(> .htop) .htop .rec-link .icon { color:var(--brand); }
/* 聊天页进页面：对话恢复完成前先不显示内容，完成后整体淡入。
   原来欢迎卡要等恢复完成才出现，会把下面的问题顶下去（电脑端测得布局偏移 0.056）。 */
body.patient-chat #main { transition:opacity .32s ease; }
body.patient-chat[data-restoring="true"] #main { opacity:0; }
@media (prefers-reduced-motion:reduce) { body.patient-chat #main { transition:none; } }
/* 电脑、平板横屏：欢迎卡改成横条——文字在左，“视频交流”在右；不再是右半边空着的粉色大块 */
@media (orientation:landscape) and (min-width:900px) and (min-height:541px) {
  body.patient-chat[data-started=false] .chat:not(:has(.history-list > *)) .b22-welcome {
    display:grid !important; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:16px;
    min-height:0; padding:18px 20px; border-radius:22px; background:#fff;
    box-shadow:inset 0 0 0 1px var(--line),0 12px 28px -22px rgba(60,40,20,.3);
  }
  body.patient-chat .b22-welcome b { font-size:1.0625rem; }
  body.patient-chat .b22-welcome .b22-video-button { margin:0; background:var(--brand); color:#fff; box-shadow:var(--b22-shadow-cta); }
  body.patient-chat .b22-welcome .b22-video-button .icon { color:#fff; }
}
/* 视频页快捷回答：一行横滑，右端渐隐提示后面还有 */
body.video-call .quick-reply-row { -webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent); mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent); padding-right:20px; }

/* 首页已登录状态：问候和说明左对齐；两个入口做成同宽胶囊按钮，文字居中；退出是居中的文字按钮 */
body:has(.account-card) #signed-in-pane .card-description { display:block; margin:4px 0 16px; text-align:left; color:var(--ink2); font-size:.9375rem; }
body:has(.account-card) #signed-in-pane .signed-links { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:12px 0 0; }
body:has(.account-card) #signed-in-pane .signed-links a {
  display:flex; align-items:center; justify-content:center; min-height:48px; margin:0; padding:0 12px; border:0; border-radius:99px;
  background:rgba(255,255,255,.78); box-shadow:inset 0 0 0 1px var(--line); color:var(--ink); font-weight:600; text-align:center;
}
body:has(.account-card) #switch-account { display:block; width:auto; min-height:44px; margin:12px auto 0; padding:0 16px; border:0; background:none; box-shadow:none; color:var(--ink2); font-weight:500; }
