.post-preview {
  position: fixed;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(640px, calc(100vw - 24px));
  max-height: min(580px, calc(100dvh - 24px));
  overflow: hidden;
  border: 1px solid #d7e1ef;
  border-radius: 12px;
  background: #fff;
  color: #34445d;
  box-shadow: 0 12px 48px #1c345b2b, 0 2px 8px #1c345b12;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: left;
  line-height: 1.5;
}
.post-preview[hidden], .post-preview [hidden] { display: none !important; }
.post-preview-header { display: flex; align-items: flex-start; gap: 14px; padding: 15px 17px 10px; flex-shrink: 0; }
.post-preview-header > div { min-width: 0; flex: 1; }
.post-preview-eyebrow { display: block; font-size: 10px; color: #7388ad; margin-bottom: 3px; }
.post-preview h2 { margin: 0; color: #2c405f; font-size: 15px; line-height: 1.55; font-weight: 650; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-preview button { font: inherit; cursor: pointer; }
.post-preview .post-preview-close { flex-shrink: 0; width: 32px; height: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 6px; background: #f2f5fa; color: #627493; font-size: 23px; line-height: 1; }
.post-preview-status { flex-shrink: 0; margin: 0; padding: 0 17px 10px; color: #8391a6; font-size: 10px; overflow-wrap: anywhere; }
.post-preview-status.is-error { color: #9b6835; }
.post-preview-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px 17px 18px; border-top: 1px solid #edf1f7; color: #465873; font-size: 13px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; scrollbar-width: thin; }
.post-preview-footer { display: flex; align-items: center; flex-shrink: 0; gap: 12px; padding: 9px 17px; border-top: 1px solid #e8eef6; background: #f9fbff; color: #96a2b5; font-size: 10px; }
.post-preview-footer > span { margin-right: auto; }
.post-preview-footer a { display: inline-flex; align-items: center; min-height: 28px; color: #4f73b3; text-decoration: none; font-size: 11px; white-space: nowrap; }
.post-preview-footer a:hover { text-decoration: underline; }
.post-preview .post-preview-retry { min-height: 28px; padding: 3px 7px; border: 1px solid #dae3f1; background: white; color: #5b76a6; border-radius: 5px; font-size: 10px; }
.post-preview :focus-visible { outline: 2px solid #6b91d9; outline-offset: -2px; }
.post-preview-trigger { touch-action: manipulation; }
/* Short landscape viewports scroll the whole preview so its body/footer remain reachable. */
.post-preview.is-short { overflow-y: auto; overscroll-behavior: contain; }
.post-preview.is-short .post-preview-body { flex-shrink: 0; overflow: visible; }
@media (max-width: 600px) {
  .post-preview { border-radius: 10px; }
  .post-preview-header { padding: 12px 13px 8px; }
  .post-preview h2 { font-size: 14px; }
  .post-preview-status { padding: 0 13px 9px; }
  .post-preview-body { padding: 12px 13px 16px; font-size: 12px; }
  .post-preview-footer { padding: 7px 13px; gap: 9px; }
}
@media (pointer: coarse) {
  .post-preview .post-preview-close { width: 40px; height: 40px; }
  .post-preview-footer a, .post-preview .post-preview-retry { min-height: 36px; }
}
