#ainote-article { padding: 20px 15px 15px; color: #303c35; font: 16px/1.85 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; overflow-wrap: anywhere; }
#ainote-article * { box-sizing: border-box; }
#ainote-article a { color: #28734e; }
#ainote-article a:hover { color: #195638; text-decoration: underline; }
#ainote-article a:focus-visible, #ainote-article button:focus-visible, #ainote-article summary:focus-visible, #ainote-article [tabindex]:focus-visible { outline: 2px solid #348657; outline-offset: 3px; }
#ainote-article .ain-header { padding-bottom: 22px; margin-bottom: 26px; border-bottom: 1px solid #e6ebe7; text-align: center; }
#ainote-article .ain-category { display: inline-block; padding: 2px 10px; border-radius: 20px; background: #edf5ef; color: #34754e; font-size: 12px; }
#ainote-article h1 { margin: 14px 0 12px; color: #22332a; font-size: 28px; line-height: 1.45; font-weight: 700; }
#ainote-article .ain-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; color: #8c958f; font-size: 13px; line-height: 1.6; }
#ainote-article .ain-section + .ain-section { margin-top: 32px; }
#ainote-article .ain-section { scroll-margin-top: 70px; }
#ainote-article h2 { margin: 25px 0 16px; padding-left: 14px; border-left: 3px solid #328257; color: #314d3a; font-size: 21px; line-height: 1.6; font-weight: 650; }
#ainote-article .ain-section > h2:first-child { margin-top: 0; }
#ainote-article h3 { margin: 24px 0 13px; font-size: 19px; font-weight: 650; color: #314d3a; }
#ainote-article h4, #ainote-article h5, #ainote-article h6 { margin: 20px 0 12px; font-size: 17px; font-weight: 650; color: #314d3a; }
#ainote-article p { margin: 0 0 16px; }
#ainote-article .ain-text + .ain-text { margin-top: 20px; }
#ainote-article strong { font-weight: 650; color: #263d2d; }
#ainote-article .ain-prompt { padding-left: 14px; margin-bottom: 18px; border-left: 2px solid #328257; background: linear-gradient(110deg, #f5f9f6, #fff 65%); color: #22332a; }
#ainote-article .ain-prompt > :first-child { margin-top: 0; }
#ainote-article .ain-prompt > :last-child { margin-bottom: 0; }
#ainote-article ul, #ainote-article ol { margin: 0 0 18px; padding-left: 1.6em; }
#ainote-article ul { list-style: disc; }
#ainote-article ol { list-style: decimal; }
#ainote-article li { margin: 5px 0; }
#ainote-article ul > li { list-style: disc; }
#ainote-article ol > li { list-style: decimal; }
#ainote-article li p { margin: 8px 0; }
#ainote-article li ul, #ainote-article li ol { margin-bottom: 8px; }
#ainote-article blockquote { margin: 18px 0; padding: 12px 18px; color: #67796b; border-left: 3px solid #9abc9f; background: #f6f9f6; }
#ainote-article blockquote p:last-child { margin-bottom: 0; }
#ainote-article hr { height: 1px; border: 0; background: #e7ece7; margin: 26px 0; }
#ainote-article img { display: block; max-width: 100%; max-height: 520px; width: auto; height: auto; margin: 20px auto; border-radius: 6px; }
#ainote-article .ain-body img { cursor: zoom-in; }
#ainote-article .ain-image { margin: 20px 0; text-align: center; }
#ainote-article .ain-image img { max-width: min(100%, 640px); }
#ainote-article .ain-image-error { display: block; margin: 18px auto; padding: 14px 18px; border: 1px dashed #d4dfd5; border-radius: 5px; font-size: 13px; color: #88968c; text-align: center; }
#ainote-article .ain-process { margin: 8px 0 16px; color: #89958d; font-size: 12px; }
#ainote-article .ain-process summary { cursor: pointer; width: fit-content; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }
#ainote-article .ain-process > div { padding: 12px 16px; margin-top: 8px; border-left: 2px solid #d9e5db; color: #6d7a71; font-size: 14px; }
#ainote-article .ain-process p:last-child { margin-bottom: 0; }
#ainote-article .ain-change { margin: 16px 0; border: 1px solid #e1e8e1; border-radius: 5px; }
#ainote-article .ain-change summary { padding: 10px 13px; cursor: pointer; color: #607968; background: #f6f9f6; font: 13px/1.7 Consolas, monospace; }
#ainote-article code { font-family: Consolas, "SFMono-Regular", monospace; font-size: .88em; padding: 2px 5px; background: #f0f4f0; border-radius: 3px; }
#ainote-article pre { margin: 18px 0; border: 1px solid #e1e8e1; border-radius: 5px; background: #f7faf7; overflow: hidden; }
#ainote-article pre code { display: block; overflow-x: auto; padding: 16px; background: transparent; color: #3d4e41; font-size: 13px; line-height: 1.75; white-space: pre; overflow-wrap: normal; border-radius: 0; }
#ainote-article .ain-change pre { margin: 0; border: 0; border-top: 1px solid #e1e8e1; border-radius: 0; }
#ainote-article .ain-code-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 12px; background: #edf3ed; border-bottom: 1px solid #e1e8e1; color: #7b8980; font: 12px/1.8 Consolas, monospace; }
#ainote-article .ain-copy { padding: 2px 4px; font: inherit; color: #40835a; border: 0; background: none; cursor: pointer; }
#ainote-article .hljs-comment, #ainote-article .hljs-quote { color: #819186; }
#ainote-article .hljs-keyword, #ainote-article .hljs-selector-tag, #ainote-article .hljs-built_in { color: #7c5488; }
#ainote-article .hljs-string, #ainote-article .hljs-attr, #ainote-article .hljs-addition { color: #357751; }
#ainote-article .hljs-number, #ainote-article .hljs-literal { color: #b3753a; }
#ainote-article .hljs-deletion { color: #ae5b51; }
#ainote-article .hljs-title, #ainote-article .hljs-variable { color: #3c6d98; }
#ainote-article .ain-table { max-width: 100%; overflow-x: auto; margin: 20px 0; }
#ainote-article table { width: 100%; border-collapse: collapse; font-size: 14px; }
#ainote-article th, #ainote-article td { padding: 10px 12px; text-align: left; border: 1px solid #e0e7e0; min-width: 95px; }
#ainote-article th { color: #435b49; background: #f0f5f0; font-weight: 600; }
#ainote-article tr:nth-child(even) td { background: #fafcf9; }
.ain-attachment-file { font: 16px/1.85 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; display: flex; align-items: center; justify-content: flex-start; min-width: 0; gap: 12px; padding: 10px 15px 10px 15px; }
.ain-attachment-file, .ain-attachment-file * { box-sizing: border-box; }
.ain-attachment-file .ain-download:focus-visible { outline: 2px solid #348657; outline-offset: 3px; }
.ain-attachment-file .ain-file-type { position: relative; display: flex; align-items: flex-end; justify-content: center; flex: 0 0 28px; height: 34px; padding: 0 3px 5px; border: 1px solid #bdd5c5; border-radius: 4px; background: #fff; color: #42825a; font: 600 9px/1.2 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.ain-attachment-file .ain-file-type::before { content: ''; position: absolute; top: -1px; right: -1px; width: 10px; height: 10px; background: linear-gradient(45deg, #dcebe1 50%, #fff 50%); border-bottom: 1px solid #bdd5c5; border-left: 1px solid #bdd5c5; border-radius: 0 3px 0 3px; }
.ain-attachment-file .ain-file-type span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ain-attachment-file .ain-file-name { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 500; color: #354a3d; }
.ain-attachment-file .ain-download { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex-shrink: 0; min-height: 30px; padding: 0px 8px; border: 1px solid #d1e5d8; border-radius: 7px; background: #edf6f0; color: #28734e; white-space: nowrap; font-size: 13px; line-height: 1.5; transition: background .18s, border-color .18s, color .18s; }
.ain-attachment-file .ain-download .ali-icon { font-size: 18px; line-height: 1; }
.ain-attachment-file .ain-download:hover { color: #fff; background: #2c8052; border-color: #2c8052; text-decoration: none; }
#ainote-article .ain-empty { color: #97a199; padding: 18px 0;text-align: center; }
/* 返回顶部放在主体右边框外侧，50px 按钮与边框间隔 10px，窄屏保留 15px 边距。 */
.layui-fixbar { right: max(10px, calc((100% - 768px) / 2 - 60px)); bottom: 20px;}
/* 章节轴独立于返回顶部，按自身高度在屏幕中央向上下扩展。 */
.ain-chapter-bar { position: fixed; top: 50%; width: 50px; transform: translateY(-50%); z-index: 99999; line-height: normal; pointer-events: none; }
.ain-chapters { position: relative; width: 270px; max-height: calc(100vh - 120px); overflow-y: auto; overflow-x: hidden; scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior: contain; pointer-events: none; }
.ain-chapters::-webkit-scrollbar { display: none; }
.ain-chapter-link { position: relative; display: block; width: 50px; height: 50px; border: 0; outline: none; color: #64766a; text-decoration: none; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.ain-chapter-link::before { content: ''; position: absolute; top: 0; bottom: 0; left: 24px; width: 2px; background: #dce6de; }
.ain-chapter-link:first-child::before { top: 50%; }
.ain-chapter-link:last-child::before { bottom: 50%; }
.ain-chapter-link::after { content: ''; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; margin: -7px 0 0 -7px; border: 3px solid #fff; border-radius: 50%; background: #a0b0a5; box-sizing: content-box; }
.ain-chapter-link.is-active::after { width: 11px; height: 11px; margin: -8.5px 0 0 -8.5px; background: #328257; box-shadow: 0 0 0 2px #e2efe6; }
.ain-chapter-link:hover::after { background: #328257; }
.ain-chapter-label { position: absolute; top: 50%; left: 45px; max-width: 210px; padding: 6px 10px; border: 1px solid #e5ece7; border-radius: 4px; background: #fff; box-shadow: 0 2px 8px rgba(32, 61, 43, .06); color: #64766a; font: 12px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; transform: translateY(-50%); visibility: hidden; pointer-events: auto; box-sizing: border-box; }
.ain-chapter-label::before { content: ''; position: absolute; top: 50%; left: -5px; width: 8px; height: 8px; border-left: 1px solid #e5ece7; border-bottom: 1px solid #e5ece7; background: #fff; transform: translateY(-50%) rotate(45deg); }
.ain-chapter-label-text { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ain-chapter-link.is-label-visible .ain-chapter-label { visibility: visible; }
.ain-chapter-link.is-active .ain-chapter-label { color: #28734e; }
.ain-chapter-link:focus { outline: none; }
.ain-chapter-link:focus-visible::after { box-shadow: 0 0 0 2px #328257; }
@media (max-width: 540px) {
    .ain-chapters { width: 200px; max-width: calc(100vw - 10px); }
    .ain-chapter-label { max-width: 140px; }
    #ainote-article {padding: 15px 10px 10px;font-size: 15px;}
    #ainote-article h1 { font-size: 25px; }
    #ainote-article h2 { font-size: 19px; padding-left: 11px; }
    #ainote-article .ain-prompt { padding-left: 11px; }
    #ainote-article h3 { font-size: 18px; }
    #ainote-article .ain-meta { font-size: 12px; }
    #ainote-article pre code { padding: 13px; font-size: 12px; }
    .ain-attachment-file { gap: 8px; padding: 6px 8px; }
    .ain-attachment-file .ain-download { gap: 5px; padding: 5px 9px; }
}
