/* ---------- COLORS  ---------- */
/* Brand primary: black (replaces former blue #1864F2). */
/* ---------- FONTS  ---------- */
main.main-content:has(.word-template-edit) {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 0;
  overflow: hidden;
}
main.main-content:has(.word-template-edit) > .main-content__layout {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  width: 100%;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.main-content__layout > .word-template-edit {
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  max-width: none;
  min-height: 0;
  height: 100%;
}

@media only screen and (min-width: 921px) {
  main.main-content:has(.word-template-edit) {
    min-height: 0 !important;
    height: 100%;
    overflow: hidden;
  }
  main.main-content:has(.word-template-edit) > .main-content__layout {
    min-height: 0 !important;
    height: 100%;
    overflow: hidden;
  }
}
.word-template-edit {
  display: flex;
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  align-items: stretch;
  gap: 0;
  overflow: hidden;
}
.word-template-edit__main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.word-template-edit__toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px;
  border-bottom: 1px solid #e3e7ec;
  background: #FFFFFF;
  flex: none;
  min-height: 56px;
  position: relative;
}
.word-template-edit__toolbar-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  width: 100%;
}
.word-template-edit__back {
  flex: none;
}
.word-template-edit__lead {
  flex: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: #6b7280;
  white-space: nowrap;
}
.word-template-edit__filename {
  flex: 1 1 220px;
  min-width: 140px;
  max-width: 560px;
  display: flex;
  align-items: center;
}
.word-template-edit__filename .input-message {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.word-template-edit__filename .input-wrap {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 420px;
  position: relative;
}
.word-template-edit__filename .input-wrap__clear-field {
  bottom: auto;
  top: 50%;
  transform: translateY(-50%);
  right: 0;
  width: 16px;
  height: 16px;
}
.word-template-edit__filename .input-message__small-text {
  flex: 0 1 auto;
  margin-top: 0;
  white-space: nowrap;
  line-height: 1.2;
  font-size: 12px;
}
.word-template-edit__filename-input,
.word-template-edit__filename .small-input,
.word-template-edit__filename input {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 20px 0 0 !important;
  margin: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  line-height: 1.2 !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #131315 !important;
  width: 100%;
  white-space: nowrap;
}
.word-template-edit__filename-input:focus,
.word-template-edit__filename .small-input:focus,
.word-template-edit__filename input:focus {
  outline: none !important;
  box-shadow: none !important;
}
.word-template-edit__toolbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-wrap: wrap;
}
.word-template-edit__count {
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  white-space: nowrap;
}
.word-template-edit .pdf-viewer.word-template-edit__editor, .word-template-edit__editor {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 0;
  width: 100%;
  max-height: 100%;
  margin: 0 0 10px !important;
  padding: 0 !important;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #f0f2f4;
}
.word-template-edit__editor .e-de-ctn,
.word-template-edit__editor .e-documenteditor-container {
  width: 100% !important;
  max-width: 100%;
  height: 100% !important;
  flex: 1 1 auto;
  min-height: 0;
}
.word-template-edit__editor .e-de-ctn-toolbar {
  display: none !important;
}
.word-template-edit__editor .e-de-statusbar-pageweb {
  display: none !important;
}
.word-template-edit .e-de-status-bar .e-de-pagenumber-text,
.word-template-edit .e-de-pagenumber-text,
.word-template-edit #word-template-pagenumber-wrap {
  width: auto !important;
  max-width: 36px !important;
  margin-top: 0;
  display: inline-flex !important;
  align-items: center;
  align-self: center;
}
.word-template-edit .e-de-status-bar .e-de-pagenumber-input,
.word-template-edit .e-de-pagenumber-text .e-de-pagenumber-input,
.word-template-edit .e-de-pagenumber-input,
.word-template-edit .e-de-status-bar input.e-de-pagenumber-input,
.word-template-edit #word-template-pagenumber {
  width: 32px !important;
  min-width: 28px !important;
  max-width: 36px !important;
  height: 22px !important;
  min-height: 22px !important;
  padding: 0 4px !important;
  margin: 0 !important;
  border-width: 1px !important;
  font-size: 12px !important;
  line-height: 20px !important;
  text-align: center;
  box-sizing: border-box !important;
  vertical-align: middle;
}
.word-template-edit #word-template-pagenumber {
  position: relative;
  top: -2px;
}

.word-template-status-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
  margin-right: 8px;
  height: 100%;
}
.word-template-status-actions__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #374151;
  cursor: pointer;
}
.word-template-status-actions__btn:hover, .word-template-status-actions__btn:focus-visible {
  background: #eef1f4;
  color: #131315;
  outline: none;
}
.word-template-status-actions__btn.is-active {
  background: #eef0ff;
  color: #4f46e5;
}
.word-template-status-actions__btn .e-icons {
  font-size: 14px;
}
.word-template-status-actions__text-icon {
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  font-family: Inter, sans-serif;
}

.word-template-edit__panel-host {
  position: relative;
  flex: 0 0 320px;
  max-width: 360px;
  width: 320px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-left: 1px solid #e3e7ec;
  background: #FFFFFF;
}
.word-template-edit__panel-host .word-merge-panel {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
  border-left: none;
}

.word-merge-panel {
  flex: 0 0 320px;
  max-width: 360px;
  width: 320px;
  background: #FFFFFF;
  border-left: 1px solid #e3e7ec;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.word-merge-panel--draft {
  flex: 1 1 auto;
  width: 100%;
  max-width: none;
}
.word-merge-panel--draft .word-merge-panel__head {
  padding: 12px 12px 8px;
}
.word-merge-panel--draft .word-merge-panel__scroll {
  padding: 10px 12px 16px;
}
.word-merge-panel--draft .word-merge-panel__sub {
  font-size: 12px;
}
.word-merge-panel--draft .word-merge-panel__rule {
  margin: 14px 0 12px;
}
.word-merge-panel--draft .word-merge-panel__actions .button {
  white-space: normal;
}
.word-merge-panel--draft .word-merge-panel__fields {
  gap: 4px;
}
.word-merge-panel--draft .word-merge-panel__field-main {
  padding: 10px 12px 6px;
}
.word-merge-panel--draft .word-merge-panel__field-top {
  padding-right: 0;
}
.word-merge-panel--draft .word-merge-panel__bindings {
  margin-top: 8px;
  padding-left: 24px;
}
.word-merge-panel--draft .word-merge-panel__binding-row {
  flex-wrap: wrap;
  align-items: flex-start;
  row-gap: 2px;
}
.word-merge-panel--draft .word-merge-panel__binding-label {
  width: auto;
  flex: 1 1 0;
  min-width: 0;
}
.word-merge-panel--draft .word-merge-panel__binding-value,
.word-merge-panel--draft .word-merge-panel__binding-muted {
  flex: 1 1 100%;
  padding-left: 24px;
  box-sizing: border-box;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}
.word-merge-panel--draft .word-merge-panel__signer-row {
  padding: 0 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.word-merge-panel--draft input.word-merge-panel__prefill-input {
  width: 100% !important;
  height: 38px !important;
  min-height: 0;
  padding: 0 11px !important;
  border: 1.5px solid #dadee5 !important;
  border-radius: 2px !important;
  font: 500 13.5px "Inter", -apple-system, "Segoe UI", Roboto, sans-serif !important;
  line-height: 1.2;
  color: #131315 !important;
  background: #fff !important;
  margin: 0;
  outline: none;
  box-sizing: border-box;
}
.word-merge-panel--draft input.word-merge-panel__prefill-input:focus {
  border-color: #131315 !important;
}
.word-merge-panel--draft input.word-merge-panel__prefill-input::placeholder {
  color: #909597;
  font-weight: 400;
}
.word-merge-panel--draft .word-merge-panel__prefill-date-wrap {
  position: relative;
  width: 100%;
}
.word-merge-panel--draft .word-merge-panel__prefill-date-wrap input.word-merge-panel__prefill-input {
  padding-right: 28px !important;
}
.word-merge-panel--draft .word-merge-panel__prefill-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: #909597;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.word-merge-panel--draft .word-merge-panel__prefill-clear:hover, .word-merge-panel--draft .word-merge-panel__prefill-clear:focus-visible {
  color: #131315;
  background: #f8f9fc;
}
.word-merge-panel--draft select.word-merge-panel__signer,
.word-merge-panel--draft .word-merge-panel__select.word-merge-panel__signer {
  width: 100% !important;
  height: 38px !important;
  min-height: 0;
  padding: 0 10px !important;
  border: 1.5px solid #dadee5 !important;
  border-radius: 2px !important;
  font: 500 13px "Inter", -apple-system, "Segoe UI", Roboto, sans-serif !important;
  line-height: 1.2;
  background: #fff !important;
  color: #131315 !important;
  cursor: pointer;
  outline: none;
}
.word-merge-panel--draft select.word-merge-panel__signer:focus,
.word-merge-panel--draft .word-merge-panel__select.word-merge-panel__signer:focus {
  border-color: #131315 !important;
}
.word-merge-panel__head {
  padding: 16px 16px 10px;
  border-bottom: 1px solid #eef1f4;
}
.word-merge-panel__title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: #131315;
}
.word-merge-panel__sub {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #6b7280;
}
.word-merge-panel__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px 24px;
}
.word-merge-panel__section + .word-merge-panel__section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #eef1f4;
}
.word-merge-panel__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 8px;
}
.word-merge-panel__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  background: #eef1f4;
  color: #131315;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.word-merge-panel__prefill-db-btn {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 12px;
  min-height: 36px;
  height: auto !important;
  padding: 8px 10px !important;
  font-size: 12.5px !important;
  line-height: 1.25;
  white-space: normal;
}
.word-merge-panel__select {
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 10px 12px;
  border: 1px solid #dadee5;
  border-radius: 2px;
  font: 400 15px/1.2 "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #FFFFFF;
  color: #1a1d1f;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
}
.word-merge-panel__select:focus {
  border-color: #131315;
}
.word-merge-panel__prefill-input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1.5px solid #dadee5;
  border-radius: 2px;
  font: 500 13.5px "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #FFFFFF;
  color: #131315;
  outline: none;
  box-sizing: border-box;
}
.word-merge-panel__prefill-input:focus {
  border-color: #131315;
}
.word-merge-panel__prefill-input::placeholder {
  color: #909597;
  font-weight: 400;
}
.word-merge-panel__empty {
  margin: 0;
  font-size: 12.5px;
  color: #9ca3af;
}
.word-merge-panel__catalog, .word-merge-panel__static, .word-merge-panel__fields {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.word-merge-panel__catalog-item, .word-merge-panel__static-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid #e3e7ec;
  border-radius: 6px;
  background: #FFFFFF;
  padding: 8px 10px;
  cursor: pointer;
  color: #131315;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.word-merge-panel__field {
  display: block;
  width: 100%;
  border: 1px solid #e3e6e9;
  border-radius: 4px;
  background: #FFFFFF;
  padding: 0;
  color: #131315;
  transition: border-color 0.12s ease, background 0.12s ease;
  position: relative;
}
.word-merge-panel__field:hover {
  border-color: #131315;
  background: #f8fafc;
}
.word-merge-panel__field.is-active {
  border-color: #4f46e5;
  background: #eef0ff;
}
.word-merge-panel__field:hover .word-merge-panel__field-actions, .word-merge-panel__field:focus-within .word-merge-panel__field-actions, .word-merge-panel__field:hover .word-merge-panel__field-remove, .word-merge-panel__field:focus-within .word-merge-panel__field-remove {
  opacity: 1;
  pointer-events: auto;
}
.word-merge-panel__field-main {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  min-width: 0;
  text-align: left;
  border: none;
  background: transparent;
  padding: 14px 16px;
  cursor: pointer;
  color: inherit;
  box-sizing: border-box;
}
.word-merge-panel__field-top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  padding-right: 64px;
  box-sizing: border-box;
}
.word-merge-panel__field-top > .word-merge-panel__chip {
  margin-left: auto;
}
.word-merge-panel__glyph {
  flex: none;
  display: inline-flex;
  color: #6b7280;
}
.word-merge-panel__glyph--sm {
  color: inherit;
}
.word-merge-panel__field-name {
  font-size: 15px;
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1a1d1f;
}
.word-merge-panel__bindings {
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: 100%;
  margin-top: 12px;
  padding-left: 26px;
  box-sizing: border-box;
}
.word-merge-panel__binding-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  line-height: 1.3;
}
.word-merge-panel__binding-icon {
  flex: none;
  display: inline-flex;
  color: #9299a6;
}
.word-merge-panel__binding-label {
  flex: none;
  width: 118px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #9299a6;
}
.word-merge-panel__binding-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  color: #23282c;
}
.word-merge-panel__binding-muted {
  font-size: 13px;
  font-weight: 400;
  color: #b4bac2;
}
.word-merge-panel__chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 7px;
  border-radius: 2px;
  background: #eef1f4;
  color: #3c4247;
  font-size: 11px;
  font-weight: 500;
}
.word-merge-panel__chip--meta {
  margin-left: 0;
}
.word-merge-panel__token {
  color: #4f46e5;
  font-weight: 500;
}
.word-merge-panel__nomap {
  color: #9ca3af;
  font-weight: 500;
}
.word-merge-panel__allpages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid #e3e6e9;
  border-radius: 999px;
  background: #f5f7f9;
  color: #6f767e;
  font-size: 11px;
  font-weight: 500;
}
.word-merge-panel__field-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.word-merge-panel__field-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 1px solid #e3e6e9;
  border-radius: 2px;
  background: #FFFFFF;
  color: #9299a6;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.word-merge-panel__field-action:hover, .word-merge-panel__field-action:focus-visible {
  color: #3c4247;
  border-color: #c5cad3;
  background: #FFFFFF;
}
.word-merge-panel__field-action--danger:hover, .word-merge-panel__field-action--danger:focus-visible {
  color: #fa4d56;
  border-color: #fa4d56;
  background: #FFFFFF;
}
.word-merge-panel__field-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border: 1px solid #e3e6e9;
  border-radius: 2px;
  background: #FFFFFF;
  color: #9299a6;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.word-merge-panel__field-remove:hover, .word-merge-panel__field-remove:focus-visible {
  color: #fa4d56;
  border-color: #fa4d56;
  background: #FFFFFF;
}
.word-merge-panel__field--draft {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.word-merge-panel__signer-row {
  padding: 0 10px 8px;
}
.word-merge-panel__signer {
  height: 38px;
  font: 500 13px "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}
.word-merge-panel__signer-static {
  display: block;
  font-size: 12.5px;
  line-height: 1.35;
  color: #6b7280;
  font-weight: 500;
}
.word-merge-panel__signature-prefill {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.word-merge-panel__signature-pending {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 4px 6px 4px 8px;
  border: 1.5px solid #dadee5;
  border-radius: 2px;
  background: #fff;
  box-sizing: border-box;
}
.word-merge-panel__signature-preview {
  flex: 1 1 auto;
  min-width: 0;
  max-height: 44px;
  width: auto;
  height: 44px;
  object-fit: contain;
  object-position: left center;
  display: block;
}
.word-merge-panel__signature-btn {
  width: 100%;
  min-height: 32px;
  height: auto !important;
  padding: 6px 10px !important;
  font-size: 12.5px !important;
  line-height: 1.25;
  white-space: normal;
}
.word-merge-panel__prefill-clear--inline {
  position: static;
  transform: none;
  flex: 0 0 auto;
  align-self: center;
  margin-top: 0;
}
.word-merge-panel__add {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.word-merge-panel__add-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.word-merge-panel__connections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 4px;
  padding: 16px;
  border: 1px solid #e3e6e9;
  border-radius: 4px;
  box-sizing: border-box;
}
.word-merge-panel__helper {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #9299a6;
}
.word-merge-panel__field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #3c4247;
}
.word-merge-panel__input {
  width: 100%;
  height: auto !important;
  min-height: 0;
  padding: 10px 12px !important;
  border: 1px solid #dadee5 !important;
  border-radius: 2px !important;
  font: 400 15px/1.2 "Inter", -apple-system, "Segoe UI", Roboto, sans-serif !important;
  background: #FFFFFF !important;
  color: #1a1d1f !important;
  outline: none;
  box-sizing: border-box;
}
.word-merge-panel__input:focus {
  border-color: #131315 !important;
}
.word-merge-panel__input::placeholder {
  color: #9299a6;
  font-weight: 400;
}
.word-merge-panel__add-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.word-merge-panel__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  border: none;
  background: transparent;
  padding: 2px 0;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  color: #6b7280;
}
.word-merge-panel__toggle.is-on {
  color: #131315;
}
.word-merge-panel__toggle.is-on .word-merge-panel__toggle-box {
  border-color: #131315;
  background: #131315;
  box-shadow: inset 0 0 0 2px #FFFFFF;
}
.word-merge-panel__toggle-box {
  width: 14px;
  height: 14px;
  border: 1.5px solid #9ca3af;
  border-radius: 3px;
  background: #FFFFFF;
}
.word-merge-panel__error {
  margin: 0;
  font-size: 12px;
  color: #E2224D;
}
.word-merge-panel__add-btn {
  align-self: stretch;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  padding: 14px 20px;
  border-radius: 2px;
  font-size: 15px;
  font-weight: 600;
}
.word-merge-panel__rule {
  margin: 20px 0 16px;
  border: 0;
  border-top: 1px solid #e3e7ec;
}
.word-merge-panel__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.word-merge-panel__actions .button {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .word-template-edit {
    flex-direction: column;
    height: auto;
    min-height: calc(100dvh - 120px);
    overflow: visible;
  }
  .word-template-edit__panel-host {
    flex: none;
    width: 100%;
    max-width: none;
    border-left: none;
    border-top: 1px solid #e3e7ec;
    max-height: 42vh;
  }
  main.main-content:has(.word-template-edit) {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: calc(100dvh - 120px);
  }
  main.main-content:has(.word-template-edit) > .main-content__layout {
    height: auto;
    overflow: visible;
  }
  .word-merge-panel {
    flex: none;
    width: 100%;
    max-width: none;
    border-left: none;
    border-top: 1px solid #e3e7ec;
    max-height: 42vh;
  }
}
.modal-wrap--word-db-prefill .word-db-prefill-modal {
  max-width: 720px;
  width: calc(100vw - 32px);
  max-height: min(90vh, 100vh - 40px);
  display: flex;
  flex-direction: column;
}

.modal-wrap.modal-wrap--word-db-prefill.modal-wrap--word-db-prefill--mapped {
  padding: 16px 20px;
  overflow: hidden;
  align-items: stretch;
  justify-content: center;
}
.modal-wrap.modal-wrap--word-db-prefill.modal-wrap--word-db-prefill--mapped .word-db-prefill-modal.modal--small {
  height: 100% !important;
  max-height: 100%;
  width: min(720px, 100%);
  box-sizing: border-box;
}
.modal-wrap.modal-wrap--word-db-prefill.modal-wrap--word-db-prefill--mapped .fullbleed-buttons {
  flex: 0 0 auto;
}

.word-db-prefill-modal .modal__content {
  overflow: auto;
  max-height: calc(min(90vh, 100vh - 40px) - 62px);
}
.word-db-prefill-modal.word-db-prefill-modal--mapped .modal__content {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.word-db-prefill-modal.word-db-prefill-modal--mapped .word-db-prefill-modal__selected {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.word-db-prefill-modal.word-db-prefill-modal--mapped .word-db-prefill-modal__pool {
  flex: 0 1 auto;
  max-height: 22vh;
  overflow: auto;
}
.word-db-prefill-modal.word-db-prefill-modal--mapped .word-db-prefill-modal__map--scroll {
  flex: 1 1 auto;
  max-height: none;
  min-height: 8rem;
}
.word-db-prefill-modal__hint {
  margin: 0 0 16px;
  color: #6b7280;
}
.word-db-prefill-modal .form-label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}
.word-db-prefill-modal select.word-db-prefill-modal__select,
.word-db-prefill-modal input.word-db-prefill-modal__input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1.5px solid #dadee5;
  border-radius: 2px;
  font: 500 13.5px "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #fff;
  color: #131315;
  box-sizing: border-box;
  margin-bottom: 12px;
}
.word-db-prefill-modal__select--map {
  margin-bottom: 0;
}
.word-db-prefill-modal .word-db-prefill-modal__search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.word-db-prefill-modal .word-db-prefill-modal__search-row input.word-db-prefill-modal__input {
  flex: 1 1 auto;
  margin-bottom: 0;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  padding: 0 11px;
  border: 1.5px solid #dadee5;
  line-height: 1.2;
}
.word-db-prefill-modal .word-db-prefill-modal__search-row input.word-db-prefill-modal__input[type=search] {
  -webkit-appearance: none;
  appearance: none;
}
.word-db-prefill-modal .word-db-prefill-modal__search-row .button {
  flex: 0 0 auto;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  padding: 0 14px;
  font-size: 13.5px;
  line-height: 1.2;
  border-width: 1.5px;
  white-space: nowrap;
}
.word-db-prefill-modal__error {
  margin: 0 0 12px;
  color: #ae2443;
  font-size: 13px;
}
.word-db-prefill-modal__results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  margin-bottom: 8px;
}
.word-db-prefill-modal__results--hidden {
  display: none;
}
.word-db-prefill-modal__result {
  text-align: left;
  padding: 10px 12px;
  border: 1.5px solid #dadee5;
  border-radius: 2px;
  background: #fff;
  font: 500 13px "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #131315;
  cursor: pointer;
}
.word-db-prefill-modal__result:hover:not(:disabled) {
  border-color: #131315;
}
.word-db-prefill-modal__empty {
  margin: 8px 0;
  color: #6b7280;
  font-size: 13px;
}
.word-db-prefill-modal__selected-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1.5px solid #dadee5;
  border-radius: 2px;
  background: #f8f9fc;
}
.word-db-prefill-modal__selected-label {
  font: 600 13.5px "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #131315;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.word-db-prefill-modal__change {
  border: none;
  background: transparent;
  color: #2563eb;
  font: 600 12.5px "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}
.word-db-prefill-modal__pool-label, .word-db-prefill-modal__map-label {
  margin: 14px 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.word-db-prefill-modal__pool {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 36px;
  padding: 8px;
  border: 1.5px dashed #dadee5;
  border-radius: 2px;
  background: #fff;
}
.word-db-prefill-modal__pool-hint {
  margin: -4px 0 8px;
  font-size: 12px;
  line-height: 1.35;
  color: #909597;
}
.word-db-prefill-modal__pool-empty {
  font-size: 12.5px;
  color: #909597;
}
.word-db-prefill-modal__chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 10px;
  border: 1.5px solid #c7d2fe;
  border-radius: 2px;
  background: #eef2ff;
  color: #131315;
  font: 500 12.5px "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: grab;
  user-select: none;
}
.word-db-prefill-modal__chip:active {
  cursor: grabbing;
}
.word-db-prefill-modal__chip.is-picked {
  border-color: #131315;
  box-shadow: inset 0 0 0 1px #131315;
}
.word-db-prefill-modal__chip:disabled {
  opacity: 0.6;
  cursor: default;
}
.word-db-prefill-modal__map {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.word-db-prefill-modal__map--scroll {
  max-height: min(280px, 38vh);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px 8px;
  border: 1.5px solid #eef1f4;
  border-radius: 2px;
  background: #fff;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.word-db-prefill-modal__map-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #eef1f4;
}
.word-db-prefill-modal__map-row:last-child {
  border-bottom: 0;
}
.word-db-prefill-modal__map-field {
  min-width: 0;
}
.word-db-prefill-modal__map-name {
  display: block;
  font: 600 13px "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #131315;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.word-db-prefill-modal__map-slot {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 38px;
  padding: 2px 4px 2px 2px;
  border: 1.5px solid #dadee5;
  border-radius: 2px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.word-db-prefill-modal__map-slot.is-dragover {
  border-color: #2563eb;
  background: #eff6ff;
}
.word-db-prefill-modal__map-slot.has-chip {
  border-color: #a5b4fc;
  background: #f8faff;
}
.word-db-prefill-modal__slot-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: none;
  outline: none;
  background: transparent;
  font: 500 13px "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #131315;
}
.word-db-prefill-modal__slot-input::placeholder {
  color: #909597;
  font-weight: 400;
}
.word-db-prefill-modal__assigned-clear {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: transparent;
  color: #909597;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.word-db-prefill-modal__assigned-clear:hover, .word-db-prefill-modal__assigned-clear:focus-visible {
  color: #131315;
  background: #f8f9fc;
}

.word-merge-edit-modal .modal {
  max-width: 420px;
}
.word-merge-edit-modal__title {
  margin: 0 0 14px;
  font: 700 18px/1.3 "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #131315;
}
.word-merge-edit-modal__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-bottom: 4px;
}
.word-merge-edit-modal__field-name {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 700 20px/1.25 "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1a1d1f;
}
.word-merge-edit-modal .word-merge-panel__add-stack {
  gap: 12px;
}
.word-merge-edit-modal .word-merge-panel__connections {
  margin-top: 0;
  padding: 0;
  border: none;
  border-radius: 0;
}
.word-merge-edit-modal .word-merge-panel__chip {
  flex: none;
  margin-left: 0;
}

/*# sourceMappingURL=word-template-merge.css.map */
