.bv-captcha {
  margin: 14px 0 4px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 17px;
  background:
    radial-gradient(circle at 15% 0%, color-mix(in srgb, var(--accent, #ff3158), transparent 82%), transparent 46%),
    linear-gradient(180deg, rgba(10, 14, 22, .94), rgba(5, 8, 13, .96));
  box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 18px 55px rgba(0, 0, 0, .28);
}

.bv-captcha-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bv-captcha-kicker {
  display: block;
  margin-bottom: 3px;
  color: color-mix(in srgb, var(--accent, #ff3158), white 20%);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
}

.bv-captcha h2 {
  margin: 0;
  color: #f7f9fc;
  font-size: 16px;
  letter-spacing: -.01em;
}

.bv-captcha-time {
  min-width: 50px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  color: rgba(239, 244, 251, .78);
  background: rgba(255, 255, 255, .045);
  font: 700 10px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: center;
}

.bv-captcha-copy {
  margin: 7px 0 11px;
  color: rgba(224, 231, 241, .67);
  font-size: 11px;
  line-height: 1.45;
}

.bv-captcha-stage {
  min-height: 92px;
  display: grid;
  place-items: center;
}

.bv-captcha-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(48px, 1fr));
  gap: 8px;
}

.bv-captcha-symbol {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 13px;
  background: #090d14;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.bv-captcha-symbol img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  transition: transform .19s cubic-bezier(.2, .82, .28, 1);
}

.bv-captcha-symbol span {
  position: absolute;
  right: 4px;
  bottom: 2px;
  color: rgba(255, 255, 255, .72);
  font-size: 12px;
  text-shadow: 0 1px 4px #000;
}

.bv-captcha-symbol:hover {
  border-color: color-mix(in srgb, var(--accent, #ff3158), transparent 32%);
}

.bv-captcha-symbol:focus-visible,
.bv-captcha button:focus-visible,
.bv-captcha input:focus-visible,
.bv-captcha audio:focus-visible {
  outline: 2px solid #62d9ff;
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(98, 217, 255, .16);
}

.bv-captcha-actions {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 7px;
  margin-top: 11px;
}

.bv-captcha-actions button {
  min-height: 35px;
  border-radius: 11px;
  padding: 0 9px;
  font-size: 10px;
  font-weight: 850;
}

.bv-captcha-secondary {
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .045);
  color: #dbe3ed;
}

.bv-captcha-primary {
  border: 1px solid color-mix(in srgb, var(--accent, #ff3158), white 8%);
  background: linear-gradient(135deg, var(--accent, #ff3158), rgba(86, 11, 33, .97));
  color: #fff;
}

.bv-captcha button:disabled {
  cursor: wait;
  opacity: .54;
}

.bv-captcha-status {
  min-height: 17px;
  margin-top: 8px;
  color: rgba(226, 233, 242, .66);
  font-size: 10px;
  line-height: 1.4;
}

.bv-captcha-status[data-tone="error"] {
  color: #ff9cac;
}

.bv-captcha-status[data-tone="warn"] {
  color: #ffd184;
}

.bv-captcha-status[data-tone="success"] {
  color: #8ef5aa;
}

.bv-captcha-loading {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, .12);
  border-top-color: var(--accent, #ff3158);
  border-radius: 50%;
  animation: bv-captcha-spin .75s linear infinite;
}

.bv-captcha-empty {
  color: #ff9cac;
  font-size: 11px;
}

.bv-captcha-audio {
  width: 100%;
  display: grid;
  gap: 8px;
}

.bv-captcha-audio audio {
  width: 100%;
  height: 38px;
}

.bv-captcha-audio label {
  color: rgba(226, 233, 242, .72);
  font-size: 10px;
}

.bv-captcha-audio input {
  width: 100%;
  height: 39px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 11px;
  outline: 0;
  background: rgba(255, 255, 255, .05);
  color: #fff;
  font: 800 16px/1 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: .24em;
}

.bv-captcha.is-verified {
  border-color: rgba(90, 238, 132, .44);
  animation: bv-captcha-accepted .5s ease both;
}

.bv-captcha-unlocked {
  animation: bv-captcha-reveal .45s ease both;
}

@keyframes bv-captcha-spin {
  to { transform: rotate(360deg); }
}

@keyframes bv-captcha-accepted {
  50% { box-shadow: 0 0 34px rgba(80, 235, 126, .22), inset 0 1px rgba(255, 255, 255, .04); }
}

@keyframes bv-captcha-reveal {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .bv-captcha {
    padding: 12px;
  }

  .bv-captcha-grid {
    gap: 5px;
  }

  .bv-captcha-symbol {
    border-radius: 10px;
  }

  .bv-captcha-actions {
    grid-template-columns: 1fr 1fr;
  }

  .bv-captcha-primary {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bv-captcha *,
  .bv-captcha-unlocked {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
