.publishing-dialog {
  width: min(100% - 32px, 480px);
  max-height: calc(100% - 32px);
  overflow: auto;
  border: 1px solid var(--line, #d7e7f8);
  border-radius: 18px;
  padding: 24px;
  background: var(--surface, #fff);
  color: var(--ink, #0e1728);
  box-shadow: 0 22px 48px -20px rgba(13, 61, 189, .45);
}
.publishing-dialog::backdrop { background: rgba(14, 23, 40, .55); }
.publishing-dialog h2 { margin: 0 0 12px; }
.publishing-dialog-message { white-space: pre-line; margin: 0 0 20px; }
.publishing-dialog-input { margin-bottom: 20px; }
.publishing-dialog-input input { width: 100%; }
.publishing-dialog-error { color: var(--red, #ad3549); margin: 8px 0 0; }
.publishing-dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }

/* The 排出去 panel in its own dialog (第二波 U3 3-E, mockups/U3-排程彈窗.html): wide enough for two platforms and the
   thumbnails, the card's own frame dropped, and the step's buttons kept in sight while the dialog scrolls on a phone. */
.publishing-dialog.publish-dialog { width: min(100% - 32px, 640px); padding: 0; }
.publish-dialog > .publish-panel { margin: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.publish-dialog { --dialog-pad: 22px; }
@media (max-width: 700px) { .publish-dialog { --dialog-pad: 18px; } }
.publish-dialog .publish-actions:not(:empty) { position: sticky; bottom: 0; z-index: 1; margin: 0 calc(-1 * var(--dialog-pad)); padding: 12px var(--dialog-pad) 16px; background: var(--surface, #fff); border-top: 1px solid var(--line, #d7e7f8); }
:root[data-theme="dark"] .publish-dialog .publish-actions:not(:empty) { background: var(--theme-surface); }
/* The choose step's bar also carries why 下一步 stopped, above its buttons, so the line is never under the bar (審查 sched-3E-redline-hidden). */
.publish-dialog .publish-choose-actions { display: grid; gap: 8px; }
/* Narrower than the page: a platform's name never breaks in the middle (「Instagra／m」 at 375px); the account may wrap. */
.publish-dialog .publish-switch > span:first-of-type { white-space: nowrap; }

/* Isolated candidate for reviewing the exact prepared image. */
.image-review-item { border-top: 1px solid var(--line, #d7e7f8); padding-top: 16px; }
.image-review-picture { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; object-fit: contain; }
