.proposal-workspace-dialog {
  width: min(720px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  border: 0;
  border-radius: 24px;
  padding: 0;
  color: #17131f;
  background: #fff;
  box-shadow: 0 24px 90px rgba(23, 19, 31, .34);
}

.proposal-workspace-dialog::backdrop {
  background: rgba(12, 10, 15, .72);
  backdrop-filter: blur(8px);
}

.proposal-dialog-shell {
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: clamp(20px, 5vw, 36px);
}

.proposal-dialog-shell.is-compact { text-align: center; }

.proposal-dialog-shell > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.proposal-dialog-shell h2 {
  margin: 4px 0 8px;
  font-size: clamp(24px, 6vw, 36px);
  line-height: 1;
  letter-spacing: -.045em;
}

.proposal-dialog-shell p { margin: 0; color: #6a6470; line-height: 1.55; }
.proposal-dialog-kicker { color: #df2636; font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }

.proposal-dialog-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid #ddd7df;
  border-radius: 999px;
  padding: 0;
  color: #17131f;
  background: #fff;
  font-size: 26px;
  cursor: pointer;
}

.proposal-publish-checklist__items { display: grid; gap: 10px; }

.proposal-publish-checklist__items label {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 12px;
  border: 1px solid #e3dde5;
  border-radius: 14px;
  padding: 13px 14px;
  background: #faf8fa;
  cursor: pointer;
}

.proposal-publish-checklist__items input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #df2636;
}

.proposal-publish-checklist footer,
.proposal-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.proposal-dialog-message { min-height: 22px; margin-top: 12px !important; color: #a51524 !important; font-weight: 700; }
.proposal-published-link { display: block; margin: 20px 0; overflow-wrap: anywhere; color: #a51524; font-weight: 800; }
.proposal-dialog-shell.is-compact .proposal-dialog-actions { justify-content: center; }

.proposal-preview-dialog {
  width: min(1440px, 100vw);
  height: min(100dvh, 980px);
  max-height: 100dvh;
  border-radius: 0;
  background: #0c0c0f;
}

.proposal-preview-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); width: 100%; height: 100%; }

.proposal-preview-shell > header {
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  padding: 10px 14px;
  color: #fff;
  background: rgba(12, 12, 15, .96);
}

.proposal-preview-shell > header > strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proposal-preview-devices { display: flex; flex: 0 0 auto; gap: 8px; }
.proposal-preview-canvas { min-width: 0; min-height: 0; overflow: hidden; }
.proposal-preview-canvas .proposal-renderer { min-height: 0; }

.proposal-history-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }

.proposal-history-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #e3dde5;
  border-radius: 14px;
  padding: 14px;
}

.proposal-history-list li > div { display: grid; min-width: 0; gap: 4px; }
.proposal-history-list span { color: #746e79; font-size: 12px; overflow-wrap: anywhere; }

@media (max-width: 559px) {
  .proposal-workspace-dialog:not(.proposal-preview-dialog) { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .proposal-dialog-shell { max-height: 100dvh; padding: 20px 16px 104px; }
  .proposal-publish-checklist footer .proposal-button { flex: 1 1 140px; }
  .proposal-preview-shell > header { align-items: flex-start; flex-direction: column; }
  .proposal-preview-devices { width: 100%; overflow-x: auto; }
  .proposal-preview-devices .proposal-button { flex: 1 0 auto; }
  .proposal-history-list li { align-items: stretch; flex-direction: column; }
  .proposal-history-list .proposal-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .proposal-workspace-dialog::backdrop { backdrop-filter: none; }
}
