/* Chaos-Captcha */
.cap { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid var(--border, rgba(255,255,255,.12)); max-width: 420px; }
.cap-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.cap-box { display: inline-flex; align-items: center; gap: 12px; padding: 4px 6px 4px 2px; border: 0; background: none; color: var(--text, #eee);
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 10px; text-align: left; }
.cap-box:focus-visible { outline: 2px solid var(--accent, #e0102b); outline-offset: 3px; }
.cap-check { position: relative; flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--muted, #8b919c); transition: all .2s ease; }
.cap[data-state="working"] .cap-check { border-color: color-mix(in srgb, var(--accent, #e0102b) 30%, transparent); border-top-color: var(--accent, #e0102b); border-radius: 50%; animation: cap-spin .7s linear infinite; }
.cap[data-state="done"] .cap-check { border-color: var(--success, #22c55e); background: var(--success, #22c55e); box-shadow: 0 0 14px color-mix(in srgb, var(--success, #22c55e) 55%, transparent); }
.cap[data-state="done"] .cap-check::after { content: ""; position: absolute; left: 7px; top: 2px; width: 7px; height: 13px; border: solid #0b0b0b; border-width: 0 3px 3px 0; transform: rotate(45deg); }
.cap[data-state="done"] { border-color: color-mix(in srgb, var(--success, #22c55e) 45%, transparent); background: color-mix(in srgb, var(--success, #22c55e) 7%, transparent); }
.cap[data-state="done"] .cap-text { color: var(--success, #22c55e); }
.cap[data-state="error"] { border-color: rgba(255, 90, 90, .6); }
.cap[data-state="error"] .cap-check { border-color: #ff5a5a; }
.cap[data-state="error"] .cap-text { color: #ff8080; }
.cap-text { font-size: .92rem; }
.cap-brand { font-size: .72rem; font-weight: 700; color: var(--muted, #8b919c); letter-spacing: .02em; white-space: nowrap; }
.cap-nojs { flex-basis: 100%; font-size: .85rem; color: #ffc439; }
@keyframes cap-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cap[data-state="working"] .cap-check { animation-duration: 2s; } }
.cap[data-state="idle"] .cap-box:hover .cap-check, .cap[data-state="need"] .cap-box:hover .cap-check { border-color: var(--accent, #e0102b); }
.cap[data-state="need"] { border-color: #ffc439; background: rgba(255, 196, 57, .08); }
.cap[data-state="need"] .cap-check { border-color: #ffc439; }
.cap[data-state="need"] .cap-text { color: #ffc439; }
.cap-shake { animation: cap-shake .45s ease; }
@keyframes cap-shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .cap-shake { animation: none; } }
