/* ===========================
   DESIGN PANEL (правий сайдбар)
   =========================== */

.design-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 10px 16px;
  font-size: 13px;
  line-height: 1.4;
  color: #e6ecff;
}

/* =============================
   Icon Styles widget: small pills
   ============================= */
.st-iconstyles-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:28px;
  padding:0 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  letter-spacing:0.2px;
  border:1px solid rgba(148,163,184,0.22);
  background:rgba(15,23,42,0.35);
  color:rgba(226,232,240,0.92);
  user-select:none;
}
.st-iconstyles-pill.is-on{
  border-color: rgba(96,165,250,0.55);
  background: rgba(37,99,235,0.25);
}

/* ---- Секція налаштувань (акордеон) ---- */

.design-section {
  border-radius: 18px;
  background: radial-gradient(circle at top left, #273559 0, #151a26 40%, #0b0f18 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid rgba(123, 155, 255, 0.22);
}

/* Згорнута секція – ховаємо body */
.design-section:not(.is-open) .design-section__body {
  display: none;
}

/* ---- Заголовок секції ---- */

.design-section__header {
  width: 100%;
  border: none;
  outline: none;
  background: linear-gradient(90deg, rgba(21, 28, 48, 0.98), rgba(18, 65, 126, 0.75));
  color: #f5f7ff;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.design-section__header:hover {
  background: linear-gradient(90deg, rgba(30, 98, 190, 0.95), rgba(37, 75, 150, 0.95));
}

.design-section__header:focus-visible {
  outline: 2px solid #4da3ff;
  outline-offset: 2px;
}

.design-section__header-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.design-section__chevron {
  font-size: 11px;
  transition: transform 0.18s ease;
  opacity: 0.9;
}

/* Повертаємо стрілку вниз, коли секція розгорнута */
.design-section.is-open .design-section__chevron {
  transform: rotate(90deg);
}

/* ---- Тіло секції ---- */

.design-section__body {
  padding: 10px 12px 12px;
  background: radial-gradient(circle at bottom right, #222c45 0, #101620 45%, #070b12 100%);
}

/* ---- Поля ---- */

.design-field {
  margin-bottom: 10px;
}

.design-field:last-child {
  margin-bottom: 0;
}

.design-field__label {
  font-size: 12px;
  font-weight: 600;
  color: #c4d3ff;
  margin-bottom: 4px;
}

.design-field__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- Пігулки (кнопки) ---- */

.design-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.design-pill {
  border: 1px solid rgba(124, 152, 255, 0.4);
  background: rgba(11, 17, 32, 0.95);
  color: #c6d3ff;
  border-radius: 999px;
  padding: 4px 10px 5px;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease;
}

.design-pill:hover {
  background: rgba(36, 97, 200, 0.9);
  border-color: rgba(123, 165, 255, 0.95);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(57, 132, 255, 0.6);
}

.design-pill.is-active {
  background: linear-gradient(135deg, #2a8cff, #18b0ff);
  border-color: rgba(175, 211, 255, 0.98);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(40, 142, 255, 0.9);
}

/* Іконкові пігулки (вирівнювання тощо) */
.design-pill.is-icon {
  padding: 4px 9px 5px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.design-pill.is-icon svg {
  display: block;
}

/* ---- Text widget mini-icons + popover ---- */

.st-icon-pill {
  padding: 4px 9px 5px;
  min-width: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.st-text-toolbar{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:8px;
  align-items:center;
  justify-items:stretch;
  width:100%;
}


.st-text-color-stack{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:6px;
}

.st-text-align-row{
  display:flex;
  align-items:center;
  gap:6px;
}

.st-align-pill{
  min-width: 28px;
  padding: 3px 7px 4px;
}

.st-icon-align svg{
  display:block;
  fill: currentColor;
  opacity: 0.9;
}


.st-icon-letter {
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
}

.st-icon-italic {
  font-style: italic;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
}

.st-swatch {
  width: 18px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(175, 211, 255, 0.45);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.35);
}

.st-text-pop {
  margin-top: 8px;
  flex: 1 1 auto;
  width: 100%;
  border: 1px solid rgba(124, 152, 255, 0.35);
  background: rgba(9, 13, 25, 0.96);
  border-radius: 12px;
  padding: 10px;
}

.st-text-pop__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.st-text-pop__title {
  font-size: 12px;
  font-weight: 700;
  color: #c4d3ff;
}

.st-text-pop__row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.st-text-pop__sub {
  font-size: 12px;
  font-weight: 700;
  color: rgba(196, 211, 255, 0.9);
}

.st-text-hint {
  flex: 1 1 auto;
  font-size: 12px;
  color: #b8c7ff;
  opacity: 0.9;
}

.st-text-alpha-val {
  margin-left: auto;
  font-size: 12px;
  color: #b8c7ff;
  opacity: 0.95;
}

.st-text-palette {
  margin-top: 6px;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 6px;
}

.st-color-chip {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid rgba(124, 152, 255, 0.35);
  background: rgba(11, 17, 32, 0.95);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.st-color-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(175, 211, 255, 0.85);
  box-shadow: 0 0 0 1px rgba(53, 164, 255, 0.35);
}

.st-color-chip.is-empty {
  color: rgba(196, 211, 255, 0.85);
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
}

/* ---- Слайдер + number ---- */

.design-slider {
  flex: 1 1 auto;
  appearance: none;
  height: 4px;
  border-radius: 999px;
  background: #1b2233;
  outline: none;
}

/* повзунок */
.design-slider::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #35a4ff;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 3px rgba(53, 164, 255, 0.35);
  cursor: pointer;
}
.design-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #35a4ff;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 3px rgba(53, 164, 255, 0.35);
  cursor: pointer;
}

.design-number {
  width: 56px;
  padding: 4px 6px;
  font-size: 12px;
  border-radius: 10px;
  border: 1px solid #303a55;
  background: rgba(6, 10, 20, 0.96);
  color: #e6ecff;
  outline: none;
}

.design-number:focus-visible {
  border-color: #4da3ff;
  box-shadow: 0 0 0 1px rgba(77, 163, 255, 0.7);
}

/* ---- Сітка 2x2 (T/R/B/L) ---- */

.design-quad-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.design-quad-grid .design-number {
  width: 100%;
}

/* ---- Плейсхолдер-віджет (заглушка) ---- */

.design-placeholder {
  border-radius: 16px;
  background: radial-gradient(circle at top, #1f2435 0, #111620 45%, #080b12 100%);
  border: 1px dashed rgba(130, 149, 215, 0.7);
  padding: 10px 12px;
  margin-top: 4px;
}

.design-placeholder__title {
  font-size: 12px;
  font-weight: 600;
  color: #d3ddff;
  margin-bottom: 4px;
}

.design-placeholder__note {
  font-size: 11px;
  color: #9caad8;
}


/* ===========================
   TEMPLATES WIDGET ("Шаблони") — КРОК 1 (UI shell)
   =========================== */

.st-templates-intro {
  border-radius: 14px;
  padding: 10px 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(120, 160, 255, 0.18);
  margin-bottom: 10px;
}

.st-templates-intro__title {
  font-size: 12px;
  font-weight: 700;
  color: #f3f6ff;
  margin-bottom: 2px;
}

.st-templates-intro__note {
  font-size: 11px;
  color: rgba(210, 225, 255, 0.88);
}

.st-templates-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.st-templates-group {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(123, 155, 255, 0.18);
  background: rgba(5, 8, 14, 0.55);
}

.st-templates-group:not(.is-open) .st-templates-group__body {
  display: none;
}

.st-templates-group__header {
  width: 100%;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  background: linear-gradient(90deg, rgba(14, 18, 30, 0.98), rgba(10, 52, 110, 0.65));
  color: #f5f7ff;
}

.st-templates-group__header:hover {
  background: linear-gradient(90deg, rgba(26, 86, 170, 0.95), rgba(22, 60, 125, 0.95));
}

.st-templates-group__title {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.st-templates-group__name {
  font-size: 12px;
  font-weight: 700;
}

.st-templates-group__sub {
  font-size: 11px;
  color: rgba(197, 215, 255, 0.78);
}

.st-templates-group__chev {
  font-size: 11px;
  opacity: 0.9;
  transition: transform 0.18s ease;
}

.st-templates-group.is-open .st-templates-group__chev {
  transform: rotate(90deg);
}

.st-templates-group__body {
  padding: 10px 10px;
  background: rgba(255, 255, 255, 0.02);
}

.st-templates-empty {
  border-radius: 12px;
  padding: 10px;
  border: 1px dashed rgba(130, 149, 215, 0.55);
  background: rgba(0, 0, 0, 0.18);
}

.st-templates-empty__title {
  font-size: 12px;
  font-weight: 700;
  color: #dbe6ff;
  margin-bottom: 4px;
}

.st-templates-empty__note {
  font-size: 11px;
  color: rgba(205, 220, 255, 0.78);
}


/* ===========================
   TEMPLATES GALLERY VIEW (MVP)
   =========================== */

.sttpl-view {
  border-radius: 16px;
  margin: 12px 12px;
  padding: 12px;
  border: 1px solid rgba(120, 160, 255, 0.18);
  background: rgba(5, 8, 14, 0.72);
}

.sttpl-view__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(120, 160, 255, 0.12);
  margin-bottom: 12px;
}

.sttpl-view__title {
  font-size: 13px;
  font-weight: 800;
  color: #f3f6ff;
}

.sttpl-view__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.sttpl-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(123, 155, 255, 0.18);
  background: rgba(0, 0, 0, 0.22);
}

.sttpl-card__preview {
  height: 110px;
  background: radial-gradient(circle at 0 0, rgba(26, 86, 170, 0.35), rgba(14, 18, 30, 0.98));
  display: flex;
  align-items: center;
  justify-content: center;
}

.sttpl-card__preview-inner {
  font-size: 12px;
  opacity: 0.85;
  color: #dbe6ff;
}

.sttpl-card__meta {
  padding: 10px;
}

.sttpl-card__name {
  font-size: 12px;
  font-weight: 800;
  color: #f5f7ff;
  margin-bottom: 8px;
}

.sttpl-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sttpl-btn {
  border: 1px solid rgba(123, 155, 255, 0.18);
  background: rgba(255,255,255,0.03);
  color: #f3f6ff;
  border-radius: 12px;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.sttpl-btn:hover {
  background: rgba(26, 86, 170, 0.22);
}

.sttpl-btn--primary {
  background: linear-gradient(90deg, rgba(26, 86, 170, 0.95), rgba(22, 60, 125, 0.95));
}

.sttpl-btn--danger {
  background: rgba(200, 60, 60, 0.25);
  border-color: rgba(200, 60, 60, 0.35);
}

.sttpl-banner {
  border-radius: 14px;
  margin: 10px 12px;
  padding: 10px 10px;
  border: 1px solid rgba(120, 160, 255, 0.18);
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sttpl-banner__text {
  font-size: 12px;
  font-weight: 800;
  color: #dbe6ff;
}

.sttpl-toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(120, 160, 255, 0.18);
  background: rgba(0, 0, 0, 0.55);
  color: #f3f6ff;
  font-weight: 800;
  font-size: 12px;
  display: none;
  z-index: 9999;
}

.sttpl-view__sub {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.85;
  margin-left: 6px;
}

.sttpl-card.is-selected {
  outline: 2px solid rgba(90, 170, 255, 0.9);
  outline-offset: -2px;
}

/* ===========================
   Templates Gallery Manager
   =========================== */

.sttpl-mgr {
  border-radius: 16px;
  margin: 12px 12px;
  padding: 12px;
  border: 1px solid rgba(120, 160, 255, 0.18);
  background: rgba(5, 8, 14, 0.72);
}

.sttpl-mgr__bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding-bottom:10px;
  border-bottom:1px solid rgba(120,160,255,0.12);
  margin-bottom:10px;
}

.sttpl-mgr__title {
  font-size: 13px;
  font-weight: 800;
  color: #f3f6ff;
}

.sttpl-mgr__tabs {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding: 10px 0 12px;
}

.sttpl-tab {
  border: 1px solid rgba(123, 155, 255, 0.18);
  background: rgba(255,255,255,0.03);
  color: #f3f6ff;
  border-radius: 12px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.sttpl-tab.is-active {
  background: linear-gradient(90deg, rgba(26, 86, 170, 0.95), rgba(22, 60, 125, 0.95));
}

.sttpl-tab--add {
  border-style: dashed;
  opacity: .95;
}

.sttpl-mgr__layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 12px;
}

.sttpl-tree {
  border-radius: 14px;
  border: 1px solid rgba(123, 155, 255, 0.18);
  background: rgba(0,0,0,0.18);
  padding: 10px;
}

.sttpl-tree__title {
  font-size: 12px;
  font-weight: 800;
  color: #dbe6ff;
  margin-bottom: 8px;
}


.sttpl-tree__title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}

.sttpl-tree__toggle{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  color: rgba(219, 230, 255, 0.86);
  user-select:none;
  cursor: help;
}

/* Малий перемикач (еталон як User/Admin у шапці) */
.st-role-toggle.st-role-toggle--sm{
  width:30px;
  height:16px;
}
.st-role-toggle.st-role-toggle--sm .st-role-toggle__slider::before{
  width:12px;
  height:12px;
  left:2px;
  top:2px;
}
.st-role-toggle.st-role-toggle--sm input:checked + .st-role-toggle__slider::before{
  transform: translateX(14px);
}

.sttpl-tree__item.is-inactive{
  background: rgba(255, 58, 58, 0.12);
  border-color: rgba(255, 58, 58, 0.22);
}

.sttpl-tree__items {
  display:flex;
  flex-direction:column;
  gap:6px;
}

.sttpl-tree__item {
  text-align:left;
  border-radius: 12px;
  border: 1px solid rgba(123, 155, 255, 0.14);
  background: rgba(255,255,255,0.03);
  color: rgba(243,246,255,0.92);
  padding: 8px 10px;
  font-size: 11px;
  cursor: pointer;
}

.sttpl-tree__item.is-active {
  background: rgba(26, 86, 170, 0.22);
  border-color: rgba(90, 170, 255, 0.35);
}

.sttpl-tree__actions {
  margin-top: 10px;
  display:flex;
  gap:8px;
}

.sttpl-grid {
  border-radius: 14px;
  border: 1px solid rgba(123, 155, 255, 0.18);
  background: rgba(0,0,0,0.12);
  padding: 10px;
}

.sttpl-grid__title {
  font-size: 12px;
  font-weight: 800;
  color: #dbe6ff;
  margin-bottom: 8px;
}

.sttpl-grid__cards {
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap:10px;
}

.sttpl-empty {
  border-radius: 12px;
  padding: 10px;
  border: 1px dashed rgba(130, 149, 215, 0.55);
  background: rgba(0, 0, 0, 0.18);
}
.sttpl-empty__title { font-size: 12px; font-weight: 800; color: #dbe6ff; margin-bottom: 4px; }
.sttpl-empty__note  { font-size: 11px; color: rgba(205, 220, 255, 0.78); }

.st-templates-gallery-btn {
  margin-top: 12px; /* ← стандартна відстань */
}




/* ===========================
   END OF FILE
   =========================== */



   /* Кнопка "Галерея шаблонів" */

/* Кнопка "Галерея шаблонів" */
.sttpl-btn--gallery {
  width: 100%;
  justify-content: center;
  background: rgba(255,255,255,0.04);
}

.sttpl-btn--gallery:hover {
  background: linear-gradient(90deg, rgba(26, 86, 170, 0.95), rgba(22, 60, 125, 0.95));
  border-color: rgba(120, 160, 255, 0.45);
}





.sttpl-btn--gallery {
  background: linear-gradient(90deg, rgba(2, 6, 12, 0.75), rgba(12, 33, 69, 0.75));
}
.sttpl-btn--gallery:hover {
  background: linear-gradient(90deg, rgba(26, 86, 170, 0.95), rgba(22, 60, 125, 0.95));
}

/* ===========================
   Templates Gallery Manager — full height + auto scroll
   =========================== */

/* 1) Головний view галереї — розтягуємо на всю висоту canvas__scroll */
#templatesGalleryManagerView.sttpl-mgr {
  /* твій існуючий margin/padding залишаємо мінімальним */
  margin: 10px 12px;          /* мінімальний відступ, в т.ч. знизу до футера */
  padding: 12px;
  box-sizing: border-box;

  /* робимо колонку */
  display: flex;
  flex-direction: column;

  /* ключове: заповнюємо висоту батьківського скрол-контейнера */
  height: calc(100% - 20px);  /* врахували margin-top/bottom (10+10) */
  min-height: calc(100% - 20px);

  /* ✅ важливо: не даємо скролу "просочуватись" у батьківський .canvas__scroll */
  overscroll-behavior: contain;
}

/* 2) Верхня панель та вкладки — не стискаємо */
#templatesGalleryManagerView .sttpl-mgr__bar,
#templatesGalleryManagerView .sttpl-mgr__tabs {
  flex: 0 0 auto;
}

/* 3) Основний layout — займає весь залишок */
#templatesGalleryManagerView .sttpl-mgr__layout {
  flex: 1 1 auto;
  min-height: 0;              /* ОБОВʼЯЗКОВО для scroll всередині flex */
}

/* 4) Дві колонки — кожна може скролитись */
#templatesGalleryManagerView .sttpl-mgr__left,
#templatesGalleryManagerView .sttpl-mgr__rightPane {
  min-height: 0;              /* ОБОВʼЯЗКОВО */
  overflow: auto;             /* скрол якщо не вмістилось */
  overscroll-behavior: contain;
}




 /* ===========================
   Templates Gallery Manager — тест для скролу Галерея шаблонів  full height + auto scroll
   =========================== */


/* (опціонально) Щоб скрол був тільки справа, а зліва без:
#templatesGalleryManagerView .sttpl-mgr__left { overflow: hidden; }
*/
/* ===========================
   END OF FILE
   =========================== */ 

   /* ===========================
   Templates Gallery Theme (CSS vars)
   =========================== */

#templatesGalleryManagerView.sttpl-mgr {
  /* дефолти (якщо localStorage ще пустий) */
  --sttpl-bg: rgba(5, 8, 14, 0.72);
  --sttpl-border: rgba(120, 160, 255, 0.18);
  --sttpl-text: rgba(243, 246, 255, 0.95);

  --sttpl-header-bg: rgba(0, 0, 0, 0.22);
  --sttpl-tab-bg: rgba(255,255,255,0.03);
  --sttpl-tab-active: linear-gradient(90deg, rgba(26, 86, 170, 0.95), rgba(22, 60, 125, 0.95));

  --sttpl-btn-bg: rgba(255,255,255,0.03);
  --sttpl-btn-border: rgba(123, 155, 255, 0.18);
  --sttpl-btn-hover: rgba(26, 86, 170, 0.22);

  background: var(--sttpl-bg) !important;
  border-color: var(--sttpl-border) !important;
  color: var(--sttpl-text) !important;
}

#templatesGalleryManagerView .sttpl-mgr__bar {
  background: var(--sttpl-header-bg);
  border-radius: 14px;
  padding: 10px 10px;
  border: 1px solid var(--sttpl-border);
}

#templatesGalleryManagerView .sttpl-tab {
  background: var(--sttpl-tab-bg);
  border-color: var(--sttpl-btn-border);
  color: var(--sttpl-text);
}

#templatesGalleryManagerView .sttpl-tab.is-active {
  background: var(--sttpl-tab-active);
}

#templatesGalleryManagerView .sttpl-btn {
  background: var(--sttpl-btn-bg);
  border-color: var(--sttpl-btn-border);
  color: var(--sttpl-text);
}

#templatesGalleryManagerView .sttpl-btn:hover {
  background: var(--sttpl-btn-hover);
}

/* ===========================
   Gear button (in bar)
   =========================== */
.sttpl-gear {
  width: 34px;
  height: 32px;
  border-radius: 12px;
  border: 1px solid rgba(123, 155, 255, 0.18);
  background: rgba(255,255,255,0.03);
  color: rgba(243, 246, 255, 0.95);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sttpl-gear:hover {
  background: rgba(26, 86, 170, 0.22);
  border-color: rgba(90, 170, 255, 0.35);
}

/* ===========================
   Draggable + resizable modal
   =========================== */
.sttpl-modal {
  position: fixed;
  top: 120px;
  left: 120px;
  width: 420px;
  height: 340px;
  max-width: 92vw;
  max-height: 82vh;

  background: rgba(5, 8, 14, 0.92);
  border: 1px solid rgba(120, 160, 255, 0.22);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.65);
  z-index: 99999;

  display: flex;
  flex-direction: column;

  /* ресайз мишкою */
  resize: both;
  overflow: auto;
}

.sttpl-modal__header {
  cursor: move; /* пересування */
  user-select: none;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  padding: 10px 12px;
  border-bottom: 1px solid rgba(120, 160, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.sttpl-modal__title {
  font-size: 12px;
  font-weight: 800;
  color: rgba(243, 246, 255, 0.95);
}

.sttpl-modal__close {
  width: 32px;
  height: 30px;
  border-radius: 12px;
  border: 1px solid rgba(123, 155, 255, 0.18);
  background: rgba(255,255,255,0.03);
  color: rgba(243, 246, 255, 0.95);
  cursor: pointer;
}

.sttpl-modal__close:hover {
  background: rgba(200, 60, 60, 0.25);
  border-color: rgba(200, 60, 60, 0.35);
}

.sttpl-modal__body {
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.sttpl-field {
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: center;
  gap: 10px;
}

.sttpl-field label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(205, 220, 255, 0.88);
}

.sttpl-field input[type="color"] {
  width: 52px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(123, 155, 255, 0.18);
  background: rgba(255,255,255,0.03);
  padding: 0;
}

.sttpl-modal__footer {
  margin-top: auto;
  padding: 10px 12px;
  border-top: 1px solid rgba(120, 160, 255, 0.14);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* =========================================================
   ПІДВІДЖЕТ "ШАПКА" (Шаблони → Шапка) — кнопка "Шаблони Шапки"
   ========================================================= */

.st-header-widget {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.st-header-templates-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
 border-radius: 12px;
  border: 1px solid rgba(108, 119, 153, 0.18);
  background: rgba(77, 69, 120, 0.247);
  color: rgba(184, 201, 235, 0.944);
}


.st-footer-templates-btn {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 12px;
  border: 1px solid rgba(108, 119, 153, 0.18);
  background: rgba(77, 69, 120, 0.247);
  color: rgba(184, 201, 235, 0.944);
}

.st-header-hint {
  font-size: 11px;
  color: rgba(141, 159, 195, 0.944);
  line-height: 1.4;
}

/* 00954 — Шаблони → Синхронізація стилів шаблонів → Live Link */
.st-style-sync {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.st-style-sync__mode,
.st-style-sync__note {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(205, 219, 248, .9);
}

.st-style-sync__note {
  color: rgba(145, 166, 207, .92);
}

.st-style-sync__mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(123, 155, 255, .22);
  border-radius: 11px;
  background: rgba(7, 12, 25, .48);
}

.st-style-sync__mode-switch button {
  min-width: 0;
  min-height: 38px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(151, 174, 218, .92);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.25;
  cursor: pointer;
}

.st-style-sync__mode-switch button.is-active {
  border-color: rgba(87, 151, 255, .78);
  background: linear-gradient(135deg, rgba(29, 78, 216, .42), rgba(37, 99, 235, .22));
  color: #f7faff;
  box-shadow: 0 5px 14px rgba(17, 55, 146, .24);
}

.st-style-sync__areas {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.st-style-sync__area {
  padding: 9px;
  border: 1px solid rgba(123, 155, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}

.st-style-sync__area.is-previewing {
  border-color: rgba(248, 113, 113, .46);
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .08);
}

.st-style-sync__area-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.st-style-sync__identity {
  min-width: 0;
}

.st-style-sync__area-controls {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}

.st-style-sync__style-picker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid rgba(96, 165, 250, .48);
  border-radius: 8px;
  background: rgba(37, 99, 235, .16);
  color: #dbeafe;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.st-style-sync__style-picker:hover {
  border-color: rgba(96, 165, 250, .85);
  background: rgba(37, 99, 235, .32);
  color: #fff;
}

.st-style-sync__area-label {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 5px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #f3f6ff;
  cursor: help;
  outline: none;
}

.st-style-sync__area-label:hover,
.st-style-sync__area-label:focus-visible {
  background: rgba(96, 165, 250, .18);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, .42);
}

.st-style-sync__template-name {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: rgba(176, 198, 239, .9);
}

.st-style-sync__master {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  font-size: 10px;
  color: rgba(225, 234, 255, .95);
}

.st-style-sync__master input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.st-style-sync__switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-top: 8px;
}

.st-style-sync__switch-btn {
  min-width: 0;
  padding: 6px 5px;
  border: 1px solid rgba(113, 139, 196, .24);
  border-radius: 8px;
  background: rgba(27, 34, 55, .72);
  color: rgba(175, 194, 232, .9);
  font-size: 10px;
  cursor: pointer;
}

.st-style-sync__switch-btn.is-active {
  border-color: rgba(70, 139, 255, .82);
  background: rgba(37, 99, 235, .28);
  color: #f5f8ff;
}

.st-style-sync__switch-btn:disabled {
  cursor: default;
  opacity: .62;
}

.st-style-sync__profile {
  margin-top: 7px;
  font-size: 9px;
  line-height: 1.35;
}

.st-style-sync__profile.is-ready {
  color: #75e6ad;
}

.st-style-sync__profile.is-missing {
  color: #f3c978;
}

.st-style-sync__status {
  min-height: 30px;
  padding: 7px 8px;
  border-radius: 9px;
  border: 1px solid rgba(123, 155, 255, .16);
  background: rgba(0, 0, 0, .2);
  color: rgba(193, 210, 245, .92);
  font-size: 10px;
  line-height: 1.4;
}

.st-style-sync__status[data-kind="ok"] {
  border-color: rgba(55, 194, 124, .38);
  color: #8bf0bd;
}

.st-style-sync__status[data-kind="warn"] {
  border-color: rgba(230, 172, 61, .38);
  color: #f4d188;
}

.st-style-sync__status[data-kind="error"] {
  border-color: rgba(239, 91, 91, .45);
  color: #ffaaaa;
}

.st-style-sync__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.st-style-sync__btn {
  min-width: 0;
  padding: 8px 6px;
  border-radius: 9px;
  font-size: 10px;
}

.st-style-sync__btn--restore {
  grid-column: 1 / -1;
}

.st-style-sync__btn--save.is-dirty:not(:disabled) {
  border-color: #ff5b5b;
  background: linear-gradient(135deg, #c91f35 0%, #f04444 54%, #ff6b45 100%);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 0 0 1px rgba(255, 118, 118, .35), 0 8px 22px rgba(224, 34, 58, .38);
  animation: st-style-sync-save-pulse-00951 1.8s ease-in-out infinite;
}

@keyframes st-style-sync-save-pulse-00951 {
  0%, 100% { box-shadow: 0 0 0 1px rgba(255, 118, 118, .34), 0 8px 22px rgba(224, 34, 58, .30); }
  50% { box-shadow: 0 0 0 3px rgba(255, 118, 118, .18), 0 10px 28px rgba(224, 34, 58, .52); }
}

.st-style-sync-info {
  position: fixed;
  z-index: 10000000;
  width: min(430px, calc(100vw - 24px));
  padding: 18px;
  border: 2px solid #72a7ff;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(73, 122, 255, .34), transparent 44%),
    linear-gradient(145deg, #07101f 0%, #0d1b33 58%, #11172a 100%);
  color: #fff;
  box-shadow: 0 22px 70px rgba(0, 0, 0, .62), 0 0 0 5px rgba(71, 121, 255, .12);
  pointer-events: none;
}

.st-style-sync-info[hidden] {
  display: none !important;
}

.st-style-sync-info__eyebrow {
  margin-bottom: 7px;
  color: #8dbaff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .13em;
}

.st-style-sync-info__title {
  color: #fff;
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.025em;
}

.st-style-sync-info__name {
  margin-top: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(142, 181, 255, .28);
  color: #ffd66e;
  font-size: 19px;
  font-weight: 850;
  line-height: 1.25;
}

.st-style-sync-info__grid {
  display: grid;
  grid-template-columns: minmax(116px, .7fr) minmax(0, 1.3fr);
  gap: 9px 14px;
  margin-top: 14px;
}

.st-style-sync-info__key {
  color: #91a9d1;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.st-style-sync-info__value {
  overflow-wrap: anywhere;
  color: #f8fbff;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

@media (prefers-reduced-motion: reduce) {
  .st-style-sync__btn--save.is-dirty:not(:disabled) { animation: none; }
}


/* === Layout widget helpers (checkbox/radio) === */
.design-check{ display:flex; align-items:center; gap:10px; font-size:12px; color:var(--clr-text, #e2e8f0); margin:6px 0; }
.design-check input{ width:14px; height:14px; }
.design-radio-row{ display:flex; gap:10px; flex-wrap:wrap; margin-top:6px; }
.design-radio{ display:flex; align-items:center; gap:8px; font-size:12px; color:var(--clr-text, #e2e8f0); }
.design-radio input{ width:14px; height:14px; }
.design-field__hint{ font-size:11px; color: var(--clr-text-mute, rgba(148,163,184,0.9)); line-height:1.35; }


/* FR вага: ширше поле, щоб числа не обрізались */
[data-fr-weight-wrap] .design-number{width:120px;}


.st-color-chip.is-picked {
  border-color: rgba(57, 132, 255, 0.9);
  box-shadow: 0 0 0 2px rgba(57, 132, 255, 0.55), 0 0 0 1px rgba(0,0,0,0.45) inset;
  transform: translateY(-1px);
}


/* === Text widget: Heading dropdown === */
.st-heading-pill{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 12px;
}
.st-heading-label{ display:block; text-align:left; }
.st-heading-caret{ opacity:0.8; font-size: 12px; }

.st-heading-pop .st-text-pop__head{ padding: 10px 10px 6px; }
.st-heading-list{
  display:flex;
  flex-direction:column;
  gap: 8px;
  padding: 10px;
}

.st-heading-item{
  width:100%;
  text-align:left;
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(124, 152, 255, 0.28);
  background: rgba(22, 30, 58, 0.9);
  color: #e9efff;
  cursor: pointer;
}
.st-heading-item:hover{
  border-color: rgba(123, 165, 255, 0.85);
  background: rgba(36, 97, 200, 0.35);
}
.st-heading-preview{ display:block; line-height: 1.15; }

.st-heading-preview.st-h1{ font-size: 28px; font-weight: 800; }
.st-heading-preview.st-h2{ font-size: 24px; font-weight: 800; }
.st-heading-preview.st-h3{ font-size: 20px; font-weight: 800; }
.st-heading-preview.st-h4{ font-size: 16px; font-weight: 800; }
.st-heading-preview.st-h5{ font-size: 14px; font-weight: 800; }
.st-heading-preview.st-h6{ font-size: 12px; font-weight: 800; }

.st-heading-preview.st-normal{ font-size: 14px; font-weight: 600; opacity: 0.92; }


.st-text-toolbar .st-icon-pill{
  width:100%;
  justify-content:center;
}


.st-text-alpha-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.st-text-alpha-row input[type="range"] {
  flex: 1 1 auto;
}


/* =====================
   Templates → Page (MVP)
   ===================== */

.st-page-tpl { padding: 10px; }
.st-page-tpl__row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; align-items: end; }
.st-page-tpl__actions { grid-template-columns: repeat(4, max-content); gap: 8px; margin-top: 10px; }
.st-page-tpl__hint { margin-top: 8px; font-size: 12px; opacity: .85; }
.st-field { display:flex; flex-direction:column; gap:6px; }
.st-field__label { font-size:12px; opacity:.9; }
.st-input { width:100%; }
.st-page-tpl__tabs { display:flex; gap:8px; padding: 0 10px 10px; }
.st-tab { border:1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.04); padding:6px 10px; border-radius:10px; cursor:pointer; }
.st-tab.is-active { background: rgba(255,255,255,.12); }
.st-page-tpl__list { padding: 0 10px 10px; display:flex; flex-direction:column; gap:10px; }

.st-tpl-card { border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); border-radius: 14px; padding: 10px; }
.st-tpl-card.is-active { outline: 2px solid rgba(59,130,246,.45); }
.st-tpl-card__title { font-weight: 700; margin-bottom: 6px; }
.st-tpl-card__meta { display:flex; flex-wrap:wrap; gap:6px; margin-bottom: 10px; }
.st-pill { font-size: 11px; padding: 3px 8px; border-radius: 999px; border:1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04); }
.st-tpl-card__actions { display:flex; gap:8px; }
.st-btn--sm { padding: 6px 10px; font-size: 12px; border-radius: 10px; }
.st-btn--danger { border-color: rgba(239,68,68,.55) !important; color: rgba(239,68,68,.95) !important; }


/* Divider between system and user groups (Pages tab) */
.sttpl-tree__divider{
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 8px 6px;
  border-radius: 1px;
}


/* ===== Page Templates widget (Шаблони → Сторінка) ===== */
.st-pt { display:flex; flex-direction:column; gap:10px; }
.st-pt__row { display:flex; flex-direction:column; gap:6px; }
.st-pt__row--2 { display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
.st-pt__lbl { font-size:12px; opacity:.9; }
.st-pt__btns { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.st-pt__hint { font-size:12px; opacity:.85; line-height:1.35; padding:8px 10px; border:1px solid rgba(255,255,255,.08); border-radius:10px; background: rgba(255,255,255,.03); }

.st-pt__tabs { display:flex; gap:6px; align-items:center; margin-top:2px; }
.st-pt-tab { border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.03); color: inherit; padding:6px 10px; border-radius:999px; font-size:12px; cursor:pointer; }
.st-pt-tab.is-active { background: rgba(59,130,246,.18); border-color: rgba(59,130,246,.45); }

.st-pt__list { display:flex; flex-direction:column; gap:8px; }

/* cards (узгоджено з попереднім стилем) */
.st-tpl-card { border:1px solid rgba(255,255,255,.10); border-radius:12px; padding:10px; background: rgba(255,255,255,.03); }
.st-tpl-card.is-active { border-color: rgba(59,130,246,.65); box-shadow: 0 0 0 1px rgba(59,130,246,.25) inset; }
.st-tpl-card__title { font-weight:600; font-size:13px; margin-bottom:6px; }
.st-tpl-card__meta { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.st-pill { display:inline-flex; align-items:center; gap:6px; font-size:11px; opacity:.9; padding:3px 8px; border-radius:999px; border:1px solid rgba(255,255,255,.10); background: rgba(255,255,255,.02); }
.st-tpl-card__actions { display:flex; gap:8px; }
.st-tpl-empty { font-size:12px; opacity:.75; padding:10px; border:1px dashed rgba(255,255,255,.18); border-radius:12px; }



/* ----- Templates backupbar (icons only) ----- */
.sttpl-backupbar{
  display:flex;
  gap:8px;
  align-items:center;
  margin:8px 0;
}
.sttpl-backupbtn{
  width:36px;
  height:34px;
  padding:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
  line-height:1;
}

/* ----- Delayed tooltip (3s) ----- */
.sttpl-tooltip{
  position:fixed;
  z-index: 99999;
  max-width: 560px;
  white-space: pre-line;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 600;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(120, 160, 255, 0.22);
  background: rgba(10, 12, 18, 0.96);
  color: #f5f7ff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  pointer-events: none;
}
.sttpl-tooltip--hidden{
  display:none;
}


/* --- Templates gallery: folder row icons --- */
.sttpl-tree__child{
  display:flex;
  align-items:center;
  gap:8px;
}
.sttpl-tree__child .sttpl-tree__item{
  flex:1 1 auto;
}
.sttpl-tree__icon{
  flex:0 0 auto;
  width:28px;
  height:28px;
  border-radius:10px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(255,255,255,0.04);
  color:rgba(255,255,255,0.85);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  user-select:none;
}
.sttpl-tree__icon:hover{
  background:rgba(255,255,255,0.08);
}


/* 00881: one inspector colour authority for both the top mode buttons and canvas selection.
   The canvas reads --st-inspector-selection-line from these real buttons; no JS palette exists. */
.design-mode-tabs .design-pill[data-design-mode="sections"]{
  --st-inspector-gradient-start:#2563eb;
  --st-inspector-gradient-end:#38bdf8;
  --st-inspector-selection-line:rgba(59,130,246,.98);
  --st-inspector-selection-border:rgba(147,197,253,.98);
  --st-inspector-selection-soft:rgba(37,99,235,.18);
  --st-inspector-selection-text:#ffffff;
}
.design-mode-tabs .design-pill[data-design-mode="levels"]{
  --st-inspector-gradient-start:#ca8a04;
  --st-inspector-gradient-end:#facc15;
  --st-inspector-selection-line:rgba(234,179,8,.98);
  --st-inspector-selection-border:rgba(254,240,138,.98);
  --st-inspector-selection-soft:rgba(234,179,8,.16);
  --st-inspector-selection-text:#111827;
}
.design-mode-tabs .design-pill[data-design-mode="containers"]{
  --st-inspector-gradient-start:#16a34a;
  --st-inspector-gradient-end:#22c55e;
  --st-inspector-selection-line:rgba(34,197,94,.98);
  --st-inspector-selection-border:rgba(187,247,208,.98);
  --st-inspector-selection-soft:rgba(34,197,94,.16);
  --st-inspector-selection-text:#ffffff;
}
.design-mode-tabs .design-pill[data-design-mode="blocks"]{
  --st-inspector-gradient-start:#0284c7;
  --st-inspector-gradient-end:#38bdf8;
  --st-inspector-selection-line:rgba(56,189,248,.98);
  --st-inspector-selection-border:rgba(186,230,253,.98);
  --st-inspector-selection-soft:rgba(56,189,248,.16);
  --st-inspector-selection-text:#ffffff;
}
.design-mode-tabs .design-pill[data-design-mode="headings"]{
  --st-inspector-gradient-start:#ea580c;
  --st-inspector-gradient-end:#fb923c;
  --st-inspector-selection-line:rgba(249,115,22,.98);
  --st-inspector-selection-border:rgba(254,215,170,.98);
  --st-inspector-selection-soft:rgba(249,115,22,.16);
  --st-inspector-selection-text:#ffffff;
}
.design-mode-tabs .design-pill[data-design-mode="texts"]{
  --st-inspector-gradient-start:#ca8a04;
  --st-inspector-gradient-end:#facc15;
  --st-inspector-selection-line:rgba(234,179,8,.98);
  --st-inspector-selection-border:rgba(254,240,138,.98);
  --st-inspector-selection-soft:rgba(234,179,8,.16);
  --st-inspector-selection-text:#111827;
}
.design-mode-tabs .design-pill[data-design-mode="icons"]{
  --st-inspector-gradient-start:#0891b2;
  --st-inspector-gradient-end:#67e8f9;
  --st-inspector-selection-line:rgba(103,232,249,.98);
  --st-inspector-selection-border:rgba(207,250,254,.98);
  --st-inspector-selection-soft:rgba(103,232,249,.14);
  --st-inspector-selection-text:#083344;
}
.design-mode-tabs .design-pill[data-design-mode]:not([data-design-mode="none"]).is-active{
  background:linear-gradient(135deg,var(--st-inspector-gradient-start),var(--st-inspector-gradient-end));
  border-color:var(--st-inspector-selection-border);
  box-shadow:0 0 0 1px var(--st-inspector-selection-line),0 8px 20px var(--st-inspector-selection-soft);
  color:var(--st-inspector-selection-text);
}

/* 00296: labeled spacing controls in Layout widget */
.design-quad-grid--labeled {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}

.design-quad-cell {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  font-weight: 700;
  color: rgba(226, 232, 240, .92);
}

.design-quad-cell > span {
  white-space: nowrap;
  opacity: .9;
}

.design-quad-cell .design-number {
  width: 100%;
  min-width: 0;
}



























/* =========================================================
   [00886][TEMPLATE GALLERY][DEDICATED OVERLAY LAYER]
   Галерея не є дитиною canvas__scroll і ніколи не бере участі
   у спільному document flow із сайтом.
   ========================================================= */
.builder__canvas {
  position: relative;
}

#templatesGalleryWorkspaceLayer.sttpl-workspace-layer {
  position: absolute;
  inset: 0;
  z-index: 80;
  display: none;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  background: var(--builder-canvas-bg, #050b16);
  isolation: isolate;
}

body.st-tpl-gallery-open #templatesGalleryWorkspaceLayer.sttpl-workspace-layer {
  display: flex !important;
}

body.st-tpl-gallery-open .builder__canvas > .canvas__header,
body.st-tpl-gallery-open .builder__canvas > .canvas__scroll {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.st-tpl-gallery-open #templatesGalleryWorkspaceLayer > #templatesGalleryManagerView.sttpl-mgr {
  display: flex !important;
  flex: 1 1 auto;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  max-height: none;
  margin: 10px 12px;
  padding: 12px;
  position: relative;
  inset: auto;
  z-index: 1;
  overflow: hidden;
  box-sizing: border-box;
}

body.st-tpl-gallery-open #templatesGalleryWorkspaceLayer > #templatesGalleryManagerView .sttpl-mgr__layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

#templatesGalleryManagerView.sttpl-mgr.is-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100% - 20px);
  height: calc(100% - 20px);
  box-sizing: border-box;
}

#templatesGalleryManagerView .sttpl-openingShell {
  width: 100%;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

#templatesGalleryManagerView .sttpl-openingShell__card {
  width: min(560px, calc(100% - 28px));
  border: 1px solid rgba(120, 160, 255, 0.28);
  border-radius: 24px;
  padding: 28px 30px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255,255,255,0.04);
  color: #f8fafc;
  text-align: center;
}

#templatesGalleryManagerView .sttpl-openingShell__card.is-error {
  border-color: rgba(248, 113, 113, 0.55);
}

#templatesGalleryManagerView .sttpl-openingShell__mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 999px;
  border: 2px solid rgba(125, 211, 252, 0.45);
  background:
    radial-gradient(circle at 50% 50%, rgba(125, 211, 252, 0.55), transparent 38%),
    rgba(14, 165, 233, 0.12);
  animation: stTplOpeningPulse00373 1.1s ease-in-out infinite;
}

#templatesGalleryManagerView .sttpl-openingShell__card.is-error .sttpl-openingShell__mark {
  display: grid;
  place-items: center;
  border-color: rgba(248,113,113,.65);
  background: rgba(127,29,29,.28);
  color: #fecaca;
  font-size: 30px;
  font-weight: 1000;
  animation: none;
}

#templatesGalleryManagerView .sttpl-openingShell__title {
  font-size: 22px;
  font-weight: 950;
  letter-spacing: .02em;
}

#templatesGalleryManagerView .sttpl-openingShell__text {
  margin-top: 10px;
  color: rgba(226, 232, 240, 0.82);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}

@keyframes stTplOpeningPulse00373 {
  0%, 100% { transform: scale(0.92); opacity: 0.72; }
  50% { transform: scale(1.06); opacity: 1; }
}

/* =========================================================
   [00375][TEMPLATE GALLERY][BOOT STYLE OPENING HUD]
   Заміна простого текстового first-open loading на вікно у стилі boot-loader:
   центральна кругова діаграма, scan/grid ефекти, pipeline і live chips.
   ========================================================= */
#templatesGalleryManagerView.sttpl-mgr.is-loading {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: calc(100% - 20px);
  height: calc(100% - 20px);
  box-sizing: border-box;
  background:
    radial-gradient(circle at 14% 16%, rgba(34,211,238,.12), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(139,92,246,.13), transparent 30%),
    radial-gradient(circle at 50% 92%, rgba(59,130,246,.09), transparent 34%),
    linear-gradient(135deg, rgba(2,6,23,.98), rgba(6,22,42,.98) 52%, rgba(11,17,32,.98));
  overflow: hidden;
  isolation: isolate;
}

#templatesGalleryManagerView .sttpl-openingShell {
  width: 100%;
  min-height: min(760px, calc(100vh - 96px));
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 42px);
  box-sizing: border-box;
  position: relative;
}

#templatesGalleryManagerView .sttpl-openingShell::before,
#templatesGalleryManagerView .sttpl-openingShell::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: -18%;
  z-index: 0;
}

#templatesGalleryManagerView .sttpl-openingShell::before {
  background:
    linear-gradient(rgba(34,211,238,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,211,238,.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, black 0 60%, transparent 82%);
  animation: stTplOpeningGridDrift00375 16s linear infinite;
  opacity: .78;
}

#templatesGalleryManagerView .sttpl-openingShell::after {
  background: conic-gradient(from 90deg, transparent, rgba(34,211,238,.12), transparent 28%);
  animation: stTplOpeningSlowRotate00375 18s linear infinite;
  opacity: .78;
}

#templatesGalleryManagerView .sttpl-openingShell__card {
  width: min(820px, calc(100% - 24px));
  min-height: 560px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 32px;
  padding: clamp(20px, 3vw, 34px);
  background:
    linear-gradient(180deg, rgba(15,23,42,.76), rgba(2,6,23,.88)),
    radial-gradient(circle at 18% 0%, rgba(34,211,238,.13), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(139,92,246,.12), transparent 28%);
  box-shadow:
    0 38px 120px rgba(0, 0, 0, .48),
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 0 0 1px rgba(255,255,255,.03),
    0 0 0 1px rgba(56,189,248,.08);
  color: #e0f2fe;
  text-align: center;
  overflow: hidden;
  backdrop-filter: blur(18px);
}

#templatesGalleryManagerView .sttpl-openingShell__card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 24px;
  border: 1px solid rgba(34,211,238,.085);
  pointer-events: none;
  z-index: 0;
}

#templatesGalleryManagerView .sttpl-openingShell__card.is-retry {
  border-color: rgba(245,158,11,.34);
  box-shadow:
    0 38px 120px rgba(0,0,0,.48),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 42px rgba(245,158,11,.08);
}

#templatesGalleryManagerView .sttpl-openingShell__card.is-error {
  border-color: rgba(248,113,113,.55);
  box-shadow:
    0 38px 120px rgba(0,0,0,.48),
    inset 0 1px 0 rgba(255,255,255,.08),
    0 0 42px rgba(248,113,113,.10);
}

#templatesGalleryManagerView .sttpl-openingShell__scan,
#templatesGalleryManagerView .sttpl-openingShell__grid {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

#templatesGalleryManagerView .sttpl-openingShell__scan {
  left: -12%;
  right: -12%;
  top: -18%;
  height: 22%;
  background: linear-gradient(180deg, transparent, rgba(34,211,238,.16), transparent);
  animation: stTplOpeningScan00375 4.8s ease-in-out infinite;
}

#templatesGalleryManagerView .sttpl-openingShell__grid {
  inset: 0;
  background:
    linear-gradient(rgba(125,211,252,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125,211,252,.026) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: .50;
  mask-image: radial-gradient(circle at center, black 0 62%, transparent 88%);
}

#templatesGalleryManagerView .sttpl-openingShell__top,
#templatesGalleryManagerView .sttpl-openingShell__body {
  position: relative;
  z-index: 1;
}

#templatesGalleryManagerView .sttpl-openingShell__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(34,211,238,.14);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(34,211,238,.045), rgba(139,92,246,.07), rgba(34,211,238,.045)),
    rgba(15,23,42,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 0 24px rgba(34,211,238,.07);
}

#templatesGalleryManagerView .sttpl-openingShell__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #cffafe;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: .18em;
  text-transform: uppercase;
  white-space: nowrap;
}

#templatesGalleryManagerView .sttpl-openingShell__brandDot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 16px rgba(34,211,238,.72), 0 0 34px rgba(34,211,238,.28);
  animation: stTplOpeningPulseDot00375 1.25s ease-in-out infinite;
  flex: 0 0 auto;
}

#templatesGalleryManagerView .sttpl-openingShell__phase {
  flex: 0 0 auto;
  min-width: 84px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(125,211,252,.20);
  background: rgba(2,6,23,.38);
  color: rgba(224,242,254,.82);
  font-size: 11px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: .16em;
  text-transform: uppercase;
}

#templatesGalleryManagerView .sttpl-openingShell__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 0;
}

#templatesGalleryManagerView .sttpl-openingShell__orbWrap {
  position: relative;
  width: clamp(176px, 24vw, 230px);
  height: clamp(176px, 24vw, 230px);
  display: grid;
  place-items: center;
  margin: 6px auto 0;
}

#templatesGalleryManagerView .sttpl-openingShell__orbWrap::before,
#templatesGalleryManagerView .sttpl-openingShell__orbWrap::after {
  content: "";
  position: absolute;
  inset: -22px;
  border-radius: 50%;
  border: 1px dashed rgba(125,211,252,.18);
  animation: stTplOpeningSlowRotate00375 14s linear infinite;
}

#templatesGalleryManagerView .sttpl-openingShell__orbWrap::after {
  inset: -42px;
  border-style: solid;
  border-color: rgba(139,92,246,.10);
  animation-direction: reverse;
  animation-duration: 22s;
}

#templatesGalleryManagerView .sttpl-openingShell__orb {
  --sttpl-loader-accent: #22d3ee;
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(34,211,238,.18), transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(2,6,23,.96) 0 51%, transparent 52%);
  box-shadow:
    0 0 44px rgba(34,211,238,.18),
    inset 0 0 32px rgba(255,255,255,.035);
}

#templatesGalleryManagerView .sttpl-openingShell__orb::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(from -90deg,
      rgba(34,211,238,1) 0 18%,
      rgba(139,92,246,.95) 18% 42%,
      rgba(34,197,94,.82) 42% 65%,
      rgba(34,211,238,.22) 65% 100%);
  mask: radial-gradient(circle, transparent 0 61%, black 62% 73%, transparent 74%);
  animation: stTplOpeningOrbSpin00375 1.55s linear infinite;
}

#templatesGalleryManagerView .sttpl-openingShell__orb::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background:
    conic-gradient(from 180deg, transparent 0 16%, rgba(125,211,252,.38) 16% 23%, transparent 23% 100%);
  border: 1px solid rgba(125,211,252,.13);
  animation: stTplOpeningOrbSpin00375 5.5s linear infinite reverse;
}

#templatesGalleryManagerView .sttpl-openingShell__orbRing {
  position: absolute;
  inset: 34px;
  border-radius: 50%;
  border: 1px dashed rgba(224,242,254,.18);
  animation: stTplOpeningSlowRotate00375 9s linear infinite;
}

#templatesGalleryManagerView .sttpl-openingShell__orbCore {
  position: relative;
  z-index: 3;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  background:
    radial-gradient(circle at 50% 32%, rgba(34,211,238,.18), transparent 54%),
    rgba(2,6,23,.92);
  border: 1px solid rgba(125,211,252,.20);
  box-shadow: inset 0 0 28px rgba(34,211,238,.08), 0 0 26px rgba(34,211,238,.14);
}

#templatesGalleryManagerView .sttpl-openingShell__orbCore strong {
  color: #f0fdfa;
  font-size: 36px;
  line-height: 1;
  font-weight: 1000;
  text-shadow: 0 0 18px rgba(34,211,238,.62);
}

#templatesGalleryManagerView .sttpl-openingShell__orbCore span {
  color: rgba(224,242,254,.70);
  font-size: 10px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: .22em;
  text-transform: uppercase;
}

#templatesGalleryManagerView .sttpl-openingShell__satellite {
  position: absolute;
  z-index: 4;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 14px rgba(103,232,249,.80), 0 0 28px rgba(103,232,249,.26);
  transform-origin: calc(clamp(176px, 24vw, 230px) / -2 + 5px) 5px;
}

#templatesGalleryManagerView .sttpl-openingShell__satellite--a {
  top: 50%; left: 50%;
  animation: stTplOpeningSatelliteA00375 2.4s linear infinite;
}
#templatesGalleryManagerView .sttpl-openingShell__satellite--b {
  top: 50%; left: 50%;
  width: 7px; height: 7px;
  background: #c4b5fd;
  box-shadow: 0 0 14px rgba(196,181,253,.72);
  animation: stTplOpeningSatelliteB00375 3.8s linear infinite reverse;
}
#templatesGalleryManagerView .sttpl-openingShell__satellite--c {
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  background: #86efac;
  box-shadow: 0 0 14px rgba(134,239,172,.72);
  animation: stTplOpeningSatelliteC00375 5.6s linear infinite;
}

#templatesGalleryManagerView .sttpl-openingShell__content {
  width: min(680px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0 auto;
}

#templatesGalleryManagerView .sttpl-openingShell__tabBadge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(125,211,252,.18);
  background: rgba(14,165,233,.09);
  color: rgba(224,242,254,.78);
  font-size: 12px;
  line-height: 1.1;
  font-weight: 850;
  white-space: nowrap;
}

#templatesGalleryManagerView .sttpl-openingShell__tabBadge b {
  color: #f8fafc;
  margin-left: 5px;
}

#templatesGalleryManagerView .sttpl-openingShell__title {
  margin-top: 2px;
  font-size: clamp(23px, 3.2vw, 34px);
  line-height: 1.08;
  font-weight: 1000;
  letter-spacing: -.035em;
  color: #f8fafc;
  text-shadow: 0 0 22px rgba(34,211,238,.12);
}

#templatesGalleryManagerView .sttpl-openingShell__text {
  max-width: 620px;
  margin-top: 0;
  color: rgba(226, 232, 240, 0.82);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.55;
}

#templatesGalleryManagerView .sttpl-openingShell__pipeline {
  width: min(640px, 100%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

#templatesGalleryManagerView .sttpl-openingShell__pipeline span {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 7px 8px;
  border-radius: 12px;
  border: 1px solid rgba(125,211,252,.13);
  background: rgba(15,23,42,.42);
  color: rgba(224,242,254,.56);
  font-size: 10px;
  line-height: 1.1;
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#templatesGalleryManagerView .sttpl-openingShell__pipeline span.is-done {
  color: #bbf7d0;
  border-color: rgba(52,211,153,.22);
  background: rgba(6,78,59,.22);
}

#templatesGalleryManagerView .sttpl-openingShell__pipeline span.is-active {
  color: #cffafe;
  border-color: rgba(34,211,238,.34);
  background: linear-gradient(90deg, rgba(14,165,233,.18), rgba(99,102,241,.16));
  box-shadow: 0 0 18px rgba(34,211,238,.08);
  animation: stTplOpeningActiveStep00375 1.2s ease-in-out infinite;
}

#templatesGalleryManagerView .sttpl-openingShell__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}

#templatesGalleryManagerView .sttpl-openingShell__chips span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(125,211,252,.12);
  background: rgba(2,6,23,.26);
  color: rgba(224,242,254,.62);
  font-size: 11px;
  line-height: 1;
  font-weight: 850;
}

#templatesGalleryManagerView .sttpl-openingShell__chips span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34,211,238,.58);
}

#templatesGalleryManagerView .sttpl-openingShell__card.is-error .sttpl-openingShell__orb::before,
#templatesGalleryManagerView .sttpl-openingShell__card.is-error .sttpl-openingShell__orb::after,
#templatesGalleryManagerView .sttpl-openingShell__card.is-error .sttpl-openingShell__orbRing,
#templatesGalleryManagerView .sttpl-openingShell__card.is-error .sttpl-openingShell__satellite {
  animation-play-state: paused;
  opacity: .55;
}

#templatesGalleryManagerView .sttpl-openingShell__card.is-error .sttpl-openingShell__orb::before {
  background: conic-gradient(from -90deg, rgba(248,113,113,1), rgba(239,68,68,.32), rgba(248,113,113,1));
}

#templatesGalleryManagerView .sttpl-openingShell__card.is-error .sttpl-openingShell__orbCore strong {
  color: #fecaca;
  text-shadow: 0 0 18px rgba(248,113,113,.48);
}

#templatesGalleryManagerView .sttpl-openingShell__card.is-error .sttpl-openingShell__phase {
  color: #fecaca;
  border-color: rgba(248,113,113,.38);
  background: rgba(127,29,29,.24);
}

@keyframes stTplOpeningGridDrift00375 {
  from { transform: translate3d(0,0,0); }
  to { transform: translate3d(36px,36px,0); }
}

@keyframes stTplOpeningSlowRotate00375 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes stTplOpeningScan00375 {
  0% { transform: translateY(-80%); opacity: 0; }
  18% { opacity: .95; }
  56% { opacity: .55; }
  100% { transform: translateY(640%); opacity: 0; }
}

@keyframes stTplOpeningPulseDot00375 {
  0%, 100% { transform: scale(.86); opacity: .72; }
  50% { transform: scale(1.16); opacity: 1; }
}

@keyframes stTplOpeningOrbSpin00375 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes stTplOpeningSatelliteA00375 {
  from { transform: rotate(0deg) translateX(104px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(104px) rotate(-360deg); }
}

@keyframes stTplOpeningSatelliteB00375 {
  from { transform: rotate(70deg) translateX(90px) rotate(-70deg); }
  to { transform: rotate(430deg) translateX(90px) rotate(-430deg); }
}

@keyframes stTplOpeningSatelliteC00375 {
  from { transform: rotate(180deg) translateX(118px) rotate(-180deg); }
  to { transform: rotate(540deg) translateX(118px) rotate(-540deg); }
}

@keyframes stTplOpeningActiveStep00375 {
  0%, 100% { filter: brightness(.95); transform: translateY(0); }
  50% { filter: brightness(1.18); transform: translateY(-1px); }
}

@media (max-width: 760px), (max-height: 720px) {
  #templatesGalleryManagerView .sttpl-openingShell {
    padding: 14px;
    min-height: calc(100vh - 80px);
  }
  #templatesGalleryManagerView .sttpl-openingShell__card {
    width: 100%;
    min-height: 500px;
    padding: 18px;
    border-radius: 24px;
  }
  #templatesGalleryManagerView .sttpl-openingShell__top {
    align-items: flex-start;
    flex-direction: column;
  }
  #templatesGalleryManagerView .sttpl-openingShell__brand {
    white-space: normal;
    text-align: left;
    letter-spacing: .12em;
  }
  #templatesGalleryManagerView .sttpl-openingShell__orbWrap {
    width: 166px;
    height: 166px;
  }
  #templatesGalleryManagerView .sttpl-openingShell__orbCore {
    width: 92px;
    height: 92px;
  }
  #templatesGalleryManagerView .sttpl-openingShell__orbCore strong {
    font-size: 30px;
  }
  #templatesGalleryManagerView .sttpl-openingShell__pipeline {
    grid-template-columns: 1fr;
  }
  #templatesGalleryManagerView .sttpl-openingShell__pipeline span {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  #templatesGalleryManagerView .sttpl-openingShell *,
  #templatesGalleryManagerView .sttpl-openingShell::before,
  #templatesGalleryManagerView .sttpl-openingShell::after {
    animation: none !important;
    transition: none !important;
  }
}

/* [00382][Templates/Menu] Стан кнопки "Змінити" залежить тільки від активного блока меню. */
.st-menu-design-change-btn:disabled,
.st-menu-design-change-btn.is-disabled {
  opacity: .48 !important;
  filter: grayscale(.85) !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  background: rgba(148, 163, 184, .14) !important;
  border-color: rgba(148, 163, 184, .22) !important;
  color: rgba(226, 232, 240, .62) !important;
  box-shadow: none !important;
}
.st-menu-design-change-btn.is-ready:not(:disabled) {
  opacity: 1 !important;
  filter: none !important;
}

/* 01013 · H/M/F user template roots */
.sttpl-tree__item.is-my-templates{
  border-color:rgba(56,189,248,.42);
  background:linear-gradient(90deg,rgba(14,116,144,.22),rgba(15,23,42,.42));
  color:#e0f2fe;
  font-weight:900;
}
.sttpl-tree__item.is-my-templates.is-active{
  border-color:rgba(56,189,248,.72);
  background:linear-gradient(90deg,rgba(2,132,199,.35),rgba(14,116,144,.22));
  box-shadow:0 0 0 1px rgba(56,189,248,.10) inset;
}
.sttpl-tree__nested{display:flex;flex-direction:column;gap:6px;margin-top:6px;}

/* =========================================================
   01014 · TEMPLATE ACTION BUTTON CONTRAST + DELAYED HELP
   ========================================================= */
[data-widget="templates"] .sttpl-action-btn{
  width:100%;
  min-height:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:9px 12px;
  border-radius:10px;
  border:1px solid transparent;
  font-size:12px;
  font-weight:900;
  line-height:1.2;
  letter-spacing:.01em;
  text-align:center;
  white-space:normal;
  cursor:pointer;
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease,filter .14s ease;
  box-shadow:0 8px 18px rgba(0,0,0,.20),inset 0 1px 0 rgba(255,255,255,.08);
}
[data-widget="templates"] .sttpl-action-btn:hover{
  transform:translateY(-1px);
  filter:brightness(1.08);
  box-shadow:0 12px 26px rgba(0,0,0,.28),0 0 0 1px rgba(255,255,255,.05) inset;
}
[data-widget="templates"] .sttpl-action-btn:active{ transform:translateY(0); }
[data-widget="templates"] .sttpl-action-btn:focus-visible{
  outline:2px solid #67e8f9;
  outline-offset:2px;
}
[data-widget="templates"] .sttpl-action-btn--open{
  color:#fff !important;
  border-color:rgba(56,189,248,.68) !important;
  background:linear-gradient(135deg,#075985 0%,#0c4a6e 55%,#082f49 100%) !important;
}
[data-widget="templates"] .sttpl-action-btn--user{
  color:#ecfdf5 !important;
  border-color:rgba(52,211,153,.62) !important;
  background:linear-gradient(135deg,#047857 0%,#065f46 58%,#064e3b 100%) !important;
}
[data-widget="templates"] .sttpl-action-btn--system{
  color:#fff7ed !important;
  border-color:rgba(251,146,60,.78) !important;
  background:linear-gradient(135deg,#c2410c 0%,#9a3412 58%,#7c2d12 100%) !important;
  text-shadow:0 1px 1px rgba(0,0,0,.35);
}
[data-widget="templates"] .sttpl-action-btn[disabled]{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  filter:none;
}

/* Large readable tooltip for Templates actions and backup controls. */
.sttpl-tooltip{
  z-index:2147483300 !important;
  width:min(620px,calc(100vw - 28px));
  max-width:620px !important;
  box-sizing:border-box;
  white-space:pre-line;
  font-size:17px !important;
  line-height:1.58 !important;
  font-weight:750 !important;
  padding:20px 22px !important;
  border-radius:18px !important;
  border:1px solid rgba(56,189,248,.52) !important;
  background:
    radial-gradient(circle at 100% 0,rgba(14,165,233,.18),transparent 34%),
    linear-gradient(150deg,rgba(2,6,23,.985),rgba(8,47,73,.985)) !important;
  color:#f8fafc !important;
  box-shadow:0 28px 80px rgba(0,0,0,.58),0 0 0 1px rgba(255,255,255,.04) inset !important;
  text-shadow:0 1px 1px rgba(0,0,0,.28);
}
