/* =============================================================
   ai-interact.css — 兰陵县政府 AI 导诊交互补充样式
   与 css/stylezcm.css 配套使用，不覆盖原有布局，只补充交互态。
   配色沿用：主蓝 #1151AF / 亮蓝 #168FFF / 紫 #CD46F3 / 琥珀 #B7791F
   ============================================================= */

/* ---------- 通用隐藏 / 读屏 ---------- */
.ai-hidden { display: none !important; }
.ai-sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- 演示模式标识 ---------- */
.ai-demo-badge {
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
    padding: 2px 10px;
    border-radius: 20px;
    background: #FFF7E6;
    border: 1px solid #F3D19E;
    color: #9A5B00;
    font-size: 12px;
    line-height: 20px;
    font-weight: normal;
    white-space: nowrap;
}
.ai-demo-badge i {
    display: inline-block;
    width: 6px; height: 6px;
    margin-right: 6px;
    border-radius: 50%;
    background: #E6A23C;
    vertical-align: middle;
    margin-top: -2px;
}

/* ---------- AI 答复富文本 ---------- */
.ai-answer {
    font-size: 15px;
    color: #3D3D3D;
    line-height: 1.95;
    word-wrap: break-word;
    word-break: break-word;
}
.ai-answer p { margin: 0 0 10px; }
.ai-answer p:last-child { margin-bottom: 0; }
.ai-answer .ai-strong {
    color: #1B3C66;
    font-weight: bold;
    margin-top: 16px;
}
.ai-answer .ai-strong:first-child { margin-top: 0; }
.ai-answer strong { color: #1B3C66; }
.ai-answer ul, .ai-answer ol { margin: 4px 0 12px; padding-left: 24px; }
.ai-answer ul li { list-style: disc outside; }
.ai-answer ol li { list-style: decimal outside; }
.ai-answer li { margin: 4px 0; }
.ai-answer code {
    padding: 1px 5px;
    background: #F1F5FA;
    border-radius: 3px;
    font-family: Consolas, Monaco, monospace;
    font-size: 13px;
}
.ai-answer a { color: #1151AF; text-decoration: underline; }
.ai-answer a:hover { color: #168FFF; }
.ai-answer hr {
    margin: 16px 0;
    border: 0;
    border-top: 1px dashed #D5E2F2;
}

.ai-answer.is-streaming > *:last-child:after,
.ai-answer.is-streaming:after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 15px;
    margin-left: 3px;
    background: #168FFF;
    vertical-align: -2px;
    animation: aiCaret 0.9s steps(1) infinite;
}
@keyframes aiCaret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* 兼容 xjf 卡片原有的 p 样式 */
.xjf-ai-card .ai-answer { font-size: 15px; line-height: 1.95; }
.xjf-ai-card .ai-answer p { font-size: 15px; line-height: 1.95; color: #3D3D3D; }
.gk-ai-card .ai-answer { margin-top: 12px; }

/* ---------- 状态行 / 加载 ---------- */
.ai-status-line {
    display: block;
    margin-top: 12px;
    font-size: 13px;
    color: #66788F;
    line-height: 24px;
    min-height: 24px;
}
.ai-status-line .ai-spin { margin-right: 8px; }

.ai-spin {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid #C7D7EE;
    border-top-color: #1151AF;
    border-radius: 50%;
    vertical-align: -2px;
    animation: aiSpin 0.8s linear infinite;
}
@keyframes aiSpin { to { transform: rotate(360deg); } }

.ai-typing {
    display: inline-block;
    margin-right: 8px;
    vertical-align: -1px;
}
.ai-typing i {
    display: inline-block;
    width: 5px; height: 5px;
    margin-right: 3px;
    border-radius: 50%;
    background: #7C93B4;
    animation: aiTyping 1.2s infinite ease-in-out;
}
.ai-typing i:nth-child(2) { animation-delay: 0.15s; }
.ai-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes aiTyping {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
    30% { transform: translateY(-4px); opacity: 1; }
}

/* ---------- 问题回显 ---------- */
.ai-question-line {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 6px;
    background: #F4F8FE;
    border-left: 3px solid #7FA9E8;
    font-size: 14px;
    color: #33506F;
    line-height: 1.7;
    word-break: break-all;
}
.ai-question-line b { color: #1151AF; font-weight: bold; }

/* ---------- 示例问题 ---------- */
.ai-examples {
    margin-top: 14px;
    font-size: 13px;
    color: #66788F;
    line-height: 2.2;
}
.ai-examples .ai-example {
    display: inline-block;
    margin: 0 8px 6px 0;
    padding: 4px 12px;
    border-radius: 16px;
    border: 1px solid #D8E4F5;
    background: #fff;
    color: #33506F;
    font-size: 13px;
    line-height: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.ai-examples .ai-example:hover {
    border-color: #1151AF;
    color: #1151AF;
    background: #F2F7FF;
}

/* ---------- 答复底部操作 ---------- */
.ai-actions {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #D5E2F2;
    text-align: right;
}
.ai-actions .ai-left { float: left; }
.ai-actions:after { content: ""; display: table; clear: both; }

/* ---------- 按钮 ---------- */
.ai-btn {
    display: inline-block;
    box-sizing: border-box;
    height: 36px;
    padding: 0 16px;
    border-radius: 6px;
    border: 1px solid #CCCDCD;
    background: #fff;
    color: #444;
    font-size: 14px;
    line-height: 34px;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    cursor: pointer;
    vertical-align: middle;
    text-align: center;
    transition: all 0.2s;
}
.ai-btn + .ai-btn { margin-left: 8px; }
.ai-btn:hover { border-color: #1151AF; color: #1151AF; }
.ai-btn:focus {
    outline: 2px solid #9CC0F5;
    outline-offset: 1px;
}
.ai-btn[disabled], .ai-btn.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}
.ai-btn-primary {
    background: #1151AF;
    border-color: #1151AF;
    color: #fff;
}
.ai-btn-primary:hover { background: #1554C4; border-color: #1554C4; color: #fff; }
.ai-btn-ghost { background: #F2F7FF; border-color: #C7D7EE; color: #1151AF; }
.ai-btn-ghost:hover { background: #E6F0FF; }
.ai-btn-sm { height: 30px; padding: 0 12px; font-size: 13px; line-height: 28px; }
.ai-btn.is-loading { position: relative; color: transparent !important; }
.ai-btn.is-loading:after {
    content: "";
    position: absolute;
    left: 50%; top: 50%;
    margin: -7px 0 0 -7px;
    width: 14px; height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-top-color: #fff;
    border-radius: 50%;
    animation: aiSpin 0.8s linear infinite;
}
.ai-btn-plain.is-loading:after { border-color: rgba(17, 81, 175, 0.25); border-top-color: #1151AF; }

.ai-linkbtn {
    background: none;
    border: 0;
    padding: 0;
    color: #1151AF;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
}
.ai-linkbtn:hover { color: #168FFF; }

/* ---------- 错误态 ---------- */
.ai-error {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 6px;
    background: #FFF4F4;
    border: 1px solid #F3C2C2;
    color: #B42318;
    font-size: 14px;
    line-height: 1.8;
}
.ai-error .ai-error-txt { display: block; margin-bottom: 8px; }
.ai-error .ai-btn { border-color: #E3A9A9; color: #B42318; }
.ai-error .ai-btn:hover { background: #FFE9E9; border-color: #B42318; }

/* ---------- 成功 / 提示条 ---------- */
.ai-banner {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.8;
}
.ai-banner.is-info { background: #EFF7FF; border: 1px solid #C7DDFF; color: #15437A; }
.ai-banner.is-success { background: #F0FBF4; border: 1px solid #B9E5C8; color: #1B6B38; }
.ai-banner.is-warn { background: #FFF8EC; border: 1px solid #F3D9AE; color: #8A5A12; }
.ai-banner strong { font-weight: bold; }

/* ---------- 弹窗 ---------- */
.ai-modal-mask {
    position: fixed;
    z-index: 10001;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(12, 30, 55, 0.55);
    opacity: 0;
    transition: opacity 0.18s ease;
    overflow-y: auto;
    padding: 40px 16px;
    box-sizing: border-box;
}
.ai-modal-mask.is-on { opacity: 1; }
.ai-modal {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 18px 50px rgba(5, 25, 55, 0.28);
    overflow: hidden;
    transform: translateY(12px);
    transition: transform 0.18s ease;
    font-family: "Microsoft YaHei", Arial, sans-serif;
}
.ai-modal-mask.is-on .ai-modal { transform: translateY(0); }
.ai-modal-hd {
    position: relative;
    padding: 18px 56px 18px 24px;
    background: linear-gradient(180deg, #EFF6FF 0%, #F8FBFF 100%);
    border-bottom: 1px solid #DCE8F8;
}
.ai-modal-hd h3 {
    margin: 0;
    font-size: 18px;
    color: #173A63;
    font-weight: bold;
    line-height: 28px;
}
.ai-modal-x {
    position: absolute;
    right: 16px;
    top: 50%;
    margin-top: -16px;
    width: 32px; height: 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #7B8CA3;
    font-size: 24px;
    line-height: 30px;
    cursor: pointer;
}
.ai-modal-x:hover { background: #E4EEFB; color: #173A63; }
.ai-modal-bd {
    padding: 22px 24px;
    max-height: 66vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 14px;
    color: #444;
    line-height: 1.8;
}
.ai-modal-ft {
    padding: 14px 24px;
    border-top: 1px solid #E5EDF7;
    background: #FAFCFF;
    text-align: right;
}
.ai-modal-actions { text-align: right; }
.ai-confirm-body p { margin: 0; font-size: 15px; line-height: 1.9; color: #333; }

/* ---------- 申请草稿表单 ---------- */
.ai-form-grid { margin: 0 -8px; }
.ai-form-grid:after { content: ""; display: table; clear: both; }
.ai-field {
    float: left;
    width: 50%;
    padding: 0 8px;
    box-sizing: border-box;
    margin-bottom: 16px;
}
.ai-field.is-full { width: 100%; }
.ai-field label {
    display: block;
    margin-bottom: 7px;
    font-size: 14px;
    color: #33506F;
    font-weight: bold;
    line-height: 1.6;
}
.ai-field label .ai-req { color: #CA0808; margin-right: 4px; }
.ai-field .ai-input,
.ai-field .ai-select,
.ai-field .ai-textarea {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #D8E1EC;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: #333;
    font-family: "Microsoft YaHei", Arial, sans-serif;
    outline: none;
}
.ai-field .ai-input, .ai-field .ai-select { height: 40px; line-height: 40px; padding: 0 12px; }
.ai-field .ai-select { cursor: pointer; }
.ai-field .ai-textarea { min-height: 96px; padding: 10px 12px; line-height: 1.8; resize: vertical; }
.ai-field .ai-input:focus,
.ai-field .ai-select:focus,
.ai-field .ai-textarea:focus { border-color: #7FA9E8; background: #F7FAFF; }
.ai-field .ai-input.is-invalid,
.ai-field .ai-textarea.is-invalid { border-color: #D92D20; background: #FFF8F8; }
.ai-field-tip { margin-top: 6px; font-size: 12px; color: #8A97A8; line-height: 1.6; }
.ai-field-error { display: none; margin-top: 6px; font-size: 12px; color: #D92D20; line-height: 1.6; }
.ai-field-error.is-on { display: block; }
.ai-count { float: right; font-size: 12px; color: #8A97A8; font-weight: normal; }
.ai-count.is-over { color: #D92D20; }

/* ---------- 三步自查 ---------- */
.ai-steps {
    margin: 0 0 18px;
    padding: 14px 18px 14px 18px;
    background: #F6FAFF;
    border: 1px solid #DCE8F8;
    border-radius: 8px;
    list-style: none;
    counter-reset: aiStep;
}
.ai-steps li {
    position: relative;
    padding-left: 30px;
    margin: 6px 0;
    font-size: 13px;
    color: #33506F;
    line-height: 1.8;
    counter-increment: aiStep;
}
.ai-steps li:before {
    content: counter(aiStep);
    position: absolute;
    left: 0; top: 3px;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #1151AF;
    color: #fff;
    font-size: 12px;
    line-height: 20px;
    text-align: center;
}
.ai-steps li b { color: #173A63; }

/* ---------- 回执 ---------- */
.ai-receipt {
    text-align: center;
    padding: 8px 0 0;
}
.ai-receipt-ico {
    width: 54px; height: 54px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: #EAF8EF;
    color: #1B8A4B;
    font-size: 30px;
    line-height: 54px;
    font-weight: bold;
}
.ai-receipt h4 { margin: 0 0 6px; font-size: 18px; color: #173A63; }
.ai-receipt .ai-receipt-sub { margin: 0 0 16px; font-size: 13px; color: #7B8CA3; }
.ai-receipt-no {
    display: inline-block;
    margin: 0 auto 18px;
    padding: 8px 22px;
    border-radius: 6px;
    background: #F2F7FF;
    border: 1px dashed #9CC0F5;
    font-size: 20px;
    letter-spacing: 1px;
    color: #1151AF;
    font-weight: bold;
}
.ai-receipt-dl {
    margin: 0;
    padding: 14px 18px;
    text-align: left;
    background: #FAFCFF;
    border-radius: 8px;
    border: 1px solid #E5EDF7;
    font-size: 13px;
    color: #33506F;
    line-height: 1.9;
}
.ai-receipt-dl dt { float: left; width: 88px; color: #7B8CA3; clear: both; }
.ai-receipt-dl dd { margin: 0 0 4px 88px; }
.ai-receipt-dl:after { content: ""; display: table; clear: both; }
.ai-receipt-note { margin-top: 12px; font-size: 12px; color: #8A97A8; text-align: left; line-height: 1.8; }

/* ---------- 轻提示 ---------- */
.ai-toastbox {
    position: fixed;
    z-index: 10002;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    pointer-events: none;
    width: 92%;
    max-width: 520px;
    text-align: center;
}
.ai-toast {
    display: inline-block;
    pointer-events: auto;
    margin-top: 8px;
    padding: 10px 18px 10px 16px;
    border-radius: 8px;
    background: rgba(23, 58, 99, 0.94);
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 8px 24px rgba(5, 25, 55, 0.22);
    text-align: left;
    cursor: pointer;
    animation: aiToastIn 0.22s ease;
    max-width: 100%;
    box-sizing: border-box;
}
.ai-toast.is-out { animation: aiToastOut 0.2s ease forwards; }
.ai-toast.is-success { background: rgba(24, 121, 65, 0.96); }
.ai-toast.is-error { background: rgba(180, 35, 24, 0.96); }
.ai-toast-ico { display: none; }
.ai-toast-txt { vertical-align: middle; }
@keyframes aiToastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes aiToastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-6px); } }

/* ---------- 验证码画布 ---------- */
.xjf-capfield canvas.code {
    float: left;
    width: 120px;
    height: 40px;
    margin-left: 16px;
    margin-top: 3px;
    border: 1px solid #E1E1E1;
    border-radius: 4px;
    background: #F7FAFF;
    cursor: pointer;
}
.xjf-capfield .ai-cap-refresh {
    margin-left: 10px;
    margin-top: 14px;
    float: left;
    font-size: 12px;
}
.xjf-capfield .ai-cap-error {
    float: left;
    width: 100%;
    margin-top: 8px;
    font-size: 13px;
    color: #D92D20;
}


/* AI 咨询页：无验证码时的提示和按钮布局 */
.xjf-captcha2 .xc-hint {
    clear: both;
    padding: 10px 0 16px;
    font-size: 14px;
    color: #EAF4FF;
    line-height: 1.8;
}
.xjf-captcha2 .xc-submit {
    float: none;
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    height: 48px;
    font-size: 16px;
    letter-spacing: 2px;
}
@media (max-width: 768px) {
    .xjf-captcha2 .xc-hint { font-size: 13px; padding: 8px 0 12px; }
    .xjf-captcha2 .xc-submit { height: 44px; font-size: 15px; }
}

/* ---------- 信件页 AI 卡片补充 ---------- */
.xjf-notice-tel {
    margin-left: 12px;
    color: #1151AF;
    white-space: nowrap;
}
.ai-count-line {
    margin-top: 8px;
    text-align: right;
    line-height: 1.2;
}
.ai-count-line:after { content: ""; display: table; clear: both; }
.xjf-capfield .ai-cap-error {
    clear: both;
    width: 100%;
    margin-top: 10px;
    font-size: 13px;
}
.ai-status-line .ai-linkbtn { margin-left: 8px; }
.xjf-input.is-invalid,
.xjf-select.is-invalid,
.xjf-textarea.is-invalid {
    border-color: #D92D20;
    background: #FFF8F8;
}
.ai-card-top { margin-bottom: 10px; line-height: 24px; }
.xjf-ai-card .ai-status-line { padding: 0; }
.xjf-capfield .xjf-submit:disabled {
    background: #A9BFD8;
    cursor: not-allowed;
}
.xjf-capfield .xjf-submit.is-resolved {
    background: #8FB5D8;
}
.xjf-ai .xjf-ai-badge { margin-right: 8px; }
/* AI 卡片与验证码区位于浮动引导员之上，避免答复和提交按钮被引导员遮挡 */
.xjf-ai,
.xjf-captcha,
.xjf-captcha2 { z-index: 10000; }

/* 11.4 写信页浮动引导员保持新版 dw2 高度，仅个人中心做适度缩放 */
.xj-wrap + .zw-guide {
    width: 190px;
    height: 235px;
}
.xj-wrap + .zw-guide .zw-stage {
    width: 205px;
    height: 205px;
}
.xj-wrap + .zw-guide .zw-figure {
    width: 190px;
}
@media (min-width: 1081px) {
    .xjf-form .xjf-field,
    .xjf-captcha .xjf-field {
        padding-right: 60px;
    }
}
@media (max-width: 1080px) {
    /* 移动端不常驻气泡，避免遮挡 AI 答复；保留右下角小助手按钮 */
    .gk-hero .zw-guide.on .zw-bubble { display: none; }
    .gk-hero .zw-guide.on .zw-close { display: none; }
    /* 写信、个人中心、依申请公开页在移动端隐藏浮动引导员，避免遮挡表单与答复 */
    .xjf-wrap + .zw-guide,
    .xj-wrap + .zw-guide,
    .gk-hero .zw-guide { display: none; }
}

/* 11.4 蓝色主题：AI 预解答采纳态与新版验证码区 */
.xjf-ai-foot a.active {
    background: #DAE8FE;
    color: #003D97;
}
.xjf-captcha2 {
    clear: both;
}
.xjf-captcha2 .ai-cap-error {
    clear: both;
    width: 100%;
    margin-top: 12px;
    padding: 4px 10px;
    display: inline-block;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.92);
    color: #B42318;
    font-size: 13px;
    line-height: 1.7;
}
.xjf-captcha2 .ai-cap-error.ai-hidden { display: none !important; }
.xc-code canvas {
    display: block;
    width: 120px;
    height: 46px;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}
.xc-input input.is-invalid {
    box-shadow: inset 0 0 0 2px #D92D20;
    background: #FFF8F8;
}
.xc-submit:disabled,
.xc-submit.is-resolved {
    background: #DCE8F8;
    color: #7B8CA3;
    cursor: not-allowed;
}
.xc-bubble[role="button"] { cursor: pointer; }
.xc-bubble:focus {
    outline: 2px solid #FCEC93;
    outline-offset: 2px;
}
.xc-bubble .ai-cap-hint {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: normal;
    color: #EAF4FF;
}

.xjf-ai-card .ai-answer { margin-top: 4px; }
.xjf-ai-card .ai-empty {
    padding: 28px 0 18px 0; 
   
    color: #4A6A8F;
    font-size: 14px;
    line-height: 1.9;
}
.xjf-ai-card .ai-empty img { display: block; margin: 0 auto 10px; opacity: 0.85; }
.xjf-ai-foot.is-hidden { display: none; }
.xjf-ai-refs.is-hidden { display: none; }
.xjf-ai-body .ai-status-line { padding: 0 30px 18px 0; margin-top: 0; }

/* ---------- 依申请公开页补充 ---------- */
.gk-capability {
    margin-top: 12px;
    font-size: 13px;
    color: #4A6A8F;
    line-height: 1.8;
}
.gk-capability b { color: #173A63; font-weight: normal; }
.gk-hero .ai-examples { margin-top: 12px; }
.gk-ai-card .ai-card-top {
    margin-bottom: 4px;
    line-height: 24px;
}
.gk-ai-card .ai-card-top .gk-chip { margin-right: 6px; }
.gk-ai-card h3 { margin-top: 14px; }
.gk-ai-card .ai-question-line { margin-bottom: 14px; }
.gk-ai-card .gk-ai-foot.is-hidden { display: none; }
.gk-ai-card .ai-actions { border-top: 0; padding-top: 0; margin-top: 8px; }
.gk-man-btn { font-size: 14px; font-family: "Microsoft YaHei", Arial, sans-serif; cursor: pointer; }
/* 11.4 在线申请平台入口：整卡为链接 */
a.gk-man {
    text-decoration: none;
    color: inherit;
}
a.gk-man:hover .gk-man-link { text-decoration: underline; }
a.gk-man:focus {
    outline: 2px solid #9CC0F5;
    outline-offset: 2px;
}
/* 11.4 转人工卡片：整卡可点击，文案内给明确入口 */
.gk-man[role="button"] { cursor: pointer; }
.gk-man[role="button"]:hover .gk-man-link,
.gk-man[role="button"]:focus .gk-man-link { text-decoration: underline; }
.gk-man[role="button"]:focus {
    outline: 2px solid #9CC0F5;
    outline-offset: 2px;
}
.gk-man-link {
    margin-left: 8px;
    color: #003D97;
    font-weight: bold;
    white-space: nowrap;
}
@media (max-width: 1080px) {
    .gk-man .gk-man-link { display: inline-block; margin-left: 0; }
}
.ai-disclaimer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed #DCE8F8;
    font-size: 12px;
    color: #8A97A8;
    line-height: 1.7;
}

/* ---------- 公报页 AI 结果 ---------- */
.gb-ai-result {
    clear: both;
    /* max-width: 850px; */
    margin: 0 0 30px;
    padding: 24px 28px;
    background: #fff;
    border: 1px solid #D6E6FC;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    box-sizing: border-box;
}
.gb-ai-result-hd {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #D5E2F2;
    font-size: 16px;
    color: #173A63;
    font-weight: bold;
}
.gb-ai-result-hd .ai-demo-badge { font-weight: normal; }
.gb-ai-result .ai-answer { font-size: 14px; }
.gb-ai-result .gb-ai-q {
    margin-bottom: 12px;
    font-size: 13px;
    color: #66788F;
}
.gb-ai-result .gb-ai-q b { color: #1151AF; }

/* ---------- 个人中心：我的信件 ---------- */
.xj-menu li .ai-count-tag {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    line-height: 20px;
    padding: 0 6px;
    margin-left: 8px;
    border-radius: 10px;
    background: #1151AF;
    color: #fff;
    font-size: 12px;
    text-align: center;
    vertical-align: 2px;
    box-sizing: border-box;
}
.xj-menu li.on .ai-count-tag { background: #fff; color: #1151AF; }
.ai-letter-list { margin: 0; padding: 0; list-style: none; }
.ai-letter-list li {
    padding: 14px 0;
    border-bottom: 1px dashed #DCE8F8;
}
.ai-letter-list li:last-child { border-bottom: 0; }
.ai-letter-list .ai-letter-hd {
    margin-bottom: 6px;
    font-size: 15px;
    color: #173A63;
    font-weight: bold;
    line-height: 1.7;
}
.ai-letter-list .ai-letter-meta {
    font-size: 12px;
    color: #7B8CA3;
    line-height: 1.9;
}
.ai-letter-list .ai-letter-meta span { margin-right: 16px; }
.ai-letter-list .ai-letter-body {
    margin-top: 8px;
    padding: 10px 12px;
    background: #F8FBFF;
    border-radius: 6px;
    font-size: 13px;
    color: #4A5B70;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}
.ai-empty-state {
    padding: 30px 10px;
    text-align: center;
    color: #7B8CA3;
    font-size: 14px;
    line-height: 1.9;
}
.ai-empty-state .ai-btn { margin-top: 12px; }

/* ---------- AI 简报点击 ---------- */
.xj-brief-list .t-link { cursor: pointer; }

/* ---------- 窄屏 ---------- */
@media (max-width: 768px) {
    .xc-code canvas { width: 96px; height: 36px; margin-top: 2px; }
    .xc-bubble { font-size: 15px; }
    /* 11.4 移动端验证码：标签独占一行，输入框与验证码同排，提交按钮整行 */
    .xjf-captcha2 .xc-label {
        float: none;
        width: auto;
        margin-right: 0;
        text-align: left;
        line-height: 1.5;
        padding: 8px 0;
    }
    .xjf-captcha2 .xc-input { width: calc(100% - 120px); }
    .xjf-captcha2 .xc-code { margin-left: 10px; }
    .ai-modal-mask { padding: 16px 10px; }
    .ai-modal-bd { padding: 16px; max-height: 72vh; }
    .ai-modal-hd { padding: 14px 50px 14px 16px; }
    .ai-modal-ft { padding: 12px 16px; }
    .ai-field { width: 100%; }
    .ai-btn { padding: 0 12px; }
    .ai-toastbox { bottom: 20px; }
    .gb-ai-result { padding: 16px; }
    .xjf-capfield canvas.code { width: 100px; margin-left: 0; margin-top: 8px; }
    .xjf-capfield .ai-cap-refresh { margin-top: 16px; }
    .ai-answer { font-size: 14px; }
}

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
    .ai-answer.is-streaming:after,
    .ai-spin,
    .ai-typing i,
    .ai-btn.is-loading:after { animation: none; }
    .ai-modal, .ai-modal-mask { transition: none; }
}

/* ---------- 公报 AI 简报卡片 ---------- */
.gb-ai-brief {
    font-size: 13.5px;
    color: #31415a;
    line-height: 1.95;
    word-break: break-word;
}
.gb-ai-brief-issue {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #c8dcf2;
    font-size: 13px;
    color: #1151af;
    font-weight: bold;
}
.gb-ai-brief-loading,
.gb-ai-brief-empty {
    color: #8a97a8;
    font-size: 13px;
    line-height: 1.8;
    padding: 8px 0;
}
.gb-ai-brief-note {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #d5e4f5;
    font-size: 11.5px;
    color: #9aa7b6;
    line-height: 1.6;
}
.gb-xz-card .gb-xz-bd { min-height: 140px; }

/* ---------- 依申请公开：相关文章 / 相关部门卡片 ---------- */
.gk-cards {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #cbdcef;
}
.gk-cards-sec { margin-bottom: 14px; }
.gk-cards-sec:last-child { margin-bottom: 0; }
.gk-cards-tit {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: bold;
    color: #1151af;
    line-height: 1.4;
}
.gk-cards-tit::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 12px;
    margin-right: 6px;
    border-radius: 2px;
    background: #1151af;
    vertical-align: -1px;
}
.gk-cards-list { display: block; }
.gk-card {
    display: block;
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid #d5e4f5;
    border-radius: 6px;
    background: #f7fbff;
    text-decoration: none;
    color: #31415a;
    transition: border-color .15s, background .15s;
}
.gk-card:last-child { margin-bottom: 0; }
a.gk-card-link:hover {
    border-color: #7fa9e8;
    background: #eef6ff;
}
.gk-card-title {
    display: block;
    font-size: 13.5px;
    font-weight: bold;
    color: #173a63;
    line-height: 1.6;
}
.gk-card-meta {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #8a97a8;
    line-height: 1.6;
}
.gk-card-sum {
    display: block;
    margin-top: 4px;
    font-size: 12.5px;
    color: #4a5b70;
    line-height: 1.75;
}
.gk-card-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #1151af;
}
.gk-cards-empty {
    padding: 8px 0;
    font-size: 12.5px;
    color: #8a97a8;
}
@media (max-width: 768px) {
    .gk-card { padding: 9px 10px; }
    .gk-card-title { font-size: 13px; }
    .gk-card-sum { font-size: 12px; }
}

/* ---------- 政府公报：AI 检索条件 + 站内检索结果 ---------- */
.gb-search {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #cbdcef;
}
.gb-search-hd {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: bold;
    color: #1151af;
}
.gb-search-list { display: block; }

.gb-search-note {
    margin: -2px 0 10px;
    padding: 7px 10px;
    border-left: 3px solid #9fc0ea;
    background: #f2f7fe;
    border-radius: 0 4px 4px 0;
    font-size: 12px;
    color: #5a6b80;
    line-height: 1.7;
}

.gb-search-item {
    display: block;
    margin-bottom: 8px;
    padding: 10px 12px;
    border: 1px solid #d5e4f5;
    border-radius: 6px;
    background: #f7fbff;
    text-decoration: none;
    color: #31415a;
    transition: border-color .15s, background .15s;
}
.gb-search-item:last-child { margin-bottom: 0; }
a.gb-search-item:hover {
    border-color: #7fa9e8;
    background: #eef6ff;
}
.gb-search-tit {
    display: block;
    font-size: 13.5px;
    font-weight: bold;
    color: #173a63;
    line-height: 1.6;
}
.gb-search-meta {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #8a97a8;
    line-height: 1.6;
}
.gb-search-sum {
    display: block;
    margin-top: 4px;
    font-size: 12.5px;
    color: #4a5b70;
    line-height: 1.75;
}
.gb-search-empty {
    padding: 10px 0;
    font-size: 12.5px;
    color: #8a97a8;
    line-height: 1.8;
}

.gb-search-more {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 9px 0;
    border: 1px solid #c8d9ee;
    border-radius: 6px;
    background: #ffffff;
    color: #1151af;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}
.gb-search-more:hover {
    border-color: #7fa9e8;
    background: #eef6ff;
}
.gb-search-more[disabled] {
    opacity: .6;
    cursor: default;
}

.xjf-ai-card .ai-answer {
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
}


.gk-ai-card .gk-ai-txt{
   margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
}

/* 卡片移入答复容器后：打字光标跟随正文，不要跟在卡片后面 */
#ysqgkAnswerText.is-streaming::after { content: none; }
#ysqgkAnswerText.is-streaming > .gk-ai-txt-body::after {
    content: "";
    display: inline-block;
    width: 7px;
    height: 15px;
    margin-left: 3px;
    background: #168FFF;
    vertical-align: -2px;
    animation: aiCaret 0.9s steps(1) infinite;
}
/* 正文与卡片同处答复容器内时，保持卡片块级排版 */
#ysqgkAnswerText .gk-cards { display: block; }
#ysqgkAnswerText .gk-cards.ai-hidden { display: none; }