.hub-tabs {
  display: flex;
  gap: 0.2rem;
  flex-shrink: 0;
}

.hub-tab {
  border: 1px solid var(--border, #e2e8f0);
  background: #fff;
  color: var(--text, #0f172a);
  border-radius: 999px;
  padding: 0 0.62rem;
  height: 1.75rem;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

.hub-tab.is-active {
  background: var(--primary, #0f766e);
  border-color: var(--primary, #0f766e);
  color: #fff;
}

.hub-view {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  height: 100%;
}

.hub-view[hidden] {
  display: none !important;
}

.tpl-search {
  width: min(220px, 100%);
  margin: 0;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 7px;
  padding: 0 0.5rem;
  font: inherit;
  font-size: 0.78rem;
  background: #fff;
  box-sizing: border-box;
  height: 1.75rem;
}

#tplToolbar.wa-toolbar,
.wa-toolbar.wa-toolbar--single {
  padding: 0.3rem 0.5rem;
  min-height: 2.15rem;
  gap: 0.35rem;
}

#tplToolbar .wa-toolbar__accounts {
  flex-wrap: nowrap;
  overflow-x: auto;
  width: 100%;
  gap: 0.3rem;
  align-items: center;
}

#tplToolbar .wa-toolbar__title {
  flex: 0 0 auto;
  margin-right: 0.15rem;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
}

#tplToolbar .wa-toolbar__accounts select {
  min-width: 118px;
  max-width: 170px;
  height: 1.75rem;
  font-size: 0.74rem;
  padding: 0 0.4rem;
  border-radius: 7px;
}

#tplToolbar #tplClearBtn,
#tplToolbar #tplNewBtn {
  white-space: nowrap;
  flex-shrink: 0;
  height: 1.75rem;
  padding: 0 0.55rem;
  font-size: 0.72rem;
  border-radius: 7px;
}

#tplToolbar #tplNewBtn {
  margin-left: auto;
}

#tplToolbar .tpl-search {
  flex: 0 1 200px;
  min-width: 140px;
  max-width: 220px;
}

.tpl-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 0.4rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  height: auto;
}

.tpl-list,
.tpl-editor {
  min-height: 0;
  height: auto;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tpl-list {
  padding: 0.55rem 0.6rem;
  overflow: hidden;
}

.tpl-list__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin: 0 0 0.4rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.tpl-list__head strong {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tpl-list__hint {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}

.tpl-items {
  display: flex;
  flex-direction: column;
  align-content: stretch;
  gap: 0.3rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: scroll;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  padding-right: 0.2rem;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

.tpl-items:focus {
  outline: none;
}

.tpl-items::-webkit-scrollbar {
  width: 9px;
}
.tpl-items::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 999px;
  border: 2px solid #f1f5f9;
}
.tpl-items::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 999px;
}

.tpl-group {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-bottom: 0.4rem;
  flex: 0 0 auto;
}

.tpl-group-title {
  position: sticky;
  top: 0;
  z-index: 2;
  width: 100%;
  margin: 0;
  padding: 0.4rem 0.5rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9f1239;
  background: linear-gradient(180deg, #fff1f2 0%, #ffe4e6 100%);
  border: 1px solid rgba(244, 63, 94, 0.22);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  cursor: pointer;
  text-align: left;
}

.tpl-group-title:hover {
  border-color: rgba(244, 63, 94, 0.38);
  background: linear-gradient(180deg, #ffe4e6 0%, #fecdd3 100%);
}

.tpl-group-title__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tpl-group-toggle {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: #fff;
  border: 1px solid rgba(244, 63, 94, 0.28);
  color: #e11d48;
  font-size: 0.68rem;
}

.tpl-group.is-open .tpl-group-title {
  background: linear-gradient(180deg, #fecdd3 0%, #ffe4e6 100%);
  border-color: rgba(225, 29, 72, 0.35);
}

.tpl-group-body {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.05rem 0 0.1rem;
}

.tpl-group-body[hidden] {
  display: none !important;
}

.tpl-id-hint {
  display: none !important;
}

.tpl-editor {
  --tpl-control-h: 2.05rem;
  --tpl-icon-btn: 2.05rem;
  padding: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), #fff 28%),
    #fff;
}

.tpl-editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin: 0;
  padding: 0.45rem 0.7rem;
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, #f8fffe 0%, #ffffff 100%);
}

.tpl-editor__title-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.tpl-editor__icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: linear-gradient(145deg, #0f766e, #0d9488);
  color: #fff;
  font-size: 0.75rem;
  box-shadow: 0 4px 10px rgba(15, 118, 110, 0.18);
}

.tpl-editor__head h2 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.tpl-editor__sub {
  display: none;
}

.tpl-mode-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.6rem;
  height: 1.3rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(15, 118, 110, 0.2);
  background: #ecfdf5;
  color: #0f766e;
}

.tpl-mode-badge[data-mode="edit"] {
  background: #eff6ff;
  border-color: rgba(37, 99, 235, 0.22);
  color: #1d4ed8;
}

.tpl-editor__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.45rem 0.7rem 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.tpl-label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.tpl-label i {
  width: 0.82rem;
  text-align: center;
  font-size: 0.66rem;
  color: #0f766e;
  opacity: 0.9;
}

.tpl-control {
  width: 100%;
  height: var(--tpl-control-h);
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  padding: 0 0.55rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: #0f172a;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tpl-control:hover {
  border-color: #cbd5e1;
}

.tpl-control:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

.tpl-control--area {
  height: auto;
  min-height: 0;
  padding: 0.5rem 0.55rem;
  font-weight: 500;
  line-height: 1.4;
  resize: none;
}

select.tpl-control {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 14px) calc(50% - 3px),
    calc(100% - 9px) calc(50% - 3px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 1.7rem;
  cursor: pointer;
}

.tpl-id-name-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) minmax(200px, 1.2fr);
  gap: 0.4rem;
  align-items: start;
  flex: 0 0 auto;
  margin: 0;
}

.tpl-id-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--tpl-icon-btn) var(--tpl-icon-btn);
  gap: 0.28rem;
  align-items: center;
  min-width: 0;
}

.tpl-id-row:has(#tplIdLockBtn[hidden]):has(#tplCopyIdBtn[hidden]) {
  grid-template-columns: minmax(0, 1fr);
}

.tpl-id-row:has(#tplIdLockBtn[hidden]):not(:has(#tplCopyIdBtn[hidden])) {
  grid-template-columns: minmax(0, 1fr) var(--tpl-icon-btn);
}

.tpl-id-row code {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.8rem;
  color: #0f766e;
  background: #ecfeff;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 10px;
  padding: 0 0.7rem;
  height: var(--tpl-control-h);
  display: flex;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tpl-id-row input[type="text"],
.tpl-id-row .tpl-control {
  min-width: 0;
  width: 100%;
}

.tpl-id-row code[hidden],
.tpl-id-row input[hidden],
.tpl-id-row button[hidden] {
  display: none !important;
}

.tpl-icon-btn {
  width: var(--tpl-icon-btn);
  height: var(--tpl-icon-btn);
  padding: 0;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
  color: #0f766e;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 0.72rem;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tpl-icon-btn:hover {
  background: #ecfdf5;
  border-color: rgba(15, 118, 110, 0.35);
}

.tpl-icon-btn i {
  font-size: 0.72rem;
  line-height: 1;
}

.tpl-id-row input[type="text"].is-locked,
.tpl-control.is-locked {
  background: #ecfeff;
  color: #0f766e;
  border-color: rgba(15, 118, 110, 0.28);
  cursor: default;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tpl-id-row input[type="text"]:not(.is-locked),
.tpl-control:not(.is-locked)#tplCustomId {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.tpl-id-row input[type="text"]:not(.is-locked) {
  background: #fffbeb;
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.tpl-id-lock.is-unlocked-state {
  border-color: #f59e0b;
  color: #b45309;
  background: #fffbeb;
}

.tpl-field input,
.tpl-field select,
.tpl-field textarea {
  width: 100%;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  padding: 0 0.7rem;
  font: inherit;
  font-size: 0.84rem;
  background: #fff;
  box-sizing: border-box;
}

.tpl-item {
  text-align: left;
  border: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border-radius: 10px;
  padding: 0.35rem 0.45rem;
  cursor: pointer;
  font: inherit;
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  column-gap: 0.28rem;
  row-gap: 0.12rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  position: relative;
}

.tpl-item__drag {
  grid-row: 1 / span 3;
  grid-column: 1;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: grab;
  border-radius: 4px;
  touch-action: none;
}

.tpl-item__drag:hover,
.tpl-item__drag:focus-visible {
  color: #e11d48;
  background: #fff1f2;
  outline: none;
}

.tpl-item__drag:active {
  cursor: grabbing;
}

.tpl-item__row {
  grid-column: 2;
}

.tpl-item.is-dragging {
  opacity: 0.45;
  border-style: dashed;
}

.tpl-item.is-drop-target {
  border-color: rgba(225, 29, 72, 0.55);
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.18);
}

.tpl-item.is-drop-before {
  box-shadow: inset 0 2px 0 0 #e11d48;
}

.tpl-item.is-drop-after {
  box-shadow: inset 0 -2px 0 0 #e11d48;
}

.tpl-group-body.is-saving {
  opacity: 0.72;
  pointer-events: none;
}

.tpl-item:hover {
  border-color: rgba(15, 118, 110, 0.35);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.tpl-item.is-active {
  border-color: rgba(15, 118, 110, 0.5);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.1);
  background: linear-gradient(180deg, #f0fdfa, #ffffff);
}

.tpl-item__row {
  min-width: 0;
  grid-column: 2;
}

.tpl-item__row--name {
  line-height: 1.15;
}

.tpl-item__row--id {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.tpl-item__row--actions {
  margin-top: 0.05rem;
}

.tpl-item strong {
  display: block;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpl-item .tpl-item-id {
  display: inline-flex;
  align-items: center;
  max-width: 52%;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6rem;
  color: #0f766e;
  background: #ecfeff;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 5px;
  padding: 0.05rem 0.28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 0 1 auto;
}

.tpl-item span.tpl-item-meta {
  display: inline-block;
  min-width: 0;
  flex: 1 1 auto;
  color: #64748b;
  font-size: 0.6rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpl-item-meta i {
  display: none;
}

.tpl-item-actions {
  display: flex;
  gap: 0.25rem;
  margin-top: 0;
}

.tpl-item-actions button {
  border: 1px solid #dbe3ea;
  background: #fff;
  border-radius: 7px;
  padding: 0.15rem 0.4rem;
  font: inherit;
  font-size: 0.64rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  height: 1.45rem;
}

.tpl-item-actions button i {
  font-size: 0.58rem;
  color: #0f766e;
}

.tpl-item-actions button:hover {
  background: #f8fafc;
  border-color: rgba(15, 118, 110, 0.3);
}

.tpl-empty {
  color: var(--muted, #64748b);
  font-size: 0.82rem;
  padding: 0.45rem 0.15rem;
}

.tpl-field {
  display: grid;
  gap: 0.18rem;
  margin: 0;
  flex: 0 0 auto;
  align-content: start;
}

.tpl-field--chips {
  gap: 0;
}

.tpl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  flex: 0 0 auto;
  padding: 0.28rem;
  border: 1px solid #e8eef3;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbfb, #f4f7f8);
}

.tpl-field span:not(.tpl-label):not(.tpl-chip__label) {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted, #64748b);
  line-height: 1.2;
}

.tpl-field small,
.tpl-field em {
  font-style: normal;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.3;
}

.tpl-field-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  flex: 0 0 auto;
  margin: 0;
}

.tpl-compose-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  align-items: stretch;
  margin: 0;
  flex: 1 1 auto;
  min-height: 180px;
}

.tpl-compose-pane {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 0.4rem;
  border: 1px solid #e8eef3;
  border-radius: 11px;
  background: linear-gradient(180deg, #ffffff, #f9fbfc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.tpl-compose-row .tpl-field {
  margin-bottom: 0;
}

.tpl-compose-row .tpl-field > .tpl-label,
.tpl-compose-row .tpl-field > span:first-child {
  flex: 0 0 auto;
  margin-bottom: 0.22rem;
}

.tpl-compose-row textarea,
.tpl-compose-row .tpl-control--area {
  flex: 1 1 auto;
  min-height: 130px;
  height: auto;
  margin: 0;
  resize: none;
  border-radius: 9px;
  background: #fff;
}

.tpl-preview-col .tpl-preview {
  flex: 1 1 auto;
  min-height: 120px;
  margin: 0;
}

.tpl-demo-send {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem;
  margin-top: 0.3rem;
  flex: 0 0 auto;
  align-items: center;
}

.tpl-demo-send .tpl-control,
.tpl-demo-send input {
  width: 100%;
  height: var(--tpl-control-h);
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  padding: 0 0.55rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  background: #fff;
  box-sizing: border-box;
}

.tpl-send-btn {
  height: var(--tpl-control-h);
  min-width: 4.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0 0.65rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.tpl-send-btn i {
  font-size: 0.82rem;
}

.tpl-demo-status {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary, #0f766e);
  flex: 0 0 auto;
}

.tpl-demo-status.is-error {
  color: #b91c1c;
}

.tpl-field textarea {
  resize: none;
  line-height: 1.45;
}

.tpl-chip {
  border: 1px solid rgba(15, 118, 110, 0.18);
  background: #fff;
  color: #0f766e;
  border-radius: 999px;
  padding: 0.18rem 0.42rem;
  font: inherit;
  font-size: 0.64rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  height: 1.45rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.tpl-chip code {
  background: #ecfeff;
  color: #0f766e;
  padding: 0.04rem 0.22rem;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 700;
}

.tpl-chip:hover {
  background: #ecfdf5;
  border-color: rgba(15, 118, 110, 0.35);
  transform: translateY(-1px);
}

.tpl-preview {
  padding: 0.5rem 0.55rem;
  border-radius: 9px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #0f172a;
  box-sizing: border-box;
  overflow: auto;
  min-height: 0;
}

.tpl-editor__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 0;
  padding: 0.4rem 0.7rem;
  flex: 0 0 auto;
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.tpl-editor__actions .btn {
  height: 1.95rem;
  padding: 0 0.7rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.tpl-editor__actions .btn i {
  font-size: 0.72rem;
}

.tpl-btn-danger {
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.28);
}

.tpl-btn-danger:hover {
  background: #fef2f2;
  border-color: rgba(185, 28, 28, 0.4);
}

.tpl-status {
  color: var(--primary, #0f766e);
  font-size: 0.78rem;
  font-weight: 700;
}

.tpl-status.is-error {
  color: #b91c1c;
}

@media (max-width: 960px) {
  #tplToolbar .wa-toolbar__accounts {
    flex-wrap: nowrap;
  }

  .tpl-search {
    width: min(100%, 200px);
    flex: 1 1 140px;
  }
}

@media (max-width: 900px) {
  .tpl-layout,
  .tpl-field-row,
  .tpl-compose-row,
  .tpl-id-name-row {
    grid-template-columns: 1fr;
  }

  .tpl-layout {
    overflow: auto;
  }

  .tpl-list {
    max-height: 42vh;
  }

  .tpl-items {
    min-height: 12rem;
  }

  .tpl-compose-row {
    min-height: 0;
  }

  .tpl-compose-pane {
    min-height: 220px;
  }

  .tpl-compose-row textarea,
  .tpl-compose-row .tpl-control--area,
  .tpl-preview-col .tpl-preview {
    min-height: 140px;
  }

  .tpl-editor__head,
  .tpl-editor__body,
  .tpl-editor__actions {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }
}
