/* Background controls, settings panes, crop editor, placement, and shared form controls. */
.td-background-controls {
  animation: tdFadeSlideIn .2s ease both;
}

.td-shadow-section {
  margin-top: 18px;
}

.td-shadow-card {
  overflow: hidden;
  border: 1px solid #e0d9d6;
  border-radius: 8px;
  background: #fbfbfc;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.td-shadow-card:hover {
  border-color: #d0c5c1;
  background: #fff;
}

.td-shadow-card.is-on {
  background: #fff;
  box-shadow: 0 8px 20px rgba(36, 31, 32, .06);
}

.td-shadow-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #332d2f;
  cursor: pointer;
  padding: 13px 14px;
  text-align: left;
}

.td-shadow-toggle:focus-visible {
  outline: 2px solid #0b84ff;
  outline-offset: -3px;
}

.td-shadow-controls {
  border-top: 1px solid #ece9e7;
  padding: 0 14px 14px;
  animation: tdFadeSlideIn .2s ease both;
}

.td-shadow-note {
  margin: 0 0 12px;
  padding-top: 12px;
  color: #6d6669;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
}

.td-background-transparency {
  margin-bottom: 14px;
}

.td-background-transparency .td-switch-row {
  margin-bottom: 10px;
}

.td-background-transparency-controls {
  animation: tdFadeSlideIn .2s ease both;
}

.td-transparency-note {
  margin-top: -2px;
  margin-bottom: 14px;
}

.td-settings-panel {
  margin: 0 0 14px;
  border: 0;
  border-radius: 0;
  background: #fff;
  overflow: visible;
}

.td-text-target-panel .td-edit-target {
  margin: 12px 12px 0;
}

.td-text-target-panel .td-individual-editor {
  margin: 12px 12px 0;
}

.td-text-target-panel .td-settings-tabs {
  margin-top: 12px;
}

.td-settings-tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-bottom: 1px solid #ece9e7;
  border-radius: 0;
  background: #fff;
  padding: 10px 12px;
}

.td-settings-tabs.is-three-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.td-settings-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #615b5e;
  cursor: pointer;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
}

.td-settings-tabs.is-three-tabs .td-settings-tab {
  gap: 5px;
  padding: 8px 7px;
  font-size: 12px;
}

.td-settings-tabs.is-three-tabs .td-settings-tab-icon {
  width: 17px;
  height: 17px;
}

.td-settings-tab:hover {
  border-color: #ded6d9;
  background: #fff;
}

.td-settings-tab.is-active {
  border-color: #c64b7f;
  background: #fff;
  color: #9f315b;
  box-shadow: 0 8px 24px rgba(157, 49, 91, .12);
}


.td-settings-tab-dot {
  display: block;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: currentColor;
}

.td-settings-tab-dot-position {
  border-radius: 999px;
}

.td-settings-tab-dot-background {
  border-radius: 2px;
  box-shadow: inset 0 0 0 4px #fff;
}

.td-settings-tab-icon {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.td-settings-tab span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-settings-pane {
  min-width: 0;
  padding: 18px 12px;
}

.td-settings-panel-background .td-settings-pane {
  padding: 18px 12px;
}

.td-background-group-title {
  margin: 0 0 10px;
  color: #332d2f;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
}

.td-background-size-block {
  margin-top: 18px;
  border-top: 1px solid #ece9e7;
  padding-top: 18px;
}

.td-panel-tabs-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.td-panel-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 10px;
}

.td-panel-tab {
  display: flex;
  min-width: 0;
  min-height: 58px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  border: 1px solid #d8dce3;
  border-radius: 8px 8px 0 0;
  background: #fff;
  color: #3b3537;
  cursor: pointer;
  padding: 10px 12px;
  text-align: left;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.td-panel-tab:hover {
  border-color: #cfd7e1;
  background: #fbfbfc;
}

.td-panel-tab.is-active {
  border-color: #bd4a78;
  background: #fff7fb;
  box-shadow: inset 0 -3px 0 #bd4a78;
  color: #241f20;
}

.td-panel-tab-title {
  overflow: hidden;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-panel-tab-summary {
  overflow: hidden;
  color: #6d6669;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-panel-tab-body {
  min-width: 0;
}

.td-tab-panel-section {
  min-width: 0;
}

.td-tab-panel-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.td-tab-panel-header h3 {
  margin: 0;
  color: #241f20;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
}

.td-tab-panel-header p {
  margin: 0;
  color: #6d6669;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.td-accordion-card {
  margin: 0 0 14px;
  border: 1px solid #d8dce3;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.td-accordion-card.is-open {
  border-color: #cfd7e1;
}

.td-accordion-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  background: #fff;
  color: #241f20;
  cursor: pointer;
  padding: 16px 18px;
  text-align: left;
  transition: background-color .2s ease, border-color .2s ease;
}

.td-accordion-header:hover {
  background: #fbfbfc;
}

.td-accordion-card.is-open .td-accordion-header {
  border-bottom: 1px solid #ece9e7;
}

.td-accordion-title {
  font-size: 24px;
  font-weight: 900;
  line-height: 1.25;
}

.td-accordion-summary {
  min-width: 0;
  overflow: hidden;
  color: #6d6669;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-accordion-icon {
  position: relative;
  display: grid;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #f1ece9;
  color: #7a5369;
  font-weight: 900;
  place-items: center;
  transition: background-color .2s ease, color .2s ease, transform .22s ease;
}

.td-accordion-card.is-open .td-accordion-icon {
  transform: rotate(180deg);
}

.td-accordion-icon::before,
.td-accordion-icon::after {
  position: absolute;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.td-accordion-icon.is-plus::after {
  transform: rotate(90deg);
}

.td-accordion-body-wrap {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  transition: grid-template-rows .24s cubic-bezier(.2, .8, .2, 1), opacity .18s ease;
}

.td-accordion-card.is-open .td-accordion-body-wrap {
  grid-template-rows: 1fr;
  opacity: 1;
}

.td-accordion-body {
  min-height: 0;
  overflow: hidden;
  padding: 18px;
}

.td-inner-section {
  margin-top: 18px;
  border-top: 1px solid #ece9e7;
  padding-top: 18px;
}

.td-placement-section {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.td-placement-description {
  margin: 0 0 12px;
  color: #6d6669;
  font-size: 12px;
  font-weight: 700;
}

.td-inner-section-header {
  margin-bottom: 12px;
}

.td-inner-section-header h4 {
  margin: 0;
  color: #241f20;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.td-inner-section-header p {
  margin: 4px 0 0;
  color: #6d6669;
  font-size: 12px;
  font-weight: 700;
}

@keyframes tdFadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.td-subsection {
  margin: 0 0 18px;
  border-radius: 8px;
  border: 0;
  background: #f3f3f4;
  padding: 16px;
}

.td-setting-card {
  margin: 0 0 18px;
  border: 1px solid #d8dce3;
  border-radius: 8px;
  background: #fff;
  padding: 22px;
}

.td-setting-card-header {
  margin-bottom: 18px;
}

.td-setting-card h4 {
  margin: 0;
  color: #241f20;
  font-size: 25px;
  line-height: 1.3;
  font-weight: 900;
}

.td-setting-card p {
  margin: 8px 0 0;
  color: #5f595b;
  font-size: 16px;
  font-weight: 700;
}

.td-subsection-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.td-subsection h4 {
  margin: 0;
  color: #241f20;
  font-size: 25px;
  line-height: 1.3;
  font-weight: 900;
}

.td-subsection p {
  margin: 8px 0 0;
  color: #5f595b;
  font-size: 16px;
  font-weight: 700;
}

.td-text-button {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: #9f315b;
  cursor: pointer;
  padding: 4px 0;
  font-size: 12px;
  font-weight: 900;
}

.td-outline-add-button {
  min-height: 32px;
  border: 1px solid #d7c9cf;
  border-radius: 6px;
  background: #fff;
  color: #8f2e56;
  cursor: pointer;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 900;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.td-outline-add-button:disabled,
.td-text-button:disabled {
  color: #aaa3a6;
  cursor: not-allowed;
  opacity: .62;
}

.td-outline-add-button:hover {
  border-color: #bd4a78;
  background: #fff7fb;
  color: #7f274b;
}

.td-outline-add-button:focus-visible {
  outline: 2px solid #0b84ff;
  outline-offset: 2px;
}

.td-upload-shell {
  position: relative;
}

.td-upload {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid #d9d2ce;
  border-radius: 8px;
  background: #fff;
  cursor: default;
  padding: 14px;
}

.td-upload:hover {
  border-color: #bd4a78;
  background: #fffafd;
}

.td-upload.is-active {
  border-color: #bd4a78;
  background: #fff7fb;
}

.td-upload.is-crop-open {
  gap: 8px 12px;
}

.td-field .td-upload-picker,
.td-upload-picker {
  display: contents;
  margin: 0;
}

.td-upload-picker > span {
  cursor: pointer;
}

.td-upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.td-upload-icon {
  display: grid;
  grid-column: 1;
  grid-row: span 2;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #f4e8ee;
  color: #9f315b;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  place-items: center;
}

.td-upload-main {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  color: #2f292b;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-upload-sub {
  grid-column: 2;
  color: #7d7477;
  font-size: 12px;
  font-weight: 700;
}

.td-upload-preview-wrap {
  position: relative;
  grid-column: 3;
  grid-row: 1 / span 2;
  display: block;
  width: 64px;
  height: 48px;
}

.td-upload-preview {
  width: 64px;
  height: 48px;
  border: 1px solid rgba(159, 49, 91, .18);
  border-radius: 6px;
  background: #fff;
  object-fit: cover;
}

.td-upload-actions {
  display: flex;
  grid-column: 2 / 4;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
  margin-top: 8px;
}

.td-upload-crop-toggle {
  min-height: 34px;
  border: 1px solid #d7a5ba;
  border-radius: 7px;
  background: #fff8fb;
  color: #8f2e56;
  cursor: pointer;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 900;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.td-upload-crop-toggle:hover,
.td-upload-crop-toggle.is-active {
  border-color: #bd4a78;
  background: #fff0f6;
  color: #7f274b;
  box-shadow: 0 4px 14px rgba(189, 74, 120, .12);
}

.td-upload-remove {
  z-index: 2;
  display: grid;
  grid-column: 3;
  grid-row: 1 / span 2;
  justify-self: end;
  align-self: start;
  width: 32px;
  height: 32px;
  margin-top: -10px;
  margin-right: -10px;
  border: 1px solid rgba(36, 31, 32, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 2px 8px rgba(36, 31, 32, .18);
  color: #7f274b;
  cursor: pointer;
  padding: 0;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  place-items: center;
}

.td-upload-remove:hover {
  background: #fff0f6;
  border-color: #bd4a78;
}

.td-background-crop-editor.td-crop-editor {
  grid-column: 1 / -1;
  margin-top: 12px;
  border: 0;
  border-top: 1px solid #eadde3;
  border-radius: 0;
  background: transparent;
  padding: 14px 0 0;
}

.td-background-image-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  border: 1px solid #d9d2ce;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.td-background-image-preview {
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid #ece9e7;
  border-radius: 7px;
  background: #f5f6f8;
}

.td-background-image-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.td-background-image-meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.td-background-image-meta strong,
.td-background-image-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-background-image-meta strong {
  color: #2f292b;
  font-size: 14px;
  font-weight: 900;
}

.td-background-image-meta span {
  color: #6d6669;
  font-size: 12px;
  font-weight: 700;
}

.td-background-image-meta .td-background-image-label {
  color: #9f315b;
  font-size: 11px;
  font-weight: 900;
}

.td-background-image-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.td-background-change-button,
.td-background-remove-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  text-align: center;
}

.td-background-remove-button {
  min-width: 72px;
}

.td-background-position-controls {
  margin-bottom: 14px;
}

.td-individual-editor {
  margin: 0;
  min-width: 0;
}

.td-individual-editor .td-panel {
  margin: 0;
  min-width: 0;
  border-radius: 6px;
  background: #f3f3f4;
  padding: 14px;
}

.td-individual-editor .td-panel-header {
  align-items: center;
}

.td-field label {
  display: block;
  margin-bottom: 7px;
  color: #413b3d;
  font-size: 12px;
  font-weight: 900;
}

.td-field select,
.td-field input[type="number"] {
  width: 100%;
  border: 1px solid #d9d2ce;
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
}

.td-field input[type="range"] {
  width: 100%;
}

.td-font-picker-field {
  position: relative;
}

.td-font-picker-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 52px;
  border: 1px solid #d9d2ce;
  border-radius: 8px;
  background: #fff;
  color: #241f20;
  cursor: pointer;
  padding: 9px 12px;
  text-align: left;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.td-font-picker-trigger.is-open {
  border-color: #9f6b93;
  box-shadow: 0 0 0 3px rgba(159, 107, 147, .12);
}

.td-font-picker-current,
.td-font-option-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.td-font-picker-name,
.td-font-option-name {
  overflow: hidden;
  color: #241f20;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-font-picker-sample,
.td-font-option-sample {
  overflow: hidden;
  color: #736b6f;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.td-font-picker-caret {
  position: relative;
  width: 18px;
  height: 18px;
}

.td-font-picker-caret::before {
  position: absolute;
  top: 5px;
  left: 4px;
  width: 9px;
  height: 9px;
  border-right: 2px solid #6f666a;
  border-bottom: 2px solid #6f666a;
  content: "";
  transform: rotate(45deg);
}

.td-font-menu {
  position: absolute;
  z-index: 20;
  right: 0;
  left: 0;
  margin-top: 6px;
  border: 1px solid #d8dce3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(37, 31, 34, .16);
  padding: 10px;
}

.td-font-search {
  width: 100%;
  min-height: 40px;
  border: 1px solid #d9d2ce;
  border-radius: 7px;
  padding: 8px 10px;
  font-weight: 700;
}

.td-font-menu-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 2px 2px;
}

.td-font-group {
  display: grid;
  gap: 2px;
}

.td-font-group-title {
  color: #8b8387;
  padding: 6px 8px 3px;
  font-size: 11px;
  font-weight: 900;
}

.td-font-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  text-align: left;
}

.td-font-option:hover,
.td-font-option.is-active {
  background: #f4f8fb;
}

.td-font-option-check {
  color: #1d6fc7;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.td-font-empty {
  color: #7d7477;
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 700;
}

.td-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.td-field-label-row label {
  margin: 0;
}

.td-range-control {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 144px;
  gap: 14px;
  align-items: center;
}

.td-app .td-range-reset {
  min-height: 24px;
  border: 1px solid #d7c9cf;
  border-radius: 5px;
  background: #fff;
  color: #8f2e56;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}

.td-app .td-range-reset:hover:not(:disabled) {
  border-color: #bd4a78;
  background: #fff7fb;
  color: #7f274b;
}

.td-app .td-range-reset:disabled {
  cursor: default;
  opacity: .42;
}

.td-app .td-range-reset:focus-visible {
  outline: 2px solid #0b84ff;
  outline-offset: 2px;
}

.td-range-control input[type="range"] {
  width: 100%;
  accent-color: #9f6b93;
}

.td-value-input {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto 28px;
  gap: 4px;
  align-items: center;
  min-height: 42px;
  border: 1px solid #d9d2ce;
  border-radius: 8px;
  background: #fff;
  padding: 0 5px;
}

.td-value-stepper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: #f7f3f6;
  color: #8f2e56;
  cursor: pointer;
  padding: 0;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  touch-action: manipulation;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}

.td-value-stepper:hover:not(:disabled) {
  background: #fff0f6;
  color: #7f274b;
}

.td-value-stepper:disabled {
  cursor: default;
  color: #c8b8c0;
  opacity: .55;
}

.td-value-input input[type="number"] {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 900;
  outline: none;
  text-align: center;
}

.td-value-input span {
  color: #766d72;
  font-size: 12px;
  font-weight: 900;
}

.td-crop-editor {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid #e0d9d6;
  border-radius: 8px;
  background: #fbfbfc;
  padding: 12px;
}

.td-crop-editor-summary {
  margin-top: 2px;
  border: 0;
  background: transparent;
  padding: 0;
}

.td-crop-button {
  width: 100%;
  min-height: 38px;
  margin-top: 8px;
  border: 1px solid #d7c9cf;
  border-radius: 7px;
  background: #fff;
  color: #8f2e56;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.td-crop-button:hover {
  border-color: #bd4a78;
  background: #fff7fb;
}

.td-crop-reset {
  justify-self: start;
}

.td-crop-preview-shell {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 760px;
  min-height: 250px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #f0f0f1;
  padding: 0;
  justify-self: center;
}

.td-crop-source-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100%;
  min-height: 220px;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #9c9c9c;
  box-shadow: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
  box-sizing: border-box;
  padding: 10px;
}

.td-crop-image-box {
  position: relative;
  display: block;
  width: min(100%, calc(min(360px, 56vh) * var(--td-crop-image-ratio, 1)));
  max-width: 100%;
  max-height: min(360px, 56vh);
}

.td-crop-source-stage:active {
  cursor: grabbing;
}

.td-crop-source-image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: inherit;
  border-radius: 0;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.td-crop-selection-frame {
  position: absolute;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  border: 2px solid #5bb6ff;
  box-shadow: 0 0 0 999px rgba(36, 31, 32, .42);
  pointer-events: none;
  transform: none;
}

.td-crop-selection-frame::before,
.td-crop-selection-frame::after {
  display: none;
  content: none;
}

.td-crop-editor .td-field {
  min-width: 0;
}

.td-crop-editor .td-field-label-row label {
  white-space: nowrap;
}

.td-crop-editor .td-range-control {
  grid-template-columns: minmax(120px, 1fr) 144px;
}

.td-text-align-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  border-radius: 8px;
  background: #f1ece9;
  padding: 4px;
}

.td-text-align-button {
  display: grid;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5c5356;
  cursor: pointer;
  place-items: center;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

.td-text-align-button:hover {
  background: #fff;
}

.td-text-align-button.is-active {
  background: #fff;
  color: #241f20;
  box-shadow: 0 1px 2px rgba(36, 31, 32, .08);
}

.td-text-align-button:focus-visible {
  outline: 2px solid #0b84ff;
  outline-offset: 2px;
}

.td-align-icon {
  display: grid;
  gap: 3px;
  width: 22px;
}

.td-align-icon span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.td-align-icon span:nth-child(1),
.td-align-icon span:nth-child(3) {
  width: 22px;
}

.td-align-icon span:nth-child(2) {
  width: 15px;
}

.td-align-icon span:nth-child(4) {
  width: 18px;
}

.td-align-icon-start {
  justify-items: start;
}

.td-align-icon-center {
  justify-items: center;
}

.td-align-icon-end {
  justify-items: end;
}

.td-size-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 14px;
  border-radius: 8px;
  background: #f1ece9;
  padding: 4px;
}

.td-size-mode-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #655c60;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
}

.td-size-mode-button.is-active {
  border-color: #c64b7f;
  background: #fff;
  color: #9f315b;
  box-shadow: 0 8px 24px rgba(157, 49, 91, .12);
}

.td-size-mode-icon {
  display: block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.td-segment-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  border-radius: 8px;
  background: #f1ece9;
  padding: 4px;
}

.td-segment-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #655c60;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.td-segment-button.is-active {
  background: #fff;
  color: #241f20;
}

.td-segment-button:hover {
  background: rgba(255, 255, 255, .72);
}

.td-segment-button:focus-visible {
  outline: 2px solid #0b84ff;
  outline-offset: 2px;
}

.td-padding-box-field {
  display: grid;
  gap: 8px;
}

.td-padding-box-field .td-range-control {
  margin-bottom: 0;
}

.td-padding-mode-control {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 5px;
  border-radius: 8px;
  background: #f1ece9;
  padding: 4px;
}

.td-padding-mode-button {
  min-width: 0;
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #655c60;
  cursor: pointer;
  padding: 0 6px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
}

.td-padding-mode-button:hover {
  background: rgba(255, 255, 255, .72);
}

.td-padding-mode-button.is-active {
  border-color: #c64b7f;
  background: #fff;
  color: #9f315b;
  box-shadow: 0 6px 16px rgba(157, 49, 91, .1);
}

.td-padding-mode-button:focus-visible {
  outline: 2px solid #0b84ff;
  outline-offset: 2px;
}

.td-segment-icon {
  flex: 0 0 auto;
  display: block;
  width: 22px;
  height: 22px;
  color: currentColor;
}

.td-segment-label {
  min-width: 0;
}

.td-field-inline {
  display: grid;
  grid-template-columns: 1fr 86px auto;
  gap: 8px;
  align-items: center;
}

.td-field-inline label {
  margin: 0;
}

.td-outline-list {
  display: grid;
  gap: 12px;
}

.td-outline-item {
  border: 1px solid #e0d9d6;
  border-radius: 8px;
  background: #fbfbfc;
  padding: 12px;
}

.td-outline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.td-outline-title {
  color: #332d2f;
  font-size: 13px;
  font-weight: 900;
}

.td-outline-empty {
  border: 1px dashed #d5cbc7;
  border-radius: 8px;
  color: #7d7477;
  padding: 14px;
  font-size: 13px;
  font-weight: 700;
}

.td-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.td-input-note {
  color: #6d6669;
  font-size: 12px;
}

.td-swatches {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(6, 40px);
  gap: 10px;
  align-items: center;
  justify-content: start;
  width: 100%;
  padding: 2px;
}

.td-swatch {
  justify-self: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid rgba(45, 39, 42, .12);
  border-radius: 999px;
  background-clip: padding-box;
  box-shadow: none;
  cursor: pointer;
  text-indent: -999px;
}

.td-swatch.is-active {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px #3b82f6;
}

.td-swatch.is-light {
  border-color: #d8dce3;
}
