.factory-poster-dialog {
  box-sizing: border-box;
  width: min(480px, calc(100% - 28px));
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: clamp(14px, 4vw, 24px);
  overflow: auto;
  border: 1px solid #d8e3f5;
  border-radius: 16px;
  background: #fff;
  color: #172e50;
  box-shadow: 0 22px 85px #172e5040;
}

.factory-poster-dialog::backdrop { background: #14264199; }
.factory-poster-dialog [hidden] { display: none; }

.factory-poster-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.factory-poster-heading h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.4;
}

.factory-poster-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: #edf2fa;
  color: #304971;
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.factory-poster-status,
.factory-poster-hint {
  margin: 10px 0 0;
  color: #4c607d;
  font-size: 13px;
  line-height: 1.65;
  text-align: center;
}

.factory-poster-status:empty { margin: 0; }

.factory-poster-preview {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(62vh, 610px);
  max-height: min(62dvh, 610px);
  margin: 0 auto;
  border: 1px solid #d8e3f5;
  border-radius: 11px;
  object-fit: contain;
}

.factory-poster-dialog .factory-poster-download {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 9px;
  background: #2459ef;
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}

.factory-poster-dialog .factory-poster-download[hidden] { display: none; }
.factory-poster-dialog .factory-poster-download:hover { background: #1849d3; }
.factory-poster-dialog :focus-visible { outline: 3px solid #91b2f6; outline-offset: 3px; }
