/* Shared patient typography. Every patient page loads this after its layout. */
:root {
  --font-sans:"Microsoft YaHei","PingFang SC","HarmonyOS Sans SC","Noto Sans CJK SC","Noto Sans SC",sans-serif;
  --type-body:1rem;
  --type-question:1.1875em;
  --type-control:.9375em;
  --type-note:.875em;
  --type-small:.875em;
  --weight-body:400;
  --weight-medium:500;
  --weight-label:600;
  --weight-brand:700;
  font-family:var(--font-sans);
  font-size:106.25%;
  font-synthesis:none;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}
body {
  font-family:var(--font-sans);
  font-size:calc(var(--type-body) * var(--font-scale,1));
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
button,input,textarea,select,summary {font-family:inherit;}
input:not([type="checkbox"]):not([type="radio"]),select {height:auto;min-height:max(50px,calc(1.6em + 26px));}
.password-field input {padding-right:calc(2em + 44px);}
.password-field button {top:50%;transform:translateY(-50%);}
#draft {height:max(52px,calc(1.55em + 26px));min-height:max(52px,calc(1.55em + 26px));}
button {font-weight:var(--weight-label);}
dialog,.voice-preview-dialog {font-family:var(--font-sans);line-height:1.65;}
#voice-overlay {font-family:var(--font-sans);}
#voice-preview label,#voice-preview-error,.voice-preview-note,.voice-slide-hint {font-size:var(--type-note);line-height:1.6;}
#voice-preview-send {font-size:var(--type-control);font-weight:var(--weight-label);}
h1,h2,h3,h4 {font-weight:var(--weight-label);line-height:1.4;}
.welcome h1,.account-card h2 {font-weight:var(--weight-label);}
.wordmark strong,.bn {font-size:1.1875rem;font-weight:var(--weight-brand);letter-spacing:0;}
.patient h1,body>main>h1 {font-size:1.5rem;font-weight:var(--weight-label);line-height:1.4;letter-spacing:0;}
.character-identity strong {font-size:1.125em;font-weight:var(--weight-label);}
.call-portrait .nm {font-size:1.125rem;font-weight:var(--weight-label);}
.question-text,#assistant-caption {font-size:var(--type-question);font-weight:var(--weight-medium);line-height:1.7;}
.question-intro {font-size:calc(var(--type-body) * var(--font-scale,1));font-weight:var(--weight-body);line-height:1.7;}
.question-label,.question-hint {font-size:var(--type-small);line-height:1.6;}
.state-line,.composer-status,.sys,.status,.draft-notice,.form-hint {font-size:var(--type-note);line-height:1.6;}
.dialog .setting-note {font-size:var(--type-note);line-height:1.6;}
.bar a[aria-disabled="true"] {pointer-events:none;}
.boot-exits {display:block;margin-top:12px;font-size:var(--type-note);line-height:1.7;}
.boot-exits a {display:inline-block;min-height:44px;color:#00626A;text-decoration:underline;text-underline-offset:3px;}
img[data-avatar-fallback="true"] {object-fit:contain!important;object-position:center!important;background:#E6EFEC;}
.avatar img.source-portrait[data-avatar-fallback="true"] {visibility:hidden;}
.avatar[data-portrait-unavailable="true"]::before {content:"";position:absolute;inset:0;z-index:20;background:#EBDAD3 url('/assets/b23/tongyu-mark_v01.png') center calc(50% - 20px)/64px 64px no-repeat;}
.avatar[data-portrait-unavailable="true"]::after {content:"人物画面暂时不可用";position:absolute;z-index:21;left:10px;right:10px;top:calc(50% + 30px);text-align:center;font-size:var(--type-note);line-height:1.5;color:#526970;}
.avatar[data-talking="true"][data-portrait-unavailable="true"]::before,.avatar[data-talking="true"][data-portrait-unavailable="true"]::after {visibility:hidden;}
.ph img[data-avatar-fallback="true"] {padding:24%;box-sizing:border-box;}
.composer-status .composer-retry {font:inherit;font-weight:var(--weight-label);line-height:1.4;min-height:44px;padding:0 12px;color:#00626A;background:transparent;border:0;border-radius:6px;}
.composer-status .composer-retry:focus-visible {outline:3px solid #007A82;outline-offset:2px;}
.composer-status .composer-retry:disabled {opacity:.6;}
.patient button,.patient .rec-link,.patient .actions a {font-size:var(--type-control);font-weight:var(--weight-label);line-height:1.4;}
.pain-card-title {font-size:.9375em;font-weight:var(--weight-label);line-height:1.5;}
#pain-location-open {font-size:var(--type-control);font-weight:var(--weight-label);line-height:1.4;}
.pain-card-description,.session-note,.portrait-caption span,.call-identity,.notice,.cc {font-size:var(--type-note);line-height:1.6;}
.primary-button,.dialog-primary,.dialog-secondary,.hold,#text-send,#connect,#record-toggle,#hangup,.answer-actions button {
  font-size:var(--type-control);font-weight:var(--weight-label);line-height:1.4;
}
.dialog h2,.patient .dialog-head h2,.voice-preview-dialog h2 {font-size:1.1875em;font-weight:var(--weight-label);line-height:1.4;}
.patient .dialog-content>h2,#summary-doctor h3 {font-size:1.1875em;font-weight:var(--weight-label);line-height:1.4;}
.patient .dialog-content h3,#summary-fields h3,#summary-doctor h4 {font-size:1em;font-weight:var(--weight-label);line-height:1.5;}
.patient .dialog-content p,#summary-doctor p {line-height:1.75;white-space:pre-wrap;overflow-wrap:anywhere;}
#main:focus-visible {outline:3px solid #007A82;outline-offset:-3px;}
@media(max-width:767px) {
  body[data-large-text="true"] .bar .pill {width:44px;padding:0;gap:0;justify-content:center;font-size:0;}
  body[data-large-text="true"] .bar {gap:6px;}
  body[data-large-text="true"] .character-identity {flex-direction:row;}
  body[data-large-text="true"] .character-identity strong {font-size:1em;}
  body[data-large-text="true"] .character-identity .tag {font-size:.65em;}
  body[data-large-text="true"] .steps {gap:4px;}
  body[data-large-text="true"] .st {gap:4px;font-size:.7em;}
}
@media(max-width:767px) and (max-height:600px) {
  body[data-large-text="true"] #draft {max-height:max(52px,calc(1.55em + 26px));}
  body[data-large-text="true"] .composer {padding-top:8px;padding-bottom:8px;max-height:max(120px,calc(var(--app-height,100dvh) - var(--head-h,122px) - 80px));overflow-y:auto;overscroll-behavior:contain;}
  body[data-large-text="true"] .composer .draft-notice {padding:6px 10px;gap:6px 8px;margin-bottom:8px;}
  body[data-large-text="true"] .composer-status {margin-top:4px;}
  body[data-large-text="true"] .composer:has(#latest-button:not([hidden])) {max-height:none;overflow:visible;}
}
@media(max-height:420px) {
  #draft {max-height:max(52px,calc(1.55em + 26px));}
}
@media(max-height:600px) {
  body[data-large-text="true"] .question-intro {display:none;}
  body[data-large-text="true"] .question-text {font-size:1em;line-height:1.5;}
}
@media(max-width:600px) {
  .voice-preview-actions {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;}
  .voice-preview-actions button {justify-content:center;min-width:0;}
  #voice-preview-send {grid-column:1/-1;width:100%;margin-left:0;}
}
