@media (min-width: 1001px) {
  body[data-step="3"] {
    overflow: hidden;
  }

  body[data-step="3"] main {
    height: calc(100vh - var(--header));
    padding-bottom: 18px;
  }

  body[data-step="3"] .workspace,
  body[data-step="3"] .planning-screen {
    height: 100%;
    min-height: 0;
  }

  body[data-step="3"] #surface-editor {
    height: calc(100% - 62px);
    min-height: 0;
  }
}

/* Project Master owns the outer header; the active surface editor owns only
   its local toolbar. Keeping these two sticky layers separate prevents the
   roof toolbar from inheriting a second header offset inside the iframe. */
body[data-step="3"] .planning-head {
  position: sticky;
  top: var(--header);
  z-index: 70;
}

@media (max-width: 1000px) {
  body[data-step="3"] .planning-head {
    top: calc(var(--header) + 61px);
  }
}

@media (max-width: 700px) {
  body[data-step="3"] .planning-head {
    position: static;
  }
}
