/* Interactive UI preview. Scientific media is never cropped or synthesized. */
.wm-section { background: #edf2ed; border-top: 1px solid var(--line); }
.wm-workbench { margin-top: 36px; border: 1px solid #bacbc0; background: #fff; }
.wm-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.wm-scene-label { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; font-size: 12px; color: var(--ink-soft); }
.wm-workbench select { min-height: 40px; max-width: 100%; border: 1px solid var(--line-strong); border-radius: 3px; background: #fff; padding: 7px 28px 7px 10px; color: var(--ink); font: 12px var(--font-body); }
.wm-scene-label select { width: min(260px, 100%); }
.wm-mode { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: #85551e; font-size: 11px; }
.wm-mode > span { width: 6px; height: 6px; background: #c49448; border-radius: 50%; }
.wm-text-button { min-height: 40px; padding: 6px 8px; background: transparent; color: var(--echo); font-size: 12px; }
.wm-text-button:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 4px; }
.wm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; }
.wm-visuals { min-width: 0; padding: 20px; }
.wm-viewports { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wm-view { min-width: 0; }
.wm-view figcaption { display: flex; flex-direction: column; gap: 3px; min-height: 48px; padding-bottom: 10px; }
.wm-view figcaption strong { font-size: 13px; font-weight: 500; }
.wm-view figcaption > span { font-size: 10px; color: var(--ink-soft); }
.wm-image-frame, .wm-output-frame { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); background: #f5f7f3; }
.wm-image-frame img, .wm-output-frame video { width: 100%; height: 100%; object-fit: contain; }
.wm-output-empty { padding: 18px; text-align: center; color: var(--ink-soft); }
.wm-empty-mark { display: block; margin-bottom: 8px; color: #83a496; font: 32px/1 var(--font-display); }
.wm-output-empty strong { font-size: 13px; font-weight: 500; color: var(--ink); }
.wm-output-empty p { max-width: 28ch; margin: 6px auto 0; font-size: 11px; line-height: 1.6; }
.wm-media-note { margin-top: 8px; min-height: 32px; color: var(--ink-soft); font-size: 10px; line-height: 1.6; }
.wm-stage-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.wm-stage-actions > span, .wm-draft-actions > span { color: var(--ink-soft); font-size: 11px; }
.wm-outline-button, .wm-generate { min-height: 44px; border: 1px solid var(--line-strong); border-radius: 3px; padding: 10px 13px; background: #fff; color: var(--ink); font-size: 12px; }
.wm-outline-button:hover:not(:disabled) { background: var(--echo-tint); border-color: var(--echo); }
.wm-workbench button:disabled { cursor: not-allowed; opacity: .48; }
.wm-generate { background: #e1e9e3; }
.wm-draft-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; margin-top: 20px; border-top: 1px solid var(--line); }
.wm-draft-header h3 { font-size: 14px; letter-spacing: 0; }
.wm-draft-header h3 span { margin-left: 8px; font: 10px var(--font-mono); color: var(--ink-soft); }
.wm-history-empty { min-height: 100px; display: grid; align-items: center; color: var(--ink-soft); font-size: 12px; }
.wm-history { height: 160px; overflow-y: auto; margin: 0; padding: 0; list-style: none; border-block: 1px solid #edf1ed; }
.wm-history li { display: grid; grid-template-columns: 25px 62px 1fr; gap: 8px; padding: 8px 4px; border-bottom: 1px solid #edf1ed; font-size: 12px; }
.wm-history li > span:first-child { font: 10px/1.8 var(--font-mono); color: var(--muted); }
.wm-history li > span:nth-child(2) { color: var(--echo); }
.wm-draft-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.wm-action-controls { min-width: 0; padding: 20px; border-left: 1px solid var(--line); background: #f8faf7; }
.wm-controls-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.wm-controls-heading h3 { font-size: 16px; }
.wm-controls-heading > span { color: var(--echo); font-size: 11px; }
.wm-arm-toggle { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line-strong); border-radius: 3px; overflow: hidden; }
.wm-arm-toggle button { min-height: 42px; padding: 8px; font-size: 12px; color: var(--ink-soft); background: transparent; }
.wm-arm-toggle button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.wm-step-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.wm-step-settings label { display: grid; gap: 4px; font-size: 10px; color: var(--ink-soft); }
.wm-key-group { min-width: 0; padding: 0; margin: 14px 0 0; border: 0; }
.wm-key-group legend { margin-bottom: 6px; color: var(--ink-soft); font-size: 11px; }
.wm-key-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.wm-key { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 48px; padding: 5px; border: 1px solid #cbd8cf; border-radius: 3px; background: #fff; color: var(--ink); }
.wm-key kbd { font: 11px/1.5 var(--font-mono); color: var(--echo); }
.wm-key > span { font-size: 10px; line-height: 1.5; }
.wm-key:hover:not(:disabled), .wm-key.is-active { background: #deeee4; border-color: var(--echo); }
.wm-gripper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wm-deltas { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.wm-deltas p { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 11px; }
.wm-deltas p > span { color: var(--muted); font-size: 10px; }
.wm-deltas > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px; margin-top: 5px; color: var(--ink-soft); font-size: 10px; }
.wm-deltas output { color: var(--ink); font: 10px/1.7 var(--font-mono); }
.wm-key-help { margin-top: 12px; color: var(--ink-soft); font-size: 10px; line-height: 1.7; }
.wm-status { min-height: 44px; padding: 12px 20px; border-top: 1px solid var(--line); background: #f0f5ef; color: var(--ink-soft); font-size: 11px; }
.wm-workbench [hidden] { display: none !important; }
.wm-noscript { margin-top: 14px; font-size: 13px; }
@media (max-width: 1050px) {
  .wm-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .wm-viewports { grid-template-columns: 1fr; }
  .wm-view { display: grid; grid-template-columns: minmax(0, 1fr) minmax(110px, .7fr); gap: 0 14px; align-items: start; }
  .wm-view figcaption { grid-column: 1 / -1; }
  .wm-media-note { margin-top: 0; }
}
@media (max-width: 760px) {
  .wm-layout { grid-template-columns: 1fr; }
  .wm-viewports { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wm-view { display: block; }
  .wm-media-note { margin-top: 8px; }
  .wm-action-controls { border-left: 0; border-top: 1px solid var(--line); }
  .wm-key-grid { gap: 8px; }
  .wm-key { min-height: 52px; }
}
@media (max-width: 560px) {
  .wm-toolbar, .wm-visuals, .wm-action-controls { padding: 14px; }
  .wm-toolbar { gap: 8px 12px; }
  .wm-scene-label { flex-basis: 100%; }
  .wm-mode { margin-right: auto; }
  .wm-viewports { grid-template-columns: 1fr; gap: 18px; }
  .wm-output-empty { padding: 18px; }
  .wm-history li { grid-template-columns: 20px 54px 1fr; gap: 6px; font-size: 11px; }
  .wm-draft-header h3 { font-size: 12px; }
  .wm-draft-header h3 span { display: block; margin-left: 0; }
  .wm-status { padding-inline: 14px; }
}
