/**
 * 免责声明 / 用户协议 悬浮页
 * 适配网站 Bootstrap 蓝色主题 (#0d6efd)，兼容 IE9+ 及移动端
 */
.agr-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.55);
    background: rgba(15, 23, 42, 0.55) \9;
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#8c0f172a, endColorstr=#8c0f172a);
    display: none;
    overflow: hidden;
}
.agr-overlay.agr-show {
    display: block;
}
.agr-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.agr-box {
    position: relative;
    z-index: 2;
    max-width: 760px;
    width: 92%;
    margin: 3vh auto 0;
    height: 90vh;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
}
/* 顶部标题区 */
.agr-header {
    padding: 22px 26px 16px;
    border-bottom: 1px solid #eef1f5;
    background: #ffffff;
}
.agr-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #212529;
    letter-spacing: 0.5px;
    padding-right: 110px;
}
.agr-header .agr-sub {
    margin-top: 8px;
    font-size: 14px;
    color: #5a6b7b;
    line-height: 1.5;
}
.agr-header .agr-update {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: #8a97a3;
}
/* 阅读进度：绝对定位悬浮在正文框右上角，不占正文流，滚动正文时始终可见 */
.agr-progress {
    position: absolute;
    top: 116px;
    right: 26px;
    z-index: 6;
    display: inline-block;
    font-size: 13px;
    line-height: 1;
    color: #0d6efd;
    background: #ffffff;
    border: 1px solid #bcd4ff;
    border-radius: 999px;
    padding: 7px 16px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.12);
    pointer-events: none;
}
.agr-progress.agr-done {
    color: #157d4c;
    background: #ffffff;
    border-color: #b7e3c9;
    box-shadow: 0 2px 8px rgba(21, 125, 76, 0.12);
}
/* 中间正文区 */
.agr-body {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow-y: auto;
    padding: 14px 26px 18px;
    background: #fbfcfd;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: auto;
    scrollbar-color: #c9d4de #eef1f5;
}
/* 加宽滚动条，便于点击/拖动 */
.agr-body::-webkit-scrollbar {
    width: 14px;
}
.agr-body::-webkit-scrollbar-thumb {
    background: #c9d4de;
    border-radius: 7px;
    border: 3px solid #fbfcfd;
}
.agr-body::-webkit-scrollbar-thumb:hover {
    background: #aebccb;
}
.agr-body::-webkit-scrollbar-track {
    background: #eef1f5;
    border-radius: 7px;
}
.agr-content {
    font-size: 14px;
    color: #3a4652;
    line-height: 1.85;
    word-wrap: break-word;
    word-break: break-word;
}
.agr-content p {
    margin: 0 0 10px;
}
/* 【】大标题醒目 */
.agr-content .agr-h {
    display: block;
    margin: 18px 0 10px;
    padding: 8px 14px;
    font-size: 16px;
    font-weight: 700;
    color: #0d6efd;
    background: #eaf2ff;
    border-left: 4px solid #0d6efd;
    border-radius: 3px;
}
/* 第一个大标题上移，与右上角"已阅读"进度徽章视觉齐平 */
.agr-content .agr-h:first-child {
    margin-top: 0;
}
/* 底部操作区 */
.agr-footer {
    position: relative;
    padding: 14px 26px 18px;
    background: #ffffff;
    border-top: 1px solid #eef1f5;
}
.agr-check {
    display: block;
    margin-bottom: 14px;
    cursor: pointer;
    font-size: 14px;
    color: #3a4652;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.agr-check input[type="checkbox"] {
    vertical-align: -2px;
    margin-right: 6px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
/* 红色提醒气泡（悬浮，带下箭头，醒目） */
.agr-warn {
    display: none;
    position: absolute;
    left: 50%;
    bottom: 100%;
    margin-bottom: 12px;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    max-width: 92%;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: #ffffff;
    background: #dc3545;
    border-radius: 8px;
    padding: 10px 18px;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.35);
    z-index: 10;
    pointer-events: none;
}
/* 气泡下箭头 */
.agr-warn::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    margin-left: -7px;
    border: 7px solid transparent;
    border-top-color: #dc3545;
}
.agr-warn.agr-warn-show {
    display: block;
    -webkit-animation: agr-warn-in 0.25s ease;
    animation: agr-warn-in 0.25s ease;
}
@-webkit-keyframes agr-warn-in {
    from { opacity: 0; -webkit-transform: translateX(-50%) translateY(8px); transform: translateX(-50%) translateY(8px); }
    to { opacity: 1; -webkit-transform: translateX(-50%) translateY(0); transform: translateX(-50%) translateY(0); }
}
@keyframes agr-warn-in {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.agr-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #cbd4de;
    color: #ffffff;
    transition: background 0.2s ease;
    outline: none;
}
.agr-btn.agr-enabled {
    background: #0d6efd;
    color: #ffffff;
}
.agr-btn.agr-enabled:hover {
    background: #0b5ed7;
}

/* 移动端适配 */
@media (max-width: 576px) {
    .agr-box {
        width: 96%;
        margin-top: 2vh;
        height: 94vh;
        border-radius: 8px;
    }
    .agr-header {
        padding: 16px 16px 12px;
    }
    .agr-header h2 {
        font-size: 18px;
    }
    .agr-header .agr-sub {
        font-size: 13px;
    }
    .agr-progress {
        right: 14px;
        font-size: 12px;
        padding: 6px 12px;
    }
    .agr-body {
        padding: 14px 16px;
    }
    .agr-content {
        font-size: 13px;
        line-height: 1.75;
    }
    .agr-content .agr-h {
        font-size: 15px;
    }
    .agr-footer {
        padding: 12px 16px 14px;
    }
    .agr-warn {
        font-size: 13px;
        padding: 9px 14px;
        white-space: normal;
        max-width: 94%;
    }
    .agr-btn {
        font-size: 15px;
        padding: 11px 0;
    }
}
