#panel[data-kind=challenge] {
  width: min(750px, calc(100vw - 20px));
  max-height: min(94dvh, 900px);
}
#panel[data-kind=inspect]:has(.station-plate) { width: min(560px, calc(100vw - 20px)); }
.station-plate, .instrument-bench { margin: 8px 0 12px; }
.station-diagram, .mechanism-svg {
  display: block;
  width: 100%;
  height: auto;
  stroke: none;
  overflow: hidden;
  border-radius: 6px;
  font-family: var(--sans, system-ui, sans-serif);
  font-weight: 650;
}
.mechanism-svg {
  background: #294342;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.instrument-grip { cursor: grab; }
.instrument-grip[aria-pressed=true], .mechanism-svg:has([aria-pressed=true]) { cursor: grabbing; }
.instrument-grip[aria-pressed=true] { filter: drop-shadow(0 3px 2px #192e2b80); }
.instrument-grip:focus-visible {
  outline: 3px solid #f4ca79;
  outline-offset: 3px;
}
.instrument-reading {
  display: block;
  margin: 8px 0 0;
  min-height: 28px;
  color: #f2deaa;
  font-size: 14px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.instrument-feedback {
  margin: 0 0 5px;
  color: #ffc3a6;
  font-size: 14px;
  line-height: 1.55;
}
.instrument-feedback:empty { display: none; }
.instrument-tools { display: flex; align-items: start; gap: 10px; }
.instrument-keys { flex: 1; min-width: 0; }
.instrument-keys summary {
  width: fit-content;
  min-height: 34px;
  padding: 4px 8px 4px 0;
  cursor: pointer;
  color: #c5cfc0;
  font-size: 13px;
}
.instrument-keys p { margin: 1px 0; }
.instrument-reset {
  min-height: 37px;
  padding: 5px 12px;
  background: #2d4542;
  border: 1px solid #7a8d7c;
  border-radius: 4px;
  color: #eddec1;
  font-size: 13px;
}
@media (pointer: coarse) {
  .instrument-reset, .instrument-keys summary { min-height: 44px; }
  .instrument-grip > circle[fill="transparent"] { r: 30px; }
}
@media (max-width: 480px) {
  #panel[data-kind=inspect]:has(.specimen-plate) {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: 82dvh;
    padding: 12px;
  }
  #panel[data-kind=challenge] { width: calc(100vw - 8px); max-width: calc(100vw - 8px); padding: 10px 8px; }
  .instrument-reading { font-size: 13px; }
  .mechanism-svg[data-mechanism=gears] + .instrument-reading { white-space: pre-line; }
  .instrument-bench { margin-top: 7px; }
}
