.rich-document {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.8;
}
.rich-document p, .rich-document li, .rich-document h2, .rich-document h3 {
  white-space: pre-wrap;
}
.rich-document p { margin: 0 0 .8em; }
.rich-document p:last-child { margin-bottom: 0; }
.rich-document h2, .rich-document h3 { margin: 1em 0 .45em; line-height: 1.35; }
.rich-document ul, .rich-document ol { margin: .65em 0; padding-inline-start: 1.8em; }
.rich-document ul { list-style: disc; }
.rich-document ol { list-style: decimal; }
.rich-document img.rich-photo {
  display: inline-block;
  height: auto;
  max-width: 100%;
  vertical-align: middle;
  margin: .25em 0;
  border-radius: 6px;
}
.rich-document .rich-small { width: min(30%, 15rem); }
.rich-document .rich-medium { width: min(60%, 32rem); }
.rich-document .rich-large { width: min(100%, 70rem); }
.rich-field { min-width: 0; margin: 16px 0; padding: 0; border: 0; }
.rich-field legend { margin-bottom: 7px; font-weight: 650; }
.rich-toolbox, .rich-image-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: #233c50; background: #f5f3ed; border: 1px solid #c9c3b6; padding: 6px; }
.rich-toolbox { border-radius: 9px 9px 0 0; border-bottom: 0; }
.rich-image-tools { margin-top: 6px; border-radius: 8px; gap: 8px; }
.rich-image-tools[hidden] { display:none; }
.rich-field .rich-toolbox button, .rich-field .rich-image-tools button, .rich-field select {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px; width: auto;
  min-height: 35px; min-width: 34px; margin: 0; padding: 3px 8px;
  border: 1px solid #c5c1b8; background: white; color: #213c51;
  border-radius: 5px; cursor:pointer; font: inherit; font-size: .86rem;
}
.rich-field select { display: inline-block; }
.rich-toolbox button:hover, .rich-image-tools button:hover { background: #edf3f6; }
.rich-canvas { min-height: 13rem; padding: 14px; background: #fff; border: 1px solid #b9b9b3; border-radius: 0 0 9px 9px; color: #213448; }
.rich-canvas:focus-visible { outline: 2px solid #49637a; outline-offset: -2px; }
.rich-canvas .rich-photo { cursor: pointer; }
.rich-canvas .rich-photo[data-selected] { outline: 3px solid #956909; outline-offset: -3px; }
.rich-moving .rich-canvas { cursor: crosshair; }
.rich-image-tools label { display: flex; align-items: center; gap: 5px; font-size: .86rem; flex-wrap: wrap; }
.rich-image-tools input { width: min(15rem, 100%); max-width: 100%; min-height: 35px; border: 1px solid #b7b6ad; border-radius: 5px; padding: 4px 7px; font: inherit; }
.rich-status { display: block; margin: 4px 0; color: #40556a; font-size: .86rem; }
.rich-status:empty { display:none; }
@media (pointer: coarse) {
  .rich-field .rich-toolbox button, .rich-field .rich-image-tools button, .rich-field select { min-height: 44px; }
}
