/* WooPoint Designer — mobile-first (la mayoría del uso es móvil) */
.tfd-wrap{margin:0 0 18px;max-width:100%;-webkit-tap-highlight-color:transparent}
.tfd-wrap.tfd-busy{opacity:.6;pointer-events:none}

/* Botones: objetivos táctiles grandes */
.tfd-btn{appearance:none;border:1px solid #d8d8d8;background:#fff;border-radius:12px;
  padding:14px 16px;font-size:16px;line-height:1;cursor:pointer;min-height:48px;
  display:inline-flex;align-items:center;justify-content:center;gap:6px}
.tfd-btn[hidden]{display:none} /* .tfd-btn fija display, hay que pisar [hidden] explicito */
.tfd-btn:active{transform:translateY(1px)}
.tfd-btn--primary{background:#1f1f1f;color:#fff;border-color:#1f1f1f;width:100%}
.tfd-btn--ghost{color:#a11;border-style:dashed}

/* --- Modo producto/decoración (lienzo) --- */
.tfd-toolbar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}
.tfd-toolbar .tfd-btn{flex:1 1 auto}
.tfd-toolbar-scroll{display:flex;flex-wrap:wrap;gap:8px;flex:1 1 auto}
.tfd-toolbar-fixed{display:flex;gap:8px;flex:0 0 auto}
.tfd-stage{position:relative;width:100%;background:#c9ccd2;border:1px solid #e3e3e3;
  border-radius:12px;overflow:hidden;touch-action:none}
.tfd-stage canvas{display:block;max-width:100%;max-height:100%}
/* El área de diseño es BLANCA (papel) sobre el stage gris: así el borde del modelo se ve. */
.tfd-stage .canvas-container{background:#fff}
.tfd-hint{font-size:13px;color:#666;margin:8px 2px 0}

/* --- Modo revelado --- */
.tfd-rev-actions{margin-bottom:10px}
.tfd-rev-bulk{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:6px 0 10px;font-size:14px}
.tfd-rev-bulk select{min-height:44px;border-radius:10px;border:1px solid #d8d8d8;padding:0 10px;font-size:15px}
.tfd-rev-summary{background:#f6f6f6;border-radius:10px;padding:10px 12px;font-size:15px;margin-bottom:10px}
.tfd-rev-summary strong{color:#1f1f1f}

.tfd-rev-progress{margin:10px 0;display:flex;align-items:center;gap:10px}
.tfd-rev-progress[hidden]{display:none} /* solo visible durante la subida */
.tfd-rev-progress .tfd-spin{flex:0 0 auto}
.tfd-rev-bar{flex:1;height:8px;background:#eee;border-radius:99px;overflow:hidden}
.tfd-rev-bar span{display:block;height:100%;width:0;background:#1f9d55;transition:width .2s}
.tfd-rev-progress-txt{font-size:12px;color:#666}

/* Rejilla: 2 columnas en móvil, más en pantallas grandes */
.tfd-rev-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
/* Gran formato: UNA foto por fila (las fotos grandes se piden de una en una).
   3 clases para ganar a la regla de escritorio (.tfd-editor-body .tfd-rev-grid -> 4 col). */
.tfd-editor-body .tfd-rev-1col .tfd-rev-grid{grid-template-columns:1fr}
.tfd-rev-card{border:1px solid #e3e3e3;border-radius:0;overflow:hidden;background:#fff;position:relative}
/* La miniatura muestra ya la forma final: recorte (cover) a la proporción del tamaño.
   Sin redondeo: el borde redondeado recortaba esquinas de la foto y quedaba raro. */
.tfd-rev-frame{position:relative;width:100%;aspect-ratio:1/1;overflow:hidden;background:#f0f0f0;touch-action:auto;border-radius:0}
.tfd-rev-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%;
  transform-origin:center;user-select:none;-webkit-user-drag:none;pointer-events:none}
.tfd-rev-cardbtns{display:flex;border-top:1px solid #eee}
.tfd-rev-cardbtns button{flex:1 1 0;min-width:0;min-height:44px;box-sizing:border-box;line-height:1.2;border:0;background:#fafafa;padding:9px 6px;font-size:12px;
  font-weight:600;cursor:pointer;color:#1f1f1f}
.tfd-rev-cardbtns .tfd-rev-edit{background:#f4c95d;color:#1d252a}
.tfd-rev-cardbtns .tfd-rev-dup{border-left:1px solid #7a9caf;background:#b9dbf2;color:#1d252a}
.tfd-rev-cardbtns button:hover{filter:brightness(.94)}
.tfd-rev-cardbtns button:focus-visible{outline:3px solid #1d252a;outline-offset:-4px}
.tfd-rev-ctrls{display:grid;grid-template-columns:minmax(0,1fr) 32px;align-items:center;gap:6px;padding:6px}
.tfd-rev-size{grid-column:1/-1;width:100%;min-width:0;box-sizing:border-box;min-height:40px;border-radius:8px;border:1px solid #d8d8d8;padding:0 8px;font-size:14px}
.tfd-rev-qty{display:flex;align-items:center;gap:2px;min-width:0}
.tfd-rev-qty button{flex:0 0 28px;width:28px;height:36px;padding:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;line-height:1;border-radius:8px;border:1px solid #d8d8d8;background:#fafafa;font-size:18px;cursor:pointer}
.tfd-rev-qty input{flex:1 1 0;min-width:0;width:32px;max-width:48px;height:36px;padding:0;box-sizing:border-box;appearance:textfield;text-align:center;border:1px solid #d8d8d8;border-radius:8px;font-size:15px}
.tfd-rev-qty input::-webkit-inner-spin-button,.tfd-rev-qty input::-webkit-outer-spin-button{appearance:none;margin:0}
.tfd-rev-del{width:32px;height:36px;padding:0;box-sizing:border-box;display:flex;align-items:center;justify-content:center;line-height:1;border-radius:8px;border:1px solid #eee;background:#fff;color:#a11;cursor:pointer}

@media (min-width:600px){
  .tfd-rev-grid{grid-template-columns:repeat(3,1fr)}
  .tfd-toolbar .tfd-btn{flex:0 0 auto}
  .tfd-btn--primary{width:auto}
}
@media (min-width:1000px){
  .tfd-rev-grid{grid-template-columns:repeat(4,1fr)}
}

/* --- Entrada al editor + overlay a pantalla completa (Decisión 1) --- */
.tfd-cta{appearance:none;border:0;background:#E8A33D;color:#1f1f1f;font-weight:600;
  border-radius:12px;padding:16px 18px;font-size:16px;width:100%;cursor:pointer;min-height:52px;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;margin:0 0 12px;
  -webkit-tap-highlight-color:transparent}
.tfd-cta:active{transform:translateY(1px)}
.tfd-summary{display:flex;align-items:center;gap:12px;margin:0 0 12px}
.tfd-summary[hidden]{display:none}
.tfd-summary-thumb{width:64px;height:64px;object-fit:cover;border-radius:10px;
  border:1px solid #e3e3e3;background:#f4f4f4}
.tfd-summary-txt{font-size:14px;color:#1f7a3d;font-weight:600;flex:1}

/* Bloqueo del botón "Añadir al carrito" hasta que haya diseño/foto */
.single_add_to_cart_button.tfd-locked{opacity:.5;filter:grayscale(.35)}
.tfd-gate-note{font-size:13px;color:#a11;font-weight:600;margin:0 0 8px}
.tfd-gate-note[hidden]{display:none}

/* Semáforo de calidad: chip en la esquina del lienzo (no mueve nada) */
.tfd-dpi{position:absolute;top:8px;right:8px;z-index:5;font-size:12px;font-weight:700;
  border-radius:99px;padding:5px 11px;box-shadow:0 1px 4px rgba(0,0,0,.12)}
.tfd-dpi[hidden]{display:none}
.tfd-dpi--ok{background:#e6f6ec;color:#1f7a3d}
.tfd-dpi--warn{background:#fdf3e0;color:#9a6a12}
.tfd-dpi--bad{background:#fde7e7;color:#a11}

/* Los ajustes tienen espacio propio: nunca se superponen al área imprimible. */
.tfd-bottom{position:relative;flex:0 0 auto;min-width:0;background:#fff}
.tfd-textbar,.tfd-textopts,.tfd-imgopts,.tfd-shapeopts{position:relative;box-sizing:border-box;width:100%;
  background:#fff;border-top:1px solid #eee;box-shadow:0 -3px 10px rgba(0,0,0,.06);z-index:6}
/* Los controles largos tienen scroll propio para dejar espacio al lienzo en móviles. */
.tfd-textopts,.tfd-imgopts,.tfd-shapeopts{max-height:30vh;max-height:30dvh;overflow-y:auto;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
/* Opciones de imagen: UNA fila compacta (iconos + giro), para no comerse el lienzo */
.tfd-imgopts{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:6px 10px}
.tfd-imgopts .tfd-btn:not(.tfd-ico){min-height:40px;padding:0 14px;width:auto}
.tfd-imgopts[hidden],.tfd-textopts[hidden],.tfd-textbar[hidden],.tfd-shapeopts[hidden]{display:none}
/* Opciones de forma: solo el color de relleno, mismo patrón que el color de texto */
.tfd-shapeopts{display:flex;gap:8px;align-items:center;padding:6px 12px}
.tfd-shape-color{width:44px;height:40px;border:1px solid #d8d8d8;border-radius:8px;padding:2px;background:#fff;cursor:pointer}
.tfd-tx-stroke,.tfd-shape-stroke{width:40px;height:40px;border:1px solid #d8d8d8;border-radius:8px;padding:2px;background:#fff;cursor:pointer}
.tfd-tx-strokewidth,.tfd-shape-strokewidth{width:64px}
.tfd-btn.is-active{background:#1f1f1f;color:#fff;border-color:#1f1f1f}
/* Grupo de trazo/sombra: en su PROPIA fila (flex-basis 100%) y separado con una línea, para que
   se note que es algo nuevo y no una fila más de controles de color repetidos. */
.tfd-opt-group{flex:1 1 100%;display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:6px;padding-top:6px;border-top:1px dashed #e3e3e3}
/* .tfd-opt-group fija su propio display:flex, que pisaría el [hidden] por defecto del
   navegador (misma especificidad, gana el autor) si no se declara explícito aquí. */
.tfd-opt-group[hidden]{display:none}
.tfd-opt-label{font-size:12px;color:#888;flex:0 0 auto}
.tfd-opt-group input[type="range"]{width:64px;flex:0 0 auto}
.tfd-opt-group input[type="number"]{width:46px;min-height:32px;border:1px solid #d8d8d8;
  border-radius:8px;text-align:center;font-size:13px;flex:0 0 auto}
.tfd-shapeopts .tfd-btn{min-height:40px;padding:0 14px;width:auto}
.tfd-imgopts .tfd-ico{flex:0 0 auto;min-height:38px;min-width:40px;width:auto;padding:0;font-size:17px}
.tfd-imgopts .tfd-ico[data-tfd="img-rot90"]{font-size:12px;font-weight:600;min-width:48px;padding:0 4px}
.tfd-imgopts-deg{color:#999;font-size:16px;flex:0 0 auto}
.tfd-btn svg{display:inline-block;vertical-align:middle;pointer-events:none}
.tfd-img-rot{flex:1;min-width:0}
.tfd-img-rotnum{width:48px;min-height:36px;border:1px solid #d8d8d8;border-radius:8px;text-align:center;font-size:14px}

/* Panel de capas: tarjeta flotante sobre el lienzo */
.tfd-layers{position:absolute;top:8px;right:8px;bottom:8px;width:min(72%,260px);z-index:7;
  background:#fff;border:1px solid #e3e3e3;border-radius:12px;display:flex;flex-direction:column;
  overflow:hidden;box-shadow:0 4px 16px rgba(0,0,0,.18)}
.tfd-layers[hidden]{display:none}
.tfd-layers-head{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;
  font-weight:700;border-bottom:1px solid #eee}
.tfd-layers-close{appearance:none;border:0;background:none;font-size:18px;cursor:pointer;color:#444}
.tfd-layers-list{flex:1;overflow:auto}
.tfd-layer{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:8px 10px;border-bottom:1px solid #f2f2f2}
.tfd-layer.is-active{background:#fff6e8}
.tfd-layer-grip{cursor:grab;color:#bbb;font-size:12px;letter-spacing:-2px;user-select:none;touch-action:none}
.tfd-layer-dragging{opacity:.5}
.tfd-layer-over{border-top:2px solid #e8a33d}
.tfd-layer-name{flex:1;font-size:13px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tfd-layer-btn{appearance:none;border:1px solid #e3e3e3;background:#fafafa;border-radius:7px;
  width:30px;height:30px;cursor:pointer;font-size:12px}
.tfd-layer-op-row{flex:1 1 100%;display:flex;align-items:center;gap:6px;margin-top:4px}
.tfd-layer-op-label{font-size:11px;color:#888;white-space:nowrap}
.tfd-layer-op{flex:1;margin-top:0}
/* Bloqueos granulares por elemento (solo modo autor): un chip por flag (pos/tamaño/color/fuente) */
.tfd-layer-locks-row{flex:1 1 100%;display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}
.tfd-layer-lock-btn{appearance:none;border:1px solid #e3e3e3;background:#fafafa;border-radius:7px;
  padding:3px 8px;font-size:11px;line-height:1.4;cursor:pointer;color:#666}
.tfd-layer-lock-btn.is-locked{background:#fff1d9;border-color:#e8a33d;color:#8a5a13;font-weight:700}

/* Opciones de texto (color, tamaño, fuente) */
.tfd-textopts{display:flex;gap:8px;align-items:center;padding:6px 12px;flex-wrap:wrap}
.tfd-textopts[hidden]{display:none}
.tfd-tx-color{width:44px;height:40px;border:1px solid #d8d8d8;border-radius:8px;padding:2px;background:#fff;cursor:pointer}
.tfd-textopts .tfd-btn{min-height:40px;padding:0 14px;width:auto}
.tfd-tx-font{min-height:40px;border-radius:8px;border:1px solid #d8d8d8;padding:0 8px;font-size:14px;flex:1}
.tfd-toolbar .tfd-btn[disabled]{opacity:.4;pointer-events:none}

/* Barra de entrada de texto (sustituye a window.prompt) */
.tfd-textbar{display:flex;gap:8px;align-items:center;padding:8px 12px}
.tfd-textbar[hidden]{display:none}
.tfd-textbar-input{flex:1;min-height:46px;border:1px solid #d8d8d8;border-radius:10px;padding:0 12px;font-size:16px}
.tfd-textbar .tfd-btn{min-height:46px;padding:0 16px;width:auto}
body.tfd-open .tfd-overlay .tfd-textbar{border-top:1px solid #eee}

/* Editor por foto (revelado): zoom, giro y filtros a pantalla completa */
.tfd-rev-edit-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;background:#f4f4f4;padding:10px}
.tfd-rev-edit-frame{position:relative;overflow:hidden;background:#fff;border:1px solid #e3e3e3;
  touch-action:none;cursor:grab;max-width:none;max-height:none;flex-shrink:0;box-sizing:content-box;border:0;outline:1px solid #e3e3e3}
.tfd-rev-edit-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%;
  transform-origin:center;user-select:none;-webkit-user-drag:none;pointer-events:none}
.tfd-rev-safe{position:absolute;pointer-events:none;border:1.5px dashed rgba(225,80,80,.9);z-index:2}
.tfd-rev-safe[hidden]{display:none}
.tfd-rev-edit-tools{padding:10px 12px;border-top:1px solid #eee;display:flex;flex-direction:column;gap:10px;
  padding-bottom:max(10px,env(safe-area-inset-bottom))}
.tfd-rev-zoomrow{display:flex;align-items:center;gap:10px;font-size:15px}
.tfd-rev-zoom{flex:1}
.tfd-rev-edit-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
/* Ancho fijo para que al cambiar "Ajustar"<->"Rellenar" no se reordene toda la fila */
.tfd-rev-edit-row .tfd-btn{flex:0 0 110px;width:110px;min-width:0;height:48px;padding:0 8px;box-sizing:border-box;white-space:nowrap}
.tfd-rev-edit-row .tfd-btn[aria-pressed="true"]{background:#1f1f1f;color:#fff;border-color:#1f1f1f}
.tfd-rev-filters{display:flex;gap:6px;flex-wrap:wrap;flex:1 1 100%}
.tfd-rev-filters button{appearance:none;border:1px solid #d8d8d8;background:#fff;border-radius:99px;
  padding:9px 13px;font-size:13px;cursor:pointer;min-height:40px}
.tfd-rev-filters button.is-active{background:#1f1f1f;color:#fff;border-color:#1f1f1f}

/* El overlay/app a pantalla completa se activa con la clase .tfd-shown (editor por foto)
   o de inicio en la página del editor (producto). */
.tfd-overlay[hidden]{display:none}
body.tfd-open{overflow:hidden}
.tfd-overlay.tfd-shown{
  display:flex;flex-direction:column;position:fixed;inset:0;z-index:99999;
  margin:0;max-width:none;width:100%;height:100dvh;background:#fff}

.tfd-head{display:flex;flex-shrink:0;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid #eee;
  padding-top:max(10px,env(safe-area-inset-top))}
.tfd-head-title{flex:1;text-align:center;font-size:15px;font-weight:600;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tfd-head-btn{appearance:none;border:0;background:none;font-size:20px;line-height:1;
  width:40px;height:40px;cursor:pointer;color:#444}
.tfd-head-done{appearance:none;border:0;background:#E8A33D;color:#1f1f1f;font-weight:600;
  border-radius:10px;padding:0 18px;height:40px;cursor:pointer;white-space:nowrap}

.tfd-overlay.tfd-shown .tfd-stage{flex:1;min-height:0;display:flex;align-items:center;
  justify-content:center;border:0;border-radius:0;background:#c9ccd2;touch-action:none}
.tfd-overlay.tfd-shown .tfd-hint{margin:0;padding:5px 12px;text-align:center;font-size:12px}
.tfd-overlay.tfd-shown .tfd-dpi{align-self:center}
.tfd-overlay.tfd-shown .tfd-textbar{border-top:1px solid #eee}
/* Barra de herramientas compacta (botones más pequeños; ocupaban demasiado en móvil).
   Deshacer/Rehacer van en un grupo FIJO aparte (tfd-toolbar-fixed): si los 5 botones de la
   izquierda no caben, hacen scroll horizontal SOLOS, pero deshacer/rehacer quedan siempre
   visibles sin tener que descubrir que hay que hacer scroll para llegar a ellos. */
.tfd-overlay.tfd-shown .tfd-toolbar{margin:0;padding:7px 8px;border-top:1px solid #eee;gap:0;
  padding-bottom:max(7px,env(safe-area-inset-bottom));
  display:flex;align-items:center;flex-wrap:nowrap}
.tfd-overlay.tfd-shown .tfd-toolbar-scroll{display:flex;flex-wrap:nowrap;gap:6px;flex:1 1 auto;min-width:0;
  overflow-x:auto;-webkit-overflow-scrolling:touch}
.tfd-overlay.tfd-shown .tfd-toolbar-fixed{display:flex;gap:6px;flex:0 0 auto;margin-left:6px;
  padding-left:6px;border-left:1px solid #eee}
.tfd-overlay.tfd-shown .tfd-toolbar .tfd-btn{flex:0 0 auto;min-height:40px;padding:0 10px;font-size:13px;border-radius:10px;white-space:nowrap}
/* undo/redo: iconos estrechos, no enormes */
.tfd-overlay.tfd-shown .tfd-toolbar-fixed .tfd-btn{min-width:42px;padding:0;font-size:17px}

/* Modal de confirmación */
.tfd-modal{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;
  background:rgba(0,0,0,.5);padding:20px}
.tfd-modal[hidden]{display:none}
.tfd-modal-box{background:#fff;border-radius:14px;padding:20px;max-width:380px;width:100%;text-align:center;
  box-shadow:0 10px 40px rgba(0,0,0,.3)}
.tfd-modal-title{font-size:18px;font-weight:700;margin:0 0 6px}
.tfd-modal-txt{font-size:14px;color:#555;margin:0 0 16px}
.tfd-modal-btns{display:flex;flex-direction:column;gap:8px}
.tfd-modal-btns .tfd-btn{width:100%}

/* Página del editor (documento propio, sin tema) */
.tfd-editor-body{margin:0;background:#fff;touch-action:manipulation;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:#1f1f1f}
/* touch-action:manipulation evita el zoom por doble toque del navegador en los botones */
.tfd-editor-body button,.tfd-btn{touch-action:manipulation}
.tfd-busy{opacity:.55;pointer-events:none}

/* Modo revelado en página: cabecera fija + cuerpo desplazable */
.tfd-rev-bodypage{min-height:100dvh}
.tfd-rev-page{display:flex;flex-direction:column;min-height:100dvh}
.tfd-rev-head{position:sticky;top:0;background:#fff;z-index:10}
.tfd-rev-body{flex:1;padding:12px}
.tfd-rev-options{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.tfd-rev-options .tfd-rev-finish{margin:0;gap:6px}
.tfd-rev-view{display:none;margin-left:auto;gap:4px}
.tfd-rev-view button{appearance:none;box-sizing:border-box;width:44px;height:40px;padding:0;display:flex;align-items:center;justify-content:center;border:1px solid #d8d8d8;border-radius:8px;background:#fff;color:#1f1f1f;font-size:12px;cursor:pointer}
.tfd-rev-view svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5}
.tfd-rev-view button[aria-pressed="true"]{background:#1f1f1f;color:#fff;border-color:#1f1f1f}
.tfd-rev-empty{flex:1;min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;text-align:center;padding:24px 0}
.tfd-rev-empty[hidden],.tfd-photo-start[hidden],.tfd-busy .tfd-photo-start{display:none}
.tfd-photo-start{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2;
  display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;
  width:260px;max-width:calc(100% - 24px);box-sizing:border-box;padding:20px;
  border-radius:14px;background:var(--tfd-ui-panel,#fff);color:var(--tfd-ui-ink,#222);
  box-shadow:0 5px 20px #0003}
.tfd-photo-start p{margin:0;font-size:18px}
.tfd-photo-start .tfd-btn{width:100%;min-height:52px;font-weight:700}
.tfd-rev-empty p{margin:0;font-size:18px;color:#555}
.tfd-rev-empty .tfd-btn{width:auto;min-width:200px}
.tfd-rev-is-empty .tfd-rev-body{display:flex;flex-direction:column}
.tfd-rev-is-empty .tfd-rev-grid,.tfd-rev-is-empty .tfd-rev-help,.tfd-mode-revelado.tfd-rev-is-empty .tfd-rev-bottombar{display:none}
@media (max-width:599px){
  .tfd-rev-view{display:flex}
  .tfd-rev-options .tfd-rev-finish-lbl{font-size:14px}
  .tfd-rev-options .tfd-rev-finish-btn{box-sizing:border-box;width:56px;height:40px;padding:0 4px}
  .tfd-editor-body .tfd-rev-mobile-1col .tfd-rev-grid{grid-template-columns:minmax(0,1fr)}
  .tfd-rev-edit-row{gap:6px}
  .tfd-rev-edit-row .tfd-btn{flex:1 1 0;width:0;font-size:14px}
}
/* Selector de acabado (Brillo/Mate) — global para el pedido */
.tfd-rev-finish{display:flex;align-items:center;gap:10px;margin:0 0 10px;flex-wrap:wrap}
.tfd-rev-finish[hidden]{display:none}
.tfd-rev-finish-lbl{font-weight:600;color:#555}
.tfd-rev-finish-opts{display:flex;gap:6px}
.tfd-rev-finish-btn{appearance:none;border:1px solid #d8d8d8;background:#fff;border-radius:99px;
  padding:8px 18px;font-size:14px;cursor:pointer;min-height:40px}
.tfd-rev-finish-btn.is-active{background:#1f1f1f;color:#fff;border-color:#1f1f1f}
.tfd-editor-body .tfd-rev-help{font-size:12px;line-height:1.35;color:#ffe4a3;background:#393326;border-left:3px solid #f4c95d;padding:6px 8px;margin:0 0 8px}

/* --- Escritorio: que la barra inferior y las herramientas no sean botones gigantes ---
   (prefijo .tfd-editor-body para ganar a las reglas base por especificidad, no por orden) */
@media (min-width:760px){
  .tfd-editor-body .tfd-rev-bottombar{flex-direction:row;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap}
  .tfd-editor-body .tfd-rev-bottombar .tfd-btn--primary{width:auto;flex:0 0 auto;padding:0 28px}
  .tfd-editor-body .tfd-rev-bottombar .tfd-rev-bulk{flex:0 0 auto}
  .tfd-editor-body .tfd-rev-grid{grid-template-columns:repeat(4,1fr)}
  .tfd-editor-body .tfd-overlay.tfd-shown .tfd-toolbar{justify-content:center}
  .tfd-editor-body .tfd-overlay.tfd-shown .tfd-toolbar .tfd-btn{flex:0 0 auto;min-width:110px}
  .tfd-editor-body .tfd-textbar,.tfd-editor-body .tfd-textopts,.tfd-editor-body .tfd-imgopts,.tfd-editor-body .tfd-shapeopts{max-width:760px;margin:0 auto}
  .tfd-editor-body .tfd-modal-box{max-width:420px}
}
/* Barra inferior fija: tamaño para todas (en una línea) + añadir fotos */
.tfd-rev-bottombar{position:sticky;bottom:0;background:#fff;border-top:1px solid #eee;
  padding:10px 12px;padding-bottom:max(10px,env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:8px;z-index:10}
.tfd-rev-bottombar .tfd-rev-bulk{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;margin:0;font-size:14px}
.tfd-rev-bottombar .tfd-rev-bulk select{flex:0 0 auto;width:auto;min-width:84px;min-height:40px;
  border-radius:8px;border:1px solid #d8d8d8;padding:0 8px}
.tfd-rev-bottombar .tfd-rev-bulk .tfd-btn{flex:1;min-height:40px;padding:0 10px;white-space:nowrap}
.tfd-rev-bottombar .tfd-btn--primary{width:100%}

/* Enlace "Editar diseño" en el carrito */
.tfd-cart-edit{display:inline-block;margin-top:4px;font-size:13px;font-weight:600;color:#1f7a3d;text-decoration:none}
.tfd-cart-edit:hover{text-decoration:underline}

/* Botón Personalizar en la ficha */
.tfd-personalize-wrap{margin:6px 0 14px}
.tfd-personalize-wrap .tfd-cta:disabled{opacity:.48;cursor:not-allowed;transform:none}
.tfd-color-picker{margin:18px 0 14px}
.tfd-color-picker-title{font-size:16px;font-weight:700;margin:0 0 10px;color:#252525}
.tfd-color-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.tfd-color-choice{appearance:none;border:2px solid #d9d9d9;border-radius:10px;background:#fff;padding:6px;min-width:0;cursor:pointer;text-align:center;color:#252525;transition:border-color .15s,box-shadow .15s}
.tfd-color-choice:hover,.tfd-color-choice:focus-visible{border-color:#a56a11}
.tfd-color-choice[aria-pressed="true"]{border-color:#b47411;box-shadow:0 0 0 2px #f7d89d}
.tfd-color-choice img{display:block;width:100%;height:82px;object-fit:contain;background:#f7f7f7;border-radius:6px}
.tfd-color-name{display:flex;align-items:center;justify-content:center;gap:5px;margin:6px 0 2px;font-size:12px;font-weight:600;line-height:1.2;white-space:nowrap}
.tfd-color-dot{display:inline-block;flex:0 0 12px;width:12px;height:12px;border:1px solid #aaa;border-radius:50%}
.tfd-color-help{margin:-4px 0 12px;font-size:13px;color:#555}
@media(max-width:600px){.tfd-color-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.tfd-color-choice img{height:72px}}

/* Tarjeta de precios (tramos / pack) en la ficha del producto.
   Colores FORZADOS (!important) porque el tema/WooCommerce pinta .amount con un color claro. */
.tfd-price-table{--tfd-pt-ink:#12161d;--tfd-pt-muted:#525a67;--tfd-pt-line:rgba(0,0,0,.16);
  margin:16px 0;padding:14px 16px;border:1px solid rgba(0,0,0,.14);border-radius:14px;
  background:linear-gradient(180deg,#ffffff,#f3f5f8);
  box-shadow:0 1px 2px rgba(0,0,0,.06);box-sizing:border-box;color:var(--tfd-pt-ink);
  /* No superar nunca el ancho de pantalla, aunque el contenedor del tema desborde. */
  width:auto;max-width:min(520px, calc(100vw - 40px));overflow-x:auto}
.tfd-price-table,.tfd-price-table *{color:var(--tfd-pt-ink)}
.tfd-pt-head{font-weight:700;font-size:.8rem;letter-spacing:.03em;text-transform:uppercase;
  color:var(--tfd-pt-muted) !important;margin:0 0 12px}
/* Tabla REAL de 2 columnas (Cantidad | Precio). Reset frente a los estilos de tabla del tema. */
.tfd-pt-table{width:100%;border-collapse:collapse;margin:0;background:none;table-layout:auto;font-size:1rem;border:0 !important}
.tfd-pt-table tr{background:none !important}
/* border:0 !important en las celdas: el tema (WooCommerce/Astra) pinta bordes (incluida una
   línea vertical a la izquierda de las cantidades) y hay que ganarle. La cabecera reañade su borde inferior. */
.tfd-pt-table th,.tfd-pt-table td{border:0 !important;background:none;padding:11px 0;vertical-align:baseline;line-height:1.3}
.tfd-pt-table thead th{font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.03em;
  color:var(--tfd-pt-muted) !important;border-bottom:1px solid var(--tfd-pt-line) !important;padding-bottom:8px}
/* Sin líneas por fila (quedaban pegadas a las cantidades). Separación solo por espacio;
   filas alternas muy sutiles para poder seguir cada cantidad con su precio. */
.tfd-pt-table tbody td{border:0}
.tfd-pt-table tbody tr:nth-child(even) td{background:rgba(0,0,0,.028)}
.tfd-pt-table tbody td:first-child{border-radius:7px 0 0 7px}
.tfd-pt-table tbody td:last-child{border-radius:0 7px 7px 0}
/* Separación clara entre la columna de cantidad y la de precio. padding-left: separa los números
   de esa línea vertical del tema a su izquierda (en vez de pelear por quitarla). */
.tfd-pt-c-qty{text-align:left !important;width:auto;padding-left:14px !important;padding-right:20px !important;color:var(--tfd-pt-ink) !important}
.tfd-pt-c-price{text-align:right !important;width:1%;white-space:nowrap;font-weight:800;padding-left:20px !important;padding-right:14px !important;color:var(--tfd-pt-ink) !important}
.tfd-pt-table thead .tfd-pt-c-price{font-weight:700}
/* Los números de precio de WooCommerce (.amount/bdi) heredan el color de su celda, ganando al tema. */
.tfd-price-table .amount,.tfd-price-table bdi,.tfd-price-table .woocommerce-Price-amount{color:inherit !important;font-weight:inherit}
/* Precio único (un solo tramo) */
.tfd-pt-single{font-weight:800;font-size:1.3rem;line-height:1.1;color:var(--tfd-pt-ink) !important}
.tfd-pt-unit{font-size:.7rem;font-weight:600;color:var(--tfd-pt-muted) !important;margin-left:3px}
.tfd-pt-was,.tfd-pt-was .amount,.tfd-pt-was bdi{color:var(--tfd-pt-muted) !important;font-weight:400;margin-right:8px}
.tfd-pt-promo,.tfd-pt-promo .amount,.tfd-pt-promo bdi{color:#b02a1e !important}
.tfd-pt-foot{margin:12px 0 0;font-size:.82rem;color:var(--tfd-pt-muted) !important}
/* "desde" del precio de gancho (price_html en listados/ficha) */
.tfd-pt-from{font-size:.82em;font-weight:600;opacity:.72}
/* Estilo "chip" (solo lo usa el bloque PACK, un único recuadro) */
.tfd-pt-tiers{display:flex;flex-wrap:wrap;gap:8px}
.tfd-pt-tier{flex:1 1 auto;min-width:70px;display:flex;flex-direction:column;align-items:center;gap:3px;
  padding:9px 12px;border:1px solid rgba(0,0,0,.12);border-radius:11px;background:rgba(255,255,255,.6)}
.tfd-pt-qty{font-size:.72rem;font-weight:600;letter-spacing:.02em;color:var(--tfd-pt-muted) !important}
.tfd-pt-price{font-weight:800;font-size:1.14rem;line-height:1.05;color:var(--tfd-pt-ink) !important;white-space:nowrap}
/* SIN variante de modo oscuro a propósito: la tienda es tema claro. La tarjeta lleva su propio
   fondo claro + tinta oscura y se ve igual aunque el MÓVIL esté en modo oscuro (antes el texto
   claro quedaba invisible sobre el fondo blanco del tema). */

/* Aviso de pack en el editor de revelado */
.tfd-rev-packnote{font-size:14px;color:#1f7a3d;background:#eef7f0;border-radius:8px;padding:8px 10px;margin:0 0 10px}
.tfd-rev-packnote[hidden]{display:none}
.tfd-rev-packnote.tfd-rev-packover{color:#a11;background:#fdeaea}
.tfd-rev-tiernote{font-size:14px;color:#8a5a00;background:#fff4e0;border-radius:8px;padding:8px 10px;margin:0 0 10px}
.tfd-rev-tiernote[hidden]{display:none}

/* Botón Cancelar de cabecera (editor por foto) */
.tfd-head-cancel{appearance:none;border:0;background:none;font-size:15px;color:#444;cursor:pointer;padding:0 4px}

/* Indicador de subida (editor producto) */
.tfd-stage{position:relative}
.tfd-uploading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;gap:10px;
  background:rgba(255,255,255,.75);font-size:15px;font-weight:600;color:#1f1f1f;z-index:5}
.tfd-uploading[hidden]{display:none}
.tfd-spin{width:18px;height:18px;border:3px solid #ccc;border-top-color:#1f1f1f;border-radius:50%;
  animation:tfd-spin .8s linear infinite}
@keyframes tfd-spin{to{transform:rotate(360deg)}}

/* Product profiles change options, never the shared editing interface. */
.tfd-workspace{display:flex;flex:1;min-height:0;min-width:0;position:relative}
.tfd-workspace .tfd-stage{min-width:0}
.tfd-inspector{flex:0 0 300px;width:300px;min-height:0;border-left:1px solid #e3e3e3;background:#fff;position:relative;box-sizing:border-box}
.tfd-inspector-card{height:100%;overflow-y:auto;overscroll-behavior:contain}
.tfd-inspector-heading{display:flex;justify-content:space-between;align-items:center;padding:14px 12px;border-bottom:1px solid #eee}
.tfd-inspector-heading button,.tfd-mobile-adjust{display:none}
.tfd-inspector-empty{font-size:13px;line-height:1.6;color:#687684;padding:12px}
.tfd-inspector-card:has(>div:not([hidden]).tfd-imgopts,>div:not([hidden]).tfd-textopts,>div:not([hidden]).tfd-shapeopts,>div:not([hidden]).tfd-textbar) .tfd-inspector-empty{display:none}
.tfd-inspector .tfd-imgopts,.tfd-inspector .tfd-textopts,.tfd-inspector .tfd-shapeopts{max-height:none;box-shadow:none;overflow:visible}
.tfd-inspector .tfd-textbar{flex-wrap:wrap;box-shadow:none}
.tfd-inspector .tfd-textbar-input{min-width:0;width:100%}
.tfd-product-preview .tfd-modal-box{max-width:620px}
.tfd-product-preview canvas{display:block;width:100%;height:auto;max-height:60dvh;object-fit:contain;border-radius:12px;background:#f5f6f8}
.tfd-preview-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.tfd-preview-head h2{font-size:20px;margin:0}
.tfd-preview-controls{display:flex;gap:8px;justify-content:center;margin-bottom:10px}
.tfd-preview-controls label{display:flex;align-items:center;gap:12px}
.tfd-preview-status{font-size:14px;color:#30485c}
.tfd-product-preview canvas.tfd-mug-3d{width:min(100%,55dvh);height:auto;aspect-ratio:1;margin:0 auto;max-height:none;cursor:grab;touch-action:none;outline-offset:3px}
.tfd-product-preview canvas.tfd-mug-3d.is-dragging{cursor:grabbing}
.tfd-product-preview canvas.tfd-mug-3d:focus-visible{outline:2px solid #bd7b19}
.tfd-preview-controls{flex-wrap:wrap}
@media(max-width:759px){
 .tfd-workspace{flex-direction:column}
 .tfd-inspector{flex:0 0 54px;height:54px;width:100%;border-left:0;border-top:1px solid #eee;z-index:8}
 .tfd-inspector-card{position:absolute;bottom:0;width:100%;height:54px;background:#fff;overflow:hidden}
 .tfd-inspector-heading{display:none}
 .tfd-inspector .tfd-opt-group{display:none}
 .tfd-inspector-empty{margin:0;padding:14px 10px;font-size:12px}
 .tfd-inspector.is-expanded .tfd-inspector-card{height:auto;max-height:45dvh;overflow-y:auto;box-shadow:0 -8px 24px #0002}
 .tfd-inspector.is-expanded .tfd-inspector-heading{display:flex;position:sticky;top:0;background:#fff;z-index:2;padding:5px 10px}
 .tfd-inspector-heading button,.tfd-mobile-adjust{display:inline-flex}
 .tfd-inspector.is-expanded .tfd-opt-group:not([hidden]){display:flex}
 .tfd-inspector .tfd-textbar{flex-wrap:nowrap;padding:4px 8px}
 .tfd-inspector .tfd-textbar-input{width:0;flex:1}
 .tfd-product-preview .tfd-modal-box{padding:14px}
}
.tfd-product-options{display:flex;gap:12px;flex-wrap:wrap;align-items:center;padding:10px 16px;background:#fff;color:#213346;flex-shrink:0;border-bottom:1px solid #e3e3e3;font-size:13px}
.tfd-product-options label{display:flex;align-items:center;gap:6px;white-space:nowrap}
.tfd-product-options select,.tfd-product-options input{font:inherit;min-height:36px;border:1px solid #d8dce0;border-radius:8px;padding:5px 8px;background:#fff;color:#213346;max-width:145px}
.tfd-product-options .tfd-btn{min-height:36px;padding:7px 14px}
.tfd-product-options [aria-pressed=true]{background:#213346;color:#fff;border-color:#213346}
.tfd-modal-box{max-height:calc(100dvh - 32px);overflow-y:auto}
@media(max-width:600px){.tfd-product-options{gap:7px;padding:8px}.tfd-product-options label{font-size:12px}.tfd-product-options select{max-width:115px}.tfd-product-options .tfd-btn{padding:7px 10px}}

/* Fixed mobile tool slots: changing a selection or effect never changes canvas space. */
.tfd-mobile-dock,.tfd-mobile-summary{display:none}
.tfd-mobile-options{border:0;border-radius:16px;padding:16px;max-width:calc(100vw - 32px);max-height:80dvh;color:#213346;background:#fff}
.tfd-mobile-options::backdrop{background:#0006}
.tfd-shape-picker{border:1px solid #e4e8ed;border-radius:20px;padding:20px;width:min(440px,calc(100vw - 32px));max-height:85dvh;box-sizing:border-box;overflow:auto;color:#213346;background:#fff;box-shadow:0 16px 60px #10233830}
.tfd-shape-picker::backdrop{background:#152b4266}
.tfd-shape-heading{display:flex;align-items:flex-start;gap:12px;margin-bottom:18px}
.tfd-shape-heading>div{flex:1}
.tfd-shape-heading h2{margin:0 0 6px;font:700 20px system-ui;color:#213346}
.tfd-shape-heading p{margin:0;font:13px/1.5 system-ui;color:#637184}
.tfd-shape-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.tfd-shape-choice{appearance:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;min-height:94px;border:1px solid #e1e7ee;border-radius:14px;padding:10px 4px;background:linear-gradient(145deg,#fff,#f1f5f9);color:#213346;cursor:pointer;font:600 12px system-ui}
.tfd-shape-choice svg{width:40px;height:40px;fill:#de972e;filter:drop-shadow(0 3px 2px #b26b171a)}
.tfd-shape-choice:hover{border-color:#d39435;background:#fff7e9}
.tfd-wrap button:focus-visible,.tfd-wrap select:focus-visible,.tfd-shape-choice:focus-visible{outline:3px solid #397caa;outline-offset:2px}
.tfd-overlay.tfd-shown .tfd-stage{background:radial-gradient(ellipse at 50% 35%,#e9edf2,#cdd6df)}
.tfd-stage .canvas-container{box-shadow:0 5px 20px #20364c20}
.tfd-head{background:linear-gradient(110deg,#fff,#fffaf1)}
.tfd-head-done{box-shadow:0 2px 5px #a9681920}
.tfd-inspector-heading{background:#f3f6f9;color:#213346}
@media(max-width:759px){
 .tfd-workspace>.tfd-inspector,.tfd-wrap>.tfd-bottom,.tfd-wrap>.tfd-hint,.tfd-wrap>.tfd-product-options{display:none}
 .tfd-mobile-dock{display:grid;grid-template-rows:44px 60px 52px;flex:0 0 auto;height:156px;box-sizing:content-box;padding-bottom:env(safe-area-inset-bottom);background:#fff;border-top:1px solid #d8dce0;color:#213346;overflow:hidden}
 .tfd-dock-heading{display:flex;align-items:center;gap:6px;padding:0 8px;min-width:0;background:#f0f4f8}
 .tfd-mobile-dock .tfd-btn{min-height:44px;height:44px;padding:6px 10px;font-size:14px;flex-shrink:0;color:#213346}
 .tfd-dock-heading>.tfd-btn{width:44px;border:0;background:transparent;font-size:23px}
 .tfd-dock-heading>select{flex:1 1 140px;min-width:0;max-width:180px;height:36px;border:1px solid #c4d0da;border-radius:9px;background:#fff;padding:0 28px 0 10px;font:600 13px system-ui;color:#213346;text-overflow:ellipsis;box-shadow:0 1px 2px #21334612}
 .tfd-dock-heading>select:disabled{opacity:1;-webkit-text-fill-color:#566575}
 .tfd-mobile-dock .tfd-btn.is-active{background:#213346;color:#fff;border-color:#213346}
 .tfd-shadow-actions{gap:5px}
 .tfd-mobile-dock .tfd-shadow-actions>.tfd-btn{flex:1 1 0;min-width:0;padding:4px 2px;font-size:11px;line-height:1.05}
 .tfd-dock-control{display:flex;gap:8px;align-items:center;padding:8px;box-sizing:border-box;min-width:0;overflow:auto;font-size:13px;overscroll-behavior:contain}
 .tfd-dock-control>input,.tfd-dock-control>select{min-width:0;min-height:44px;margin:0;box-sizing:border-box;font:16px system-ui;border:1px solid #d8dce0;border-radius:8px;background:#fff;color:#213346}
 .tfd-dock-control>input[type=range]{flex:1;width:0;border:0;accent-color:#213346}
 .tfd-dock-control>input[type=number]{width:66px;padding:6px}
 .tfd-dock-control>input[type=color]{width:52px;padding:3px}
 .tfd-dock-control>input[type=text],.tfd-dock-control>select{flex:1;width:0;padding:6px}
 .tfd-mobile-dock>nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid #e3e3e3}
 .tfd-mobile-dock>nav>.tfd-btn{height:52px;border:0;border-radius:0;padding:4px 2px;font-size:11px;font-weight:600;background:#fff;transform:none;flex-direction:column;gap:3px}
 .tfd-mobile-dock>nav>[aria-pressed=true]{color:#213346;background:#fff3de;box-shadow:inset 0 3px #e8a33d}
 .tfd-dock-control>.tfd-btn{border-color:#dce4eb;box-shadow:0 2px 3px #21334608}
 .tfd-mobile-dock button:disabled{opacity:.35}
 .tfd-dock-control>.tfd-layers{position:static;inset:auto;width:100%;height:100%;border:0;box-shadow:none;border-radius:0}
 .tfd-dock-control .tfd-layers-head{display:none}
 .tfd-dock-control:has(>.tfd-layers){padding:0}
 .tfd-mobile-summary{display:flex;align-items:center;gap:6px;flex:0 0 44px;height:44px;padding:0 8px;box-sizing:border-box;color:#213346;border-bottom:1px solid #e3e3e3}
 .tfd-mobile-summary>span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
 .tfd-mobile-summary>.tfd-btn{min-height:40px;height:40px;padding:5px 8px;font-size:12px}
 .tfd-mobile-options .tfd-product-options{display:flex;flex-direction:column;align-items:stretch;border:0;padding:12px 0}
 .tfd-mobile-options .tfd-product-options label{justify-content:space-between;font-size:15px}
 .tfd-mobile-options .tfd-product-options input,.tfd-mobile-options .tfd-product-options select{min-height:44px;font-size:16px}
 .tfd-head{gap:4px;padding-left:6px;padding-right:8px}
 .tfd-head-title{font-size:12px;text-align:left}
 .tfd-head-done{font-size:12px;padding:0 10px}
}

.tfd-layer-name{border:0;background:transparent;text-align:left;color:inherit;cursor:pointer;padding:0}
.tfd-layer-btn:disabled{opacity:.35;cursor:default}
@media(max-width:759px){.tfd-shadow-actions{flex-wrap:wrap}.tfd-mobile-dock .tfd-shadow-actions>.tfd-btn{flex:1 0 27%;min-height:22px;height:22px;font-size:12px}.tfd-dock-heading{gap:2px}.tfd-dock-heading>select{flex-basis:100px}}
@media(max-width:759px){.tfd-shadow-actions{flex-wrap:nowrap}.tfd-mobile-dock .tfd-shadow-actions>.tfd-btn{flex:0 0 auto;min-width:80px;min-height:44px;height:44px;font-size:13px}}

.tfd-history-btn svg,[data-tfd="undo"] svg,[data-tfd="redo"] svg{display:block;width:22px;height:22px}
@media(max-width:759px){
 .tfd-mobile-dock.is-layers{height:auto;grid-template-rows:44px min(32dvh,180px) 52px}
 .tfd-mobile-dock.is-layers .tfd-dock-control{padding:0;overflow:hidden}
 .tfd-mobile-dock.is-layers .tfd-layers-head{display:flex;align-items:center;justify-content:space-between;min-height:32px;padding:0 12px;font-size:14px}
 .tfd-mobile-dock.is-layers .tfd-layers-close{width:32px;height:32px;font-size:20px}
 .tfd-mobile-dock.is-layers .tfd-layers-list{min-height:0;padding:4px 8px;overscroll-behavior:contain}
 .tfd-mobile-dock.is-layers .tfd-layer{gap:4px;padding:4px 8px;border-radius:9px;border:1px solid #dce4eb;margin-bottom:5px}
 .tfd-mobile-dock.is-layers .tfd-layer-name{flex:1 0 100%;font-size:14px;min-height:24px}
 .tfd-mobile-dock.is-layers .tfd-layer-grip{display:none}
 .tfd-mobile-dock.is-layers .tfd-layer-btn{flex:1;min-width:32px;min-height:32px;height:32px;font-size:14px}
 .tfd-mobile-dock.is-layers .tfd-layer-op-row{display:none}
 .tfd-mobile-dock.is-layers .tfd-layer.is-active .tfd-layer-op-row{display:flex;min-height:28px;width:100%;margin-top:0}
 .tfd-mobile-dock.is-layers .tfd-layer-op{min-height:28px;height:28px;flex:1;min-width:0}
 .tfd-mobile-dock.is-layers .tfd-layer-lock-btn{min-height:32px;font-size:12px}
 .tfd-dock-heading>.tfd-history-btn{display:flex;align-items:center;justify-content:center;border:1px solid #d8e1ea;background:#fff;border-radius:10px;width:40px;min-width:40px;height:40px;min-height:40px;box-shadow:0 1px 2px #2133460d}
}

/* Fixed inspector entry: changing tools never changes the canvas frame. */
.tfd-add-options{display:flex;align-items:stretch;gap:8px;flex-wrap:wrap;padding:12px 0;background:transparent;border:0}
.tfd-add-options[hidden]{display:none}
.tfd-add-options .tfd-btn{flex:1 1 40%;min-height:40px;background:#fff;border:1px solid #dde2e6;color:#26333d}
.tfd-add-prompt{flex:1 0 100%;font-size:12px;font-weight:400;color:#6b747a;margin-bottom:4px}
.tfd-add-entry{background:#fff!important;color:#26333d!important;border:1px solid #dde2e6!important}
.tfd-safe-notice{flex:0 0 auto;margin:0;padding:4px 12px;font-size:12px;font-weight:500;line-height:1.3;color:#7b2424;background:#f5b6b0;border:0}
.tfd-safe-notice:before{content:'●';color:#b72c25;font-size:9px;margin-right:6px}
.tfd-mode-producto>.tfd-hint,.tfd-mode-decoracion>.tfd-hint{display:none!important}
@media(max-width:759px){
 .tfd-add-options,.tfd-add-entry{display:none!important}
 .tfd-safe-notice{padding:3px 10px;font-size:12px;line-height:1.25}
}

/* Fine positioning uses the existing inspector and the fixed mobile dock. */
.tfd-fine-adjust{display:flex;align-items:center;gap:6px;flex-wrap:wrap;width:100%;box-sizing:border-box;padding:8px 0}
.tfd-fine-adjust>span{font-size:13px;font-weight:600;flex:1 0 100%;color:#213346}
.tfd-fine-adjust>select{height:40px;min-width:76px;max-width:90px;border:1px solid #c4d0da;border-radius:8px;background:#fff;color:#213346;font:14px system-ui;padding:0 5px}
.tfd-fine-adjust>.tfd-btn{flex:1 0 36px;min-width:36px;min-height:44px;height:44px;padding:0;font-size:20px;touch-action:manipulation}
.tfd-fine-adjust>.tfd-btn:disabled{opacity:.35;cursor:default}
@media(max-width:759px){.tfd-dock-control>.tfd-fine-adjust{flex-wrap:nowrap;gap:6px;padding:0;min-width:0}.tfd-dock-control .tfd-fine-adjust>span{display:none}.tfd-dock-control .tfd-fine-adjust>select{height:44px;min-width:76px;flex:0 0 76px}.tfd-dock-control .tfd-fine-adjust>.tfd-btn{flex:1 1 44px;min-width:40px}}
.tfd-inspector .tfd-shapeopts{flex-wrap:wrap}.tfd-inspector .tfd-fine-adjust{flex:1 0 100%;border-top:1px dashed #e3e3e3;margin-top:6px}

/* Add choices belong beside their trigger; the inspector is reserved for adjustments. */
@media(min-width:760px){
 .tfd-toolbar-scroll>.tfd-add-options{flex:0 0 auto;flex-wrap:nowrap;align-items:center;padding:0;gap:6px}
 .tfd-toolbar-scroll>.tfd-add-options>.tfd-add-prompt{display:none}
 .tfd-overlay.tfd-shown .tfd-toolbar .tfd-add-options>.tfd-btn{flex:0 0 auto;min-width:80px;background:#fff6e7;border-color:#e8c892}
 .tfd-inspector{display:flex;flex-direction:column;overflow:hidden}
 .tfd-inspector-card{height:auto;flex:1 1 55%;min-height:0}
 .tfd-inspector>.tfd-layers{position:static;inset:auto;width:100%;flex:1 1 40%;min-height:145px;max-height:45%;border:0;border-top:1px solid #d8dce0;border-radius:0;box-shadow:none;overflow:hidden}
 .tfd-inspector>.tfd-layers .tfd-layers-head{flex-shrink:0;background:#f0f4f8;padding:12px;font-size:14px}
 .tfd-inspector>.tfd-layers .tfd-layers-close,[data-tfd="layers"]{display:none!important}
}
/* Mobile layers float over the work area. The dock keeps the same height in every mode. */
@media(max-width:759px){
 .tfd-mobile-dock{position:relative;overflow:visible;z-index:9}
 .tfd-mobile-dock.is-layers{height:156px;grid-template-rows:44px 60px 52px}
 .tfd-mobile-dock.is-layers>.tfd-dock-control{padding:8px;overflow:auto;color:#687684}
 .tfd-mobile-dock>.tfd-layers{position:absolute;top:auto;bottom:calc(100% + 8px);left:8px;right:8px;width:auto;height:min(38dvh,280px);max-height:calc(100dvh - 250px);min-height:120px;border:1px solid #d8dce0;border-radius:12px;box-shadow:0 -5px 24px #21334625;overflow:hidden}
 .tfd-mobile-dock>.tfd-layers .tfd-layers-head{flex-shrink:0;background:#f0f4f8;border-bottom:1px solid #d8dce0}
}

/* Compact mobile layer list: secondary controls expand only on request. */
.tfd-layer-more{display:none}
@media(max-width:759px){
 .tfd-mobile-dock>.tfd-layers{height:min(22dvh,176px);min-height:112px}
 .tfd-mobile-dock.is-layers .tfd-layers-head{min-height:32px;height:32px;box-sizing:border-box;padding:0 10px;font-size:13px}
 .tfd-mobile-dock.is-layers .tfd-layers-close{height:32px;min-height:32px;line-height:1}
 .tfd-mobile-dock.is-layers .tfd-layers-list{padding:2px 4px;scrollbar-width:thin}
 .tfd-mobile-dock.is-layers .tfd-layer{gap:2px;padding:0 4px;margin:0 0 2px;min-height:44px;flex-wrap:wrap;border-radius:7px}
 .tfd-mobile-dock.is-layers .tfd-layer-name{flex:1 1 0;min-width:0;min-height:44px;font-size:13px}
 .tfd-mobile-dock.is-layers .tfd-layer-btn{flex:0 0 40px;width:40px;height:44px;min-height:44px;min-width:40px;border:0;background:transparent;border-radius:5px}
 .tfd-mobile-dock.is-layers .tfd-layer-more{display:block;font-size:22px}
 .tfd-mobile-dock.is-layers .tfd-layer [data-act="duplicate"],.tfd-mobile-dock.is-layers .tfd-layer [data-act="del"]{display:none}
 .tfd-mobile-dock.is-layers .tfd-layer.is-active .tfd-layer-op-row,.tfd-mobile-dock.is-layers .tfd-layer-locks-row{display:none}
 .tfd-mobile-dock.is-layers .tfd-layer.is-details .tfd-layer-op-row,.tfd-mobile-dock.is-layers .tfd-layer.is-details .tfd-layer-locks-row{display:flex}
 .tfd-mobile-dock.is-layers .tfd-layer.is-details .tfd-layer-op-row{padding:0 4px 6px;box-sizing:border-box}
 .tfd-mobile-dock.is-layers .tfd-layer-more[aria-expanded="true"]{background:#f5e4c7}
}

/* Layer popover opens directly from its navigation button, over the tool strip. */
@media(max-width:759px){
 .tfd-mobile-dock>.tfd-layers{left:auto;right:8px;bottom:58px;width:min(280px,calc(100vw - 16px));overflow:visible;box-sizing:border-box}
 .tfd-mobile-dock>.tfd-layers:after{content:'';position:absolute;bottom:-7px;right:calc(37.5vw - 16px);width:12px;height:12px;background:#fff;border-right:1px solid #d8dce0;border-bottom:1px solid #d8dce0;transform:rotate(45deg);pointer-events:none}
 .tfd-mobile-dock>.tfd-layers .tfd-layers-head{border-radius:11px 11px 0 0}
 .tfd-mobile-dock>.tfd-layers .tfd-layers-list{border-radius:0 0 11px 11px;position:relative;z-index:1;background:#fff}
 .tfd-mobile-dock.is-layers>nav [data-mobile-mode="layers"]{background:#fff3de;box-shadow:inset 0 3px #e8a33d}
}

@media(max-width:759px){
 .tfd-mobile-dock>.tfd-layers{height:auto;min-height:0;max-height:min(22dvh,176px)}
 .tfd-mobile-dock>.tfd-layers .tfd-layers-list{flex:0 1 auto;min-height:0;max-height:calc(min(22dvh,176px) - 34px)}
}

/* Full-width layer popover with opacity available directly on every layer. */
@media(max-width:759px){
 .tfd-mobile-dock>.tfd-layers{left:8px;right:8px;width:auto;max-height:min(26dvh,210px)}
 .tfd-mobile-dock>.tfd-layers .tfd-layers-list{max-height:calc(min(26dvh,210px) - 34px)}
 .tfd-mobile-dock.is-layers .tfd-layer .tfd-layer-op-row,.tfd-mobile-dock.is-layers .tfd-layer.is-active .tfd-layer-op-row{display:flex;min-height:28px;padding:0 4px 4px;margin-top:0;box-sizing:border-box}
 .tfd-mobile-dock.is-layers .tfd-layer:not(:has(.tfd-layer-locks-row)) .tfd-layer-more{display:none}
}

/* Canvas warning immediately below the design area, above editing controls. */
.tfd-canvas-area{display:flex;flex-direction:column;flex:1;min-width:0;min-height:0}
.tfd-canvas-area>.tfd-safe-notice{padding:9px 14px;font-size:14px;line-height:1.45;color:#702520;background:#fff1ef;border-top:1px solid #efcbc6;box-sizing:border-box}

/* Original editable slate typography; same TTF is used by the print worker. */
@font-face{font-family:'Niconne';font-style:normal;font-weight:400;font-display: swap;src:url(https://teamfoto.es/wp-content/plugins/woopoint-designer/assets/css/../fonts/ttf/niconne.ttf) format('truetype')}

/* Opt-in physical sheet orientation selector. */
.tfd-orientation-options{display:flex!important;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 14px;flex-shrink:0}
.tfd-orientation-options strong{font-size:14px;margin-right:8px}
.tfd-orientation-options .tfd-btn{min-height:44px}
.tfd-orientation-options .tfd-btn[aria-pressed="true"]{background:#ea6a24;border-color:#ea6a24;color:#171717}
@media(max-width:480px){.tfd-orientation-options strong{flex-basis:100%}.tfd-orientation-options{padding:8px 12px}}

/* Reusable opt-in design choices. */
.tfd-design-choices{display:flex!important;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 14px;flex-shrink:0}.tfd-design-choices strong{font-size:14px;margin-right:8px}.tfd-design-choices .tfd-btn{min-height:44px}.tfd-design-choices .tfd-btn[aria-pressed="true"]{background:#ea6a24;border-color:#ea6a24;color:#171717}@media(max-width:480px){.tfd-design-choices strong{flex-basis:100%}}

/* Opt-in unit packs with explicit server-owned prices. */
.tfd-unit-packs{display:flex!important;align-items:center;flex-wrap:wrap;gap:8px;padding:10px 14px;flex-shrink:0}.tfd-unit-packs strong{font-size:14px;margin-right:8px}.tfd-unit-packs .tfd-btn{min-height:44px}.tfd-unit-packs .tfd-btn[aria-pressed="true"]{background:#ea6a24;border-color:#ea6a24;color:#171717}@media(max-width:480px){.tfd-unit-packs strong{flex-basis:100%}}

/* Shared charcoal workspace; printable paper/artwork retain their own colors. */
body.tfd-editor-body{background:var(--tfd-ui-background,#202224);color:var(--tfd-ui-ink,#eceeed);color-scheme:dark}
.tfd-editor-body .tfd-overlay.tfd-shown,.tfd-editor-body .tfd-workspace,.tfd-editor-body .tfd-canvas-area,.tfd-editor-body .tfd-stage,.tfd-editor-body .tfd-overlay.tfd-shown .tfd-stage,.tfd-editor-body .tfd-rev-page,.tfd-editor-body .tfd-rev-body,.tfd-editor-body .tfd-rev-edit-stage{background:var(--tfd-ui-background,#202224);color:var(--tfd-ui-ink,#eceeed)}
.tfd-editor-body .tfd-head,.tfd-editor-body .tfd-toolbar,.tfd-editor-body .tfd-inspector,.tfd-editor-body .tfd-inspector-card,.tfd-editor-body .tfd-product-options,.tfd-editor-body .tfd-rev-bottombar,.tfd-editor-body .tfd-rev-edit-tools,.tfd-editor-body .tfd-mobile-dock,.tfd-editor-body .tfd-dock-control,.tfd-editor-body .tfd-mobile-options,.tfd-editor-body .tfd-modal-box{background:var(--tfd-ui-panel,#292c2f);color:var(--tfd-ui-ink,#eceeed);border-color:var(--tfd-ui-border,#464b4e)}
.tfd-editor-body .tfd-inspector-heading,.tfd-editor-body .tfd-dock-heading,.tfd-editor-body .tfd-layers-head,.tfd-editor-body .tfd-rev-summary,.tfd-editor-body .tfd-rev-card,.tfd-editor-body .tfd-rev-ctrls,.tfd-editor-body .tfd-mobile-dock>.tfd-layers,.tfd-editor-body .tfd-mobile-dock>.tfd-layers .tfd-layers-list{background:var(--tfd-ui-surface,#303437);color:var(--tfd-ui-ink,#eceeed);border-color:var(--tfd-ui-border,#464b4e)}
.tfd-editor-body .tfd-btn,.tfd-editor-body .tfd-add-entry,.tfd-editor-body .tfd-add-options .tfd-btn,.tfd-editor-body .tfd-mobile-dock>nav>.tfd-btn,.tfd-editor-body .tfd-rev-finish-btn,.tfd-editor-body .tfd-rev-filters button,.tfd-editor-body .tfd-rev-view button{background:var(--tfd-ui-control,#383d40)!important;color:var(--tfd-ui-ink,#f1f1ee)!important;border-color:var(--tfd-ui-control-border,#565e61)!important}
.tfd-editor-body input:not([type=color]):not([type=range]):not([type=checkbox]):not([type=radio]),.tfd-editor-body select,.tfd-editor-body textarea{background:#34393c;color:#f4f4ef;border-color:var(--tfd-ui-control-border,#626b6e);color-scheme:dark}
.tfd-editor-body .tfd-head-btn,.tfd-editor-body .tfd-head-cancel,.tfd-editor-body .tfd-head-title,.tfd-editor-body .tfd-head button:not(.tfd-head-done),.tfd-editor-body .tfd-rev-summary strong,.tfd-editor-body .tfd-preview-status,.tfd-editor-body .tfd-inspector-empty,.tfd-editor-body .tfd-layer-name,.tfd-editor-body .tfd-hint{color:#e1e5e3}
.tfd-editor-body .tfd-btn[aria-pressed=true],.tfd-editor-body .tfd-btn.is-active,.tfd-editor-body .tfd-rev-finish-btn.is-active,.tfd-editor-body .tfd-rev-filters .is-active,.tfd-editor-body .tfd-rev-view button[aria-pressed=true]{background:#685435!important;border-color:#c6974a!important;color:#fff6df!important}
.tfd-editor-body .tfd-hint{background:transparent}
.tfd-editor-body .tfd-stage .canvas-container{background:#fff;color-scheme:light}
.tfd-editor-body .tfd-product-preview canvas{background:var(--tfd-ui-background,#202224)}
.tfd-editor-body .tfd-mobile-dock>.tfd-layers:after{background:var(--tfd-ui-surface,#303437);border-color:var(--tfd-ui-border,#464b4e)}
.tfd-editor-body.tfd-no-3d [data-tfd=product-preview],.tfd-editor-body.tfd-no-3d [data-mobile-mode=preview]{display:none!important}
.tfd-editor-body.tfd-no-3d .tfd-mobile-dock>nav{grid-template-columns:repeat(3,minmax(0,1fr))}
.tfd-editor-body .tfd-safe-notice[hidden]{display:none!important}

.tfd-editor-body .tfd-layers,.tfd-editor-body .tfd-layers-list,.tfd-editor-body .tfd-inspector>.tfd-layers .tfd-layers-head{background:var(--tfd-ui-surface,#303437);color:var(--tfd-ui-ink,#eceeed);border-color:var(--tfd-ui-border,#464b4e)}
.tfd-editor-body .tfd-layer{border-color:var(--tfd-ui-border,#464b4e)}.tfd-editor-body .tfd-layer.is-active{background:#514736}.tfd-editor-body .tfd-layer-btn,.tfd-editor-body .tfd-layer-lock-btn{background:var(--tfd-ui-control,#383d40);color:var(--tfd-ui-ink,#eceeed);border-color:var(--tfd-ui-control-border,#565e61)}.tfd-editor-body .tfd-layer-op-label{color:var(--tfd-ui-muted,#c5ccc8)}
.tfd-editor-body .tfd-rev-qty button{background:var(--tfd-ui-control,#383d40);color:var(--tfd-ui-ink,#f1f1ee);border-color:var(--tfd-ui-control-border,#626b6e)}

/* Complete the charcoal UI theme for template dialogs and option panels.
   Known inline JS colors need priority; artwork, canvas and color swatches retain their colors. */
.tfd-editor-body .tfd-model-text-dialog {
  background:var(--tfd-ui-panel,#292c2f)!important;color:var(--tfd-ui-ink,#eceeed)!important;border-color:var(--tfd-ui-control-border,#626b6e)!important;
}
.tfd-editor-body .tfd-model-text-dialog input[data-field] {
  background:#34393c!important;color:#f4f4ef!important;border-color:var(--tfd-ui-control-border,#626b6e)!important;
}
.tfd-editor-body .tfd-model-text-dialog [aria-label="Resultados de Spotify"]>div {border-color:var(--tfd-ui-control-border,#626b6e)!important}
.tfd-editor-body .tfd-model-text-dialog [aria-label="Resultados de Spotify"] button {
  background:var(--tfd-ui-control,#383d40)!important;color:var(--tfd-ui-ink,#f1f1ee)!important;
}
.tfd-editor-body .tfd-model-text-dialog [aria-label="Resultados de Spotify"] small,
.tfd-editor-body .tfd-model-text-dialog [role="status"] {
  color:#e9c38c!important;
}
.tfd-editor-body .tfd-model-text-dialog [aria-label="Resultados de Spotify"] a {
  color:#ffd08a!important;
}
.tfd-editor-body .tfd-shape-picker {
  background:var(--tfd-ui-panel,#292c2f);color:var(--tfd-ui-ink,#eceeed);border-color:var(--tfd-ui-control-border,#626b6e);
}
.tfd-editor-body .tfd-shape-heading h2 {color:var(--tfd-ui-ink,#eceeed)}
.tfd-editor-body .tfd-shape-heading p {color:var(--tfd-ui-muted,#c5ccc8)}
.tfd-editor-body .tfd-shape-choice {
  background:var(--tfd-ui-control,#383d40);color:var(--tfd-ui-ink,#f1f1ee);border-color:var(--tfd-ui-control-border,#626b6e);
}
.tfd-editor-body .tfd-shape-choice:hover {
  background:#514736;border-color:#c6974a;
}
.tfd-editor-body .tf-piece-picker,
.tfd-editor-body .tf-dimension-picker,
.tfd-editor-body .tf-pack-picker {
  background:var(--tfd-ui-panel,#292c2f)!important;color:var(--tfd-ui-ink,#eceeed);border-color:var(--tfd-ui-border,#464b4e)!important;
}
.tfd-editor-body .tf-piece-picker select,
.tfd-editor-body .tf-dimension-picker select,
.tfd-editor-body .tf-pack-picker select {
  background:#34393c!important;color:#f4f4ef;border-color:var(--tfd-ui-control-border,#626b6e)!important;
}
.tfd-editor-body .tfd-canvas-area>.tfd-safe-notice {
  background:#452e2c;color:#ffd5cf;border-color:#82534d;
}
.tfd-editor-body .tfd-safe-notice:before {color:#ffb4a9}
.tfd-editor-body .tfd-fine-adjust>span,
.tfd-editor-body .tfd-mobile-summary {color:#e1e5e3}
.tfd-editor-body .tfd-bottom {background:var(--tfd-ui-panel,#292c2f)}
/* Pack helper is a UI span emitted with inline color:#555. */
.tfd-editor-body .tf-pack-picker>span:first-child {color:var(--tfd-ui-muted,#c5ccc8)!important}

.tfd-editor-body .tfd-rev-empty p,.tfd-editor-body .tfd-rev-finish-lbl{color:var(--tfd-ui-muted,#c5ccc8)}

/* Distinguish selecting photos from completing the batch. */
.tfd-editor-body .tfd-mode-revelado [data-tfd="rev-add"]{background:#383d40!important;color:#f1f1ee!important;border:1px solid #697276!important;box-shadow:none}
.tfd-editor-body .tfd-mode-revelado [data-tfd="rev-commit"]{background:#ffad24!important;color:#2d2030!important;border:1px solid #ffad24!important;font-weight:700;min-height:48px;box-shadow:0 0 0 2px #ffad2460}
.tfd-editor-body .tfd-mode-revelado:not(.tfd-rev-is-empty):not(.tfd-busy) [data-tfd="rev-commit"]{animation:tfd-cart-emphasis 2.4s ease-in-out infinite}
@keyframes tfd-cart-emphasis{0%,100%{filter:brightness(.8) saturate(1.2);box-shadow:0 0 0 2px #ffad2440}50%{filter:brightness(1.13) saturate(1.5);box-shadow:0 0 0 5px #ff9c2480,0 0 18px #ff9c2470}}
.tfd-editor-body .tfd-mode-revelado [data-tfd="rev-commit"]:is(:hover,:focus-visible){animation:none;filter:none;outline:2px solid #ffe3bd;outline-offset:3px}
@media(prefers-reduced-motion:reduce){.tfd-editor-body .tfd-mode-revelado [data-tfd="rev-commit"]{animation:none!important}}

/* All adjustment surfaces use the editor palette; printable paper is untouched. */
.tfd-editor-body .tfd-imgopts,.tfd-editor-body .tfd-textopts,.tfd-editor-body .tfd-shapeopts,.tfd-editor-body .tfd-shadow-panel{
 background:var(--tfd-ui-panel,#292c2f);color:var(--tfd-ui-ink,#eceeed);border-color:var(--tfd-ui-border,#464b4e)
}
.tfd-editor-body .tfd-imgopts label,.tfd-editor-body .tfd-textopts label,.tfd-editor-body .tfd-shapeopts label,.tfd-editor-body .tfd-fine-adjust>span{color:var(--tfd-ui-muted,#c5ccc8)}
.tfd-editor-body .tfd-imgopts .tfd-fine-adjust,.tfd-editor-body .tfd-textopts .tfd-fine-adjust,.tfd-editor-body .tfd-shapeopts .tfd-fine-adjust{border-color:var(--tfd-ui-border,#464b4e)}
.tfd-editor-body textarea[data-tfd="tx-content"]{background:var(--tfd-ui-control,#383d40)!important;color:var(--tfd-ui-ink,#eceeed)!important;border-color:var(--tfd-ui-control-border,#565e61)!important}

/* Photo-only controls for document products. Other editors retain their tools. */
.tfd-document-only .tfd-layers,.tfd-document-only .tfd-textbar,.tfd-document-only .tfd-textopts,.tfd-document-only .tfd-shapeopts,.tfd-document-only .tfd-imgopts .tfd-opt-group,.tfd-document-only [data-tfd="img-flip"],.tfd-document-only [data-tfd="duplicate"],.tfd-document-only [data-tfd="layers"],.tfd-document-only [data-tfd="add-text"],.tfd-document-only [data-tfd="add-shape"],.tfd-document-only [data-tfd="remove"],.tfd-document-only [data-tfd="undo"],.tfd-document-only [data-tfd="redo"]{display:none!important}
.tfd-document-only .tfd-inspector-empty{color:var(--tfd-ui-muted);line-height:1.5}.tfd-document-only .tfd-document-guide-note{margin:0;padding:8px 14px;background:#19383e;color:#def5f3;text-align:center;font-size:12px;line-height:1.5;flex:none}.tfd-document-only .tfd-imgopts{gap:9px}.tfd-document-only .tfd-dock-heading .tfd-history-btn{display:none}

.tfd-document-zoom{display:grid;grid-template-columns:1fr 72px 18px;gap:8px;align-items:center;flex-basis:100%;padding:8px 0}.tfd-document-zoom label{grid-column:1/-1;color:var(--tfd-ui-ink);font-size:13px}.tfd-document-zoom input[type=range]{width:100%;min-width:0;accent-color:#ffcb83}.tfd-document-zoom input[type=number]{width:72px;padding:8px;background:var(--tfd-ui-panel);color:var(--tfd-ui-ink);border:1px solid var(--tfd-ui-border);border-radius:6px}

/* Mobile photo review: controls live in a native modal, leaving the photos visible. */
.tfd-rev-overview{display:contents}
.tfd-rev-settings-toggle[hidden],.tfd-rev-settings:not([open]){display:none!important}
.tfd-rev-borderbulk{display:flex;gap:8px;flex-wrap:wrap}
.tfd-rev-borderbulk select{min-width:0;flex:1}
.tfd-rev-settings-open{overflow:hidden}
@media(max-width:599px){
  .tfd-editor-body .tfd-rev-compact .tfd-rev-overview{display:flex;gap:8px;align-items:center;margin-bottom:8px}
  .tfd-editor-body .tfd-rev-compact .tfd-rev-summary{flex:1;min-width:0;margin:0;padding:8px 0;background:none!important;font-size:14px}
  .tfd-editor-body .tfd-rev-settings-toggle{flex:none;min-height:44px;padding:0 12px;border:1px solid var(--tfd-ui-control-border,#626b6e);border-radius:8px;background:var(--tfd-ui-control,#383d40);color:var(--tfd-ui-ink,#f1f1ee);font-size:14px}
  .tfd-editor-body .tfd-rev-compact .tfd-rev-tiernote{margin:0 0 8px;padding:0;border:0;border-radius:0;background:none!important;color:var(--tfd-ui-muted,#c5ccc8)!important;font-size:12px;line-height:1.4}
  .tfd-editor-body .tfd-rev-compact .tfd-rev-bottombar{padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px));gap:0}
  .tfd-editor-body .tfd-rev-compact .tfd-rev-bottombar>.tfd-btn{width:100%;min-height:48px;margin:0}
  .tfd-editor-body .tfd-rev-settings[open]{box-sizing:border-box;position:fixed;inset:auto 0 0;width:100%;max-width:100%;max-height:85vh;max-height:85dvh;margin:0;padding:0;border:1px solid var(--tfd-ui-border,#626b6e);border-bottom:0;border-radius:18px 18px 0 0;background:var(--tfd-ui-panel,#292c2f);color:var(--tfd-ui-ink,#f1f1ee);display:flex;flex-direction:column;overflow:hidden}
  .tfd-rev-settings::backdrop{background:rgba(0,0,0,.65)}
  .tfd-rev-settings-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;border-bottom:1px solid var(--tfd-ui-border,#626b6e)}
  .tfd-editor-body .tfd-rev-settings-heading h2{font-size:18px;color:inherit;margin:0}
  .tfd-rev-settings-content{padding:16px 16px calc(16px + env(safe-area-inset-bottom,0px));overflow:auto;overscroll-behavior:contain;min-height:0}
  .tfd-rev-settings-content [hidden]{display:none!important}
  .tfd-editor-body .tfd-rev-settings .tfd-rev-options{flex-direction:column;align-items:stretch;gap:16px;margin:0 0 20px}
  .tfd-editor-body .tfd-rev-settings .tfd-rev-view{display:flex;margin:0;gap:8px;align-items:center}
  .tfd-rev-settings .tfd-rev-view:before{content:'Fotos por fila';margin-right:auto;font-size:14px}
  .tfd-editor-body .tfd-rev-settings .tfd-rev-finish{flex-wrap:wrap;gap:12px}
  .tfd-rev-settings-bulk,.tfd-rev-settings-border{margin-bottom:20px}
  .tfd-rev-settings-content label{display:block;margin-bottom:8px;font-size:14px;font-weight:600}
  .tfd-editor-body .tfd-rev-settings .tfd-rev-bulk,.tfd-editor-body .tfd-rev-settings .tfd-rev-borderbulk{display:flex;flex-direction:column;align-items:stretch;gap:8px;margin:0}
  .tfd-editor-body .tfd-rev-settings button,.tfd-editor-body .tfd-rev-settings select{box-sizing:border-box;min-height:44px;font-size:14px}
  .tfd-editor-body .tfd-rev-settings select{width:100%;padding:8px 12px;border:1px solid var(--tfd-ui-control-border,#626b6e);border-radius:8px;background:var(--tfd-ui-control,#383d40);color:var(--tfd-ui-ink,#f1f1ee)}
  .tfd-editor-body .tfd-rev-settings .tfd-btn{background:var(--tfd-ui-control,#383d40);color:var(--tfd-ui-ink,#f1f1ee);border:1px solid var(--tfd-ui-control-border,#626b6e);border-radius:8px;padding:8px 12px}
  .tfd-rev-settings-status{font-size:13px;line-height:1.5;color:var(--tfd-ui-muted,#c5ccc8);margin:0 0 16px}
  .tfd-rev-settings-help>summary{padding:12px 0;cursor:pointer;min-height:44px;box-sizing:border-box}
  .tfd-editor-body .tfd-rev-settings .tfd-rev-help{display:block!important;margin:0;font-size:13px}
  .tfd-rev-settings :focus-visible,.tfd-rev-settings-toggle:focus-visible{outline:3px solid var(--tfd-ui-accent,#f4c95d);outline-offset:2px}
}

/* UI only: Fabric objects, print backgrounds and 3D artwork never use these tokens. */
#tfd-crop-warning{box-sizing:border-box;width:min(620px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto;padding:clamp(22px,4vw,38px);border:2px solid var(--tfd-ui-notice-accent,#a52e27);border-radius:18px;background:var(--tfd-ui-notice-background,#fff8f6);color:var(--tfd-ui-notice-ink,#321b19);box-shadow:0 20px 90px #0009;font-family:system-ui,sans-serif;color-scheme:light}
#tfd-crop-warning::backdrop{background:rgba(0,0,0,.82)}
#tfd-crop-warning h2{margin:0 0 22px;color:var(--tfd-ui-notice-accent,#a52e27);font-size:clamp(25px,5vw,34px);line-height:1.15}
#tfd-crop-warning p{font-size:clamp(17px,3.8vw,20px);line-height:1.5;margin:0 0 16px;white-space:pre-line}
#tfd-crop-warning button{display:block;width:100%;margin-top:24px;padding:16px 18px;border:0;border-radius:10px;background:var(--tfd-ui-notice-accent,#a52e27);color:var(--tfd-ui-notice-button-ink,#fff);font:700 17px/1.35 system-ui,sans-serif;cursor:pointer}
#tfd-crop-warning button:focus-visible{outline:3px solid var(--tfd-ui-notice-ink,#321b19);outline-offset:4px}
.tfd-editor-body .tfd-head-done,.tfd-editor-body .tfd-btn--primary{background:var(--tfd-ui-accent,#E8A33D)!important;color:var(--tfd-ui-accent-ink,#1f1f1f)!important}

