.step-readout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 6px 0 10px;
}

#step-caption {
  flex: 1 1 160px;
  margin: 0;
  padding: 5px 9px;
  border-inline-start: 3px solid #287465;
  background: #e9f2e9;
  color: #214d41;
  font-size: .94rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

#step-caption:empty {
  display: none;
}

#replay-step {
  flex: none;
  min-height: 44px;
  padding: 4px 8px;
  color: #285c4c;
  background: #f4f7ee;
  border: 1px solid #b7c6b2;
  border-radius: 8px;
  font-size: .875rem;
}

#replay-step:disabled {
  color: #67746c;
  cursor: default;
}

@media (max-width: 740px) {
  .desk {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "lesson"
      "goal"
      "legend"
      "prompt"
      "instruction"
      "drawing"
      "caption"
      "picks"
      "feedback"
      "answer"
      "tools"
      "place"
      "bridge"
      "notes";
    align-items: start;
    gap: 0;
    padding: 12px;
    border: 1px solid #bfcebb;
    border-radius: 14px;
    background: #fffcf1;
  }

  .sheet, .work, .controls { display: contents; }
  .sheethead { grid-area: lesson; }
  #goal { grid-area: goal; }
  .key { grid-area: legend; justify-content: start; margin: 3px 0 10px; }
  .workhead { grid-area: prompt; }
  #instruction { grid-area: instruction; }
  #drawing {
    grid-area: drawing;
    height: clamp(138px, 48vw, 205px);
    max-height: none;
    margin: 4px 0 0;
    scroll-margin-top: 8px;
  }
  .step-readout { grid-area: caption; margin: 4px 0; }
  #picks { grid-area: picks; }
  #msg { grid-area: feedback; }
  #answerArea { grid-area: answer; }
  #tools { grid-area: tools; }
  .bridgeHead { grid-area: place; margin-top: 10px; border-radius: 8px 8px 0 0; }
  #bridge { grid-area: bridge; border-radius: 0 0 8px 8px; }
  #notes { grid-area: notes; }
}
