/* hla-machine (T4): structural layout only — no colors, no fonts, no borders,
   no effects. T6 (retro.css) owns every visual decision. */

html,
body {
  height: 100%;
  margin: 0;
}

body {
  display: flex;
  overflow: hidden;
}

#crt {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#screen {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

#credits {
  flex: 0 0 auto;
  width: 100%;
  box-sizing: border-box;
}

#editor-pane {
  flex: 0 0 320px;
  /* Keep the editor DOM and JavaScript available, but remove the pane from
     the visible layout. */
  display: none;
  flex-direction: column;
  height: 100%;
}

#editor-toolbar {
  flex: 0 0 auto;
}

#editor {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  width: 100%;
}

#status {
  position: fixed;
  bottom: 0;
  left: 0;
}

/* Keep the terminal full-height on narrow viewports while the editor is
   hidden. */
@media (max-width: 820px) {
  body {
    flex-direction: column;
  }

  #crt {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
  }

  #editor-pane {
    flex: 0 0 45vh;
    width: 100%;
    height: 45vh;
  }
}
