/* One playback row and one tool row, kept below the experiment. */
#workspace { --drawer-top: 62px; --drawer-bottom: 195px; }
body.lab-immersive #workspace, #scene-panel { overflow: clip !important; }
.tutorial-panel, .field-editor-panel { top: 62px; bottom: var(--lab-overlay-bottom, 220px); }
.tutorial-panel.tutorial-minimized { bottom: var(--lab-overlay-bottom, 220px); }
#scene-panel > .simulation-dock { flex: none; min-width: 0; padding: 8px 12px 6px; background: #10263a; border-top: 1px solid #4c706c; color: #e2edf2; }
.simulation-transport-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.simulation-transport-row .motion-target { margin: 0; flex: 0 1 155px; min-width: 105px; }
#scene-panel .simulation-dock select { width: 100%; min-height: 42px; margin: 0; padding: 6px 9px; font: 13px/1.3 'Segoe UI', sans-serif; border: 1px solid #527488; border-radius: 7px; background: #19384b; color: #ecf5fa; }
.simulation-transport-row .scene-transport { display: flex; flex: none; gap: 5px; margin: 0; }
#scene-panel .simulation-transport-row button { min-height: 42px; padding: 7px 12px; border-radius: 7px; border: 1px solid #527488; background: #19384b; color: #ecf5fa; font-size: 13px; }
#scene-panel .simulation-transport-row button:not(#scene-play):enabled:hover { background: #2b5265; border-color: #9ac9b4; }
#scene-panel #scene-play { min-width: 88px; background: #b9e8cf; border-color: #b9e8cf; color: #103c2d; font-weight: 700; }
#scene-panel #scene-play[aria-pressed="true"] { background: #f5df99; border-color: #f5df99; color: #40320f; }
.hotbar-speed { display: flex; align-items: center; gap: 7px; margin: 0; min-width: 115px; font-size: 12px; }
#scene-panel .hotbar-speed select { width: 80px; }
#scene-panel .simulation-dock #particle-clock { margin-left: auto; min-width: 110px; white-space: nowrap; font: 13px/1.4 Consolas, monospace; color: #f3e4ad; }
#scene-panel .simulation-dock .workspace-toolbar { display: flex !important; align-items: center; flex-wrap: wrap; height: auto; min-height: 44px; gap: 7px; margin: 7px 0 0; padding: 0; border: 0; background: transparent; }
#scene-panel .simulation-dock .tool-segment { display: flex; gap: 4px; margin: 0; padding: 0; border: 0; background: transparent; }
#scene-panel .simulation-dock .tool-group > button { min-height: 40px; font-size: 12px; border: 1px solid #3e5b6b; background: #142f42; }
#scene-panel .simulation-dock .tool-group > .tool-options-toggle { min-width: 25px; width: 25px; border-left: 0; }
#scene-panel .simulation-dock .workspace-build, #scene-panel #drop-selected { min-height: 40px; margin: 0; padding: 6px 10px; font-size: 12px; border-radius: 6px; }
#scene-panel #drop-selected { background: #4c452c; border-color: #a28d50; color: #fff0ba; }
#scene-panel .simulation-dock .object-picker { display: flex; flex: 1; max-width: none; min-width: 250px; width: auto; margin: 0 0 0 auto; padding: 0; gap: 4px; }
#scene-panel .simulation-dock .object-picker > select { flex: 1; min-width: 80px; width: 0; }
#scene-panel .simulation-dock .object-picker > button { display: inline-flex; justify-content: center; align-items: center; flex: none; min-width: 40px; min-height: 42px; padding: 6px; }
#scene-panel .simulation-dock .object-picker > #object-focus, #scene-panel .simulation-dock .object-picker > #object-duplicate { display: inline-flex; }
.hotbar-feedback { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-top: 5px; min-height: 17px; color: #b7ccd6; font: 11px/1.4 'Segoe UI', sans-serif; }
.hotbar-feedback #playback-status { min-width: 0; }
#scene-panel .hotbar-feedback #clock-summary { display: block; position: static; min-width: 0; max-width: 58%; padding: 0; margin: 0; text-align: right; font: inherit; }
#scene-panel .simulation-dock :is(button,select):focus-visible { outline: 3px solid #f4d16e; outline-offset: 2px; }
#scene-panel .simulation-dock button:disabled { opacity: .4; }
/* Old domain-specific buttons remain callable by lessons; playback has one visible home. */
#play-pause, #step-particle, #restart-particles, #start-mechanics, #stop-mechanics, #reset-mechanics, #object-run-material { display: none !important; }
@media (max-width: 1050px) {
  #scene-panel .simulation-dock .object-picker { flex-basis: 300px; }
  #workspace { --drawer-bottom: 245px; }
}
@media (min-width: 1000px) { body:not(.lab-immersive):not(.inspector-closed) #scene-panel > .simulation-dock { margin-right: 340px; } }
@media (max-width: 760px) {
  .tutorial-panel, .field-editor-panel { top: 51px; bottom: var(--lab-overlay-bottom, 295px); }
  .tutorial-panel.tutorial-minimized { bottom: var(--lab-overlay-bottom, 295px); }
  #scene-panel { display: grid !important; grid-template-columns: repeat(12,minmax(0,1fr)); grid-template-rows: 44px minmax(150px,1fr) auto auto auto; }
  #scene-panel > .canvas-wrap { grid-row: 2; }
  #scene-panel > .simulation-dock { grid-column: 1/-1; grid-row: 3; padding: 7px 8px 5px; }
  #scene-panel > .scene-tool-dock { grid-row: 4; }
  #scene-panel > .scene-footer { grid-row: 5; }
  .simulation-transport-row { display: grid; grid-template-columns: minmax(100px,1fr) auto; gap: 5px 8px; }
  .simulation-transport-row .motion-target { grid-column: 1; grid-row: 1; min-width: 0; }
  .simulation-transport-row .scene-transport { grid-column: 2; grid-row: 1; }
  #scene-panel .simulation-transport-row button { min-height: 42px; padding: 6px 8px; font-size: 12px; }
  #scene-panel #scene-play { min-width: 66px; }
  .hotbar-speed { grid-column: 1; grid-row: 2; min-width: 0; }
  #scene-panel .hotbar-speed select { min-height: 34px; padding: 3px 7px; font-size: 12px; }
  #scene-panel .simulation-dock #particle-clock { grid-column: 2; grid-row: 2; min-width: 0; height: auto; justify-content: end; font-size: 11px; }
  #scene-panel .simulation-dock .workspace-toolbar { display: flex !important; gap: 5px; }
  #scene-panel .simulation-dock .tool-segment { flex: 1; max-width: none; min-width: 0; justify-content: space-between; }
  #scene-panel .simulation-dock .tool-group > button { font-size: 10.5px; padding-inline: 5px; }
  #scene-panel .simulation-dock .tool-group > .tool-options-toggle { min-width: 19px; width: 19px; padding-inline: 0; }
  #scene-panel .simulation-dock .workspace-build, #scene-panel #drop-selected { font-size: 11px; padding-inline: 7px; }
  #scene-panel .simulation-dock .object-picker { flex: 1 1 100%; min-width: 0; padding: 0; }
  #scene-panel .simulation-dock .object-picker > select { font-size: 12px; }
  #scene-panel .simulation-dock .object-picker > button { min-width: 38px; }
  .hotbar-feedback { font-size: 10px; line-height: 1.4; }
  #scene-panel .hotbar-feedback #clock-summary { max-width: 46%; }
  #workspace { --drawer-top: 51px; --drawer-bottom: 295px; }
}
@media (max-width: 360px) {
  #scene-panel .simulation-dock .tool-group > button { padding-inline: 3px; font-size: 10px; }
  #scene-panel .simulation-dock .tool-group > .tool-options-toggle { min-width: 16px; width: 16px; }
  #scene-panel .simulation-transport-row button { padding-inline: 5px; font-size: 11px; }
  #scene-panel .simulation-dock .workspace-build, #scene-panel #drop-selected { padding-inline: 4px; font-size: 10px; }
  .hotbar-feedback { display: block; }
  #scene-panel .hotbar-feedback #clock-summary { max-width: none; text-align: left; }
}
@media (max-width: 760px) and (max-height: 600px) {
  #scene-panel { grid-template-rows: 44px minmax(90px,1fr) auto auto auto; }
  .hotbar-feedback { display: none; }
  #scene-panel > .scene-footer { min-height: 20px; }
}
@media (forced-colors: active) { #scene-panel .simulation-dock :is(button,select) { border: 1px solid ButtonText; } }
