#red-writing-workspace dialog.red-file-dialog {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: var(--file-viewport-height, 100dvh);
  max-height: none;
  top: var(--file-viewport-top, 0px);
  bottom: auto;
  margin: 0;
  border: 0;
  color: var(--red-ink);
  overflow: hidden;
}
#red-writing-workspace .red-file-dialog::backdrop { background: transparent; }
#red-writing-workspace .red-file-dialog .red-modal {
  box-sizing: border-box;
  min-width: 0;
  max-height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
}
#red-writing-workspace .red-file-dialog h2:focus { outline: none; }
#red-writing-workspace .red-file-dialog .red-modal-actions { flex-wrap: wrap; }
#red-writing-workspace .red-file-dialog .red-modal-actions button { min-height: 44px; white-space: normal; }
#red-writing-workspace .red-file-dialog .red-modal-actions .red-modal-primary { background: #a63942; border-color: #a63942; color: #fff; }
#red-writing-workspace .red-import-source { flex-wrap: wrap; }
#red-writing-workspace .red-import-source strong { min-width: 0; }
#red-writing-workspace .red-import-source span,
#red-writing-workspace .red-import-history-row p { color: var(--red-ink); opacity: .8; }
#red-writing-workspace .red-import-entry { grid-template-columns: auto minmax(0, 1fr); }
#red-writing-workspace .desk-import-organization label:not(.desk-import-choice) { flex-direction: column; align-items: stretch; }
#red-writing-workspace .desk-import-organization input[type=text] { min-height: 44px; width: 100%; box-sizing: border-box; }
#red-writing-workspace .desk-import-choice input { flex-shrink: 0; }
#red-writing-workspace .red-import-history-actions { flex-wrap: wrap; }
#red-writing-workspace .red-import-history-actions button { min-height: 44px; }
@media (max-width: 600px) {
  #red-writing-workspace dialog.red-file-dialog { padding: 12px; }
  #red-writing-workspace .red-file-dialog .red-modal { padding: 20px; }
  #red-writing-workspace .red-import-history-row { grid-template-columns: minmax(0, 1fr); }
  #red-writing-workspace .red-import-history-actions { grid-column: 1; grid-row: auto; }
}
