.lab-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 16px;
  padding: 16px 20px;
  background: #fbfbf4;
  color: var(--ink);
  border: 1px solid #bfcbb9;
  border-radius: 14px;
}
.lab-top,
.lab-commands,
.lab-tools-body,
.lab-perspective {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lab-top h1 {
  font: 700 24px/1.05 var(--serif);
  letter-spacing: -0.5px;
}
.lab-phase {
  background: #e6eddf;
  color: #3e5c43;
  border-radius: 20px;
  padding: 4px 10px;
  font: 600 12px var(--sans);
}
.lab-commands {
  display: grid;
  grid-template-columns: minmax(130px, 2fr) minmax(100px, 1fr) auto auto;
  align-items: end;
}
.lab-panel label,
.lab-perspective label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #536452;
  font: 600 12px/1.25 var(--sans);
}
.lab-panel select,
.lab-commands button,
.lab-perspective select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 7px 9px;
  min-height: 36px;
  font: 600 14px/1.3 var(--sans);
  color: var(--ink);
  border: 1px solid #bdc8ba;
  background: #fffef8;
  border-radius: 7px;
}
.lab-commands button {
  width: auto;
  background: #edf1e8;
  padding-inline: 13px;
}
.lab-commands button:disabled {
  opacity: 0.46;
}
.lab-hint,
.lab-tools output {
  font: 400 14px/1.45 var(--sans);
  color: #475b4c;
}
.lab-hint button {
  margin-inline-start: 5px;
  padding: 0;
  border: 0;
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent;
  font-weight: 650;
}
.lab-tools {
  border-top: 1px solid #dce0d3;
  padding-top: 8px;
}
.lab-tools summary {
  width: fit-content;
  cursor: pointer;
  font: 600 13px/1.4 var(--sans);
  color: var(--green);
}
.lab-tools-body {
  margin-top: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.lab-tools-body output {
  align-self: center;
  flex: 1 1 180px;
}
.lab-link,
.lab-exit {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lab-perspective {
  margin-bottom: 12px;
  justify-content: end;
}
.lab-perspective label {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.lab-perspective select {
  width: auto;
  min-height: 30px;
  padding-block: 4px;
}
@media (max-width: 620px) {
  .lab-panel {
    padding: 13px;
    gap: 10px;
  }
  .lab-commands {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 8px;
  }
  .lab-commands button {
    min-height: 34px;
  }
  .lab-top h1 {
    font-size: 21px;
  }
}
