/**
 * Ecab13 Print - product editor (front office)
 *
 * @author    Ecab13
 * @copyright Since 2026 Ecab13
 * @license   Commercial license - see the LICENSE.md file shipped with this module
 */
:root {
  --e13e-bg:        #f4f6fb;
  --e13e-surface:   #ffffff;
  --e13e-surface2:  #f8fafd;
  --e13e-border:    rgba(0,0,0,.07);
  --e13e-border2:   rgba(0,0,0,.11);
  --e13e-text:      #1a1d2e;
  --e13e-muted:     #7b8299;
  --e13e-muted2:    #a8b0c8;
  --e13e-accent:   #2563eb;
  --e13e-accent-bg: color-mix(in srgb, var(--e13e-accent) 8%, transparent);
  --e13e-accent-bd: color-mix(in srgb, var(--e13e-accent) 22%, transparent);
  --e13e-green:     #10B981;
  --e13e-shadow-sm: 0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --e13e-shadow:    0 4px 16px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.06);
  --e13e-shadow-lg: 0 20px 60px rgba(0,0,0,.16), 0 4px 16px rgba(0,0,0,.09);
  --e13e-radius:    14px;
}

#e13e-editor-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(15,18,35,.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}

#e13e-editor-overlay.is-open { display: flex;
}

body.e13e-page-mode {
  margin: 0; padding: 0; overflow: hidden;
  background: var(--e13e-bg);
}

body.e13e-page-mode #e13e-editor-overlay {
  position: static;
  width: 100vw; height: 100dvh;
  background: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0;
}

body.e13e-page-mode .e13e-editor-wrap {
  width: 100vw; height: 100dvh;
  max-width: none; max-height: none;
  border-radius: 0;
  border: none;
  animation: none;
  box-shadow: none;
}

.e13e-back-link {
  display: flex; align-items: center; gap: 7px;
  color: var(--e13e-text); font-size: .82rem; font-weight: 600;
  text-decoration: none; flex-shrink: 0;
  padding: 5px 10px; border-radius: 8px;
  background: var(--e13e-surface2); border: 1px solid var(--e13e-border2);
  transition: background .15s, border-color .15s;
}

.e13e-back-link:hover { background: var(--e13e-accent-bg); border-color: var(--e13e-accent-bd); color: var(--e13e-accent);
}

.e13e-back-label { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Technique chosen on the product page (product imported with several techniques), recalled next to its name. */
.e13e-technique-chip { flex: none; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--e13e-accent-bd); background: var(--e13e-accent-bg); color: var(--e13e-accent); font-size: .75rem; font-weight: 600; white-space: nowrap;
}

.e13e-header-cart-btn { display: none;
}

body.e13e-page-mode .e13e-header-cart-btn { display: flex;
}

.e13e-header-actions {
  display: flex; gap: 10px; align-items: center;
}

.e13e-header-view-cart { display: none;
}

body.e13e-page-mode .e13e-header-view-cart {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700; font-size: .82rem;
  color: var(--e13e-text);
  background: #fff;
  border: 1.5px solid var(--e13e-border2);
  transition: all .14s;
  white-space: nowrap;
}

body.e13e-page-mode .e13e-header-view-cart:hover {
  border-color: var(--e13e-accent-bd);
  color: var(--e13e-accent);
  background: var(--e13e-accent-bg);
  transform: translateY(-1px);
}

body.e13e-page-mode .e13e-header-view-cart.is-empty {
  opacity: .5; pointer-events: none; cursor: default;
}

.e13e-cart-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  background: var(--e13e-accent, var(--e13e-accent)); color: #fff;
  border-radius: 999px;
  font-size: .72rem; font-weight: 700; line-height: 1;
}

.e13e-cart-total {
  font-weight: 800; color: var(--e13e-accent, var(--e13e-accent));
  font-size: .82rem;
}

.e13e-size-modal-actions {
  display: flex; gap: 10px; margin-top: 4px;
}

.e13e-size-modal-actions .e13e-size-continue { flex: 1;
}

.e13e-size-modal-actions .e13e-size-confirm { flex: 1.6;
}

.e13e-editor-wrap {
  position: relative;
  width:  min(calc(100vw - 32px), 1380px);
  height: min(calc(100vh - 32px), 880px);
  background: var(--e13e-surface);
  border: 1px solid var(--e13e-border);
  border-radius: var(--e13e-radius);
  display: grid;
  grid-template-columns: 340px 1fr;
  grid-template-rows: 52px 1fr;
  overflow: hidden;
  animation: smeFadeIn .22s cubic-bezier(.34,1.2,.64,1);
  box-shadow: var(--e13e-shadow-lg);
}

#e13e-close {
  position: static; width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: var(--e13e-surface2); border: 1px solid var(--e13e-border2);
  color: var(--e13e-muted); cursor: pointer; font-size: .85rem;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}

#e13e-close:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626;
}

.e13e-editor-header {
  grid-column: 1 / -1; grid-row: 1;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  background: var(--e13e-surface);
  border-bottom: 1px solid var(--e13e-border);
  box-shadow: var(--e13e-shadow-sm);
  z-index: 2;
}

.e13e-header-logo {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

.e13e-header-logo i { color: var(--e13e-accent); font-size: 1rem;
}

.e13e-header-logo span { font-size: .82rem; font-weight: 800; color: var(--e13e-text); letter-spacing: -.01em;
}

.e13e-loading-inline {
  display: flex; align-items: center; gap: 7px;
  font-size: .72rem; color: var(--e13e-muted);
}

.e13e-banner-btn {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  margin-left: 6px; padding: 3px 9px; border-radius: 14px; cursor: pointer;
  border: 1px solid rgba(16,185,129,.35); background: rgba(255,255,255,.75);
  color: var(--e13e-green); font-size: .68rem; font-weight: 700; font-family: inherit;
  white-space: nowrap; transition: background .15s, border-color .15s;
}

.e13e-banner-btn:hover { background: #fff; border-color: var(--e13e-green);
}

.e13e-banner-btn i { font-size: .62rem;
}

@media (max-width: 720px) {
  .e13e-banner-btn span { display: none;
  }
}

.e13e-panel-left {
  grid-column: 1; grid-row: 2;
  min-height: 0;
  border-right: 1px solid var(--e13e-border);
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--e13e-surface);
}

.e13e-canvas-zone { display: none !important;
}

.e13e-face-row { display: none !important;
}

.e13e-tab-nav {
  display: flex; flex-wrap: wrap; gap: 3px; padding: 8px 10px;
  border-bottom: 1px solid var(--e13e-border);
  background: var(--e13e-surface);
  box-shadow: 0 1px 0 var(--e13e-border);
  flex-shrink: 0;
}

.e13e-tab-btn {
  padding: 6px 10px; border-radius: 8px; border: 1px solid transparent;
  background: transparent; color: var(--e13e-muted);
  cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
  transition: all .14s; font-family: inherit; font-size: .72rem; font-weight: 600;
  flex-shrink: 0;
  position: relative;
}

.e13e-tab-dot {
  position: absolute; top: 2px; right: 2px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--e13e-accent, var(--e13e-accent));
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px color-mix(in srgb, var(--e13e-accent) 35%, transparent);
  animation: smePulse 1.4s ease-in-out infinite;
  pointer-events: none;
}

.e13e-card-hint {
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 60%);
  border-color: #bfdbfe !important;
}

.e13e-card-hint .e13e-card-title::before {
  background: #2563eb !important;
}

.e13e-tab-btn i { font-size: .8rem;
}

.e13e-tab-btn span { line-height: 1;
}

.e13e-tab-btn:hover { color: var(--e13e-text); background: var(--e13e-surface2); border-color: var(--e13e-border2);
}

.e13e-tab-btn.active {
  background: var(--e13e-accent-bg); border-color: var(--e13e-accent-bd); color: var(--e13e-accent); font-weight: 700;
}

/* QR code tab on a side embroidered in standard: greyed, still opened (its panel says why). */
.e13e-tab-btn.is-off { opacity: .42; filter: grayscale(1);
}

.e13e-tab-panels {
  flex: 1;
  min-height: 0;
  overflow-y: scroll;
  scrollbar-width: thin; scrollbar-color: #c8cdd8 #f0f2f7;
}

.e13e-tab-panels::-webkit-scrollbar { width: 7px;
}

.e13e-tab-panels::-webkit-scrollbar-track { background: #f0f2f7;
}

.e13e-tab-panels::-webkit-scrollbar-thumb { background: #c8cdd8; border-radius: 4px;
}

.e13e-tab-panels::-webkit-scrollbar-thumb:hover { background: #a0a8bc;
}

.e13e-tab-panel { display: none; padding: 10px 12px;
}

.e13e-tab-panel.is-active { display: block;
}

.e13e-left-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--e13e-border);
  display: flex; gap: 8px;
  background: var(--e13e-surface);
  box-shadow: 0 -1px 0 var(--e13e-border);
  flex-shrink: 0;
}

.e13e-section-title {
  font-size: .65rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--e13e-muted2);
  margin-bottom: 8px; margin-top: 10px;
}

.e13e-section-title:first-child { margin-top: 0;
}

.e13e-card {
  background: #fbfbfd;
  border: 1px solid var(--e13e-border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.025);
}

.e13e-card:last-child { margin-bottom: 6px;
}

.e13e-card-title {
  display: flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700;
  color: var(--e13e-text);
  letter-spacing: .02em;
  margin-bottom: 12px;
}

.e13e-card-title::before {
  content: '';
  width: 3px; height: 16px;
  background: var(--e13e-accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.e13e-card-title i {
  color: var(--e13e-accent);
  font-size: .85rem;
}

.e13e-field-label {
  font-size: .68rem;
  font-weight: 600;
  color: var(--e13e-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
  margin-top: 12px;
}

.e13e-field-label:first-child,
.e13e-field-label.is-first { margin-top: 0;
}

.e13e-card-divider {
  height: 1px;
  background: var(--e13e-border);
  margin: 14px -14px 0;
  padding: 0;
}

#e13e-text-layers { position: absolute; inset: 0; pointer-events: none; z-index: 1;
}

#e13e-clipart-layers { position: absolute; inset: 0; pointer-events: none; z-index: 2;
}

.e13e-clipart-layer {
  position: absolute;
  pointer-events: auto;
  cursor: move;
  user-select: none;
  touch-action: none;
  display: flex; align-items: center; justify-content: center;
}

.e13e-clipart-layer i { display: block;
}

.e13e-clipart-layer .e13e-text-remove { display: none;
}

.e13e-clipart-layer.is-selected .e13e-text-remove { display: flex;
}

.cl-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f5f3ee;
  border-radius: 11px;
  padding: 3px;
  margin-bottom: 10px;
}

.cl-seg-btn {
  padding: 8px 10px; border-radius: 9px;
  font-size: 12px; font-weight: 600;
  color: #6b6962; background: transparent; border: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; transition: all .15s; font-family: inherit;
}

.cl-seg-btn.on {
  background: #fff; color: #0f0f10;
  box-shadow: 0 1px 2px rgba(15,15,16,0.04);
}

.cl-seg-dot { width: 10px; height: 10px; border-radius: 999px;
}

.cl-seg-dot.dot-pink { background: linear-gradient(135deg, var(--e13e-accent), #FFB54A);
}

.cl-seg-dot.dot-black { background: #111;
}

.cl-search {
  display: flex; align-items: center; gap: 8px;
  background: #f5f3ee; border-radius: 11px;
  padding: 9px 12px; margin-bottom: 12px;
  transition: all .15s;
}

.cl-search:focus-within {
  background: #fff;
  box-shadow: 0 0 0 2px var(--e13e-accent);
}

.cl-search-icon { color: #6b6962; flex-shrink: 0;
}

.cl-search input {
  flex: 1; border: 0; outline: none; background: transparent;
  font-size: 13px; font-family: inherit;
}

.cl-search-clear {
  color: #6b6962; font-size: 18px; line-height: 1;
  width: 18px; height: 18px;
  background: transparent; border: 0; cursor: pointer;
}

.cl-chips {
  display: flex; gap: 6px;
  overflow-x: auto;
  margin: 0 -4px 12px;
  padding: 0 4px 2px;
  scrollbar-width: none;
}

.cl-chips::-webkit-scrollbar { display: none;
}

.cl-chips.cl-chips-wrap {
  flex-wrap: wrap;
  overflow-x: visible;
}

.cl-chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: #f5f3ee; color: #6b6962; border: 0;
  transition: all .12s; white-space: nowrap; cursor: pointer; font-family: inherit;
}

.cl-chip:hover { background: #ebe7dd;
}

.cl-chip.on { background: #0f0f10; color: #fff;
}

.cl-chip[data-clchip="trending"].on { background: var(--e13e-accent);
}

.cl-chip-icon { font-size: 13px; line-height: 1;
}

.cl-section { margin-top: 18px;
}

.cl-section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}

.cl-section-title {
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
  color: #0f0f10;
}

.cl-section-emoji { font-size: 14px;
}

.cl-section-count {
  font-size: 11px; color: #9a978d;
  background: #f5f3ee; padding: 2px 8px; border-radius: 999px;
  font-weight: 600; font-variant-numeric: tabular-nums;
}

.cl-link {
  font-size: 11px; color: var(--e13e-accent); font-weight: 600;
  background: transparent; border: 0; cursor: pointer; font-family: inherit;
}

.cl-link:hover { text-decoration: underline;
}

.cl-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}

.cl-recents {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
}

.cl-tile {
  aspect-ratio: 1 / 1; border-radius: 12px;
  background: #f5f3ee;
  display: grid; place-items: center;
  transition: all .15s cubic-bezier(.34,1.56,.64,1);
  position: relative; overflow: hidden;
  border: 0; cursor: pointer; padding: 0;
}

.cl-tile-inner { display: grid; place-items: center; transition: transform .15s;
}

.cl-tile-icon:hover {
  background: #fff;
  box-shadow: 0 8px 24px -12px rgba(15,15,16,0.18);
  transform: translateY(-1px);
}

.cl-tile-sticker {
  padding: 6px;
}

.cl-tile-sticker::before {
  content: ""; position: absolute; inset: 6px;
  background: var(--bg, #FFE5EC);
  border-radius: 10px;
  transform: rotate(var(--rot, 0deg));
  border: 2.5px solid #fff;
  box-shadow: 0 2px 6px -2px rgba(0,0,0,0.15);
  transition: transform .2s cubic-bezier(.34,1.56,.64,1);
}

.cl-tile-sticker .cl-tile-inner {
  position: relative; z-index: 1;
  transform: rotate(var(--rot, 0deg));
}

.cl-tile-sticker:hover::before { transform: rotate(0deg) scale(1.06);
}

.cl-tile-sticker:hover .cl-tile-inner { transform: rotate(0deg) scale(1.06);
}

.cl-tile-small { aspect-ratio: 1 / 1;
}

.cl-tile-small svg { width: 22px; height: 22px;
}

.cl-tile svg { display: block;
}

.cl-trending-dot {
  position: absolute; top: 5px; right: 5px;
  width: 7px; height: 7px;
  background: var(--e13e-accent); border-radius: 999px;
  box-shadow: 0 0 0 2px #fff;
  z-index: 3;
}

.cl-edit {
  background: #fbfbfd;
  border: 1px solid var(--e13e-border);
  border-radius: 12px; padding: 12px 14px;
  margin-bottom: 12px;
}

.cl-edit-title {
  display: flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: .02em;
}

.cl-edit-title::before {
  content: ''; width: 3px; height: 16px;
  background: var(--e13e-accent); border-radius: 2px; flex-shrink: 0;
}

.cl-uploads { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--e13e-border);
}

.cl-badge-soon {
  background: #f5f3ee; color: #9a978d;
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}

.cl-upload-cta {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border: 2px dashed var(--e13e-border);
  background: #f5f3ee; border-radius: 12px;
  text-align: left; transition: all .15s;
  cursor: pointer; font-family: inherit;
}

.cl-upload-cta:hover {
  border-color: var(--e13e-accent);
  background: #FFE5EC;
}

.cl-upload-plus {
  width: 36px; height: 36px; background: #fff;
  border-radius: 10px; display: grid; place-items: center;
  font-size: 22px; color: var(--e13e-accent); font-weight: 300;
  flex-shrink: 0; box-shadow: 0 1px 2px rgba(15,15,16,0.04);
}

.cl-upload-text { display: flex; flex-direction: column; line-height: 1.3;
}

.cl-upload-text strong { font-size: 13px; font-weight: 700;
}

.cl-upload-text small { font-size: 11px; color: #9a978d; margin-top: 1px;
}

.cl-empty {
  text-align: center; padding: 40px 20px; color: #6b6962;
}

.cl-empty-emoji { font-size: 40px; color: #9a978d; margin-bottom: 8px;
}

.cl-empty-title { font-weight: 700; font-size: 14px; color: #0f0f10;
}

.cl-empty-sub { font-size: 12px; margin-top: 2px;
}

.e13e-text-layer {
  position: absolute;
  pointer-events: auto;
  cursor: move;
  user-select: none;
  touch-action: none;
  padding: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.15;
  
  height: auto !important;
  min-height: 0;
  
  width: max-content !important;
  max-width: calc(100% - 4px);
}

.e13e-text-layer .e13e-resize-handle { display: none !important;
}

.e13e-text-layer .e13e-text-remove { display: none;
}

.e13e-text-layer.is-selected .e13e-text-remove { display: flex;
}

.e13e-text-remove {
  position: absolute; top: -8px; right: -8px; width: 20px; height: 20px;
  background: #dc2626; border: none; border-radius: 50%;
  color: #fff; font-size: .65rem; cursor: pointer;
  align-items: center; justify-content: center;
  z-index: 4; pointer-events: auto;
  box-shadow: 0 2px 6px rgba(220,38,38,.4);
}

.e13e-text-layers-list { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto;
}

.e13e-text-layer-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border: 1.5px solid var(--e13e-border2);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: .82rem;
  transition: all .14s;
}

.e13e-text-layer-item:hover { border-color: var(--e13e-accent-bd);
}

.e13e-text-layer-item.active {
  border-color: var(--e13e-accent);
  background: var(--e13e-accent-bg);
  box-shadow: 0 0 0 3px var(--e13e-accent-bg);
}

.e13e-text-layer-item .preview {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 600;
}

.e13e-text-layer-item .del {
  width: 24px; height: 24px;
  background: transparent; border: none; color: #999;
  cursor: pointer; border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}

.e13e-text-layer-item .del:hover { background: #fee; color: #dc2626;
}

.e13e-hint {
  font-size: .74rem; color: var(--e13e-muted); line-height: 1.6; margin-bottom: 10px;
}

.e13e-badges-row { display: flex; flex-wrap: wrap; gap: 5px;
}

.e13e-badge {
  padding: 6px 9px; border-radius: 8px;
  border: 1.5px solid var(--e13e-border2);
  background: var(--e13e-surface); cursor: pointer;
  display: flex; align-items: center; gap: 5px;
  color: var(--e13e-muted); font-size: .65rem; transition: all .14s;
  box-shadow: var(--e13e-shadow-sm);
}

.e13e-badge:hover { border-color: var(--e13e-accent-bd); color: var(--e13e-text); box-shadow: var(--e13e-shadow);
}

.e13e-badge.active {
  border-color: var(--e13e-accent); background: var(--e13e-accent-bg);
  color: var(--e13e-accent); font-weight: 700;
  box-shadow: 0 0 0 3px var(--e13e-accent-bg);
}

.e13e-badge svg { display: block;
}

.e13e-swatches-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}

.e13e-swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2.5px solid transparent; transition: all .15s;
  box-shadow: 0 2px 6px rgba(0,0,0,.2); position: relative;
}

.e13e-swatch:hover { transform: scale(1.15);
}

.e13e-swatch.active { border-color: var(--e13e-text); box-shadow: 0 0 0 3px rgba(0,0,0,.1);
}

.e13e-swatch.active::after { content:'✓'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:.55rem; color:#fff; font-weight:900; text-shadow:0 1px 3px rgba(0,0,0,.8);
}

.e13e-color-picker-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0; font-size: .75rem; color: var(--e13e-muted);
}

.e13e-color-input {
  width: 34px; height: 28px; border-radius: 6px; border: 1.5px solid var(--e13e-border2);
  background: transparent; cursor: pointer; padding: 2px;
}

.e13e-radio-pills { display: flex; gap: 5px; margin-bottom: 8px;
}

.e13e-radio-pill {
  padding: 4px 12px; border-radius: 20px;
  border: 1.5px solid var(--e13e-border2); background: var(--e13e-surface);
  color: var(--e13e-muted); font-size: .7rem; cursor: pointer; transition: all .14s;
  font-family: inherit; box-shadow: var(--e13e-shadow-sm);
}

.e13e-radio-pill.active { background: var(--e13e-accent); border-color: var(--e13e-accent); color: #fff; font-weight: 700; box-shadow: 0 2px 8px color-mix(in srgb, var(--e13e-accent) 30%, transparent);
}

.e13e-toggle-row { padding: 5px 0;
}

.e13e-toggle-label {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: .78rem; color: var(--e13e-text);
}

.e13e-toggle-label input[type=checkbox] { display: none;
}

.e13e-toggle-track {
  width: 34px; height: 18px; border-radius: 10px;
  background: #d1d5db; position: relative; transition: background .2s; flex-shrink: 0;
}

.e13e-toggle-track::after {
  content:''; position:absolute; top:2px; left:2px;
  width:14px; height:14px; border-radius:50%;
  background:#fff; transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.e13e-toggle-label input:checked + .e13e-toggle-track { background: var(--e13e-accent);
}

.e13e-toggle-label input:checked + .e13e-toggle-track::after { left: 18px;
}

.e13e-field-row { margin-bottom: 8px;
}

.e13e-field-label { font-size: .7rem; color: var(--e13e-muted); display: block; margin-bottom: 5px; font-weight: 600;
}

.e13e-field-input {
  width: 100%; padding: 8px 10px; border-radius: 8px;
  border: 1.5px solid var(--e13e-border2); background: var(--e13e-surface);
  color: var(--e13e-text); font-size: .82rem; font-family: inherit;
  box-shadow: var(--e13e-shadow-sm); transition: border-color .15s;
}

.e13e-field-input:focus { outline: none; border-color: var(--e13e-accent); box-shadow: 0 0 0 3px var(--e13e-accent-bg);
}

.e13e-lazy-loader {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 32px 16px;
  color: var(--e13e-muted); font-size: .8rem; font-weight: 600;
}

/* Turn of the spinners (.e13e-spinner, .e13e-lazy-spinner, cards loading). */
@keyframes smeSpin { to { transform: rotate(360deg); } }

.e13e-lazy-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--e13e-border2);
  border-top-color: var(--e13e-accent, var(--e13e-accent));
  border-radius: 50%;
  animation: smeSpin .9s linear infinite;
}

.e13e-template-cats {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px;
}

.e13e-tplcat {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border: 1px solid var(--e13e-border2, #e5e0d8);
  background: var(--e13e-bg-glass2, #faf8f4); color: var(--e13e-text, #1a1d2e);
  border-radius: 50px; font-size: .74rem; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: all .15s; white-space: nowrap;
}

.e13e-tplcat:hover { border-color: var(--e13e-accent, var(--e13e-accent));
}

.e13e-tplcat.active { background: var(--e13e-accent, var(--e13e-accent)); color: #fff; border-color: transparent;
}

.e13e-tplcat-n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 50px;
  background: rgba(0,0,0,.08); font-size: .62rem; font-weight: 800;
}

.e13e-tplcat.active .e13e-tplcat-n { background: rgba(255,255,255,.28);
}

.e13e-template-groups { display: flex; flex-wrap: wrap; gap: 6px;
}

.e13e-tplgrp { padding: 7px 13px; font-size: .78rem;
}

.e13e-template-subcats {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--e13e-border2, #e5e0d8);
}

.e13e-tplsub { padding: 4px 9px; font-size: .70rem; font-weight: 600;
}

.e13e-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.e13e-template-slot { position: relative; display: block;
}

.e13e-template-slot > .e13e-template-card { width: 100%;
}

.e13e-template-fav {
  position: absolute; top: 4px; right: 4px; z-index: 4;
  width: 22px; height: 22px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; cursor: pointer;
  background: rgba(12, 14, 20, .45); color: #fff;
  font-size: .68rem; line-height: 1;
  opacity: 0; transition: opacity .14s, background .14s, transform .14s;
}

.e13e-template-slot:hover .e13e-template-fav,
.e13e-template-fav:focus-visible { opacity: 1;
}

.e13e-template-fav.is-fav { opacity: 1; background: #F5A623; color: #fff;
}

.e13e-template-fav:hover { transform: scale(1.12); background: rgba(12, 14, 20, .72);
}

.e13e-template-fav.is-fav:hover { background: #E09612;
}

.e13e-template-slot.is-selected .e13e-template-fav { right: 27px;
}

@media (hover: none) {
  .e13e-template-fav { opacity: .85;
  }
}

.e13e-template-card {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 0; border: none; background: transparent;
  cursor: pointer; font-family: inherit;
  transition: transform .14s;
}

.e13e-template-card:hover { transform: translateY(-2px);
}

.e13e-template-preview {
  width: 100%; aspect-ratio: 1; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.1);
  position: relative; overflow: hidden;
  transition: box-shadow .14s;
}

.e13e-template-card:hover .e13e-template-preview {
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}

.e13e-template-emoji {
  font-size: 1.7rem; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}

.e13e-template-name {
  font-size: .68rem; font-weight: 700;
  color: var(--e13e-text);
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}

.e13e-template-preview-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}

.e13e-template-emoji { position: relative; z-index: 1;
}

.e13e-template-card.is-selected .e13e-template-preview {
  box-shadow: 0 0 0 3px var(--e13e-accent), 0 0 0 6px color-mix(in srgb, var(--e13e-accent) 25%, transparent);
}

.e13e-template-card.is-selected .e13e-template-preview::after {
  content: '✓';
  position: absolute; top: 5px; right: 5px; z-index: 2;
  width: 18px; height: 18px;
  background: var(--e13e-accent); color: #fff;
  border-radius: 50%; font-size: .72rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.e13e-template-card.is-selected .e13e-template-name { color: var(--e13e-accent);
}

/* A theme or a QR background whose picture is loading after a click: a spinner over its card. */
.e13e-template-card.is-loading { cursor: progress; }
.e13e-template-card.is-loading .e13e-template-preview-img { opacity: .55; transition: opacity .2s ease; }
.e13e-template-card.is-loading .e13e-template-preview::before {
  content: ''; position: absolute; top: 50%; left: 50%; z-index: 4;
  width: 30px; height: 30px; margin: -15px 0 0 -15px; box-sizing: border-box;
  border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  border: 3px solid rgba(0, 0, 0, .08); border-top-color: var(--e13e-accent);
  animation: smeSpin .8s linear infinite; pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .e13e-template-card.is-loading .e13e-template-preview::before { animation-duration: 2.4s; }
}

.e13e-template-new {
  position: absolute; top: 6px; left: 6px; z-index: 3;
  background: var(--e13e-accent); color: #fff;
  font-size: 9px; font-weight: 800; letter-spacing: .5px;
  padding: 2px 6px; border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,.3); pointer-events: none;
}

.spt-close { position: absolute; top: 6px; right: 10px; border: 0; background: transparent; font-size: 1.15rem; color: #99a; cursor: pointer; line-height: 1;
}

.spt-row { display: flex; gap: 12px; align-items: stretch;
}

.spt-info { flex: 1; min-width: 0;
}

.spt-title { font-size: .86rem; font-weight: 800; color: var(--e13e-text, #111); display: flex; gap: 7px; align-items: center; padding-right: 14px;
}

.spt-title .fa { color: var(--e13e-accent);
}

.spt-body { margin: 6px 0 10px; font-size: .78rem; line-height: 1.45; color: var(--e13e-muted, #666);
}

.spt-actions { display: flex; gap: 8px; flex-wrap: wrap;
}

.spt-actions .e13e-btn { font-size: .76rem; padding: 7px 12px;
}

.spt-later { background: #f0f0f0; color: #444;
}

.spt-mini { width: 108px; flex: none; border-radius: 10px; overflow: hidden; border: 1px solid rgba(0,0,0,.14);
}

.spt-mini-cover { height: 44px; background-size: cover; background-position: center; position: relative;
}

.spt-mini-avatar { position: absolute; left: 8px; bottom: -12px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid; background-size: cover; background-position: center;
}

.spt-mini-lines { padding: 16px 8px 10px; display: flex; flex-direction: column; gap: 5px;
}

.spt-mini-lines > span { height: 5px; border-radius: 3px; display: block;
}

.spt-mini-chip { height: 14px !important; border-radius: 5px !important;
}

.spp-cover { height: 220px; background-size: cover; background-position: center; position: relative;
}

.spp-close { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 1.1rem; cursor: pointer; line-height: 1;
}

.spp-bodyzone { padding: 0 26px 22px; position: relative; text-align: center;
}

.spp-avatar { display: block; width: 96px; height: 96px; border-radius: 50%; border: 4px solid; background-size: cover; background-position: center; margin: -48px auto 10px; box-shadow: 0 6px 18px rgba(0,0,0,.35);
}

.spp-name { margin: 0 0 3px; font-size: 1.3rem;
}

.spp-handle { font-size: .92rem; font-weight: 700; font-family: monospace; margin-bottom: 16px;
}

.spp-cards { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px;
}

.spp-card { border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px;
}

.spp-line { height: 7px; border-radius: 4px; display: block;
}

.spp-card .spp-line:first-child { opacity: .85;
}

.spp-note { font-size: .84rem; line-height: 1.5; opacity: .78; margin: 0 0 14px;
}

.spp-ok { width: 100%; font-size: .92rem; padding: 11px 16px;
}

@media (max-width: 480px) {
  .spp-cover { height: 150px;
  }
  .spp-avatar { width: 76px; height: 76px; margin-top: -38px;
  }
}

.e13e-face-btn {
  padding: 7px 14px; border-radius: 8px;
  border: 1.5px solid var(--e13e-border2); background: var(--e13e-surface);
  color: var(--e13e-muted); font-size: .76rem; font-weight: 600; cursor: pointer;
  transition: all .14s; font-family: inherit;
  box-shadow: var(--e13e-shadow-sm);
}

.e13e-face-btn.active {
  background: var(--e13e-accent); border-color: var(--e13e-accent); color: #fff;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--e13e-accent) 35%, transparent);
}

.e13e-face-btn:hover:not(.active) { border-color: var(--e13e-accent-bd); color: var(--e13e-text);
}

.e13e-btn {
  padding: 10px 16px; border-radius: 10px; border: none;
  font-size: .82rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  transition: all .15s; font-family: inherit; flex: 1;
}

.e13e-btn-primary {
  background: linear-gradient(135deg,var(--e13e-accent),color-mix(in srgb, var(--e13e-accent) 70%, #000)); color: #fff;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--e13e-accent) 30%, transparent);
}

.e13e-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px color-mix(in srgb, var(--e13e-accent) 40%, transparent);
}

.e13e-btn-ghost {
  background: var(--e13e-surface); border: 1.5px solid var(--e13e-border2);
  color: var(--e13e-muted); box-shadow: var(--e13e-shadow-sm);
}

.e13e-btn-ghost:hover { border-color: var(--e13e-accent-bd); color: var(--e13e-accent);
}

.e13e-btn-cart {
  background: linear-gradient(135deg,#10B981,#059669); color: #fff;
  box-shadow: 0 2px 10px rgba(16,185,129,.3); white-space: nowrap;
}

.e13e-btn-cart:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(16,185,129,.4);
}

.e13e-btn:disabled,
.e13e-btn[disabled] {
  opacity: .45;
  filter: grayscale(.7);
  cursor: not-allowed;
  box-shadow: none;
}

.e13e-btn:disabled:hover,
.e13e-btn[disabled]:hover { transform: none; box-shadow: none;
}

.e13e-panel-right {
  grid-column: 2; grid-row: 2;
  min-height: 0;
  display: flex; flex-direction: column; overflow-y: scroll;
  background: #eef1f8;
  background-image: radial-gradient(circle at 60% 40%, color-mix(in srgb, var(--e13e-accent) 4%, transparent) 0%, transparent 60%),
                    radial-gradient(circle at 20% 80%, rgba(124,58,237,.04) 0%, transparent 50%);
  scrollbar-width: thin; scrollbar-color: #c8cdd8 #e8ebf2;
}

.e13e-panel-right::-webkit-scrollbar { width: 7px;
}

.e13e-panel-right::-webkit-scrollbar-track { background: #e8ebf2;
}

.e13e-panel-right::-webkit-scrollbar-thumb { background: #c8cdd8; border-radius: 4px;
}

.e13e-panel-right::-webkit-scrollbar-thumb:hover { background: #a0a8bc;
}

.e13e-face-tabs {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px;
  border-bottom: 1px solid var(--e13e-border);
  flex-shrink: 0; background: var(--e13e-surface);
  box-shadow: var(--e13e-shadow-sm);
}

.e13e-qa-inline { display: flex; gap: 4px; margin-left: auto;
}

.e13e-qa-btn {
  width: 30px; height: 30px; border-radius: 7px;
  border: 1.5px solid var(--e13e-border2); background: var(--e13e-surface);
  color: var(--e13e-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .76rem; transition: all .14s;
  box-shadow: var(--e13e-shadow-sm);
}

.e13e-qa-btn:hover { border-color: var(--e13e-accent-bd); color: var(--e13e-accent); background: var(--e13e-accent-bg);
}

.e13e-qa-danger:hover { border-color: #fca5a5; color: #dc2626; background: #fee2e2;
}

.e13e-qa-btn.is-disabled {
  opacity: .35; pointer-events: none; cursor: default;
}

.e13e-qa-sep {
  display: inline-block; width: 1px; height: 18px;
  background: var(--e13e-border); margin: 0 4px; align-self: center;
}

.e13e-zoom-label {
  font-size: .72rem; font-weight: 600; color: var(--e13e-muted);
  min-width: 34px; text-align: center; user-select: none; align-self: center;
}

.e13e-mockup-wrap {
  flex: 1; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  min-height: 0;
  background: #ffffff;
  transition: background-color .25s ease;
}

#e13e-mockup-inner {
  position: relative; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  transform-origin: center center;
  transition: transform .2s ease;
}

.e13e-mockup-img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  display: block; user-select: none; pointer-events: none;
  background: transparent;
  filter: drop-shadow(0 6px 20px rgba(0,0,0,.15));
  position: relative;
}

#e13e-img-object {
  position: absolute; display: none; cursor: move; touch-action: none;
  border: 1.5px dashed transparent; border-radius: 4px; z-index: 0; pointer-events: auto;
}

#e13e-img-object.is-selected { border-color: color-mix(in srgb, var(--e13e-accent) 70%, transparent); border-style: dashed;
}

.e13e-img-object-img {
  width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 4px;
  pointer-events: none; user-select: none;
}

#e13e-img-object .e13e-resize-handle { bottom: 4px; right: 4px; display: none;
}

#e13e-img-object.is-selected .e13e-resize-handle { display: block;
}

.e13e-img-fit {
  position: absolute; top: 4px; left: 4px; width: 22px; height: 22px;
  background: var(--e13e-accent); color: #fff; border-radius: 6px;
  display: none; align-items: center; justify-content: center;
  font-size: .7rem; line-height: 1; cursor: pointer; z-index: 3; pointer-events: auto;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--e13e-accent) 50%, transparent);
}

#e13e-img-object.is-selected .e13e-img-fit { display: flex;
}

#e13e-img-object .e13e-img-fit,
#e13e-img-object .e13e-resize-handle,
#e13e-img-object .e13e-img-rotate { display: none !important;
}

#e13e-img-toolbar {
  position: absolute; display: none; gap: 4px; z-index: 30;
  transform: translate(-50%, calc(-100% - 8px));
  background: rgba(22,22,32,.85); padding: 5px 7px; border-radius: 9px;
  box-shadow: 0 4px 14px rgba(0,0,0,.4); pointer-events: auto;
}

#e13e-img-toolbar button {
  width: 28px; height: 28px; padding: 0; border: none; border-radius: 6px; cursor: pointer;
  background: var(--e13e-accent); color: #fff; font-size: .92rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

#e13e-img-toolbar button:hover { filter: brightness(1.13);
}

#e13e-img-rzh {
  position: absolute; display: none; width: 20px; height: 20px;
  transform: translate(-50%, -50%); z-index: 30; cursor: nwse-resize; touch-action: none;
  background: var(--e13e-accent); border: 2px solid #fff; border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,.45); pointer-events: auto;
}

.e13e-img-rotate {
  position: absolute; bottom: 4px; left: 4px; width: 22px; height: 22px;
  background: var(--e13e-accent); color: #fff; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  font-size: .9rem; line-height: 1; cursor: grab; z-index: 3; pointer-events: auto;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--e13e-accent) 50%, transparent);
}

#e13e-img-object.is-selected .e13e-img-rotate { display: flex;
}

.e13e-print-area {
  position: absolute;
  border: 1.5px dashed transparent;
  border-radius: 4px; pointer-events: none;
  overflow: hidden;
  z-index: 3;
}

.e13e-guide {
  position: absolute; pointer-events: none; z-index: 20;
  opacity: 0; transition: opacity .08s;
}

.e13e-guide.visible { opacity: 1;
}

.e13e-guide-h {
  left: -4px; right: -4px; height: 1px; top: 50%;
  background: var(--e13e-accent);
  box-shadow: 0 0 4px color-mix(in srgb, var(--e13e-accent) 70%, transparent);
}

.e13e-guide-v {
  top: -4px; bottom: -4px; width: 1px; left: 50%;
  background: var(--e13e-accent);
  box-shadow: 0 0 4px color-mix(in srgb, var(--e13e-accent) 70%, transparent);
}

#e13e-qa-guides.active {
  border-color: var(--e13e-accent-bd); color: var(--e13e-accent);
  background: var(--e13e-accent-bg);
}

.e13e-guides-on .e13e-print-area {
  border-color: color-mix(in srgb, var(--e13e-accent) 55%, transparent); border-style: dashed;
}

#e13e-final-img { width: 100%; height: 100%; display: block; pointer-events: none; user-select: none;
}

.e13e-resize-handle {
  position: absolute; bottom: -5px; right: -5px;
  width: 14px; height: 14px; border-radius: 3px;
  background: var(--e13e-accent); cursor: nwse-resize; z-index: 2; pointer-events: auto;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--e13e-accent) 50%, transparent);
  display: none;
}

.e13e-tshirt-color-section {
  padding: 8px 14px 10px; flex-shrink: 0;
  border-top: 1px solid var(--e13e-border);
  background: var(--e13e-surface);
  box-shadow: 0 -1px 0 var(--e13e-border);
}

.e13e-tshirt-swatches { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px;
}

.e13e-tshirt-swatch {
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: all .15s;
  box-shadow: 0 2px 5px rgba(0,0,0,.2);
}

.e13e-tshirt-swatch:hover { transform: scale(1.2);
}

.e13e-tshirt-swatch.active { border-color: transparent; outline: 2.5px solid #3b82f6; outline-offset: 2px;
}

.e13e-tshirt-swatch.fx-glossy { background: radial-gradient(circle at 35% 28%, #ffffff 0%, #f6f6f6 22%, #d2d2d2 62%, #a6a6a6 100%) !important; box-shadow: inset 0 -2px 4px rgba(0,0,0,.22), inset 1px 2px 3px rgba(255,255,255,.9), 0 1px 3px rgba(0,0,0,.28); position: relative;
}

.e13e-tshirt-swatch.fx-glossy::before { content: ''; position: absolute; top: 3px; left: 5px; width: 9px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.98); filter: blur(.3px); transform: rotate(-22deg); pointer-events: none;
}

.e13e-tshirt-swatch.fx-matte { background: #cfcfcf !important; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}

.e13e-size-color-dot.fx-glossy { background: radial-gradient(circle at 35% 28%, #ffffff 0%, #f6f6f6 22%, #d2d2d2 62%, #a6a6a6 100%) !important; box-shadow: inset 0 -2px 4px rgba(0,0,0,.22), inset 1px 2px 3px rgba(255,255,255,.9), 0 1px 3px rgba(0,0,0,.28); position: relative;
}

.e13e-size-color-dot.fx-glossy::before { content: ''; position: absolute; top: 2px; left: 3px; width: 6px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.98); filter: blur(.3px); transform: rotate(-22deg); pointer-events: none;
}

.e13e-size-color-dot.fx-matte { background: #cfcfcf !important; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}

.e13e-section-value { font-weight: 700; color: var(--e13e-text);
}

.e13e-model-btn {
  padding: 5px 12px; border-radius: 7px; font-size: .72rem; cursor: pointer;
  border: 1.5px solid var(--e13e-border2); background: var(--e13e-surface);
  color: var(--e13e-muted); transition: all .14s; white-space: nowrap;
  box-shadow: var(--e13e-shadow-sm);
}

.e13e-model-btn:hover { border-color: var(--e13e-accent-bd); color: var(--e13e-accent);
}

.e13e-model-btn.active { background: #3b82f6; border-color: #3b82f6; color: #fff; box-shadow: 0 2px 8px rgba(59,130,246,.3);
}

.e13e-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid var(--e13e-border2); border-top-color: var(--e13e-accent);
  animation: smeSpin .7s linear infinite; flex-shrink: 0;
}

.e13e-size-modal {
  position: fixed; inset: 0; z-index: 200000;
  background: rgba(0,0,0,.5); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}

.e13e-size-modal-box {
  background: #fff; border-radius: 22px; padding: 26px 26px 22px;
  
  max-width: 620px; width: 100%;
  
  max-height: 92vh; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  animation: smeFadeIn .22s ease;
  
  user-select: none; -webkit-user-select: none;
}

.e13e-size-modal-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px;
}

.e13e-size-modal-header h3 {
  font-size: 1.2rem; font-weight: 800; color: #1a1d2e; margin: 0;
}

.e13e-modal-close {
  width: 30px; height: 30px; border-radius: 7px;
  border: 1px solid rgba(0,0,0,.1); background: transparent;
  color: #7b8299; cursor: pointer; font-size: 1.1rem; line-height: 1;
}

.e13e-modal-close:hover { background: rgba(0,0,0,.05); color: #1a1d2e;
}

.e13e-modal-preview {
  border-radius: 12px; overflow: hidden;
  background: #f0f2f7; border: 1px solid rgba(0,0,0,.07);
  aspect-ratio: 1 / 1; margin-bottom: 16px; max-height: 220px;
  display: flex; align-items: center; justify-content: center;
}

#e13e-modal-preview-img { width: 100%; height: 100%; object-fit: contain; display: block;
}

.e13e-modal-previews {
  display: flex; gap: 14px; width: 100%; margin-bottom: 18px;
  overflow-y: auto; flex: 1 1 auto; min-height: 150px;
}

.e13e-modal-preview-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
}

.e13e-modal-face-label {
  font-size: .68rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: #6b7280;
  background: #f4f6fa; border: 1px solid rgba(16,24,40,.07);
  padding: 3px 11px; border-radius: 999px;
}

.e13e-modal-preview-loader {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px;
  position: absolute; inset: 0; justify-content: center; background: transparent;
}

.e13e-modal-preview-loader span {
  font-size: .72rem; font-weight: 600; color: var(--e13e-muted); text-align: center;
}

.e13e-size-modal-color {
  display: flex; align-items: center; gap: 11px;
  background: linear-gradient(135deg, #fbfcfe, #f4f6fb);
  border: 1px solid rgba(16,24,40,.08);
  border-radius: 12px; padding: 11px 15px; margin-bottom: 18px;
}

.e13e-size-color-dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid rgba(0,0,0,.12); flex-shrink: 0;
}

.e13e-size-color-label { font-size: .88rem; font-weight: 600; color: #1a1d2e;
}

.e13e-size-grid {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; min-height: 44px;
}

.e13e-size-btn {
  padding: 9px 18px; border-radius: 9px;
  border: 1.5px solid rgba(0,0,0,.1); background: #f8fafd;
  color: #1a1d2e; font-weight: 700; font-size: .9rem;
  cursor: pointer; font-family: inherit; transition: all .15s;
}

.e13e-size-btn:hover { border-color: color-mix(in srgb, var(--e13e-accent) 40%, transparent); color: var(--e13e-accent); background: color-mix(in srgb, var(--e13e-accent) 4%, transparent);
}

.e13e-size-btn.active { border-color: var(--e13e-accent); background: color-mix(in srgb, var(--e13e-accent) 8%, transparent); color: var(--e13e-accent);
}

.e13e-size-warn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.25);
  border-radius: 9px; padding: 9px 12px; margin-bottom: 14px;
  font-size: .8rem; font-weight: 600; color: #92400e;
}

.e13e-size-confirm { width: 100%; margin-top: 4px;
}

.e13e-layers-list {
  display: flex; flex-direction: column; gap: 6px; padding: 4px 0;
}

.e13e-layer-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--e13e-surface2); border: 1px solid var(--e13e-border);
  border-radius: 10px; padding: 8px 12px;
  transition: border-color .15s;
}

.e13e-layer-item:hover { border-color: var(--e13e-border2);
}

.e13e-layer-eye {
  width: 30px; height: 30px; border-radius: 7px; border: 1px solid var(--e13e-border);
  background: var(--e13e-surface); color: var(--e13e-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: .8rem;
  flex-shrink: 0; transition: all .15s;
}

.e13e-layer-eye:hover { border-color: var(--e13e-accent-bd); color: var(--e13e-accent);
}

.e13e-layer-eye.off { color: var(--e13e-muted2); background: var(--e13e-bg);
}

.e13e-layer-eye.off i::before { font-family: "Font Awesome 6 Free"; content: "\f070"; font-weight: 900;
}

.e13e-layer-thumb {
  width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
}

.e13e-layer-thumb-text { background: linear-gradient(135deg, #2563EB, #06B6D4); color: #fff;
}

.e13e-layer-thumb-clipart { background: linear-gradient(135deg, #F59E0B, #EF4444); color: #fff;
}

.e13e-layer-count {
  display: inline-block; margin-left: 6px; padding: 0 6px;
  font-size: .68rem; font-weight: 700;
  background: var(--e13e-accent, var(--e13e-accent)); color: #fff;
  border-radius: 999px; line-height: 18px; vertical-align: middle;
}

.e13e-layer-count:empty { display: none;
}

.e13e-layer-name { font-size: .84rem; font-weight: 600; color: var(--e13e-text);
}

@media (min-width: 769px) and (max-width: 1024px) {
  .e13e-editor-wrap {
      grid-template-columns: 280px 1fr;   
      width: 100vw; height: 100dvh;
      border-radius: 0;
  }
  .e13e-tab-nav { gap: 2px; padding: 8px 6px 6px;
  }
  .e13e-tab-btn { padding: 5px 7px; font-size: .68rem;
  }
  .e13e-tab-btn span { display: none;
  }
  .e13e-tab-btn i { font-size: 1rem;
  }
  .e13e-tab-btn.active span { display: inline; font-size: .68rem;
  }
  .e13e-card { padding: 12px;
  }
  .e13e-card-title { font-size: .82rem;
  }
  .e13e-back-label { max-width: 140px;
  }
}

@media (max-width: 768px) {
  body.e13e-page-mode { overflow: hidden;
  }
  .e13e-editor-wrap {
      width: 100vw; height: 100dvh; max-height: none;
      border-radius: 0; border: none;
      grid-template-columns: 1fr;
      
      grid-template-rows: 52px 62vh 1fr auto;
      overflow: hidden;
  }
  .e13e-editor-header {
      grid-column: 1; grid-row: 1;
      gap: 8px; padding: 0 10px;
  }
  .e13e-back-label,
  .e13e-header-logo span {
      display: none;
  }
  .e13e-header-actions { gap: 6px;
  }
  .e13e-header-cart-btn span,
  .e13e-header-view-cart span:not(.e13e-cart-badge):not(.e13e-cart-total) {
      display: none;
  }
  .e13e-header-cart-btn,
  body.e13e-page-mode .e13e-header-view-cart {
      padding: 7px 10px; font-size: .8rem;
  }
  body.e13e-page-mode .e13e-header-view-cart { gap: 5px;
  }
  .e13e-cart-total { font-size: .72rem;
  }
  .e13e-panel-right {
      grid-column: 1; grid-row: 2;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      border-bottom: 1px solid var(--e13e-border);
  }
  .e13e-face-tabs {
      padding: 6px 10px; gap: 4px;
      flex-wrap: nowrap; overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      flex-shrink: 0;
      position: sticky; top: 0; z-index: 5;
  }
  .e13e-face-tabs::-webkit-scrollbar { display: none;
  }
  .e13e-face-btn { padding: 5px 10px; font-size: .72rem; flex-shrink: 0;
  }
  .e13e-qa-inline {
      flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
      margin-left: auto;
  }
  .e13e-qa-inline::-webkit-scrollbar { display: none;
  }
  .e13e-qa-btn { width: 28px; height: 28px; font-size: .72rem; flex-shrink: 0;
  }
  .e13e-zoom-label { font-size: .65rem;
  }
  .e13e-mockup-wrap {
      padding: 4px;
      height: 52vh;
      min-height: 380px;
      flex-shrink: 0;
  }
  .e13e-mockup-img {
      
      width: auto !important;
      height: 100% !important;
      max-width: 100%;
      max-height: 100%;
  }
  .e13e-tshirt-color-section { padding: 6px 10px 8px; flex-shrink: 0;
  }
  .e13e-tshirt-color-section .e13e-section-title { font-size: .7rem;
  }
  .e13e-tshirt-swatch { width: 24px; height: 24px;
  }
  .e13e-resize-handle { width: 16px; height: 16px;
  }
  .e13e-panel-left {
      grid-column: 1; grid-row: 3;
      min-height: 0; overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      background: var(--e13e-bg);
  }
  .e13e-tab-nav {
      position: sticky; top: 0; z-index: 5;
      background: var(--e13e-surface);
      padding: 8px 10px;
      gap: 4px;
      flex-wrap: nowrap;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      border-bottom: 1px solid var(--e13e-border);
      box-shadow: var(--e13e-shadow-sm);
  }
  .e13e-tab-nav::-webkit-scrollbar { display: none;
  }
  .e13e-tab-btn {
      padding: 8px 12px; font-size: .74rem;
      flex-shrink: 0; gap: 6px;
  }
  .e13e-tab-btn i { font-size: .85rem;
  }
  .e13e-tab-btn span { display: none;
  }
  .e13e-tab-btn.active span { display: inline;
  }
  .e13e-tab-panels {
      padding: 12px 10px 80px;     
      overflow-y: visible;
  }
  .e13e-card { padding: 12px; margin-bottom: 12px;
  }
  .e13e-card-title { font-size: .82rem;
  }
  .e13e-field-label { font-size: .68rem;
  }
  .e13e-left-footer {
      position: fixed;
      left: 0; right: 0; bottom: 0;
      padding: 8px 10px;
      padding-bottom: max(8px, env(safe-area-inset-bottom));
      background: var(--e13e-surface);
      border-top: 1px solid var(--e13e-border);
      box-shadow: 0 -2px 8px rgba(0,0,0,.08);
      z-index: 1000;
  }
  .e13e-left-footer .e13e-btn { font-size: .9rem; padding: 12px 14px;
  }
  .e13e-panel-left {
      padding-bottom: 76px;
  }
  .e13e-size-modal-box { max-width: 95vw !important; padding: 18px;
  }
  .e13e-templates-grid {
      grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
      gap: 12px;
  }
  .cl-grid {
      grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
      gap: 8px;
  }
}

@media (max-width: 380px) {
  .e13e-editor-wrap { grid-template-rows: 48px 38vh 1fr auto;
  }
  .e13e-tab-btn { padding: 7px 10px; font-size: .7rem;
  }
  .e13e-templates-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  }
}

#e13e-mockup-inner .e13e-resize-handle { transform: scale(calc(1 / var(--mz, 1))); transform-origin: 100% 100%;
}

#e13e-mockup-inner .e13e-text-remove { transform: scale(calc(1 / var(--mz, 1))); transform-origin: 100% 0;
}

#e13e-mockup-inner .e13e-img-fit,
#e13e-mockup-inner .e13e-img-rotate { transform: scale(calc(1 / var(--mz, 1)));
}

.e13e-tpl-disabled {
  grid-column: 1 / -1;  
  padding: 26px 18px; text-align: center; color: var(--e13e-muted, #6b7280);
  background: var(--e13e-bg-soft, #f6f6f9); border-radius: 12px; font-size: .88rem;
  line-height: 1.55;
}

.e13e-tpl-disabled i { display: block; font-size: 1.6rem; margin-bottom: 10px; color: var(--e13e-accent, var(--e13e-accent));
}

.e13e-tpl-disabled p { margin: 0;
}

.e13e-tshirt-swatch.e13e-out-of-stock,
.e13e-model-btn.e13e-out-of-stock {
  opacity: .45;
  position: relative;
  cursor: not-allowed;
  border-color: #dc2626 !important;
}

.e13e-model-btn.e13e-out-of-stock {
  text-decoration: line-through;
  text-decoration-color: #dc2626;
  color: #b91c1c;
}

.e13e-tshirt-swatch.e13e-out-of-stock::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(to top left, transparent 44%, #dc2626 44%,
              #dc2626 56%, transparent 56%);
  pointer-events: none;
}

#e13e-size-confirm.e13e-out-of-stock { background: #d1d5db; color: #6b7280; cursor: not-allowed;
}

#e13e-add-to-cart-header:disabled {
  background: #d1d5db; color: #6b7280; cursor: not-allowed;
  border-color: #d1d5db; box-shadow: none; opacity: 1;
}

/* Real preview of Printful (final window) */
.e13e-real {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin: -6px 0 16px;
}

.e13e-real-status {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: .8rem; font-weight: 600; color: var(--e13e-muted); text-align: center;
}

.e13e-real-status i { display: none; color: var(--e13e-accent);
}

.e13e-real-status.is-busy i { display: inline-block; animation: e13e-real-spin 1s linear infinite;
}

.e13e-real-btn { font-size: .82rem;
}

.e13e-modal-preview-real { object-fit: contain; background: #fff;
}

@keyframes e13e-real-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .e13e-real-status.is-busy i { animation: none; }
}

/* Options required by Printful (stitch color...) */
.e13e-option-title { margin-top: 10px;
}

.e13e-tshirt-swatch.is-clear,
.e13e-size-color-dot.is-clear {
  background-color: #fff;
  background-image: linear-gradient(45deg, #d7dbe4 25%, transparent 25%, transparent 75%, #d7dbe4 75%), linear-gradient(45deg, #d7dbe4 25%, transparent 25%, transparent 75%, #d7dbe4 75%);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
}

/* Embroidery: standard or unlimited color, thread colors of Printful */
.e13e-embroidery { margin-top: 12px;
}

.e13e-emb-choices {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 6px;
}

.e13e-emb-choice {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 9px 12px; border-radius: 10px; text-align: left; cursor: pointer;
  background: #fff; border: 1.5px solid rgba(16,24,40,.12); color: #1a1d2e; font: inherit;
}

.e13e-emb-choice strong { font-size: .84rem;
}

.e13e-emb-choice small { font-size: .72rem; color: var(--e13e-muted);
}

.e13e-emb-choice .e13e-emb-price { font-size: .76rem; font-weight: 700; color: var(--e13e-accent);
}

.e13e-emb-choice.active {
  border-color: var(--e13e-accent); background: var(--e13e-accent-bg);
}

.e13e-emb-choice:disabled { opacity: .45; cursor: not-allowed;
}

.e13e-emb-choice:focus-visible { outline: 2px solid var(--e13e-accent); outline-offset: 2px;
}

.e13e-emb-warning {
  margin: 8px 0 0; padding: 7px 10px; border-radius: 8px;
  font-size: .76rem; line-height: 1.35; color: #8a4b00; background: #fff4e0; border: 1px solid #f5d49a;
}

.e13e-thread-swatches { display: flex; flex-wrap: wrap; gap: 5px;
}

.e13e-thread-swatch {
  width: 22px; height: 22px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid rgba(16,24,40,.25);
}

.e13e-thread-swatch.active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--e13e-accent);
}

/* Knitwear: 36 yarns for each color (smaller swatches), short choices of the rendering */
.e13e-knit-options .e13e-tshirt-swatches { gap: 4px; margin-top: 4px;
}

.e13e-knit-options .e13e-tshirt-swatch { width: 20px; height: 20px;
}

.e13e-knit-options .e13e-option-title { margin-top: 6px;
}

.e13e-knit-options .e13e-emb-choices { display: inline-grid; grid-template-columns: repeat(2, auto); margin-top: 4px;
}

.e13e-knit-options .e13e-emb-choice { padding: 5px 12px;
}

/* Rendering of the knitted pattern: the word and its star, smooth (solid) or in stitches (pixelated) */
.e13e-knit-mode .e13e-emb-choice { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; min-width: 104px;
}

.e13e-knit-mode-star {
  flex: none; width: 18px; height: 18px; background: var(--e13e-accent);
  -webkit-mask: var(--e13e-star) center / contain no-repeat; mask: var(--e13e-star) center / contain no-repeat;
}

.e13e-knit-mode-star.is-solid {
  --e13e-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.2L14.7 8.88L22.84 9.08L16.37 14.02L18.7 21.82L12 17.2L5.3 21.82L7.63 14.02L1.16 9.08L9.3 8.88Z'/%3E%3C/svg%3E");
}

.e13e-knit-mode-star.is-pixelated {
  --e13e-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 11' shape-rendering='crispEdges'%3E%3Cpath d='M5 0h1v2H5zM4 2h3v1H4zM0 3h11v1H0zM1 4h9v1H1zM2 5h7v1H2zM3 6h5v1H3zM2 7h7v1H2zM2 8h3v1H2zM6 8h3v1H6zM1 9h3v1H1zM7 9h3v1H7zM1 10h1v1H1zM9 10h1v1H9z'/%3E%3C/svg%3E");
}

/* The "?" of the rendering of the pattern and its bubble: each choice, its star and what it is for */
.e13e-knit-mode-info { font-size: .85rem;
}

.e13e-knit-mode-bubble {
  position: relative; max-width: 320px; margin: 10px 0 2px; padding: 8px 10px; border-radius: 9px;
  background: var(--e13e-accent-bg); border: 1px solid var(--e13e-accent-bd); color: var(--e13e-text); font-size: .76rem; line-height: 1.4;
}

.e13e-knit-mode-bubble[hidden] { display: none;
}

/* Its tail, pointing up to the choices */
.e13e-knit-mode-bubble::before {
  content: ""; position: absolute; top: -6px; left: 22px; width: 10px; height: 10px; transform: rotate(45deg);
  background: var(--e13e-accent-bg); border-left: 1px solid var(--e13e-accent-bd); border-top: 1px solid var(--e13e-accent-bd);
}

.e13e-knit-mode-bubble p { display: flex; align-items: flex-start; gap: 6px; margin: 0;
}

.e13e-knit-mode-bubble p + p { margin-top: 6px;
}

.e13e-knit-mode-bubble .e13e-knit-mode-star { width: 14px; height: 14px; margin-top: 1px;
}

.e13e-knit-mode-bubble strong { flex: none;
}

/* Knitwear panel: each color of the design and the yarn knitting it, another one chosen among the 36 */
.e13e-knit-map { margin-top: 6px;
}

.e13e-knit-map-title { margin: 0; font-size: .74rem; font-weight: 700; color: var(--e13e-text);
}

.e13e-knit-map-row { display: flex; align-items: center; gap: 6px; margin-top: 4px;
}

.e13e-knit-map-from { flex: none; width: 18px; height: 18px; border-radius: 4px; border: 1px solid rgba(16,24,40,.25);
}

.e13e-knit-map-arrow::before { content: "\2192"; font-size: .8rem; color: var(--e13e-muted);
}

.e13e-knit-map-yarn {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; cursor: pointer;
  border: 1px solid rgba(16,24,40,.15); border-radius: 8px; background: #fff; color: var(--e13e-text); font: inherit; font-size: .76rem;
}

.e13e-knit-map-yarn:focus-visible { outline: 2px solid var(--e13e-accent); outline-offset: 2px;
}

.e13e-knit-map-yarn .fa { font-size: .6rem; color: var(--e13e-muted);
}

.e13e-knit-map-swatch { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(16,24,40,.25);
}

.e13e-knit-map-palette { gap: 4px; margin: 6px 0 4px 24px;
}

.e13e-knit-map-palette[hidden] { display: none;
}

.e13e-knit-map-palette .e13e-tshirt-swatch { position: relative; width: 20px; height: 20px;
}

/* Touch screens: no enlarged swatch left over its neighbours after a tap */
@media (hover: none) {
  .e13e-knit-map-palette .e13e-tshirt-swatch:hover { transform: none;
  }
}

/* The nearest yarn of the color (the one taken by default) */
.e13e-knit-map-palette .e13e-tshirt-swatch.is-nearest::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.45);
}

/* Knitwear panel: the current side in stitches on the left, the yarns and the advice on the right */
.e13e-embroidery.e13e-knit {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 2px 14px; align-items: start;
  margin: 0; padding: 8px 14px 10px; flex-shrink: 0;
  border-top: 1px solid var(--e13e-border); background: var(--e13e-surface);
}

.e13e-knit[hidden] { display: none;
}

.e13e-knit > :not(.e13e-knit-preview) { grid-column: 2;
}

.e13e-knit .e13e-section-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.e13e-knit-yarns { display: inline-flex; gap: 4px;
}

.e13e-knit-yarns .e13e-thread-swatch { width: 16px; height: 16px; cursor: default;
}

.e13e-knit .e13e-emb-hint { font-size: .72rem; margin-top: 2px;
}

.e13e-knit .e13e-emb-warning { margin-top: 4px;
}

.e13e-knit-preview {
  grid-row: 1 / span 5; display: block; width: 64px; height: auto;
  border-radius: 6px; border: 1px solid rgba(16,24,40,.12);
}

/* Thread colors under their label, on their own line */
.e13e-color-picker-row { flex-wrap: wrap;
}

.e13e-color-picker-row .e13e-thread-swatches { flex: 1 1 100%; margin-top: 6px;
}

/* Empty side: the photo of the product, without print area (the template comes with the first element) */
#e13e-mockup-inner.is-photo .e13e-print-area,
#e13e-mockup-inner.is-photo .e13e-area-frame,
#e13e-mockup-inner.is-photo .e13e-template-notes { display: none;
}

.e13e-photo-drop { display: none;
}

#e13e-mockup-inner.is-photo .e13e-photo-drop {
  position: absolute; left: 50%; top: 50%; z-index: 6; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: 44%; min-width: 150px; max-width: 260px; aspect-ratio: 1; padding: 18px; border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .75); background: color-mix(in srgb, var(--e13e-accent-bg) 90%, transparent);
  box-shadow: 0 6px 24px rgba(15, 23, 42, .12); color: var(--e13e-accent);
  font: inherit; font-size: .85rem; font-weight: 600; line-height: 1.35; text-align: center; cursor: pointer;
}

#e13e-mockup-inner.is-photo .e13e-photo-drop i { font-size: 1.1rem;
}

#e13e-mockup-inner.is-photo .e13e-photo-drop:hover { border-color: var(--e13e-accent-bd);
}

.e13e-mockup-wrap.is-dragover #e13e-mockup-inner { outline: 2px dashed var(--e13e-accent); outline-offset: 6px;
}

/* Patterns tab: fill of the print area */
.e13e-fill-layer { position: absolute; inset: 0; pointer-events: none; background-repeat: no-repeat;
}

.e13e-pattern-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 8px 0 10px;
}

.e13e-pattern-tile {
  aspect-ratio: 1 / 1; padding: 0; overflow: hidden; cursor: pointer;
  border-radius: 8px; border: 1.5px solid rgba(16,24,40,.12); background: #fff;
}

.e13e-pattern-tile img { width: 100%; height: 100%; display: block;
}

.e13e-pattern-tile.active { border-color: var(--e13e-accent); box-shadow: 0 0 0 2px var(--e13e-accent-bg);
}

.e13e-pattern-tile:focus-visible { outline: 2px solid var(--e13e-accent); outline-offset: 2px;
}

.e13e-check-row {
  display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: .75rem; color: var(--e13e-muted); cursor: pointer;
}

/* Five tabs on one line: icon above the label */
@media (min-width: 769px) {
  .e13e-tab-nav { flex-wrap: nowrap;
  }
  .e13e-tab-btn {
    flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; padding: 6px 4px;
  }
  .e13e-tab-btn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  }
}

.e13e-emb-hint { margin: 6px 0 0;
}

/* Raised 3D embroidery: on/off under the embroidery choices */
.e13e-emb-choice.e13e-emb-puff { width: 100%; margin-top: 8px;
}

/* Final window: large view with zoom on the left, choices on the right */
.e13e-size-modal-box.e13e-summary-box { max-width: 1080px;
}

.e13e-summary-body {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 26px; align-items: start;
}

.e13e-summary-media { display: flex; flex-direction: column; gap: 10px; min-width: 0;
}

.e13e-summary-side { min-width: 0;
}

#e13e-summary-previews { display: block; margin: 0; min-height: 0; overflow: visible;
}

.e13e-viewer { display: flex; flex-direction: column; gap: 8px;
}

.e13e-viewer-stage {
  position: relative; height: min(64vh, 580px); overflow: hidden; border-radius: 14px;
  background: #f4f6fa; border: 1px solid rgba(16,24,40,.08); cursor: zoom-in; touch-action: none;
}

.e13e-viewer-stage:focus-visible { outline: 2px solid var(--e13e-accent); outline-offset: 2px;
}

.e13e-viewer-stage.is-zoomed { cursor: grab;
}

.e13e-viewer-stage.is-dragging { cursor: grabbing;
}

.e13e-viewer-img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  transition: transform .12s ease; user-select: none; -webkit-user-drag: none;
}

.e13e-viewer-stage.is-dragging .e13e-viewer-img { transition: none;
}

.e13e-viewer-label {
  position: absolute; left: 10px; top: 10px; padding: 3px 11px; border-radius: 999px;
  font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: #6b7280; background: rgba(255,255,255,.92); border: 1px solid rgba(16,24,40,.07);
}

.e13e-viewer-tools {
  position: absolute; right: 10px; bottom: 10px; display: flex; align-items: center; gap: 2px; padding: 4px;
  border-radius: 999px; background: rgba(255,255,255,.94); box-shadow: 0 4px 14px rgba(16,24,40,.12);
}

.e13e-viewer-tools button {
  min-width: 30px; height: 30px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: inherit; font-size: 1rem; font-weight: 700; color: #1a1d2e;
}

.e13e-viewer-tools button:hover { background: var(--e13e-accent-bg); color: var(--e13e-accent);
}

.e13e-viewer-tools .e13e-viewer-zoom { font-size: .72rem; padding: 0 8px;
}

.e13e-viewer-hint { margin: 0; font-size: .72rem; color: var(--e13e-muted); text-align: center;
}

.e13e-viewer-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
}

.e13e-viewer-thumb {
  flex: 0 0 78px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px;
  border-radius: 10px; border: 1.5px solid rgba(16,24,40,.12); background: #fff; cursor: pointer; font: inherit;
}

.e13e-viewer-thumb img { width: 66px; height: 66px; object-fit: contain; display: block;
}

.e13e-viewer-thumb span {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .62rem; font-weight: 700; color: #6b7280;
}

.e13e-viewer-thumb.active { border-color: var(--e13e-accent); box-shadow: 0 0 0 2px var(--e13e-accent-bg);
}

.e13e-summary-media .e13e-real { margin: 0;
}

@media (max-width: 860px) {
  .e13e-summary-body { grid-template-columns: 1fr; gap: 16px;
  }
  .e13e-viewer-stage { height: 46vh;
  }
}

@media (hover: none) {
  .e13e-viewer-hint { display: none;
  }
}

/* Themes tab: categories of the merchant */
.e13e-theme-chips { margin: 0 0 10px;
}

.e13e-theme-chips[hidden] { display: none;
}

/* Copy of a side to the other sides: menu of the tools button. */
.e13e-copy-menu {
  position: fixed; z-index: 2000; min-width: 230px; max-width: 320px; padding: 6px;
  border: 1px solid var(--e13e-border2); border-radius: 10px; background: var(--e13e-surface);
  overflow-y: auto; overscroll-behavior: contain;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
}
.e13e-copy-title { padding: 8px 10px 4px; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--e13e-muted); }
.e13e-copy-item {
  display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: inherit;
  font: inherit; font-size: .86rem; text-align: left; cursor: pointer;
}
.e13e-copy-item:hover:not([aria-disabled="true"]), .e13e-copy-item:focus-visible { background: var(--e13e-border); outline: none; }
.e13e-copy-item[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.e13e-copy-note { font-size: .72rem; color: var(--e13e-muted); white-space: nowrap; }
.e13e-copy-all { margin-top: 4px; border-top: 1px solid var(--e13e-border); border-radius: 0 0 7px 7px; font-weight: 600; }

/* Items of a set left without design (final window): delivered unprinted, the copy of the design offered */
.e13e-summary-blank {
  margin: 0 0 14px; padding: 10px 12px; border-radius: 9px;
  font-size: .8rem; line-height: 1.4; color: #8a4b00; background: #fff4e0; border: 1px solid #f5d49a;
}
.e13e-summary-blank p { margin: 0 0 8px; font-weight: 600; }
.e13e-summary-blank-copy { width: 100%; }
/* Notices of the layers of the extensions (window.Ecab13printEditor.notices) under the quality of the images */
.e13e-summary-quality .e13e-summary-notice { font-weight: 400; }
.e13e-summary-quality .e13e-summary-notice--warning { font-weight: 600; }
.e13e-summary-quality p:last-child { margin-bottom: 0; }

/* Messages of the editor while the final window is open (never display: none: read by screen readers) */
.e13e-summary-note { margin: 0 0 14px; font-size: .8rem; font-weight: 600; color: #047857; }
.e13e-summary-note:empty { margin: 0; }
.e13e-summary-note.is-error { color: #b91c1c; }

/* Layout of the editor as Printful does (0.64): every option in the left column, wider, the stage never moves. The tab
   Product comes first (options, embroidery, knitwear, print file); the bar of tabs scrolls sideways with arrows. */
.e13e-editor-wrap { grid-template-columns: 420px 1fr; }
.e13e-tab-scroller {
  position: relative; display: flex; align-items: stretch; flex-shrink: 0;
  border-bottom: 1px solid var(--e13e-border); background: var(--e13e-surface); box-shadow: 0 1px 0 var(--e13e-border);
}
.e13e-tab-scroller .e13e-tab-nav {
  display: flex; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scroll-behavior: smooth;
  border-bottom: 0; box-shadow: none; scrollbar-width: none;
}
.e13e-tab-scroller .e13e-tab-nav::-webkit-scrollbar { display: none; }
/* The arrows lie over the ends of the bar: its width never changes, one click shows the tabs out of view */
.e13e-tab-scroller .e13e-tab-nav { scroll-padding-inline: 34px; }
.e13e-tab-arrow {
  position: absolute; top: 0; bottom: 0; width: 34px; display: flex; align-items: center; padding: 0;
  border: 0; color: var(--e13e-text); font-size: .8rem; cursor: pointer; z-index: 2;
}
.e13e-tab-arrow[hidden] { display: none; }
.e13e-tab-arrow.is-prev { left: 0; justify-content: flex-start; padding-left: 8px; background: linear-gradient(90deg, var(--e13e-surface) 55%, transparent); }
.e13e-tab-arrow.is-next { right: 0; justify-content: flex-end; padding-right: 8px; background: linear-gradient(270deg, var(--e13e-surface) 55%, transparent); }
.e13e-tab-arrow:hover { color: var(--e13e-accent); }
.e13e-tab-panel .e13e-tshirt-color-section { padding: 0; border: 0; box-shadow: none; background: transparent; }
.e13e-tab-panel .e13e-tshirt-color-section .e13e-section-title { margin-top: 12px; }
.e13e-product-card .e13e-product-technique { margin: -4px 0 4px; }
.e13e-tab-panel .e13e-embroidery { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--e13e-border); border-radius: 12px; background: #fbfbfd; }
.e13e-print-line { margin: 4px 0; font-size: .8rem; line-height: 1.4; color: var(--e13e-text); }
#e13e-image-size-hint:empty { display: none; }
@media (min-width: 769px) {
  /* The tabs fill the bar when they all fit, and keep their width (the bar scrolls) when they do not */
  .e13e-tab-scroller .e13e-tab-btn { flex: 1 0 auto; min-width: 62px; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .e13e-editor-wrap { grid-template-columns: 330px 1fr; }
}
@media (max-width: 768px) {
  .e13e-editor-wrap { grid-template-columns: 1fr; }
  .e13e-tab-scroller { position: sticky; top: 0; z-index: 5; }
  .e13e-tab-scroller .e13e-tab-nav { position: static; box-shadow: none; }
}

/* Quality of an image on the product (0.65): level and DPI in the card of the image, banner over the stage */
.e13e-quality { margin: 2px 0 14px; padding: 10px 12px; border-radius: 9px; background: #f8fafc; border: 1px solid var(--e13e-border); font-size: .8rem; }
.e13e-quality[hidden] { display: none; }
.e13e-quality-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.e13e-quality-label { color: var(--e13e-muted); font-weight: 600; }
.e13e-quality-level { font-weight: 800; }
.e13e-quality-level.is-excellent, .e13e-quality-level.is-good { color: #047857; }
.e13e-quality-level.is-okay { color: #b45309; }
.e13e-quality-level.is-low { color: #b91c1c; }
.e13e-info-btn { padding: 0 2px; border: 0; background: transparent; color: var(--e13e-muted); font-size: .95rem; line-height: 1; cursor: pointer; }
.e13e-info-btn:hover, .e13e-info-btn[aria-expanded="true"] { color: var(--e13e-accent); }
.e13e-quality .e13e-print-line, .e13e-quality .e13e-hint { margin: 6px 0 0; }
.e13e-quality-banner {
  position: absolute; top: 10px; left: 12px; right: 12px; z-index: 9;
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px 10px 14px;
  border-radius: 10px; border: 1px solid #f5c26b; background: #fff7e6; color: #7c2d12; box-shadow: var(--e13e-shadow);
  font-size: .82rem; font-weight: 600; line-height: 1.4;
  /* The clicks go through to the stage (handles of the selection under it), except on the button */
  pointer-events: none;
}
.e13e-quality-banner[hidden] { display: none; }
.e13e-quality-banner > i { margin-top: 2px; color: #d97706; }
.e13e-quality-banner > span { flex: 1; min-width: 0; }
.e13e-quality-banner-close { flex: none; padding: 0 2px; border: 0; background: transparent; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; pointer-events: auto; }

/* Themes tab (0.67): sections by fit on the side shown (for this side, other shapes, too small for this product), a
   badge on each theme too small. Two classes on the titles: editor-page.css (loaded after) styles .e13e-theme-group-title */
.e13e-theme-fit + .e13e-theme-fit { padding-top: 12px; border-top: 1px solid var(--e13e-border); }
.e13e-theme-group-title.e13e-theme-fit-title { margin-top: 2px; font-size: .7rem; font-weight: 800; color: var(--e13e-text); }
.e13e-theme-fit-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #10B981; }
.e13e-theme-fit.is-shape .e13e-theme-fit-dot { background: #d97706; }
.e13e-theme-fit.is-small .e13e-theme-fit-dot { background: #b91c1c; }
.e13e-theme-fit.is-small .e13e-theme-fit-title { color: #b91c1c; }
.e13e-template-badge {
  position: absolute; left: 4px; right: 4px; bottom: 4px; z-index: 2;
  padding: 2px 4px; border-radius: 6px;
  background: rgba(185, 28, 28, .92); color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  font-size: .56rem; font-weight: 700; line-height: 1.2; text-align: center;
  white-space: normal; overflow-wrap: anywhere; pointer-events: none;
}
.e13e-template-card.is-too-small .e13e-template-preview-img { opacity: .75; }
.e13e-template-card.is-too-small:hover .e13e-template-preview-img,
.e13e-template-card.is-too-small:focus-visible .e13e-template-preview-img { opacity: 1; }
@media (max-width: 768px) {
  /* Larger cards (86 px), touch: the badge a little larger */
  .e13e-template-badge { font-size: .6rem; }
}
@media (max-width: 380px) {
  .e13e-template-badge { left: 3px; right: 3px; bottom: 3px; padding: 2px 3px; font-size: .54rem; }
}

/* Static QR codes (views/js/editor-qr.js): destinations, fields, readability gauge, block of the final window */
.e13e-qr-kinds { flex-wrap: wrap; margin-bottom: 6px; }
.e13e-qr-about { margin: 6px 0 10px; }
.e13e-qr-field { margin-bottom: 10px; }
.e13e-qr-field .e13e-input { width: 100%; font-size: 16px; }
.e13e-qr-field textarea.e13e-input { resize: vertical; min-height: 64px; }
.e13e-qr-error { margin: 4px 0 0; font-size: .78rem; font-weight: 600; color: #b91c1c; }
.e13e-qr-error:empty { display: none; }
.e13e-qr-printed { margin: 4px 0 0; }
.e13e-qr-printed:empty, .e13e-qr-room:empty { display: none; }
.e13e-qr-notice { padding: 8px 10px; border-radius: 8px; background: #fff4e0; color: #8a4b00; }
.e13e-qr-body .e13e-btn-block { margin-top: 8px; }
.e13e-qr-gauge { margin: 0 0 14px; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .04); }
.e13e-qr-gauge-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 6px; }
.e13e-qr-gauge-bar { height: 8px; border-radius: 4px; background: rgba(0, 0, 0, .1); overflow: hidden; }
.e13e-qr-gauge-bar span { display: block; height: 100%; width: 0; border-radius: 4px; background: #16a34a; transition: width .25s ease, background .25s ease; }
.e13e-qr-gauge[data-level="fair"] .e13e-qr-gauge-bar span { background: #f59e0b; }
.e13e-qr-gauge[data-level="risky"] .e13e-qr-gauge-bar span,
.e13e-qr-gauge[data-level="refused"] .e13e-qr-gauge-bar span { background: #dc2626; }
.e13e-qr-gauge[data-level="refused"] .e13e-qr-gauge-head strong { color: #b91c1c; }
.e13e-qr-gauge[data-level="pending"] .e13e-qr-gauge-bar span { background: #9ca3af; }
.e13e-qr-gauge .e13e-hint { margin: 8px 0 0; }
.e13e-qr-gauge .e13e-btn { margin-top: 8px; }
.e13e-qr-look .e13e-radio-pills { flex-wrap: wrap; }
.e13e-qr-range input { flex: 1; }
.e13e-qr-check { color: #1f2937; background: #f1f5f9; border-color: #cbd5e1; }
.e13e-qr-check p { font-weight: 400; overflow-wrap: anywhere; }
.e13e-qr-check p:first-child { font-weight: 600; }
.e13e-qr-check-line { margin: 0 0 4px; }
.e13e-qr-check-box { margin: 8px 0 0; font-weight: 600; }

/* Backgrounds for QR codes (0.77, editor-qr.js): card of the QR code tab, folded once the side has a background or a
   code ("Background: name · Change · Remove the background"); the zone of each background in dashes; a row that scrolls
   on a phone (the stage takes most of the height there). */
.e13e-qr-bgs-head { width: 100%; padding: 0; border: 0; background: transparent; font-family: inherit; text-align: left; cursor: pointer; margin-bottom: 0; }
.e13e-qr-bgs.is-open .e13e-qr-bgs-head { margin-bottom: 10px; }
.e13e-qr-bgs-title { flex: 1; min-width: 0; }
.e13e-qr-bgs-chevron { transition: transform .15s; color: var(--e13e-muted); }
.e13e-qr-bgs.is-open .e13e-qr-bgs-chevron { transform: rotate(180deg); }
.e13e-qr-bgs-current { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.e13e-qr-bgs-name { flex: 1 1 100%; font-size: .8rem; font-weight: 600; color: var(--e13e-text); overflow-wrap: anywhere; }
.e13e-qr-bgs-body > .e13e-hint:first-child { margin-top: 0; }
.e13e-qr-bgs.is-busy .e13e-qr-bgs-grid { opacity: .6; pointer-events: none; }
.e13e-qr-bg-card .e13e-template-preview { aspect-ratio: 3 / 4; }
.e13e-qr-bg-zone { position: absolute; z-index: 1; box-sizing: border-box; border: 1.5px dashed #fff; border-radius: 3px; box-shadow: 0 0 0 1px rgba(15, 15, 16, .55), inset 0 0 0 1px rgba(15, 15, 16, .55); pointer-events: none; }
.e13e-qr-bg-card.is-zone-small .e13e-qr-bg-zone { border-color: #fecaca; }
.e13e-qr-zone { margin-top: 10px; }
.e13e-qr-zone .e13e-hint { margin: 0; }
@media (max-width: 768px) {
  .e13e-qr-bgs-cards { display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 4px; }
  .e13e-qr-bgs-cards > .e13e-qr-bg-card { flex: 0 0 86px; min-width: 0; max-width: 86px; scroll-snap-align: start; }
  .e13e-qr-bgs-cards.is-landscape > .e13e-qr-bg-card { flex-basis: 120px; max-width: 120px; }
}
