#npl-course-launcher {
  --npl-gap: 12px;
  --npl-right: max(var(--npl-gap), env(safe-area-inset-right, 0px));
  --npl-left: max(var(--npl-gap), env(safe-area-inset-left, 0px));
  --npl-bottom: max(var(--npl-gap), env(safe-area-inset-bottom, 0px));
  position: fixed;
  right: var(--npl-right);
  bottom: max(var(--npl-launcher-bottom, 120px), var(--npl-bottom));
  z-index: 99990;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
#npl-course-launcher[hidden], #npl-course-launcher [hidden] { display: none !important; }
#npl-course-launcher .npl-launch, #npl-course-launcher .npl-close {
  appearance: none;
  margin: 0;
  padding: 9px 16px;
  min-height: 44px;
  border: 0;
  border-radius: 24px;
  background: #173345;
  color: #fff;
  line-height: 1.4;
  font-family: inherit;
  font-weight: 650;
  font-size: 14px;
  cursor: pointer;
}
#npl-course-launcher .npl-launch { box-shadow: 0 3px 12px #0c1f2d40; }
#npl-course-launcher .npl-launch span { margin-right: 6px; color: #90e1c9; font-family: monospace; }
#npl-course-panel {
  position: fixed;
  right: var(--npl-right);
  bottom: calc(var(--npl-bottom) + var(--npl-keyboard-inset, 0px));
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(740px, calc(100vw - var(--npl-left) - var(--npl-right)));
  max-height: calc(var(--npl-visible-height, 100vh) - var(--npl-bottom) - max(var(--npl-gap), env(safe-area-inset-top, 0px), var(--wp-admin--admin-bar--height, 0px)));
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 12px 42px #0c1f2d40;
}
#npl-course-panel .npl-panel-bar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 5px 0 16px; background: #173345; color: #fff; }
#npl-course-panel .npl-panel-body { position: relative; min-height: 0; overflow: auto; overscroll-behavior: contain; }
#npl-course-panel .npl-root { margin: 0; }
#npl-course-panel .npl-shell { border: none; border-radius: 0; }
/* Keep the prompt visible while the controls and terminal history scroll independently. */
#npl-course-panel { height: min(740px, 82vh); }
#npl-course-panel .npl-panel-body { flex: 1; overflow: hidden; }
#npl-course-panel .npl-root, #npl-course-panel .npl-shell { height: 100%; }
#npl-course-panel .npl-shell, #npl-course-panel .npl-free-cli-main { display: flex; flex-direction: column; }
#npl-course-panel .npl-free-controls { flex: 0 1 auto; max-height: 46%; overflow: auto; }
#npl-course-panel .npl-free-cli-main, #npl-course-panel .npl-terminal, #npl-course-panel .npl-terminal-output { flex: 1; min-height: 0; }
#npl-course-panel .npl-terminal-output { max-height: none; }
#npl-course-panel .npl-terminal-heading, #npl-course-panel .npl-command-form { flex: none; }
#npl-course-panel .npl-command-input { font-size: 16px; }
#npl-course-launcher .npl-launch:focus-visible, #npl-course-launcher .npl-close:focus-visible { outline: 3px solid #63b8ef; outline-offset: -3px; }
/* L-Hub's floating chat control occupies the 120px row where it is enabled. */
body:has(.mwai-open-button) #npl-course-launcher { --npl-launcher-bottom: 184px; }
