.captcha-dialog {
  width: min(318px, calc(100vw - 2px));
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  overflow: visible;
}

.captcha-dialog::backdrop { background: transparent; }
.captcha-dialog:focus-visible { outline: none; }

.captcha-dialog .tianai-captcha-parent,
.captcha-dialog .tianai-captcha-parent * { box-sizing: border-box; }
.captcha-dialog .tianai-captcha-parent { position: relative; z-index: 997; width: 318px; height: 318px; padding: 8px; border-radius: 5px; color: #333; background: #fff; box-shadow: 0 0 11px #999; overflow: hidden; font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
.captcha-dialog .tianai-captcha-bg { position: absolute; z-index: -1; inset: 0; border-radius: 6px; background: #fff; }
.captcha-dialog .tianai-captcha-box { position: relative; width: 302px; height: 260px; overflow: hidden; }
.captcha-dialog .tianai-captcha-slider { position: absolute; z-index: 999; top: 0; left: 0; width: 300px; height: 260px; text-align: left; user-select: none; }
.captcha-dialog .slider-tip { width: 300px; height: 20px; margin: 0 0 5px; color: #000; font-size: 15px; font-weight: 700; line-height: 20px; }
.captcha-dialog .tianai-captcha-slider .content { position: relative; width: 300px; height: 180px; overflow: hidden; }
.captcha-dialog .bg-img-div { position: absolute; inset: 0; width: 300px; height: 180px; }
.captcha-dialog .bg-img-div img { display: block; width: 300px; height: 180px; border-radius: 5px; object-fit: fill; }
.captcha-dialog .slider-img-div { position: absolute; top: 0; left: 0; width: 55px; height: 180px; pointer-events: none; transform-origin: right bottom; will-change: transform; }
.captcha-dialog .captcha-piece { display: block; width: 55px; height: 180px; filter: drop-shadow(0 2px 2px rgb(0 0 0 / 35%)); }
.captcha-dialog .tianai-captcha-tips { position: absolute; z-index: 999; bottom: -25px; left: 0; width: 300px; height: 25px; color: #fff; font-size: 15px; line-height: 25px; text-align: center; transition: bottom .3s ease-in-out; }
.captcha-dialog .tianai-captcha-tips.is-on { bottom: 0; }
.captcha-dialog .tianai-captcha-tips.is-error { background: #ff5d39; }
.captcha-dialog .tianai-captcha-tips.is-success { background: #39c522; }
.captcha-dialog .slider-move { position: relative; width: 300px; height: 34px; margin: 11px 0; color: #88949d; font-size: 14px; line-height: 38px; text-align: center; white-space: nowrap; user-select: none; opacity: .8; }
.captcha-dialog .slider-move-track { position: relative; box-sizing: content-box; width: 298px; height: 32px; border: 1px solid #f5f5f5; border-radius: 4px; color: #999; background: #f5f5f5; line-height: 32px; overflow: visible; }
.captcha-dialog .slider-move-track-mask { position: absolute; top: -1px; left: -1px; width: 0; height: 32px; border: 1px solid #0298f8; border-radius: 5px 0 0 5px; background: #89d2ff; opacity: .5; pointer-events: none; }
.captcha-dialog .slider-move-shadow { position: absolute; top: 0; left: 0; width: 5px; height: 32px; border-radius: 50%; background: #fff; box-shadow: 1px 1px 1px #fff; opacity: .5; animation: slider-captcha-shine 2s linear infinite; }
.captcha-dialog .slider-move-btn { position: absolute; z-index: 2; top: -6px; left: 0; width: 63px; height: 45px; min-height: 0; padding: 0; border: 0; border-radius: 5px; background: #fff url("/assets/captcha/handle.png") center / contain no-repeat; cursor: grab; touch-action: none; will-change: transform; }
.captcha-dialog .slider-move-btn:active { cursor: grabbing; }
.captcha-dialog .slider-move-btn:focus-visible { outline: 2px solid #0298f8; outline-offset: 2px; box-shadow: 0 0 0 4px rgb(2 152 248 / 22%); }
.captcha-dialog .slider-move-btn:disabled { cursor: default; opacity: 1; }
.captcha-dialog .slider-move-track.is-error { animation: slider-captcha-shake .32s ease-in-out; }
.captcha-dialog .slider-move-track.is-verifying + .slider-move-btn { opacity: .72; }
.captcha-dialog .slider-bottom { width: 302px; height: 30px; margin-top: 10px; }
.captcha-dialog .captcha-vendor-logo { float: left; display: block; width: 30px; height: 30px; }
.captcha-dialog .slider-bottom .refresh-btn,
.captcha-dialog .slider-bottom .close-btn { float: right; display: block; width: 20px; height: 20px; min-height: 0; padding: 0; border: 0; border-radius: 0; background-color: transparent; background-repeat: no-repeat; cursor: pointer; }
.captcha-dialog .slider-bottom .refresh-btn { margin-right: 10px; background-image: url("/assets/captcha/refresh.png"); }
.captcha-dialog .slider-bottom .close-btn { margin-right: 2px; background-image: url("/assets/captcha/close.png"); }
.captcha-dialog .slider-bottom .refresh-btn:focus-visible,
.captcha-dialog .slider-bottom .close-btn:focus-visible { outline: 2px solid #0298f8; outline-offset: 2px; box-shadow: none; }
.captcha-dialog .slider-bottom .refresh-btn[aria-busy="true"] { animation: slider-captcha-spin .8s linear infinite; }
.captcha-dialog .tianai-captcha-loading { position: absolute; z-index: 1001; inset: 0; display: none; background: #fff; }
.captcha-dialog .tianai-captcha-parent.is-loading .tianai-captcha-loading { display: block; }
.captcha-dialog .tianai-captcha-parent.is-loading .tianai-captcha-loading::after { display: block; width: 120px; height: 20px; margin: 120px auto; background: linear-gradient(#f7b645 0 0) 0 / 0% no-repeat rgb(221 221 221 / 42%); -webkit-mask: linear-gradient(90deg, #000 70%, transparent 0) 0 / 20%; content: ""; animation: slider-captcha-loading 1s steps(6) infinite; }

@keyframes slider-captcha-loading { to { background-size: 120%; } }
@keyframes slider-captcha-shine { from { left: 0; } to { left: 289px; } }
@keyframes slider-captcha-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes slider-captcha-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .captcha-dialog .slider-move-shadow,
  .captcha-dialog .slider-bottom .refresh-btn[aria-busy="true"],
  .captcha-dialog .tianai-captcha-parent.is-loading .tianai-captcha-loading::after { animation-duration: .001ms; animation-iteration-count: 1; }
  .captcha-dialog .tianai-captcha-tips { transition: none; }
}
