/* Tedy Rasca Regalos Front */
:root{
  --tedy-gold:#d9a441;
  --tedy-dark:#0ea5e9;
  --tedy-soft:#fff7e8;
}
.tedy-r-fullscreen{
  margin:0!important;
  background:#0c0c0c;
}
.tedy-r-public-page{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  box-sizing:border-box;
  background:radial-gradient(circle at top,#2b2114,#050505 70%);
}
.tedy-r-shell{
  max-width:760px;
  margin:24px auto;
  padding:20px;
  border-radius:22px;
  background:#fff;
  box-shadow:0 20px 60px rgba(0,0,0,.15);
}
.tedy-r-shell h2{margin:0 0 8px;font-size:28px}
.tedy-r-muted{color:#666;margin-top:0}
.tedy-r-step{margin:16px 0}
.tedy-r-step label{display:block;font-weight:700;margin-bottom:7px}
.tedy-r-step input,
.tedy-r-step textarea,
.tedy-r-step select{
  width:100%;
  box-sizing:border-box;
  border:1px solid #ddd;
  border-radius:13px;
  padding:12px;
  font-size:16px;
}
.tedy-r-step textarea{min-height:76px;resize:vertical}
.tedy-r-hp{position:absolute!important;left:-99999px!important;opacity:0!important}
.tedy-r-btn{
  border:0;
  border-radius:999px;
  background:#222;
  color:#fff;
  padding:11px 18px;
  font-size:15px;
  font-weight:700;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.tedy-r-btn:disabled{opacity:.45;cursor:not-allowed}
.tedy-r-primary{background:linear-gradient(135deg,#0ea5e9,#5b3b12,#d9a441);width:100%;font-size:17px;padding:15px}
.tedy-r-template-selected{
  margin-top:10px;
  font-size:14px;
  color:#333;
}
.tedy-r-preview-wrap{margin:20px 0}
.tedy-r-preview-card{
  position:relative;
  width:min(320px,100%);
  aspect-ratio:9/16;
  margin:auto;
  background:#eee;
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 14px 45px rgba(0,0,0,.2);
}
.tedy-r-preview-bg{
  position:absolute;inset:0;
  background-size:cover;
  background-position:center;
}
.tedy-r-preview-main,
.tedy-r-preview-secondary{
  position:absolute;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:10px;
  box-sizing:border-box;
  color:#5b3515;
  text-shadow:0 2px 10px rgba(255,255,255,.65);
  white-space:pre-wrap;
}
.tedy-r-preview-main{
  left:12.96%;
  top:33.85%;
  width:74.07%;
  height:22.39%;
  font-family:Georgia, "Times New Roman", serif;
  font-size:clamp(22px,6.3vw,38px);
  line-height:1.08;
  font-weight:700;
}
.tedy-r-preview-secondary{
  left:13.89%;
  top:59.38%;
  width:72.22%;
  height:15.63%;
  font-family:Arial, sans-serif;
  font-size:clamp(14px,3.4vw,22px);
  line-height:1.22;
}
.tedy-r-modal{
  display:none;
  position:fixed;
  inset:0;
  z-index:999999;
  background:rgba(0,0,0,.72);
  padding:20px;
  box-sizing:border-box;
}
.tedy-r-modal.is-open{display:flex;align-items:center;justify-content:center}
.tedy-r-modal-panel{
  width:min(980px,100%);
  max-height:88vh;
  overflow:auto;
  background:#fff;
  border-radius:22px;
  padding:18px;
  position:relative;
}
.tedy-r-modal-close{
  position:absolute;
  right:14px;
  top:10px;
  border:0;
  background:#0ea5e9;
  color:#fff;
  width:34px;
  height:34px;
  border-radius:50%;
  font-size:22px;
  cursor:pointer;
}
.tedy-r-template-filters{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:12px 0;
}
.tedy-r-template-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(130px,1fr));
  gap:12px;
}
.tedy-r-template-card{
  border:2px solid transparent;
  border-radius:16px;
  overflow:hidden;
  background:#f7f7f7;
  cursor:pointer;
  padding:0;
  text-align:left;
}
.tedy-r-template-card:hover,
.tedy-r-template-card.is-selected{border-color:var(--tedy-gold)}
.tedy-r-template-card img{
  width:100%;
  aspect-ratio:9/16;
  object-fit:cover;
  display:block;
}
.tedy-r-template-card strong{
  display:block;
  padding:7px 8px 0;
  font-size:13px;
}
.tedy-r-template-card small{
  display:block;
  padding:0 8px 8px;
  color:#666;
  font-size:11px;
}
.tedy-r-card-wrap{
  width:min(430px,100%);
  margin:0 auto;
}
.tedy-r-card{
  position:relative;
  width:100%;
  aspect-ratio:9/16;
  overflow:hidden;
  border-radius:24px;
  background:#0ea5e9;
  box-shadow:0 18px 70px rgba(0,0,0,.55);
  user-select:none;
  touch-action:none;
}
.tedy-r-card-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
}
.tedy-r-card-text{
  position:absolute;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:10px;
  box-sizing:border-box;
  white-space:pre-wrap;
  z-index:2;
}
.tedy-r-card-main{
  color:#5b3515;
  font-family:Georgia,"Times New Roman",serif;
  font-size:clamp(28px,8vw,48px);
  font-weight:800;
  line-height:1.05;
  text-shadow:0 2px 12px rgba(255,255,255,.82),0 2px 2px rgba(0,0,0,.08);
}
.tedy-r-card-secondary{
  color:#3a2a1a;
  font-family:Arial,sans-serif;
  font-size:clamp(16px,4.2vw,25px);
  font-weight:600;
  line-height:1.22;
  text-shadow:0 2px 10px rgba(255,255,255,.75);
}
.tedy-r-scratch{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:6;
  cursor:crosshair;
}
.tedy-r-progress{
  position:absolute;
  left:18px;
  right:18px;
  bottom:16px;
  height:7px;
  border-radius:999px;
  background:rgba(255,255,255,.25);
  z-index:7;
  overflow:hidden;
}
.tedy-r-progress span{
  display:block;
  height:100%;
  width:0%;
  background:linear-gradient(90deg,#fff,#d9a441);
  border-radius:999px;
}
.tedy-r-actions{
  display:flex;
  justify-content:center;
  gap:10px;
  margin:14px 0;
}
.tedy-r-complete{
  text-align:center;
  background:#fff;
  border-radius:16px;
  padding:12px;
  box-shadow:0 6px 25px rgba(0,0,0,.14);
}
.tedy-r-complete audio{width:100%;margin-top:8px}
.tedy-r-result{
  margin-top:14px;
}
.tedy-r-result .tedy-r-link{
  display:block;
  word-break:break-all;
  background:#f7f4ed;
  border-radius:14px;
  padding:12px;
}
.tedy-r-result .tedy-r-whatsapp{
  margin-top:10px;
  display:inline-flex;
  text-decoration:none;
  background:#25D366;
  color:#fff;
  border-radius:999px;
  padding:12px 18px;
  font-weight:800;
}
@media (max-width:560px){
  .tedy-r-shell{margin:0;padding:16px;border-radius:0;box-shadow:none}
  .tedy-r-template-filters{grid-template-columns:1fr}
  .tedy-r-modal{padding:10px}
  .tedy-r-modal-panel{max-height:94vh}
}

/* Panel usuario */
.tedy-r-panel-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:12px;
  border-radius:16px;
  background:#f7f4ed;
  margin-bottom:14px;
}
.tedy-r-tabs{
  display:flex;
  gap:8px;
  margin:12px 0 18px;
}
.tedy-r-tab{
  flex:1;
  border:0;
  border-radius:999px;
  padding:11px 12px;
  background:#eee;
  font-weight:800;
  cursor:pointer;
}
.tedy-r-tab.is-active{
  background:#0ea5e9;
  color:#fff;
}
.tedy-r-tab-panel{display:none}
.tedy-r-tab-panel.is-active{display:block}
.tedy-r-my-cards{
  display:grid;
  gap:12px;
  margin-top:12px;
}
.tedy-r-my-card{
  display:flex;
  gap:12px;
  border:1px solid #eee;
  border-radius:18px;
  padding:10px;
  background:#fff;
  box-shadow:0 8px 24px rgba(0,0,0,.06);
}
.tedy-r-my-card img{
  width:74px;
  aspect-ratio:9/16;
  object-fit:cover;
  border-radius:12px;
  background:#eee;
}
.tedy-r-my-card strong{display:block;font-size:16px}
.tedy-r-my-card p{margin:4px 0;color:#555}
.tedy-r-my-card small{display:block;color:#777;margin-bottom:8px}
.tedy-r-card-actions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.tedy-r-mini-btn{
  border:0;
  text-decoration:none;
  border-radius:999px;
  background:#222;
  color:#fff;
  padding:7px 10px;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.tedy-r-wa{background:#25D366;color:#fff}
.tedy-r-danger{background:#b42318}
.tedy-r-panel-code-wrap{margin-top:12px}

/* v1.4.0 — ajuste automático y robustez texto/canvas */
.tedy-r-card-text,
.tedy-r-preview-main,
.tedy-r-preview-secondary{
  overflow:hidden;
  word-break:normal;
  overflow-wrap:break-word;
}
.tedy-r-card-main,
.tedy-r-preview-main{
  font-size:clamp(22px,7vw,54px);
}
.tedy-r-card-secondary,
.tedy-r-preview-secondary{
  font-size:clamp(14px,4vw,28px);
}
.tedy-r-scratch{
  background:linear-gradient(135deg,#888,#d9d9d9,#777);
}


/* v1.5.2 — corrección crítica:
   El canvas NO puede tener background gris por CSS.
   El gris solo debe existir como píxeles dibujados por JS para que al rascar se borre de verdad.
*/
.tedy-r-scratch{
  background:transparent !important;
}
.tedy-r-card-bg{
  z-index:1;
}
.tedy-r-card-text{
  z-index:3;
}
.tedy-r-scratch{
  z-index:6;
}


/* v1.5.3 — imagen opcional del usuario en creador y rasca */
.tedy-r-small-help{
  margin:6px 0 0;
  color:#666;
  font-size:13px;
}
.tedy-r-preview-user-image{
  position:absolute;
  z-index:2;
  left:5%;
  top:42%;
  width:34%;
  aspect-ratio:1/1;
  cursor:move;
  touch-action:none;
  border:2px dashed rgba(255,255,255,.9);
  border-radius:14px;
  box-shadow:0 8px 22px rgba(0,0,0,.28);
}
.tedy-r-preview-user-image img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  pointer-events:none;
  user-select:none;
}
.tedy-r-user-image-handle{
  position:absolute;
  right:-11px;
  bottom:-11px;
  width:22px;
  height:22px;
  border-radius:50%;
  background:#fff;
  border:3px solid #00a3ff;
  box-shadow:0 4px 10px rgba(0,0,0,.35);
  cursor:nwse-resize;
}
.tedy-r-card-user-image{
  position:absolute;
  z-index:2;
  pointer-events:none;
}
.tedy-r-card-user-image img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}


/* v1.5.4 — alineación exacta, móvil y descarga */
.tedy-r-card{
  isolation:isolate;
  transform:translateZ(0);
}
.tedy-r-card-bg{
  object-fit:cover;
}
.tedy-r-scratch{
  width:100% !important;
  height:100% !important;
  display:block !important;
  inset:0 !important;
}
.tedy-r-download-wrap{
  margin-top:10px;
}
.tedy-r-download-jpg{
  background:linear-gradient(135deg,#2563eb,#1d4ed8,#d9a441);
}
@media(max-width:640px){
  .tedy-r-public-page{
    padding:0;
    align-items:flex-start;
  }
  .tedy-r-card-wrap{
    width:100%;
    max-width:430px;
    padding:10px;
    box-sizing:border-box;
  }
  .tedy-r-card{
    border-radius:20px;
    max-height:calc(100vh - 110px);
    width:auto;
    margin:auto;
  }
  .tedy-r-actions{
    position:sticky;
    bottom:0;
    background:rgba(10,10,10,.75);
    backdrop-filter:blur(8px);
    padding:10px;
    border-radius:16px;
    z-index:20;
  }
  .tedy-r-card-main{
    font-size:clamp(22px,8vw,42px);
  }
  .tedy-r-card-secondary{
    font-size:clamp(14px,4.8vw,24px);
  }
  .tedy-r-shell{
    width:100%;
    box-sizing:border-box;
  }
  .tedy-r-preview-card{
    width:min(300px,92vw);
  }
}
@media(max-width:420px){
  .tedy-r-card-wrap{
    padding:6px;
  }
  .tedy-r-actions{
    gap:6px;
  }
  .tedy-r-btn{
    padding:10px 13px;
    font-size:14px;
  }
}


/* v1.5.5 — sin barra, descarga debajo del rasca y porcentaje real */
.tedy-r-progress{
  display:none !important;
}
.tedy-r-download-wrap{
  text-align:center;
  margin:12px 0 4px;
}
.tedy-r-download-wrap[hidden]{
  display:none !important;
}
.tedy-r-download-jpg{
  width:100%;
  max-width:430px;
  background:linear-gradient(135deg,#2563eb,#1d4ed8,#d9a441);
}
@media(max-width:640px){
  .tedy-r-download-wrap{
    padding:0 10px;
    margin:10px 0 2px;
  }
  .tedy-r-download-jpg{
    max-width:100%;
  }
}


/* v1.5.6 — tarjeta bonita para compartir por WhatsApp */
.tedy-r-share-card-box{
  margin-top:14px;
  padding:14px;
  border-radius:20px;
  background:linear-gradient(180deg,#fffaf0,#eef6ff);
  border:1px solid rgba(7,91,187,.12);
  box-shadow:0 12px 34px rgba(0,0,0,.08);
}
.tedy-r-share-card-box h4{
  margin:0 0 8px;
  font-size:18px;
}
.tedy-r-share-preview{
  width:min(260px,100%);
  aspect-ratio:4/5;
  margin:10px auto;
  border-radius:22px;
  overflow:hidden;
  box-shadow:0 16px 45px rgba(0,0,0,.18);
  background:#2563eb;
}
.tedy-r-share-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.tedy-r-share-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
  margin-top:10px;
}
.tedy-r-share-native{
  background:linear-gradient(135deg,#25D366,#128C7E);
}
.tedy-r-share-download{
  background:linear-gradient(135deg,#2563eb,#1d4ed8);
}
.tedy-r-share-whatsapp{
  text-decoration:none;
  background:#25D366;
  color:#fff;
}
.tedy-r-share-note{
  margin:8px 0 0;
  color:#64748b;
  font-size:13px;
  text-align:center;
}


/* v1.5.7 — sin botones Abrir/Reiniciar y limpieza visual */
.tedy-r-actions{
  display:none !important;
}
.tedy-r-complete{
  margin-top:12px;
}


/* v1.5.8 — anti-parpadeo: nunca mostrar regalo antes de que el rasca esté listo */
.tedy-r-card{
  position:relative;
}
.tedy-r-card::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:999;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 18%),
    linear-gradient(135deg,#8e8e8e,#dddddd 45%,#777777);
  pointer-events:none;
  opacity:1;
  transition:opacity .08s linear;
}
.tedy-r-card.tedy-r-cover-ready::after{
  opacity:0;
  visibility:hidden;
}
.tedy-r-card.tedy-r-revealed::after{
  display:none;
}
/* El canvas sigue siendo transparente por CSS; la capa gris real la pinta JS. */
.tedy-r-scratch{
  background:transparent !important;
}


/* v1.5.9 — datos bonitos para WhatsApp */
.tedy-r-share-details{
  margin:18px 0;
  padding:14px;
  border-radius:20px;
  background:linear-gradient(180deg,#f8fbff,#fff7e8);
  border:1px solid rgba(217,164,65,.25);
}
.tedy-r-share-details h3{
  margin:0 0 10px;
  font-size:18px;
}
.tedy-r-share-details-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
@media(max-width:620px){
  .tedy-r-share-details-grid{
    grid-template-columns:1fr;
    gap:0;
  }
}


/* v1.6.0 — evitar scroll/refresco accidental mientras se rasca en móvil */
html.tedy-r-no-scroll,
body.tedy-r-no-scroll{
  overflow:hidden !important;
  overscroll-behavior:none !important;
  touch-action:none !important;
}
body.tedy-r-fullscreen{
  overscroll-behavior:none;
}
.tedy-r-public-page,
.tedy-r-card-wrap,
.tedy-r-card,
.tedy-r-scratch{
  overscroll-behavior:none;
}
.tedy-r-card,
.tedy-r-scratch{
  touch-action:none !important;
  -ms-touch-action:none !important;
  -webkit-user-select:none;
  user-select:none;
}
.tedy-r-scratch{
  cursor:crosshair;
}


/* v1.6.2 — temporizador audio, edición borrador y listado robusto */
.tedy-r-record-timer{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:92px;
  margin-left:8px;
  padding:7px 10px;
  border-radius:999px;
  background:#2563eb;
  color:#fff;
  font-weight:900;
  font-size:13px;
}
.tedy-r-record-timer[hidden]{
  display:none !important;
}
.tedy-r-record-timer.is-warning{
  background:#b91c1c;
}
.tedy-r-editing-banner{
  margin:12px 0;
  padding:12px 14px;
  border-radius:16px;
  background:#fff7e6;
  border:1px solid rgba(217,164,65,.4);
  color:#3a2a1a;
  font-weight:800;
}
.tedy-r-list-error{
  padding:12px;
  border-radius:14px;
  background:#fff1f2;
  color:#9f1239;
  border:1px solid #fecdd3;
  font-weight:800;
}
.tedy-r-status-pill{
  display:inline-flex;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  background:#e0f2fe;
  color:#075985;
  margin-left:6px;
}
.tedy-r-status-pill.sent{
  background:#dcfce7;
  color:#166534;
}
.tedy-r-card-row .tedy-r-edit-card[disabled]{
  opacity:.45;
  cursor:not-allowed;
}


/* v1.6.5 — textos movibles en el creador y centrado real */
.tedy-r-preview-card{
  position:relative;
}
.tedy-r-preview-text-box{
  position:absolute;
  z-index:8;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:8px;
  border:2px dashed rgba(7,91,187,.75);
  background:rgba(255,255,255,.30);
  color:#2563eb;
  font-weight:900;
  line-height:1.05;
  border-radius:12px;
  cursor:move;
  touch-action:none;
  box-sizing:border-box;
  overflow:hidden;
}
.tedy-r-preview-text-box span{
  width:100%;
  display:block;
  text-align:center;
  pointer-events:none;
  overflow:hidden;
  text-overflow:ellipsis;
}
.tedy-r-preview-secondary-box{
  border-color:rgba(217,164,65,.85);
}
.tedy-r-preview-text-box i{
  position:absolute;
  right:0;
  bottom:0;
  width:22px;
  height:22px;
  background:#075bbb;
  border-radius:10px 0 10px 0;
  cursor:nwse-resize;
}
.tedy-r-preview-secondary-box i{
  background:#d9a441;
}
.tedy-r-card-main,
.tedy-r-card-secondary{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  box-sizing:border-box !important;
  line-height:1.05 !important;
  width:auto;
}
.tedy-r-card-main *,
.tedy-r-card-secondary *{
  text-align:center !important;
}


/* v1.6.6 — el texto movible es el texto real, no una segunda copia */
.tedy-r-preview-text-box{
  display:none !important;
}

.tedy-r-preview-main,
.tedy-r-preview-secondary{
  position:absolute !important;
  z-index:9 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  box-sizing:border-box !important;
  cursor:move !important;
  touch-action:none !important;
  user-select:none !important;
  white-space:normal !important;
  overflow:hidden !important;
  line-height:1.05 !important;
  padding:6px !important;
  border:2px dashed rgba(7,91,187,.55);
  border-radius:12px;
  background:rgba(255,255,255,.10);
}

.tedy-r-preview-secondary{
  border-color:rgba(217,164,65,.70);
}

.tedy-r-preview-main::after,
.tedy-r-preview-secondary::after{
  content:"";
  position:absolute;
  right:0;
  bottom:0;
  width:22px;
  height:22px;
  border-radius:10px 0 10px 0;
  background:#075bbb;
  box-shadow:0 0 0 2px rgba(255,255,255,.75) inset;
  cursor:nwse-resize;
}

.tedy-r-preview-secondary::after{
  background:#d9a441;
}

.tedy-r-preview-main.is-moving,
.tedy-r-preview-secondary.is-moving{
  outline:3px solid rgba(14,165,233,.45);
}

.tedy-r-card-main,
.tedy-r-card-secondary{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  white-space:normal !important;
  overflow:hidden !important;
  word-break:normal !important;
  overflow-wrap:break-word !important;
  box-sizing:border-box !important;
  padding:4px !important;
  line-height:1.05 !important;
}

.tedy-r-card-main{
  font-size:52px;
}

.tedy-r-card-secondary{
  font-size:30px;
}

.tedy-r-card-main span,
.tedy-r-card-secondary span{
  display:block;
  width:100%;
  text-align:center;
}


/* v1.6.7 — edición robusta */
.tedy-r-card-edit.is-loading,
.tedy-r-mini-btn.is-loading{
  opacity:.65;
  pointer-events:none;
}


/* v1.6.8 — reparación nonce edición */
.tedy-r-list-error{
  white-space:normal;
}


/* v1.7.0 — edición completa */
.tedy-r-editing-banner{
  border-left:5px solid #075bbb;
}
.tedy-r-template-preview img[src=""]{
  display:none;
}


/* v1.7.1 — posiciones exactas guardadas */
.tedy-r-card-main,
.tedy-r-card-secondary{
  position:absolute !important;
  transform:none !important;
}


/* v1.7.3 — diagnóstico visual X10THINK */
.tedy-r-debug-box{
  margin:12px 0;
  padding:12px 14px;
  border-radius:14px;
  background:#07111f;
  color:#dbeafe;
  font-size:12px;
  line-height:1.45;
  border:1px solid rgba(217,164,65,.45);
  box-shadow:0 10px 24px rgba(0,0,0,.18);
}
.tedy-r-debug-box strong{
  display:block;
  color:#f6d47a;
  margin-bottom:6px;
  font-size:13px;
}


/* v1.7.4 — edición: plantilla visible e imagen usuario movible */
.tedy-r-preview-card.tedy-r-template-loading{
  background:linear-gradient(135deg,#dbeafe,#f8fafc) !important;
}
.tedy-r-preview-card.tedy-r-template-missing{
  background:#e5e7eb !important;
  min-height:420px;
}
.tedy-r-preview-card.tedy-r-template-missing::before{
  content:"Plantilla no cargada";
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#6b7280;
  font-weight:900;
  z-index:1;
}
.tedy-r-preview-user-image,
[data-user-image-box]{
  cursor:move !important;
  touch-action:none !important;
  z-index:10 !important;
}
.tedy-r-preview-user-image.is-moving,
[data-user-image-box].is-moving{
  outline:3px solid rgba(14,165,233,.65);
}
.tedy-r-user-image-handle{
  pointer-events:none;
}


/* v1.7.5 — edición: plantilla como fondo real y guardado desbloqueado */
.tedy-r-preview-bg{
  background-size:cover !important;
  background-position:center !important;
  background-repeat:no-repeat !important;
}
.tedy-r-preview-card.tedy-r-template-loading{
  background:linear-gradient(135deg,#dbeafe,#f8fafc) !important;
}
.tedy-r-preview-card.tedy-r-template-missing{
  background:#e5e7eb !important;
  min-height:420px;
}
.tedy-r-save-error,
.tedy-r-template-load-error{
  margin:10px 0;
}


/* v1.7.7 — diagnóstico no visible para usuario normal y correo alegre */
.tedy-r-debug-box{
  background:#fff7ed !important;
  color:#334155 !important;
  border:1px solid #fed7aa !important;
  box-shadow:0 8px 20px rgba(15,23,42,.08) !important;
}
.tedy-r-debug-box strong{
  color:#0369a1 !important;
}


/* v1.7.8 — estilo alegre, sin botones negros */
.tedy-r-btn,
.tedy-r-mini-btn,
.tedy-r-card-open,
.tedy-r-card-copy,
.tedy-r-card-edit,
.tedy-r-open-modal,
.tedy-r-create,
.tedy-r-record,
.tedy-r-stop,
.tedy-r-download-jpg,
button.tedy-r-btn,
button.tedy-r-mini-btn,
a.tedy-r-btn,
a.tedy-r-mini-btn{
  background:linear-gradient(135deg,#0ea5e9 0%,#2563eb 48%,#22c55e 100%) !important;
  color:#ffffff !important;
  border:none !important;
  box-shadow:0 10px 24px rgba(14,165,233,.28) !important;
  text-shadow:none !important;
}

.tedy-r-btn:hover,
.tedy-r-mini-btn:hover,
.tedy-r-card-open:hover,
.tedy-r-card-copy:hover,
.tedy-r-card-edit:hover,
.tedy-r-open-modal:hover,
.tedy-r-create:hover,
.tedy-r-record:hover,
.tedy-r-stop:hover,
.tedy-r-download-jpg:hover{
  filter:brightness(1.04) saturate(1.08);
  transform:translateY(-1px);
}

.tedy-r-card-whatsapp,
.tedy-r-whatsapp,
a[href*="wa.me"],
.tedy-r-share-whatsapp{
  background:linear-gradient(135deg,#22c55e,#16a34a) !important;
  color:#ffffff !important;
  box-shadow:0 10px 24px rgba(34,197,94,.25) !important;
}

.tedy-r-card-delete,
.tedy-r-delete,
.tedy-r-card-remove,
.tedy-r-clear-voice,
.tedy-r-clear-user-image{
  background:linear-gradient(135deg,#fb7185,#ef4444) !important;
  color:#ffffff !important;
  box-shadow:0 10px 24px rgba(239,68,68,.22) !important;
}

.tedy-r-panel,
.tedy-r-creator,
.tedy-r-card-item,
.tedy-r-result{
  color:#102033;
}

/* Evita botones negros por clases genéricas heredadas del tema */
[data-tedy-panel] button:not(.tedy-r-card-delete):not(.tedy-r-delete):not(.tedy-r-clear-voice):not(.tedy-r-clear-user-image),
[data-tedy-creator] button:not(.tedy-r-card-delete):not(.tedy-r-delete):not(.tedy-r-clear-voice):not(.tedy-r-clear-user-image){
  background-image:linear-gradient(135deg,#0ea5e9,#2563eb,#22c55e) !important;
  background-color:#0ea5e9 !important;
  color:#fff !important;
  border-color:transparent !important;
}

[data-tedy-panel] a.tedy-r-mini-btn,
[data-tedy-panel] a.tedy-r-btn,
[data-tedy-creator] a.tedy-r-mini-btn,
[data-tedy-creator] a.tedy-r-btn{
  background-image:linear-gradient(135deg,#0ea5e9,#2563eb,#22c55e) !important;
  background-color:#0ea5e9 !important;
  color:#fff !important;
}


/* v1.7.9 — flujo WhatsApp limpio: un solo botón */
.tedy-r-share-download,
.tedy-r-download-invite,
.tedy-r-open-whatsapp-link,
.tedy-r-whatsapp-link,
.tedy-r-invite-download,
a.tedy-r-download-invite,
button.tedy-r-download-invite,
a.tedy-r-open-whatsapp-link,
button.tedy-r-open-whatsapp-link{
  display:none !important;
}

.tedy-r-share-whatsapp,
.tedy-r-card-whatsapp,
.tedy-r-whatsapp,
.tedy-r-send-whatsapp,
a[href*="wa.me"]{
  background:linear-gradient(135deg,#25D366 0%,#128C7E 52%,#0ea5e9 100%) !important;
  color:#ffffff !important;
  border:none !important;
  box-shadow:0 12px 28px rgba(37,211,102,.28) !important;
}


/* v1.8.0 — botones diferenciados y tarjeta WhatsApp más limpia */
.tedy-r-card-actions .tedy-r-mini-btn,
.tedy-r-card-actions .tedy-r-mini-btn:visited{
  color:#fff !important;
  border:none !important;
  box-shadow:0 10px 22px rgba(15,23,42,.14) !important;
}

.tedy-r-card-actions .tedy-r-open{
  background:linear-gradient(135deg,#38bdf8,#2563eb) !important;
}
.tedy-r-card-actions .tedy-r-copy{
  background:linear-gradient(135deg,#a78bfa,#7c3aed) !important;
}
.tedy-r-card-actions .tedy-r-card-whatsapp,
.tedy-r-card-actions .tedy-r-wa{
  background:linear-gradient(135deg,#25D366,#128C7E) !important;
}
.tedy-r-card-actions .tedy-r-card-edit{
  background:linear-gradient(135deg,#fb7185,#f97316) !important;
}
.tedy-r-card-actions .tedy-r-card-delete{
  background:linear-gradient(135deg,#ef4444,#b91c1c) !important;
}

.teda-clean-share{
  background:linear-gradient(180deg,#ffffff,#f8fafc) !important;
  border:1px solid #dbeafe !important;
  border-radius:24px !important;
  box-shadow:0 16px 34px rgba(15,23,42,.08) !important;
  padding:18px !important;
}

.teda-clean-share h4{
  color:#0f172a !important;
  margin-bottom:8px !important;
}
.teda-clean-share p{
  color:#475569 !important;
}
.teda-clean-share .tedy-r-share-preview{
  background:linear-gradient(180deg,#f0fdf4,#eff6ff) !important;
  border-radius:22px !important;
  padding:14px !important;
}
.teda-clean-share .tedy-r-share-preview img{
  border-radius:20px !important;
  box-shadow:0 14px 28px rgba(15,23,42,.10) !important;
}
.teda-clean-share .tedy-r-share-actions .tedy-r-btn{
  background:linear-gradient(135deg,#25D366,#128C7E,#0ea5e9) !important;
}
.teda-clean-share .tedy-r-share-note{
  margin-top:12px !important;
  color:#64748b !important;
  font-size:14px !important;
}
.tedy-r-link{
  display:none !important;
}


/* v1.8.1 — Mis rascas: tarjetas limpias, alegres y modernas */
.tedy-r-my-cards{
  display:grid !important;
  gap:16px !important;
  margin-top:18px !important;
}

.tedy-r-my-card{
  position:relative;
  display:grid !important;
  grid-template-columns:92px 1fr !important;
  gap:14px !important;
  padding:14px !important;
  border:1px solid rgba(14,165,233,.16) !important;
  border-radius:24px !important;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 52%,#f0fdf4 100%) !important;
  box-shadow:0 14px 34px rgba(15,23,42,.08) !important;
  overflow:hidden !important;
}

.tedy-r-my-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:6px;
  background:linear-gradient(180deg,#0ea5e9,#25D366);
}

.tedy-r-my-card.is-sent::before{
  background:linear-gradient(180deg,#25D366,#128C7E);
}

.tedy-r-my-card.is-draft::before{
  background:linear-gradient(180deg,#fb7185,#f97316);
}

.tedy-r-my-card-thumb{
  width:92px;
  align-self:start;
}

.tedy-r-my-card-thumb img,
.tedy-r-my-card > img{
  width:92px !important;
  height:138px !important;
  aspect-ratio:auto !important;
  object-fit:cover !important;
  border-radius:18px !important;
  background:linear-gradient(135deg,#e0f2fe,#f0fdf4) !important;
  box-shadow:0 12px 24px rgba(15,23,42,.12) !important;
}

.tedy-r-thumb-fallback{
  width:92px;
  height:138px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:34px;
  background:linear-gradient(135deg,#e0f2fe,#f0fdf4);
  box-shadow:0 12px 24px rgba(15,23,42,.10);
}

.tedy-r-my-card-body{
  min-width:0;
}

.tedy-r-my-card-head{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:flex-start;
  justify-content:space-between;
  margin-bottom:6px;
}

.tedy-r-my-card strong{
  display:block !important;
  font-size:18px !important;
  line-height:1.18 !important;
  color:#0f172a !important;
  letter-spacing:-.2px;
  margin:0 !important;
  max-width:100%;
}

.tedy-r-card-subtitle,
.tedy-r-my-card p{
  margin:6px 0 !important;
  color:#475569 !important;
  font-size:14px !important;
  line-height:1.35 !important;
}

.tedy-r-card-meta,
.tedy-r-card-date,
.tedy-r-my-card small{
  display:block !important;
  color:#64748b !important;
  font-size:12px !important;
  line-height:1.35 !important;
  margin:4px 0 !important;
}

.tedy-r-status-pill{
  display:inline-flex !important;
  align-items:center;
  gap:4px;
  border-radius:999px !important;
  padding:5px 9px !important;
  font-size:11px !important;
  font-weight:900 !important;
  white-space:nowrap;
  box-shadow:0 6px 14px rgba(15,23,42,.08);
}

.tedy-r-status-pill.draft,
.tedy-r-status-pill:not(.sent){
  background:#fff7ed !important;
  color:#c2410c !important;
  border:1px solid #fed7aa !important;
}

.tedy-r-status-pill.sent{
  background:#dcfce7 !important;
  color:#166534 !important;
  border:1px solid #bbf7d0 !important;
}

.tedy-r-card-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  margin-top:10px !important;
}

.tedy-r-card-actions .tedy-r-mini-btn{
  border:0 !important;
  text-decoration:none !important;
  border-radius:999px !important;
  color:#fff !important;
  padding:9px 12px !important;
  font-size:12px !important;
  font-weight:900 !important;
  cursor:pointer !important;
  line-height:1.1 !important;
  min-height:34px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  box-shadow:0 10px 20px rgba(15,23,42,.12) !important;
}

.tedy-r-card-actions .tedy-r-open{
  background:linear-gradient(135deg,#38bdf8,#2563eb) !important;
}

.tedy-r-card-actions .tedy-r-card-copy,
.tedy-r-card-actions .tedy-r-copy{
  background:linear-gradient(135deg,#a78bfa,#7c3aed) !important;
}

.tedy-r-card-actions .tedy-r-card-whatsapp,
.tedy-r-card-actions .tedy-r-wa{
  background:linear-gradient(135deg,#25D366,#128C7E) !important;
  flex-basis:100%;
}

.tedy-r-card-actions .tedy-r-card-edit{
  background:linear-gradient(135deg,#fb7185,#f97316) !important;
}

.tedy-r-card-actions .tedy-r-card-edit:disabled{
  background:linear-gradient(135deg,#cbd5e1,#94a3b8) !important;
  color:#ffffff !important;
  opacity:.85 !important;
}

.tedy-r-card-actions .tedy-r-card-delete,
.tedy-r-card-actions .tedy-r-danger{
  background:linear-gradient(135deg,#ef4444,#b91c1c) !important;
}

.tedy-r-panel-list > p,
.tedy-r-list-error{
  background:#f8fafc !important;
  border:1px solid #e0f2fe !important;
  color:#334155 !important;
  border-radius:18px !important;
  padding:14px 16px !important;
}

@media(max-width:520px){
  .tedy-r-my-card{
    grid-template-columns:82px 1fr !important;
    gap:12px !important;
    padding:12px !important;
    border-radius:22px !important;
  }

  .tedy-r-my-card-thumb,
  .tedy-r-my-card-thumb img,
  .tedy-r-my-card > img,
  .tedy-r-thumb-fallback{
    width:82px !important;
  }

  .tedy-r-my-card-thumb img,
  .tedy-r-my-card > img,
  .tedy-r-thumb-fallback{
    height:124px !important;
  }

  .tedy-r-my-card strong{
    font-size:16px !important;
  }

  .tedy-r-card-actions .tedy-r-mini-btn{
    padding:8px 10px !important;
    font-size:11px !important;
  }
}


/* v1.8.2 — compartir por WhatsApp con imagen */
.teda-clean-share .tedy-r-share-actions{
  display:flex !important;
  justify-content:center !important;
}
.teda-clean-share .tedy-r-share-actions .tedy-r-btn,
.teda-clean-share .tedy-r-share-actions .tedy-r-share-native{
  min-width:260px !important;
}


/* v1.8.4 — botón lista WhatsApp usa sistema del editor */
.tedy-r-list-wa[disabled]{
  opacity:.75 !important;
  pointer-events:none !important;
}


/* v1.8.5 — final PRO genérico, alegre y espectacular */
.tedy-r-card{
  box-shadow:0 20px 68px rgba(14,165,233,.28), 0 16px 42px rgba(15,23,42,.22);
}
.tedy-r-card.tedy-r-is-revealing{
  animation:tedyRCardPulse .55s ease both;
}
.tedy-r-card.tedy-r-finale-ready,
.tedy-r-card.tedy-r-finale-finished{
  box-shadow:0 0 0 4px rgba(255,255,255,.75), 0 0 0 12px rgba(37,211,102,.15), 0 24px 64px rgba(14,165,233,.30);
}
.tedy-r-complete{
  margin-top:14px;
  position:relative;
  overflow:hidden;
  text-align:center;
  padding:18px 16px 16px;
  border-radius:24px;
  background:linear-gradient(180deg,#ffffff 0%,#f0fdf4 42%,#eff6ff 100%);
  border:1px solid rgba(14,165,233,.14);
  box-shadow:0 18px 42px rgba(14,165,233,.14);
  opacity:0;
  transform:translateY(18px) scale(.985);
  transition:opacity .45s ease, transform .45s ease;
}
.tedy-r-complete.is-visible{
  opacity:1;
  transform:translateY(0) scale(1);
}
.tedy-r-complete::before{
  content:"";
  position:absolute;
  inset:0 auto auto -30%;
  width:55%;
  height:100%;
  background:linear-gradient(115deg,transparent 0%,rgba(255,255,255,.0) 25%,rgba(255,255,255,.65) 50%,rgba(255,255,255,.0) 75%,transparent 100%);
  transform:skewX(-22deg);
  animation:tedyRShine 2.6s ease 1;
  pointer-events:none;
}
.tedy-r-complete-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin-bottom:10px;
  padding:8px 14px;
  border-radius:999px;
  background:linear-gradient(135deg,#2563eb,#22c55e);
  color:#fff;
  font-weight:900;
  letter-spacing:.01em;
  box-shadow:0 10px 24px rgba(37,99,235,.18);
}
.tedy-r-complete h3{
  margin:0 0 6px;
  color:#0f172a;
  font-size:28px;
  line-height:1.08;
}
.tedy-r-complete p{
  margin:0 auto 14px;
  max-width:320px;
  color:#334155;
  font-size:15px;
  line-height:1.45;
}
.tedy-r-complete-download{
  width:100%;
  max-width:370px;
  margin:0 auto 12px;
  display:inline-flex;
  justify-content:center;
  background:linear-gradient(135deg,#25D366 0%,#0ea5e9 54%,#f7c948 100%);
  box-shadow:0 14px 30px rgba(37,211,102,.22);
}
.tedy-r-complete-audio-title{
  margin-top:4px;
  margin-bottom:8px;
  color:#0f172a;
  font-weight:900;
}
.tedy-r-complete audio{
  width:100%;
  margin-top:0;
  border-radius:999px;
}
.tedy-r-download-wrap{display:none !important;}
.tedy-r-confetti-layer{
  position:absolute;
  inset:0;
  overflow:hidden;
  pointer-events:none;
  z-index:12;
}
.tedy-r-confetti-piece{
  position:absolute;
  opacity:.98;
  transform:translate3d(0,0,0) rotate(0deg);
  animation:tedyRConfettiFall 1.8s ease-out forwards;
  will-change:transform,opacity;
}
.tedy-r-confetti-square{border-radius:2px;}
.tedy-r-confetti-dot{border-radius:50%;}
.tedy-r-confetti-bar{border-radius:999px;}
.tedy-r-confetti-glow{
  position:absolute;
  border-radius:50%;
  filter:blur(1px);
  opacity:0;
  animation:tedyRGlow .9s ease-out forwards;
}
.tedy-r-sparkle-sweep{
  position:absolute;
  inset:-10% -45%;
  pointer-events:none;
  z-index:11;
  background:linear-gradient(100deg,transparent 0%,rgba(255,255,255,0) 35%,rgba(255,255,255,.7) 50%,rgba(255,255,255,0) 65%,transparent 100%);
  transform:translateX(-100%) rotate(8deg);
  animation:tedyRSparkleSweep 1.15s ease-out forwards;
}
@keyframes tedyRCardPulse{
  0%{transform:scale(1)}
  40%{transform:scale(1.025)}
  100%{transform:scale(1)}
}
@keyframes tedyRShine{
  0%{transform:translateX(-130%) skewX(-22deg)}
  100%{transform:translateX(320%) skewX(-22deg)}
}
@keyframes tedyRSparkleSweep{
  0%{transform:translateX(-80%) rotate(8deg);opacity:0}
  12%{opacity:1}
  100%{transform:translateX(75%) rotate(8deg);opacity:0}
}
@keyframes tedyRConfettiFall{
  0%{transform:translate3d(0,-12px,0) rotate(0deg);opacity:0}
  10%{opacity:1}
  100%{transform:translate3d(var(--tedy-x),var(--tedy-y),0) rotate(var(--tedy-r));opacity:0}
}
@keyframes tedyRGlow{
  0%{transform:scale(.2);opacity:0}
  35%{opacity:1}
  100%{transform:scale(1.35);opacity:0}
}
@media(max-width:640px){
  .tedy-r-complete{margin:12px 10px 4px;padding:16px 14px 14px;}
  .tedy-r-complete h3{font-size:24px;}
  .tedy-r-complete p{font-size:14px;max-width:100%;}
}


/* v1.8.6 — rasca persistente abierto y estados */
.tedy-r-card.tedy-r-revealed .tedy-r-scratch[hidden],
.tedy-r-scratch[hidden]{
  display:none !important;
}

.tedy-r-status-pill.opened{
  background:#fef3c7 !important;
  color:#92400e !important;
  border:1px solid #fde68a !important;
}

.tedy-r-my-card.is-opened::before{
  background:linear-gradient(180deg,#f7c948,#25D366) !important;
}

.tedy-r-opened-date{
  color:#0f766e !important;
  font-weight:800 !important;
}

.tedy-r-card-actions .tedy-r-reset-opened{
  background:linear-gradient(135deg,#f7c948,#f97316) !important;
  color:#fff !important;
}


/* v1.8.9 — Galería pública de plantillas */
.tedy-r-gallery-page{
  width:min(1180px,100%);
  margin:0 auto;
  padding:18px;
  box-sizing:border-box;
}

.tedy-r-gallery-hero{
  text-align:center;
  border-radius:30px;
  padding:28px 18px;
  background:linear-gradient(135deg,#ecfeff,#ffffff 48%,#f0fdf4);
  border:1px solid rgba(14,165,233,.16);
  box-shadow:0 18px 42px rgba(14,165,233,.10);
  margin-bottom:18px;
}

.tedy-r-gallery-icon{
  width:72px;
  height:72px;
  border-radius:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:38px;
  background:linear-gradient(135deg,#0ea5e9,#25D366);
  box-shadow:0 14px 30px rgba(37,211,102,.20);
  margin-bottom:12px;
}

.tedy-r-gallery-hero h2{
  margin:0 0 8px;
  color:#0f172a;
  font-size:clamp(26px,5vw,42px);
  line-height:1.05;
}

.tedy-r-gallery-hero p{
  margin:0 auto;
  max-width:680px;
  color:#475569;
  font-size:17px;
  line-height:1.45;
}

.tedy-r-gallery-filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
  margin:18px 0;
}

.tedy-r-gallery-filter{
  border:0;
  border-radius:999px;
  padding:10px 15px;
  font-weight:900;
  cursor:pointer;
  color:#0f172a;
  background:#e0f2fe;
  box-shadow:0 8px 18px rgba(14,165,233,.10);
}

.tedy-r-gallery-filter.is-active{
  background:linear-gradient(135deg,#0ea5e9,#25D366);
  color:#fff;
}

.tedy-r-gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
  gap:18px;
}

.tedy-r-gallery-card{
  position:relative;
  overflow:hidden;
  border-radius:26px;
  background:#fff;
  border:1px solid rgba(14,165,233,.14);
  box-shadow:0 16px 36px rgba(15,23,42,.08);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tedy-r-gallery-card:hover,
.tedy-r-gallery-card.is-selected{
  transform:translateY(-3px);
  box-shadow:0 22px 46px rgba(14,165,233,.16);
  border-color:rgba(37,211,102,.36);
}

.tedy-r-gallery-thumb{
  background:linear-gradient(135deg,#e0f2fe,#f0fdf4);
  aspect-ratio:9/13;
  overflow:hidden;
}

.tedy-r-gallery-thumb img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

.tedy-r-gallery-info{
  padding:14px;
}

.tedy-r-gallery-cat{
  display:inline-flex;
  padding:5px 9px;
  border-radius:999px;
  background:#dcfce7;
  color:#166534;
  font-size:12px;
  font-weight:900;
  margin-bottom:8px;
}

.tedy-r-gallery-info h3{
  margin:0 0 5px;
  color:#0f172a;
  font-size:17px;
  line-height:1.15;
}

.tedy-r-gallery-info p{
  margin:0 0 12px;
  color:#64748b;
  font-size:13px;
}

.tedy-r-gallery-use{
  width:100%;
  justify-content:center;
  background:linear-gradient(135deg,#25D366,#0ea5e9) !important;
}

.tedy-r-gallery-creator{
  margin-top:28px;
  scroll-margin-top:20px;
}

.tedy-r-gallery-creator[hidden]{
  display:none !important;
}

.tedy-r-gallery-selected-note{
  margin:0 auto 12px;
  padding:14px 16px;
  border-radius:20px;
  background:linear-gradient(135deg,#f0fdf4,#eff6ff);
  border:1px solid rgba(37,211,102,.22);
  color:#0f172a;
  display:flex;
  flex-wrap:wrap;
  gap:8px 14px;
  align-items:center;
  justify-content:center;
  text-align:center;
}

.tedy-r-gallery-selected-note strong{
  color:#166534;
}

.tedy-r-selected-template-card{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border-radius:18px;
  background:#f8fafc;
  border:1px solid #dbeafe;
}

.tedy-r-selected-template-card img{
  width:54px;
  height:76px;
  object-fit:cover;
  border-radius:12px;
}

.tedy-r-selected-template-card strong{
  display:block;
  color:#0f172a;
}

.tedy-r-selected-template-card span{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:800;
}

.tedy-r-gallery-empty{
  padding:18px;
  border-radius:20px;
  background:#fff7ed;
  color:#9a3412;
  font-weight:900;
  text-align:center;
}

@media(max-width:640px){
  .tedy-r-gallery-page{
    padding:10px;
  }

  .tedy-r-gallery-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }

  .tedy-r-gallery-info{
    padding:10px;
  }

  .tedy-r-gallery-use{
    font-size:12px;
    padding:10px 8px;
  }
}


/* v1.9.1 — ver plantilla en grande */
.tedy-r-gallery-thumb{
  border:0;
  padding:0;
  width:100%;
  display:block;
  position:relative;
  cursor:zoom-in;
}

.tedy-r-gallery-thumb span{
  position:absolute;
  left:50%;
  bottom:10px;
  transform:translateX(-50%);
  display:inline-flex;
  padding:7px 11px;
  border-radius:999px;
  background:rgba(255,255,255,.92);
  color:#0f172a;
  font-size:12px;
  font-weight:900;
  box-shadow:0 8px 18px rgba(15,23,42,.14);
  opacity:0;
  transition:opacity .18s ease, transform .18s ease;
}

.tedy-r-gallery-thumb:hover span{
  opacity:1;
  transform:translateX(-50%) translateY(-2px);
}

.tedy-r-gallery-lightbox[hidden]{
  display:none !important;
}

.tedy-r-gallery-lightbox{
  position:fixed;
  inset:0;
  z-index:99999;
  display:grid;
  place-items:center;
  padding:18px;
}

.tedy-r-gallery-lightbox-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(8px);
}

.tedy-r-gallery-lightbox-panel{
  position:relative;
  z-index:2;
  width:min(520px,94vw);
  max-height:92vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  padding:12px;
  border-radius:28px;
  background:linear-gradient(180deg,#ffffff,#f0fdf4);
  box-shadow:0 28px 80px rgba(0,0,0,.28);
  border:1px solid rgba(255,255,255,.7);
}

.tedy-r-gallery-lightbox-panel img{
  width:auto;
  max-width:100%;
  max-height:76vh;
  object-fit:contain;
  border-radius:20px;
  box-shadow:0 16px 40px rgba(15,23,42,.18);
  background:#fff;
}

.tedy-r-gallery-lightbox-close{
  position:absolute;
  top:-12px;
  right:-8px;
  width:42px;
  height:42px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg,#ef4444,#f97316);
  color:#fff;
  font-size:28px;
  line-height:1;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 12px 24px rgba(239,68,68,.24);
}

.tedy-r-gallery-lightbox-title{
  color:#0f172a;
  font-weight:900;
  text-align:center;
}

body.tedy-r-gallery-lightbox-open{
  overflow:hidden;
}

@media(max-width:640px){
  .tedy-r-gallery-thumb span{
    opacity:1;
    font-size:11px;
    bottom:7px;
    padding:6px 9px;
  }

  .tedy-r-gallery-lightbox{
    padding:10px;
  }

  .tedy-r-gallery-lightbox-panel{
    width:96vw;
    padding:9px;
    border-radius:22px;
  }

  .tedy-r-gallery-lightbox-panel img{
    max-height:78vh;
    border-radius:16px;
  }
}


/* v1.9.3 — galería independiente: asegurar clics reales */
.tedy-r-gallery-use,
.tedy-r-gallery-filter,
.tedy-r-gallery-zoom,
.tedy-r-gallery-lightbox-close,
.tedy-r-gallery-lightbox-backdrop{
  pointer-events:auto !important;
  position:relative;
  z-index:3;
}
.tedy-r-gallery-thumb img,
.tedy-r-gallery-thumb span{
  pointer-events:auto !important;
}
.tedy-r-gallery-creator .tedy-r-creator{
  width:100%;
}


/* v1.9.4 — galería integrada con panel/login */
.tedy-r-gallery-panel-wrap{
  margin-top:28px;
  scroll-margin-top:18px;
}
.tedy-r-gallery-panel-wrap[hidden]{
  display:none !important;
}
.tedy-r-gallery-panel-wrap .tedy-r-panel{
  margin-top:0;
}
.tedy-r-gallery-panel-wrap .tedy-r-shell{
  box-shadow:0 18px 42px rgba(14,165,233,.12);
}
.tedy-r-gallery-card.is-selected{
  outline:4px solid rgba(37,211,102,.28);
  outline-offset:0;
}
