/* 资料来源对话框沿用主题色，操作可立即反馈；长原文与小窗口均在框内滚动。 */
/* 可用尺寸由对话框入口结合祖先缩放计算；字体继续随缩放变大，框体保持在可见区域。 */
.document-index-dialog{width:min(760px,calc(var(--index-viewport-width,100vw) - 24px));max-height:calc(var(--index-viewport-height,100dvh) - 24px);box-sizing:border-box;margin:auto;padding:20px;border:1px solid var(--border-color,#8885);border-radius:14px;background:var(--ui-surface,#fff);color:var(--ui-text,#222);overflow:auto;overscroll-behavior:contain;overflow-wrap:anywhere}
.document-index-dialog::backdrop{background:#0006}
.index-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:-20px;background:inherit;padding:10px 0;margin:-10px 0 10px;z-index:1}.index-heading h3{margin:0;font-size:18px}
.index-source{margin:12px 0;padding:12px 0;border-top:1px solid #8884}.index-source summary{cursor:pointer;font-weight:600;min-height:28px}.index-source p,.index-source blockquote{white-space:pre-wrap;margin:8px 0}.index-source blockquote{padding-left:12px;border-left:3px solid #8886;font-size:13px}
.index-source label{display:flex;flex-direction:column;gap:5px;margin:10px 0;font-size:13px;color:var(--ui-text,#222)}.index-source input,.index-source select,.index-source textarea{font:inherit;padding:9px;max-width:100%;box-sizing:border-box;border:1px solid #8886;border-radius:6px;background:transparent;color:inherit}.index-source option{color:var(--ui-text);background:var(--ui-surface)}
.index-actions{display:flex;flex-wrap:wrap;gap:8px}.document-index-dialog button{font:inherit;cursor:pointer;min-height:36px;padding:7px 11px;border:1px solid #8886;border-radius:7px;background:transparent;color:inherit;max-width:100%;white-space:normal}.document-index-dialog button:active{background:#8883}.document-index-dialog button:disabled{opacity:.5;cursor:default}.index-message{min-height:20px;font-size:13px}.index-origin,.index-summary{font-size:12px;opacity:.8}.index-history{padding:8px 0}.index-pages{justify-content:flex-end;margin-top:14px}
@media(max-width:420px){.document-index-dialog{padding:12px}.index-heading{top:-12px}.index-actions button{flex:1 1 130px}}
