/* Compact chapter-1 UI; original images, drawing dimensions and semantic colors stay intact. */
body.bio-compact-v1 .wrap{max-width:1080px}
body.bio-compact-v1 .floating-lang-container{border-radius:999px;gap:4px;padding:5px 7px}
body.bio-compact-v1 .floating-lang-container .lang-btn{border-radius:999px;min-height:44px;padding:5px 10px}
body.bio-compact-v1 .scope-language{display:none!important}
body.bio-compact-v1 :is(.bio-control-groups,.scope-head-tools,.quiz-card,.scope-task,.bio-needs-toolbar) button{font-size:17px;line-height:1.25;min-width:44px;min-height:44px;padding:5px 8px;white-space:normal;max-width:100%}
body.bio-compact-v1 :is(.bio-control-groups,.scope-sidebar) :is(label,summary,select){font-size:17px;line-height:1.4}
body.bio-compact-v1 .scope-workbench{--side:244px;grid-template-columns:minmax(0,1fr);gap:12px;padding:12px}
body.bio-compact-v1 .scope-head{padding-bottom:8px;gap:8px}
body.bio-compact-v1 .scope-head h3{font-size:19px;line-height:1.35;flex:1 1 230px;margin:0}
body.bio-compact-v1 .scope-head-tools{gap:6px;max-width:100%}
body.bio-compact-v1 .scope-head-tools .primary{width:auto;max-width:260px}
body.bio-compact-v1 .scope-sidebar{display:block;min-width:0}
.bio-control-groups,.bio-lab-groups{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px 12px;min-width:0}
.bio-control-group{flex:1 1 180px;min-width:0;max-width:100%;display:flex;flex-direction:column;gap:5px}
body.bio-compact-v1 .bio-group-label{font-size:15px;font-weight:700;line-height:1.3;color:var(--muted)}
body.bio-compact-v1 .bio-control-groups :is(.choice-row,.control-row,.cell-media-tabs){display:flex;flex-wrap:wrap;gap:6px;margin:0}
.bio-control-group :is(.choice-row,.control-row,.cell-media-tabs) button{flex:1 1 auto}
.bio-control-group.bio-dials{flex:3 1 420px}.bio-control-group.bio-stage-group{flex:1 1 245px}
.bio-control-group.bio-parts{flex:2 1 360px}.bio-control-group.bio-specimen{flex:2 1 260px}
.bio-control-group.bio-cell-type{flex:1 1 160px}.bio-control-group.bio-photo-tools{flex:1 1 180px}
.bio-control-group.bio-instrument{flex:1 1 130px}.bio-control-group.bio-objectives{flex:2 1 240px}
.bio-control-group.bio-adjustments{flex:1 1 190px}.bio-control-group.bio-main-actions{flex:1 1 160px}
body.bio-compact-v1 .bio-dials .scope-controls{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0}
body.bio-compact-v1 .scope-control{padding:7px;border-radius:8px}
body.bio-compact-v1 .scope-control :is(input,select){width:100%;min-height:44px;margin:0}
body.bio-compact-v1 .scope-control label{font-size:16px;line-height:1.35;margin:0}
body.bio-compact-v1 .scope-selector{margin:0}
body.bio-compact-v1 .scope-selector>label{display:block;margin:0 0 5px;font-size:15px}
body.bio-compact-v1 .stage-panel{margin:0}
body.bio-compact-v1 .stage-panel h3{font-size:17px;line-height:1.35;margin:0 0 6px}
body.bio-compact-v1 .stage-panel .slide-control{height:148px;margin:0}
body.bio-compact-v1 .stage-panel .move-buttons{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:6px 0 0}
body.bio-compact-v1 .move-buttons button{grid-row:auto;grid-column:auto;font-size:16px;padding:5px 4px}
body.bio-compact-v1 .scope-view{min-width:0;min-height:0;display:flex;flex-direction:column;gap:10px}
body.bio-compact-v1 .scope-view .lens-wrap{width:100%;max-width:none;padding:8px;margin:0 auto}
body.bio-compact-v1 .scope-view .scope-lens{max-width:100%;height:auto;margin:0 auto}
body.bio-compact-v1[data-biology-unit=microscope] .scope-view .scope-lens{width:min(100%,720px)}
body.bio-compact-v1 .scope-view .lens-title{font-size:17px;line-height:1.4;margin:0 0 8px}
.bio-figure-notes{width:100%;min-width:0;padding:12px 14px;border-left:4px solid var(--teal);border-radius:8px;background:var(--bg-card,#1c3d34)}
body.bio-compact-v1 .bio-figure-notes :is(p,.status,.cell-function){font-size:22px;line-height:1.6;margin:6px 0}
body.bio-compact-v1 .bio-figure-notes :is(h4,strong){font-size:24px;line-height:1.4;color:var(--yellow)}
body.bio-compact-v1 .bio-figure-notes :is(.status,.cell-function,.lab-coach){min-height:0;padding:8px 10px}
.bio-compact-help{margin-top:8px;border-top:1px dashed var(--rule);padding-top:4px}
body.bio-compact-v1 :is(.bio-compact-help,.bio-figure-notes>.cell-photo-source-details) summary{font-size:16px;line-height:1.4;min-height:44px;padding:10px 0;color:var(--teal);cursor:pointer}
body.bio-compact-v1 .bio-compact-help-body :is(p,small){display:block;font-size:17px;line-height:1.5;margin:6px 0}
body.bio-compact-v1 .bio-compact-help-body strong{font-size:17px}.bio-knob-tip{margin:10px 0}
body.bio-compact-v1 .bio-compact-help-body .scope-side-details{padding:6px 10px;margin:6px 0}
body.bio-compact-v1 .scope-workbench .scope-readouts{gap:6px;margin:0}
body.bio-compact-v1 .scope-readouts span{font-size:17px;line-height:1.4;padding:5px 8px}
body.bio-compact-v1 .organelle-buttons{display:flex;flex-wrap:wrap;gap:6px}
body.bio-compact-v1 .organelle-buttons button{flex:1 1 112px;font-size:17px;min-height:44px;padding:5px 8px}
body.bio-compact-v1 .cell-photo-controls{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:0;padding:0;border:0}
body.bio-compact-v1 .cell-photo-zoom{font-size:16px}
body.bio-compact-v1 .cell-photo-open-full{display:none}
body.bio-compact-v1 .cell-photo-stage{margin:auto;width:min(100%,calc(680px * var(--photo-ar,1.5)))}
body.bio-compact-v1 .cell-scope-controls{flex:1 0 100%;min-width:0}
body.bio-compact-v1 .cell-scope-instrument{gap:8px;margin:0;padding:6px}
body.bio-compact-v1 .cell-scope-instrument img{width:42px;height:60px;flex-basis:42px}
body.bio-compact-v1 .cell-scope-instrument p{font-size:15px;line-height:1.35}
body.bio-compact-v1 .lab-objective-label{font-size:15px;margin:0 0 4px}
body.bio-compact-v1 .lab-objectives{gap:6px}
body.bio-compact-v1 .lab-objectives button{font-size:16px;min-height:56px;padding:5px;white-space:pre-line}
body.bio-compact-v1 .cell-scope-controls .cell-control{margin:0}
body.bio-compact-v1 .cell-scope-controls .cell-control input{min-height:44px;margin:0}
body.bio-compact-v1 .lab-adjustments{margin:0;padding:6px 8px}
body.bio-compact-v1 .lab-adjustments summary{font-size:16px;min-height:44px;line-height:1.4;padding:6px 0}
body.bio-compact-v1 .lab-adjustments .cell-control{margin:8px 0}
body.bio-compact-v1 .lab-direction{font-size:17px;line-height:1.4;margin:6px 0}
body.bio-compact-v1 .lab-progress{font-size:17px!important}
body.bio-compact-v1 .lab-readout span{font-size:17px;line-height:1.4;padding:5px 8px}
body.bio-compact-v1 [data-media=photo] :is(.lab-coach,.lab-progress){display:none}
body.bio-compact-v1 #mountSteps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;padding:0;list-style:none;counter-reset:mount-step;margin:8px 0}
body.bio-compact-v1 #mountSteps li{font-size:16px;line-height:1.4;padding:6px 8px;border-bottom:3px solid var(--rule);counter-increment:mount-step}
#mountSteps li::before{content:counter(mount-step) '. ';font-family:'JetBrains Mono',monospace}#mountSteps li.current{border-bottom-color:var(--yellow)}
.bio-control-header{display:flex;align-items:center;gap:8px;margin-bottom:10px}
body.bio-compact-v1 .bio-control-header h3{font-size:19px;line-height:1.4;margin:0}
body.bio-compact-v1 .bio-intro-workbench{padding:12px}
body.bio-compact-v1 .bio-intro-workbench>.bio-control-groups{margin:0 0 12px}
body.bio-compact-v1 .bio-intro-workbench .scene{margin:0}
body.bio-compact-v1 .bio-control{margin:0}
body.bio-compact-v1 .bio-control label{font-size:15px;line-height:1.4;margin:0}
.bio-control-group.bio-range{flex:2 1 360px}.bio-control-group.bio-altitudes{flex:1 1 220px}
body.bio-compact-v1 .bio-needs-toolbar{gap:6px;margin:10px 0 12px}
body.bio-compact-v1 .life-visual{grid-template-columns:1fr;gap:14px}
body.bio-compact-v1 .life-scan .core-idea{font-size:24px;line-height:1.5}
body.bio-compact-v1 .life-visual figure{width:100%;max-width:850px;margin:auto}
body.bio-compact-v1 .life-details summary{font-size:17px;line-height:1.5;min-height:44px}
body.bio-compact-v1 .quiz-card .choice-row{gap:6px;margin:10px 0}
/* Fullscreen control rail: media constrained by BOTH remaining width and actual visual height. */
body.bio-compact-v1 .scope-workbench.scope-full{display:grid;grid-template-columns:244px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);gap:10px 12px;padding:10px;height:100dvh;overflow:hidden}
body.bio-compact-v1 .scope-full .scope-head{grid-column:1/-1;grid-row:1;padding-right:var(--bio-lang-clearance,180px);min-height:54px}
body.bio-compact-v1 .scope-full .scope-sidebar{grid-column:1;grid-row:2;height:100%;overflow:auto;padding:8px;border:1px solid var(--rule);border-radius:10px;touch-action:pan-y}
body.bio-compact-v1 .scope-full :is(.bio-control-groups,.bio-lab-groups){display:flex;flex-direction:column;gap:10px}
body.bio-compact-v1 .scope-full .bio-control-group{flex:0 0 auto;width:100%}
body.bio-compact-v1 .scope-full .cell-scope-controls{flex:0 0 auto;width:100%}
body.bio-compact-v1 .scope-full .scope-view{grid-column:2;grid-row:2;display:grid;grid-template-rows:minmax(0,1fr) auto;gap:8px;height:100%;overflow:hidden}
body.bio-compact-v1 .scope-workbench.scope-full .scope-view :is(.lens-wrap,.scope-photo-frame){width:100%;height:100%;min-height:0;max-width:100%;margin:0;padding:8px;display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden}
body.bio-compact-v1 .scope-full .scope-view :is(.scope-lens,.scope-instrument){flex:0 0 auto;width:min(100%,calc(var(--bio-visual-h,380px) * var(--ar)));height:auto;max-width:100%;max-height:var(--bio-visual-h,380px);object-fit:contain}
body.bio-compact-v1 .scope-full .cell-photo-figure{min-height:0;flex:0 0 auto;height:auto;display:flex;align-items:center;justify-content:center}
body.bio-compact-v1 .scope-workbench.scope-full .cell-photo-stage{width:min(100%,calc(var(--bio-visual-h,380px) * var(--photo-ar,1.5)));height:auto;max-height:var(--bio-visual-h,380px)}
body.bio-compact-v1 .scope-workbench.scope-full .cell-lab-lens{width:min(100%,var(--bio-visual-h,380px));height:auto;max-height:var(--bio-visual-h,380px)}
body.bio-compact-v1 .scope-full .bio-figure-notes{min-height:0;max-height:min(24dvh,180px);overflow:auto;overscroll-behavior:contain;padding:8px 10px}
body.bio-compact-v1 .scope-full .bio-dials .scope-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
body.bio-compact-v1 .scope-full .stage-panel .move-buttons{grid-template-columns:repeat(2,minmax(0,1fr))}
body.bio-compact-v1 .scope-full .organelle-buttons button{flex-basis:90px}
body.bio-compact-v1 .scope-workbench.scope-full .lab-objectives button{font-size:16px;min-height:56px;padding:5px}
body.bio-compact-v1 .scope-workbench.scope-full .cell-scope-instrument{padding:6px;margin:0}
body.bio-compact-v1 .scope-workbench.scope-full .cell-scope-instrument img{width:42px;height:60px;flex-basis:42px}
body.bio-compact-v1 .scope-workbench.scope-full .lab-readout span{font-size:17px}
body.bio-compact-v1.scope-full-lock .floating-lang-container{top:10px;right:10px}
body.bio-compact-v1.scope-full-lock .floating-lang-container .lang-btn{font-size:18px}
@media(max-width:750px){body.bio-compact-v1 .bio-dials .scope-controls{grid-template-columns:repeat(2,minmax(0,1fr))}body.bio-compact-v1 #mountSteps{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-aspect-ratio:1/1){
 body.bio-compact-v1 .scope-workbench.scope-full{grid-template-columns:minmax(0,1fr);grid-template-rows:auto clamp(190px,24dvh,280px) minmax(0,1fr)}
 body.bio-compact-v1 .scope-full .scope-head{grid-column:1;grid-row:1;position:static;min-height:54px}
 body.bio-compact-v1 .scope-full .scope-sidebar{grid-column:1;grid-row:2;overflow:auto}
 body.bio-compact-v1 .scope-full .scope-view{grid-column:1;grid-row:3;overflow:hidden}
 body.bio-compact-v1 .scope-full :is(.bio-control-groups,.bio-lab-groups){flex-direction:row;flex-wrap:wrap}
 body.bio-compact-v1 .scope-full .bio-control-group{flex:1 1 180px;width:auto}
 body.bio-compact-v1 .scope-full .bio-control-group.bio-dials{flex:2 1 340px}
 body.bio-compact-v1 .scope-full .bio-control-group.bio-stage-group{flex:1 1 240px}
 body.bio-compact-v1 .scope-full .cell-scope-controls{flex:1 0 100%}
}
@media(max-width:480px){body.bio-compact-v1 .bio-control-group{flex-basis:160px}body.bio-compact-v1 .scope-head-tools{width:100%}body.bio-compact-v1 .scope-head-tools .primary{max-width:100%}body.bio-compact-v1 .scope-full .scope-head{padding-right:145px}body.bio-compact-v1 .bio-figure-notes :is(p,.status,.cell-function){font-size:20px}}
