#bsftsecure-as-challenge-portal {
  position: fixed;
  inset: 0;
  z-index: 1999905;
  pointer-events: none;
}

#bsftsecure-as-challenge-portal.is-open {
  pointer-events: auto;
}

.bsftsecure-as-challenge-overlay {
  position: fixed;
  inset: 0;
  z-index: 1999905;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  contain: strict;
}

.bsftsecure-as-challenge-panel {
  background: #fff;
  border-radius: 16px;
  max-width: 300px;
  width: 100%;
  padding: 14px 14px 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.bsftsecure-as-challenge-panel .bsftsecure-pattern {
  margin-bottom: 8px;
}

.bsftsecure-as-challenge-targets {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #333;
  line-height: 1.35;
  text-align: center;
}

.bsftsecure-as-challenge-hints {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 12px;
}

.bsftsecure-as-challenge-hint {
  display: block;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.bsftsecure-as-challenge-hint svg {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.bsftsecure-as-challenge-meta {
  font-size: 0.75rem;
  color: #57606a;
  margin-bottom: 0;
  text-align: center;
}

.bsftsecure-as-challenge-thanks {
  text-align: center;
  padding: 28px 8px 32px;
  font-size: 1rem;
  font-weight: 500;
}

/* Кнопки сетки — те же классы, что у рисунка входа (bsftsecure-pattern__zone.is-hit). */
.bsftsecure-as-challenge-grid .bsftsecure-pattern__zone {
  padding: 0;
  color: transparent;
  font-size: 0;
  min-height: 52px;
}

.bsftsecure-as-challenge-hint-img {
  display: block;
  width: 56px;
  height: 56px;
  pointer-events: none;
  user-select: none;
  object-fit: contain;
}

.bsftsecure-as-challenge-cell-svg,
.bsftsecure-as-challenge-cell-svg svg,
.bsftsecure-as-challenge-cell-img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  object-fit: contain;
}

.bsftsecure-as-challenge-cell__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 52px;
}

.bsftsecure-as-challenge-cell__loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.bsftsecure-as-challenge-cell__loader::after {
  content: "";
  width: 22px;
  height: 22px;
  border: 2px solid rgba(15, 23, 42, 0.12);
  border-top-color: rgba(37, 99, 235, 0.85);
  border-radius: 50%;
  animation: bsftsecure-as-challenge-spin 0.75s linear infinite;
}

.bsftsecure-as-challenge-cell__decoy,
.bsftsecure-as-challenge-cell__real {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.bsftsecure-as-challenge-cell__decoy svg,
.bsftsecure-as-challenge-cell__decoy .bsftsecure-as-challenge-cell-img,
.bsftsecure-as-challenge-cell__real .bsftsecure-as-challenge-cell-img {
  width: 100%;
  height: 100%;
}

.bsftsecure-as-challenge-cell__decoy.is-hidden,
.bsftsecure-as-challenge-cell__decoy.is-covert {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}

.bsftsecure-as-challenge-grid--reveal .bsftsecure-pattern__zone {
  background: #ffffff;
}

.bsftsecure-as-challenge-grid--reveal .bsftsecure-pattern__zone.is-hit {
  background: #22c55e;
}

.bsftsecure-as-challenge-grid--reveal .bsftsecure-pattern__zone.is-hit .bsftsecure-as-challenge-cell__real.is-visible {
  opacity: 0.8;
}

.bsftsecure-as-challenge-grid--reveal .bsftsecure-pattern__zone:not(.is-hit) .bsftsecure-as-challenge-cell__real:not(.is-visible) {
  opacity: 0;
}

.bsftsecure-as-challenge-cell__real {
  opacity: 0;
}

.bsftsecure-as-challenge-cell__real.is-visible {
  opacity: 1;
  z-index: 1;
}

.bsftsecure-as-challenge-cell__inner.is-ready .bsftsecure-as-challenge-cell__loader {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.bsftsecure-as-hint-wrap {
  position: relative;
  width: 52px;
  height: 52px;
}

.bsftsecure-as-hint-wrap .bsftsecure-as-challenge-hint-img {
  opacity: 0;
  transition: opacity 0.35s ease;
}

.bsftsecure-as-hint-wrap.is-ready .bsftsecure-as-challenge-hint-img {
  opacity: 1;
}

.bsftsecure-as-hint-wrap--reveal {
  background: #ffffff;
}

.bsftsecure-as-challenge-hint__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.bsftsecure-as-challenge-hint__loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.bsftsecure-as-challenge-hint__loader::after {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(15, 23, 42, 0.12);
  border-top-color: rgba(37, 99, 235, 0.85);
  border-radius: 50%;
  animation: bsftsecure-as-challenge-spin 0.75s linear infinite;
}

.bsftsecure-as-challenge-hint__decoy,
.bsftsecure-as-challenge-hint__real {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}

.bsftsecure-as-challenge-hint__decoy.is-covert,
.bsftsecure-as-challenge-hint__decoy.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bsftsecure-as-challenge-hint__real:not(.is-visible) {
  opacity: 0;
}

.bsftsecure-as-challenge-hint__real.is-visible .bsftsecure-as-challenge-hint-img {
  opacity: 1;
}

.bsftsecure-as-challenge-hint__inner.is-ready .bsftsecure-as-challenge-hint__loader {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}

.bsftsecure-as-challenge-hint__decoy svg,
.bsftsecure-as-challenge-hint__real .bsftsecure-as-challenge-hint-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes bsftsecure-as-challenge-spin {
  to {
    transform: rotate(360deg);
  }
}
