/* Anatomy workspace: a quiet canvas, three views and a persistent selection. */
.medical-workspace .body-page-heading{margin-bottom:22px}
.medical-workspace .body-page-heading h1{font-size:30px;margin:0;font-weight:600;letter-spacing:-1px}
.medical-workspace .body-page-heading p{font-size:14px;line-height:1.6;color:#687467;margin:8px 0 0}
.medical-workspace .body-touch-workspace{--body-border:#dfe4dc;--body-copy:#657361;border-color:var(--body-border);border-radius:14px;background:#fcfdf9;overflow:visible;box-shadow:0 10px 36px #263d2f04}
.body-touch-workspace .body-workspace-top{display:flex;align-items:center;gap:18px;padding:18px 24px;background:#fcfdf9;border-radius:14px 14px 0 0;border-bottom:1px solid var(--body-border)}
.body-touch-workspace .body-patient-picker{display:grid;grid-template-columns:auto minmax(140px,320px);gap:12px;align-items:center;min-width:0;flex:1}
.body-touch-workspace .body-workspace-top label>span{font-size:13px;font-weight:600;color:#65735e;margin:0}
.body-touch-workspace .body-workspace-top select{min-height:48px;font-size:14px;padding:10px 36px 10px 13px;border-radius:8px;line-height:1.5;background-color:#fff;min-width:0}
.body-touch-workspace .body-patient-count{font-size:12px;font-weight:400;line-height:1.5;padding:0;border:0;background:none;color:#75806f;white-space:nowrap}
.body-touch-workspace .med-button{min-height:48px;font-size:14px;line-height:1.4;padding:11px 16px;border-radius:8px}
.body-touch-workspace .med-button svg{width:18px;height:18px}
.body-touch-workspace .body-options{margin-left:auto;position:relative;flex:none}
.body-touch-workspace summary{cursor:pointer;list-style:none}
.body-touch-workspace summary::-webkit-details-marker{display:none}
.body-touch-workspace summary:focus-visible{outline:3px solid #88a482;outline-offset:3px;border-radius:7px}
.body-touch-workspace .body-options>summary{display:flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:10px 13px;font-size:14px;color:#4a5d45;border:1px solid var(--body-border);border-radius:8px;background:#f8faf4}
.body-touch-workspace .body-options>summary svg{width:18px;height:18px}
.body-touch-workspace .body-options[open]>summary{border-color:#92a38b;background:#edf3e8}
.body-touch-workspace .body-options-content{position:absolute;z-index:25;right:0;top:calc(100% + 10px);display:grid;gap:18px;width:min(340px,calc(100vw - 48px));padding:22px;background:#fff;border:1px solid var(--body-border);border-radius:12px;box-shadow:0 14px 44px #253d3021}
.body-touch-workspace .body-options-content>label{display:grid;gap:8px;min-width:0}
.body-touch-workspace .body-options-content label>span{font-size:13px}
.body-touch-workspace .body-top-actions{display:grid;gap:8px;border-top:1px solid var(--body-border);padding-top:16px}
.body-touch-workspace .body-top-actions .med-button{width:100%;justify-content:flex-start;font-size:14px}
.body-touch-workspace .body-availability{padding:14px 24px;font-size:13px;line-height:1.6;border-color:#eee3c9;background:#fbf6e9;color:#786540}
.body-touch-workspace .body-view-toolbar{padding:20px 24px;gap:16px;min-height:88px}
.body-touch-workspace .body-view-toolbar>.med-segmented{padding:4px;gap:4px;background:#eef1e9;border-color:#e3e8de;border-radius:10px;flex-wrap:nowrap}
.body-touch-workspace .body-view-toolbar .med-segmented>.med-button{min-width:98px;min-height:48px;font-size:14px;padding:11px 22px;line-height:1.4;border-radius:7px}
.body-touch-workspace .med-button.selected{background:#fff;border-color:#d6dfd1;color:#294634;box-shadow:0 2px 5px #263d2f08}
.body-touch-workspace .body-specialty-label{font-size:13px;line-height:1.5;color:#6d7c65;text-align:right}
.body-touch-workspace .body-specialty-label[hidden]{display:none}
.body-touch-workspace .body-grid{grid-template-columns:minmax(0,1fr) 284px;margin:0 24px;border-color:#dfe4da;border-radius:12px;overflow:hidden;align-items:stretch;background:#f6f4ee}
.body-touch-workspace .body-stage{background:#f6f4ee;min-width:0}
.body-touch-workspace .body-anatomy-mount{position:relative;width:100%;height:clamp(520px,68dvh,720px);min-height:520px;background:#f6f4ee;border-radius:0;overflow:hidden}
.body-touch-workspace .body-anatomy-mount>div{min-width:0}
.body-touch-workspace .body-viewer-loading{display:grid;place-items:center;min-height:380px;height:80%;font-size:14px;color:#72806a}
.body-touch-workspace .body-viewer-fallback{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);white-space:nowrap}
.body-touch-workspace .body-viewer-fallback .med-button{background:#fff9;border-color:#d9dfd0;font-size:13px}
.body-touch-workspace .body-figure-wrap{height:clamp(520px,68dvh,720px);min-height:520px;padding:80px 24px 24px;background-color:#f6f4ee;background-image:none}
.body-touch-workspace .medical-body-svg{max-width:330px}
.body-touch-workspace .body-stage-top{top:16px;left:18px;right:18px;justify-content:center}
.body-touch-workspace .body-stage-top .med-segmented{background:#fdfdf9e6;border-color:#dbe2d4;backdrop-filter:blur(8px)}
.body-touch-workspace .body-stage-top .med-button{min-height:48px;font-size:14px;padding:10px 20px}
.body-touch-workspace .body-map-label{font-size:13px;line-height:1.5;color:#6c7966}
.body-touch-workspace .body-side{font-size:12px;color:#7f8a76}
.body-touch-workspace .body-side.left{left:15%}
.body-touch-workspace .body-side.right{right:15%}
.body-touch-workspace .body-stage-caption{padding:12px 18px;gap:16px;font-size:12px;line-height:1.6;color:#75816b;background:#f0f1e9}
.body-touch-workspace .body-structure-picker{padding:17px 20px;gap:16px;border-top-color:#dfe3d8;background:#fafbf5}
.body-touch-workspace .body-structure-picker label{font-size:13px;font-weight:600;line-height:1.5;color:#63735a;gap:8px}
.body-touch-workspace .body-structure-picker select{min-height:48px;font-size:14px;line-height:1.5;padding:10px 34px 10px 12px;background-color:#fff;border-radius:8px}
.body-touch-workspace .body-selection{padding:26px 22px;background:#fcfdf9;border-left:1px solid var(--body-border);border-top:0;min-width:0}
.body-touch-workspace .body-selection-main{display:flex;flex-direction:column;align-items:stretch;gap:20px}
.body-touch-workspace .body-selection-details{min-width:0}
.body-touch-workspace .body-selection-details>summary{min-height:100px;padding:0;position:relative}
.body-touch-workspace .body-selected-context{display:block;font-size:12px;font-weight:400;color:#7b8874;line-height:1.6;margin-bottom:8px}
.body-touch-workspace .body-selected-name{display:block;font-size:28px;font-weight:600;letter-spacing:-1px;line-height:1.25;color:#2f4935;overflow-wrap:anywhere}
.body-touch-workspace .body-selection-more{display:flex;align-items:center;gap:7px;font-size:12px;color:#6b805f;line-height:1.5;margin-top:12px;min-height:24px}
.body-touch-workspace .body-selection-more svg{width:14px;height:14px;transform:rotate(90deg);transition:transform .15s}
.body-touch-workspace .body-selection-details[open] .body-selection-more svg{transform:rotate(-90deg)}
.body-touch-workspace .body-selection-content{font-size:14px;line-height:1.75;color:#6b7864;border-top:1px solid var(--body-border);margin-top:18px;padding-top:6px}
.body-touch-workspace .body-selection-content p{margin:14px 0 0}
.body-touch-workspace .body-selection-main>.primary{width:100%;flex:none;margin:0;min-height:50px}
.body-touch-workspace .body-records-heading{padding:30px 24px 16px;gap:18px;flex-wrap:wrap}
.body-touch-workspace .body-records-heading h2{font-size:21px;line-height:1.4;font-weight:600;letter-spacing:-.5px;margin:0}
.body-touch-workspace .body-records-heading h2>span{font-size:13px;line-height:1.5;border:0;background:#eff3e9;color:#68815b;padding:3px 8px;vertical-align:middle;border-radius:5px}
.body-touch-workspace .body-records-heading select{min-height:48px;font-size:14px;padding:10px 34px 10px 13px;border-radius:8px;background:#fff}
.body-touch-workspace .body-all-records{grid-template-columns:1fr 1fr;gap:0 30px;padding:0 24px 24px}
.body-touch-workspace .body-record{padding:21px 0;border-color:var(--body-border)}
.body-touch-workspace .body-record:first-child{padding-top:21px}
.body-touch-workspace .body-record-meta{gap:12px;margin-bottom:8px}
.body-touch-workspace .body-kind{font-size:12px;line-height:1.5;text-transform:none;letter-spacing:0}
.body-touch-workspace .med-status{font-size:12px;line-height:1.5}
.body-touch-workspace .body-record-open{min-height:48px}
.body-touch-workspace .body-record-open h3{font-size:15px;line-height:1.5;margin-bottom:7px}
.body-touch-workspace .body-record-open>span{font-size:12px;line-height:1.6}
.body-touch-workspace .body-record>p{font-size:14px;line-height:1.7;margin:12px 0}
.body-touch-workspace .body-record footer small{font-size:12px;line-height:1.5;color:#87917d}
.body-touch-workspace .body-record footer .med-button{min-height:48px;font-size:13px}
.body-touch-workspace .med-empty h3{font-size:17px}
.body-touch-workspace .med-empty p{font-size:14px;line-height:1.7;color:#718166}
.body-touch-workspace .body-reference{font-size:13px;line-height:1.8;border-color:var(--body-border);padding:10px 24px;border-radius:0 0 14px 14px;background:#f9fbf4}
.body-touch-workspace .body-reference>summary{min-height:48px;display:flex;align-items:center;font-size:13px;color:#65785c;font-weight:600;gap:10px}
.body-touch-workspace .body-reference>summary:after{content:'+';font-size:20px;font-weight:400;margin-left:auto}
.body-touch-workspace .body-reference[open]>summary:after{content:'−'}
.body-touch-workspace .body-reference p{margin:10px 0 16px}
.body-touch-workspace .body-reference a{display:inline-block;min-height:48px;padding:10px 0}
.medical-workspace #medical-profile-form select,.medical-workspace #medical-record-form select,.medical-workspace #medical-record-form input:not([type=hidden]){min-height:48px;font-size:16px;line-height:1.5}
.medical-workspace #medical-profile-form label,.medical-workspace #medical-record-form label,.medical-workspace #medical-amendment-form label{font-size:14px;line-height:1.5}
.medical-workspace #medical-record-form textarea,.medical-workspace #medical-amendment-form textarea{font-size:16px;line-height:1.6;min-height:120px}
.medical-workspace #medical-profile-form .body-tone-picker{gap:8px;flex-wrap:wrap}
.medical-workspace #medical-profile-form .body-tone-picker>label{min-width:48px;min-height:48px;justify-content:center}
.medical-workspace #medical-profile-form .body-tone-picker input{width:40px;height:40px;min-height:40px}
/* The selected region remains within reach while the model or record list scrolls. */
@media(max-width:960px),(pointer:coarse) and (max-width:1280px){
 .medical-workspace .body-touch-workspace{padding-bottom:92px}
 .body-touch-workspace .body-grid{grid-template-columns:1fr}
 .body-touch-workspace .body-selection{position:fixed;z-index:35;left:24px;right:24px;bottom:calc(12px + env(safe-area-inset-bottom));max-width:760px;margin:0 auto;padding:13px 16px;border:1px solid #d0dbca;border-radius:14px;background:#fffffff5;box-shadow:0 6px 32px #253b3029;backdrop-filter:blur(16px)}
 .body-touch-workspace .body-selection-main{flex-direction:row;align-items:center;gap:18px}
 .body-touch-workspace .body-selection-details{flex:1}
 .body-touch-workspace .body-selection-details>summary{min-height:50px;padding:2px 26px 2px 0;display:flex;flex-direction:column;justify-content:center}
 .body-touch-workspace .body-selected-context{font-size:12px;line-height:1.4;margin:0 0 4px}
 .body-touch-workspace .body-selected-name{font-size:18px;line-height:1.3;letter-spacing:-.4px}
 .body-touch-workspace .body-selection-more{font-size:0;position:absolute;right:0;top:50%;transform:translateY(-50%);margin:0;min-height:22px}
 .body-touch-workspace .body-selection-more svg{width:18px;height:18px;transform:rotate(-90deg)}
 .body-touch-workspace .body-selection-details[open] .body-selection-more svg{transform:rotate(90deg)}
 .body-touch-workspace .body-selection-content{position:absolute;left:0;right:0;bottom:calc(100% + 10px);max-height:min(380px,55dvh);overflow:auto;overscroll-behavior:contain;margin:0;padding:8px 21px 21px;background:#fff;border:1px solid #d0dbca;border-radius:14px;box-shadow:0 4px 24px #263d3020}
 .body-touch-workspace .body-selection-main>.primary{width:auto;min-width:120px;min-height:50px}
 .body-touch-workspace .body-anatomy-mount,.body-touch-workspace .body-figure-wrap{height:clamp(440px,65dvh,680px);min-height:440px}
}
@media(max-width:620px){
 .medical-workspace .body-page-heading{margin-bottom:18px;gap:0}
 .medical-workspace .body-page-heading h1{font-size:27px}
 .medical-workspace .body-page-heading p{font-size:14px;max-width:285px}
 .body-touch-workspace .body-workspace-top{padding:14px;gap:10px;flex-wrap:wrap}
 .body-touch-workspace .body-patient-picker{grid-template-columns:1fr;gap:6px;flex:1;min-width:0}
 .body-touch-workspace .body-patient-picker>span{font-size:12px}
 .body-touch-workspace .body-patient-picker select{font-size:14px;min-width:0;width:100%;max-width:100%;min-height:48px}
 .body-touch-workspace .body-patient-count{display:none}
 .body-touch-workspace .body-options{align-self:flex-end}
 .body-touch-workspace .body-options>summary{gap:7px;padding-inline:11px;font-size:13px}
 .body-touch-workspace .body-options-content{width:min(330px,calc(100vw - 44px));padding:20px;right:0}
 .body-touch-workspace .body-view-toolbar{padding:14px;gap:10px;min-height:0;flex-direction:column;align-items:stretch}
 .body-touch-workspace .body-view-toolbar>.med-segmented{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;gap:3px}
 .body-touch-workspace .body-view-toolbar .med-segmented>.med-button{min-width:0;font-size:14px;padding:11px 8px;min-height:48px}
 .body-touch-workspace .body-specialty-label{text-align:left;font-size:12px}
 .body-touch-workspace .body-grid{margin:0 10px;border-radius:10px}
 .body-touch-workspace .body-anatomy-mount,.body-touch-workspace .body-figure-wrap{height:clamp(540px,74dvh,660px);min-height:540px}
 .body-touch-workspace .body-figure-wrap{padding:76px 14px 18px}
 .body-touch-workspace .body-side.left{left:10%}
 .body-touch-workspace .body-side.right{right:10%}
 .body-touch-workspace .body-stage-caption{gap:12px;padding:10px;font-size:12px}
 .body-touch-workspace .body-structure-picker{padding:15px;gap:14px}
 .body-touch-workspace .body-selection{left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom));padding:11px 13px}
 .body-touch-workspace .body-selection-main{gap:12px}
 .body-touch-workspace .body-selected-name{font-size:16px}
 .body-touch-workspace .body-selected-context{font-size:12px}
 .body-touch-workspace .body-selection-main>.primary{min-width:108px;padding:12px;font-size:14px}
 .body-touch-workspace .body-records-heading{padding:26px 19px 16px;gap:16px;align-items:stretch;flex-direction:row;justify-content:space-between}
 .body-touch-workspace .body-records-heading h2{font-size:19px;align-self:center}
 .body-touch-workspace .body-records-heading label{width:100%}
 .body-touch-workspace .body-records-heading select{width:100%;font-size:14px}
 .body-touch-workspace .body-all-records{grid-template-columns:1fr;padding:0 19px 20px}
 .body-touch-workspace .body-reference{padding:10px 19px}
 .body-touch-workspace .body-availability{padding:13px 17px;font-size:13px}
 .body-touch-workspace .body-reference a{display:block}
}
@media print{.body-touch-workspace .body-selection{position:static;box-shadow:none}.body-touch-workspace{padding-bottom:0}}
@media(max-width:960px),(pointer:coarse) and (max-width:1280px){
 .body-touch-workspace .body-workspace-top select,.body-touch-workspace .body-structure-picker select,.body-touch-workspace .body-records-heading select{font-size:16px}
}
