.charter-page {
  background: var(--bg-sky);
}

.charter-page #header {
  position: static;
}

.charter-tool {
  padding: 28px 0 64px;
}

.charter-actions {
  width: min(1080px, calc(100vw - 24px));
  margin: 0 auto 20px;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
}

.charter-actions .retro-btn {
  min-width: 0;
  min-height: 0;
  padding: 0 14px;
  border: none;
  border-top: 7px solid #f8b300;
  background: #fed400;
  color: #231815;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 0.74;
  box-shadow: none;
}

.charter-actions .charter-save {
  background: #e8380d;
  border-top-color: #ec6800;
  color: #fff;
}

.charter-export-shell {
  --poster-scale: 1;
  padding: 0;
  border: 0;
  width: min(1080px, calc(100vw - 24px));
  margin: 0 auto;
  overflow: visible;
}

#poster {
  width: 1080px;
  height: 1350px;
  margin: 0 auto;
  padding: 58px 60px 62px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #13a0e9;
  color: #231815;
  font-family: var(--font-sans);
}

.poster-header {
  text-align: center;
  margin-bottom: 20px;
}

.poster-header h1 {
  margin: 0;
  line-height: 0;
}

.poster-header h1 span {
  display: inline-block;
  padding: 0 8px;
  background: #fed400;
  border-top: 20px solid #fff;
  font-size: 62px;
  font-weight: 400;
  line-height: 0.76;
  white-space: nowrap;
  color: #231815;
}

.poster-subtitle {
  display: inline-block;
  margin: 15px 0 0;
  padding: 0 8px;
  background: #f28e00;
  border-top: 12px solid #eb6800;
  color: #231815;
  font-size: 34px;
  font-weight: 400;
  line-height: 0.78;
}

.poster-document {
  flex: 1;
  min-height: 0;
  padding: 26px 30px 24px;
  background: #fff;
  column-count: 2;
  column-gap: 34px;
  column-rule: 2px solid rgba(19, 160, 233, 0.4);
}

.poster-document section {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  break-inside: avoid;
}

.poster-document h2,
.poster-document h3 {
  display: table;
  margin: 0 0 7px;
  padding: 0 5px;
  font-weight: 400;
  line-height: 0.88;
}

.poster-document h2 {
  background: #fed400;
  border-top: 8px solid #f8b300;
  font-size: 24px;
  color: #231815;
}

.poster-document h3 {
  margin-top: 5px;
  background: #94cdf4;
  border-top: 7px solid #14a0e9;
  color: #231815;
  font-size: 19px;
}

.poster-document p {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

.poster-signature {
  margin-top: 14px;
  text-align: right;
  break-inside: avoid;
}

#poster.is-exporting {
  transform: none !important;
  transform-origin: top left !important;
}

@media (max-width: 1120px) {
  .charter-tool {
    padding: 12px 0 28px;
  }

  .charter-actions {
    justify-content: center;
    margin-bottom: 10px;
  }

  .charter-export-shell {
    height: calc(1350px * var(--poster-scale));
  }

  #poster {
    margin: 0;
    transform: scale(var(--poster-scale));
    transform-origin: top left;
  }
}

@media (max-width: 768px) {
  .charter-tool {
    padding: 6px 0 20px;
  }

  .charter-actions {
    width: calc(100vw - 8px);
    margin-bottom: 6px;
    gap: 8px;
  }

  .charter-actions .retro-btn {
    font-size: 0.95rem;
  }

  .charter-export-shell {
    width: calc(100vw - 8px);
  }
}
