.workspace{grid-template-columns:minmax(0,1fr) 350px}.viewport{height:820px;position:sticky;top:15px;align-self:start}.workspace aside{min-width:0}.camera-controls{flex-wrap:wrap;max-width:95%;justify-content:center}.orientation{max-width:70%;font-size:13px;pointer-events:none}.orientation span{display:block;font-size:10px;margin-top:6px}button[hidden],section[hidden],div[hidden]{display:none!important}.visual-list h3,#reference-section h3,#model-controls h3{font-size:16px;color:#153d50;margin:18px 0 8px}.small-note{font-size:12px;line-height:1.5;color:#62756e}.model-button,.tissue-choice{display:block;width:100%;text-align:left;padding:11px 12px;border:1px solid #cfddd7;border-radius:7px;background:#fff;color:#225a50;font:inherit;font-size:13px;margin:8px 0;cursor:pointer}.model-button small{display:block;color:#697d73;font-size:11px;margin-top:4px}.model-button[aria-pressed=true]{background:#e2f2ea;border-color:#158f88}.quiet{border:0;background:transparent;color:#147c7c;text-decoration:underline;padding:4px 0;cursor:pointer}.selected-tissue strong{font-size:15px;overflow-wrap:anywhere}#choice-list{max-height:190px;overflow:auto}.tissue-choice{font-size:12px;padding:7px}.scene-heading{gap:10px}#state-pill{max-width:52%;text-align:right}.article-item{font-size:12px;line-height:1.5;margin:8px 0;color:#576e65}.compare{margin-top:12px}details{margin-top:12px}#review-warning{color:#795726}select{max-width:100%}.teaching-note{margin-top:16px}@media(max-width:850px){.workspace{grid-template-columns:1fr}.viewport{position:relative;top:auto;height:530px}.intro h1{font-size:40px}.camera-controls button{padding:10px 8px;font-size:11px}.orientation{font-size:11px}.scene-heading{font-size:9px}.workspace aside{padding:22px}.camera-controls{bottom:45px}.selected-tissue{min-height:0}}

.review-warning{font-size:12px;line-height:1.5;background:#fff4df;color:#735328;border-left:3px solid #b58434;padding:10px}.review-warning[hidden]{display:none}
[hidden]{display:none!important;}

#ankle-review-banner{font-size:12px;line-height:1.5;background:#fff4df;color:#754723;border-left:3px solid #bf8625;padding:12px;margin:16px 0;}

/* Isolated UI candidate: existing scene assets and palette retained. */
.workspace{height:820px;align-items:stretch}.viewport{height:100%;min-height:0;position:relative;top:auto}.workspace aside{height:100%;overflow-y:auto;overscroll-behavior:contain}.viewport-dock{position:absolute;bottom:42px;left:12px;right:12px;background:#f5f8f4ed;border:1px solid #cadad4;border-radius:7px;padding:8px 10px;z-index:3}.viewport-dock .view-presets{margin:0;gap:5px}.viewport-dock #ankle-view-options{margin-bottom:6px}.viewport-dock button{font-size:12px;padding:6px;min-height:44px}.transparency-control{display:flex;gap:8px;margin-top:6px;min-height:44px;font-size:10px}.transparency-control input{min-width:60px;flex:1;min-height:44px}.camera-controls{top:58px;bottom:auto;z-index:2;opacity:.88}.orientation{bottom:202px;font-size:12px;max-width:75%}.gesture{padding:12px;font-size:9px}#structure-label{position:absolute;z-index:4;pointer-events:none;max-width:min(280px,70%);background:#15251ef0;border:1px solid #69fff0;border-left:4px solid #69fff0;color:#dce6df;border-radius:4px;padding:8px 10px;font-size:12px;line-height:1.4;overflow-wrap:anywhere}#region-title{font-size:27px;color:#147c7c;border-left:3px solid #147c7c;padding-left:10px;margin-bottom:9px}.intro-copy{margin-bottom:12px}#visual-details{margin-top:0}select:focus-visible,summary:focus-visible{outline:3px solid #078b85;outline-offset:3px}
@media(max-width:850px){.workspace{height:auto}.viewport{height:560px}.workspace aside{height:530px}.viewport-dock{bottom:38px}.camera-controls button{min-height:44px}.orientation{bottom:210px}}
@media(max-width:420px){.viewport{height:530px}.viewport-dock{left:7px;right:7px}.camera-controls{top:62px;left:5px;right:5px;gap:3px}.camera-controls button{padding:0 5px;font-size:9px}.orientation{bottom:205px}.transparency-control{gap:4px}}

#lesion-marker{position:absolute;z-index:4;pointer-events:none;width:32px;height:32px;border:2px dashed #69fff0;border-radius:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 2px #15251e66}

#view-name{max-width:52%;overflow-wrap:anywhere}

#patellar-grade-panel{border-top:1px solid #dde5de;margin-top:14px;padding-top:10px}#patellar-grade-panel h3{margin:0 0 8px}#patellar-grade-panel fieldset{margin:10px 0}#patellar-grade-panel .example-picker{margin-bottom:0}.patellar-options{display:flex;gap:6px;flex-wrap:wrap}.patellar-options button{flex:1;min-height:44px;padding:8px;border:1px solid #cadad4;border-radius:5px;background:#fff;color:#23554c;font-size:12px}.patellar-options button[aria-pressed=true]{background:#def0e9;border-color:#147c7c}.patellar-options button:disabled,#patellar-grade-select:disabled{opacity:.65;cursor:default}

.viewport-dock #library-view-options{margin-bottom:6px}#olecranon-options{margin-top:12px}

#patellar-softness-inset{position:absolute;z-index:4;top:120px;left:24px;width:220px;background:#eef5f1;border:1px solid #9cc5bf;border-radius:6px;padding:12px;color:#173744}#patellar-softness-inset p{margin:0 0 6px}#patellar-softness-inset svg{display:block;width:100%}@media(max-width:850px){#patellar-softness-inset{position:relative;top:auto;left:auto;width:auto;margin:0;padding:16px;grid-column:1/-1;order:0}#patellar-softness-inset svg{max-width:280px;margin:auto}}

#selection-leader{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:4}svg[hidden]{display:none!important}

@media(max-width:420px){#structure-label{max-width:140px;font-size:11px;padding:6px 8px}}

#thickness-comparison-controls{margin-top:6px}#thickness-comparison-inset{position:absolute;right:16px;top:114px;z-index:4;width:310px;max-width:calc(100% - 32px);padding:12px;background:#eef5f1;border:1px solid #9cc5bf;border-radius:6px;color:#173744;font-size:12px}#thickness-comparison-inset header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0;border:0;background:transparent}#thickness-comparison-inset button{min-height:44px;padding:5px 9px;font-size:11px}#thickness-comparison-inset p{font-size:11px;line-height:1.45;margin:7px 0}#thickness-comparison-inset svg{display:block;width:100%}#thickness-comparison-inset svg text{font-size:9px;fill:#173744}#thickness-comparison-inset .section-limits{margin-bottom:0}@media(max-width:850px){#thickness-comparison-inset{position:relative;top:auto;right:auto;width:auto;max-width:none;grid-column:1/-1;margin:0;padding:16px}}

#atfl-bridge-caption{position:absolute;z-index:4;left:12px;right:12px;top:114px;margin:0;padding:6px 8px;font-size:10px;line-height:1.4;color:#dce6df;background:#15251eeb;border:1px solid #9cc5bf;border-radius:4px;pointer-events:none}#atfl-bridge-caption[hidden]{display:none}

#model-controls #thickness-comparison-inset{position:relative;top:auto;right:auto;width:auto;max-width:none;margin:16px 0;padding:12px}#thickness-comparison-inset header{height:auto;min-height:0;max-width:none;margin:0}

#si-view-options{grid-template-columns:repeat(2,minmax(0,1fr));}#si-controls .review-warning{margin:10px 0;}#si-controls select{min-height:44px;}

.spine-inset{grid-column:1/-1;min-width:0;padding:18px;border-top:1px solid #cfddd7;background:#f7faf7}.spine-inset-heading{display:flex;gap:12px;justify-content:space-between;align-items:center;flex-wrap:wrap}.spine-inset-heading h2{font-size:20px;margin:0}.spine-inset-heading button{min-height:44px}.spine-inset iframe{display:block;width:100%;height:1000px;border:0;background:#0b2420}.workspace.has-spine-inset .viewport{position:relative;top:auto}

@media(max-width:850px){.viewport.has-thorax{height:650px}}

#wrist-hand-sections img{display:block;width:100%;height:auto}.wrist-section-phone{display:none}@media(max-width:850px){.wrist-section-wide{display:none!important}.wrist-section-phone{display:block}.viewport.has-wrist-hand{height:650px}}

/* The teaching inset occupies a real second row; it must not share the fixed body workspace height. */
.workspace.has-spine-inset{height:auto;grid-template-rows:820px auto;align-items:start}
.workspace.has-spine-inset>.viewport,.workspace.has-spine-inset>aside{height:820px}
.workspace.has-spine-inset>.spine-inset{grid-row:2}
@media(max-width:850px){
 .workspace.has-spine-inset{grid-template-rows:560px 530px auto}
 .workspace.has-spine-inset>.viewport{height:560px}
 .workspace.has-spine-inset>aside{height:530px}
 .workspace.has-spine-inset>.spine-inset{grid-row:3}
}
@media(max-width:420px){
 .workspace.has-spine-inset{grid-template-rows:530px 530px auto}
 .workspace.has-spine-inset>.viewport{height:530px}
}

/* Simple private review controls; scene materials and geometry are unchanged. */
.simple-chooser{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:18px 0 8px}.simple-chooser .example-picker{margin:0;font-size:14px}.simple-chooser select{min-height:48px;font-size:16px}.simple-model-caption{font-size:14px;line-height:1.5;margin:8px 0 14px;color:#225a50}.workspace{grid-template-columns:minmax(0,1fr)}.viewport-dock{bottom:42px;padding:8px 10px}.viewport-dock .compare{display:flex;gap:8px;margin:0}.viewport-dock .compare button{flex:1;font-size:16px;min-height:48px}.viewport-dock summary{min-height:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:13px;color:#225a50}#simple-view-options{margin-top:4px}.simple-view-content{max-height:250px;overflow:auto}.simple-camera-controls{position:static;max-width:none;margin:8px 0;opacity:1}.simple-return{position:absolute;top:60px;left:16px;z-index:3;min-height:44px;padding:8px 14px;font-size:13px}.orientation{display:none}#atlas-details{margin:12px 0 20px;border:1px solid #cadad4;border-radius:7px;background:#f5f8f4}#atlas-details>summary{padding:14px 18px;min-height:48px;font-size:15px;cursor:pointer}#atlas-details #panel{max-height:70vh;height:auto;overflow:auto;padding:20px;background:transparent}.scene-heading{font-size:12px}.gesture{font-size:11px}.workspace.has-spine-inset{grid-template-columns:1fr;grid-template-rows:820px auto}.workspace.has-spine-inset #spine-inset{grid-row:2}.simple-view-content .camera-controls button{font-size:12px}.selected-tissue{display:block}#region-description{display:none}
@media(max-width:850px){.simple-chooser{gap:10px;grid-template-columns:1fr}.simple-chooser .example-picker{font-size:13px}.viewport{height:560px}.workspace.has-spine-inset{grid-template-rows:560px auto}.workspace.has-spine-inset .viewport{height:560px}.simple-return{top:58px;left:12px}.scene-heading{font-size:11px}#atlas-details #panel{max-height:65vh}.viewport-dock{bottom:38px}}
@media(max-width:420px){.viewport{height:530px}.workspace.has-spine-inset{grid-template-rows:530px auto}.workspace.has-spine-inset .viewport{height:530px}.viewport-dock .compare button{font-size:16px}}

#state-pill:empty{display:none}#simple-patella-grades{display:flex;gap:5px;flex-wrap:wrap}#simple-patella-grades button{flex:1;min-width:60px;min-height:48px;padding:6px 4px;font-size:14px}#simple-patella-grades button[aria-pressed=true]{background:#a44e46;color:#fff}@media(max-width:420px){#simple-patella-grades button{min-width:50px;font-size:12px}}

/* Optional controls occupy a compact right-hand drawer; camera fitting reserves its width. */
#simple-view-options{position:static}#simple-view-options>summary{height:44px;min-height:44px;padding:0}.simple-view-content{position:absolute;right:8px;bottom:calc(100% + 8px);width:156px;max-height:220px;padding:8px;background:#f5f8f4;border:1px solid #cadad4;border-radius:7px;overflow:auto}.simple-view-content .view-presets{flex-wrap:wrap}.simple-view-content button{min-width:44px;min-height:44px}.simple-camera-controls{justify-content:flex-start}.simple-camera-controls button{min-width:44px!important;padding:6px!important;font-size:12px!important}.simple-subtype{margin:5px 0;font-size:12px;display:flex;align-items:center;gap:8px}.simple-subtype select{min-height:44px;font-size:14px;flex:1}.viewport-dock .compare{margin:0}.viewport-dock{padding:6px 10px}#simple-details-explanation{font-size:14px;line-height:1.6}.simple-source-details{margin-top:10px}
@media(max-width:850px){.intro{margin:10px 0 14px;gap:8px}.intro h1{font-size:28px;line-height:1.12;margin:8px 0}.intro .eyebrow{display:none}.intro>p{font-size:13px;line-height:1.4;margin:0}.simple-chooser{margin-top:10px;gap:8px}.simple-model-caption{font-size:13px;margin:8px 0 12px}.viewport{scroll-margin-top:8px}.simple-view-content{max-height:180px}.simple-subtype select{min-height:44px}.simple-camera-controls button{min-width:44px!important}.scene-heading{font-size:11px}}

.simple-grade-explanation{font-size:12px;line-height:1.4;margin:6px 0;min-height:34px;color:#225a50}

.knee-context-inset{position:absolute;right:12px;top:104px;width:76px;height:100px;padding:78px 2px 0;background:transparent;border:1px solid #c8d6ce;color:#f4f7f2;font-size:9px;z-index:2;cursor:pointer}.knee-context-inset[hidden]{display:none}

#view-name{background:#193028eF;padding:4px 6px;border-radius:3px}.knee-context-inset{background:linear-gradient(to bottom,transparent 0,transparent 76px,#193028 76px,#193028 100%)}

.viewport-dock.has-toe-controls{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:6px}.has-toe-controls #simple-comparison{grid-column:1;min-width:0}.has-toe-controls #simple-view-options{grid-column:2;grid-row:1;margin:0}.has-toe-controls #toe-view-controls{grid-column:1/-1;display:flex;gap:8px}.has-toe-controls #toe-view-controls button{flex:1;min-width:0;min-height:44px}.has-toe-controls #simple-comparison button{min-width:0;padding:4px}

@media(max-width:850px){.viewport:has(.viewport-dock.has-toe-controls):has(#simple-view-options[open]){height:700px;min-height:700px}}

/* Contextual anatomy stays visible while controls remain at the canvas edge. */
@media(max-width:850px){.viewport{height:640px!important;min-height:640px}}

.anatomy-depth-control{display:grid;gap:3px;width:min(100%,360px);margin:0 auto 8px;padding:8px 12px;background:rgba(255,255,255,.94);border-radius:8px;font-size:14px;color:#213d38}.anatomy-depth-control[hidden]{display:none!important}.anatomy-depth-control input{width:100%;min-height:28px;accent-color:#285b50;touch-action:pan-y}.depth-endpoints{display:flex;justify-content:space-between;font-size:12px}

.single-knee-tabs{position:absolute;z-index:8;left:12px;right:12px;top:91px;display:flex;gap:6px}.single-knee-tabs[hidden]{display:none}.single-knee-tabs button{flex:1;min-height:44px;border:1px solid #9cafa4;background:#fff;border-radius:6px;color:#213d38;font-size:14px}.single-knee-tabs button[aria-pressed=true]{background:#285b50;color:#fff}

/* Primary anatomy controls stay visible instead of being buried in Details. */
.viewport-dock>#anatomy-depth-control{width:min(360px,100%);margin:0 auto 6px}.viewport-dock>#shoulder-whole-arm{min-height:44px;padding:8px 14px;border:1px solid #9cafa4;border-radius:6px;background:#fff;color:#213d38}
@media(max-width:850px){.scene-heading{align-items:flex-start;max-height:42px;overflow:hidden;gap:8px}#view-name{max-width:65%;font-size:12px;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}#state-pill{max-width:35%;font-size:11px;line-height:1.2}.anatomy-depth-control{padding:5px 10px;margin-bottom:4px}.viewport-dock>#shoulder-whole-arm{margin-top:4px}}
/* Hip-only narrow/zoom reflow: keep the preview badge inside the header. */
body:has(#simple-model-caption[data-hip-model]:not([data-hip-model=""])) header{flex-wrap:wrap;height:auto;min-height:62px;gap:8px}

/* Wrist-only narrow/zoom reflow; preserve other regions' layout. */
body:has(#simple-model-caption[data-wrist-model]:not([data-wrist-model=""])) header{flex-wrap:wrap;height:auto;min-height:62px;gap:8px}

/* Ankle/foot-only narrow/zoom reflow; other regions retain their layout. */
body:has(#simple-model-caption[data-ankle-model]:not([data-ankle-model=""])) header{flex-wrap:wrap;height:auto;min-height:62px;gap:8px}

/* Shoulder-only patient copy, narrow header and adjacent reference/example labels. */
body:has(#simple-model-caption[data-shoulder-model]:not([data-shoulder-model=""])) header{flex-wrap:wrap;height:auto;min-height:62px;gap:8px}
#simple-shoulder-comparison-note{grid-column:1/-1;margin:5px 0 2px;font-size:12px;line-height:1.4;text-align:center;color:#225a50;overflow-wrap:anywhere}
#simple-shoulder-comparison-note[hidden]{display:none}
body:has(#simple-model-caption[data-shoulder-model]:not([data-shoulder-model=""])) .viewport-dock{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:6px}
body:has(#simple-model-caption[data-shoulder-model]:not([data-shoulder-model=""])) #simple-comparison{grid-column:1;grid-row:1;min-width:0}
body:has(#simple-model-caption[data-shoulder-model]:not([data-shoulder-model=""])) #simple-view-options{grid-column:2;grid-row:1;margin:0}
body:has(#simple-model-caption[data-shoulder-model]:not([data-shoulder-model=""])) #simple-shoulder-comparison-note{grid-row:2}
body:has(#simple-model-caption[data-shoulder-model]:not([data-shoulder-model=""])) #shoulder-whole-arm{grid-column:1/-1}
@media(max-width:420px){
body:has(#simple-model-caption[data-shoulder-model]:not([data-shoulder-model=""])) #simple-comparison{grid-column:1/-1}
body:has(#simple-model-caption[data-shoulder-model]:not([data-shoulder-model=""])) #simple-view-options{grid-column:1/-1;grid-row:3}
}

/* Knee-only patient copy and adjacent reference/example labels. */
body:has(#simple-model-caption[data-knee-model]:not([data-knee-model=""])) header{flex-wrap:wrap;height:auto;min-height:62px;gap:8px}
#simple-knee-comparison-note{grid-column:1/-1;margin:5px 0 2px;font-size:12px;line-height:1.4;text-align:center;color:#225a50;overflow-wrap:anywhere}
#simple-knee-comparison-note[hidden]{display:none}
body:has(#simple-model-caption[data-knee-model]:not([data-knee-model=""])) .viewport-dock{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:6px}
body:has(#simple-model-caption[data-knee-model]:not([data-knee-model=""])) #simple-comparison{grid-column:1;grid-row:1;min-width:0}
body:has(#simple-model-caption[data-knee-model]:not([data-knee-model=""])) #simple-view-options{grid-column:2;grid-row:1;margin:0}
body:has(#simple-model-caption[data-knee-model]:not([data-knee-model=""])) #simple-knee-comparison-note{grid-row:2}
body:has(#simple-model-caption[data-knee-model]:not([data-knee-model=""])) #patellar-inspection-options{grid-column:1/-1;grid-row:4}
body:has(#simple-model-caption[data-knee-model]:not([data-knee-model=""])) #simple-patella-grades{grid-column:1/-1;grid-row:5}
body:has(#simple-model-caption[data-knee-model]:not([data-knee-model=""])) #simple-grade-explanation{grid-column:1/-1;grid-row:6}
body:has(#simple-model-caption[data-knee-model="cartilage"]) #simple-patella-grades{flex-wrap:wrap;gap:4px}
body:has(#simple-model-caption[data-knee-model="cartilage"]) #simple-patella-grades button{flex:1 1 44px;min-width:44px;min-height:44px;white-space:normal;overflow-wrap:normal}
@media(max-width:420px){
body:has(#simple-model-caption[data-knee-model]:not([data-knee-model=""])) #simple-comparison{grid-column:1/-1}
body:has(#simple-model-caption[data-knee-model]:not([data-knee-model=""])) #simple-view-options{grid-column:1/-1;grid-row:3}
}

/* Elbow-only patient copy and adjacent reference/example labels. */
body:has(#simple-model-caption[data-elbow-model]:not([data-elbow-model=""])) header{flex-wrap:wrap;height:auto;min-height:62px;gap:8px}
#simple-elbow-comparison-note{grid-column:1/-1;margin:5px 0 2px;font-size:12px;line-height:1.4;text-align:center;color:#225a50;overflow-wrap:anywhere}
#simple-elbow-comparison-note[hidden]{display:none}
body:has(#simple-model-caption[data-elbow-model]:not([data-elbow-model=""])) .viewport-dock{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:6px}
body:has(#simple-model-caption[data-elbow-model]:not([data-elbow-model=""])) #simple-comparison{grid-column:1;grid-row:1;min-width:0}
body:has(#simple-model-caption[data-elbow-model]:not([data-elbow-model=""])) #simple-view-options{grid-column:2;grid-row:1;margin:0}
body:has(#simple-model-caption[data-elbow-model]:not([data-elbow-model=""])) #simple-elbow-comparison-note{grid-row:2}
body:has(#simple-model-caption[data-elbow-model]:not([data-elbow-model=""])) #gap-view-controls{grid-column:1/-1;grid-row:4;min-width:0}
@media(max-width:420px){
body:has(#simple-model-caption[data-elbow-model]:not([data-elbow-model=""])) #gap-view-controls{grid-template-columns:minmax(0,1fr)}
body:has(#simple-model-caption[data-elbow-model]:not([data-elbow-model=""])) #simple-comparison{grid-column:1/-1}
body:has(#simple-model-caption[data-elbow-model]:not([data-elbow-model=""])) #simple-view-options{grid-column:1/-1;grid-row:3}
}

/* Lower-leg-only patient copy and adjacent reference/example labels. */
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) header{flex-wrap:wrap;height:auto;min-height:62px;gap:8px}
#simple-lower-leg-comparison-note{grid-column:1/-1;margin:5px 0 2px;font-size:12px;line-height:1.4;text-align:center;color:#225a50;overflow-wrap:anywhere}
#simple-lower-leg-comparison-note[hidden]{display:none}
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) .viewport-dock{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:6px}
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) #simple-comparison{grid-column:1;grid-row:1;min-width:0}
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) #simple-view-options{grid-column:2;grid-row:1;margin:0}
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) #simple-lower-leg-comparison-note{grid-row:2}
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) #gap-view-controls{grid-column:1/-1;grid-row:4;min-width:0}
@media(max-width:420px){
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) #gap-view-controls{grid-template-columns:minmax(0,1fr)}
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) #simple-comparison{grid-column:1/-1}
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) #simple-view-options{grid-column:1/-1;grid-row:3}
}

@media(max-width:850px){
body:has(#simple-model-caption[data-lower-leg-model="medial-tibial-stress-syndrome"]) .viewport:has(.gap-settings[open]){height:960px!important;min-height:960px!important}
}
/* Keep full medical titles and state meanings readable at narrow and enlarged layouts. */
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) .scene-heading{max-height:none;overflow:visible;flex-wrap:wrap}
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) #view-name,
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) #state-pill{min-width:0;max-width:100%;overflow-wrap:anywhere;white-space:normal;display:block;-webkit-line-clamp:unset}
@media(max-width:420px){
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) .scene-heading{flex-direction:column;align-items:flex-start}
body:has(#simple-model-caption[data-lower-leg-model]:not([data-lower-leg-model=""])) #state-pill{text-align:left}
}

/* Chest-only patient copy and adjacent reference/example labels. */
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) header{flex-wrap:wrap;height:auto;min-height:62px;gap:8px}
#simple-chest-comparison-note{grid-column:1/-1;margin:5px 0 2px;font-size:12px;line-height:1.4;text-align:center;color:#225a50;overflow-wrap:anywhere}
#simple-chest-comparison-note[hidden]{display:none}
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) .viewport-dock{display:grid;grid-template-columns:minmax(0,1fr) 48px;gap:6px}
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) #simple-comparison{grid-column:1;grid-row:1;min-width:0}
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) #simple-view-options{grid-column:2;grid-row:1;margin:0}
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) #simple-chest-comparison-note{grid-row:2}
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) #gap-view-controls{grid-column:1/-1;grid-row:4;min-width:0}
@media(max-width:420px){
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) #gap-view-controls{grid-template-columns:minmax(0,1fr)}
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) #simple-comparison{grid-column:1/-1}
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) #simple-view-options{grid-column:1/-1;grid-row:3}
}

@media(max-width:850px){
body:has(#simple-model-caption[data-chest-model="chest-superficial-bruise-native"]) .viewport:has(.gap-settings[open]){height:960px!important;min-height:960px!important}
}
/* Keep full medical titles and state meanings readable at narrow and enlarged layouts. */
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) .scene-heading{max-height:none;overflow:visible;flex-wrap:wrap}
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) #view-name,
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) #state-pill{min-width:0;max-width:100%;overflow-wrap:anywhere;white-space:normal;display:block;-webkit-line-clamp:unset}
@media(max-width:420px){
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) .scene-heading{flex-direction:column;align-items:flex-start}
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) #state-pill{text-align:left}
}

/* Chest-only expanded controls reserve scene space and outrank inherited viewport !important rules. */
body:has(#simple-model-caption[data-chest-model="chest-superficial-bruise-native"]) .viewport{min-height:820px!important}
body:has(#simple-model-caption[data-chest-model="chest-superficial-bruise-native"]) .viewport:has(.gap-settings[open]){height:1100px!important;min-height:1100px!important}
@media(max-width:850px){
body:has(#simple-model-caption[data-chest-model="chest-superficial-bruise-native"]) .viewport{height:960px!important;min-height:960px!important}
body:has(#simple-model-caption[data-chest-model="chest-superficial-bruise-native"]) .viewport:has(.gap-settings[open]){height:1200px!important;min-height:1200px!important}
body:has(#simple-model-caption[data-chest-model]:not([data-chest-model=""])) .viewport:has(#simple-view-options[open]){height:900px!important;min-height:900px!important}
}

/* Pelvis/SI-only readable anatomy reference and expanded controls. */
body:has(#simple-model-caption[data-pelvis-model]:not([data-pelvis-model=""])) header{flex-wrap:wrap;height:auto;min-height:62px;gap:8px}
body:has(#simple-model-caption[data-pelvis-model]:not([data-pelvis-model=""])) .scene-heading{max-height:none;overflow:visible;flex-wrap:wrap}
body:has(#simple-model-caption[data-pelvis-model]:not([data-pelvis-model=""])) #view-name,
body:has(#simple-model-caption[data-pelvis-model]:not([data-pelvis-model=""])) #state-pill{min-width:0;max-width:100%;overflow-wrap:anywhere;white-space:normal;display:block;-webkit-line-clamp:unset}
body:has(#simple-model-caption[data-pelvis-model]:not([data-pelvis-model=""])) .viewport:has(#simple-view-options[open]){height:1000px!important;min-height:1000px!important}
body:has(#simple-model-caption[data-pelvis-model]:not([data-pelvis-model=""])) #regional-si-options label{display:block;min-width:0;overflow-wrap:anywhere}
body:has(#simple-model-caption[data-pelvis-model]:not([data-pelvis-model=""])) #regional-si-options select{max-width:100%;min-width:0}
@media(max-width:420px){
body:has(#simple-model-caption[data-pelvis-model]:not([data-pelvis-model=""])) .scene-heading{flex-direction:column;align-items:flex-start}
body:has(#simple-model-caption[data-pelvis-model]:not([data-pelvis-model=""])) #state-pill{text-align:left}
body:has(#simple-model-caption[data-pelvis-model]:not([data-pelvis-model=""])) .viewport:has(#simple-view-options[open]){height:1200px!important;min-height:1200px!important}
}
/* Keep optional anatomy controls inside the available width at CSS 2x reflow. */
body:has(#simple-model-caption[data-pelvis-model]:not([data-pelvis-model=""])) .transparency-control input{min-width:0;width:40px;flex:1}
body:has(#simple-model-caption[data-pelvis-model]:not([data-pelvis-model=""])) fieldset{min-width:0;max-width:100%;box-sizing:border-box}
body:has(#simple-model-caption[data-pelvis-model]:not([data-pelvis-model=""])) fieldset label{min-width:0;white-space:normal;overflow-wrap:anywhere}
