:root {
  color-scheme: dark;
  --canvas: #162820;
  --panel: #192d25;
  --panel-deep: #13251e;
  --line: #385044;
  --muted: #c0cfc4;
  --text: #f2f1dc;
  --accent: #eac178;
  --ink: #202819;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--text);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, select, input, textarea { font: inherit; }
button, select, input[type="number"], textarea {
  color: var(--text);
  background: var(--panel-deep);
  border: 1px solid var(--line);
  border-radius: 7px;
}
button {
  cursor: pointer;
  padding: 0.56rem 0.8rem;
  font-size: 0.875rem;
  line-height: 1.3;
  white-space: nowrap;
}
button:hover:not(:disabled) { border-color: #b5bca1; }
button[aria-pressed="true"] { color: var(--accent); border-color: #bc9966; background: #354034; }
button:disabled { cursor: default; opacity: 0.48; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.primary { background: var(--accent); color: var(--ink); border-color: var(--accent); font-weight: 680; }
.danger { color: #f4b09e; }
.masthead {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 80px;
  padding: 0.7rem 1.15rem;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.identity { display: flex; gap: 0.8rem; align-items: center; }
.stamp {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #ba9b64;
  border-radius: 10px;
  background: #344236;
  color: var(--accent);
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 1.4rem;
  font-weight: 700;
}
h1, h2, p { margin: 0; }
.identity h1 { font-size: 1.33rem; letter-spacing: 0.12em; }
.identity p { margin-top: 0.12rem; color: var(--muted); font-size: 0.875rem; }
.modes, .files, .actions { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.modes { padding: 4px; background: var(--panel-deep); border: 1px solid var(--line); border-radius: 9px; }
.modes button { min-width: 4.7rem; border-color: transparent; }
.modes button[aria-pressed="true"] { border-color: #bc9966; }
.files { justify-content: flex-end; }
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(290px, 350px);
  padding: 0.85rem;
  gap: 0.85rem;
  align-items: start;
}
.stage {
  position: relative;
  height: clamp(400px, calc(100dvh - 150px), 1050px);
  overflow: hidden;
  border: 1px solid #4d6656;
  border-radius: 12px;
  background: #a9c7be;
}
#world { position: absolute; inset: 0; }
#world canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.stage .stow-confirm {
  position: absolute; top: 0; left: 0; z-index: 2;
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  border: 2px solid #efc5af; background: #532e27; color: #fff3e3;
  font-size: 27px; line-height: 1; box-shadow: 0 2px 7px #16282066;
}
.stage-top, .stage-bottom {
  position: absolute;
  z-index: 1;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem;
  pointer-events: none;
}
.stage-top { top: 0.75rem; }
.stage-bottom { bottom: 0.75rem; align-items: flex-end; }
.clock, .stage-tools, .cameras {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #53685a;
  padding: 0.35rem;
  border-radius: 10px;
  background: #152921f4;
  pointer-events: auto;
}
.clock { padding: 0.55rem 0.8rem; gap: 0.7rem; font-size: 0.9rem; }
.clock output { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 4.2em; }
#notice {
  position: absolute;
  left: 50%;
  bottom: 4.8rem;
  width: max-content;
  max-width: 85%;
  transform: translateX(-50%);
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  color: #f4e9cb;
  background: #1b2d25f5;
  font-size: 0.875rem;
  text-align: center;
}
.stage-help {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  padding: 0.65rem 0.2rem 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.stage-help b { padding: 0 0.2rem; color: var(--accent); }
.inspector {
  max-height: calc(100dvh - 107px);
  overflow: auto;
  display: grid;
  gap: 0.65rem;
  scrollbar-width: thin;
}
.panel {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.panel h2 { font-size: 1rem; margin-bottom: 0.7rem; letter-spacing: 0.05em; }
.hint { color: var(--muted); font-size: 0.875rem; line-height: 1.55; margin-top: 0.55rem; }
label { display: block; color: var(--muted); font-size: 0.875rem; }
label + select, label + textarea { margin: 0.27rem 0 0.45rem; }
select, textarea, input[type="number"] { width: 100%; padding: 0.4rem 0.5rem; min-width: 0; }
select { appearance: none; padding-right: 1.6rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23d3d9bd' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .55rem center; }
textarea { resize: vertical; }
.input-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; margin-bottom: 0.6rem; }
.input-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.input-grid input { margin-top: 0.22rem; }
.readings { display: grid; grid-template-columns: 1fr 1fr; margin: 0.3rem 0 0.65rem; gap: 1px; background: var(--line); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.readings > div { background: var(--panel-deep); padding: 0.42rem 0.5rem; min-width: 0; }
.readings dt { color: var(--muted); font-size: 0.875rem; }
.readings dd { margin: 0.12rem 0 0; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.readings.live dd { color: #f0ca85; }
#motion { margin-top: 0.8rem; }
#graph { width: 100%; height: auto; display: block; margin: 0.35rem 0 0.45rem; }
#record-panel { grid-row: 1; }
.check { display: flex; align-items: center; gap: 0.4rem; margin: 0.48rem 0 0.6rem; }
.check input { accent-color: var(--accent); }
#record-preview { width: 100%; margin-top: 0.65rem; border-radius: 6px; }
.lesson p { line-height: 1.6; }
@media (max-width: 900px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 280px; }
  .masthead { gap: 0.55rem; padding-inline: 0.85rem; }
  .stage-help { display: block; }
  .stage-help span { display: block; }
}
@media (max-width: 700px) {
  .masthead { grid-template-columns: 1fr auto; }
  .modes { grid-row: 2; grid-column: 1 / -1; justify-self: start; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .stage { height: min(67vh, 640px); min-height: 370px; }
  .inspector { max-height: none; overflow: visible; }
}
@media (max-width: 390px) {
  .stage-top, .stage-bottom { left: 0.3rem; right: 0.3rem; }
  .masthead button, .stage button { padding-inline: 0.52rem; }
}

.site-tools { margin-top: .55rem; }
.kit-hint, .nudge-help { font-size: .8rem; line-height: 1.55; color: var(--muted); }
#kits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .4rem; margin-block: .55rem; }
#kits button { text-align: left; white-space: normal; min-height: 44px; padding: .52rem .62rem; }
#kit-category { min-height: 44px; margin-bottom: .4rem; }
#kits button[aria-current="true"] { border-color: #bc9966; color: var(--accent); }
.inspector[data-mode="experiment"] .lesson { grid-row: 1; }
#kits small { display: block; margin-top: .24rem; color: var(--muted); font-size: .74rem; line-height: 1.35; }
.custom-setup { padding-block: .4rem; font-size: .85rem; }
.custom-setup summary { color: var(--muted); cursor: pointer; }
.custom-setup[open] summary { margin-bottom: .5rem; }
.nudge-help { margin: .1rem 0 .65rem; }
.nudge-help button { margin-right: .4rem; padding: .25rem .45rem; font-size: .79rem; }
#restitution-label, #friction-label { margin-bottom: .65rem; }
#restitution, #edit-friction { margin-top: .2rem; }
#map-dialog {
  color: var(--text);
  background: var(--panel);
  width: min(680px, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 1.5rem);
  padding: 0.95rem;
  border: 1px solid #536b58;
  border-radius: 12px;
}
#map-dialog::backdrop { background: #0d1b17ba; }
#thruster-dialog {
  color: var(--text); background: var(--panel); border: 1px solid #536b58; border-radius: 12px;
  width: min(700px, calc(100vw - 1.25rem)); max-height: calc(100dvh - 1.25rem);
  padding: clamp(.85rem, 2vw, 1.3rem); overflow: auto; overscroll-behavior: contain;
}
#thruster-dialog::backdrop { background: #0b1b16c9; }
.thruster-heading { display: flex; gap: .65rem; align-items: baseline; flex-wrap: wrap; margin-bottom: .8rem; }
.thruster-heading h2 { margin: 0; font-size: 1.3rem; }
#thruster-body { color: var(--accent); overflow-wrap: anywhere; }
.thruster-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(170px, 1fr); gap: 1rem; }
#thruster-view { height: clamp(180px, 32dvh, 270px); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-deep); touch-action: none; }
#thruster-view canvas { width: 100%; height: 100%; display: block; }
.thruster-layout label { display: block; }
.thruster-layout input[type="number"], .thruster-layout select { width: 100%; margin-top: .2rem; }
.thruster-fields > label + label { margin-top: .65rem; }
.thruster-layout .check { display: flex; align-items: center; gap: .4rem; }
.thruster-layout .hint { margin: .4rem 0 .75rem; }
.thruster-actions { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; margin-top: 1rem; }
#remove-thruster { margin-right: auto; }
#mount-thrust, #edit-thruster { margin: .45rem 0; }
@media (pointer: coarse) {
  #thruster-dialog button, #thruster-dialog select, #thruster-dialog input[type="number"], #thruster-dialog .check { min-height: 44px; }
}
@media (max-width: 520px) {
  .thruster-layout { grid-template-columns: minmax(0, 1fr); }
  .thruster-actions { flex-wrap: wrap; }
}
.map-heading { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .7rem; }
.map-key { display: flex; gap: 1rem; margin: .15rem 0 .55rem; font-size: .8rem; color: var(--muted); }
.map-key span::before { content: ""; display: inline-block; width: .55rem; height: .55rem; margin-right: .3rem; border-radius: 50%; background: #fff8df; }
.map-key span:nth-child(2)::before { background: #613f22; }
.map-key span:nth-child(3)::before { background: #b44b2d; }
#region-map { display: block; width: 100%; max-height: min(64vh, 540px); object-fit: contain; background: #192a20; cursor: crosshair; border: 1px solid #667d63; border-radius: 8px; margin-bottom: .65rem; }
#map-dialog .actions { margin-top: .65rem; }
@media (max-width: 1040px) { .masthead { grid-template-columns: minmax(130px, 1fr) auto minmax(190px, 1fr); } }
@media (max-width: 700px) { .masthead { grid-template-columns: minmax(128px, 1fr) minmax(150px, 1fr); } }

/* The guided bench keeps the countryside and the current question side by side. */
.workspace-switch { white-space:nowrap; margin-left:auto; }
body[data-guided="true"] :is(.modes,.files,.cameras,.stage-bottom,.stage-help,#build-panel,.instrument,#lesson-panel) { display:none; }
body[data-guided="false"] #guide-panel { display:none; }
body[data-guided="true"] .clock { display:none; }
#guide-panel { padding:20px; }
#guide-title { font-size:1.45rem; margin:1.15rem 0 .55rem; }
#guide-task,#explain-label { line-height:1.65; }
#predictions { margin:1rem 0; padding:0; border:0; display:grid; gap:.4rem; }
#predictions legend { font-weight:650; margin-bottom:.45rem; }
#predictions label { display:flex; gap:.55rem; align-items:center; margin:0; padding:.42rem .55rem; border:1px solid #526a59; border-radius:.35rem; cursor:pointer; }
#predictions input { width:auto; margin:0; }
#predictions label:has(input:checked) { background:#285d50; color:white; }
#guide-status { font-size:.9rem; }
#guide-readings { font-variant-numeric:tabular-nums; }
#explain-step { border-top:1px solid #71887360; padding-top:.7rem; }
#equipment-drawer,#meters { margin-bottom:1rem; }
#stopwatch { margin-bottom:1rem; }
#stopwatch summary { cursor:pointer; font-weight:600; padding:.4rem 0; }
#stopwatch output { display:block; margin:.3rem 0 .6rem; font-size:1.7rem; font-variant-numeric:tabular-nums; }
#stopwatch .actions { flex-wrap:wrap; }
#stopwatch table { width:100%; border-collapse:collapse; font-variant-numeric:tabular-nums; }
#stopwatch th,#stopwatch td { text-align:right; padding:.25rem .4rem; border-bottom:1px solid var(--line); }
#stopwatch th:first-child,#stopwatch td:first-child { text-align:left; }
@media (any-pointer:coarse) { #stopwatch button,#stopwatch summary { min-height:44px; } }
#equipment-drawer summary,#meters summary { cursor:pointer; padding:.4rem 0; font-weight:600; }
#equipment-drawer details summary { font-size:.92rem; }
.shelf { flex-wrap:wrap; }
@media(max-width:700px){body[data-guided="true"] .workspace {display:flex;flex-direction:column;} body[data-guided="true"] .stage {min-height:250px;height:42vh;} body[data-guided="true"] .inspector {overflow:visible;} }

.masthead { grid-template-columns:minmax(130px,1fr) auto auto minmax(190px,1fr); }
body[data-guided="true"] .masthead { grid-template-columns:1fr auto; }
@media(max-width:850px) {
  body[data-guided="false"] .masthead { grid-template-columns:1fr auto; }
  body[data-guided="false"] .modes { grid-row:2; grid-column:1; justify-self:start; }
  body[data-guided="false"] .files { grid-row:2; grid-column:2; }
}
@media(max-width:700px) {
  body[data-guided="true"] .workspace { display:grid; }
  body[data-guided="true"] .stage-column, body[data-guided="true"] .inspector { min-width:0; width:100%; }
  body[data-guided="false"] .files { grid-row:3; grid-column:1/-1; justify-content:start; }
}

#third-law { margin:.7rem 0; padding:.65rem; border:1px solid var(--line); border-radius:7px; }
#third-law figcaption { font-weight:650; }
.force-pair { display:flex; margin:.45rem 0; justify-content:center; }
.force-pair span { min-width:4rem; text-align:center; color:#eec6a1; font-size:1.8rem; line-height:1; }
.force-pair span+span { color:#9ee1df; }
.force-pair b { font-size:.82rem; }
#third-law p,#cradle-reading { line-height:1.5; font-size:.9rem; }
#cradle-scale { width:100%; accent-color:var(--accent); }
#cradle-controls { padding-bottom:.6rem; margin-bottom:.7rem; border-bottom:1px solid var(--line); }
#cradle-controls h3 { margin:.6rem 0; font-size:1rem; }

body[data-guided="true"] #cradle-controls { display:none; }
#cradle-controls { display:flex; align-items:center; gap:.65rem; flex-wrap:wrap; padding:.5rem 0; margin:0; }
#cradle-controls h3,#cradle-controls p { margin:0; }
#scale-meter { display:flex; align-items:center; gap:.65rem; flex-wrap:wrap; padding:.5rem .75rem; background:var(--panel-deep); border-bottom:1px solid var(--line); }
#scale-meter label { margin:0; font-weight:600; }
#scale-meter select { width:auto; max-width:50%; }
#scale-mass { font:600 1.1rem ui-monospace,monospace; color:#bfe9bf; }
#weighing-tools button, #weighing-tools select { min-height:44px; }

.workspace-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:.4rem; }
html[lang="en"] .stage-tools,html[lang="en"] .cameras { flex-wrap:wrap; max-width:100%; }
html[lang="en"] .inspector button { white-space:normal; }
@media(max-width:700px){ html[lang="en"] .masthead { gap:.45rem; } .workspace-actions { gap:.25rem; } }

#walk-controls > .hint { margin:.4rem 0 .7rem; }
#walk-controls > input { width:6rem; }
.field-walk-pad { position:absolute; z-index:2; left:max(.8rem,env(safe-area-inset-left)); bottom:.8rem; display:grid; grid-template-columns:repeat(3,46px); gap:4px; pointer-events:none; }
.field-walk-pad button { pointer-events:auto; touch-action:none; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; background:#172d25ed; color:#fff4d7; padding:0; width:46px; height:46px; font-size:1.25rem; }
.field-walk-pad button:active,.field-walk-pad button.pressed { background:#48664e; }
body[data-guided="false"] .field-walk-pad { bottom:clamp(7.2rem,18%,9rem); }
.field-walk-pad [data-walk-key="KeyW"] { grid-column:2; }
.field-walk-pad [data-walk-key="KeyA"] { grid-column:1; }
.field-walk-pad .pad-run { grid-area:1/1; }
.field-walk-pad .pad-jump { grid-area:1/3; }
.field-walk-pad [data-walk-key="KeyW"] { grid-row:1; }
.field-walk-pad :is(.pad-run,.pad-jump) { font-size:.92rem; }
.field-walk-pad .pad-run[aria-pressed="true"] { background:#48664e; box-shadow:inset 0 0 0 2px #dbc88d; }
body[data-guided="true"][data-practice="true"] .cameras { display:flex; margin-left:auto; }
body[data-guided="true"][data-practice="true"] .cameras :not([data-zoom]) { display:none; }
.cameras { flex-wrap:wrap; max-width:100%; }
#nudge-pad { margin-bottom:.7rem; }
#nudge-pad summary { padding:.4rem 0; cursor:pointer; }
#nudge-pad label { display:flex; gap:.5rem; align-items:center; }
#nudge-step { width:auto; }
.nudge-buttons { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.3rem; margin:.4rem 0; }
@media (any-pointer:coarse) {
  .cameras [data-zoom],.nudge-buttons button { min-width:44px; min-height:44px; }
}

.guide-variants { display:flex; margin:.7rem 0; gap:.3rem; }
.guide-variants button { flex:1; }
body[data-practice="true"] :is(#guide-task,#predictions,#guide-play) { display:none; }
#practice-fields { border:0; margin:.8rem 0; padding:0; }
#practice-hint { line-height:1.6; }
#practice-stow-help { margin:.6rem 0 .35rem; }

#bench-builder { margin-bottom:.65rem; }
#bench-builder summary { cursor:pointer; padding:.4rem 0; font-weight:600; }
#bench-builder .actions { margin-top:.35rem; }


.stage #rotate-handle {
  position: absolute; z-index: 2; transform: translate(-50%, -50%);
  width: 44px; height: 44px; padding: 0; line-height: 1; font-size: 24px;
  border: 2px solid #f4df9c; border-radius: 50%; color: #fff2cf; background: #28574d;
  cursor: grab; touch-action: none; user-select: none;
}
.stage #rotate-handle:active { cursor: grabbing; }

#build-panel [data-tool]:not([data-tool="cradle"]) { touch-action:none; }
.shelf-drag-label { position:fixed; left:0; top:0; z-index:100; pointer-events:none; background:#234c43; color:white; padding:.35rem .65rem; border-radius:.5rem; }

/* Lesson selection stays in the same place across guided and free activities. */
.masthead, body[data-guided="true"] .masthead {
  grid-template-columns:auto minmax(9rem,17rem) 1fr auto;
  grid-template-areas:"brand directory steps actions"; gap:.75rem 1.2rem;
}
.identity {grid-area:brand}
.lesson-picker {grid-area:directory; min-width:0}
.lesson-picker span {display:block; font-size:.74rem; margin-bottom:.15rem}
.lesson-picker select {margin:0}
.masthead .modes {grid-area:steps; justify-self:center}
.workspace-actions {grid-area:actions}
.toolbar-menu {position:relative}
.toolbar-menu summary {cursor:pointer; font-size:.875rem; padding:.5rem .65rem; border:1px solid var(--line); border-radius:7px; background:var(--panel-deep)}
.toolbar-menu .menu-items {position:absolute; right:0; top:calc(100% + 4px); z-index:8; display:grid; gap:.25rem; width:max-content; padding:.35rem; background:var(--panel); border:1px solid var(--line); border-radius:8px; box-shadow:0 6px 20px #13251e50}
.toolbar-menu .menu-items button {text-align:start}
.files.toolbar-menu {display:block; z-index:4}
.camera-menu .menu-items {right:auto; left:0}
body[data-guided="true"] .files.toolbar-menu {display:none}
.workbench-column {min-width:0}
#fold-workbench {display:none}
.inspector[data-mode="build"] :is(#motion,#meters,#stopwatch), .inspector[data-mode="record"] :is(.instrument,#lesson-panel) {display:none}
.inspector[data-mode="experiment"] #dimensions {display:none}
.inspector[data-mode="build"] #lesson-panel {grid-row:2}
.inspector[data-mode="build"] #lesson-panel:not([data-has-kit]) {display:none}
#lesson-model {margin-top:.45rem}
#build-panel > details, .classroom-reward {border-top:1px solid var(--line); margin:0; padding:.25rem 0}
#build-panel > details > summary,.classroom-reward > summary {cursor:pointer; padding:.55rem 0; font-weight:600}
.classroom-reward {margin-top:1rem}
#rider-meter {display:flex;align-items:baseline;gap:.4rem .8rem;flex-wrap:wrap;background:var(--panel-deep);padding:.45rem .75rem;border-bottom:1px solid var(--line)}
#rider-meter output {font-weight:650;font-variant-numeric:tabular-nums;color:var(--accent)}
#rider-meter small {color:var(--muted)}
body[data-guided="true"] :is(#rider-meter,#scale-meter) {display:none}
@media (max-width:1050px) {
  .masthead,body[data-guided="true"] .masthead {grid-template-columns:auto minmax(7rem,1fr) auto;grid-template-areas:"brand directory actions" "steps steps steps";gap:.45rem .9rem;min-height:0}
  body[data-guided="true"] .masthead {grid-template-areas:"brand directory actions"}
  body[data-guided="false"] .masthead .modes {grid-area:steps;justify-self:start}
}
@media (max-width:860px) and (orientation:portrait), (max-width:700px) {
  .workspace,body[data-guided="true"] .workspace {display:grid;grid-template-columns:minmax(0,1fr);gap:.5rem;padding:.6rem}
  .stage-column,.workbench-column {min-width:0}
  .stage,body[data-guided="true"] .stage {height:clamp(320px,50dvh,600px);min-height:0}
  .inspector {max-height:none;overflow:visible}
  #fold-workbench {display:block;width:100%;margin-bottom:.35rem}
  #fold-workbench[aria-expanded="false"] + .inspector {display:none}
  .stage-help {font-size:.8rem}
}
@media (max-width:540px) {
  .masthead,body[data-guided="true"] .masthead {grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brand actions" "directory directory" "steps steps";padding:.55rem .65rem}
  body[data-guided="true"] .masthead {grid-template-areas:"brand actions" "directory directory"}
  .lesson-picker {display:flex;align-items:center;gap:.65rem}
  .lesson-picker span {white-space:nowrap}
  .masthead .modes {width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
  .masthead .modes button {min-width:0;white-space:normal}
  .stage-help {display:none}
  .stage-top,.stage-bottom {left:.3rem;right:.3rem}
}
@media(any-pointer:coarse) {
  #fold-workbench,.toolbar-menu summary,.toolbar-menu .menu-items button,.lesson-picker select,.modes button,
  #build-panel>details>summary,.classroom-reward summary {min-height:44px}
}
