.cycle-creation-workspace { min-width: 0; }
/* Carry the bounded patient workspace height through both cycle wrappers. */
.patient-directory-page .cycle-creation-workspace,
.patient-directory-page .cycle-creation-workspace > [data-cycle-creation-target="content"] { height: 100%; min-height: 0; }
@media (max-width: 900px) {
  .patient-directory-page .cycle-creation-workspace,
  .patient-directory-page .cycle-creation-workspace > [data-cycle-creation-target="content"] { height: auto; }
}
.cycle-creation-workspace.is-creating-cycle { display: grid; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.cycle-creation-workspace > div { min-width: 0; }
.is-creating-cycle .patient-detail-layout, .is-reviewing-cycle .patient-detail-layout { grid-template-columns: 0 minmax(0, 1fr); }
.is-creating-cycle .patient-sidebar, .is-creating-cycle .patient-directory-toggle, .is-reviewing-cycle .patient-sidebar, .is-reviewing-cycle .patient-directory-toggle { visibility: hidden; }
.cycle-creation-panel { position: sticky; top: 0; max-height: 100dvh; overflow-y: auto; padding: 24px; border-left: 1px solid var(--line-strong); background: var(--paper); }
.cycle-creation-panel[hidden], .cycle-creation-panel [hidden] { display: none; }
.cycle-creation-panel header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.cycle-creation-panel h2 { margin: 0; font-size: 1rem; }
.cycle-creation-panel form { display: grid; gap: 20px; }
.cycle-creation-panel .field { display: grid; gap: 8px; min-width: 0; }
.cycle-creation-panel .builder-axis-fields { display: grid; gap: 20px; }
.cycle-creation-panel [data-axis][hidden] { display: none; }
.cycle-creation-panel p { margin: 0; font-size: .8125rem; }
#cycle-creation-preview { padding: 24px; min-width: 0; }
#cycle-creation-preview[inert] { opacity: .6; }
.cycle-creation-review { display: none; }
.cycle-creation-panel .field-error:empty { display: none; }
@media (max-width: 900px) {
  .cycle-creation-review { display: inline-flex; }
  .cycle-creation-workspace.is-creating-cycle { display: block; }
  .cycle-creation-panel { position: fixed; inset: 0 0 0 auto; width: min(100%, 380px); z-index: 70; max-height: 100dvh; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}
