.r32-captcha-shell {
  max-width: 1120px;
}

.r32-captcha-hero,
.r32-captcha-card,
.r32-captcha-status {
  min-width: 0;
  padding: clamp(16px, 2.6vw, 26px);
  border: 1px solid var(--r32-border, var(--border, #d8d2c7));
  border-radius: var(--radius, 14px);
  background: var(--r32-surface, var(--surface, #fffdf8));
}

.r32-captcha-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  align-items: end;
}

.r32-captcha-controls .r32-captcha-actions,
.r32-captcha-controls .r32-captcha-hint {
  grid-column: 1 / -1;
}

.r32-captcha-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.r32-captcha-grid > p {
  grid-column: 1 / -1;
  color: var(--r32-muted, var(--muted, #625d55));
}

.r32-captcha-result {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--r32-border, var(--border, #d8d2c7));
  border-radius: 10px;
  background: var(--r32-surface-2, var(--surface-2, #f5f1e9));
}

.r32-captcha-result img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 84px;
  object-fit: contain;
  image-rendering: auto;
  border-radius: 6px;
  background: #fff;
}

.r32-captcha-result code {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--primary, #235c89);
  font: 700 15px/1.35 var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  letter-spacing: .08em;
}

.r32-captcha-result button {
  width: 100%;
  min-height: 42px;
}

.r32-captcha-shell :where(button, input):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--primary, #235c89) 60%, transparent);
  outline-offset: 2px;
}

@media (max-width: 820px) {
  .r32-captcha-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .r32-captcha-controls {
    grid-template-columns: 1fr;
  }

  .r32-captcha-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .r32-captcha-actions > button {
    width: 100%;
  }
}
