
  /* AI Writer: prompt hidden, output styled like a document page */
  #view-docgen .dg-msg.user,[data-view="docgen"] .dg-msg.user{ display:none !important; }

  /* writer-mode: keep only the export row visible in the composer */
  #view-docgen .dg-gen-composer.writer-mode #dgIn,
  #view-docgen .dg-gen-composer.writer-mode .dg-gen-composer-actions,
  [data-view="docgen"] .dg-gen-composer.writer-mode #dgIn,
  [data-view="docgen"] .dg-gen-composer.writer-mode .dg-gen-composer-actions{
    display:none !important;
  }

  #view-docgen .dg-msg.ai .bubble,[data-view="docgen"] .dg-msg.ai .bubble{
    background:var(--panel);
    border-left:3px solid var(--accent);
    padding:22px 28px;
  }
  #view-docgen .dg-msg.ai .bubble .dg-doc,[data-view="docgen"] .dg-msg.ai .bubble .dg-doc{
    font-family:var(--read);
    font-size:15.5px;
    line-height:1.75;
  }
  #view-docgen .dg-gen-msgs,[data-view="docgen"] .dg-gen-msgs{ padding:28px 32px; }

  /* The Document Generator already shows its form on the right;
     the welcome hero in the messages pane is redundant. */
  #dgEmpty{ display:none !important; }

  /* When the DocGen messages pane has nothing visible inside,
     collapse it so the form fills the space. */
  .dg-gen-msgs.is-empty { display: none !important; }

  /* When messages are empty, let the editor form expand to fill the
     whole main pane (uncapped), so the window feels larger and there
     is no dead space above or below it. The moment a document streams
     in, .is-empty drops and the form returns to its capped size. */
  .dg-gen-main:has(.dg-gen-msgs.is-empty) .dg-gen-form{
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
  }

  /* Make the form take the freed vertical space. */
  .dg-gen-form { flex: 1 1 auto; min-height: 0; overflow: auto; }
