/* ==========================================================================
   第九道场 — 出处引用与流式输出辅助样式
   百炼回答脚注含超长签名URL，正文只留角标，引用收拢为精简出处列表；
   SSE 流式输出时气泡尾部显示闪烁光标
   ========================================================================== */

/* ---------- 正文角标 ---------- */
.abook-cite-ref {
    display: inline-block;
    margin: 0 1px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 1.5;
    vertical-align: super;
    font-family: var(--sans);
    color: var(--cinnabar);
    background: rgba(168,56,46,.08);
    border-radius: 3px;
    cursor: default;
}

/* ---------- 出处列表 ---------- */
.abook-cite-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--line-soft);
}

.abook-cite-label {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--ink-light);
    font-family: var(--serif);
    margin-right: 2px;
}

/* 出处条目：只展书名，URL 藏在链接里 */
.abook-cite-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 3px 10px 3px 3px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--ink-soft);
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all .22s ease;
}
.abook-cite-item:hover {
    color: var(--cinnabar);
    border-color: rgba(168,56,46,.4);
    background: rgba(168,56,46,.05);
    box-shadow: var(--shadow-sm);
}

/* 序号小印 */
.abook-cite-num {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 10.5px;
    color: var(--paper);
    background: var(--cinnabar);
    border-radius: 50%;
    opacity: .85;
}
.abook-cite-item:hover .abook-cite-num { opacity: 1; }

/* ---------- 窄屏：出处列表不换行挤压 ---------- */
@media (max-width: 640px) {
    .abook-cite-item { max-width: 200px; }
}

/* ---------- 流式输出光标 ---------- */
.abook-stream-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 2px;
    vertical-align: text-bottom;
    background: var(--cinnabar);
    animation: abook-cursor-blink .9s steps(2, start) infinite;
}
@keyframes abook-cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
