/* Estilos del player de actividad asincrónica (compartido por lexodive-actividad.html
   y por el modo nativo dentro de lexodive.html). Solo clases .act-* (no toca body). */
.act-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}

.act-preview-banner {
  text-align: center;
  font-size: .72rem;
  font-weight: 600;
  color: #fbbf24;
  padding: 8px 12px;
  margin: 0 0 10px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 10px;
  letter-spacing: .02em;
}

.act-wrap--preview .act-main {
  padding-top: 4px;
}

.act-mute {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 40;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.act-mute:hover {
  border-color: rgba(67, 180, 255, 0.5);
}

.act-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 10px;
  flex-wrap: wrap;
}

.act-logo {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #43b4ff;
}

.act-title {
  font-size: .9rem;
  color: #94a3b8;
}

.act-progress {
  font-size: .75rem;
  color: #64748b;
}

.act-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 16px;
}

.act-card {
  width: 100%;
  max-width: 720px;
  position: relative;
}

.act-h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: #f1f5f9;
}

.act-sub {
  color: #94a3b8;
  margin: 0 0 16px;
  font-size: .9rem;
  line-height: 1.5;
}

.act-input {
  width: 100%;
  max-width: 360px;
  padding: 13px 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1rem;
  text-align: center;
  margin: 0 auto 12px;
  display: block;
  font-family: inherit;
}

.act-btn {
  padding: 9px 20px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #43b4ff, #2563eb);
  color: #fff;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  font-family: inherit;
}

.act-btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
}

.act-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.act-nav {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Video vertical 9/16 responsive: lo maneja el ancho, que es el menor entre el ancho
   disponible y el que rinde una altura ~80vh. Así escala con la pantalla sin deformarse. */
.act-media {
  width: min(92vw, calc(80vh * 9 / 16));
  max-width: 100%;
  margin: 0 auto 14px;
  aspect-ratio: 9/16;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.act-media video,
.act-media iframe,
.act-media img {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.act-media--capsule {
  position: relative;
}

.act-media--capsule img {
  object-fit: cover;
  filter: brightness(0.72);
}

.act-media--slideshow {
  overflow: hidden;
}

.act-media--slideshow .act-slideshow-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.72);
  transition: opacity 0.45s ease, transform 0.5s ease;
}

.act-media--color {
  background: linear-gradient(135deg, #1e1b4b, #0f172a);
}

.act-media-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.act-subtitle {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 11;
  min-height: 2.4em;
  max-height: 3.6em;
  overflow: hidden;
  pointer-events: none;
  display: flex;
  align-items: center;
  padding: 0 4%;
  box-sizing: border-box;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 6%, #000 94%, transparent 100%);
}

.act-subtitle--bottom {
  bottom: 10%;
  top: auto;
}

.act-subtitle--middle {
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
}

.act-subtitle--top {
  top: 12%;
  bottom: auto;
}

.act-subtitle--fit {
  justify-content: center;
}

.act-subtitle-inner {
  will-change: transform;
  display: inline-block;
  white-space: nowrap;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.act-subtitle--bloques,
.act-subtitle.subtitle-mode-bloques {
  justify-content: center;
}

.act-subtitle-inner--bloques {
  transform: none !important;
  width: 100%;
  text-align: center;
  white-space: nowrap;
}

.act-subtitle-text--bloques,
#sq-teleprompter.subtitle-chunk-visible,
.subtitle-chunk-visible {
  opacity: 1;
  transition: opacity 0.32s ease;
}

.act-subtitle-text--bloques:not(.subtitle-chunk-visible),
#sq-teleprompter:not(.subtitle-chunk-visible) {
  opacity: 0;
}

.act-subtitle-text {
  display: inline-block;
  font-size: 1em;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-shadow:
    0 0 6px rgba(0, 0, 0, 0.95),
    0 1px 0 #000,
    0 -1px 0 #000,
    1px 0 0 #000,
    -1px 0 0 #000;
}

.act-tp-placa {
  position: absolute;
  left: 5%;
  right: 5%;
  z-index: 11;
  max-height: 28%;
  overflow: hidden;
  pointer-events: none;
  text-align: center;
  box-sizing: border-box;
}

.act-tp-placa--top {
  top: 12%;
  bottom: auto;
}

.act-tp-placa .act-subtitle-text {
  font-size: clamp(0.9rem, 2.8vw, 1.08rem);
}

.act-narr-wrap {
  width: min(92vw, calc(80vh * 9 / 16));
  max-width: 100%;
  margin: -6px auto 14px;
  padding: 0 2px;
  box-sizing: border-box;
}

.act-narr-audio {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.act-card.act-card--quiz {
  max-width: 100%;
}

.act-main--quiz {
  align-items: stretch;
  padding-left: clamp(10px, 2.5vw, 32px);
  padding-right: clamp(10px, 2.5vw, 32px);
}

.act-quiz-full {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 4px 0 8px;
  box-sizing: border-box;
  text-align: center;
}

.act-quiz-meta-head {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #43b4ff;
  margin-bottom: 10px;
}

.act-quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 auto 8px;
  flex-wrap: wrap;
  max-width: min(820px, 96vw);
  width: 100%;
}

.act-quiz-meta-label {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
}

.act-quiz-meta-pts {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  background: rgba(250, 204, 21, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(250, 204, 21, 0.25);
}

.act-quiz-bar {
  width: 100%;
  max-width: min(820px, 96vw);
  height: 6px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.act-quiz-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #43b4ff, #2563eb);
  transition: width .4s ease;
}

.act-quiz-q {
  font-size: clamp(1.1rem, 0.95rem + 1vw, 1.75rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
  margin: 0 auto 16px;
  max-width: min(820px, 96vw);
  text-align: center;
}

.act-quiz-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: min(820px, 96vw);
  margin: 0 auto;
}

.act-quiz-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: clamp(13px, 1.4vw, 20px) clamp(14px, 1.6vw, 22px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: clamp(.95rem, .85rem + .9vw, 1.35rem);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: all .2s ease;
}

.act-quiz-opt:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(67, 180, 255, 0.3);
  background: rgba(67, 180, 255, 0.08);
  color: #e2e8f0;
}

.act-quiz-opt.sel {
  border-color: #43b4ff;
  background: rgba(67, 180, 255, 0.12);
}

.act-quiz-opt-letter {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 800;
}

.act-quiz-opt.ok {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.12);
  color: #a7f3d0;
}

.act-quiz-opt.ok .act-quiz-opt-letter {
  border-color: #34d399;
  background: #34d399;
  color: #052e1a;
}

.act-quiz-opt.bad {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}

.act-quiz-opt.bad .act-quiz-opt-letter {
  border-color: #f87171;
  background: rgba(239, 68, 68, 0.35);
  color: #fff;
}

.act-quiz-opt.done {
  cursor: default;
}

.act-quiz-opt.done:hover {
  transform: none;
}

.act-quiz-fb {
  max-width: min(640px, 96vw);
  margin: 14px auto 0;
  min-height: 1.2em;
  font-size: clamp(.88rem, .8rem + .5vw, 1rem);
  font-weight: 700;
  line-height: 1.5;
}

.act-quiz-fb.ok {
  color: #4ade80;
}

.act-quiz-fb.bad {
  color: #f87171;
}

.act-quiz-fb.hint {
  color: #94a3b8;
  font-weight: 600;
}

.act-meta {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #43b4ff;
  margin-bottom: 8px;
}

.act-placa {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: clamp(16px, 2.2vw, 28px) clamp(18px, 2.5vw, 36px);
  font-size: clamp(1.1rem, 0.95rem + 1.2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.45;
  color: #f8fafc;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: min(500px, 90vw);
  margin: 0 auto;
}

.act-placa-head {
  font-size: clamp(0.75rem, 0.65rem + 0.8vw, 1.05rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: #43b4ff;
  margin: 0 0 10px;
}

/* Contador + barra de avance automático en placas */
.act-placa-timer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.35), transparent);
  pointer-events: none;
}

.act-placa-timer-track {
  flex: 1;
  height: 7px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}

.act-placa-timer-fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #43b4ff, #a855f7);
  box-shadow: 0 0 10px rgba(67, 180, 255, 0.45);
  transition: width 0.1s linear;
}

.act-placa-timer-label {
  flex-shrink: 0;
  min-width: 2.6em;
  font-size: 0.88rem;
  font-weight: 800;
  color: #f1f5f9;
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.act-media--placa {
  overflow: hidden;
}

.act-q {
  font-size: clamp(1.1rem, 0.95rem + 1vw, 1.75rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
  margin: 0 0 16px;
  max-width: min(820px, 92vw);
  margin-left: auto;
  margin-right: auto;
}

.act-opts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(640px, 92vw);
  margin: 0 auto;
}

.act-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: clamp(13px, 1.4vw, 20px) clamp(14px, 1.6vw, 22px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: clamp(.95rem, .85rem + .9vw, 1.35rem);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.act-opt:hover {
  border-color: rgba(67, 180, 255, 0.5);
}

.act-opt.sel {
  border-color: #43b4ff;
  background: rgba(67, 180, 255, 0.12);
}

.act-opt-letter {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .8rem;
}

.act-score {
  font-size: 3rem;
  font-weight: 900;
  color: #fbbf24;
  line-height: 1;
  margin: 10px 0;
}

.act-error {
  color: #f87171;
  font-size: .9rem;
  margin-top: 10px;
}

/* ── Quiz gamificado ──────────────────────────────────────────────────────── */
.act-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto 8px;
  font-size: .78rem;
  font-weight: 700;
}

.act-hud-q {
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .68rem;
}

.act-hud-score {
  color: #fbbf24;
  font-weight: 800;
}

.act-streak {
  color: #fb923c;
  background: rgba(251, 146, 60, 0.14);
  border: 1px solid rgba(251, 146, 60, 0.4);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: .72rem;
  animation: act-pop .3s ease;
}

.act-bar {
  width: 100%;
  max-width: 480px;
  height: 6px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.act-bar>span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #43b4ff, #2563eb);
  transition: width .4s ease;
}

.act-opt.ok {
  border-color: #34d399;
  background: rgba(52, 211, 153, 0.16);
  color: #d1fae5;
}

.act-opt.ok .act-opt-letter {
  border-color: #34d399;
  background: #34d399;
  color: #052e1a;
}

.act-opt.bad {
  border-color: #f87171;
  background: rgba(248, 113, 113, 0.14);
  color: #fee2e2;
}

.act-opt.bad .act-opt-letter {
  border-color: #f87171;
  background: #f87171;
  color: #450a0a;
}

.act-opt.done {
  cursor: default;
}

.act-opt.done:hover {
  border-color: inherit;
}

.act-fb {
  max-width: 480px;
  margin: 14px auto 0;
  font-size: .92rem;
  font-weight: 700;
  min-height: 1.2em;
}

.act-fb.ok {
  color: #34d399;
  animation: act-pop .3s ease;
}

.act-fb.bad {
  color: #fca5a5;
}

.act-fb.hint {
  color: #64748b;
  font-weight: 600;
}

@keyframes act-pop {
  0% {
    transform: scale(.7);
    opacity: 0;
  }

  60% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.act-confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 50;
}

.act-confetti i {
  position: absolute;
  top: -12px;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  opacity: 0;
  animation: act-fall 1s ease-in forwards;
}

@keyframes act-fall {
  0% {
    transform: translateY(0) rotate(0);
    opacity: 1;
  }

  100% {
    transform: translateY(70vh) rotate(540deg);
    opacity: 0;
  }
}

table.act-podium {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  border-collapse: collapse;
  font-size: .88rem;
}

table.act-podium th {
  color: #64748b;
  font-size: .7rem;
  text-transform: uppercase;
  text-align: left;
  padding: 6px 10px;
}

table.act-podium td {
  padding: 7px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

table.act-podium td.score {
  color: #fbbf24;
  font-weight: 800;
  text-align: right;
}

.act-podium .me-row {
  background: rgba(67, 180, 255, 0.1);
}

/* Botones de navegación laterales como flechas en Review (Desktop) */
.act-btn-arrow {
  display: none;
}

.act-placa-text {
  width: 100%;
}

@media (min-width: 580px) {
  .act-placa-text {
    max-width: 88%;
    margin: 0 auto;
  }

  .act-review-nav {
    position: static;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: none;
  }

  .act-review-nav .act-btn-prev {
    position: fixed;
    left: max(6px, env(safe-area-inset-left, 0px));
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    background: rgba(15, 15, 15, 0.88) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
  }

  .act-review-nav .act-btn-prev:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(67, 180, 255, 0.5) !important;
    transform: translateY(-50%) scale(1.05);
  }

  .act-review-nav .act-btn-next {
    position: fixed;
    right: max(6px, env(safe-area-inset-right, 0px));
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    background: rgba(15, 15, 15, 0.88) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
  }

  .act-review-nav .act-btn-next:hover:not(:disabled) {
    transform: translateY(-50%) scale(1.05);
    border-color: rgba(67, 180, 255, 0.5) !important;
  }

  /* Excepción para el botón de comenzar el quiz / ver resultados (mantiene forma de píldora para que quepa el texto) */
  .act-review-nav .act-btn-next.act-btn-start-quiz {
    width: auto;
    height: 44px;
    padding: 0 22px !important;
    border-radius: 999px !important;
    right: max(6px, env(safe-area-inset-right, 0px));
  }

  /* Ocultar/mostrar textos y flechas según corresponda */
  .act-review-nav .act-btn-prev .act-btn-text,
  .act-review-nav .act-btn-next:not(.act-btn-start-quiz) .act-btn-text {
    display: none;
  }

  .act-review-nav .act-btn-prev .act-btn-arrow,
  .act-review-nav .act-btn-next .act-btn-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
  }

  .act-review-nav .act-btn-next.act-btn-start-quiz .act-btn-text {
    display: inline-block;
  }

  .act-review-nav .act-btn-next.act-btn-start-quiz .act-btn-arrow {
    display: none;
  }
}

@media (max-width: 579px) {
  .act-review-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 8px;
    margin-top: 12px;
  }

  .act-review-nav .act-btn-prev,
  .act-review-nav .act-btn-next {
    flex: 1;
    max-width: calc(50% - 4px);
  }
}