.dl-dialog { position: fixed; inset: 0; margin: auto; box-sizing: border-box; width: 420px; height: fit-content; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; border: 2px solid var(--border, #282624); border-radius: 12px; background: var(--bg-primary, #fffaf1); color: var(--text-primary, #282624); font-family: inherit; font-size: 14px; text-align: left; }
.dl-dialog::backdrop { background: rgb(0 0 0 / 40%); }
.dl-dialog h2 { margin: 0 0 12px; font: inherit; font-size: 18px; font-weight: 600; }
.dl-dialog p { margin: 0 0 16px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.dl-dialog input { box-sizing: border-box; width: 100%; min-width: 0; padding: 9px 12px; border: 2px solid var(--border, #282624); border-radius: 8px; background: var(--bg-secondary, #fffaf1); color: inherit; font: inherit; }
.dl-dialog .dl-dialog-error { min-height: 1.7em; margin: 4px 0 12px; color: var(--danger, #b4463a); font-size: 12px; }
.dl-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.dl-dialog button { padding: 8px 18px; border: 2px solid var(--border, #282624); border-radius: 8px; background: var(--bg-secondary, #fffaf1); color: inherit; cursor: pointer; font: inherit; }
.dl-dialog .dl-dialog-primary { background: var(--text-primary, #282624); color: var(--bg-primary, #fffaf1); }
.dl-dialog :focus-visible { outline: 2px solid var(--accent, #a88145); outline-offset: 3px; }
html[data-theme="dark"] .dl-dialog { background: var(--bg-primary, #1e1c19); color: var(--text-primary, #eee8dc); border-color: var(--border, #8e877d); }
html[data-theme="dark"] .dl-dialog input, html[data-theme="dark"] .dl-dialog button { background: var(--bg-secondary, #28251f); border-color: var(--border, #8e877d); }
html[data-theme="dark"] .dl-dialog .dl-dialog-primary { background: var(--text-primary, #eee8dc); color: var(--bg-primary, #1e1c19); }
/* ===== 全站弹窗滚动条统一：内缩细滚动条，不贴右侧边框（2026-10-26） ===== */
.modal-content,
.modal-body,
.dl-dialog,
#dialog-copy,
.guide-box,
.custom-tag-guide-body,
.shared-custom-modal-box,
.mb,
.anp-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(80,65,55,.42) transparent;
}
.modal-content::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.dl-dialog::-webkit-scrollbar,
#dialog-copy::-webkit-scrollbar,
.guide-box::-webkit-scrollbar,
.custom-tag-guide-body::-webkit-scrollbar,
.shared-custom-modal-box::-webkit-scrollbar,
.mb::-webkit-scrollbar,
.anp-body::-webkit-scrollbar { width: 12px; height: 12px; }
.modal-content::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.dl-dialog::-webkit-scrollbar-track,
#dialog-copy::-webkit-scrollbar-track,
.guide-box::-webkit-scrollbar-track,
.custom-tag-guide-body::-webkit-scrollbar-track,
.shared-custom-modal-box::-webkit-scrollbar-track,
.mb::-webkit-scrollbar-track,
.anp-body::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.dl-dialog::-webkit-scrollbar-thumb,
#dialog-copy::-webkit-scrollbar-thumb,
.guide-box::-webkit-scrollbar-thumb,
.custom-tag-guide-body::-webkit-scrollbar-thumb,
.shared-custom-modal-box::-webkit-scrollbar-thumb,
.mb::-webkit-scrollbar-thumb,
.anp-body::-webkit-scrollbar-thumb { background: rgba(80,65,55,.42); border: 3px solid transparent; border-radius: 12px; background-clip: content-box; }
.modal-content::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.dl-dialog::-webkit-scrollbar-thumb:hover,
#dialog-copy::-webkit-scrollbar-thumb:hover,
.guide-box::-webkit-scrollbar-thumb:hover,
.custom-tag-guide-body::-webkit-scrollbar-thumb:hover,
.shared-custom-modal-box::-webkit-scrollbar-thumb:hover,
.mb::-webkit-scrollbar-thumb:hover,
.anp-body::-webkit-scrollbar-thumb:hover { background: rgba(80,65,55,.62); background-clip: content-box; }
.modal-content::-webkit-scrollbar-corner,
.modal-body::-webkit-scrollbar-corner,
.dl-dialog::-webkit-scrollbar-corner,
#dialog-copy::-webkit-scrollbar-corner,
.guide-box::-webkit-scrollbar-corner,
.custom-tag-guide-body::-webkit-scrollbar-corner,
.shared-custom-modal-box::-webkit-scrollbar-corner,
.mb::-webkit-scrollbar-corner,
.anp-body::-webkit-scrollbar-corner { background: transparent; }
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-body,
html[data-theme="dark"] .dl-dialog,
html[data-theme="dark"] #dialog-copy,
html[data-theme="dark"] .guide-box,
html[data-theme="dark"] .custom-tag-guide-body,
html[data-theme="dark"] .shared-custom-modal-box,
html[data-theme="dark"] .mb,
html[data-theme="dark"] .anp-body { scrollbar-color: rgba(237,229,218,.32) transparent; }
html[data-theme="dark"] .modal-content::-webkit-scrollbar-thumb,
html[data-theme="dark"] .modal-body::-webkit-scrollbar-thumb,
html[data-theme="dark"] .dl-dialog::-webkit-scrollbar-thumb,
html[data-theme="dark"] #dialog-copy::-webkit-scrollbar-thumb,
html[data-theme="dark"] .guide-box::-webkit-scrollbar-thumb,
html[data-theme="dark"] .custom-tag-guide-body::-webkit-scrollbar-thumb,
html[data-theme="dark"] .shared-custom-modal-box::-webkit-scrollbar-thumb,
html[data-theme="dark"] .mb::-webkit-scrollbar-thumb,
html[data-theme="dark"] .anp-body::-webkit-scrollbar-thumb { background: rgba(237,229,218,.32); background-clip: content-box; }
html[data-theme="dark"] .modal-content::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .modal-body::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .dl-dialog::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] #dialog-copy::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .guide-box::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .custom-tag-guide-body::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .shared-custom-modal-box::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .mb::-webkit-scrollbar-thumb:hover,
html[data-theme="dark"] .anp-body::-webkit-scrollbar-thumb:hover { background: rgba(237,229,218,.5); background-clip: content-box; }
