.gs-captcha {
  --gs-accent: #2563eb;
  --gs-border: #d1d5db;
  --gs-text: #1f2937;
  --gs-muted: #6b7280;
  --gs-ok: #15803d;
  --gs-err: #b91c1c;
  --gs-warn: #b45309;
  margin: 15px 0;
  width: 100%;
  max-width: 300px;
  font-family: inherit;
  color: var(--gs-text);
  box-sizing: border-box;
}
.gs-captcha *, .gs-captcha *::before, .gs-captcha *::after { box-sizing: border-box; }

.gs-captcha__card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 62px; padding: 8px 12px 8px 6px;
  background: #fff; border: 1px solid var(--gs-border); border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  transition: border-color .2s, background-color .2s;
}
.gs-captcha[data-state="success"] .gs-captcha__card { border-color: #86efac; background: #f0fdf4; }
.gs-captcha[data-state="error"] .gs-captcha__card { border-color: #fca5a5; background: #fef2f2; }
.gs-captcha[data-state="expired"] .gs-captcha__card { border-color: #fcd34d; background: #fffbeb; }

.gs-captcha__control {
  flex: 1 1 auto; min-width: 0; min-height: 44px;
  display: flex; align-items: center; gap: 10px; padding: 4px 8px;
  margin: 0; font: inherit; color: inherit; text-align: left;
  background: transparent; border: 0; border-radius: 8px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.gs-captcha__control[aria-disabled="true"] { cursor: progress; }
.gs-captcha__control:focus-visible { outline: 3px solid rgba(37, 99, 235, .45); outline-offset: 1px; }

.gs-captcha__box {
  position: relative; flex: 0 0 auto; width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid #cbd5e1; border-radius: 6px; color: #fff;
  transition: background-color .2s, border-color .2s;
}
.gs-captcha__control:hover .gs-captcha__box { border-color: var(--gs-accent); }
.gs-captcha__box svg { position: absolute; inset: 2px; width: 16px; height: 16px; display: none; }
.gs-captcha[data-state="verifying"] .gs-captcha__box { border-color: var(--gs-accent); color: var(--gs-accent); }
.gs-captcha[data-state="verifying"] .gs-captcha__spinner { display: block; animation: gs-captcha-spin .8s linear infinite; }
.gs-captcha[data-state="success"] .gs-captcha__box { background: var(--gs-ok); border-color: var(--gs-ok); }
.gs-captcha[data-state="success"] .gs-captcha__check { display: block; }
.gs-captcha[data-state="error"] .gs-captcha__box { border-color: var(--gs-err); }
.gs-captcha[data-state="expired"] .gs-captcha__box { border-color: var(--gs-warn); }

.gs-captcha__label { font-size: 14px; font-weight: 400; line-height: 1.3; overflow-wrap: anywhere; }

.gs-captcha__brand {
  flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  color: #2f5fe3; text-align: center; line-height: 1.15; user-select: none;
}
.gs-captcha__brand-name { font-size: 8px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #52627a; }
.gs-captcha__brand-links { font-size: 8px; color: #94a3b8; white-space: nowrap; }

.gs-captcha__feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.gs-captcha__status { margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: var(--gs-muted); }
.gs-captcha__status:empty { display: none; }
.gs-captcha[data-state="success"] .gs-captcha__status { color: var(--gs-ok); font-weight: 600; }
.gs-captcha[data-state="error"] .gs-captcha__status, .gs-captcha__status.is-error { color: var(--gs-err); }
.gs-captcha[data-state="expired"] .gs-captcha__status { color: var(--gs-warn); }
.gs-captcha__status.is-visible:not(:empty) { color: var(--gs-err); }

.gs-captcha__hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 380px) {
  .gs-captcha__card { padding-right: 10px; gap: 6px; }
  .gs-captcha__control { gap: 8px; }
  .gs-captcha__label { font-size: 13px; }
  .gs-captcha__brand svg { width: 20px; height: 24px; }
}
@media (max-width: 330px) {
  .gs-captcha__brand-links { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gs-captcha__card, .gs-captcha__box { transition: none; }
  .gs-captcha[data-state="verifying"] .gs-captcha__spinner { animation-duration: 1.6s; }
}
@keyframes gs-captcha-spin { to { transform: rotate(360deg); } }
