/* Experiments keep Teacher's ordinary chat, composer and artifact lifecycle. */
.exp-thumb{position:relative}.exp-thumb>img{mix-blend-mode:lighten;position:absolute;inset:0;width:100%;height:100%;object-fit:contain}.exp-thumb>canvas[hidden]{display:none}
.exp-gallery{max-width:1100px;margin:auto;padding:40px 32px 70px;color:#d8dfe9}
.exp-gallery-head{margin-bottom:42px}.exp-gallery h1{font-size:30px;font-weight:540;letter-spacing:-1px;margin:0 0 9px}.exp-gallery-head p{font-size:15px;color:#8e9caf;margin:0}
.exp-group{margin-bottom:32px}.exp-group h2{font-size:12px;font-weight:500;text-transform:uppercase;letter-spacing:1.6px;color:#9aa9bb;margin:0 0 15px}
.exp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:18px}
.exp-card{display:flex;flex-direction:column;width:100%;padding:0 20px 18px;overflow:hidden;text-align:left;background:#1e242d;border:1px solid #ffffff09;border-radius:18px;color:inherit;cursor:pointer;transition:background .15s,transform .15s}
.exp-card:hover{background:#232c39;transform:translateY(-2px)}.exp-card:focus-visible{outline:2px solid #8ab9ff;outline-offset:3px}.exp-card:disabled{opacity:.6;cursor:default}
.exp-thumb{flex:none;height:155px;margin:0 -20px 20px;background:radial-gradient(ellipse at 50% 90%,#26364b75,transparent 75%)}.exp-thumb canvas{display:block;width:100%;height:100%}
.exp-card h3{font-size:18px;font-weight:520;margin:0 0 8px}.exp-card p{font-size:13px;color:#a4b0c1;line-height:1.6;margin:0 0 20px}.exp-card>span{margin-top:auto;font-size:12px;color:#9fbfe9}
.teacher.tv-experiment-thread:not(.tv-paged).visual-open:not(.visual-expanded){grid-template-columns:0 minmax(0,1fr) var(--exp-width,54%);transition:none}
.teacher.tv-experiment-thread.tv-side-open:not(.tv-paged).visual-open:not(.visual-expanded){grid-template-columns:200px minmax(0,1fr) var(--exp-width,54%);transition:none}
.tv-experiment-thread:not(.tv-paged) .artifact-toolbar{background:none;border:0}.tv-experiment-thread .artifact-scene{min-width:0}
.exp-back,.exp-reopen{border:0;background:#ffffff09;color:#b9c7db;border-radius:18px;padding:7px 12px;cursor:pointer;font:inherit;font-size:12px}.exp-reopen{margin:16px 0}.exp-action-chip{display:block;width:fit-content;max-width:100%;font-size:12px;color:#a9c6eb;background:#91b9ed0c;padding:4px 10px;border-radius:16px;margin:10px 0 0;overflow-wrap:anywhere}
.exp-shell{height:100%;width:100%;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;display:flex;flex-direction:column;background:#191e26;color:#cdd7e5;font:13px/1.45 system-ui,sans-serif;position:relative;scrollbar-width:thin;scrollbar-color:#465265 transparent}
/* The lab host is also the artifact scene; its panel overflow:hidden must not stop Breakdown and Graphs from scrolling. */
.problem-artifact .artifact-scene.exp-shell{overflow:auto}
.exp-shell *{box-sizing:border-box}.exp-shell [hidden]{display:none!important}
.exp-shell button{font:inherit;cursor:pointer;border:0;border-radius:18px;background:#ffffff08;color:#c6d2e3;padding:7px 11px;white-space:nowrap;min-height:32px}.exp-shell button:hover{background:#ffffff12}.exp-shell button[aria-pressed=true],.exp-shell button[aria-expanded=true]{color:#b7d3fa;background:#81adf724}
.exp-shell button:focus-visible,.exp-shell input:focus-visible,.exp-shell select:focus-visible{outline:2px solid #82b5ff;outline-offset:2px}
.exp-tools{overflow-x:auto;scrollbar-width:thin;flex:none;display:flex;align-items:center;gap:5px;padding:8px 10px;position:sticky;top:0;background:#191e26;z-index:3}.exp-tools .exp-gallery-back{font-size:18px;padding:2px 10px}.exp-method{font-size:11px;color:#7f91aa;margin-left:auto;white-space:nowrap}
.exp-scene{position:relative;flex:1 0 340px;min-height:340px;overflow:hidden;container-type:inline-size;background:radial-gradient(ellipse at 50% 53%,#24334950,transparent 72%)}.exp-scene>canvas{display:block;position:absolute;width:100%;height:100%;inset:0;touch-action:none}
.exp-closeups{flex:none;display:flex;gap:6px;justify-content:center;flex-wrap:wrap;text-align:center;padding:2px 10px 8px}.exp-closeups button{color:#a9c8ef;background:#253449;font-size:12px;padding:5px 12px;min-height:30px}.exp-closeups button:hover,.exp-closeups button:focus-visible{background:#2e4260}.exp-zoom-back{flex:none;align-self:center;margin:2px 0 8px}.exp-hl{position:absolute;z-index:2;width:44px;height:44px;transform:translate(-50%,-50%);border:2px solid #a7cafa;border-radius:50%;box-shadow:0 0 0 4px #a7cafa22;pointer-events:none}.exp-key{position:absolute;bottom:10px;left:10px;right:10px;font-size:11px;color:#91a2ba;text-align:center;pointer-events:none}
.exp-setup{flex:none;padding:8px 14px 20px;background:#1c232e}.exp-presets{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:20px}.exp-setup .exp-presets{position:sticky;top:-8px;z-index:1;margin:-8px -14px 14px;padding:8px 14px 8px;background:inherit}.exp-presets button{font-size:12px;color:#b9d0ee;background:#293950}
.exp-setup fieldset{border:0;margin:0 0 18px;padding:0}.exp-setup legend{font-size:11px;letter-spacing:.7px;color:#8497b2;margin-bottom:8px}.exp-params{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 16px}.exp-params label{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0;font-size:12px}.exp-params small{color:#7f91aa;font-size:11px;white-space:nowrap}.exp-params input,.exp-params select,.exp-speed{font:inherit;color:#d5e2f4;background:#293342;border:1px solid #ffffff0d;border-radius:8px;padding:6px;min-width:0}.exp-params input{width:88px;flex:none;text-align:right}.exp-params select{max-width:125px}.exp-setup .exp-params label:has(select){grid-column:1/-1}
.exp-transport{display:flex;align-items:center;gap:4px;padding:7px 9px;min-height:50px;flex:none;position:sticky;bottom:0;z-index:3;background:#191e26}.exp-transport>button{padding:7px;width:33px;height:33px;display:grid;place-items:center;flex:none}.exp-transport svg{width:18px;height:18px}.exp-time{flex:1;min-width:20px;width:0;accent-color:#8ab9ff;cursor:pointer}.exp-clock{font-size:11px;min-width:51px;text-align:right;font-variant-numeric:tabular-nums;color:#a8b9d0}.exp-speed{border:0;background:transparent;width:48px;padding:4px;font-size:11px}
.exp-graph-status{font-size:11px;color:#91a2ba;margin:0 5px 8px}.exp-graph-status:empty{display:none}.exp-note{margin:0;padding:0 14px 7px;color:#9faec3;font-size:11px;flex:none}.exp-note:empty{display:none}.exp-equations,.exp-closeup-equation{flex:none;padding:8px 14px}.exp-equation{font-size:13px;color:#d4e2f7;overflow-x:auto;overflow-y:hidden;min-height:0;scrollbar-width:thin}.exp-equation .katex-display{margin:.55em 0}.exp-graph-panel{flex:none;padding:8px 8px 14px;position:relative;isolation:isolate;z-index:0}.exp-graph-choices{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:8px}.exp-graph-choices button{font-size:11px;padding:6px 9px}.exp-graphs{display:grid;gap:10px}.exp-graphs section{height:170px;min-width:0;background:#161b23;border-radius:12px;overflow:hidden}.exp-graphs .exp-custom-graph{display:grid;grid-template-rows:28px minmax(0,1fr)}.exp-custom-title{font:12px/26px system-ui,sans-serif;color:#c5cfdb;padding:0 14px 0 42px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.exp-graphs canvas{width:100%;height:100%;display:block}
/* Setup docks below the stage and scrolls inside its own area: the stage keeps at least 55% of the pane (45% on a narrow screen), so every change is seen live. */
.exp-shell.is-setup-open>.exp-setup{flex:0 1 auto;max-height:calc(45% - 140px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.exp-shell.is-setup-open>.exp-scene{flex:1 1 0!important;min-height:55%!important}
/* The apparatus fills whatever the pane has spare, so the transport sits at the pane bottom in every lab; labs may size the scene inline but never stop it growing. */
.exp-shell>.exp-scene{flex-grow:1!important;max-height:none!important}.exp-shell>.exp-transport{margin-top:auto}
@media(max-width:900px){
 .exp-shell.is-setup-open>.exp-setup{max-height:calc(55% - 140px)}.exp-shell.is-setup-open>.exp-scene{min-height:45%!important}
 .teacher.tv-experiment-thread:not(.tv-paged).visual-open:not(.visual-expanded),.teacher.tv-experiment-thread.tv-side-open:not(.tv-paged).visual-open:not(.visual-expanded){grid-template-columns:0 minmax(0,1fr) 0}
 .exp-gallery{padding:25px 18px 50px}.exp-grid{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}.exp-gallery-head{margin-bottom:30px}.exp-method{display:none}.exp-tools{padding:8px;gap:4px}.exp-tools button{padding:6px 9px;font-size:12px}.exp-scene{flex-basis:340px}.exp-shell.is-graphs-open .exp-scene{flex:0 0 280px;min-height:280px}.exp-params{grid-template-columns:1fr}.exp-shell .exp-scene.is-closeup{min-height:280px}.exp-closeup-equation{font-size:11px}.exp-back span{display:none}.exp-back{padding:7px 10px;white-space:nowrap}
}
/* Gallery controls (wave 2): subject jump row, filter, section counts. Shared by Kinema and the Labs site. */
.exp-gallery-body{overflow-anchor:none}.exp-gallery-body [hidden]{display:none!important}
.exp-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.exp-controls{position:sticky;top:0;z-index:5;display:flex;align-items:center;gap:14px;margin:0 -32px 26px;padding:12px 32px 14px;background:linear-gradient(var(--exp-bg,var(--tv-base,#14181f)) 80%,transparent)}
.exp-chips{display:flex;gap:6px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none;mask-image:linear-gradient(90deg,#000 94%,transparent)}.exp-chips::-webkit-scrollbar{display:none}
.exp-chip{flex:none;font:inherit;font-size:12px;color:#a9b6c8;background:#ffffff08;border:0;border-radius:16px;padding:6px 12px;cursor:pointer;white-space:nowrap}.exp-chip:hover{background:#ffffff12;color:#d4deec}.exp-chip small{margin-left:7px;color:#6f8099;font-size:11px}.exp-chip.is-empty{opacity:.35}.exp-chip:focus-visible{outline:2px solid #8ab9ff;outline-offset:2px}
.exp-filter{position:relative;flex:none;width:210px}.exp-filter input{width:100%;font:inherit;font-size:13px;color:#d8dfe9;background:#ffffff08;border:1px solid #ffffff0d;border-radius:16px;padding:7px 30px 7px 13px;min-height:32px}.exp-filter input::placeholder{color:#6f8099}.exp-filter input:focus-visible{outline:2px solid #8ab9ff;outline-offset:1px}
.exp-filter input::-webkit-search-cancel-button{display:none}.exp-filter-clear{position:absolute;right:5px;top:50%;transform:translateY(-50%);border:0;background:none;color:#8e9caf;font-size:18px;line-height:1;cursor:pointer;padding:2px 7px}
.exp-group{scroll-margin-top:70px}.exp-group h2 small{margin-left:10px;font-size:11px;letter-spacing:.4px;text-transform:none;color:#6f8099}
.exp-empty{color:#8e9caf;font-size:14px;margin:40px 0;text-align:center}
@media(max-width:900px){
 .exp-controls{flex-wrap:wrap;gap:8px;margin:0 -18px 20px;padding:10px 18px 12px}.exp-chips{flex:1 1 100%;order:2}.exp-filter{flex:1 1 100%;width:auto;order:1}.exp-group{scroll-margin-top:104px}
}

/* Contain live math reflow within the artifact, preserving its intrinsic height. */
.exp-equations,.exp-closeup-equation{contain:layout style}
.exp-equation{contain:layout style paint}
@media(prefers-reduced-motion:reduce){.exp-card{transition:none}}

/* ── Simulations page (Kinema). One page for the lab gallery and custom builds; follows Chapters: .pg-col column, h1.pg-h, .pp2-ch cards.
   Scoped to .teacher so the standalone Kinema Labs site keeps its own look. ──────────────────────────────────────────────── */
.teacher .exp-gallery{max-width:none;margin:0;padding:0;color:inherit}
.teacher .pg-col.sim-page{max-width:1240px}
.sim-page .pg-note{margin:2px 0 24px}
.sim-build{display:flex;flex-direction:column;gap:12px;padding:20px 22px;border-radius:20px;background:#ffffff04;transition:background .15s}
.sim-build:hover,.sim-build:focus-within{background:#ffffff09}
.sim-kicker{font-size:11px;letter-spacing:.1em;line-height:1.5;color:#aaa}
.sim-ask{display:flex;align-items:flex-end;gap:10px;padding:7px 7px 7px 18px;border-radius:22px;background:var(--ui-control-fill,#ffffff08);border:1px solid var(--ui-control-border,#ffffff14);transition:border-color .15s}
.sim-ask:focus-within{border-color:#ffffff30}
.sim-ask textarea{flex:1;min-width:0;min-height:28px;max-height:150px;margin:0;padding:5px 0;border:0;outline:0;resize:none;background:transparent;color:var(--tv-ink,#eee);font:inherit;font-size:15px;line-height:1.5}
.teacher .sim-ask textarea,.teacher .sim-ask textarea:focus,.teacher .sim-ask textarea:focus-visible{outline:0!important;box-shadow:none!important;border:0!important;background:transparent!important}
.sim-ask textarea::placeholder{color:#8a8a8a}
.sim-ask textarea:disabled{opacity:.6}
.sim-ask button{flex:none;display:grid;place-items:center;width:34px;height:34px;padding:0;border:0;border-radius:50%;background:#e9e9e9;color:#1b1b1b;cursor:pointer;transition:background .15s}
.sim-ask button:hover{background:#fff}.sim-ask button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.sim-ask button:focus-visible,.sim-resume:focus-visible,.exp-empty-clear:focus-visible,.sim-state button:focus-visible{outline:2px solid #a7cafa;outline-offset:2px}
.sim-build-note{display:flex;align-items:center;justify-content:space-between;gap:6px 14px;flex-wrap:wrap;margin:0;font-size:12px;line-height:1.5;color:#929292}
.sim-resume,.exp-empty-clear,.sim-state button{font:inherit;font-size:12px;color:#c9c9c9;background:var(--ui-control-fill,#ffffff08);border:0;border-radius:var(--ui-radius-pill,999px);padding:6px 13px;cursor:pointer}
.sim-resume:hover,.exp-empty-clear:hover,.sim-state button:hover{background:var(--ui-control-hover,#ffffff10);color:#eee}
.sim-resume[hidden]{display:none}
/* Controls: chips wrap (never clipped), the filter is a pill, nothing sticks to the top. */
.sim-page .exp-controls{position:static;flex-wrap:wrap;align-items:flex-start;gap:12px 16px;margin:26px 0 20px;padding:0;background:none}
.sim-page .exp-chips{flex:1 1 380px;flex-wrap:wrap;gap:8px;overflow:visible;mask-image:none}
.sim-page .exp-chip{font-size:12.5px;color:#c4c4c4;background:var(--ui-control-fill,#ffffff08);border-radius:var(--ui-radius-pill,999px);padding:7px 13px;transition:background .15s}
.sim-page .exp-chip:hover{background:var(--ui-control-hover,#ffffff10);color:#eee}.sim-page .exp-chip small{color:#8a8a8a}.sim-page .exp-chip:focus-visible{outline-color:#a7cafa}
.sim-page .exp-filter{flex:0 0 240px;width:240px}
.sim-page .exp-filter input{font-size:13px;color:var(--tv-ink,#eee);background:var(--ui-control-fill,#ffffff08);border:1px solid var(--ui-control-border,#ffffff14);border-radius:var(--ui-radius-pill,999px);padding:8px 32px 8px 15px;min-height:36px}
.sim-page .exp-filter input::placeholder{color:#8a8a8a}.sim-page .exp-filter input:focus-visible{outline:0;border-color:#ffffff30}
.sim-page .exp-filter-clear{color:#a6a6a6}.sim-page .exp-filter-clear:hover{color:#eee}
/* Sections and cards: the Chapters card family. */
.sim-page .exp-group{margin-bottom:30px;scroll-margin-top:12px}
.sim-page .exp-group h2{display:flex;align-items:baseline;gap:10px;font-size:11px;font-weight:500;letter-spacing:.1em;color:#aaa;margin:0 0 12px}
.sim-page .exp-group h2 small{margin:0;color:#7c7c7c;font-size:11px;letter-spacing:0}
.sim-page .exp-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr));gap:14px}
.sim-page .exp-card{gap:0;padding:20px 22px;background:#ffffff04;border:0;border-radius:20px;transition:background .15s}
.sim-page .exp-card:hover{background:#ffffff09;transform:none}.sim-page .exp-card:focus-visible{outline-color:#a7cafa}
.sim-page .exp-thumb{height:132px;margin:0 0 16px;border-radius:12px;background:#ffffff05;overflow:hidden}
.sim-page .exp-card h3{font-size:16px;font-weight:500;line-height:1.4;letter-spacing:-.012em;color:#eee;margin:0 0 6px}
.sim-page .exp-card p{font-size:12.5px;line-height:1.55;color:#a8a8a8;margin:0 0 16px}
.sim-page .exp-card>span{font-size:11px;color:#b3c4df}
/* Loading, empty filter and error states in the page style. */
.sim-state{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:6px 0;padding:22px;border-radius:20px;background:#ffffff04;color:#a8a8a8;font-size:13px;line-height:1.5}
.sim-state p{margin:0}.sim-state[role=alert]{color:#e0b4b4}
.sim-page .exp-empty{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:6px 0;padding:34px 22px;border-radius:20px;background:#ffffff04;color:#a8a8a8;font-size:14px}
.sim-page .exp-empty[hidden]{display:none}
.exp-setup-edit{margin:4px 0 12px}
@media(max-width:900px){
 .teacher .exp-gallery{padding:0}
 .sim-page .exp-controls{flex-direction:column;align-items:stretch;gap:12px;margin:22px 0 18px;padding:0}
 .sim-page .exp-filter{order:1;flex:none;width:100%}.sim-page .exp-chips{order:2;flex:none}
}
@media(max-width:560px){
 .sim-build{padding:16px}.sim-ask{padding-left:14px}
 .sim-page .exp-controls,.sim-page .sim-body{min-width:0;max-width:100%}
 .sim-page .exp-chips{width:100%;max-width:100%;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;mask-image:linear-gradient(90deg,#000 92%,transparent)}.sim-page .exp-chips::-webkit-scrollbar{display:none}
 .sim-page .exp-card{padding:16px}.sim-page .exp-thumb{height:120px}
}
/* ── One lab layout: the experiment and custom-build panes share Kinema's neutral surface, controls and width. ──────────────── */
.teacher .exp-shell{background:var(--tv-base,#1b1b1b);color:var(--tv-ink,#e4e4e4);scrollbar-color:#ffffff22 transparent}
.teacher .exp-tools,.teacher .exp-transport{background:var(--tv-base,#1b1b1b)}
.teacher .exp-scene{background:radial-gradient(ellipse at 50% 53%,#ffffff09,transparent 72%)}
.teacher .exp-shell button,.teacher .sim-lab-viewer .exp-tools button,.teacher .sim-lab-viewer .exp-setup button{color:#cfcfcf;background:var(--ui-control-fill,#ffffff08)}
.teacher .exp-shell button:hover,.teacher .sim-lab-viewer .exp-tools button:hover,.teacher .sim-lab-viewer .exp-setup button:hover{background:var(--ui-control-hover,#ffffff10)}
.teacher .exp-shell button[aria-pressed=true],.teacher .exp-shell button[aria-expanded=true],.teacher .sim-lab-viewer .exp-tools button[aria-expanded=true]{color:#a7cafa;background:#a7cafa1a}
.teacher .exp-shell button:focus-visible,.teacher .exp-shell input:focus-visible,.teacher .exp-shell select:focus-visible,.teacher .sim-lab-viewer .exp-tools button:focus-visible,.teacher .sim-lab-viewer .exp-setup :focus-visible{outline:2px solid #a7cafa;outline-offset:2px}
.teacher .exp-setup{background:#ffffff05}
.teacher .exp-setup legend{color:#9a9a9a}.teacher .exp-params small,.teacher .exp-setup legend small{color:#868686}
.teacher .exp-params input,.teacher .exp-params select,.teacher .exp-speed{color:#e4e4e4;background:var(--ui-control-fill,#ffffff08);border-color:var(--ui-control-border,#ffffff14)}
.teacher .exp-presets button{color:#d0d0d0;background:var(--ui-control-fill,#ffffff08)}
.teacher .exp-closeups button{color:#d0d0d0;background:#ffffff12}
.teacher .exp-graphs section{background:#ffffff05}
.teacher .exp-method,.teacher .exp-key,.teacher .exp-note,.teacher .exp-graph-status,.teacher .exp-clock{color:#9a9a9a}
.teacher .exp-equation{color:#e4e4e4}

@media(max-width:900px){.exp-setup .exp-presets{flex-wrap:wrap;overflow-x:visible}.exp-setup .exp-presets button{flex:none}}

.exp-scene-legend{flex:none;height:34px;position:relative}.exp-scene-legend canvas{display:block;width:100%;height:100%}.exp-hl{box-shadow:none}
.exp-shell:not(.is-graphs-open):not(.is-setup-open)>.exp-scene{flex:1 1 0!important;min-height:0!important}

@media(max-width:900px){.exp-shell.is-graphs-open>.exp-scene{flex:0 0 56%!important;min-height:0!important}}

/* Wrapped phone presets scroll with Setup so they cannot cover its fields. */
.teacher .exp-setup .exp-presets{background:#1c1c1c}
@media(max-width:900px){.exp-setup .exp-presets{position:relative;top:0}}

/* One shared zoom label keeps names compact without changing accessible labels. */
.exp-closeups::before{content:"Zoom";align-self:center;color:#8998ac;font-size:11px;margin-right:2px}
@media(max-width:440px){.exp-closeups{gap:5px;padding-inline:8px}.exp-closeups button{font-size:11px;padding:5px 8px}}
.exp-companion{flex:1 0 185px;min-height:185px;margin:2px 8px 8px;background:#161b23;border-radius:12px;overflow:hidden}
.exp-companion canvas{display:block;width:100%;height:100%}
.teacher .exp-companion{background:#ffffff05}

.exp-shell.is-breakdown-open{overflow:hidden!important}.exp-shell.is-breakdown-open>.exp-equations{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:thin}.exp-shell.is-breakdown-open>.exp-transport{margin-top:0}.exp-shell.is-breakdown-open>.exp-closeup-equation{max-height:80px;overflow:auto}

.exp-shell.is-breakdown-open:not(.is-graphs-open):not(.is-setup-open)>.exp-scene{height:var(--exp-breakdown-scene);min-height:var(--exp-breakdown-scene)!important;flex:0 0 var(--exp-breakdown-scene)!important;max-height:none!important}

/* Preserve authored EMS close-up height against the default flexible scene. */
.exp-shell:not(.is-breakdown-open)>.exp-scene.ems-closeup.is-closeup{flex:0 0 var(--ems-closeup-height,380px)!important;min-height:var(--ems-closeup-height,380px)!important}
/* Leave a gap below the caption, and soften the clipped edge as a scroll cue. */
.exp-shell.is-breakdown-open>.exp-equations{margin-top:8px;padding-top:16px;padding-bottom:24px;mask-image:linear-gradient(to bottom,#000 0,#000 calc(100% - 20px),transparent 100%)}

/* Scene first; direct controls stay visible without opening the settings sheet. */
.exp-lab-header{display:flex;align-items:center;gap:8px;flex:none;padding:7px 12px;background:#191e26}
.exp-scenario{min-width:0;flex:1}.exp-scenario select{width:100%;max-width:340px;font:inherit;font-size:12px;color:#d1ddec;background:#ffffff08;border:0;border-radius:12px;padding:7px 9px;text-overflow:ellipsis}
.exp-view-switch{display:flex;flex:none;gap:2px;background:#ffffff05;border-radius:14px;padding:2px}.exp-view-switch button{font-size:11px;padding:3px 9px;min-height:26px}
.exp-control-strip{display:flex;align-items:center;gap:10px;flex:none;flex-wrap:wrap;padding:10px 12px;background:#ffffff03}
.exp-main-control{flex:1 1 105px;min-width:0;display:flex;flex-direction:column;gap:4px;font-size:11px;color:#aabbd2;border-radius:8px}
.exp-main-control>span{display:flex;gap:7px;justify-content:space-between;white-space:nowrap}.exp-main-control output{color:#b9d4fa;font-variant-numeric:tabular-nums}
.exp-main-control input[type=range]{width:100%;height:20px;margin:0;accent-color:#8ab9ff;cursor:ew-resize}.exp-main-control select{width:100%;font:inherit;font-size:11px;color:#c6d5ea;border:0;border-radius:8px;background:#ffffff09;padding:5px}
.exp-control-strip>[data-exp=setup]{font-size:11px;padding:6px 9px;margin-left:auto}.exp-state-chips{display:flex;flex:1 1 130px;gap:7px}.exp-state-chips .exp-main-control{flex:1 1 32px}.exp-state-chips .exp-main-control output{display:none}
.exp-live-overlay{position:absolute;inset:0;pointer-events:none;z-index:4}.exp-caption{position:absolute;top:12px;left:14px;right:110px;margin:0;font-size:12px;line-height:1.45;color:#c5d3e6}
.exp-show-wrap{position:absolute;right:10px;top:6px;display:flex;align-items:center;gap:5px;pointer-events:auto}.exp-show-wrap button{font-size:11px;min-height:28px;padding:4px 10px}.exp-info{font-size:13px;color:#8596af;cursor:help}
.exp-layer-menu{position:absolute;right:0;top:36px;min-width:175px;padding:9px;background:#212a38f5;border:1px solid #ffffff13;box-shadow:0 12px 35px #0008;border-radius:13px;display:grid;gap:2px}.exp-layer-menu label{display:flex;align-items:center;gap:8px;font-size:12px;min-height:31px;white-space:nowrap}.exp-layer-menu input{accent-color:#8ab9ff}
.exp-readouts{position:absolute;left:14px;bottom:13px;display:flex;gap:16px;flex-wrap:wrap;color:#8da0bb;font-size:11px}.exp-readouts b{color:#c5d9f3;font-weight:450;margin-left:4px;font-variant-numeric:tabular-nums}.exp-drag-hint{position:absolute;left:14px;bottom:40px;margin:0;font-size:11px;color:#8da0bb}
.exp-tutor-toast{position:absolute;left:12px;right:12px;top:49px;display:flex;gap:8px;align-items:center;padding:8px 11px;border:1px solid #87b8ff35;border-radius:12px;background:#17273af2;color:#cce0ff;font-size:11px;pointer-events:auto;box-shadow:0 6px 22px #0005}.exp-tutor-toast span{flex:1;min-width:0}.exp-tutor-toast button{min-height:26px;font-size:11px;padding:3px 9px}
.exp-shell>.exp-tools{position:static;order:initial;overflow:visible;flex-wrap:wrap;background:none;padding:7px 10px;gap:5px}.exp-shell>.exp-tools button{font-size:11px;min-height:28px;padding:5px 9px}.exp-closer-label{font-size:11px;color:#8092ad;margin-left:auto}.exp-tools .exp-closeups{margin:0;padding:0;gap:4px}.exp-tools .exp-closeups:before{display:none}.exp-tools .exp-zoom-back{position:static;margin:0}.exp-shell>.exp-transport{margin-top:0;position:static;flex:none}.exp-shell>.exp-scene{min-height:280px;flex-basis:320px}.exp-shell.hero3d-shell:not(.is-breakdown-open):not(.is-graphs-open):not(.is-setup-open)>.exp-scene{flex:1 1 320px!important;min-height:280px!important}
.exp-knob-pulse{animation:exp-knob-pulse .85s ease-out}@keyframes exp-knob-pulse{0%{box-shadow:0 0 0 4px #82b5ff55;background:#82b5ff28}100%{box-shadow:0 0 0 0 transparent}}
@media(max-width:440px){.exp-lab-header{padding:6px 8px;gap:5px}.exp-control-strip{gap:7px;padding:8px}.exp-main-control{flex-basis:100px}.exp-main-control>span{white-space:normal}.exp-caption{font-size:11px;left:10px;right:96px}.exp-readouts{left:10px;gap:10px}.exp-drag-hint{left:10px}.exp-closer-label{margin-left:0}.exp-shell>.exp-tools{padding:5px 8px}.exp-shell>.exp-scene{min-height:280px}.exp-state-chips{flex-basis:120px}}

.exp-main-control>span{white-space:normal;flex-wrap:wrap;column-gap:5px;row-gap:0}.exp-main-control output{margin-left:auto}
.hero3d-orbits .hero3d-budget{bottom:68px;right:14px}

/* Keep each label/value together and let the secondary group wrap inside the card. */
.exp-main-control{flex-basis:max-content;min-width:min(100%,110px)}.exp-main-control>span{flex-wrap:wrap;white-space:normal}.exp-main-control output{white-space:nowrap}.exp-tools .exp-closeups{flex:1 1 150px;min-width:0;max-width:100%;justify-content:flex-start;flex-wrap:wrap}.exp-tools .exp-closeups button{max-width:100%;white-space:normal;overflow-wrap:anywhere}.exp-main-control[title]{cursor:help}
.exp-state-chips .exp-main-control{min-width:0;flex-basis:32px}

/* The setup, view and Show choices form one compact header. Captions never paint a band. */
.exp-lab-header{gap:10px;background:transparent;align-items:center;position:relative;z-index:6;flex-wrap:wrap}
.exp-lab-header .exp-scenario{flex:1 1 160px}.exp-scenario .choice-trigger{width:100%;max-width:340px}
.exp-lab-header .exp-show-wrap{position:relative;inset:auto;flex:none;margin-left:auto;z-index:9}
.exp-lab-header .exp-layer-menu{z-index:10;max-height:360px;overflow:auto}
.exp-shell>.exp-caption{position:static;inset:auto;margin:0;padding:0 14px 8px;font-size:12px;line-height:1.45;background:none!important;color:#b6c3d5;flex:none;max-width:100%!important}
.exp-meaning-key{flex:none;padding:7px 14px;color:#b9c8dd;font-size:11px;line-height:1.55;overflow-wrap:anywhere;background:transparent;max-width:100%}
.exp-main-control .choice-trigger{width:100%;font-size:12px;min-height:32px;padding:5px 10px}
.exp-transport>.choice-trigger{flex:none;width:auto;min-width:58px;min-height:30px;font-size:11px;padding:4px 8px;gap:4px}
.exp-params .choice-trigger{max-width:60%;font-size:12px}
.exp-shell>.exp-meaning-key[hidden],.exp-shell>.exp-caption[hidden]{display:none!important}

/* Keep captions out of the portal's exposed margin; preserve layout while a menu is open. */
.exp-shell:has(.choice-trigger[aria-expanded="true"]) > .exp-caption{visibility:hidden}
.exp-explore-panel{flex:none;border:1px solid #263748;border-radius:10px;padding:7px 10px;margin:4px 8px;background:#111a24;color:#d9e3ed}
.exp-learning-switch,.exp-challenge-title,.exp-predictions,.exp-challenge-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.exp-learning-switch button,.exp-predictions button,.exp-challenge-actions button,.exp-challenge-title>button{font:inherit;font-size:12px;line-height:1.3;border:1px solid #334656;border-radius:7px;background:#172330;color:#cddbea;padding:5px 9px;cursor:pointer}
.exp-learning-switch button[aria-pressed=true],.exp-predictions button[aria-pressed=true]{background:#203f59;border-color:#669fc8;color:#fff}
.exp-challenge-body{margin-top:7px}.exp-challenge-title{flex-wrap:nowrap}.exp-challenge-title label{flex:1;min-width:0}.exp-challenge-title .choice-trigger{max-width:100%;font-size:12px;padding:5px 8px}.exp-challenge-title>button{white-space:nowrap}
.exp-challenge-prompt{font-size:13px;line-height:1.4;margin:7px 0}.exp-challenge-instruction{font-size:12px;color:#99adbf;margin:6px 0 0}.exp-challenge-actions{margin-top:6px}.exp-challenge-actions button:disabled{opacity:.4;cursor:default}
.exp-challenge-result{font-size:12px;line-height:1.45;margin:7px 0 1px;color:#c3d8e9}.exp-challenge-result strong{color:#b0ddff}
.exp-shell.is-challenge-loaded>.exp-control-strip,.exp-shell.is-challenge-loaded>.exp-transport{display:none}
.exp-challenge-observation{position:absolute;right:12px;bottom:12px;max-width:calc(100% - 24px);border:1px solid #72b9df;border-radius:8px;background:#0b1725ed;padding:7px 11px;z-index:6;pointer-events:none;box-shadow:0 0 0 3px #72b9df1a}
.exp-challenge-observation span{display:block;font-size:10px;color:#aac5dc}.exp-challenge-observation strong{font-size:13px;color:#dbf2ff}
.exp-more-heading{margin:35px 0 6px;font-size:22px;color:#acbfd2}.exp-guided-intro{color:#a0bed4;font-size:13px;margin:-5px 0 15px}

.exp-shell.is-challenge-mode>.exp-caption{display:none}

.exp-challenge-intervention{font-size:11px;color:#9fb7ca;line-height:1.35;margin:3px 0 6px}.exp-predictions button:disabled{cursor:default}

.exp-challenge-observation{top:12px;bottom:auto}.exp-challenge-observation[data-lab="rigid-rotation"],.exp-challenge-observation[data-lab="coupled-oscillators"]{top:auto;bottom:12px}

.exp-predictions,.exp-challenge-actions{display:inline-flex;vertical-align:middle;margin-top:0}.exp-predictions{margin-right:10px}.exp-challenge-actions{margin-top:4px}

.exp-predictions button.is-correct:disabled{border-color:#8ac1e8;background:#20394b;color:#e1f1ff;opacity:1;box-shadow:0 0 0 1px #8ac1e84d}
.exp-predictions button.is-wrong:disabled{background:#17212b;border-color:#34404c;color:#8997a4;opacity:1}
