html {
    overflow-x: initial !important
}

:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --select-text-bg-color: #B5D6FC;
    --select-text-font-color: auto;
    --monospace: "Lucida Console", Consolas, "Courier", monospace;
    --title-bar-height: 20px
}

/* 深色模式变量 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1e1e1e;
        --text-color: #e0e0e0;
        --select-text-bg-color: #3a3a3a;
    }
}

@media (prefers-color-scheme: dark) {
    a {
        color: #7db1ff;
    }

    hr {
        background-color: #444;
    }

    h6 {
        color: #aaa;
    }
}

.mac-os-11 {
    --title-bar-height: 28px
}

html {
    font-size: 14px;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased
}

body {
    margin: 0;
    padding: 0;
    height: auto;
    inset: 0px;
    font-size: 1rem;
    line-height: 1.42857143;
    overflow-x: hidden;
    background-image: inherit;
    background-size: inherit;
    background-attachment: inherit;
    background-origin: inherit;
    background-clip: inherit;
    background-color: inherit;
    tab-size: 4;
    background-position: inherit;
    background-repeat: inherit
}

iframe {
    margin: auto
}

a.url {
    word-break: break-all
}

a:active,
a:hover {
    outline: 0
}

.in-text-selection,
::selection {
    text-shadow: none;
    background: var(--select-text-bg-color);
    color: var(--select-text-font-color)
}

#write {
    margin: 0 auto;
    height: auto;
    width: inherit;
    word-break: normal;
    word-wrap: break-word;
    position: relative;
    white-space: normal;
    overflow-x: visible;
    padding-top: 36px
}

body.d-export {
    padding-left: 30px;
    padding-right: 30px
}

.d-export .footnote-line,
.d-export li,
.d-export p {
    white-space: pre-wrap
}

.d-export .task-list-item input {
    pointer-events: none
}

@media screen and (max-width:500px) {
    body.d-export {
        padding-left: 0;
        padding-right: 0
    }

    #write {
        padding-left: 20px;
        padding-right: 20px
    }
}

#write li>figure:last-child {
    margin-bottom: .5rem
}

#write ol,
#write ul {
    position: relative
}

.lan_zh p::before {
    content: "\3000\3000"
}

*,
::after,
::before {
    box-sizing: border-box
}

#write h1,
#write h2,
#write h3,
#write h4,
#write h5,
#write h6,
#write p,
#write pre {
    width: inherit
}

#write h1,
#write h2,
#write h3,
#write h4,
#write h5,
#write h6,
#write p {
    position: relative
}

p {
    line-height: inherit
}

h1,
h2,
h3,
h4,
h5,
h6 {
    break-after: avoid-page;
    break-inside: avoid;
    orphans: 4
}

p {
    orphans: 4
}

h1 {
    font-size: 2rem
}

h2 {
    font-size: 1.8rem
}

h3 {
    font-size: 1.6rem
}

h4 {
    font-size: 1.4rem
}

h5 {
    font-size: 1.2rem
}

h6 {
    font-size: 1rem
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin-top: 1rem;
    margin-bottom: 1rem
}

.hidden {
    display: none
}

a {
    cursor: pointer
}

li div {
    padding-top: 0
}

blockquote {
    margin: 1rem 0
}

li .mathjax-block,
li p {
    margin: .5rem 0
}

li blockquote {
    margin: 1rem 0
}

li {
    margin: 0;
    position: relative
}

@media print {

    body,
    html {
        border: 1px solid transparent;
        height: 99%;
        break-after: avoid;
        break-before: avoid;
        font-variant-ligatures: no-common-ligatures
    }

    #write {
        margin-top: 0;
        padding-top: 0;
        border-color: transparent !important;
        padding-bottom: 0 !important
    }

    .d-export * {
        -webkit-print-color-adjust: exact
    }

    .d-export #write {
        break-after: avoid
    }

    .d-export #write::after {
        height: 0
    }
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased
}

body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    color: var(--text-color); /* 改用变量 */
    line-height: 1.6;
    background-color: var(--bg-color); /* 建议也加上背景色变量 */
}

#write {
    max-width: 860px;
    margin: 0 auto;
    padding: 30px;
    padding-bottom: 100px
}

@media only screen and (min-width:1400px) {
    #write {
        max-width: 1024px
    }
}

@media only screen and (min-width:1800px) {
    #write {
        max-width: 1200px
    }
}

#write>ol:first-child,
#write>ul:first-child {
    margin-top: 30px
}

a {
    color: #4183c4
}

h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.4;
    cursor: text
}

h1 {
    font-size: 2.25em;
    line-height: 1.2;
    text-align: center
}

h2 {
    font-size: 1.75em;
    line-height: 1.225
}

h3 {
    font-size: 1.5em;
    line-height: 1.43
}

h4 {
    font-size: 1.25em
}

h5 {
    font-size: 1em
}

h6 {
    font-size: 1em;
    color: #777
}

blockquote,
dl,
ol,
p,
table,
ul {
    margin: .6em 0
}

li>ol,
li>ul {
    margin: 0 0
}

hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box
}

li p.first {
    display: inline-block
}

ol,
ul {
    padding-left: 30px
}

ol:first-child,
ul:first-child {
    margin-top: 0
}

ol:last-child,
ul:last-child {
    margin-bottom: 0
}

@media print {
    html {
        font-size: 13px
    }
}

@media print {
    @page {
        margin: 0
    }

    body.d-export {
        padding-left: 0;
        padding-right: 0
    }

    #write {
        padding: 0
    }
}