/* 开始：slider-captcha 弹窗样式 */
#captcha-dialog:not([open]) { display: none; }

#captcha-dialog {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: 380px;
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 24px);
    margin: auto;
    padding: clamp(12px, 5vw, 26px);
    overflow: auto;
    border: 1px solid #e3eaf4;
    border-radius: 20px;
    background: #fff;
    color: #172640;
    box-shadow: 0 24px 64px rgba(18, 38, 73, .24);
}

#captcha-dialog[open] {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px 8px;
}

#captcha-dialog::backdrop { background: rgba(13, 25, 48, .46); }

#captcha-dialog > #captcha-title,
#captcha-dialog > .captcha-box,
#captcha-dialog > #captcha-message {
    grid-column: 1 / -1;
}

#captcha-dialog > #captcha-title {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.4;
}

#captcha-dialog > .captcha-box { min-width: 0; overflow-x: auto; }

#captcha-dialog .slider-captcha-stage {
    border-color: #dbe5f2;
    border-radius: 12px;
}

#captcha-dialog .slider-captcha-stage > img { top: 0; }
#captcha-dialog .slider-captcha-stage > img:first-of-type { left: 0; }
#captcha-dialog .slider-captcha-stage > img:last-of-type { touch-action: none; }
#captcha-dialog .slider-captcha-refresh { display: none; }

#captcha-dialog .slider-captcha-light .slider-captcha-bar {
    border-color: #dbe6f6;
    background: #eef4fe;
}

#captcha-dialog .slider-captcha-light .slider-captcha-thumb {
    border-color: #245bc1;
    background: #245bc1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(36, 91, 193, .27);
    touch-action: none;
}

#captcha-dialog > #captcha-message {
    min-height: 1.5em;
    margin: 0;
    color: #53627a;
    font-size: 13px;
    line-height: 1.5;
}

#captcha-dialog > #captcha-refresh,
#captcha-dialog > form > button {
    padding: 7px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

#captcha-dialog > #captcha-refresh {
    justify-self: start;
    background: #edf3ff;
    color: #234fa7;
}

#captcha-dialog > #captcha-refresh:hover:not(:disabled) { background: #dfeaff; }
#captcha-dialog > #captcha-refresh:disabled { opacity: .55; cursor: default; }
#captcha-dialog > form { margin: 0; }
#captcha-dialog > form > button { border-color: #dce4ef; background: #fff; color: #43516a; }
#captcha-dialog > form > button:hover { background: #f2f5fa; }
#captcha-dialog button:focus-visible { outline: 2px solid #245bc1; outline-offset: 2px; }
/* 结束：slider-captcha 弹窗样式 */
/* 开始：slider-captcha 浅蓝验证入口 */
#captcha-open {
    --captcha-accent: #2965cc;
    --captcha-outline: #c6daf8;
    --captcha-icon-bg: #d5e6ff;
    --captcha-action-bg: #e2edff;
    --captcha-surface: linear-gradient(105deg, #e5f0ff 0%, #edf5ff 55%, #f5f9ff 100%);
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 15px 0 43px;
    border: 0;
    border-radius: 9px;
    background:
        radial-gradient(circle at calc(100% - 19px) 50%, var(--captcha-action-bg) 9px, transparent 10px),
        var(--captcha-surface);
    box-shadow: inset 0 0 0 1px var(--captcha-outline), inset 0 2px 0 rgba(255, 255, 255, .75);
    color: #1a4078;
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

#captcha-open::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 9px;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: linear-gradient(145deg, rgba(255, 255, 255, .66), transparent), var(--captcha-icon-bg);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55);
    transform: translateY(-50%);
}

#captcha-open > #captcha-open-label::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 14px;
    width: 14px;
    height: 16px;
    background: var(--captcha-accent);
    clip-path: polygon(50% 0, 100% 19%, 100% 51%, 82% 78%, 50% 100%, 18% 78%, 0 51%, 0 19%);
    transform: translateY(-50%);
}

#captcha-open > #captcha-open-label::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 19px;
    width: 4px;
    height: 7px;
    box-sizing: border-box;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    transform: translateY(-60%) rotate(45deg);
}

#captcha-open::after {
    content: "";
    flex: 0 0 6px;
    height: 6px;
    margin-left: auto;
    border-top: 1.5px solid var(--captcha-accent);
    border-right: 1.5px solid var(--captcha-accent);
    transform: rotate(45deg);
}

#captcha-open:hover:not(:disabled):not(.is-verified) {
    --captcha-outline: #a9c8fa;
    --captcha-icon-bg: #ccdeff;
    --captcha-action-bg: #d5e6ff;
    --captcha-surface: linear-gradient(105deg, #dcecff 0%, #e7f1ff 55%, #eff6ff 100%);
}

#captcha-open:focus-visible { outline: 2px solid #245bc1; outline-offset: 2px; }
#captcha-open:disabled { opacity: .65; cursor: default; }
#captcha-open.is-verified {
    --captcha-accent: #25825f;
    --captcha-outline: #cde9dd;
    --captcha-icon-bg: #d6efe3;
    --captcha-action-bg: #dff2e9;
    --captcha-surface: linear-gradient(105deg, #e6f6ef, #f3faf7);
    color: #17654a;
}

#captcha-open.is-verified::after {
    height: 11px;
    border: 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}
/* 结束：slider-captcha 浅蓝验证入口 */

