/* EL TUTORIAL GUIADO (09/11/2026). Ver estaticos/tutorial-guiado.js.
   Todo cuelga de #tutorial-guiado para no pisar nada de estilo.css. */
#tutorial-guiado {
  position: fixed; inset: 0; z-index: 2147482000;
  font-family: Inter, system-ui, sans-serif;
  pointer-events: none;
}
/* El oscurecido lo hace la sombra del foco: un único agujero, con las
   esquinas redondeadas y una transición al pasar de un trozo a otro. */
#tutorial-guiado .tg-foco {
  position: fixed; border-radius: 14px;
  box-shadow: 0 0 0 200vmax rgba(4, 22, 17, .74);
  transition: left .28s ease, top .28s ease, width .28s ease, height .28s ease;
  pointer-events: none;
}
#tutorial-guiado.tg-centro .tg-foco { box-shadow: 0 0 0 200vmax rgba(4, 22, 17, .82); }
/* En los pasos de «toca», un anillo que late alrededor de lo que hay que pulsar. */
#tutorial-guiado .tg-pulso {
  position: absolute; inset: -3px; border-radius: 16px;
  border: 2px solid #ffc24b; opacity: 0;
}
#tutorial-guiado.tg-toca .tg-pulso { animation: tg-late 1.6s ease-out infinite; }
@keyframes tg-late {
  0% { opacity: .95; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.06); }
}
#tutorial-guiado .tg-bloq { position: fixed; pointer-events: auto; background: transparent; }

#tutorial-guiado .tg-globo {
  position: fixed; pointer-events: auto;
  width: min(360px, calc(100vw - 24px));
  background: #fff; color: #0a3b2e;
  border-radius: 18px; padding: 14px 16px 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .28);
  transition: left .28s ease, top .28s ease;
}
#tutorial-guiado .tg-cab {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: #5b7069; min-height: 18px;
}
#tutorial-guiado .tg-salir {
  all: unset; cursor: pointer; font-size: 12.5px; color: #5b7069;
  padding: 2px 4px; border-radius: 6px;
}
#tutorial-guiado .tg-salir:focus-visible { outline: 2px solid #12b76a; }
#tutorial-guiado .tg-barra {
  height: 3px; background: #e6efeb; border-radius: 3px; margin: 8px 0 10px; overflow: hidden;
}
#tutorial-guiado .tg-barra i {
  display: block; height: 100%; background: #12b76a; border-radius: 3px;
  transition: width .3s ease;
}
#tutorial-guiado .tg-tit {
  font-family: Sora, Inter, sans-serif; font-weight: 700;
  font-size: 17px; line-height: 1.25; margin: 0 0 4px; color: #0a3b2e;
}
#tutorial-guiado .tg-txt { font-size: 14.5px; line-height: 1.45; margin: 0; color: #24433a; }
#tutorial-guiado .tg-txt b { color: #0a3b2e; }
#tutorial-guiado .tg-pie {
  display: flex; align-items: center; gap: 8px; margin-top: 12px;
}
#tutorial-guiado .tg-pista {
  flex: 1; font-size: 13px; font-weight: 600; color: #c47a12;
}
#tutorial-guiado .tg-atras,
#tutorial-guiado .tg-sig {
  all: unset; cursor: pointer; font-size: 14px; font-weight: 600;
  padding: 9px 14px; border-radius: 999px;
}
#tutorial-guiado .tg-atras { color: #0a3b2e; background: #eef5f2; }
#tutorial-guiado .tg-sig { color: #fff; background: #0a7a4f; }
#tutorial-guiado .tg-atras:focus-visible,
#tutorial-guiado .tg-sig:focus-visible { outline: 2px solid #ffc24b; outline-offset: 2px; }
#tutorial-guiado .tg-oculto { display: none; }
#tutorial-guiado.tg-centro .tg-globo { text-align: left; padding: 20px 20px 16px; }
#tutorial-guiado.tg-centro .tg-tit { font-size: 20px; }
/* Tema oscuro: el mismo selector que usa estilo.css. */
html[data-theme="dark"] #tutorial-guiado .tg-globo { background: #12231e; }
html[data-theme="dark"] #tutorial-guiado .tg-tit,
html[data-theme="dark"] #tutorial-guiado .tg-txt b { color: #e9fbf2; }
html[data-theme="dark"] #tutorial-guiado .tg-txt { color: #b9d3ca; }
html[data-theme="dark"] #tutorial-guiado .tg-atras { color: #e9fbf2; background: #1d3330; }

@media (prefers-reduced-motion: reduce) {
  #tutorial-guiado .tg-foco, #tutorial-guiado .tg-globo,
  #tutorial-guiado .tg-barra i { transition: none; }
  #tutorial-guiado.tg-toca .tg-pulso { animation: none; opacity: .9; }
}

/* LOS EJEMPLOS DE PREMIUM (cuenta básica): un dibujo pequeño con su sello. */
#tutorial-guiado .tg-ejemplo {
  position: relative; margin-top: 10px; padding: 10px 10px 8px;
  background: #f4f8f6; border: 1px solid #e1ebe6; border-radius: 12px;
}
#tutorial-guiado .tg-ejemplo svg { display: block; width: 100%; height: auto; }
#tutorial-guiado .tg-sello {
  position: absolute; top: -9px; right: 10px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #8a5a00; background: #ffe7b3; border-radius: 999px; padding: 2px 8px;
}
#tutorial-guiado .tg-ej-pie { font-size: 12.5px; line-height: 1.4; color: #3d5a51; margin: 6px 0 0; }
#tutorial-guiado .tg-otro {
  all: unset; cursor: pointer; font-size: 14px; font-weight: 600;
  padding: 9px 12px; border-radius: 999px; color: #8a5a00; background: #ffe7b3;
}
#tutorial-guiado .tg-otro:focus-visible { outline: 2px solid #12b76a; outline-offset: 2px; }
#tutorial-guiado .tg-otro.tg-oculto { display: none; }
html[data-theme="dark"] #tutorial-guiado .tg-ejemplo { background: #0d1a16; border-color: #22352f; }
html[data-theme="dark"] #tutorial-guiado .tg-ej-pie { color: #b9d3ca; }
