/* B27: one home/register vocabulary throughout the patient workspace. */
body[data-patient-theme]{--b27-canvas:#F7F3EE;--b27-paper:#FFFEFD;--b27-line:#EAE1D8;--b27-radius:28px;--b27-ease:cubic-bezier(.23,1,.32,1);--b27-shadow:0 2px 4px rgb(66 43 24 / .025),0 18px 40px -24px rgb(66 43 24 / .22);--bg:var(--b27-canvas);--surface:var(--b27-paper);--line:var(--b27-line);--field-line:var(--b27-line);background:var(--b27-canvas);}
body[data-patient-theme] :is(button,a,summary):focus-visible{outline:3px solid rgb(54 83 201 / .22);outline-offset:3px;}
body[data-patient-theme] :is(.primary-button,.dialog-primary,.b22-video-button,.rec-link,.mi,.search-submit,.visit-actions a,.visit-actions button,.quick-reply-chip,.text-button,#view-button,#send-button,#summary-back,#summary-copy,#summary-download,#summary-print,#summary-edit,#close-detail){transition:transform 140ms var(--b27-ease),background-color 140ms ease,box-shadow 140ms ease;}
body[data-patient-theme] :is(.primary-button,.dialog-primary,.b22-video-button,.rec-link,.mi,.search-submit,.visit-actions a,.visit-actions button,.quick-reply-chip,.text-button,#view-button,#send-button,#summary-back,#summary-copy,#summary-download,#summary-print,#summary-edit,#close-detail):not(:disabled):active{transform:scale(.975);}
body[data-patient-theme]:has(> .htop) .htop{min-height:80px;max-width:1184px;margin-inline:auto;padding:20px 32px;gap:12px;box-sizing:border-box;position:relative;z-index:2;background:transparent;border:0;}
html:has(body.b27-profile),html:has(body.b27-records){scrollbar-gutter:stable;}
body[data-patient-theme] .htop .brand-link{gap:10px;}
body[data-patient-theme] .htop .brand-dot{color:var(--brand);margin:0 .2em;}
body[data-patient-theme] .htop .brand-link>img{width:36px;height:36px;}
body[data-patient-theme] .htop .bn{font-size:1.125rem;font-weight:700;line-height:1.35;letter-spacing:-.02em;}
@media(max-width:359px){body[data-patient-theme] .htop .rec-link{font-size:0!important;width:44px;min-width:44px;padding:0!important;flex:none;justify-content:center;}body[data-patient-theme] .htop .rec-link .icon{width:20px;height:20px;}}
body[data-patient-theme] .htop .bn small{margin-top:5px;font-size:.75rem;line-height:1.4;font-weight:400;}
body[data-patient-theme] .htop .rec-link{padding:0 16px;min-height:44px;border-radius:99px;background:rgb(255 254 253 / .8);box-shadow:inset 0 0 0 1px var(--b27-line);}
body[data-patient-theme] .htop .acct>summary{display:grid;place-items:center;width:44px;height:44px;margin:0;padding:0;border-radius:50%;background:rgb(255 254 253 / .8);box-shadow:inset 0 0 0 1px var(--b27-line);}
body[data-patient-theme] .acct>.acct-menu{border:1px solid var(--b27-line);border-radius:22px;box-shadow:var(--b27-shadow);background:var(--b27-paper);padding:8px;}
body[data-patient-theme] .acct-menu .mi{border-radius:14px;min-height:44px;}
body:has(.account-card) #toggle-password{top:0;bottom:0;height:100%;min-height:44px;right:4px;width:60px;padding:0;transform:none;display:grid;place-items:center;}
.b27-companion{display:none;pointer-events:none;}
html body.patient.b27-profile .profile-main{width:min(560px,calc(100% - 40px));max-width:none;margin:26px auto 48px;padding:0;position:relative;z-index:1;}
html body.patient.b27-profile h1,html body.patient.b27-records #page-title{font-size:1.875rem;line-height:1.3;font-weight:700;letter-spacing:-.025em;margin:0 0 10px;}
html body.patient.b27-profile .lead,html body.patient.b27-records .lead{font-size:.9375rem;line-height:1.7;margin:0 0 22px;color:var(--ink2);}
html body.patient.b27-profile .profile-forms{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:'tabs' 'form';gap:16px;margin:0;padding:22px;border:1px solid rgb(255 255 255 / .84);border-radius:var(--b27-radius);background:rgb(255 254 253 / .86);box-shadow:var(--b27-shadow);}
body.patient .b27-profile-tabs{grid-area:tabs;display:grid;grid-template-columns:1fr 1fr;position:relative;isolation:isolate;padding:4px;gap:0;min-height:52px;box-sizing:border-box;border-radius:16px;background:var(--fill);}
body.patient .b27-profile-tabs::before{content:'';position:absolute;inset:4px auto 4px 4px;width:calc(50% - 4px);border-radius:12px;background:#fff;box-shadow:0 2px 6px rgb(55 37 20 / .08);transform:translateX(var(--b27-tab-offset,0));transition:transform 200ms var(--b27-ease);z-index:-1;}
body.patient .b27-profile-tabs button{display:grid;place-items:center;margin:0;min-height:44px;padding:8px 12px;border:0;border-radius:12px;background:transparent;color:var(--ink2);box-shadow:none;font-size:.9375rem;font-weight:600;}
body.patient .b27-profile-tabs button[aria-selected=true]{color:var(--ink);}
body.patient .profile-forms[data-active=password]{--b27-tab-offset:100%;}
html body.patient.b27-profile .profile-forms :is(#profile-form,#password-form){grid-area:form;display:flex;flex-direction:column;gap:10px;min-width:0;margin:0;padding:0;border:0;border-radius:0;background:none;box-shadow:none;}
html body.patient.b27-profile .profile-forms :is(#profile-form,#password-form)[hidden]{display:flex!important;visibility:hidden;pointer-events:none;}
html body.patient.b27-profile .profile-forms h2{position:absolute;clip-path:inset(50%);width:1px;height:1px;overflow:hidden;white-space:nowrap;}
html body.patient.b27-profile .profile-forms label{gap:7px;font-size:.875rem;line-height:1.5;font-weight:500;color:var(--ink2);}
html body.patient.b27-profile .profile-forms input{height:52px;min-height:52px;padding:12px 16px;border:1px solid var(--b27-line);border-radius:16px;background:#fff;color:var(--ink);font-size:1rem;}
html body.patient.b27-profile .profile-forms .b26-password-field input{padding-right:72px;}
html body.patient.b27-profile .b26-password-toggle{top:0;right:4px;height:100%;padding:0;display:grid;place-items:center;}
html body.patient.b27-profile .profile-forms .field-hint{font-size:.8125rem;line-height:1.65;margin:-4px 0 0;}
html body.patient.b27-profile #profile-times{margin:12px 22px 0;font-size:.75rem;line-height:1.6;white-space:pre-line;color:var(--ink2);}
html body.patient.b27-profile #password-form>.field-hint{margin-top:auto;padding-top:4px;}
html body.patient.b27-profile .profile-forms button[type=submit]{align-self:stretch;width:100%;min-height:52px;margin:auto 0 0;padding:0 22px;font-size:1rem;box-shadow:var(--b22-shadow-cta);transition:transform 140ms var(--b27-ease),box-shadow 140ms ease;}
html body.patient.b27-profile .profile-forms button[type=submit]:not(:disabled):active{transform:scale(.98);}
html body.patient.b27-profile .profile-forms :is(#profile-status,#password-status){min-height:1.5em;line-height:1.5;font-size:.8125rem;}
html body.patient.b27-records .layout{display:block;width:min(960px,calc(100% - 40px));max-width:none;margin:26px auto 48px;padding:0;position:relative;z-index:1;}
html body.patient.b27-records .layout>nav{display:none;}
html body.patient.b27-records .layout>main{max-width:none;min-width:0;margin:0;padding:0;}
html body.patient.b27-records .records-privacy{margin:0 0 20px;padding:0;font-size:.8125rem;line-height:1.65;color:var(--ink2);}
html body.patient.b27-records .record-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 12px;padding:20px;margin:0;border:1px solid rgb(255 255 255 / .9);border-radius:var(--b27-radius);background:var(--b27-paper);box-shadow:var(--b27-shadow);}
html body.patient.b27-records .record-search>label{grid-column:1;grid-row:1;min-width:0;display:grid;gap:8px;color:var(--ink2);font-size:.875rem;line-height:1.5;}
html body.patient.b27-records .record-search input[name=q]{min-width:0;width:100%;min-height:52px;height:52px;padding:12px 16px;border:1px solid var(--b27-line);border-radius:16px;background:#fff;font-size:1rem;}
html body.patient.b27-records .record-search .search-submit{grid-column:2;grid-row:1;align-self:end;min-height:52px;min-width:88px;padding:0 20px;border-radius:99px;background:var(--brand);box-shadow:var(--b22-shadow-cta);font-size:.9375rem;}
html body.patient.b27-records .record-filters{grid-column:1/-1;margin:4px 0 0;}
html body.patient.b27-records .record-filters>summary{display:flex;align-items:center;gap:6px;min-height:44px;width:fit-content;padding:0 4px;color:var(--brand-d);font-size:.8125rem;cursor:pointer;}
html body.patient.b27-records .record-filter-fields{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px;padding:10px 0 2px;}
html body.patient.b27-records .record-filter-fields label{font-size:.8125rem;color:var(--ink2);}
html body.patient.b27-records .record-filter-fields :is(input,select){min-width:0;width:100%;height:48px;margin-top:6px;border:1px solid var(--b27-line);border-radius:14px;background:#fff;font-size:.875rem;}
html body.patient.b27-records .records-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 12px;padding:0 4px;border:0;color:var(--ink2);}
html body.patient.b27-records .records-summary p{margin:0;}
html body.patient.b27-records .records-summary button{min-height:44px;padding:0 14px;background:var(--fill);color:var(--ink);box-shadow:none;}
html body.patient.b27-records .visit-list{gap:14px;}
html body.patient.b27-records .visit-card{border-radius:var(--b27-radius);border:1px solid rgb(255 255 255 / .9);background:var(--b27-paper);box-shadow:var(--b27-shadow);}
html body.patient.b27-records .visit-main{padding:18px 20px;}
html body.patient.b27-records .visit-heading h2{font-size:1.0625rem;font-weight:700;letter-spacing:-.015em;}
html body.patient.b27-records .visit-actions{padding-right:20px;}
html body.patient.b27-records .visit-actions>:is(a,button){border-radius:99px;}
html body.patient.b27-records .visit-actions>:is(a,button):first-child{background:var(--fill);color:var(--ink);}
html body.patient.b27-records .records-empty{padding:32px 24px;border-radius:var(--b27-radius);background:var(--b27-paper);box-shadow:var(--b27-shadow);}
body:has(.doctors) .htop{max-width:calc(var(--b23-wrap) + 2 * var(--b23-gutter));}
body:has(.doctors) main{padding-top:20px;}
body:has(.doctors) main>h1{font-size:1.875rem;letter-spacing:-.025em;}
body:has(.doctors) .resume-slot{min-height:66px;margin:0 0 16px;}
body:has(.doctors) .resume{padding:12px 16px;border:1px solid var(--b27-line);border-radius:20px;background:rgb(255 254 253 / .8);box-shadow:none;}
body:has(.doctors) .dc{border-radius:var(--b27-radius);box-shadow:var(--b27-shadow);transition:transform 160ms var(--b27-ease),box-shadow 160ms ease;}
body:has(.doctors) .dc .ar{transition:transform 160ms var(--b27-ease),color 140ms ease;}
body.patient-chat .app-head .bar{background:var(--b27-canvas);}
body.patient-chat .character-identity strong{font-size:1.125rem;line-height:1.4;font-weight:700;}
body.patient-chat #main{transition:opacity 180ms var(--b27-ease);}
body.patient-chat .msg[data-role=assistant] .bub{border-color:var(--b27-line);border-radius:20px 20px 20px 6px;background:var(--b27-paper);box-shadow:0 2px 5px -4px rgb(66 43 24 / .18);}
body.patient-chat .msg[data-role=user] .bub{border-radius:20px 20px 6px 20px;box-shadow:0 4px 12px -7px rgb(54 83 201 / .35);}
body.patient-chat .msg .message-speaker{color:var(--ink2);}
body.patient-chat :is(.quick-reply-chip,#answer-actions button){min-height:44px;border-color:var(--b27-line);border-radius:99px;background:var(--b27-paper);}
body.patient-chat .composer .steps button.st{min-height:44px;}
body.patient-chat #draft{border:1px solid var(--b27-line);border-radius:16px;background:#fff;}
body.patient-chat .composer>#tip{min-height:30px;margin-top:6px;padding:0 44px;text-align:center;}
body.patient-chat #tip>button{right:0;width:44px;height:44px;min-height:44px;border-radius:50%;}
body.patient-chat #tip>p{margin:0;}
body.video-call .b23-sheet{border:1px solid rgb(255 255 255 / .9);border-radius:var(--b27-radius);background:rgb(255 254 253 / .92);box-shadow:var(--b27-shadow);}
body.video-call .b23-sheet #typed-text{border:1px solid var(--b27-line);border-radius:16px;}
body.video-call :is(#transcript-open,#pain-location-open){box-shadow:inset 0 0 0 1px rgb(255 255 255 / .7),var(--b27-shadow);}
html body[data-patient-theme] :is(#summary-dialog,#detail-dialog,#transcript-dialog,#voice-preview)[open]{border-radius:var(--b27-radius);box-shadow:0 24px 64px -26px rgb(34 26 20 / .32);}
body[data-patient-theme] :is(.summary-field input,.summary-field textarea,#summary-fields textarea,#voice-preview-text){border-color:var(--b27-line);border-radius:16px;background:#fff;}
body[data-patient-theme] :is(.dialog-heading,.dialog-head,.summary-footer,.b26-dialog-footer){border-color:var(--b27-line);}
@media(orientation:landscape) and (min-width:1000px) and (min-height:541px){
 body.b27-profile{--b27-rail:48vw;}body.b27-records{--b27-rail:28vw;}
 :is(body.b27-profile,body.b27-records)>.b27-companion{display:block;position:fixed;inset:0 auto 0 0;width:calc(var(--b27-rail) + 70px);z-index:0;background:#E9D8D1;-webkit-mask-image:linear-gradient(90deg,#000 58%,transparent 100%);mask-image:linear-gradient(90deg,#000 58%,transparent 100%);}
 .b27-companion::after{content:'';position:absolute;inset:0;background:url(/assets/b22/xiaoyu-hero.jpg) no-repeat 50% 0 / auto 100dvh;-webkit-mask-image:linear-gradient(90deg,transparent 12%,#000 26%,#000 76%,transparent);mask-image:linear-gradient(90deg,transparent 12%,#000 26%,#000 76%,transparent);}
 html body.patient.b27-profile .profile-main{width:min(560px,calc(100vw - var(--b27-rail) - 80px));margin:42px 40px 64px auto;}
 html body.patient.b27-records .layout{width:min(800px,calc(100vw - var(--b27-rail) - 80px));margin:32px 40px 64px auto;}
 html body.patient:is(.b27-profile,.b27-records)>.htop{max-width:none;padding-inline:36px;}
 body:has(.doctors) .dc .ph{aspect-ratio:1.22/1;background-size:auto 188%;}
 body:has(.doctors) .doctors{margin-top:0;}
 body:has(.doctors) .dc .dm{padding:18px 0 20px 22px;}
 body.patient-chat .portrait-stage{border-radius:var(--b27-radius);box-shadow:var(--b27-shadow);}
 body.patient-chat .portrait-caption{padding:20px 22px;background:var(--b27-paper);}
 body.patient-chat #composer .composer-row{padding:14px;border:1px solid rgb(255 255 255 / .9);border-radius:24px;background:rgb(255 254 253 / .85);box-shadow:var(--b27-shadow);}
 body.patient-chat .composer .steps button.st{background:rgb(255 254 253 / .85);box-shadow:inset 0 0 0 1px var(--b27-line);}
}
@media(max-width:719px){
 body[data-patient-theme]:has(> .htop) .htop{min-height:70px;padding:14px 20px;gap:8px;}
 body[data-patient-theme] .htop .brand-link>img{width:32px;height:32px;}
 body[data-patient-theme] .htop .bn{font-size:1rem;}
 body[data-patient-theme] .htop .rec-link{padding:0 12px;font-size:.8125rem;}
 html body.patient.b27-profile .profile-main,html body.patient.b27-records .layout{margin-top:20px;width:calc(100% - 40px);}
 html body.patient.b27-profile h1,html body.patient.b27-records #page-title,body:has(.doctors) main>h1{font-size:1.625rem;}
 html body.patient.b27-profile .profile-forms{padding:0;border:0;background:none;box-shadow:none;gap:20px;}
 html body.patient.b27-profile .profile-forms input{height:50px;min-height:50px;}
 html body.patient.b27-records .record-search{padding:16px;gap:8px 10px;}
 html body.patient.b27-records .record-search .search-submit{min-width:72px;padding:0 14px;}
 html body.patient.b27-records .record-filter-fields{grid-template-columns:1fr 1fr;}
 html body.patient.b27-records .record-filter-fields>label:last-child{grid-column:1/-1;}
 html body.patient.b27-records .visit-main{padding:16px 16px 8px;}
 html body.patient.b27-records .visit-actions{padding:0 16px 16px;}
 html body.patient.b27-records .records-summary{margin:16px 0 12px;}
 body:has(.doctors) .resume-slot{min-height:72px;}
}
@media(max-width:559px){html body.patient.b27-records .record-filter-fields{grid-template-columns:minmax(0,1fr);}}
@media(max-width:359px){body[data-patient-theme]:has(> .htop) .htop{padding-inline:16px;}html body.patient.b27-profile .profile-main,html body.patient.b27-records .layout{width:calc(100% - 32px);}html body.patient.b27-profile .profile-forms{gap:16px;}html body.patient.b27-profile .profile-forms :is(#profile-form,#password-form){gap:12px;}html body.patient.b27-records .record-search{padding:14px;}html body.patient.b27-records .visit-main{padding:14px 12px 8px;}html body.patient.b27-records .visit-actions{padding-inline:12px;}}
@media(orientation:landscape) and (min-width:560px) and (max-height:540px){body[data-patient-theme]:has(> .htop) .htop{min-height:64px;padding-block:10px;}html body.patient.b27-profile .profile-main,html body.patient.b27-records .layout{margin-top:12px;}html body.patient.b27-profile .profile-forms{padding:20px;}html body.patient.b27-profile .lead,html body.patient.b27-records .lead{margin-bottom:16px;}body:has(.doctors) main{padding-top:8px;}body:has(.doctors) main>h1{font-size:1.375rem;}body:has(.doctors) .resume-slot{min-height:44px;margin-bottom:10px;}html body[data-patient-theme] :is(#summary-dialog,#detail-dialog,#transcript-dialog,#voice-preview)[open]{border-radius:24px;}}
@media(hover:hover) and (pointer:fine){body:has(.doctors) .dc:hover{transform:translateY(-3px);box-shadow:0 4px 6px rgb(66 43 24 / .04),0 24px 48px -24px rgb(66 43 24 / .25);}body[data-patient-theme] :is(.rec-link,.text-button,.quick-reply-chip,.mi):not(:disabled):hover{background-color:var(--fill);}html body.patient.b27-records .visit-card:hover{box-shadow:0 4px 6px rgb(66 43 24 / .04),0 24px 40px -24px rgb(66 43 24 / .28);}}
/* Short, coherent native page/sheet motion, with no delay to original actions. */
::view-transition-group(root),::view-transition-group(patient-head),::view-transition-group(patient-hero){animation-duration:220ms;animation-timing-function:var(--patient-motion-ease);}
::view-transition-old(root){animation:patient-route-out 140ms var(--patient-motion-ease) both;}
::view-transition-new(root){animation:patient-route-in 220ms var(--patient-motion-ease) both;}
::view-transition-old(patient-head),::view-transition-old(patient-hero){animation:b23-vt-fade-out 140ms var(--patient-motion-ease) both;}
::view-transition-new(patient-head),::view-transition-new(patient-hero){animation:b23-vt-fade-in 220ms var(--patient-motion-ease) both;}
html body[data-patient-theme] dialog{transition-duration:140ms,160ms,160ms,160ms;}
html body[data-patient-theme] dialog[open]{transition-duration:200ms,220ms,220ms,220ms;}
body.video-call #type-panel::details-content,body.b27-records .record-filters::details-content{content-visibility:hidden;transition:content-visibility 160ms allow-discrete;}
body.video-call #type-panel[open]::details-content,body.b27-records .record-filters[open]::details-content{content-visibility:visible;}
body.video-call #type-panel #text-form,body.b27-records .record-filter-fields{opacity:0;transform:translateY(5px);transition:opacity 140ms var(--b27-ease),transform 180ms var(--b27-ease);}
body.video-call #type-panel[open] #text-form,body.b27-records .record-filters[open] .record-filter-fields{opacity:1;transform:none;}
@starting-style{body.video-call #type-panel[open] #text-form,body.b27-records .record-filters[open] .record-filter-fields{opacity:0;transform:translateY(5px);}}
html[data-ui-input=keyboard] body[data-patient-theme] :is(button,a,summary),html[data-ui-input=keyboard] .auth-tabs::before,html[data-ui-input=keyboard] body:has(.account-card) :is(#confirm-group,#auth-pane,#signed-in-pane){transition:none;}
html[data-ui-input=keyboard] .b27-profile-tabs::before,html[data-ui-input=keyboard] #type-panel #text-form,html[data-ui-input=keyboard] .record-filter-fields,html[data-motion-reduced=true] .b27-profile-tabs::before,html[data-motion-reduced=true] #type-panel #text-form,html[data-motion-reduced=true] .record-filter-fields{transition:none;}
html[data-motion-reduced=true]::view-transition-old(root),html[data-motion-reduced=true]::view-transition-new(root){animation:none;}
@media(prefers-reduced-motion:reduce){body[data-patient-theme] :is(button,a,summary,.dc,.dc .ar),.b27-profile-tabs::before,#type-panel #text-form,.record-filter-fields{transition:none!important;}body[data-patient-theme] :is(button,a,summary):active{transform:none!important;}}
