/* Primary reading order: question -> model/action -> optional explanation. */
:root{--sidebar-width:340px}
.lessons .flight-entry{display:inline-flex;align-items:center;min-height:44px;white-space:nowrap;border-left:1px solid var(--line);padding:6px 12px;color:#b4e6d8;text-decoration:none;font-size:18px}
.stage-top{background:#0d1624;min-height:62px;padding:10px 16px}
.stage-top h2{font-size:26px;line-height:1.35;font-weight:700}
.explanation{padding:18px 16px;background:#131f2d}
.explanation>.eyebrow,.explanation>#card-title{display:none!important}
.lead{font-size:22px;line-height:1.5;margin:18px 0;color:#f4f7fa;border-left:3px solid var(--green);padding-left:12px}
.guide-steps{display:grid;gap:7px}
.guide-steps button{text-align:left;background:transparent;color:var(--muted);border-color:transparent;min-height:44px;padding:8px 12px}
.guide-steps button.active{color:#d8fff3;background:#25483f;border-color:#67bda9;font-weight:700}
#guide-answer{margin:14px 0 18px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:4px 0}
#guide-answer summary{color:var(--green);font-weight:700;justify-content:space-between}
#guide-answer summary::after{content:'＋';font-size:24px}
#guide-answer[open] summary::after{content:'−'}
#guide-conclusion{font-size:22px;line-height:1.5;margin:4px 0 12px}
.secondary-drawer{border-bottom:1px solid #2d4050;padding:2px 0}
.secondary-drawer summary{font-size:18px;color:#a5b5c3;justify-content:space-between}
.secondary-drawer summary::after{content:'›'}
.secondary-drawer[open] summary::after{content:'⌄'}
#topic-names{margin:8px 0 12px}
#selected-info{margin:8px 0 14px;padding:10px 0;border-top:1px solid var(--line)}
#selection-name{font-size:20px;color:var(--green)}
#selection-function,#selection-note{font-size:18px;line-height:1.5;margin:6px 0}
#selected-info details summary{font-size:18px}
#return-question{font-size:18px;text-align:left;width:auto;background:transparent;border:0;padding-left:0;margin:0;color:var(--muted)}
.air-key{padding:0;margin:8px 0 12px;border:0}
.air-key h3,.air-key .air-route{display:none}
.air-type{margin:5px 0}.air-type p{font-size:18px}.air-type strong{display:inline}
.air-type strong::after{content:' · '}.air-type i{margin-top:6px}
.colour-note summary{font-size:18px;color:var(--muted)}
#flow-legend{display:none}
.model-caption,.stage-bottom #status{display:none}
.stage-bottom{min-height:0;height:0;padding:0;overflow:hidden}
#canvas-wrap{inset:52px 0 6px}
.three-toolbar{justify-content:flex-end;gap:6px;pointer-events:none}
.three-toolbar>*{pointer-events:auto}
#view-tools{position:relative}
#view-tools>summary{list-style:none;border:1px solid var(--line);border-radius:7px;min-height:44px;padding:6px 12px;color:var(--muted);background:#192b3be8}
.tool-panel{position:absolute;right:0;top:48px;width:292px;max-height:65dvh;overflow:auto;display:flex;flex-wrap:wrap;gap:5px;background:#172839;border:1px solid #506777;border-radius:8px;padding:10px;box-shadow:0 12px 32px #0009;z-index:4}
.tool-panel button{flex:1;white-space:nowrap}.tool-panel select{width:100%;max-width:100%}
#cut-controls,#specimen-select{position:static;margin:0}
#cut-controls{display:flex;flex-wrap:wrap;padding:0;background:none}
#stage-fullscreen{display:none;margin-left:0}
body.teaching-fullscreen #stage-fullscreen{display:block}
#view-switch{display:none}
#guide-step-status{display:none}
#resp-controls{padding:8px 12px;gap:5px;background:#142332}
.resp-state{gap:10px}.resp-state p{font-size:22px}
.resp-actions select{display:none}
#resp-reset{display:none}
.settings{margin-top:0;padding-top:2px}.settings summary{color:#a5b5c3}
body.quiz-active .explanation>#card-title{display:block!important;font-size:24px;margin:4px 0 12px}
body.quiz-active .lead{font-size:18px;border:0;padding:0;margin:8px 0 14px}
body.quiz-active #more-observations>summary{display:none}
body.quiz-active #more-observations{border:0}
.footer-line{min-height:36px;font-size:18px}
#source-info{font-size:18px;margin-top:5px;min-height:44px}
@media(max-width:1450px){:root{--sidebar-width:320px}.stage-top h2{font-size:24px}.explanation{padding:14px}.guide-steps{gap:4px}}
@media(max-width:900px){.stage-top h2{font-size:22px}.stage-top{min-height:56px;padding:8px 12px}.stage{height:65dvh;min-height:450px}#canvas-wrap,body.focus #canvas-wrap{inset:52px 0 6px}#flow-legend{display:flex;top:53px;left:7px;font-size:18px}.three-toolbar #pan-mode{display:block}#view-tools .tool-panel button[data-view]{display:block}.explanation{padding:16px}.guide-steps{grid-template-columns:repeat(3,1fr);gap:4px}.guide-steps button{padding:7px 6px;font-size:18px;text-align:center;line-height:1.25}.lead{margin:12px 0;font-size:22px}#air-key{display:none!important}#specimen-select{position:static}#three-wrap:has(#cut-controls:not([hidden])) #canvas-wrap{bottom:6px}.tool-panel{max-width:calc(100vw - 34px)}body.focus #guide-step-status{display:block;position:absolute;bottom:8px;left:12px;color:#9db1c4;font-size:18px;pointer-events:none}body.focus .stage{min-height:0}body.focus .model-caption{display:none}}
body.breathing .explanation>.lead{display:block!important}
.air-type.fresh i{background:var(--fresh)}.air-type.used i{background:var(--used)}

@media(max-width:900px){#air-key{display:block!important}#air-key .air-type,#air-key .air-route{display:none!important}}

/* Put process narration beside the structure; the footer is a control strip. */
#respiration-cues{position:absolute;inset:52px 0 6px;z-index:2;pointer-events:none;overflow:hidden}
#respiration-cues[hidden]{display:none}
#respiration-cues>svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
#respiration-cues path{fill:none;stroke:#bfd3df;stroke-width:1.6;stroke-linejoin:round;opacity:.8}
#respiration-cues circle{fill:#bfe6de;stroke:#0d1624;stroke-width:2}
.resp-cue-phase{position:absolute;left:12px;top:8px;font-size:22px;line-height:1.4;font-weight:700;color:#c8f3eb;background:#142735ee;padding:6px 12px;border-radius:6px}
body[data-breath=exhale] .resp-cue-phase{color:#ffbe93}
.resp-cue-card{position:absolute;top:0;left:0;padding:11px 14px;background:#152432f5;border:1px solid #6b8797;border-left:3px solid #b9dddc;border-radius:7px;box-shadow:0 5px 18px #0005;color:#f3f8fb}
.resp-cue-card[hidden]{display:none}
.resp-cue-card strong{display:block;font-size:22px;line-height:1.35;color:#c6edfa}
.resp-cue-card p{font-size:22px;line-height:1.45;margin:5px 0 0}
.resp-cue-card[data-tone=front]{border-left-color:var(--front)}
.resp-cue-card[data-tone=back]{border-left-color:var(--back)}
.resp-cue-card[data-tone=back] strong{color:#edc274}
.resp-cue-card[data-tone=lung] strong{color:#ffc0b0}
body.stage-resp-cues .resp-state{display:none}
body.stage-resp-cues #resp-controls{padding:8px 12px 5px}
body.stage-resp-cues #phase-progress{margin-top:3px}
body.narrow-resp-cues #canvas-wrap,body.focus.narrow-resp-cues #canvas-wrap{bottom:var(--resp-cue-space,126px)}
body.narrow-resp-cues .resp-cue-card{padding:9px 10px}
body.narrow-resp-cues .resp-cue-phase{display:none}

body.focus.stage-resp-cues:not(.narrow-resp-cues) #flow-legend{display:flex;top:108px;left:12px;max-width:310px;flex-wrap:wrap;font-size:18px}
#lung-view{color:#ffd0bc;border-color:#976b66}

/* 3.3.4: one compact navigation row, centered stage actions, inline sources. */
header{height:62px;gap:12px}header .lessons{flex:1;min-width:0;border:0;background:none;padding:0;justify-content:center}header h1{font-size:22px;white-space:nowrap}.stage-top{display:none!important}#visuals{padding-top:6px}.stage-actions{position:absolute;top:5px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:6px;z-index:3;white-space:nowrap}#stage-fullscreen,body.teaching-fullscreen #stage-fullscreen{display:none!important}.three-toolbar{left:auto;max-width:46%;flex-wrap:nowrap}#source-notes{margin-top:14px;border-top:1px solid var(--line);padding-top:5px}#source-notes summary{font-size:18px;color:var(--muted)}#source-content{font-size:18px;line-height:1.6;overflow-wrap:anywhere}#source-content h3{font-size:20px;color:var(--green)}#source-content p{white-space:normal;margin:10px 0}#source-content a{color:var(--green)}#source-content ul{padding-left:22px}#source-content details{border-top:1px solid var(--line);margin:10px 0}#source-content li{margin:8px 0}
@media(max-width:1100px){header{height:auto;min-height:54px;flex-wrap:wrap;padding:4px 9px}header .lessons{flex-basis:100%;order:3;justify-content:flex-start}.three-toolbar{max-width:48%}.three-toolbar #lung-view{font-size:18px}}
@media(max-width:700px){.three-toolbar{top:54px;max-width:100%;right:5px}.stage-actions{max-width:100%;top:5px}#canvas-wrap,body.focus #canvas-wrap{top:104px}#respiration-cues{top:104px}body.focus.stage-resp-cues:not(.narrow-resp-cues) #flow-legend,#flow-legend{top:108px}header .brand{display:flex!important}header .mark{display:none}.stage{min-height:490px}#view-tools .tool-panel{max-height:55dvh}}

/* stage-tools-wrap: keep central and right actions apart as the sidebar is resized. */
#three-wrap{container-type:inline-size}
@container (max-width:780px){.three-toolbar{top:54px;max-width:100%}#canvas-wrap,body.focus #canvas-wrap{top:104px}#respiration-cues{top:104px}#flow-legend,body.focus.stage-resp-cues:not(.narrow-resp-cues) #flow-legend{top:108px}}

/* Same-scale regional muscle observation. The labels belong to the specimen. */
#muscle-comparison{position:absolute;inset:0;z-index:2;pointer-events:none}
#muscle-comparison[hidden]{display:none}
#muscle-comparison svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
#muscle-comparison path{fill:none;stroke:#a7bbc8;stroke-width:1.4}
#muscle-comparison circle{fill:#ffbdab;stroke:#0d1624;stroke-width:2}
.muscle-card{position:absolute;top:0;left:0;text-align:left;pointer-events:auto;background:#152432f2;border:1px solid #667f90;border-left:3px solid #ce8472;padding:10px 12px;border-radius:7px;white-space:normal;box-shadow:0 5px 18px #0004}
.muscle-card strong{display:block;color:#ffc1b0;font-size:22px;line-height:1.4}
.muscle-card span{display:block;color:#d6e1e8;font-size:18px;line-height:1.4;margin-top:3px}
.muscle-card[aria-pressed=true]{border-color:#81dfc9;background:#20443e}.muscle-card[aria-pressed=true] strong{color:#a9f3de}
.muscle-clear{pointer-events:auto;position:absolute;bottom:12px;left:50%;transform:translateX(-50%);font-size:18px}
#muscle-comparison.narrow .muscle-card{padding:8px;box-shadow:none;min-height:76px}
#muscle-comparison.narrow .muscle-card strong{font-size:20px}
#muscle-comparison.narrow .muscle-card span{font-size:18px}
body.comparing-muscles #selected-label{display:none!important}
#three-wrap:has(#muscle-comparison.narrow:not([hidden])) #canvas-wrap{bottom:168px}
#air-key[hidden]{display:none!important}
@media(max-width:900px){.guide-steps:has(button:nth-child(4)){grid-template-columns:repeat(2,1fr)}}
