/* ==================================================
   RUNEGATE SHELL
   --------------------------------------------------
   Loaded last. On wide, tall viewports the page fits
   the screen: top bar, HUD, then a workspace whose
   content scrolls inside its own cards. Everywhere
   else the page flows and scrolls normally.
================================================== */

.cockpit {
  width: min(1600px, calc(100% - 1.5rem));

  margin: 0.6rem auto 0;
}

@media (min-width: 981px) and (min-height: 640px) {
  body {
    display: flex;
    flex-direction: column;

    height: 100vh;
    height: 100dvh;

    min-height: 0;

    overflow: hidden;
  }

  .app-bar {
    flex: none;
  }

  .cockpit {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;

    width: min(1600px, 94vw);
    min-height: 0;

    margin: 0.6rem auto 0.75rem;
  }

  .hud {
    flex: none;
  }

  .workspace-panel {
    flex: 1 1 auto;
  }

  .workspace-content {
    overflow-y: auto;

    overscroll-behavior: contain;

    scrollbar-color: var(--color-border-strong) transparent;
  }

  /* The gear cards scroll on their own, not the panel. */
  .workspace-content:has(.gear-workspace) {
    overflow: hidden;
  }

  .gear-workspace {
    height: 100%;
  }
}
