:root {
  --ink: #203e34;
  --muted: #66796d;
  --green: #1e7162;
  --gold: #be8d43;
  --line: #d9e1d5;
  --paper: #f8faf5;
  --white: #fffefa;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  width: 100%;
}
body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button,
select,
input {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--white);
  color: var(--ink);
}
button {
  padding: 8px 11px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 550;
  min-height: 34px;
}
button:hover {
  border-color: #84a695;
  background: #eef4eb;
}
button[aria-pressed='true'] {
  background: #e2efe6;
  border-color: #86b49d;
  color: #195c4a;
}
button:disabled,
input:disabled,
select:disabled {
  opacity: 0.43;
  cursor: not-allowed;
}
button:focus-visible,
select:focus-visible,
input:focus-visible,
canvas:focus-visible {
  outline: 3px solid #d4a85c;
  outline-offset: 2px;
}
select {
  padding: 7px;
  max-width: 100%;
}
input[type='number'],
input[type='text'] {
  padding: 7px;
  min-width: 0;
}
input[type='checkbox'] {
  accent-color: var(--green);
}
input[type='range'] {
  accent-color: var(--green);
  padding: 0;
  width: 100%;
  border: 0;
  background: transparent;
  min-width: 0;
}
a {
  color: var(--green);
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  left: 8px;
  top: -60px;
  z-index: 1000;
  background: white;
  padding: 12px;
}
.skip:focus {
  top: 8px;
}
.topbar {
  height: 62px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex: none;
}
.brand img {
  width: 127px;
  height: auto;
  display: block;
}
.brand span {
  font-size: 10px;
  letter-spacing: 0.13em;
  font-weight: 650;
  max-width: 90px;
}
.topbar nav {
  display: flex;
  gap: 5px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: thin;
}
.topbar nav button {
  background: transparent;
  border-color: transparent;
}
.topbar nav button:hover {
  background: #eef3e9;
}
.topbar #capture-count {
  background: #e7eee2;
  border-radius: 9px;
  padding: 1px 5px;
  font-size: 11px;
}
#lab {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}
.experiment-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 22px 10px;
  flex: none;
}
.experiment-title span {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--green);
  font-weight: 700;
}
h1 {
  font-size: clamp(17px, 1.7vw, 25px);
  font-weight: 580;
  letter-spacing: -0.035em;
  margin: 4px 0 0;
}
.preset-picker {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 200px;
  max-width: 330px;
}
.preset-picker span,
.small-label {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.bench-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 5px 20px 9px;
  flex: none;
  overflow-x: auto;
  scrollbar-width: thin;
}
.bench-toolbar label {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: none;
}
.bench-toolbar #selected {
  max-width: 190px;
}
.view-controls {
  display: flex;
  gap: 3px;
  margin-left: auto;
}
.bench-toolbar button {
  padding: 6px 9px;
  min-height: 32px;
}
.bench-toolbar select {
  padding: 6px;
}
#workbench {
  position: relative;
  flex: 1;
  min-height: 150px;
  isolation: isolate;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(145deg, #f7faf4, #f0f4ec);
}
#stage {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.stage-caption {
  position: absolute;
  left: 24px;
  top: 20px;
  max-width: min(470px, 55%);
  pointer-events: none;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.15em;
  color: #769071;
  font-weight: 750;
}
.stage-caption p {
  margin: 7px 0;
  font-size: 15px;
  font-weight: 550;
}
#stage-hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
  max-width: 400px;
}
.stage-key {
  position: absolute;
  bottom: 14px;
  left: 90px;
  display: flex;
  gap: 13px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
}
.stage-key span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.stage-key i {
  display: block;
  width: 17px;
  height: 3px;
}
.velocity {
  background: #397bb4;
}
.acceleration {
  background: #c7763c;
}
.symbol-note {
  opacity: 0.7;
}
.graph-dock {
  position: absolute;
  right: 20px;
  bottom: 30px;
  width: clamp(280px, 25vw, 400px);
  height: clamp(200px, 35%, 285px);
  background: var(--white);
  border: 1px solid #d6dfd2;
  border-radius: 12px;
  box-shadow: 0 5px 24px #365b3c0b;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.graph-dock header {
  display: flex;
  padding: 7px 8px;
  gap: 4px;
  border-bottom: 1px solid #e5eadf;
}
.graph-dock select {
  border: 0;
  font-size: 12px;
  font-weight: 600;
  flex: 1;
  width: 120px;
}
.graph-dock button {
  padding: 2px 8px;
  min-height: 27px;
  border: 0;
}
.graph-dock canvas {
  flex: 1;
  width: 100%;
  min-height: 90px;
}
.graph-dock p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
  padding: 3px 10px 7px;
}
.show-live {
  position: absolute;
  right: 20px;
  bottom: 20px;
}
#model-equation {
  position: absolute;
  top: 18px;
  right: 20px;
  font-size: 14px;
  font-weight: 600;
  background: #fffdf0df;
  border: 1px solid #e6d7b5;
  border-radius: 8px;
  padding: 10px 14px;
  max-width: 45%;
  line-height: 1.5;
  pointer-events: none;
}
.reading-strip {
  flex: none;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  padding: 10px 20px;
  background: var(--white);
  gap: 0;
  overflow: hidden;
}
.reading-list {
  display: flex;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  align-items: center;
}
#choose-values {
  align-self: center;
  flex: none;
  margin-right: 8px;
}
.no-values {
  margin: 0 12px;
  color: var(--muted);
  font-size: 12px;
}
.parameter-bar {
  flex: none;
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 9px 20px;
  border-block: 1px solid var(--line);
  background: #edf3e9;
}
.parameter-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: none;
}
.parameter-heading strong {
  font-size: 12px;
}
.parameter-heading button {
  font-size: 11px;
  padding: 3px 7px;
  min-height: 26px;
}
.bench-parameters {
  display: flex;
  gap: 14px;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}
.bench-field {
  flex: 1 0 125px;
  max-width: 205px;
}
.bench-field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  margin-bottom: 4px;
}
.bench-field label small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
}
.bench-field-input {
  display: flex;
  align-items: center;
  gap: 5px;
}
.bench-field input,
.bench-field select {
  width: 100%;
  min-width: 75px;
  font-size: 17px;
  padding: 3px 6px;
  min-height: 31px;
  font-variant-numeric: tabular-nums;
}
.bench-field-input > span {
  font-size: 8px;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.parameter-status {
  font-size: 10px;
  color: var(--muted);
  max-width: 135px;
  margin: 0;
}
.value-options {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.value-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.value-option span {
  flex: 1;
}
.value-option small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.value-option output {
  font-variant-numeric: tabular-nums;
  color: var(--green);
}
body.teaching .bench-field input {
  font-size: 20px;
}
@media (max-width: 1100px) {
  .parameter-bar {
    gap: 10px;
    padding: 6px 10px;
  }
  .parameter-status {
    display: none;
  }
  .bench-field {
    flex-basis: 135px;
  }
}
@media (max-width: 700px) {
  .parameter-bar {
    padding: 5px 8px;
    gap: 10px;
  }
  .parameter-heading strong {
    font-size: 10px;
  }
  .parameter-heading button {
    font-size: 9px;
    padding: 3px;
  }
  .bench-parameters {
    gap: 10px;
  }
  .bench-field {
    flex-basis: 130px;
  }
  .bench-field label {
    font-size: 10px;
    margin-bottom: 2px;
  }
  .bench-field input {
    font-size: 16px;
  }
  #choose-values {
    font-size: 10px;
    max-width: 62px;
    white-space: normal;
    padding: 4px;
    margin-right: 0;
  }
}
@media (max-height: 620px) {
  .parameter-bar {
    padding-block: 3px;
  }
  .parameter-heading strong {
    font-size: 10px;
  }
  .bench-field label {
    margin-bottom: 1px;
    font-size: 10px;
  }
  .bench-field input,
  .bench-field select {
    font-size: 14px;
    min-height: 26px;
  }
  .parameter-status {
    display: none;
  }
}
.reading {
  padding: 0 22px;
  border-right: 1px solid var(--line);
  min-width: 130px;
}
.reading:last-child {
  border: 0;
}
.reading span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.045em;
  margin-bottom: 3px;
}
.reading strong {
  font-size: 21px;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
.reading small {
  font-size: 11px;
  font-weight: 400;
  margin-left: 4px;
  color: var(--muted);
}
.transport {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px 12px;
  flex: none;
  border-top: 1px solid var(--line);
  background: #f3f6ef;
  flex-wrap: wrap;
}
.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
  min-width: 80px;
}
.primary:hover {
  background: #175d50;
  color: white;
}
.capture {
  color: #986e28;
  background: #fff9e9;
  border-color: #e3d5b1;
}
.transport output {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  min-width: 65px;
}
.speed {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
}
.speed select {
  font-size: 12px;
}
.transport #event-kind {
  max-width: 115px;
  font-size: 11px;
}
#floating {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.floating-window {
  pointer-events: auto;
  position: absolute;
  left: 20px;
  top: 15px;
  width: 410px;
  height: 430px;
  min-width: 280px;
  min-height: 180px;
  max-width: calc(100% - 16px);
  max-height: calc(100% - 16px);
  background: var(--white);
  border: 1px solid #a9bfab;
  border-radius: 12px;
  box-shadow: 0 16px 50px #254e3924;
  display: flex;
  flex-direction: column;
  resize: both;
  overflow: hidden;
  outline: none;
}
.floating-window header {
  display: flex;
  align-items: center;
  padding: 9px 11px;
  background: #f0f5eb;
  border-bottom: 1px solid var(--line);
  cursor: move;
  touch-action: none;
  gap: 8px;
  flex: none;
}
.floating-window h2 {
  font-size: 14px;
  margin: 0;
  font-weight: 650;
  flex: 1;
}
.floating-window header button {
  border: 0;
  min-height: 25px;
  padding: 2px 7px;
  background: transparent;
}
.window-body {
  padding: 14px;
  overflow: auto;
  min-height: 0;
  flex: 1;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.floating-window.graph-window {
  width: 450px;
  height: 330px;
}
.graph-window .window-body {
  display: flex;
  flex-direction: column;
  padding: 8px;
}
.graph-window canvas {
  width: 100%;
  flex: 1;
  min-height: 100px;
}
.graph-options {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 11px;
}
.graph-options select {
  max-width: 170px;
  font-size: 11px;
  padding: 5px;
}
.graph-options label {
  display: flex;
  align-items: center;
  gap: 3px;
}
.graph-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 5px;
  font-size: 10px;
  color: var(--muted);
}
.graph-footer p {
  margin: 0;
  flex: 1;
}
.graph-footer button {
  font-size: 11px;
  padding: 4px 6px;
  min-height: 25px;
}
.field {
  margin-bottom: 12px;
}
.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 5px;
  gap: 6px;
}
.field-label small {
  color: var(--muted);
  font-size: 10px;
}
.field-inputs {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 10px;
  align-items: center;
}
.field select {
  width: 100%;
}
.window-body h3 {
  font-size: 13px;
  margin: 18px 0 8px;
}
.window-body p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 8px 0;
}
.window-body .intro {
  font-size: 14px;
  color: var(--ink);
}
.window-body details {
  border-top: 1px solid var(--line);
  padding: 11px 0;
  margin-top: 10px;
}
.window-body summary {
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.window-body .row {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0;
}
.window-body .row > * {
  max-width: 100%;
}
.window-body .row input[type='text'] {
  flex: 1;
}
.workspace-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.workspace-card {
  text-align: left;
  padding: 13px;
  white-space: normal;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.workspace-card b {
  color: var(--gold);
  font-size: 11px;
}
.workspace-card strong {
  display: block;
  font-size: 13px;
}
.workspace-card span {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.5;
  margin-top: 4px;
}
.preset-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.preset-list button {
  text-align: left;
  white-space: normal;
  font-size: 12px;
}
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.tool-grid button {
  text-align: left;
  white-space: normal;
  font-size: 12px;
  padding: 10px;
}
.rig-row {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
  margin: 6px 0;
  display: flex;
  gap: 5px;
}
.rig-row button:first-child {
  flex: 1;
  text-align: left;
  white-space: normal;
}
.rig-row.active {
  background: #edf4e7;
  border-color: #8cad8f;
}
.tiny {
  font-size: 10px !important;
  color: var(--muted);
}
.meter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.meter-cell {
  padding: 12px;
  background: #f1f5eb;
  border-radius: 7px;
}
.meter-cell span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.meter-cell strong {
  display: block;
  font-size: 25px;
  font-weight: 550;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.meter-cell small {
  font-size: 10px;
}
.stopwatch {
  font-size: 42px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  margin: 15px 0;
}
.table-wrap {
  overflow: auto;
  max-height: 230px;
}
.table-wrap table {
  border-collapse: collapse;
  font-size: 11px;
  white-space: nowrap;
  width: 100%;
}
.table-wrap th,
.table-wrap td {
  border-bottom: 1px solid var(--line);
  padding: 7px 9px;
  text-align: right;
}
.table-wrap th:first-child,
.table-wrap td:first-child {
  text-align: left;
}
.notice {
  background: #fff7e4;
  color: #886628 !important;
  border: 1px solid #e9d9b4;
  border-radius: 6px;
  padding: 9px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  margin: 9px 0;
}
.position-fields {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.position-fields label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}
.position-fields input {
  width: 100%;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 100px;
  transform: translateX(-50%);
  z-index: 10000;
  max-width: min(600px, 90vw);
  background: #234c3f;
  color: white;
  padding: 11px 17px;
  border-radius: 9px;
  box-shadow: 0 5px 20px #16372b30;
  opacity: 0;
  pointer-events: none;
  font-size: 13px;
  line-height: 1.5;
}
#toast.visible {
  opacity: 1;
}
#replay-banner {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
  background: #fff0ca;
  padding: 7px 12px;
  border: 1px solid #d1ae62;
  border-radius: 9px;
  font-size: 12px;
  z-index: 500;
}
body.teaching .reading strong {
  font-size: 29px;
}
body.teaching .stage-caption p {
  font-size: 20px;
}
body.teaching .stage-caption #stage-hint {
  display: none;
}
body.teaching #model-equation {
  font-size: 18px;
}
body.teaching .reading span {
  font-size: 12px;
}
body.teaching h1 {
  font-size: 28px;
}
@media (min-width: 1700px) {
  .topbar {
    height: 70px;
  }
  .topbar button {
    font-size: 15px;
  }
  .experiment-bar {
    padding: 18px 26px;
  }
  .bench-toolbar {
    padding: 8px 26px 13px;
  }
  .stage-caption {
    top: 26px;
    left: 30px;
  }
  .stage-caption p {
    font-size: 18px;
  }
  .reading strong {
    font-size: 27px;
  }
  .transport {
    padding: 12px 22px;
  }
  .transport button {
    padding: 10px 15px;
  }
}
@media (max-width: 1100px) {
  .brand span {
    display: none;
  }
  .topbar {
    gap: 6px;
    padding: 8px 10px;
  }
  .topbar button {
    padding: 7px 8px;
    font-size: 12px;
  }
  .bench-toolbar {
    padding-left: 12px;
    padding-right: 12px;
  }
  .small-label {
    display: none;
  }
  .reading {
    padding: 0 13px;
    min-width: 105px;
  }
  .symbol-note {
    display: none;
  }
  .transport {
    padding: 7px 10px;
    gap: 5px;
  }
  .transport button {
    padding: 6px 8px;
    font-size: 12px;
  }
  .transport .speed span {
    display: none;
  }
  .graph-dock {
    right: 12px;
    width: 280px;
    height: 210px;
  }
  .stage-caption {
    left: 18px;
    max-width: 53%;
  }
}
@media (max-width: 700px) {
  :root {
    font-size: 12px;
  }
  .topbar {
    height: 49px;
  }
  .brand img {
    width: 95px;
  }
  .topbar nav {
    gap: 1px;
  }
  .topbar nav button {
    font-size: 11px;
    padding: 5px 7px;
  }
  .topbar #teacher,
  .topbar #fullscreen {
    padding: 5px 6px;
  }
  .experiment-bar {
    padding: 9px 12px;
    align-items: flex-start;
  }
  .experiment-title span {
    font-size: 8px;
  }
  .experiment-title h1 {
    font-size: 17px;
    line-height: 1.2;
  }
  .preset-picker {
    min-width: 100px;
    width: 130px;
  }
  .preset-picker span {
    font-size: 8px;
  }
  .preset-picker select {
    font-size: 10px;
    padding: 5px;
  }
  .bench-toolbar {
    gap: 4px;
    padding: 4px 8px 6px;
  }
  .bench-toolbar button,
  .bench-toolbar select {
    font-size: 11px;
    min-height: 30px;
  }
  .bench-toolbar #selected {
    max-width: 140px;
  }
  .view-controls {
    margin: 0;
  }
  .stage-caption {
    top: 12px;
    left: 12px;
    max-width: 90%;
  }
  .stage-caption p {
    font-size: 13px;
    max-width: 300px;
  }
  .stage-caption #stage-hint {
    display: none;
  }
  .eyebrow {
    font-size: 8px;
  }
  .stage-key {
    bottom: 9px;
    left: 64px;
    font-size: 9px;
  }
  .graph-dock {
    bottom: 10px;
    right: 8px;
    width: 220px;
    height: 155px;
    opacity: 0.96;
  }
  .graph-dock select {
    font-size: 10px;
    padding: 4px;
  }
  .graph-dock header {
    padding: 3px;
  }
  .graph-dock p {
    display: none;
  }
  .reading-strip {
    padding: 7px 4px;
    justify-content: flex-start;
  }
  .reading {
    min-width: 90px;
    padding: 0 10px;
  }
  .reading strong {
    font-size: 18px;
  }
  .reading span {
    font-size: 8px;
  }
  .reading small {
    font-size: 9px;
  }
  .transport {
    gap: 4px;
    padding: 6px 8px;
  }
  .transport button {
    font-size: 11px;
    min-height: 30px;
    padding: 5px 7px;
  }
  .transport #event-kind {
    display: none;
  }
  .transport .speed select {
    padding: 4px;
  }
  .transport output {
    min-width: 50px;
    font-size: 11px;
  }
  .transport #keep {
    margin-left: auto;
  }
  #model-equation {
    top: 70px;
    left: 10px;
    right: auto;
    max-width: 90%;
    font-size: 11px;
    padding: 6px;
  }
  .floating-window,
  .floating-window.graph-window {
    left: 8px !important;
    top: 8px !important;
    width: calc(100% - 16px) !important;
    height: calc(100% - 16px) !important;
    min-height: 120px;
    min-width: 200px;
    resize: none;
  }
  .window-body {
    padding: 11px;
  }
  .floating-window header {
    padding: 7px 9px;
  }
  .floating-window h2 {
    font-size: 13px;
  }
  .graph-window canvas {
    min-height: 90px;
  }
  .graph-footer p {
    font-size: 9px;
  }
  .stage-caption {
    pointer-events: none;
  }
  body.teaching h1 {
    font-size: 18px;
  }
  body.teaching .reading strong {
    font-size: 21px;
  }
  body.teaching .stage-caption p {
    font-size: 15px;
  }
}
@media (max-height: 620px) {
  .topbar {
    height: 45px;
  }
  .experiment-bar {
    padding: 6px 12px;
  }
  h1 {
    font-size: 17px;
  }
  .experiment-title span {
    font-size: 8px;
  }
  .bench-toolbar {
    padding: 3px 10px;
  }
  .bench-toolbar button,
  .bench-toolbar select {
    min-height: 27px;
    padding: 4px 7px;
  }
  .reading-strip {
    padding: 5px;
  }
  .reading strong {
    font-size: 18px;
  }
  .transport {
    padding: 5px 9px;
  }
  .transport button {
    min-height: 28px;
    padding: 4px 8px;
  }
  .stage-caption {
    top: 8px;
  }
  .stage-caption #stage-hint {
    display: none;
  }
  .stage-caption p {
    font-size: 12px;
  }
  .graph-dock {
    height: 150px;
    width: 250px;
    bottom: 9px;
  }
  .graph-dock p {
    display: none;
  }
  .stage-key {
    bottom: 6px;
  }
  #workbench {
    min-height: 110px;
  }
  .transport .speed span {
    display: none;
  }
  .floating-window,
  .floating-window.graph-window {
    position: fixed;
    top: 48px !important;
    left: 8px !important;
    width: min(450px, calc(100vw - 16px)) !important;
    height: calc(100dvh - 60px) !important;
    min-height: 0;
    max-height: calc(100dvh - 60px);
    max-width: calc(100vw - 16px);
    resize: none;
  }
}
@media (max-height: 420px) {
  .experiment-bar {
    display: none;
  }
  .reading-strip {
    padding: 3px;
  }
  .reading span {
    font-size: 8px;
  }
  .reading strong {
    font-size: 15px;
  }
  .topbar {
    height: 38px;
  }
  .topbar .brand img {
    width: 92px;
  }
  .transport #keep {
    display: none;
  }
  .graph-dock {
    height: 120px;
    width: 215px;
  }
  .stage-caption p {
    font-size: 11px;
  }
  .stage-key {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

#floating {
  z-index: 20;
}
#replay-banner {
  z-index: 5;
  top: auto;
  bottom: 12px;
}
@media (max-height: 420px) {
  .experiment-bar {
    display: flex;
    padding: 3px 10px;
  }
  .experiment-title span {
    display: none;
  }
  .experiment-title h1 {
    font-size: 12px;
    margin: 0;
  }
  .preset-picker span {
    display: none;
  }
  .preset-picker {
    max-width: 250px;
  }
  .preset-picker select {
    padding: 3px;
    font-size: 10px;
  }
}

#panel-menu {
  display: none;
}
@media (max-width: 700px) {
  .topbar nav {
    display: none;
  }
  #panel-menu {
    display: block;
    margin-left: auto;
  }
  .graph-dock {
    width: calc(100% - 24px);
    height: 145px;
    left: 12px;
    right: 12px;
    bottom: 8px;
  }
  .stage-key {
    bottom: 160px;
  }
  .stage-caption {
    max-width: 94%;
  }
  .stage-caption p {
    max-width: 100%;
  }
  #toast {
    bottom: auto;
    top: 55px;
    font-size: 11px;
    padding: 7px 11px;
    max-width: calc(100% - 24px);
    width: max-content;
    box-shadow: 0 2px 8px #16372b20;
  }
}
