/* ==========================================================================
   Puerta de verificación — tarjeta única para los dos estilos
   (grid = elegir símbolos, slider = encajar la pieza)
   ========================================================================== */
:root {
  --blue-900: #062250;
  --blue-700: #0b4ea2;
  --blue-500: #0c7bd6;
  --ink: #17212f;
  --muted: #6b7a8d;
  --line: #e4ebf4;
  --bg: #eef4fb;
  --ok: #0a7b3e;
  --err: #b3243a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(700px 360px at 15% 0%, rgba(12, 123, 214, .16), transparent 62%),
    radial-gradient(600px 320px at 92% 12%, rgba(0, 194, 224, .14), transparent 60%),
    var(--bg);
  color: var(--ink);
}

.card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px -30px rgba(6, 34, 80, .55);
  overflow: hidden;
}

.card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(100deg, var(--blue-700), var(--blue-500));
  color: #fff;
}

.card__head img {
  width: 74px;
  height: 42px;
  background: #fff;
  border-radius: 8px;
  padding: 3px 6px;
  display: block;
}

.card__head b { font-size: 14px; letter-spacing: .2px; }
.card__head small { display: block; font-size: 11px; opacity: .82; }

.card__body { padding: 18px; }

.title { margin: 0 0 4px; font-size: 17px; letter-spacing: -.2px; }
.hint { margin: 0 0 14px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.hint b { color: var(--blue-700); }

/* ---------------------------------------------------------------- rejilla */
.prompt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 11px;
  background: #f4f9ff;
  border: 1px solid var(--line);
  font-size: 13px;
}

.prompt img { width: 30px; height: 30px; }

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

.cell {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 6px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.cell img { width: 100%; height: 100%; display: block; pointer-events: none; }
.cell:hover { border-color: #bcd6ef; }

.cell.is-on {
  border-color: var(--blue-500);
  background: #f0f8ff;
  box-shadow: 0 0 0 2px var(--blue-500);
}

.cell.is-on::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--blue-500);
  box-shadow: 0 0 0 2px #fff;
}

/* ----------------------------------------------------------------- slider */
.slider-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 320 / 190;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef4fb;
  touch-action: none;
  user-select: none;
}

.slider-stage img { width: 100%; height: 100%; display: block; }

.piece {
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 4px;
  box-shadow: 0 0 0 2px #fff, 0 6px 14px rgba(6, 34, 80, .35);
  cursor: grab;
  touch-action: none;
  overflow: hidden;
}

.piece img { width: 100%; height: 100%; display: block; pointer-events: none; }
.piece:active { cursor: grabbing; }

.track {
  position: relative;
  margin-top: 12px;
  height: 40px;
  border-radius: 10px;
  background: #f4f8fd;
  border: 1px solid var(--line);
}

.thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 44px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(140deg, var(--blue-500), var(--blue-700));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: grab;
  touch-action: none;
}

.track__label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  color: var(--muted);
  pointer-events: none;
}

/* -------------------------------------------------------------- turnstile */
.ts-widget {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 66px;
  margin: 2px 0 6px;
}

/* ------------------------------------------------------------------ acción */
.actions { display: flex; gap: 10px; margin-top: 16px; align-items: center; }

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 16px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--primary { background: linear-gradient(140deg, var(--blue-500), var(--blue-700)); color: #fff; flex: 1; }
.btn--primary:disabled { opacity: .55; cursor: progress; }
.btn--ghost { background: #f4f8fd; color: var(--blue-700); border-color: var(--line); }

.status { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; min-height: 18px; }
.status.is-ok { color: var(--ok); }
.status.is-err { color: var(--err); }

.foot {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  line-height: 1.5;
  color: #93a1b1;
}

/* ------------------------------------------------- 6 estilos de verificación */
.gate-check {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 14px 16px;
  border: 1px solid #d6e0ef;
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  color: #12365c;
  cursor: pointer;
  text-align: left;
}

.gate-check.is-checked { border-color: #1a7f37; background: #f2fbf4; }

.gate-box {
  width: 22px;
  height: 22px;
  border: 2px solid #b9c8db;
  border-radius: 6px;
  flex: none;
  position: relative;
}

.gate-check.is-checked .gate-box {
  border-color: #1a7f37;
  background: #1a7f37;
}

.gate-check.is-checked .gate-box::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.gate-track {
  position: relative;
  height: 56px;
  border: 1px solid #d6e0ef;
  border-radius: 12px;
  background: #eef3fb;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.gate-track-label {
  width: 100%;
  padding-left: 68px;
  font-size: 14px;
  color: #5b6d85;
  pointer-events: none;
}

.gate-thumb {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #0b4ea2;
  color: #fff;
  font-size: 18px;
  cursor: grab;
  touch-action: none;
  transition: transform .08s linear;
}

.gate-thumb.is-done { background: #1a7f37; cursor: default; }

.gate-hold {
  position: relative;
  width: 100%;
  height: 56px;
  border: 1px solid #d6e0ef;
  border-radius: 12px;
  background: #fff;
  font-size: 15px;
  font-weight: 700;
  color: #12365c;
  cursor: pointer;
  overflow: hidden;
  touch-action: none;
}

.gate-hold-bar {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.gate-hold-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: rgba(11, 78, 162, .16);
}

.gate-hold.is-holding { border-color: #0b4ea2; }
.gate-hold.is-done { border-color: #1a7f37; color: #1a7f37; }
.gate-hold span:last-child { position: relative; }

.gate-icons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gate-icon {
  padding: 6px;
  border: 2px solid #e2e9f4;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  line-height: 0;
}

.gate-icon img { width: 100%; height: auto; display: block; }
.gate-icon.is-selected { border-color: #0b4ea2; background: #eff5ff; }
/* Cabecera neutra (sin logo de marca) */
.card__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  flex: none;
}

.card__badge svg { width: 24px; height: 24px; }